* infohack.el (infohack-texi-format): Include other files first.
[elisp/gnus.git-] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle T-gnus 6.16 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}{T-gnus v6.16}
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 T-gnus 6.16 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 T-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 T-gnus provides @acronym{MIME} features based on @acronym{SEMI} API.  So
394 T-gnus supports your right to read strange messages including big images
395 or other various kinds of formats.  T-gnus also supports
396 internationalization/localization and multiscript features based on MULE
397 API.  So T-gnus does not discriminate various language communities.  Oh,
398 if you are a Klingon, please wait Unicode Next Generation.
399
400 This manual corresponds to T-gnus 6.16.
401
402 @end ifinfo
403
404 @iftex
405
406 @iflatex
407 \tableofcontents
408 \gnuscleardoublepage
409 @end iflatex
410
411 Gnus is the advanced, self-documenting, customizable, extensible
412 unreal-time newsreader for GNU Emacs.
413
414 Oops.  That sounds oddly familiar, so let's start over again to avoid
415 being accused of plagiarism:
416
417 Gnus is a message-reading laboratory.  It will let you look at just
418 about anything as if it were a newsgroup.  You can read mail with it,
419 you can browse directories with it, you can @code{ftp} with it---you
420 can even read news with it!
421
422 Gnus tries to empower people who read news the same way Emacs empowers
423 people who edit text.  Gnus sets no limits to what the user should be
424 allowed to do.  Users are encouraged to extend gnus to make it behave
425 like they want it to behave.  A program should not control people;
426 people should be empowered to do what they want by using (or abusing)
427 the program.
428
429 @end iftex
430
431 @menu
432 * Starting Up::                 Finding news can be a pain.
433 * Group Buffer::                Selecting, subscribing and killing groups.
434 * Summary Buffer::              Reading, saving and posting articles.
435 * Article Buffer::              Displaying and handling articles.
436 * Composing Messages::          Information on sending mail and news.
437 * Select Methods::              Gnus reads all messages from various select methods.
438 * Scoring::                     Assigning values to articles.
439 * Various::                     General purpose settings.
440 * The End::                     Farewell and goodbye.
441 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
442 * Index::                       Variable, function and concept index.
443 * Key Index::                   Key Index.
444
445 Other related manuals
446
447 * Message:(message).            Composing messages.
448 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
449 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
450 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
451
452 @detailmenu
453  --- The Detailed Node Listing ---
454
455 Starting Gnus
456
457 * Finding the News::            Choosing a method for getting news.
458 * The First Time::              What does Gnus do the first time you start it?
459 * The Server is Down::          How can I read my mail then?
460 * Slave Gnusae::                You can have more than one Gnus active at a time.
461 * Fetching a Group::            Starting Gnus just to read a group.
462 * New Groups::                  What is Gnus supposed to do with new groups?
463 * Changing Servers::            You may want to move from one server to another.
464 * Startup Files::               Those pesky startup files---@file{.newsrc}.
465 * Auto Save::                   Recovering from a crash.
466 * The Active File::             Reading the active file over a slow line Takes Time.
467 * Startup Variables::           Other variables you might change.
468
469 New Groups
470
471 * Checking New Groups::         Determining what groups are new.
472 * Subscription Methods::        What Gnus should do with new groups.
473 * Filtering New Groups::        Making Gnus ignore certain new groups.
474
475 Group Buffer
476
477 * Group Buffer Format::         Information listed and how you can change it.
478 * Group Maneuvering::           Commands for moving in the group buffer.
479 * Selecting a Group::           Actually reading news.
480 * Subscription Commands::       Unsubscribing, killing, subscribing.
481 * Group Data::                  Changing the info for a group.
482 * Group Levels::                Levels? What are those, then?
483 * Group Score::                 A mechanism for finding out what groups you like.
484 * Marking Groups::              You can mark groups for later processing.
485 * Foreign Groups::              Creating and editing groups.
486 * Group Parameters::            Each group may have different parameters set.
487 * Listing Groups::              Gnus can list various subsets of the groups.
488 * Sorting Groups::              Re-arrange the group order.
489 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
490 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
491 * Exiting Gnus::                Stop reading news and get some work done.
492 * Group Topics::                A folding group mode divided into topics.
493 * Misc Group Stuff::            Other stuff that you can to do.
494
495 Group Buffer Format
496
497 * Group Line Specification::    Deciding how the group buffer is to look.
498 * Group Mode Line Specification::  The group buffer mode line.
499 * Group Highlighting::          Having nice colors in the group buffer.
500
501 Group Topics
502
503 * Topic Commands::              Interactive E-Z commands.
504 * Topic Variables::             How to customize the topics the Lisp Way.
505 * Topic Sorting::               Sorting each topic individually.
506 * Topic Topology::              A map of the world.
507 * Topic Parameters::            Parameters that apply to all groups in a topic.
508
509 Misc Group Stuff
510
511 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
512 * Group Information::           Information and help on groups and Gnus.
513 * Group Timestamp::             Making Gnus keep track of when you last read a group.
514 * File Commands::               Reading and writing the Gnus files.
515 * Sieve Commands::              Managing Sieve scripts.
516
517 Summary Buffer
518
519 * Summary Buffer Format::       Deciding how the summary buffer is to look.
520 * Summary Maneuvering::         Moving around the summary buffer.
521 * Choosing Articles::           Reading articles.
522 * Paging the Article::          Scrolling the current article.
523 * Reply Followup and Post::     Posting articles.
524 * Delayed Articles::            Send articles at a later time.
525 * Marking Articles::            Marking articles as read, expirable, etc.
526 * Limiting::                    You can limit the summary buffer.
527 * Threading::                   How threads are made.
528 * Sorting the Summary Buffer::  How articles and threads are sorted.
529 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
530 * Article Caching::             You may store articles in a cache.
531 * Persistent Articles::         Making articles expiry-resistant.
532 * Article Backlog::             Having already read articles hang around.
533 * Saving Articles::             Ways of customizing article saving.
534 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
535 * Article Treatment::           The article buffer can be mangled at will.
536 * MIME Commands::               Doing MIMEy things with the articles.
537 * Charsets::                    Character set issues.
538 * Article Commands::            Doing various things with the article buffer.
539 * Summary Sorting::             Sorting the summary buffer in various ways.
540 * Finding the Parent::          No child support? Get the parent.
541 * Alternative Approaches::      Reading using non-default summaries.
542 * Tree Display::                A more visual display of threads.
543 * Mail Group Commands::         Some commands can only be used in mail groups.
544 * Various Summary Stuff::       What didn't fit anywhere else.
545 * Exiting the Summary Buffer::  Returning to the Group buffer,
546                                 or reselecting the current group.
547 * Crosspost Handling::          How crossposted articles are dealt with.
548 * Duplicate Suppression::       An alternative when crosspost handling fails.
549 * Security::                    Decrypt and Verify.
550 * Mailing List::                Mailing list minor mode.
551
552 Summary Buffer Format
553
554 * Summary Buffer Lines::        You can specify how summary lines should look.
555 * To From Newsgroups::          How to not display your own name.
556 * Summary Buffer Mode Line::    You can say how the mode line should look.
557 * Summary Highlighting::        Making the summary buffer all pretty and nice.
558
559 Choosing Articles
560
561 * Choosing Commands::           Commands for choosing articles.
562 * Choosing Variables::          Variables that influence these commands.
563
564 Reply, Followup and Post
565
566 * Summary Mail Commands::       Sending mail.
567 * Summary Post Commands::       Sending news.
568 * Summary Message Commands::    Other Message-related commands.
569 * Canceling and Superseding::
570
571 Marking Articles
572
573 * Unread Articles::             Marks for unread articles.
574 * Read Articles::               Marks for read articles.
575 * Other Marks::                 Marks that do not affect readedness.
576 * Setting Marks::
577 * Generic Marking Commands::
578 * Setting Process Marks::
579
580 Marking Articles
581
582 * Setting Marks::             How to set and remove marks.
583 * Generic Marking Commands::  How to customize the marking.
584 * Setting Process Marks::     How to mark articles for later processing.
585
586 Threading
587
588 * Customizing Threading::       Variables you can change to affect the threading.
589 * Thread Commands::             Thread based commands in the summary buffer.
590
591 Customizing Threading
592
593 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
594 * Filling In Threads::          Making the threads displayed look fuller.
595 * More Threading::              Even more variables for fiddling with threads.
596 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
597
598 Decoding Articles
599
600 * Uuencoded Articles::          Uudecode articles.
601 * Shell Archives::              Unshar articles.
602 * PostScript Files::            Split PostScript.
603 * Other Files::                 Plain save and binhex.
604 * Decoding Variables::          Variables for a happy decoding.
605 * Viewing Files::               You want to look at the result of the decoding?
606
607 Decoding Variables
608
609 * Rule Variables::              Variables that say how a file is to be viewed.
610 * Other Decode Variables::      Other decode variables.
611 * Uuencoding and Posting::      Variables for customizing uuencoding.
612
613 Article Treatment
614
615 * Article Highlighting::        You want to make the article look like fruit salad.
616 * Article Fontisizing::         Making emphasized text look nice.
617 * Article Hiding::              You also want to make certain info go away.
618 * Article Washing::             Lots of way-neat functions to make life better.
619 * Article Header::              Doing various header transformations.
620 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
621 * Article Button Levels::       Controlling appearance of buttons.
622 * Article Date::                Grumble, UT!
623 * Article Display::             Display various stuff---X-Face, Picons, Smileys
624 * Article Signature::           What is a signature?
625 * Article Miscellanea::         Various other stuff.
626
627 Alternative Approaches
628
629 * Pick and Read::               First mark articles and then read them.
630 * Binary Groups::               Auto-decode all articles.
631
632 Various Summary Stuff
633
634 * Summary Group Information::   Information oriented commands.
635 * Searching for Articles::      Multiple article commands.
636 * Summary Generation Commands::
637 * Really Various Summary Commands::  Those pesky non-conformant commands.
638
639 Article Buffer
640
641 * Hiding Headers::              Deciding what headers should be displayed.
642 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
643 * Customizing Articles::        Tailoring the look of the articles.
644 * Article Keymap::              Keystrokes available in the article buffer.
645 * Misc Article::                Other stuff.
646
647 Composing Messages
648
649 * Mail::                        Mailing and replying.
650 * Posting Server::              What server should you post and mail via?
651 * Mail and Post::               Mailing and posting at the same time.
652 * Archived Messages::           Where Gnus stores the messages you've sent.
653 * Posting Styles::              An easier way to specify who you are.
654 * Drafts::                      Postponing messages and rejected messages.
655 * Rejected Articles::           What happens if the server doesn't like your article?
656 * Signing and encrypting::      How to compose secure messages.
657
658 Select Methods
659
660 * Server Buffer::               Making and editing virtual servers.
661 * Getting News::                Reading USENET news with Gnus.
662 * Getting Mail::                Reading your personal mail with Gnus.
663 * Browsing the Web::            Getting messages from a plethora of Web sources.
664 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
665 * Other Sources::               Reading directories, files, SOUP packets.
666 * Combined Groups::             Combining groups into one group.
667 * Gnus Unplugged::              Reading news and mail offline.
668
669 Server Buffer
670
671 * Server Buffer Format::        You can customize the look of this buffer.
672 * Server Commands::             Commands to manipulate servers.
673 * Example Methods::             Examples server specifications.
674 * Creating a Virtual Server::   An example session.
675 * Server Variables::            Which variables to set.
676 * Servers and Methods::         You can use server names as select methods.
677 * Unavailable Servers::         Some servers you try to contact may be down.
678
679 Getting News
680
681 * NNTP::                        Reading news from an @acronym{NNTP} server.
682 * News Spool::                  Reading news from the local spool.
683
684 @acronym{NNTP}
685
686 * Direct Functions::            Connecting directly to the server.
687 * Indirect Functions::          Connecting indirectly to the server.
688 * Common Variables::            Understood by several connection functions.
689
690 Getting Mail
691
692 * Mail in a Newsreader::        Important introductory notes.
693 * Getting Started Reading Mail::  A simple cookbook example.
694 * Splitting Mail::              How to create mail groups.
695 * Mail Sources::                How to tell Gnus where to get mail from.
696 * Mail Back End Variables::     Variables for customizing mail handling.
697 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
698 * Group Mail Splitting::        Use group customize to drive mail splitting.
699 * Incorporating Old Mail::      What about the old mail you have?
700 * Expiring Mail::               Getting rid of unwanted mail.
701 * Washing Mail::                Removing cruft from the mail you get.
702 * Duplicates::                  Dealing with duplicated mail.
703 * Not Reading Mail::            Using mail back ends for reading other files.
704 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
705
706 Mail Sources
707
708 * Mail Source Specifiers::      How to specify what a mail source is.
709 * Mail Source Customization::   Some variables that influence things.
710 * Fetching Mail::               Using the mail source specifiers.
711
712 Choosing a Mail Back End
713
714 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
715 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
716 * Mail Spool::                  Store your mail in a private spool?
717 * MH Spool::                    An mhspool-like back end.
718 * Maildir::                     Another one-file-per-message format.
719 * Mail Folders::                Having one file for each group.
720 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
721
722 Browsing the Web
723
724 * Archiving Mail::
725 * Web Searches::                Creating groups from articles that match a string.
726 * Slashdot::                    Reading the Slashdot comments.
727 * Ultimate::                    The Ultimate Bulletin Board systems.
728 * Web Archive::                 Reading mailing list archived on web.
729 * RSS::                         Reading RDF site summary.
730 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
731
732 @acronym{IMAP}
733
734 * Splitting in IMAP::           Splitting mail with nnimap.
735 * Expiring in IMAP::            Expiring mail with nnimap.
736 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
737 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
738 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
739
740 Other Sources
741
742 * Directory Groups::            You can read a directory as if it was a newsgroup.
743 * Anything Groups::             Dired?  Who needs dired?
744 * Document Groups::             Single files can be the basis of a group.
745 * SOUP::                        Reading @sc{soup} packets ``offline''.
746 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
747
748 Document Groups
749
750 * Document Server Internals::   How to add your own document types.
751
752 SOUP
753
754 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
755 * SOUP Groups::                 A back end for reading @sc{soup} packets.
756 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
757
758 Combined Groups
759
760 * Virtual Groups::              Combining articles from many groups.
761 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
762
763 Gnus Unplugged
764
765 * Agent Basics::                How it all is supposed to work.
766 * Agent Categories::            How to tell the Gnus Agent what to download.
767 * Agent Commands::              New commands for all the buffers.
768 * Agent Visuals::               Ways that the agent may effect your summary buffer.
769 * Agent as Cache::              The Agent is a big cache too.
770 * Agent Expiry::                How to make old articles go away.
771 * Agent Regeneration::          How to recover from lost connections and other accidents.
772 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
773 * Outgoing Messages::           What happens when you post/mail something?
774 * Agent Variables::             Customizing is fun.
775 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
776 * Batching Agents::             How to fetch news from a @code{cron} job.
777 * Agent Caveats::               What you think it'll do and what it does.
778
779 Agent Categories
780
781 * Category Syntax::             What a category looks like.
782 * Category Buffer::             A buffer for maintaining categories.
783 * Category Variables::          Customize'r'Us.
784
785 Agent Commands
786
787 * Group Agent Commands::        Configure groups and fetch their contents.
788 * Summary Agent Commands::      Manually select then fetch specific articles.
789 * Server Agent Commands::       Select the servers that are supported by the agent.
790
791 Scoring
792
793 * Summary Score Commands::      Adding score entries for the current group.
794 * Group Score Commands::        General score commands.
795 * Score Variables::             Customize your scoring.  (My, what terminology).
796 * Score File Format::           What a score file may contain.
797 * Score File Editing::          You can edit score files by hand as well.
798 * Adaptive Scoring::            Big Sister Gnus knows what you read.
799 * Home Score File::             How to say where new score entries are to go.
800 * Followups To Yourself::       Having Gnus notice when people answer you.
801 * Scoring On Other Headers::    Scoring on non-standard headers.
802 * Scoring Tips::                How to score effectively.
803 * Reverse Scoring::             That problem child of old is not problem.
804 * Global Score Files::          Earth-spanning, ear-splitting score files.
805 * Kill Files::                  They are still here, but they can be ignored.
806 * Converting Kill Files::       Translating kill files to score files.
807 * GroupLens::                   Getting predictions on what you like to read.
808 * Advanced Scoring::            Using logical expressions to build score rules.
809 * Score Decays::                It can be useful to let scores wither away.
810
811 GroupLens
812
813 * Using GroupLens::             How to make Gnus use GroupLens.
814 * Rating Articles::             Letting GroupLens know how you rate articles.
815 * Displaying Predictions::      Displaying predictions given by GroupLens.
816 * GroupLens Variables::         Customizing GroupLens.
817
818 Advanced Scoring
819
820 * Advanced Scoring Syntax::     A definition.
821 * Advanced Scoring Examples::   What they look like.
822 * Advanced Scoring Tips::       Getting the most out of it.
823
824 Various
825
826 * Process/Prefix::              A convention used by many treatment commands.
827 * Interactive::                 Making Gnus ask you many questions.
828 * Symbolic Prefixes::           How to supply some Gnus functions with options.
829 * Formatting Variables::        You can specify what buffers should look like.
830 * Window Layout::               Configuring the Gnus buffer windows.
831 * Faces and Fonts::             How to change how faces look.
832 * Compilation::                 How to speed Gnus up.
833 * Mode Lines::                  Displaying information in the mode lines.
834 * Highlighting and Menus::      Making buffers look all nice and cozy.
835 * Buttons::                     Get tendinitis in ten easy steps!
836 * Daemons::                     Gnus can do things behind your back.
837 * NoCeM::                       How to avoid spam and other fatty foods.
838 * Undo::                        Some actions can be undone.
839 * Predicate Specifiers::        Specifying predicates.
840 * Moderation::                  What to do if you're a moderator.
841 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
842 * Fuzzy Matching::              What's the big fuzz?
843 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
844 * Various Various::             Things that are really various.
845
846 Formatting Variables
847
848 * Formatting Basics::           A formatting variable is basically a format string.
849 * Mode Line Formatting::        Some rules about mode line formatting variables.
850 * Advanced Formatting::         Modifying output in various ways.
851 * User-Defined Specs::          Having Gnus call your own functions.
852 * Formatting Fonts::            Making the formatting look colorful and nice.
853 * Positioning Point::           Moving point to a position after an operation.
854 * Tabulation::                  Tabulating your output.
855 * Wide Characters::             Dealing with wide characters.
856
857 Image Enhancements
858
859 * Picons::                      How to display pictures of what you're reading.
860 * Smileys::                     Show all those happy faces the way they were meant to be shown.
861 * X-Face::                      Display a funky, teensy black-and-white image.
862 * XVarious::                    Other XEmacsy Gnusey variables.
863
864 Thwarting Email Spam
865
866 * The problem of spam::         Some background, and some solutions
867 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
868 * SpamAssassin::                How to use external anti-spam tools.
869 * Hashcash::                    Reduce spam by burning CPU time.
870 * Filtering Spam Using The Spam ELisp Package::
871 * Filtering Spam Using Statistics with spam-stat::
872
873 Appendices
874
875 * XEmacs::                      Requirements for installing under XEmacs.
876 * History::                     How Gnus got where it is today.
877 * On Writing Manuals::          Why this is not a beginner's guide.
878 * Terminology::                 We use really difficult, like, words here.
879 * Customization::               Tailoring Gnus to your needs.
880 * Troubleshooting::             What you might try if things do not work.
881 * Gnus Reference Guide::        Rilly, rilly technical stuff.
882 * Emacs for Heathens::          A short introduction to Emacsian terms.
883 * Frequently Asked Questions::  The Gnus FAQ.
884
885 History
886
887 * Gnus Versions::               What Gnus versions have been released.
888 * Other Gnus Versions::         Other Gnus versions that also have been released.
889 * Why?::                        What's the point of Gnus?
890 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
891 * Conformity::                  Gnus tries to conform to all standards.
892 * Emacsen::                     Gnus can be run on a few modern Emacsen.
893 * Gnus Development::            How Gnus is developed.
894 * Contributors::                Oodles of people.
895 * New Features::                Pointers to some of the new stuff in Gnus.
896
897 New Features
898
899 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
900 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
901 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
902 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
903 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
904 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
905
906 Customization
907
908 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
909 * Slow Terminal Connection::    You run a remote Emacs.
910 * Little Disk Space::           You feel that having large setup files is icky.
911 * Slow Machine::                You feel like buying a faster machine.
912
913 Gnus Reference Guide
914
915 * Gnus Utility Functions::      Common functions and variable to use.
916 * Back End Interface::          How Gnus communicates with the servers.
917 * Score File Syntax::           A BNF definition of the score file standard.
918 * Headers::                     How Gnus stores headers internally.
919 * Ranges::                      A handy format for storing mucho numbers.
920 * Group Info::                  The group info format.
921 * Extended Interactive::        Symbolic prefixes and stuff.
922 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
923 * Various File Formats::        Formats of files that Gnus use.
924
925 Back End Interface
926
927 * Required Back End Functions::  Functions that must be implemented.
928 * Optional Back End Functions::  Functions that need not be implemented.
929 * Error Messaging::             How to get messages and report errors.
930 * Writing New Back Ends::       Extending old back ends.
931 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
932 * Mail-like Back Ends::         Some tips on mail back ends.
933
934 Various File Formats
935
936 * Active File Format::          Information on articles and groups available.
937 * Newsgroups File Format::      Group descriptions.
938
939 Emacs for Heathens
940
941 * Keystrokes::                  Entering text and executing commands.
942 * Emacs Lisp::                  The built-in Emacs programming language.
943
944 @end detailmenu
945 @end menu
946
947 @node Starting Up
948 @chapter Starting gnus
949 @cindex starting up
950
951 @kindex M-x gnus
952 @findex gnus
953 If your system administrator has set things up properly, starting gnus
954 and reading news is extremely easy---you just type @kbd{M-x gnus} in
955 your Emacs.
956
957 @findex gnus-other-frame
958 @kindex M-x gnus-other-frame
959 If you want to start gnus in a different frame, you can use the command
960 @kbd{M-x gnus-other-frame} instead.
961
962 If things do not go smoothly at startup, you have to twiddle some
963 variables in your @file{~/.gnus.el} file.  This file is similar to
964 @file{~/.emacs}, but is read when gnus starts.
965
966 If you puzzle at any terms used in this manual, please refer to the
967 terminology section (@pxref{Terminology}).
968
969 @menu
970 * Finding the News::            Choosing a method for getting news.
971 * The First Time::              What does Gnus do the first time you start it?
972 * The Server is Down::          How can I read my mail then?
973 * Slave Gnusae::                You can have more than one Gnus active at a time.
974 * Fetching a Group::            Starting Gnus just to read a group.
975 * New Groups::                  What is Gnus supposed to do with new groups?
976 * Changing Servers::            You may want to move from one server to another.
977 * Startup Files::               Those pesky startup files---@file{.newsrc}.
978 * Auto Save::                   Recovering from a crash.
979 * The Active File::             Reading the active file over a slow line Takes Time.
980 * Startup Variables::           Other variables you might change.
981 @end menu
982
983
984 @node Finding the News
985 @section Finding the News
986 @cindex finding news
987
988 @vindex gnus-select-method
989 @c @head
990 The @code{gnus-select-method} variable says where gnus should look for
991 news.  This variable should be a list where the first element says
992 @dfn{how} and the second element says @dfn{where}.  This method is your
993 native method.  All groups not fetched with this method are
994 foreign groups.
995
996 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
997 you want to get your daily dosage of news from, you'd say:
998
999 @lisp
1000 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1001 @end lisp
1002
1003 If you want to read directly from the local spool, say:
1004
1005 @lisp
1006 (setq gnus-select-method '(nnspool ""))
1007 @end lisp
1008
1009 If you can use a local spool, you probably should, as it will almost
1010 certainly be much faster.  But do not use the local spool if your
1011 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1012
1013 @vindex gnus-nntpserver-file
1014 @cindex NNTPSERVER
1015 @cindex @acronym{NNTP} server
1016 If this variable is not set, gnus will take a look at the
1017 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1018 gnus will see whether @code{gnus-nntpserver-file}
1019 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1020 If that fails as well, gnus will try to use the machine running Emacs
1021 as an @acronym{NNTP} server.  That's a long shot, though.
1022
1023 @vindex gnus-nntp-server
1024 If @code{gnus-nntp-server} is set, this variable will override
1025 @code{gnus-select-method}.  You should therefore set
1026 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1027
1028 @vindex gnus-secondary-servers
1029 @vindex gnus-nntp-server
1030 You can also make gnus prompt you interactively for the name of an
1031 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1032 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1033 in the @code{gnus-secondary-servers} list (if any).  You can also just
1034 type in the name of any server you feel like visiting.  (Note that this
1035 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1036 gnus} later in the same Emacs session, Gnus will contact the same
1037 server.)
1038
1039 @findex gnus-group-browse-foreign-server
1040 @kindex B (Group)
1041 However, if you use one @acronym{NNTP} server regularly and are just
1042 interested in a couple of groups from a different server, you would be
1043 better served by using the @kbd{B} command in the group buffer.  It will
1044 let you have a look at what groups are available, and you can subscribe
1045 to any of the groups you want to.  This also makes @file{.newsrc}
1046 maintenance much tidier.  @xref{Foreign Groups}.
1047
1048 @vindex gnus-secondary-select-methods
1049 @c @head
1050 A slightly different approach to foreign groups is to set the
1051 @code{gnus-secondary-select-methods} variable.  The select methods
1052 listed in this variable are in many ways just as native as the
1053 @code{gnus-select-method} server.  They will also be queried for active
1054 files during startup (if that's required), and new newsgroups that
1055 appear on these servers will be subscribed (or not) just as native
1056 groups are.
1057
1058 For instance, if you use the @code{nnmbox} back end to read your mail,
1059 you would typically set this variable to
1060
1061 @lisp
1062 (setq gnus-secondary-select-methods '((nnmbox "")))
1063 @end lisp
1064
1065
1066 @node The First Time
1067 @section The First Time
1068 @cindex first time usage
1069
1070 If no startup files exist, gnus will try to determine what groups should
1071 be subscribed by default.
1072
1073 @vindex gnus-default-subscribed-newsgroups
1074 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1075 will subscribe you to just those groups in that list, leaving the rest
1076 killed.  Your system administrator should have set this variable to
1077 something useful.
1078
1079 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1080 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1081 here as @dfn{whatever Lars thinks you should read}.)
1082
1083 You'll also be subscribed to the gnus documentation group, which should
1084 help you with most common problems.
1085
1086 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1087 use the normal functions for handling new groups, and not do anything
1088 special.
1089
1090
1091 @node The Server is Down
1092 @section The Server is Down
1093 @cindex server errors
1094
1095 If the default server is down, gnus will understandably have some
1096 problems starting.  However, if you have some mail groups in addition to
1097 the news groups, you may want to start gnus anyway.
1098
1099 Gnus, being the trusting sort of program, will ask whether to proceed
1100 without a native select method if that server can't be contacted.  This
1101 will happen whether the server doesn't actually exist (i.e., you have
1102 given the wrong address) or the server has just momentarily taken ill
1103 for some reason or other.  If you decide to continue and have no foreign
1104 groups, you'll find it difficult to actually do anything in the group
1105 buffer.  But, hey, that's your problem.  Blllrph!
1106
1107 @findex gnus-no-server
1108 @kindex M-x gnus-no-server
1109 @c @head
1110 If you know that the server is definitely down, or you just want to read
1111 your mail without bothering with the server at all, you can use the
1112 @code{gnus-no-server} command to start gnus.  That might come in handy
1113 if you're in a hurry as well.  This command will not attempt to contact
1114 your primary server---instead, it will just activate all groups on level
1115 1 and 2.  (You should preferably keep no native groups on those two
1116 levels.) Also @pxref{Group Levels}.
1117
1118
1119 @node Slave Gnusae
1120 @section Slave Gnusae
1121 @cindex slave
1122
1123 You might want to run more than one Emacs with more than one gnus at the
1124 same time.  If you are using different @file{.newsrc} files (e.g., if you
1125 are using the two different gnusae to read from two different servers),
1126 that is no problem whatsoever.  You just do it.
1127
1128 The problem appears when you want to run two Gnusae that use the same
1129 @file{.newsrc} file.
1130
1131 To work around that problem some, we here at the Think-Tank at the gnus
1132 Towers have come up with a new concept: @dfn{Masters} and
1133 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1134 taken out a copyright on those words.  If you wish to use those words in
1135 conjunction with each other, you have to send $1 per usage instance to
1136 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1137 Applications}) will be much more expensive, of course.)
1138
1139 @findex gnus-slave
1140 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1141 however you do it).  Each subsequent slave gnusae should be started with
1142 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1143 files, but instead save @dfn{slave files} that contain information only
1144 on what groups have been read in the slave session.  When a master gnus
1145 starts, it will read (and delete) these slave files, incorporating all
1146 information from them.  (The slave files will be read in the sequence
1147 they were created, so the latest changes will have precedence.)
1148
1149 Information from the slave files has, of course, precedence over the
1150 information in the normal (i.e., master) @file{.newsrc} file.
1151
1152 If the @file{.newsrc*} files have not been saved in the master when the
1153 slave starts, you may be prompted as to whether to read an auto-save
1154 file.  If you answer ``yes'', the unsaved changes to the master will be
1155 incorporated into the slave.  If you answer ``no'', the slave may see some
1156 messages as unread that have been read in the master.
1157
1158 @node Fetching a Group
1159 @section Fetching a Group
1160 @cindex fetching a group
1161
1162 @findex gnus-fetch-group
1163 It is sometimes convenient to be able to just say ``I want to read this
1164 group and I don't care whether gnus has been started or not''.  This is
1165 perhaps more useful for people who write code than for users, but the
1166 command @code{gnus-fetch-group} provides this functionality in any case.
1167 It takes the group name as a parameter.
1168
1169
1170 @node New Groups
1171 @section New Groups
1172 @cindex new groups
1173 @cindex subscription
1174
1175 @vindex gnus-check-new-newsgroups
1176 If you are satisfied that you really never want to see any new groups,
1177 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1178 also save you some time at startup.  Even if this variable is
1179 @code{nil}, you can always subscribe to the new groups just by pressing
1180 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1181 is @code{ask-server} by default.  If you set this variable to
1182 @code{always}, then Gnus will query the back ends for new groups even
1183 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1184
1185 @menu
1186 * Checking New Groups::         Determining what groups are new.
1187 * Subscription Methods::        What Gnus should do with new groups.
1188 * Filtering New Groups::        Making Gnus ignore certain new groups.
1189 @end menu
1190
1191
1192 @node Checking New Groups
1193 @subsection Checking New Groups
1194
1195 Gnus normally determines whether a group is new or not by comparing the
1196 list of groups from the active file(s) with the lists of subscribed and
1197 dead groups.  This isn't a particularly fast method.  If
1198 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1199 server for new groups since the last time.  This is both faster and
1200 cheaper.  This also means that you can get rid of the list of killed
1201 groups altogether, so you may set @code{gnus-save-killed-list} to
1202 @code{nil}, which will save time both at startup, at exit, and all over.
1203 Saves disk space, too.  Why isn't this the default, then?
1204 Unfortunately, not all servers support this command.
1205
1206 I bet I know what you're thinking now: How do I find out whether my
1207 server supports @code{ask-server}?  No?  Good, because I don't have a
1208 fail-safe answer.  I would suggest just setting this variable to
1209 @code{ask-server} and see whether any new groups appear within the next
1210 few days.  If any do, then it works.  If none do, then it doesn't
1211 work.  I could write a function to make gnus guess whether the server
1212 supports @code{ask-server}, but it would just be a guess.  So I won't.
1213 You could @code{telnet} to the server and say @code{HELP} and see
1214 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1215 it does, then it might work.  (But there are servers that lists
1216 @samp{NEWGROUPS} without supporting the function properly.)
1217
1218 This variable can also be a list of select methods.  If so, gnus will
1219 issue an @code{ask-server} command to each of the select methods, and
1220 subscribe them (or not) using the normal methods.  This might be handy
1221 if you are monitoring a few servers for new groups.  A side effect is
1222 that startup will take much longer, so you can meditate while waiting.
1223 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1224
1225
1226 @node Subscription Methods
1227 @subsection Subscription Methods
1228
1229 @vindex gnus-subscribe-newsgroup-method
1230 What gnus does when it encounters a new group is determined by the
1231 @code{gnus-subscribe-newsgroup-method} variable.
1232
1233 This variable should contain a function.  This function will be called
1234 with the name of the new group as the only parameter.
1235
1236 Some handy pre-fab functions are:
1237
1238 @table @code
1239
1240 @item gnus-subscribe-zombies
1241 @vindex gnus-subscribe-zombies
1242 Make all new groups zombies.  This is the default.  You can browse the
1243 zombies later (with @kbd{A z}) and either kill them all off properly
1244 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1245
1246 @item gnus-subscribe-randomly
1247 @vindex gnus-subscribe-randomly
1248 Subscribe all new groups in arbitrary order.  This really means that all
1249 new groups will be added at ``the top'' of the group buffer.
1250
1251 @item gnus-subscribe-alphabetically
1252 @vindex gnus-subscribe-alphabetically
1253 Subscribe all new groups in alphabetical order.
1254
1255 @item gnus-subscribe-hierarchically
1256 @vindex gnus-subscribe-hierarchically
1257 Subscribe all new groups hierarchically.  The difference between this
1258 function and @code{gnus-subscribe-alphabetically} is slight.
1259 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1260 alphabetical fashion, while this function will enter groups into its
1261 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1262 @samp{comp} hierarchy, this function will not mess that configuration
1263 up.  Or something like that.
1264
1265 @item gnus-subscribe-interactively
1266 @vindex gnus-subscribe-interactively
1267 Subscribe new groups interactively.  This means that gnus will ask
1268 you about @strong{all} new groups.  The groups you choose to subscribe
1269 to will be subscribed hierarchically.
1270
1271 @item gnus-subscribe-killed
1272 @vindex gnus-subscribe-killed
1273 Kill all new groups.
1274
1275 @item gnus-subscribe-topics
1276 @vindex gnus-subscribe-topics
1277 Put the groups into the topic that has a matching @code{subscribe} topic
1278 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1279 topic parameter that looks like
1280
1281 @example
1282 "nnslashdot"
1283 @end example
1284
1285 will mean that all groups that match that regex will be subscribed under
1286 that topic.
1287
1288 If no topics match the groups, the groups will be subscribed in the
1289 top-level topic.
1290
1291 @end table
1292
1293 @vindex gnus-subscribe-hierarchical-interactive
1294 A closely related variable is
1295 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1296 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1297 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1298 will ask you for each sub-hierarchy whether you want to descend the
1299 hierarchy or not.
1300
1301 One common mistake is to set the variable a few paragraphs above
1302 (@code{gnus-subscribe-newsgroup-method}) to
1303 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1304 will not work.  This is ga-ga.  So don't do it.
1305
1306
1307 @node Filtering New Groups
1308 @subsection Filtering New Groups
1309
1310 A nice and portable way to control which new newsgroups should be
1311 subscribed (or ignored) is to put an @dfn{options} line at the start of
1312 the @file{.newsrc} file.  Here's an example:
1313
1314 @example
1315 options -n !alt.all !rec.all sci.all
1316 @end example
1317
1318 @vindex gnus-subscribe-options-newsgroup-method
1319 This line obviously belongs to a serious-minded intellectual scientific
1320 person (or she may just be plain old boring), because it says that all
1321 groups that have names beginning with @samp{alt} and @samp{rec} should
1322 be ignored, and all groups with names beginning with @samp{sci} should
1323 be subscribed.  Gnus will not use the normal subscription method for
1324 subscribing these groups.
1325 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1326 variable defaults to @code{gnus-subscribe-alphabetically}.
1327
1328 @vindex gnus-options-not-subscribe
1329 @vindex gnus-options-subscribe
1330 If you don't want to mess with your @file{.newsrc} file, you can just
1331 set the two variables @code{gnus-options-subscribe} and
1332 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1333 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1334 and if the new group matches the former, it will be unconditionally
1335 subscribed, and if it matches the latter, it will be ignored.
1336
1337 @vindex gnus-auto-subscribed-groups
1338 Yet another variable that meddles here is
1339 @code{gnus-auto-subscribed-groups}.  It works exactly like
1340 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1341 thought it would be nice to have two of these.  This variable is more
1342 meant for setting some ground rules, while the other variable is used
1343 more for user fiddling.  By default this variable makes all new groups
1344 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1345 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1346 subscribed.  If you don't like that, just set this variable to
1347 @code{nil}.
1348
1349 New groups that match this regexp are subscribed using
1350 @code{gnus-subscribe-options-newsgroup-method}.
1351
1352
1353 @node Changing Servers
1354 @section Changing Servers
1355 @cindex changing servers
1356
1357 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1358 This happens very rarely, but perhaps you change jobs, or one server is
1359 very flaky and you want to use another.
1360
1361 Changing the server is pretty easy, right?  You just change
1362 @code{gnus-select-method} to point to the new server?
1363
1364 @emph{Wrong!}
1365
1366 Article numbers are not (in any way) kept synchronized between different
1367 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1368 you have read is by keeping track of article numbers.  So when you
1369 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1370 worthless.
1371
1372 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1373 file from one server to another.  They all have one thing in
1374 common---they take a looong time to run.  You don't want to use these
1375 functions more than absolutely necessary.
1376
1377 @kindex M-x gnus-change-server
1378 @findex gnus-change-server
1379 If you have access to both servers, Gnus can request the headers for all
1380 the articles you have read and compare @code{Message-ID}s and map the
1381 article numbers of the read articles and article marks.  The @kbd{M-x
1382 gnus-change-server} command will do this for all your native groups.  It
1383 will prompt for the method you want to move to.
1384
1385 @kindex M-x gnus-group-move-group-to-server
1386 @findex gnus-group-move-group-to-server
1387 You can also move individual groups with the @kbd{M-x
1388 gnus-group-move-group-to-server} command.  This is useful if you want to
1389 move a (foreign) group from one server to another.
1390
1391 @kindex M-x gnus-group-clear-data-on-native-groups
1392 @findex gnus-group-clear-data-on-native-groups
1393 If you don't have access to both the old and new server, all your marks
1394 and read ranges have become worthless.  You can use the @kbd{M-x
1395 gnus-group-clear-data-on-native-groups} command to clear out all data
1396 that you have on your native groups.  Use with caution.
1397
1398 @kindex M-x gnus-group-clear-data
1399 @findex gnus-group-clear-data
1400 Clear the data from the current group only---nix out marks and the
1401 list of read articles (@code{gnus-group-clear-data}).
1402
1403 After changing servers, you @strong{must} move the cache hierarchy away,
1404 since the cached articles will have wrong article numbers, which will
1405 affect which articles Gnus thinks are read.
1406 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1407 to have it done automatically; for @code{gnus-group-clear-data}, you
1408 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1409 cache for all groups).
1410
1411
1412 @node Startup Files
1413 @section Startup Files
1414 @cindex startup files
1415 @cindex .newsrc
1416 @cindex .newsrc.el
1417 @cindex .newsrc.eld
1418
1419 Now, you all know about the @file{.newsrc} file.  All subscription
1420 information is traditionally stored in this file.
1421
1422 Things got a bit more complicated with @sc{gnus}.  In addition to
1423 keeping the @file{.newsrc} file updated, it also used a file called
1424 @file{.newsrc.el} for storing all the information that didn't fit into
1425 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1426 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1427 files was the most recently saved, which enabled people to swap between
1428 @sc{gnus} and other newsreaders.
1429
1430 That was kinda silly, so Gnus went one better: In addition to the
1431 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1432 @file{.newsrc.eld}.  It will read whichever of these files that are most
1433 recent, but it will never write a @file{.newsrc.el} file.  You should
1434 never delete the @file{.newsrc.eld} file---it contains much information
1435 not stored in the @file{.newsrc} file.
1436
1437 @vindex gnus-save-newsrc-file
1438 @vindex gnus-read-newsrc-file
1439 You can turn off writing the @file{.newsrc} file by setting
1440 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1441 the file and save some space, as well as exiting from gnus faster.
1442 However, this will make it impossible to use other newsreaders than
1443 gnus.  But hey, who would want to, right?  Similarly, setting
1444 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1445 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1446 convenient if you have a tendency to use Netscape once in a while.
1447
1448 @vindex gnus-save-killed-list
1449 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1450 will not save the list of killed groups to the startup file.  This will
1451 save both time (when starting and quitting) and space (on disk).  It
1452 will also mean that Gnus has no record of what groups are new or old,
1453 so the automatic new groups subscription methods become meaningless.
1454 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1455 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1456 Groups}).  This variable can also be a regular expression.  If that's
1457 the case, remove all groups that do not match this regexp before
1458 saving.  This can be useful in certain obscure situations that involve
1459 several servers where not all servers support @code{ask-server}.
1460
1461 @vindex gnus-startup-file
1462 @vindex gnus-backup-startup-file
1463 @vindex version-control
1464 The @code{gnus-startup-file} variable says where the startup files are.
1465 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1466 file being whatever that one is, with a @samp{.eld} appended.
1467 If you want version control for this file, set
1468 @code{gnus-backup-startup-file}.  It respects the same values as the
1469 @code{version-control} variable.
1470
1471 @vindex gnus-save-newsrc-hook
1472 @vindex gnus-save-quick-newsrc-hook
1473 @vindex gnus-save-standard-newsrc-hook
1474 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1475 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1476 saving the @file{.newsrc.eld} file, and
1477 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1478 @file{.newsrc} file.  The latter two are commonly used to turn version
1479 control on or off.  Version control is on by default when saving the
1480 startup files.  If you want to turn backup creation off, say something like:
1481
1482 @lisp
1483 (defun turn-off-backup ()
1484   (set (make-local-variable 'backup-inhibited) t))
1485
1486 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1487 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1488 @end lisp
1489
1490 @vindex gnus-init-file
1491 @vindex gnus-site-init-file
1492 When gnus starts, it will read the @code{gnus-site-init-file}
1493 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1494 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1495 and can be used to avoid cluttering your @file{~/.emacs} and
1496 @file{site-init} files with gnus stuff.  Gnus will also check for files
1497 with the same names as these, but with @file{.elc} and @file{.el}
1498 suffixes.  In other words, if you have set @code{gnus-init-file} to
1499 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1500 and finally @file{~/.gnus} (in this order).
1501
1502
1503
1504 @node Auto Save
1505 @section Auto Save
1506 @cindex dribble file
1507 @cindex auto-save
1508
1509 Whenever you do something that changes the gnus data (reading articles,
1510 catching up, killing/subscribing groups), the change is added to a
1511 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1512 Emacs way.  If your Emacs should crash before you have saved the
1513 @file{.newsrc} files, all changes you have made can be recovered from
1514 this file.
1515
1516 If gnus detects this file at startup, it will ask the user whether to
1517 read it.  The auto save file is deleted whenever the real startup file is
1518 saved.
1519
1520 @vindex gnus-use-dribble-file
1521 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1522 maintain a dribble buffer.  The default is @code{t}.
1523
1524 @vindex gnus-dribble-directory
1525 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1526 this variable is @code{nil}, which it is by default, gnus will dribble
1527 into the directory where the @file{.newsrc} file is located.  (This is
1528 normally the user's home directory.)  The dribble file will get the same
1529 file permissions as the @file{.newsrc} file.
1530
1531 @vindex gnus-always-read-dribble-file
1532 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1533 read the dribble file on startup without querying the user.
1534
1535
1536 @node The Active File
1537 @section The Active File
1538 @cindex active file
1539 @cindex ignored groups
1540
1541 When gnus starts, or indeed whenever it tries to determine whether new
1542 articles have arrived, it reads the active file.  This is a very large
1543 file that lists all the active groups and articles on the server.
1544
1545 @vindex gnus-ignored-newsgroups
1546 Before examining the active file, gnus deletes all lines that match the
1547 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1548 any groups with bogus names, but you can use this variable to make gnus
1549 ignore hierarchies you aren't ever interested in.  However, this is not
1550 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1551 Groups} for an overview of other variables that can be used instead.
1552
1553 @c This variable is
1554 @c @code{nil} by default, and will slow down active file handling somewhat
1555 @c if you set it to anything else.
1556
1557 @vindex gnus-read-active-file
1558 @c @head
1559 The active file can be rather Huge, so if you have a slow network, you
1560 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1561 reading the active file.  This variable is @code{some} by default.
1562
1563 Gnus will try to make do by getting information just on the groups that
1564 you actually subscribe to.
1565
1566 Note that if you subscribe to lots and lots of groups, setting this
1567 variable to @code{nil} will probably make gnus slower, not faster.  At
1568 present, having this variable @code{nil} will slow gnus down
1569 considerably, unless you read news over a 2400 baud modem.
1570
1571 This variable can also have the value @code{some}.  Gnus will then
1572 attempt to read active info only on the subscribed groups.  On some
1573 servers this is quite fast (on sparkling, brand new INN servers that
1574 support the @code{LIST ACTIVE group} command), on others this isn't fast
1575 at all.  In any case, @code{some} should be faster than @code{nil}, and
1576 is certainly faster than @code{t} over slow lines.
1577
1578 Some news servers (old versions of Leafnode and old versions of INN, for
1579 instance) do not support the @code{LIST ACTIVE group}.  For these
1580 servers, @code{nil} is probably the most efficient value for this
1581 variable.
1582
1583 If this variable is @code{nil}, gnus will ask for group info in total
1584 lock-step, which isn't very fast.  If it is @code{some} and you use an
1585 @acronym{NNTP} server, gnus will pump out commands as fast as it can, and
1586 read all the replies in one swoop.  This will normally result in better
1587 performance, but if the server does not support the aforementioned
1588 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1589
1590 If you think that starting up Gnus takes too long, try all the three
1591 different values for this variable and see what works best for you.
1592
1593 In any case, if you use @code{some} or @code{nil}, you should definitely
1594 kill all groups that you aren't interested in to speed things up.
1595
1596 Note that this variable also affects active file retrieval from
1597 secondary select methods.
1598
1599
1600 @node Startup Variables
1601 @section Startup Variables
1602
1603 @table @code
1604
1605 @item gnus-load-hook
1606 @vindex gnus-load-hook
1607 A hook run while gnus is being loaded.  Note that this hook will
1608 normally be run just once in each Emacs session, no matter how many
1609 times you start gnus.
1610
1611 @item gnus-before-startup-hook
1612 @vindex gnus-before-startup-hook
1613 A hook run after starting up gnus successfully.
1614
1615 @item gnus-startup-hook
1616 @vindex gnus-startup-hook
1617 A hook run as the very last thing after starting up gnus
1618
1619 @item gnus-started-hook
1620 @vindex gnus-started-hook
1621 A hook that is run as the very last thing after starting up gnus
1622 successfully.
1623
1624 @item gnus-setup-news-hook
1625 @vindex gnus-setup-news-hook
1626 A hook that is run after reading the @file{.newsrc} file(s), but before
1627 generating the group buffer.
1628
1629 @item gnus-check-bogus-newsgroups
1630 @vindex gnus-check-bogus-newsgroups
1631 If non-@code{nil}, gnus will check for and delete all bogus groups at
1632 startup.  A @dfn{bogus group} is a group that you have in your
1633 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1634 bogus groups can take quite a while, so to save time and resources it's
1635 best to leave this option off, and do the checking for bogus groups once
1636 in a while from the group buffer instead (@pxref{Group Maintenance}).
1637
1638 @item gnus-inhibit-startup-message
1639 @vindex gnus-inhibit-startup-message
1640 If non-@code{nil}, the startup message won't be displayed.  That way,
1641 your boss might not notice as easily that you are reading news instead
1642 of doing your job.  Note that this variable is used before
1643 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1644
1645 @item gnus-no-groups-message
1646 @vindex gnus-no-groups-message
1647 Message displayed by gnus when no groups are available.
1648
1649 @item gnus-play-startup-jingle
1650 @vindex gnus-play-startup-jingle
1651 If non-@code{nil}, play the gnus jingle at startup.
1652
1653 @item gnus-startup-jingle
1654 @vindex gnus-startup-jingle
1655 Jingle to be played if the above variable is non-@code{nil}.  The
1656 default is @samp{Tuxedomoon.Jingle4.au}.
1657
1658 @end table
1659
1660
1661 @node Group Buffer
1662 @chapter Group Buffer
1663 @cindex group buffer
1664
1665 @c Alex Schroeder suggests to rearrange this as follows:
1666 @c
1667 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1668 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1669 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1670 @c   7. Group Score, 8. Group Buffer Format
1671 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1672 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1673 @c <kensanata> First, "Gnus considers groups... (default 9)."
1674 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1675 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1676 @c <kensanata> Then expand the next paragraph or add some more to it.
1677 @c    This short one sentence explains levels 1 and 2, therefore I understand
1678 @c    that I should keep important news at 3 and boring news at 4.
1679 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1680 @c    Maybe keep those that you don't want to read temporarily at 6,
1681 @c    those that you never want to read at 8, those that offend your
1682 @c    human rights at 9...
1683
1684
1685 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1686 is the first buffer shown when gnus starts, and will never be killed as
1687 long as gnus is active.
1688
1689 @iftex
1690 @iflatex
1691 \gnusfigure{The Group Buffer}{320}{
1692 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1693 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1694 \put(120,38){\vector(1,2){10}}
1695 \put(40,60){\makebox(0,0)[r]{Mode line}}
1696 \put(40,58){\vector(1,0){30}}
1697 \put(200,28){\makebox(0,0)[t]{Native select method}}
1698 \put(200,26){\vector(-1,2){15}}
1699 }
1700 @end iflatex
1701 @end iftex
1702
1703 @menu
1704 * Group Buffer Format::         Information listed and how you can change it.
1705 * Group Maneuvering::           Commands for moving in the group buffer.
1706 * Selecting a Group::           Actually reading news.
1707 * Subscription Commands::       Unsubscribing, killing, subscribing.
1708 * Group Data::                  Changing the info for a group.
1709 * Group Levels::                Levels? What are those, then?
1710 * Group Score::                 A mechanism for finding out what groups you like.
1711 * Marking Groups::              You can mark groups for later processing.
1712 * Foreign Groups::              Creating and editing groups.
1713 * Group Parameters::            Each group may have different parameters set.
1714 * Listing Groups::              Gnus can list various subsets of the groups.
1715 * Sorting Groups::              Re-arrange the group order.
1716 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1717 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1718 * Exiting Gnus::                Stop reading news and get some work done.
1719 * Group Topics::                A folding group mode divided into topics.
1720 * Misc Group Stuff::            Other stuff that you can to do.
1721 @end menu
1722
1723
1724 @node Group Buffer Format
1725 @section Group Buffer Format
1726
1727 @menu
1728 * Group Line Specification::    Deciding how the group buffer is to look.
1729 * Group Mode Line Specification::  The group buffer mode line.
1730 * Group Highlighting::          Having nice colors in the group buffer.
1731 @end menu
1732
1733
1734 @node Group Line Specification
1735 @subsection Group Line Specification
1736 @cindex group buffer format
1737
1738 The default format of the group buffer is nice and dull, but you can
1739 make it as exciting and ugly as you feel like.
1740
1741 Here's a couple of example group lines:
1742
1743 @example
1744      25: news.announce.newusers
1745  *    0: alt.fan.andrea-dworkin
1746 @end example
1747
1748 Quite simple, huh?
1749
1750 You can see that there are 25 unread articles in
1751 @samp{news.announce.newusers}.  There are no unread articles, but some
1752 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1753 asterisk at the beginning of the line?).
1754
1755 @vindex gnus-group-line-format
1756 You can change that format to whatever you want by fiddling with the
1757 @code{gnus-group-line-format} variable.  This variable works along the
1758 lines of a @code{format} specification, which is pretty much the same as
1759 a @code{printf} specifications, for those of you who use (feh!) C.
1760 @xref{Formatting Variables}.
1761
1762 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1763
1764 There should always be a colon on the line; the cursor always moves to
1765 the colon after performing an operation.  @xref{Positioning
1766 Point}.  Nothing else is required---not even the group name.  All
1767 displayed text is just window dressing, and is never examined by Gnus.
1768 Gnus stores all real information it needs using text properties.
1769
1770 (Note that if you make a really strange, wonderful, spreadsheet-like
1771 layout, everybody will believe you are hard at work with the accounting
1772 instead of wasting time reading news.)
1773
1774 Here's a list of all available format characters:
1775
1776 @table @samp
1777
1778 @item M
1779 An asterisk if the group only has marked articles.
1780
1781 @item S
1782 Whether the group is subscribed.
1783
1784 @item L
1785 Level of subscribedness.
1786
1787 @item N
1788 Number of unread articles.
1789
1790 @item I
1791 Number of dormant articles.
1792
1793 @item T
1794 Number of ticked articles.
1795
1796 @item R
1797 Number of read articles.
1798
1799 @item U
1800 Number of unseen articles.
1801
1802 @item t
1803 Estimated total number of articles.  (This is really @var{max-number}
1804 minus @var{min-number} plus 1.)
1805
1806 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1807 efficient access to @var{max-number} and @var{min-number} but getting
1808 the true unread message count is not possible efficiently.  For
1809 hysterical raisins, even the mail back ends, where the true number of
1810 unread messages might be available efficiently, use the same limited
1811 interface.  To remove this restriction from Gnus means that the back
1812 end interface has to be changed, which is not an easy job.  If you
1813 want to work on this, please contact the Gnus mailing list.
1814
1815 @item y
1816 Number of unread, unticked, non-dormant articles.
1817
1818 @item i
1819 Number of ticked and dormant articles.
1820
1821 @item g
1822 Full group name.
1823
1824 @item G
1825 Group name.
1826
1827 @item C
1828 Group comment (@pxref{Group Parameters}) or group name if there is no
1829 comment element in the group parameters.
1830
1831 @item D
1832 Newsgroup description.  You need to read the group descriptions
1833 before these will appear, and to do that, you either have to set
1834 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1835 command.
1836
1837 @item o
1838 @samp{m} if moderated.
1839
1840 @item O
1841 @samp{(m)} if moderated.
1842
1843 @item s
1844 Select method.
1845
1846 @item B
1847 If the summary buffer for the group is open or not.
1848
1849 @item n
1850 Select from where.
1851
1852 @item z
1853 A string that looks like @samp{<%s:%n>} if a foreign select method is
1854 used.
1855
1856 @item P
1857 Indentation based on the level of the topic (@pxref{Group Topics}).
1858
1859 @item c
1860 @vindex gnus-group-uncollapsed-levels
1861 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1862 variable says how many levels to leave at the end of the group name.
1863 The default is 1---this will mean that group names like
1864 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1865
1866 @item m
1867 @vindex gnus-new-mail-mark
1868 @cindex %
1869 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1870 the group lately.
1871
1872 @item p
1873 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1874
1875 @item d
1876 A string that says when you last read the group (@pxref{Group
1877 Timestamp}).
1878
1879 @item u
1880 User defined specifier.  The next character in the format string should
1881 be a letter.  Gnus will call the function
1882 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1883 following @samp{%u}.  The function will be passed a single dummy
1884 parameter as argument.  The function should return a string, which will
1885 be inserted into the buffer just like information from any other
1886 specifier.
1887 @end table
1888
1889 @cindex *
1890 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1891 if no info is available---for instance, if it is a non-activated foreign
1892 group, or a bogus native group.
1893
1894
1895 @node Group Mode Line Specification
1896 @subsection Group Mode Line Specification
1897 @cindex group mode line
1898
1899 @vindex gnus-group-mode-line-format
1900 The mode line can be changed by setting
1901 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1902 doesn't understand that many format specifiers:
1903
1904 @table @samp
1905 @item S
1906 The native news server.
1907 @item M
1908 The native select method.
1909 @end table
1910
1911
1912 @node Group Highlighting
1913 @subsection Group Highlighting
1914 @cindex highlighting
1915 @cindex group highlighting
1916
1917 @vindex gnus-group-highlight
1918 Highlighting in the group buffer is controlled by the
1919 @code{gnus-group-highlight} variable.  This is an alist with elements
1920 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1921 something non-@code{nil}, the @var{face} will be used on the line.
1922
1923 Here's an example value for this variable that might look nice if the
1924 background is dark:
1925
1926 @lisp
1927 (cond (window-system
1928        (setq custom-background-mode 'light)
1929        (defface my-group-face-1
1930          '((t (:foreground "Red" :bold t))) "First group face")
1931        (defface my-group-face-2
1932          '((t (:foreground "DarkSeaGreen4" :bold t)))
1933          "Second group face")
1934        (defface my-group-face-3
1935          '((t (:foreground "Green4" :bold t))) "Third group face")
1936        (defface my-group-face-4
1937          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1938        (defface my-group-face-5
1939          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1940
1941 (setq gnus-group-highlight
1942       '(((> unread 200) . my-group-face-1)
1943         ((and (< level 3) (zerop unread)) . my-group-face-2)
1944         ((< level 3) . my-group-face-3)
1945         ((zerop unread) . my-group-face-4)
1946         (t . my-group-face-5)))
1947 @end lisp
1948
1949 Also @pxref{Faces and Fonts}.
1950
1951 Variables that are dynamically bound when the forms are evaluated
1952 include:
1953
1954 @table @code
1955 @item group
1956 The group name.
1957 @item unread
1958 The number of unread articles in the group.
1959 @item method
1960 The select method.
1961 @item mailp
1962 Whether the group is a mail group.
1963 @item level
1964 The level of the group.
1965 @item score
1966 The score of the group.
1967 @item ticked
1968 The number of ticked articles in the group.
1969 @item total
1970 The total number of articles in the group.  Or rather,
1971 @var{max-number} minus @var{min-number} plus one.
1972 @item topic
1973 When using the topic minor mode, this variable is bound to the current
1974 topic being inserted.
1975 @end table
1976
1977 When the forms are @code{eval}ed, point is at the beginning of the line
1978 of the group in question, so you can use many of the normal gnus
1979 functions for snarfing info on the group.
1980
1981 @vindex gnus-group-update-hook
1982 @findex gnus-group-highlight-line
1983 @code{gnus-group-update-hook} is called when a group line is changed.
1984 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1985 calls @code{gnus-group-highlight-line} by default.
1986
1987
1988 @node Group Maneuvering
1989 @section Group Maneuvering
1990 @cindex group movement
1991
1992 All movement commands understand the numeric prefix and will behave as
1993 expected, hopefully.
1994
1995 @table @kbd
1996
1997 @item n
1998 @kindex n (Group)
1999 @findex gnus-group-next-unread-group
2000 Go to the next group that has unread articles
2001 (@code{gnus-group-next-unread-group}).
2002
2003 @item p
2004 @itemx DEL
2005 @kindex DEL (Group)
2006 @kindex p (Group)
2007 @findex gnus-group-prev-unread-group
2008 Go to the previous group that has unread articles
2009 (@code{gnus-group-prev-unread-group}).
2010
2011 @item N
2012 @kindex N (Group)
2013 @findex gnus-group-next-group
2014 Go to the next group (@code{gnus-group-next-group}).
2015
2016 @item P
2017 @kindex P (Group)
2018 @findex gnus-group-prev-group
2019 Go to the previous group (@code{gnus-group-prev-group}).
2020
2021 @item M-n
2022 @kindex M-n (Group)
2023 @findex gnus-group-next-unread-group-same-level
2024 Go to the next unread group on the same (or lower) level
2025 (@code{gnus-group-next-unread-group-same-level}).
2026
2027 @item M-p
2028 @kindex M-p (Group)
2029 @findex gnus-group-prev-unread-group-same-level
2030 Go to the previous unread group on the same (or lower) level
2031 (@code{gnus-group-prev-unread-group-same-level}).
2032 @end table
2033
2034 Three commands for jumping to groups:
2035
2036 @table @kbd
2037
2038 @item j
2039 @kindex j (Group)
2040 @findex gnus-group-jump-to-group
2041 Jump to a group (and make it visible if it isn't already)
2042 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2043 like living groups.
2044
2045 @item ,
2046 @kindex , (Group)
2047 @findex gnus-group-best-unread-group
2048 Jump to the unread group with the lowest level
2049 (@code{gnus-group-best-unread-group}).
2050
2051 @item .
2052 @kindex . (Group)
2053 @findex gnus-group-first-unread-group
2054 Jump to the first group with unread articles
2055 (@code{gnus-group-first-unread-group}).
2056 @end table
2057
2058 @vindex gnus-group-goto-unread
2059 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2060 commands will move to the next group, not the next unread group.  Even
2061 the commands that say they move to the next unread group.  The default
2062 is @code{t}.
2063
2064
2065 @node Selecting a Group
2066 @section Selecting a Group
2067 @cindex group selection
2068
2069 @table @kbd
2070
2071 @item SPACE
2072 @kindex SPACE (Group)
2073 @findex gnus-group-read-group
2074 Select the current group, switch to the summary buffer and display the
2075 first unread article (@code{gnus-group-read-group}).  If there are no
2076 unread articles in the group, or if you give a non-numerical prefix to
2077 this command, gnus will offer to fetch all the old articles in this
2078 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2079 determines the number of articles Gnus will fetch.  If @var{n} is
2080 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2081 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2082
2083 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2084 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2085 - 4 2 SPC} fetches the 42 oldest ones.
2086
2087 When you are in the group (in the Summary buffer), you can type
2088 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2089 ones.
2090
2091 @item RET
2092 @kindex RET (Group)
2093 @findex gnus-group-select-group
2094 Select the current group and switch to the summary buffer
2095 (@code{gnus-group-select-group}).  Takes the same arguments as
2096 @code{gnus-group-read-group}---the only difference is that this command
2097 does not display the first unread article automatically upon group
2098 entry.
2099
2100 @item M-RET
2101 @kindex M-RET (Group)
2102 @findex gnus-group-quick-select-group
2103 This does the same as the command above, but tries to do it with the
2104 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2105 scoring/killing will be performed, there will be no highlights and no
2106 expunging.  This might be useful if you're in a real hurry and have to
2107 enter some humongous group.  If you give a 0 prefix to this command
2108 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2109 which is useful if you want to toggle threading before generating the
2110 summary buffer (@pxref{Summary Generation Commands}).
2111
2112 @item M-SPACE
2113 @kindex M-SPACE (Group)
2114 @findex gnus-group-visible-select-group
2115 This is yet one more command that does the same as the @kbd{RET}
2116 command, but this one does it without expunging and hiding dormants
2117 (@code{gnus-group-visible-select-group}).
2118
2119 @item C-M-RET
2120 @kindex C-M-RET (Group)
2121 @findex gnus-group-select-group-ephemerally
2122 Finally, this command selects the current group ephemerally without
2123 doing any processing of its contents
2124 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2125 turned off.  Everything you do in the group after selecting it in this
2126 manner will have no permanent effects.
2127
2128 @end table
2129
2130 @vindex gnus-large-newsgroup
2131 The @code{gnus-large-newsgroup} variable says what Gnus should
2132 consider to be a big group.  If it is @code{nil}, no groups are
2133 considered big.  The default value is 200.  If the group has more
2134 (unread and/or ticked) articles than this, gnus will query the user
2135 before entering the group.  The user can then specify how many
2136 articles should be fetched from the server.  If the user specifies a
2137 negative number (@var{-n}), the @var{n} oldest articles will be
2138 fetched.  If it is positive, the @var{n} articles that have arrived
2139 most recently will be fetched.
2140
2141 @vindex gnus-large-ephemeral-newsgroup
2142 @code{gnus-large-ephemeral-newsgroup} is the same as
2143 @code{gnus-large-newsgroup}, but is only used for ephemeral
2144 newsgroups.
2145
2146 @vindex gnus-select-group-hook
2147 @vindex gnus-auto-select-first
2148 @vindex gnus-auto-select-subject
2149 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2150 automatically when entering a group with the @kbd{SPACE} command.
2151 Which article this is is controlled by the
2152 @code{gnus-auto-select-subject} variable.  Valid values for this
2153 variable is:
2154
2155 @table @code
2156
2157 @item unread
2158 Place point on the subject line of the first unread article.
2159
2160 @item first
2161 Place point on the subject line of the first article.
2162
2163 @item unseen
2164 Place point on the subject line of the first unseen article.
2165
2166 @item unseen-or-unread
2167 Place point on the subject line of the first unseen article, and if
2168 there is no such article, place point on the subject line of the first
2169 unread article.
2170
2171 @item best
2172 Place point on the subject line of the highest-scored unread article.
2173
2174 @end table
2175
2176 This variable can also be a function.  In that case, that function
2177 will be called to place point on a subject line.
2178
2179 If you want to prevent automatic selection in some group (say, in a
2180 binary group with Huge articles) you can set the
2181 @code{gnus-auto-select-first} variable to @code{nil} in
2182 @code{gnus-select-group-hook}, which is called when a group is
2183 selected.
2184
2185
2186 @node Subscription Commands
2187 @section Subscription Commands
2188 @cindex subscription
2189
2190 @table @kbd
2191
2192 @item S t
2193 @itemx u
2194 @kindex S t (Group)
2195 @kindex u (Group)
2196 @findex gnus-group-unsubscribe-current-group
2197 @c @icon{gnus-group-unsubscribe}
2198 Toggle subscription to the current group
2199 (@code{gnus-group-unsubscribe-current-group}).
2200
2201 @item S s
2202 @itemx U
2203 @kindex S s (Group)
2204 @kindex U (Group)
2205 @findex gnus-group-unsubscribe-group
2206 Prompt for a group to subscribe, and then subscribe it.  If it was
2207 subscribed already, unsubscribe it instead
2208 (@code{gnus-group-unsubscribe-group}).
2209
2210 @item S k
2211 @itemx C-k
2212 @kindex S k (Group)
2213 @kindex C-k (Group)
2214 @findex gnus-group-kill-group
2215 @c @icon{gnus-group-kill-group}
2216 Kill the current group (@code{gnus-group-kill-group}).
2217
2218 @item S y
2219 @itemx C-y
2220 @kindex S y (Group)
2221 @kindex C-y (Group)
2222 @findex gnus-group-yank-group
2223 Yank the last killed group (@code{gnus-group-yank-group}).
2224
2225 @item C-x C-t
2226 @kindex C-x C-t (Group)
2227 @findex gnus-group-transpose-groups
2228 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2229 really a subscription command, but you can use it instead of a
2230 kill-and-yank sequence sometimes.
2231
2232 @item S w
2233 @itemx C-w
2234 @kindex S w (Group)
2235 @kindex C-w (Group)
2236 @findex gnus-group-kill-region
2237 Kill all groups in the region (@code{gnus-group-kill-region}).
2238
2239 @item S z
2240 @kindex S z (Group)
2241 @findex gnus-group-kill-all-zombies
2242 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2243
2244 @item S C-k
2245 @kindex S C-k (Group)
2246 @findex gnus-group-kill-level
2247 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2248 These groups can't be yanked back after killing, so this command should
2249 be used with some caution.  The only time where this command comes in
2250 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2251 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2252 kill off all unsubscribed groups that do not have message numbers in the
2253 @file{.newsrc} file.
2254
2255 @end table
2256
2257 Also @pxref{Group Levels}.
2258
2259
2260 @node Group Data
2261 @section Group Data
2262
2263 @table @kbd
2264
2265 @item c
2266 @kindex c (Group)
2267 @findex gnus-group-catchup-current
2268 @vindex gnus-group-catchup-group-hook
2269 @c @icon{gnus-group-catchup-current}
2270 Mark all unticked articles in this group as read
2271 (@code{gnus-group-catchup-current}).
2272 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2273 the group buffer.
2274
2275 @item C
2276 @kindex C (Group)
2277 @findex gnus-group-catchup-current-all
2278 Mark all articles in this group, even the ticked ones, as read
2279 (@code{gnus-group-catchup-current-all}).
2280
2281 @item M-c
2282 @kindex M-c (Group)
2283 @findex gnus-group-clear-data
2284 Clear the data from the current group---nix out marks and the list of
2285 read articles (@code{gnus-group-clear-data}).
2286
2287 @item M-x gnus-group-clear-data-on-native-groups
2288 @kindex M-x gnus-group-clear-data-on-native-groups
2289 @findex gnus-group-clear-data-on-native-groups
2290 If you have switched from one @acronym{NNTP} server to another, all your marks
2291 and read ranges have become worthless.  You can use this command to
2292 clear out all data that you have on your native groups.  Use with
2293 caution.
2294
2295 @end table
2296
2297
2298 @node Group Levels
2299 @section Group Levels
2300 @cindex group level
2301 @cindex level
2302
2303 All groups have a level of @dfn{subscribedness}.  For instance, if a
2304 group is on level 2, it is more subscribed than a group on level 5.  You
2305 can ask gnus to just list groups on a given level or lower
2306 (@pxref{Listing Groups}), or to just check for new articles in groups on
2307 a given level or lower (@pxref{Scanning New Messages}).
2308
2309 Remember:  The higher the level of the group, the less important it is.
2310
2311 @table @kbd
2312
2313 @item S l
2314 @kindex S l (Group)
2315 @findex gnus-group-set-current-level
2316 Set the level of the current group.  If a numeric prefix is given, the
2317 next @var{n} groups will have their levels set.  The user will be
2318 prompted for a level.
2319 @end table
2320
2321 @vindex gnus-level-killed
2322 @vindex gnus-level-zombie
2323 @vindex gnus-level-unsubscribed
2324 @vindex gnus-level-subscribed
2325 Gnus considers groups from levels 1 to
2326 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2327 @code{gnus-level-subscribed} (exclusive) and
2328 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2329 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2330 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2331 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2332 same, but zombie and killed groups have no information on what articles
2333 you have read, etc, stored.  This distinction between dead and living
2334 groups isn't done because it is nice or clever, it is done purely for
2335 reasons of efficiency.
2336
2337 It is recommended that you keep all your mail groups (if any) on quite
2338 low levels (e.g. 1 or 2).
2339
2340 Maybe the following description of the default behavior of Gnus helps to
2341 understand what these levels are all about.  By default, Gnus shows you
2342 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2343 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2344 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2345 groups are hidden, in a way.
2346
2347 Zombie and killed groups are similar to unsubscribed groups in that they
2348 are hidden by default.  But they are different from subscribed and
2349 unsubscribed groups in that Gnus doesn't ask the news server for
2350 information (number of messages, number of unread messages) on zombie
2351 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2352 aren't interested in.  If most groups are killed, Gnus is faster.
2353
2354 Why does Gnus distinguish between zombie and killed groups?  Well, when
2355 a new group arrives on the server, Gnus by default makes it a zombie
2356 group.  This means that you are normally not bothered with new groups,
2357 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2358 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2359 list of killed groups.)
2360
2361 If you want to play with the level variables, you should show some care.
2362 Set them once, and don't touch them ever again.  Better yet, don't touch
2363 them at all unless you know exactly what you're doing.
2364
2365 @vindex gnus-level-default-unsubscribed
2366 @vindex gnus-level-default-subscribed
2367 Two closely related variables are @code{gnus-level-default-subscribed}
2368 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2369 which are the levels that new groups will be put on if they are
2370 (un)subscribed.  These two variables should, of course, be inside the
2371 relevant valid ranges.
2372
2373 @vindex gnus-keep-same-level
2374 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2375 will only move to groups of the same level (or lower).  In
2376 particular, going from the last article in one group to the next group
2377 will go to the next group of the same level (or lower).  This might be
2378 handy if you want to read the most important groups before you read the
2379 rest.
2380
2381 If this variable is @code{best}, Gnus will make the next newsgroup the
2382 one with the best level.
2383
2384 @vindex gnus-group-default-list-level
2385 All groups with a level less than or equal to
2386 @code{gnus-group-default-list-level} will be listed in the group buffer
2387 by default.
2388
2389 @vindex gnus-group-list-inactive-groups
2390 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2391 groups will be listed along with the unread groups.  This variable is
2392 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2393 listed.
2394
2395 @vindex gnus-group-use-permanent-levels
2396 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2397 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2398 use this level as the ``work'' level.
2399
2400 @vindex gnus-activate-level
2401 Gnus will normally just activate (i. e., query the server about) groups
2402 on level @code{gnus-activate-level} or less.  If you don't want to
2403 activate unsubscribed groups, for instance, you might set this variable
2404 to 5.  The default is 6.
2405
2406
2407 @node Group Score
2408 @section Group Score
2409 @cindex group score
2410 @cindex group rank
2411 @cindex rank
2412
2413 You would normally keep important groups on high levels, but that scheme
2414 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2415 group buffer according to how often you read groups, perhaps?  Within
2416 reason?
2417
2418 This is what @dfn{group score} is for.  You can have Gnus assign a score
2419 to each group through the mechanism described below.  You can then sort
2420 the group buffer based on this score.  Alternatively, you can sort on
2421 score and then level.  (Taken together, the level and the score is
2422 called the @dfn{rank} of the group.  A group that is on level 4 and has
2423 a score of 1 has a higher rank than a group on level 5 that has a score
2424 of 300.  (The level is the most significant part and the score is the
2425 least significant part.))
2426
2427 @findex gnus-summary-bubble-group
2428 If you want groups you read often to get higher scores than groups you
2429 read seldom you can add the @code{gnus-summary-bubble-group} function to
2430 the @code{gnus-summary-exit-hook} hook.  This will result (after
2431 sorting) in a bubbling sort of action.  If you want to see that in
2432 action after each summary exit, you can add
2433 @code{gnus-group-sort-groups-by-rank} or
2434 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2435 slow things down somewhat.
2436
2437
2438 @node Marking Groups
2439 @section Marking Groups
2440 @cindex marking groups
2441
2442 If you want to perform some command on several groups, and they appear
2443 subsequently in the group buffer, you would normally just give a
2444 numerical prefix to the command.  Most group commands will then do your
2445 bidding on those groups.
2446
2447 However, if the groups are not in sequential order, you can still
2448 perform a command on several groups.  You simply mark the groups first
2449 with the process mark and then execute the command.
2450
2451 @table @kbd
2452
2453 @item #
2454 @kindex # (Group)
2455 @itemx M m
2456 @kindex M m (Group)
2457 @findex gnus-group-mark-group
2458 Set the mark on the current group (@code{gnus-group-mark-group}).
2459
2460 @item M-#
2461 @kindex M-# (Group)
2462 @itemx M u
2463 @kindex M u (Group)
2464 @findex gnus-group-unmark-group
2465 Remove the mark from the current group
2466 (@code{gnus-group-unmark-group}).
2467
2468 @item M U
2469 @kindex M U (Group)
2470 @findex gnus-group-unmark-all-groups
2471 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2472
2473 @item M w
2474 @kindex M w (Group)
2475 @findex gnus-group-mark-region
2476 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2477
2478 @item M b
2479 @kindex M b (Group)
2480 @findex gnus-group-mark-buffer
2481 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2482
2483 @item M r
2484 @kindex M r (Group)
2485 @findex gnus-group-mark-regexp
2486 Mark all groups that match some regular expression
2487 (@code{gnus-group-mark-regexp}).
2488 @end table
2489
2490 Also @pxref{Process/Prefix}.
2491
2492 @findex gnus-group-universal-argument
2493 If you want to execute some command on all groups that have been marked
2494 with the process mark, you can use the @kbd{M-&}
2495 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2496 the command to be executed.
2497
2498
2499 @node Foreign Groups
2500 @section Foreign Groups
2501 @cindex foreign groups
2502
2503 Below are some group mode commands for making and editing general foreign
2504 groups, as well as commands to ease the creation of a few
2505 special-purpose groups.  All these commands insert the newly created
2506 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2507 consulted.
2508
2509 @table @kbd
2510
2511 @item G m
2512 @kindex G m (Group)
2513 @findex gnus-group-make-group
2514 @cindex making groups
2515 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2516 for a name, a method and possibly an @dfn{address}.  For an easier way
2517 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2518
2519 @item G r
2520 @kindex G r (Group)
2521 @findex gnus-group-rename-group
2522 @cindex renaming groups
2523 Rename the current group to something else
2524 (@code{gnus-group-rename-group}).  This is valid only on some
2525 groups---mail groups mostly.  This command might very well be quite slow
2526 on some back ends.
2527
2528 @item G c
2529 @kindex G c (Group)
2530 @cindex customizing
2531 @findex gnus-group-customize
2532 Customize the group parameters (@code{gnus-group-customize}).
2533
2534 @item G e
2535 @kindex G e (Group)
2536 @findex gnus-group-edit-group-method
2537 @cindex renaming groups
2538 Enter a buffer where you can edit the select method of the current
2539 group (@code{gnus-group-edit-group-method}).
2540
2541 @item G p
2542 @kindex G p (Group)
2543 @findex gnus-group-edit-group-parameters
2544 Enter a buffer where you can edit the group parameters
2545 (@code{gnus-group-edit-group-parameters}).
2546
2547 @item G E
2548 @kindex G E (Group)
2549 @findex gnus-group-edit-group
2550 Enter a buffer where you can edit the group info
2551 (@code{gnus-group-edit-group}).
2552
2553 @item G d
2554 @kindex G d (Group)
2555 @findex gnus-group-make-directory-group
2556 @cindex nndir
2557 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2558 for a directory name (@code{gnus-group-make-directory-group}).
2559
2560 @item G h
2561 @kindex G h (Group)
2562 @cindex help group
2563 @findex gnus-group-make-help-group
2564 Make the gnus help group (@code{gnus-group-make-help-group}).
2565
2566 @item G a
2567 @kindex G a (Group)
2568 @cindex (ding) archive
2569 @cindex archive group
2570 @findex gnus-group-make-archive-group
2571 @vindex gnus-group-archive-directory
2572 @vindex gnus-group-recent-archive-directory
2573 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2574 default a group pointing to the most recent articles will be created
2575 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2576 group will be created from @code{gnus-group-archive-directory}.
2577
2578 @item G k
2579 @kindex G k (Group)
2580 @findex gnus-group-make-kiboze-group
2581 @cindex nnkiboze
2582 Make a kiboze group.  You will be prompted for a name, for a regexp to
2583 match groups to be ``included'' in the kiboze group, and a series of
2584 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2585 @xref{Kibozed Groups}.
2586
2587 @item G D
2588 @kindex G D (Group)
2589 @findex gnus-group-enter-directory
2590 @cindex nneething
2591 Read an arbitrary directory as if it were a newsgroup with the
2592 @code{nneething} back end (@code{gnus-group-enter-directory}).
2593 @xref{Anything Groups}.
2594
2595 @item G f
2596 @kindex G f (Group)
2597 @findex gnus-group-make-doc-group
2598 @cindex ClariNet Briefs
2599 @cindex nndoc
2600 Make a group based on some file or other
2601 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2602 command, you will be prompted for a file name and a file type.
2603 Currently supported types are @code{mbox}, @code{babyl},
2604 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2605 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2606 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2607 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2608 you run this command without a prefix, Gnus will guess at the file
2609 type.  @xref{Document Groups}.
2610
2611 @item G u
2612 @kindex G u (Group)
2613 @vindex gnus-useful-groups
2614 @findex gnus-group-make-useful-group
2615 Create one of the groups mentioned in @code{gnus-useful-groups}
2616 (@code{gnus-group-make-useful-group}).
2617
2618 @item G w
2619 @kindex G w (Group)
2620 @findex gnus-group-make-web-group
2621 @cindex Google
2622 @cindex nnweb
2623 @cindex gmane
2624 Make an ephemeral group based on a web search
2625 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2626 command, make a solid group instead.  You will be prompted for the
2627 search engine type and the search string.  Valid search engine types
2628 include @code{google}, @code{dejanews}, and @code{gmane}.
2629 @xref{Web Searches}.
2630
2631 If you use the @code{google} search engine, you can limit the search
2632 to a particular group by using a match string like
2633 @samp{shaving group:alt.sysadmin.recovery}.
2634
2635 @item G DEL
2636 @kindex G DEL (Group)
2637 @findex gnus-group-delete-group
2638 This function will delete the current group
2639 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2640 actually delete all the articles in the group, and forcibly remove the
2641 group itself from the face of the Earth.  Use a prefix only if you are
2642 absolutely sure of what you are doing.  This command can't be used on
2643 read-only groups (like @code{nntp} group), though.
2644
2645 @item G V
2646 @kindex G V (Group)
2647 @findex gnus-group-make-empty-virtual
2648 Make a new, fresh, empty @code{nnvirtual} group
2649 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2650
2651 @item G v
2652 @kindex G v (Group)
2653 @findex gnus-group-add-to-virtual
2654 Add the current group to an @code{nnvirtual} group
2655 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2656 @end table
2657
2658 @xref{Select Methods}, for more information on the various select
2659 methods.
2660
2661 @vindex gnus-activate-foreign-newsgroups
2662 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2663 gnus will check all foreign groups with this level or lower at startup.
2664 This might take quite a while, especially if you subscribe to lots of
2665 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2666 @code{gnus-activate-level} also affects activation of foreign
2667 newsgroups.
2668
2669
2670 @node Group Parameters
2671 @section Group Parameters
2672 @cindex group parameters
2673
2674 The group parameters store information local to a particular group.
2675 Here's an example group parameter list:
2676
2677 @example
2678 ((to-address . "ding@@gnus.org")
2679  (auto-expire . t))
2680 @end example
2681
2682 We see that each element consists of a ``dotted pair''---the thing before
2683 the dot is the key, while the thing after the dot is the value.  All the
2684 parameters have this form @emph{except} local variable specs, which are
2685 not dotted pairs, but proper lists.
2686
2687 Some parameters have correspondent customizable variables, each of which
2688 is an alist of regexps and values.
2689
2690 The following group parameters can be used:
2691
2692 @table @code
2693 @item to-address
2694 @cindex to-address
2695 Address used by when doing followups and new posts.
2696
2697 @example
2698 (to-address . "some@@where.com")
2699 @end example
2700
2701 This is primarily useful in mail groups that represent closed mailing
2702 lists---mailing lists where it's expected that everybody that writes to
2703 the mailing list is subscribed to it.  Since using this parameter
2704 ensures that the mail only goes to the mailing list itself, it means
2705 that members won't receive two copies of your followups.
2706
2707 Using @code{to-address} will actually work whether the group is foreign
2708 or not.  Let's say there's a group on the server that is called
2709 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2710 the articles from a mail-to-news gateway.  Posting directly to this
2711 group is therefore impossible---you have to send mail to the mailing
2712 list address instead.
2713
2714 See also @code{gnus-parameter-to-address-alist}.
2715
2716 @item to-list
2717 @cindex to-list
2718 Address used when doing @kbd{a} in that group.
2719
2720 @example
2721 (to-list . "some@@where.com")
2722 @end example
2723
2724 It is totally ignored
2725 when doing a followup---except that if it is present in a news group,
2726 you'll get mail group semantics when doing @kbd{f}.
2727
2728 If you do an @kbd{a} command in a mail group and you have neither a
2729 @code{to-list} group parameter nor a @code{to-address} group parameter,
2730 then a @code{to-list} group parameter will be added automatically upon
2731 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2732 @vindex gnus-add-to-list
2733
2734 If you do an @kbd{a} command in a mail group and you don't have a
2735 @code{to-list} group parameter, one will be added automatically upon
2736 sending the message.
2737
2738 @findex gnus-mailing-list-mode
2739 @cindex mail list groups
2740 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2741 entering summary buffer.
2742
2743 See also @code{gnus-parameter-to-list-alist}.
2744
2745 @anchor{subscribed}
2746 @item subscribed
2747 @cindex subscribed
2748 If this parameter is set to @code{t}, Gnus will consider the
2749 to-address and to-list parameters for this group as addresses of
2750 mailing lists you are subscribed to.  Giving Gnus this information is
2751 (only) a first step in getting it to generate correct Mail-Followup-To
2752 headers for your posts to these lists.  @xref{Mailing Lists, ,Mailing
2753 Lists, message, The Message Manual}, for a complete treatment of
2754 available MFT support.
2755
2756 See also @code{gnus-find-subscribed-addresses}, the function that
2757 directly uses this group parameter.
2758
2759 @item visible
2760 @cindex visible
2761 If the group parameter list has the element @code{(visible . t)},
2762 that group will always be visible in the Group buffer, regardless
2763 of whether it has any unread articles.
2764
2765 @item broken-reply-to
2766 @cindex broken-reply-to
2767 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2768 headers in this group are to be ignored, and for the header to be hidden
2769 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2770 can be useful if you're reading a mailing list group where the listserv
2771 has inserted @code{Reply-To} headers that point back to the listserv
2772 itself.  That is broken behavior.  So there!
2773
2774 @item to-group
2775 @cindex to-group
2776 Elements like @code{(to-group . "some.group.name")} means that all
2777 posts in that group will be sent to @code{some.group.name}.
2778
2779 @item newsgroup
2780 @cindex newsgroup
2781 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2782 will treat all responses as if they were responses to news articles.
2783 This can be useful if you have a mail group that's really a mirror of a
2784 news group.
2785
2786 @item gcc-self
2787 @cindex gcc-self
2788 If @code{(gcc-self . t)} is present in the group parameter list, newly
2789 composed messages will be @code{Gcc}'d to the current group.  If
2790 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2791 generated, if @code{(gcc-self . "string")} is present, this string will
2792 be inserted literally as a @code{gcc} header.  This parameter takes
2793 precedence over any default @code{Gcc} rules as described later
2794 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2795 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2796 a @code{nntp} server doesn't accept articles.
2797
2798 @item auto-expire
2799 @cindex auto-expire
2800 If the group parameter has an element that looks like @code{(auto-expire
2801 . t)}, all articles read will be marked as expirable.  For an
2802 alternative approach, @pxref{Expiring Mail}.
2803
2804 See also @code{gnus-auto-expirable-newsgroups}.
2805
2806 @item total-expire
2807 @cindex total-expire
2808 If the group parameter has an element that looks like
2809 @code{(total-expire . t)}, all read articles will be put through the
2810 expiry process, even if they are not marked as expirable.  Use with
2811 caution.  Unread, ticked and dormant articles are not eligible for
2812 expiry.
2813
2814 See also @code{gnus-total-expirable-newsgroups}.
2815
2816 @item expiry-wait
2817 @cindex expiry-wait
2818 @vindex nnmail-expiry-wait-function
2819 If the group parameter has an element that looks like
2820 @code{(expiry-wait . 10)}, this value will override any
2821 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2822 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2823 can either be a number of days (not necessarily an integer) or the
2824 symbols @code{never} or @code{immediate}.
2825
2826 @item score-file
2827 @cindex score file group parameter
2828 Elements that look like @code{(score-file . "file")} will make
2829 @file{file} into the current score file for the group in question.  All
2830 interactive score entries will be put into this file.
2831
2832 @item adapt-file
2833 @cindex adapt file group parameter
2834 Elements that look like @code{(adapt-file . "file")} will make
2835 @file{file} into the current adaptive file for the group in question.
2836 All adaptive score entries will be put into this file.
2837
2838 @item admin-address
2839 @cindex admin-address
2840 When unsubscribing from a mailing list you should never send the
2841 unsubscription notice to the mailing list itself.  Instead, you'd send
2842 messages to the administrative address.  This parameter allows you to
2843 put the admin address somewhere convenient.
2844
2845 @item display
2846 @cindex display
2847 Elements that look like @code{(display . MODE)} say which articles to
2848 display on entering the group.  Valid values are:
2849
2850 @table @code
2851 @item all
2852 Display all articles, both read and unread.
2853
2854 @item an integer
2855 Display the last @var{integer} articles in the group.  This is the same as
2856 entering the group with @kbd{C-u @var{integer}}.
2857
2858 @item default
2859 Display the default visible articles, which normally includes unread and
2860 ticked articles.
2861
2862 @item an array
2863 Display articles that satisfy a predicate.
2864
2865 Here are some examples:
2866
2867 @table @code
2868 @item [unread]
2869 Display only unread articles.
2870
2871 @item [not expire]
2872 Display everything except expirable articles.
2873
2874 @item [and (not reply) (not expire)]
2875 Display everything except expirable and articles you've already
2876 responded to.
2877 @end table
2878
2879 The available operators are @code{not}, @code{and} and @code{or}.
2880 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2881 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2882 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2883 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2884
2885 @end table
2886
2887 The @code{display} parameter works by limiting the summary buffer to
2888 the subset specified.  You can pop the limit by using the @kbd{/ w}
2889 command (@pxref{Limiting}).
2890
2891 @item comment
2892 @cindex comment
2893 Elements that look like @code{(comment . "This is a comment")} are
2894 arbitrary comments on the group.  You can display comments in the
2895 group line (@pxref{Group Line Specification}).
2896
2897 @item charset
2898 @cindex charset
2899 Elements that look like @code{(charset . iso-8859-1)} will make
2900 @code{iso-8859-1} the default charset; that is, the charset that will be
2901 used for all articles that do not specify a charset.
2902
2903 See also @code{gnus-group-charset-alist}.
2904
2905 @item ignored-charsets
2906 @cindex ignored-charset
2907 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2908 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2909 default charset will be used for decoding articles.
2910
2911 See also @code{gnus-group-ignored-charsets-alist}.
2912
2913 @item posting-style
2914 @cindex posting-style
2915 You can store additional posting style information for this group
2916 here (@pxref{Posting Styles}).  The format is that of an entry in the
2917 @code{gnus-posting-styles} alist, except that there's no regexp matching
2918 the group name (of course).  Style elements in this group parameter will
2919 take precedence over the ones found in @code{gnus-posting-styles}.
2920
2921 For instance, if you want a funky name and signature in this group only,
2922 instead of hacking @code{gnus-posting-styles}, you could put something
2923 like this in the group parameters:
2924
2925 @example
2926 (posting-style
2927   (name "Funky Name")
2928   ("X-My-Header" "Funky Value")
2929   (signature "Funky Signature"))
2930 @end example
2931
2932 @item post-method
2933 @cindex post-method
2934 If it is set, the value is used as the method for posting message
2935 instead of @code{gnus-post-method}.
2936
2937 @item banner
2938 @cindex banner
2939 An item like @code{(banner . @var{regexp})} causes any part of an article
2940 that matches the regular expression @var{regexp} to be stripped.  Instead of
2941 @var{regexp}, you can also use the symbol @code{signature} which strips the
2942 last signature or any of the elements of the alist
2943 @code{gnus-article-banner-alist}.
2944
2945 @item sieve
2946 @cindex sieve
2947 This parameter contains a Sieve test that should match incoming mail
2948 that should be placed in this group.  From this group parameter, a
2949 Sieve @samp{IF} control structure is generated, having the test as the
2950 condition and @samp{fileinto "group.name";} as the body.
2951
2952 For example, if the INBOX.list.sieve group has the @code{(sieve
2953 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2954 translating the group parameter into a Sieve script (@pxref{Sieve
2955 Commands}) the following Sieve code is generated:
2956
2957 @example
2958 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2959         fileinto \"INBOX.list.sieve\";
2960 @}
2961 @end example
2962
2963 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2964 Emacs Sieve}.
2965
2966 @item (@var{variable} @var{form})
2967 You can use the group parameters to set variables local to the group you
2968 are entering.  If you want to turn threading off in @samp{news.answers},
2969 you could put @code{(gnus-show-threads nil)} in the group parameters of
2970 that group.  @code{gnus-show-threads} will be made into a local variable
2971 in the summary buffer you enter, and the form @code{nil} will be
2972 @code{eval}ed there.
2973
2974 Note that this feature sets the variable locally to the summary buffer.
2975 But some variables are evaluated in the article buffer, or in the
2976 message buffer (of a reply or followup or otherwise newly created
2977 message).  As a workaround, it might help to add the variable in
2978 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2979 Stuff}.  So if you want to set @code{message-from-style} via the group
2980 parameters, then you may need the following statement elsewhere in your
2981 @file{~/.gnus} file:
2982 @lisp
2983 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2984 @end lisp
2985
2986 @vindex gnus-list-identifiers
2987 A use for this feature is to remove a mailing list identifier tag in
2988 the subject fields of articles.  E.g. if the news group
2989 @example
2990 nntp+news.gnus.org:gmane.text.docbook.apps
2991 @end example
2992 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
2993 tag can be removed from the article subjects in the summary buffer for
2994 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
2995 into the group parameters for the group.
2996
2997 This can also be used as a group-specific hook function, if you'd like.
2998 If you want to hear a beep when you enter a group, you could put
2999 something like @code{(dummy-variable (ding))} in the parameters of that
3000 group.  @code{dummy-variable} will be set to the result of the
3001 @code{(ding)} form, but who cares?
3002
3003 @end table
3004
3005 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3006 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3007 presents you with a Customize-like interface.  The latter helps avoid
3008 silly Lisp errors.)  You might also be interested in reading about topic
3009 parameters (@pxref{Topic Parameters}).
3010
3011 @vindex gnus-parameters
3012 Group parameters can be set via the @code{gnus-parameters} variable too.
3013 But some variables, such as @code{visible}, have no effect.  For
3014 example:
3015
3016 @lisp
3017 (setq gnus-parameters
3018       '(("mail\\..*"
3019          (gnus-show-threads nil)
3020          (gnus-use-scoring nil)
3021          (gnus-summary-line-format
3022           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3023          (gcc-self . t)
3024          (display . all))
3025
3026         ("^nnimap:\\(foo.bar\\)$"
3027          (to-group . "\\1"))
3028
3029         ("mail\\.me"
3030          (gnus-use-scoring  t))
3031
3032         ("list\\..*"
3033          (total-expire . t)
3034          (broken-reply-to . t))))
3035 @end lisp
3036
3037 String value of parameters will be subjected to regexp substitution, as
3038 the @code{to-group} example shows.
3039
3040
3041 @node Listing Groups
3042 @section Listing Groups
3043 @cindex group listing
3044
3045 These commands all list various slices of the groups available.
3046
3047 @table @kbd
3048
3049 @item l
3050 @itemx A s
3051 @kindex A s (Group)
3052 @kindex l (Group)
3053 @findex gnus-group-list-groups
3054 List all groups that have unread articles
3055 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3056 command will list only groups of level ARG and lower.  By default, it
3057 only lists groups of level five (i.e.,
3058 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3059 groups).
3060
3061 @item L
3062 @itemx A u
3063 @kindex A u (Group)
3064 @kindex L (Group)
3065 @findex gnus-group-list-all-groups
3066 List all groups, whether they have unread articles or not
3067 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3068 this command will list only groups of level ARG and lower.  By default,
3069 it lists groups of level seven or lower (i.e., just subscribed and
3070 unsubscribed groups).
3071
3072 @item A l
3073 @kindex A l (Group)
3074 @findex gnus-group-list-level
3075 List all unread groups on a specific level
3076 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3077 with no unread articles.
3078
3079 @item A k
3080 @kindex A k (Group)
3081 @findex gnus-group-list-killed
3082 List all killed groups (@code{gnus-group-list-killed}).  If given a
3083 prefix argument, really list all groups that are available, but aren't
3084 currently (un)subscribed.  This could entail reading the active file
3085 from the server.
3086
3087 @item A z
3088 @kindex A z (Group)
3089 @findex gnus-group-list-zombies
3090 List all zombie groups (@code{gnus-group-list-zombies}).
3091
3092 @item A m
3093 @kindex A m (Group)
3094 @findex gnus-group-list-matching
3095 List all unread, subscribed groups with names that match a regexp
3096 (@code{gnus-group-list-matching}).
3097
3098 @item A M
3099 @kindex A M (Group)
3100 @findex gnus-group-list-all-matching
3101 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3102
3103 @item A A
3104 @kindex A A (Group)
3105 @findex gnus-group-list-active
3106 List absolutely all groups in the active file(s) of the
3107 server(s) you are connected to (@code{gnus-group-list-active}).  This
3108 might very well take quite a while.  It might actually be a better idea
3109 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3110 thing to match on.  Also note that this command may list groups that
3111 don't exist (yet)---these will be listed as if they were killed groups.
3112 Take the output with some grains of salt.
3113
3114 @item A a
3115 @kindex A a (Group)
3116 @findex gnus-group-apropos
3117 List all groups that have names that match a regexp
3118 (@code{gnus-group-apropos}).
3119
3120 @item A d
3121 @kindex A d (Group)
3122 @findex gnus-group-description-apropos
3123 List all groups that have names or descriptions that match a regexp
3124 (@code{gnus-group-description-apropos}).
3125
3126 @item A c
3127 @kindex A c (Group)
3128 @findex gnus-group-list-cached
3129 List all groups with cached articles (@code{gnus-group-list-cached}).
3130
3131 @item A ?
3132 @kindex A ? (Group)
3133 @findex gnus-group-list-dormant
3134 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3135
3136 @item A /
3137 @kindex A / (Group)
3138 @findex gnus-group-list-limit
3139 List groups limited within the current selection
3140 (@code{gnus-group-list-limit}).
3141
3142 @item A f
3143 @kindex A f (Group)
3144 @findex gnus-group-list-flush
3145 Flush groups from the current selection (@code{gnus-group-list-flush}).
3146
3147 @item A p
3148 @kindex A p (Group)
3149 @findex gnus-group-list-plus
3150 List groups plus the current selection (@code{gnus-group-list-plus}).
3151
3152 @end table
3153
3154 @vindex gnus-permanently-visible-groups
3155 @cindex visible group parameter
3156 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3157 always be shown, whether they have unread articles or not.  You can also
3158 add the @code{visible} element to the group parameters in question to
3159 get the same effect.
3160
3161 @vindex gnus-list-groups-with-ticked-articles
3162 Groups that have just ticked articles in it are normally listed in the
3163 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3164 @code{nil}, these groups will be treated just like totally empty
3165 groups.  It is @code{t} by default.
3166
3167
3168 @node Sorting Groups
3169 @section Sorting Groups
3170 @cindex sorting groups
3171
3172 @kindex C-c C-s (Group)
3173 @findex gnus-group-sort-groups
3174 @vindex gnus-group-sort-function
3175 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3176 group buffer according to the function(s) given by the
3177 @code{gnus-group-sort-function} variable.  Available sorting functions
3178 include:
3179
3180 @table @code
3181
3182 @item gnus-group-sort-by-alphabet
3183 @findex gnus-group-sort-by-alphabet
3184 Sort the group names alphabetically.  This is the default.
3185
3186 @item gnus-group-sort-by-real-name
3187 @findex gnus-group-sort-by-real-name
3188 Sort the group alphabetically on the real (unprefixed) group names.
3189
3190 @item gnus-group-sort-by-level
3191 @findex gnus-group-sort-by-level
3192 Sort by group level.
3193
3194 @item gnus-group-sort-by-score
3195 @findex gnus-group-sort-by-score
3196 Sort by group score.  @xref{Group Score}.
3197
3198 @item gnus-group-sort-by-rank
3199 @findex gnus-group-sort-by-rank
3200 Sort by group score and then the group level.  The level and the score
3201 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3202
3203 @item gnus-group-sort-by-unread
3204 @findex gnus-group-sort-by-unread
3205 Sort by number of unread articles.
3206
3207 @item gnus-group-sort-by-method
3208 @findex gnus-group-sort-by-method
3209 Sort alphabetically on the select method.
3210
3211 @item gnus-group-sort-by-server
3212 @findex gnus-group-sort-by-server
3213 Sort alphabetically on the Gnus server name.
3214
3215
3216 @end table
3217
3218 @code{gnus-group-sort-function} can also be a list of sorting
3219 functions.  In that case, the most significant sort key function must be
3220 the last one.
3221
3222
3223 There are also a number of commands for sorting directly according to
3224 some sorting criteria:
3225
3226 @table @kbd
3227 @item G S a
3228 @kindex G S a (Group)
3229 @findex gnus-group-sort-groups-by-alphabet
3230 Sort the group buffer alphabetically by group name
3231 (@code{gnus-group-sort-groups-by-alphabet}).
3232
3233 @item G S u
3234 @kindex G S u (Group)
3235 @findex gnus-group-sort-groups-by-unread
3236 Sort the group buffer by the number of unread articles
3237 (@code{gnus-group-sort-groups-by-unread}).
3238
3239 @item G S l
3240 @kindex G S l (Group)
3241 @findex gnus-group-sort-groups-by-level
3242 Sort the group buffer by group level
3243 (@code{gnus-group-sort-groups-by-level}).
3244
3245 @item G S v
3246 @kindex G S v (Group)
3247 @findex gnus-group-sort-groups-by-score
3248 Sort the group buffer by group score
3249 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3250
3251 @item G S r
3252 @kindex G S r (Group)
3253 @findex gnus-group-sort-groups-by-rank
3254 Sort the group buffer by group rank
3255 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3256
3257 @item G S m
3258 @kindex G S m (Group)
3259 @findex gnus-group-sort-groups-by-method
3260 Sort the group buffer alphabetically by back end name@*
3261 (@code{gnus-group-sort-groups-by-method}).
3262
3263 @item G S n
3264 @kindex G S n (Group)
3265 @findex gnus-group-sort-groups-by-real-name
3266 Sort the group buffer alphabetically by real (unprefixed) group name
3267 (@code{gnus-group-sort-groups-by-real-name}).
3268
3269 @end table
3270
3271 All the commands below obey the process/prefix convention
3272 (@pxref{Process/Prefix}).
3273
3274 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3275 commands will sort in reverse order.
3276
3277 You can also sort a subset of the groups:
3278
3279 @table @kbd
3280 @item G P a
3281 @kindex G P a (Group)
3282 @findex gnus-group-sort-selected-groups-by-alphabet
3283 Sort the groups alphabetically by group name
3284 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3285
3286 @item G P u
3287 @kindex G P u (Group)
3288 @findex gnus-group-sort-selected-groups-by-unread
3289 Sort the groups by the number of unread articles
3290 (@code{gnus-group-sort-selected-groups-by-unread}).
3291
3292 @item G P l
3293 @kindex G P l (Group)
3294 @findex gnus-group-sort-selected-groups-by-level
3295 Sort the groups by group level
3296 (@code{gnus-group-sort-selected-groups-by-level}).
3297
3298 @item G P v
3299 @kindex G P v (Group)
3300 @findex gnus-group-sort-selected-groups-by-score
3301 Sort the groups by group score
3302 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3303
3304 @item G P r
3305 @kindex G P r (Group)
3306 @findex gnus-group-sort-selected-groups-by-rank
3307 Sort the groups by group rank
3308 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3309
3310 @item G P m
3311 @kindex G P m (Group)
3312 @findex gnus-group-sort-selected-groups-by-method
3313 Sort the groups alphabetically by back end name@*
3314 (@code{gnus-group-sort-selected-groups-by-method}).
3315
3316 @item G P n
3317 @kindex G P n (Group)
3318 @findex gnus-group-sort-selected-groups-by-real-name
3319 Sort the groups alphabetically by real (unprefixed) group name
3320 (@code{gnus-group-sort-selected-groups-by-real-name}).
3321
3322 @item G P s
3323 @kindex G P s (Group)
3324 @findex gnus-group-sort-selected-groups
3325 Sort the groups according to @code{gnus-group-sort-function}.
3326
3327 @end table
3328
3329 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3330 move groups around.
3331
3332
3333 @node Group Maintenance
3334 @section Group Maintenance
3335 @cindex bogus groups
3336
3337 @table @kbd
3338 @item b
3339 @kindex b (Group)
3340 @findex gnus-group-check-bogus-groups
3341 Find bogus groups and delete them
3342 (@code{gnus-group-check-bogus-groups}).
3343
3344 @item F
3345 @kindex F (Group)
3346 @findex gnus-group-find-new-groups
3347 Find new groups and process them (@code{gnus-group-find-new-groups}).
3348 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3349 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3350 to query the server for new groups, and subscribe the new groups as
3351 zombies.
3352
3353 @item C-c C-x
3354 @kindex C-c C-x (Group)
3355 @findex gnus-group-expire-articles
3356 Run all expirable articles in the current group through the expiry
3357 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3358 all expirable articles in the group that have been around for a while.
3359 (@pxref{Expiring Mail}).
3360
3361 @item C-c C-M-x
3362 @kindex C-c C-M-x (Group)
3363 @findex gnus-group-expire-all-groups
3364 Run all expirable articles in all groups through the expiry process
3365 (@code{gnus-group-expire-all-groups}).
3366
3367 @end table
3368
3369
3370 @node Browse Foreign Server
3371 @section Browse Foreign Server
3372 @cindex foreign servers
3373 @cindex browsing servers
3374
3375 @table @kbd
3376 @item B
3377 @kindex B (Group)
3378 @findex gnus-group-browse-foreign-server
3379 You will be queried for a select method and a server name.  Gnus will
3380 then attempt to contact this server and let you browse the groups there
3381 (@code{gnus-group-browse-foreign-server}).
3382 @end table
3383
3384 @findex gnus-browse-mode
3385 A new buffer with a list of available groups will appear.  This buffer
3386 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3387 a lot) like a normal group buffer.
3388
3389 Here's a list of keystrokes available in the browse mode:
3390
3391 @table @kbd
3392 @item n
3393 @kindex n (Browse)
3394 @findex gnus-group-next-group
3395 Go to the next group (@code{gnus-group-next-group}).
3396
3397 @item p
3398 @kindex p (Browse)
3399 @findex gnus-group-prev-group
3400 Go to the previous group (@code{gnus-group-prev-group}).
3401
3402 @item SPACE
3403 @kindex SPACE (Browse)
3404 @findex gnus-browse-read-group
3405 Enter the current group and display the first article
3406 (@code{gnus-browse-read-group}).
3407
3408 @item RET
3409 @kindex RET (Browse)
3410 @findex gnus-browse-select-group
3411 Enter the current group (@code{gnus-browse-select-group}).
3412
3413 @item u
3414 @kindex u (Browse)
3415 @findex gnus-browse-unsubscribe-current-group
3416 Unsubscribe to the current group, or, as will be the case here,
3417 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3418
3419 @item l
3420 @itemx q
3421 @kindex q (Browse)
3422 @kindex l (Browse)
3423 @findex gnus-browse-exit
3424 Exit browse mode (@code{gnus-browse-exit}).
3425
3426 @item d
3427 @kindex d (Browse)
3428 @findex gnus-browse-describe-group
3429 Describe the current group (@code{gnus-browse-describe-group}).
3430
3431 @item ?
3432 @kindex ? (Browse)
3433 @findex gnus-browse-describe-briefly
3434 Describe browse mode briefly (well, there's not much to describe, is
3435 there) (@code{gnus-browse-describe-briefly}).
3436 @end table
3437
3438
3439 @node Exiting Gnus
3440 @section Exiting gnus
3441 @cindex exiting gnus
3442
3443 Yes, gnus is ex(c)iting.
3444
3445 @table @kbd
3446 @item z
3447 @kindex z (Group)
3448 @findex gnus-group-suspend
3449 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3450 but it kills all buffers except the Group buffer.  I'm not sure why this
3451 is a gain, but then who am I to judge?
3452
3453 @item q
3454 @kindex q (Group)
3455 @findex gnus-group-exit
3456 @c @icon{gnus-group-exit}
3457 Quit gnus (@code{gnus-group-exit}).
3458
3459 @item Q
3460 @kindex Q (Group)
3461 @findex gnus-group-quit
3462 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3463 The dribble file will be saved, though (@pxref{Auto Save}).
3464 @end table
3465
3466 @vindex gnus-exit-gnus-hook
3467 @vindex gnus-suspend-gnus-hook
3468 @vindex gnus-after-exiting-gnus-hook
3469 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3470 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3471 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3472 exiting gnus.
3473
3474 Note:
3475
3476 @quotation
3477 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3478 numbly heavy and herself fall into a hazy trance as the boy sitting
3479 behind her drew repeated lines with his pencil across the back of her
3480 plastic chair.
3481 @end quotation
3482
3483
3484 @node Group Topics
3485 @section Group Topics
3486 @cindex topics
3487
3488 If you read lots and lots of groups, it might be convenient to group
3489 them hierarchically according to topics.  You put your Emacs groups over
3490 here, your sex groups over there, and the rest (what, two groups or so?)
3491 you put in some misc section that you never bother with anyway.  You can
3492 even group the Emacs sex groups as a sub-topic to either the Emacs
3493 groups or the sex groups---or both!  Go wild!
3494
3495 @iftex
3496 @iflatex
3497 \gnusfigure{Group Topics}{400}{
3498 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3499 }
3500 @end iflatex
3501 @end iftex
3502
3503 Here's an example:
3504
3505 @example
3506 Gnus
3507   Emacs -- I wuw it!
3508      3: comp.emacs
3509      2: alt.religion.emacs
3510     Naughty Emacs
3511      452: alt.sex.emacs
3512        0: comp.talk.emacs.recovery
3513   Misc
3514      8: comp.binaries.fractals
3515     13: comp.sources.unix
3516 @end example
3517
3518 @findex gnus-topic-mode
3519 @kindex t (Group)
3520 To get this @emph{fab} functionality you simply turn on (ooh!) the
3521 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3522 is a toggling command.)
3523
3524 Go ahead, just try it.  I'll still be here when you get back.  La de
3525 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3526 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3527 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3528 Hot and bothered?
3529
3530 If you want this permanently enabled, you should add that minor mode to
3531 the hook for the group mode.  Put the following line in your
3532 @file{~/.gnus.el} file:
3533
3534 @lisp
3535 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3536 @end lisp
3537
3538 @menu
3539 * Topic Commands::              Interactive E-Z commands.
3540 * Topic Variables::             How to customize the topics the Lisp Way.
3541 * Topic Sorting::               Sorting each topic individually.
3542 * Topic Topology::              A map of the world.
3543 * Topic Parameters::            Parameters that apply to all groups in a topic.
3544 @end menu
3545
3546
3547 @node Topic Commands
3548 @subsection Topic Commands
3549 @cindex topic commands
3550
3551 When the topic minor mode is turned on, a new @kbd{T} submap will be
3552 available.  In addition, a few of the standard keys change their
3553 definitions slightly.
3554
3555 In general, the following kinds of operations are possible on topics.
3556 First of all, you want to create topics.  Secondly, you want to put
3557 groups in topics and to move them around until you have an order you
3558 like.  The third kind of operation is to show/hide parts of the whole
3559 shebang.  You might want to hide a topic including its subtopics and
3560 groups, to get a better overview of the other groups.
3561
3562 Here is a list of the basic keys that you might need to set up topics
3563 the way you like.
3564
3565 @table @kbd
3566
3567 @item T n
3568 @kindex T n (Topic)
3569 @findex gnus-topic-create-topic
3570 Prompt for a new topic name and create it
3571 (@code{gnus-topic-create-topic}).
3572
3573 @item T TAB
3574 @itemx TAB
3575 @kindex T TAB (Topic)
3576 @kindex TAB (Topic)
3577 @findex gnus-topic-indent
3578 ``Indent'' the current topic so that it becomes a sub-topic of the
3579 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3580 ``un-indent'' the topic instead.
3581
3582 @item M-TAB
3583 @kindex M-TAB (Topic)
3584 @findex gnus-topic-unindent
3585 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3586 parent of its current parent (@code{gnus-topic-unindent}).
3587
3588 @end table
3589
3590 The following two keys can be used to move groups and topics around.
3591 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3592 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3593 kill and yank rather than cut and paste.
3594
3595 @table @kbd
3596
3597 @item C-k
3598 @kindex C-k (Topic)
3599 @findex gnus-topic-kill-group
3600 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3601 topic will be removed along with the topic.
3602
3603 @item C-y
3604 @kindex C-y (Topic)
3605 @findex gnus-topic-yank-group
3606 Yank the previously killed group or topic
3607 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3608 before all groups.
3609
3610 So, to move a topic to the beginning of the list of topics, just hit
3611 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3612 move the cursor to the beginning of the buffer (just below the ``Gnus''
3613 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3614 paste.  Like I said -- E-Z.
3615
3616 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3617 you can move topics around as well as groups.
3618
3619 @end table
3620
3621 After setting up the topics the way you like them, you might wish to
3622 hide a topic, or to show it again.  That's why we have the following
3623 key.
3624
3625 @table @kbd
3626
3627 @item RET
3628 @kindex RET (Topic)
3629 @findex gnus-topic-select-group
3630 @itemx SPACE
3631 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3632 When you perform this command on a group, you'll enter the group, as
3633 usual.  When done on a topic line, the topic will be folded (if it was
3634 visible) or unfolded (if it was folded already).  So it's basically a
3635 toggling command on topics.  In addition, if you give a numerical
3636 prefix, group on that level (and lower) will be displayed.
3637
3638 @end table
3639
3640 Now for a list of other commands, in no particular order.
3641
3642 @table @kbd
3643
3644 @item T m
3645 @kindex T m (Topic)
3646 @findex gnus-topic-move-group
3647 Move the current group to some other topic
3648 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3649 convention (@pxref{Process/Prefix}).
3650
3651 @item T j
3652 @kindex T j (Topic)
3653 @findex gnus-topic-jump-to-topic
3654 Go to a topic (@code{gnus-topic-jump-to-topic}).
3655
3656 @item T c
3657 @kindex T c (Topic)
3658 @findex gnus-topic-copy-group
3659 Copy the current group to some other topic
3660 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3661 convention (@pxref{Process/Prefix}).
3662
3663 @item T h
3664 @kindex T h (Topic)
3665 @findex gnus-topic-hide-topic
3666 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3667 a prefix, hide the topic permanently.
3668
3669 @item T s
3670 @kindex T s (Topic)
3671 @findex gnus-topic-show-topic
3672 Show the current topic (@code{gnus-topic-show-topic}).  If given
3673 a prefix, show the topic permanently.
3674
3675 @item T D
3676 @kindex T D (Topic)
3677 @findex gnus-topic-remove-group
3678 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3679 This command is mainly useful if you have the same group in several
3680 topics and wish to remove it from one of the topics.  You may also
3681 remove a group from all topics, but in that case, Gnus will add it to
3682 the root topic the next time you start Gnus.  In fact, all new groups
3683 (which, naturally, don't belong to any topic) will show up in the root
3684 topic.
3685
3686 This command uses the process/prefix convention
3687 (@pxref{Process/Prefix}).
3688
3689 @item T M
3690 @kindex T M (Topic)
3691 @findex gnus-topic-move-matching
3692 Move all groups that match some regular expression to a topic
3693 (@code{gnus-topic-move-matching}).
3694
3695 @item T C
3696 @kindex T C (Topic)
3697 @findex gnus-topic-copy-matching
3698 Copy all groups that match some regular expression to a topic
3699 (@code{gnus-topic-copy-matching}).
3700
3701 @item T H
3702 @kindex T H (Topic)
3703 @findex gnus-topic-toggle-display-empty-topics
3704 Toggle hiding empty topics
3705 (@code{gnus-topic-toggle-display-empty-topics}).
3706
3707 @item T #
3708 @kindex T # (Topic)
3709 @findex gnus-topic-mark-topic
3710 Mark all groups in the current topic with the process mark
3711 (@code{gnus-topic-mark-topic}).  This command works recursively on
3712 sub-topics unless given a prefix.
3713
3714 @item T M-#
3715 @kindex T M-# (Topic)
3716 @findex gnus-topic-unmark-topic
3717 Remove the process mark from all groups in the current topic
3718 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3719 sub-topics unless given a prefix.
3720
3721 @item C-c C-x
3722 @kindex C-c C-x (Topic)
3723 @findex gnus-topic-expire-articles
3724 Run all expirable articles in the current group or topic through the
3725 expiry process (if any)
3726 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3727
3728 @item T r
3729 @kindex T r (Topic)
3730 @findex gnus-topic-rename
3731 Rename a topic (@code{gnus-topic-rename}).
3732
3733 @item T DEL
3734 @kindex T DEL (Topic)
3735 @findex gnus-topic-delete
3736 Delete an empty topic (@code{gnus-topic-delete}).
3737
3738 @item A T
3739 @kindex A T (Topic)
3740 @findex gnus-topic-list-active
3741 List all groups that gnus knows about in a topics-ified way
3742 (@code{gnus-topic-list-active}).
3743
3744 @item T M-n
3745 @kindex T M-n (Topic)
3746 @findex gnus-topic-goto-next-topic
3747 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3748
3749 @item T M-p
3750 @kindex T M-p (Topic)
3751 @findex gnus-topic-goto-previous-topic
3752 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3753
3754 @item G p
3755 @kindex G p (Topic)
3756 @findex gnus-topic-edit-parameters
3757 @cindex group parameters
3758 @cindex topic parameters
3759 @cindex parameters
3760 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3761 @xref{Topic Parameters}.
3762
3763 @end table
3764
3765
3766 @node Topic Variables
3767 @subsection Topic Variables
3768 @cindex topic variables
3769
3770 The previous section told you how to tell Gnus which topics to display.
3771 This section explains how to tell Gnus what to display about each topic.
3772
3773 @vindex gnus-topic-line-format
3774 The topic lines themselves are created according to the
3775 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3776 Valid elements are:
3777
3778 @table @samp
3779 @item i
3780 Indentation.
3781 @item n
3782 Topic name.
3783 @item v
3784 Visibility.
3785 @item l
3786 Level.
3787 @item g
3788 Number of groups in the topic.
3789 @item a
3790 Number of unread articles in the topic.
3791 @item A
3792 Number of unread articles in the topic and all its subtopics.
3793 @end table
3794
3795 @vindex gnus-topic-indent-level
3796 Each sub-topic (and the groups in the sub-topics) will be indented with
3797 @code{gnus-topic-indent-level} times the topic level number of spaces.
3798 The default is 2.
3799
3800 @vindex gnus-topic-mode-hook
3801 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3802
3803 @vindex gnus-topic-display-empty-topics
3804 The @code{gnus-topic-display-empty-topics} says whether to display even
3805 topics that have no unread articles in them.  The default is @code{t}.
3806
3807
3808 @node Topic Sorting
3809 @subsection Topic Sorting
3810 @cindex topic sorting
3811
3812 You can sort the groups in each topic individually with the following
3813 commands:
3814
3815
3816 @table @kbd
3817 @item T S a
3818 @kindex T S a (Topic)
3819 @findex gnus-topic-sort-groups-by-alphabet
3820 Sort the current topic alphabetically by group name
3821 (@code{gnus-topic-sort-groups-by-alphabet}).
3822
3823 @item T S u
3824 @kindex T S u (Topic)
3825 @findex gnus-topic-sort-groups-by-unread
3826 Sort the current topic by the number of unread articles
3827 (@code{gnus-topic-sort-groups-by-unread}).
3828
3829 @item T S l
3830 @kindex T S l (Topic)
3831 @findex gnus-topic-sort-groups-by-level
3832 Sort the current topic by group level
3833 (@code{gnus-topic-sort-groups-by-level}).
3834
3835 @item T S v
3836 @kindex T S v (Topic)
3837 @findex gnus-topic-sort-groups-by-score
3838 Sort the current topic by group score
3839 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3840
3841 @item T S r
3842 @kindex T S r (Topic)
3843 @findex gnus-topic-sort-groups-by-rank
3844 Sort the current topic by group rank
3845 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3846
3847 @item T S m
3848 @kindex T S m (Topic)
3849 @findex gnus-topic-sort-groups-by-method
3850 Sort the current topic alphabetically by back end name
3851 (@code{gnus-topic-sort-groups-by-method}).
3852
3853 @item T S e
3854 @kindex T S e (Topic)
3855 @findex gnus-topic-sort-groups-by-server
3856 Sort the current topic alphabetically by server name
3857 (@code{gnus-topic-sort-groups-by-server}).
3858
3859 @item T S s
3860 @kindex T S s
3861 @findex gnus-topic-sort-groups
3862 Sort the current topic according to the function(s) given by the
3863 @code{gnus-group-sort-function} variable
3864 (@code{gnus-topic-sort-groups}).
3865
3866 @end table
3867
3868 When given a prefix argument, all these commands will sort in reverse
3869 order.  @xref{Sorting Groups}, for more information about group
3870 sorting.
3871
3872
3873 @node Topic Topology
3874 @subsection Topic Topology
3875 @cindex topic topology
3876 @cindex topology
3877
3878 So, let's have a look at an example group buffer:
3879
3880 @example
3881 @group
3882 Gnus
3883   Emacs -- I wuw it!
3884      3: comp.emacs
3885      2: alt.religion.emacs
3886     Naughty Emacs
3887      452: alt.sex.emacs
3888        0: comp.talk.emacs.recovery
3889   Misc
3890      8: comp.binaries.fractals
3891     13: comp.sources.unix
3892 @end group
3893 @end example
3894
3895 So, here we have one top-level topic (@samp{Gnus}), two topics under
3896 that, and one sub-topic under one of the sub-topics.  (There is always
3897 just one (1) top-level topic).  This topology can be expressed as
3898 follows:
3899
3900 @lisp
3901 (("Gnus" visible)
3902  (("Emacs -- I wuw it!" visible)
3903   (("Naughty Emacs" visible)))
3904  (("Misc" visible)))
3905 @end lisp
3906
3907 @vindex gnus-topic-topology
3908 This is in fact how the variable @code{gnus-topic-topology} would look
3909 for the display above.  That variable is saved in the @file{.newsrc.eld}
3910 file, and shouldn't be messed with manually---unless you really want
3911 to.  Since this variable is read from the @file{.newsrc.eld} file,
3912 setting it in any other startup files will have no effect.
3913
3914 This topology shows what topics are sub-topics of what topics (right),
3915 and which topics are visible.  Two settings are currently
3916 allowed---@code{visible} and @code{invisible}.
3917
3918
3919 @node Topic Parameters
3920 @subsection Topic Parameters
3921 @cindex topic parameters
3922
3923 All groups in a topic will inherit group parameters from the parent (and
3924 ancestor) topic parameters.  All valid group parameters are valid topic
3925 parameters (@pxref{Group Parameters}).
3926
3927 In addition, the following parameters are only valid as topic
3928 parameters:
3929
3930 @table @code
3931 @item subscribe
3932 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3933 @code{subscribe} topic parameter says what groups go in what topic.  Its
3934 value should be a regexp to match the groups that should go in that
3935 topic.
3936
3937 @item subscribe-level
3938 When subscribing new groups by topic (see the @code{subscribe} parameter),
3939 the group will be subscribed with the level specified in the
3940 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3941
3942 @end table
3943
3944 Group parameters (of course) override topic parameters, and topic
3945 parameters in sub-topics override topic parameters in super-topics.  You
3946 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3947 verb, although you may feel free to disagree with me here.)
3948
3949 @example
3950 Gnus
3951   Emacs
3952      3: comp.emacs
3953      2: alt.religion.emacs
3954    452: alt.sex.emacs
3955     Relief
3956      452: alt.sex.emacs
3957        0: comp.talk.emacs.recovery
3958   Misc
3959      8: comp.binaries.fractals
3960     13: comp.sources.unix
3961    452: alt.sex.emacs
3962 @end example
3963
3964 The @samp{Emacs} topic has the topic parameter @code{(score-file
3965 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3966 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3967 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3968 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3969 . "religion.SCORE")}.
3970
3971 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3972 will get the @file{relief.SCORE} home score file.  If you enter the same
3973 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3974 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3975 get the @file{religion.SCORE} home score file.
3976
3977 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3978 there are some problems, especially with the @code{total-expiry}
3979 parameter.  Say you have a mail group in two topics; one with
3980 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3981 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3982 of these topics you mean to expire articles from, so anything may
3983 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3984 happens.  You just have to be careful if you do stuff like that.
3985
3986
3987 @node Misc Group Stuff
3988 @section Misc Group Stuff
3989
3990 @menu
3991 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3992 * Group Information::           Information and help on groups and Gnus.
3993 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3994 * File Commands::               Reading and writing the Gnus files.
3995 * Sieve Commands::              Managing Sieve scripts.
3996 @end menu
3997
3998 @table @kbd
3999
4000 @item ^
4001 @kindex ^ (Group)
4002 @findex gnus-group-enter-server-mode
4003 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4004 @xref{Server Buffer}.
4005
4006 @item a
4007 @kindex a (Group)
4008 @findex gnus-group-post-news
4009 Start composing a message (a news by default)
4010 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4011 under the point.  If the prefix is 1, prompt for a group to post to.
4012 Contrary to what the name of this function suggests, the prepared
4013 article might be a mail instead of a news, if a mail group is specified
4014 with the prefix argument.  @xref{Composing Messages}.
4015
4016 @item m
4017 @kindex m (Group)
4018 @findex gnus-group-mail
4019 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4020 use the posting style of the group under the point.  If the prefix is 1,
4021 prompt for a group name to find the posting style.
4022 @xref{Composing Messages}.
4023
4024 @item i
4025 @kindex i (Group)
4026 @findex gnus-group-news
4027 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4028 post to the group under the point.  If the prefix is 1, prompt
4029 for group to post to.  @xref{Composing Messages}.
4030
4031 This function actually prepares a news even when using mail groups.
4032 This is useful for ``posting'' messages to mail groups without actually
4033 sending them over the network: they're just saved directly to the group
4034 in question.  The corresponding back end must have a request-post method
4035 for this to work though.
4036
4037 @end table
4038
4039 Variables for the group buffer:
4040
4041 @table @code
4042
4043 @item gnus-group-mode-hook
4044 @vindex gnus-group-mode-hook
4045 is called after the group buffer has been
4046 created.
4047
4048 @item gnus-group-prepare-hook
4049 @vindex gnus-group-prepare-hook
4050 is called after the group buffer is
4051 generated.  It may be used to modify the buffer in some strange,
4052 unnatural way.
4053
4054 @item gnus-group-prepared-hook
4055 @vindex gnus-group-prepare-hook
4056 is called as the very last thing after the group buffer has been
4057 generated.  It may be used to move point around, for instance.
4058
4059 @item gnus-permanently-visible-groups
4060 @vindex gnus-permanently-visible-groups
4061 Groups matching this regexp will always be listed in the group buffer,
4062 whether they are empty or not.
4063
4064 @item gnus-group-name-charset-method-alist
4065 @vindex gnus-group-name-charset-method-alist
4066 An alist of method and the charset for group names.  It is used to show
4067 non-@acronym{ASCII} group names.
4068
4069 For example:
4070 @lisp
4071 (setq gnus-group-name-charset-method-alist
4072     '(((nntp "news.com.cn") . cn-gb-2312)))
4073 @end lisp
4074
4075 @item gnus-group-name-charset-group-alist
4076 @cindex UTF-8 group names
4077 @vindex gnus-group-name-charset-group-alist
4078 An alist of regexp of group name and the charset for group names.  It
4079 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4080 utf-8))} is the default value if UTF-8 is supported, otherwise the
4081 default is @code{nil}.
4082
4083 For example:
4084 @lisp
4085 (setq gnus-group-name-charset-group-alist
4086     '(("\\.com\\.cn:" . cn-gb-2312)))
4087 @end lisp
4088
4089 @end table
4090
4091 @node Scanning New Messages
4092 @subsection Scanning New Messages
4093 @cindex new messages
4094 @cindex scanning new news
4095
4096 @table @kbd
4097
4098 @item g
4099 @kindex g (Group)
4100 @findex gnus-group-get-new-news
4101 @c @icon{gnus-group-get-new-news}
4102 Check the server(s) for new articles.  If the numerical prefix is used,
4103 this command will check only groups of level @var{arg} and lower
4104 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4105 command will force a total re-reading of the active file(s) from the
4106 back end(s).
4107
4108 @item M-g
4109 @kindex M-g (Group)
4110 @findex gnus-group-get-new-news-this-group
4111 @vindex gnus-goto-next-group-when-activating
4112 @c @icon{gnus-group-get-new-news-this-group}
4113 Check whether new articles have arrived in the current group
4114 (@code{gnus-group-get-new-news-this-group}).
4115 @code{gnus-goto-next-group-when-activating} says whether this command is
4116 to move point to the next group or not.  It is @code{t} by default.
4117
4118 @findex gnus-activate-all-groups
4119 @cindex activating groups
4120 @item C-c M-g
4121 @kindex C-c M-g (Group)
4122 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4123
4124 @item R
4125 @kindex R (Group)
4126 @cindex restarting
4127 @findex gnus-group-restart
4128 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4129 file(s), closes the connection to all servers, clears up all run-time
4130 gnus variables, and then starts gnus all over again.
4131
4132 @end table
4133
4134 @vindex gnus-get-new-news-hook
4135 @code{gnus-get-new-news-hook} is run just before checking for new news.
4136
4137 @vindex gnus-after-getting-new-news-hook
4138 @code{gnus-after-getting-new-news-hook} is run after checking for new
4139 news.
4140
4141
4142 @node Group Information
4143 @subsection Group Information
4144 @cindex group information
4145 @cindex information on groups
4146
4147 @table @kbd
4148
4149
4150 @item H f
4151 @kindex H f (Group)
4152 @findex gnus-group-fetch-faq
4153 @vindex gnus-group-faq-directory
4154 @cindex FAQ
4155 @cindex ange-ftp
4156 Try to fetch the @acronym{FAQ} for the current group
4157 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4158 from @code{gnus-group-faq-directory}, which is usually a directory on
4159 a remote machine.  This variable can also be a list of directories.
4160 In that case, giving a prefix to this command will allow you to choose
4161 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4162 used for fetching the file.
4163
4164 If fetching from the first site is unsuccessful, gnus will attempt to go
4165 through @code{gnus-group-faq-directory} and try to open them one by one.
4166
4167 @item H c
4168 @kindex H c (Group)
4169 @findex gnus-group-fetch-charter
4170 @vindex gnus-group-charter-alist
4171 @cindex charter
4172 Try to open the charter for the current group in a web browser
4173 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4174 prefix argument.
4175
4176 Gnus will use @code{gnus-group-charter-alist} to find the location of
4177 the charter.  If no location is known, Gnus will fetch the control
4178 messages for the group, which in some cases includes the charter.
4179
4180 @item H C
4181 @kindex H C (Group)
4182 @findex gnus-group-fetch-control
4183 @vindex gnus-group-fetch-control-use-browse-url
4184 @cindex control message
4185 Fetch the control messages for the group from the archive at
4186 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4187 group if given a prefix argument.
4188
4189 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4190 Gnus will open the control messages in a browser using
4191 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4192 and displayed in an ephemeral group.
4193
4194 Note that the control messages are compressed.  To use this command
4195 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4196 Files, ,Compressed Files, emacs, The Emacs Manual}).
4197
4198 @item H d
4199 @itemx C-c C-d
4200 @c @icon{gnus-group-describe-group}
4201 @kindex H d (Group)
4202 @kindex C-c C-d (Group)
4203 @cindex describing groups
4204 @cindex group description
4205 @findex gnus-group-describe-group
4206 Describe the current group (@code{gnus-group-describe-group}).  If given
4207 a prefix, force Gnus to re-read the description from the server.
4208
4209 @item M-d
4210 @kindex M-d (Group)
4211 @findex gnus-group-describe-all-groups
4212 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4213 prefix, force gnus to re-read the description file from the server.
4214
4215 @item H v
4216 @itemx V
4217 @kindex V (Group)
4218 @kindex H v (Group)
4219 @cindex version
4220 @findex gnus-version
4221 Display current gnus version numbers (@code{gnus-version}).
4222
4223 @item ?
4224 @kindex ? (Group)
4225 @findex gnus-group-describe-briefly
4226 Give a very short help message (@code{gnus-group-describe-briefly}).
4227
4228 @item C-c C-i
4229 @kindex C-c C-i (Group)
4230 @cindex info
4231 @cindex manual
4232 @findex gnus-info-find-node
4233 Go to the gnus info node (@code{gnus-info-find-node}).
4234 @end table
4235
4236
4237 @node Group Timestamp
4238 @subsection Group Timestamp
4239 @cindex timestamps
4240 @cindex group timestamps
4241
4242 It can be convenient to let gnus keep track of when you last read a
4243 group.  To set the ball rolling, you should add
4244 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4245
4246 @lisp
4247 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4248 @end lisp
4249
4250 After doing this, each time you enter a group, it'll be recorded.
4251
4252 This information can be displayed in various ways---the easiest is to
4253 use the @samp{%d} spec in the group line format:
4254
4255 @lisp
4256 (setq gnus-group-line-format
4257       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4258 @end lisp
4259
4260 This will result in lines looking like:
4261
4262 @example
4263 *        0: mail.ding                                19961002T012943
4264          0: custom                                   19961002T012713
4265 @end example
4266
4267 As you can see, the date is displayed in compact ISO 8601 format.  This
4268 may be a bit too much, so to just display the date, you could say
4269 something like:
4270
4271 @lisp
4272 (setq gnus-group-line-format
4273       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4274 @end lisp
4275
4276 If you would like greater control of the time format, you can use a
4277 user-defined format spec.  Something like the following should do the
4278 trick:
4279
4280 @lisp
4281 (setq gnus-group-line-format
4282       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4283 (defun gnus-user-format-function-d (headers)
4284   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4285     (if time
4286         (format-time-string "%b %d  %H:%M" time)
4287       "")))
4288 @end lisp
4289
4290
4291 @node File Commands
4292 @subsection File Commands
4293 @cindex file commands
4294
4295 @table @kbd
4296
4297 @item r
4298 @kindex r (Group)
4299 @findex gnus-group-read-init-file
4300 @vindex gnus-init-file
4301 @cindex reading init file
4302 Re-read the init file (@code{gnus-init-file}, which defaults to
4303 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4304
4305 @item s
4306 @kindex s (Group)
4307 @findex gnus-group-save-newsrc
4308 @cindex saving .newsrc
4309 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4310 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4311 file(s) whether Gnus thinks it is necessary or not.
4312
4313 @c @item Z
4314 @c @kindex Z (Group)
4315 @c @findex gnus-group-clear-dribble
4316 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4317
4318 @end table
4319
4320
4321 @node Sieve Commands
4322 @subsection Sieve Commands
4323 @cindex group sieve commands
4324
4325 Sieve is a server-side mail filtering language.  In Gnus you can use
4326 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4327 sieve rules that should apply to each group.  Gnus provides two
4328 commands to translate all these group parameters into a proper Sieve
4329 script that can be transfered to the server somehow.
4330
4331 @vindex gnus-sieve-file
4332 @vindex gnus-sieve-region-start
4333 @vindex gnus-sieve-region-end
4334 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4335 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4336 between two delimiters, @code{gnus-sieve-region-start} and
4337 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4338 outside these delimiters that will not be removed the next time you
4339 regenerate the Sieve script.
4340
4341 @vindex gnus-sieve-crosspost
4342 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4343 is generated.  If it is non-@code{nil} (the default) articles is
4344 placed in all groups that have matching rules, otherwise the article
4345 is only placed in the group with the first matching rule.  For
4346 example, the group parameter @samp{(sieve address "sender"
4347 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4348 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4349 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4350 except that the line containing the call to @code{stop} is removed.)
4351
4352 @example
4353 if address "sender" "owner-ding@@hpc.uh.edu" @{
4354         fileinto "INBOX.ding";
4355         stop;
4356 @}
4357 @end example
4358
4359 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4360
4361 @table @kbd
4362
4363 @item D g
4364 @kindex D g (Group)
4365 @findex gnus-sieve-generate
4366 @vindex gnus-sieve-file
4367 @cindex generating sieve script
4368 Regenerate a Sieve script from the @code{sieve} group parameters and
4369 put you into the @code{gnus-sieve-file} without saving it.
4370
4371 @item D u
4372 @kindex D u (Group)
4373 @findex gnus-sieve-update
4374 @vindex gnus-sieve-file
4375 @cindex updating sieve script
4376 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4377 @code{sieve} group parameters, save the file and upload it to the
4378 server using the @code{sieveshell} program.
4379
4380 @end table
4381
4382
4383 @node Summary Buffer
4384 @chapter Summary Buffer
4385 @cindex summary buffer
4386
4387 A line for each article is displayed in the summary buffer.  You can
4388 move around, read articles, post articles and reply to articles.
4389
4390 The most common way to a summary buffer is to select a group from the
4391 group buffer (@pxref{Selecting a Group}).
4392
4393 You can have as many summary buffers open as you wish.
4394
4395 @menu
4396 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4397 * Summary Maneuvering::         Moving around the summary buffer.
4398 * Choosing Articles::           Reading articles.
4399 * Paging the Article::          Scrolling the current article.
4400 * Reply Followup and Post::     Posting articles.
4401 * Delayed Articles::            Send articles at a later time.
4402 * Marking Articles::            Marking articles as read, expirable, etc.
4403 * Limiting::                    You can limit the summary buffer.
4404 * Threading::                   How threads are made.
4405 * Sorting the Summary Buffer::  How articles and threads are sorted.
4406 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4407 * Article Caching::             You may store articles in a cache.
4408 * Persistent Articles::         Making articles expiry-resistant.
4409 * Article Backlog::             Having already read articles hang around.
4410 * Saving Articles::             Ways of customizing article saving.
4411 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4412 * Article Treatment::           The article buffer can be mangled at will.
4413 * MIME Commands::               Doing MIMEy things with the articles.
4414 * Charsets::                    Character set issues.
4415 * Article Commands::            Doing various things with the article buffer.
4416 * Summary Sorting::             Sorting the summary buffer in various ways.
4417 * Finding the Parent::          No child support? Get the parent.
4418 * Alternative Approaches::      Reading using non-default summaries.
4419 * Tree Display::                A more visual display of threads.
4420 * Mail Group Commands::         Some commands can only be used in mail groups.
4421 * Various Summary Stuff::       What didn't fit anywhere else.
4422 * Exiting the Summary Buffer::  Returning to the Group buffer,
4423                                 or reselecting the current group.
4424 * Crosspost Handling::          How crossposted articles are dealt with.
4425 * Duplicate Suppression::       An alternative when crosspost handling fails.
4426 * Security::                    Decrypt and Verify.
4427 * Mailing List::                Mailing list minor mode.
4428 @end menu
4429
4430
4431 @node Summary Buffer Format
4432 @section Summary Buffer Format
4433 @cindex summary buffer format
4434
4435 @iftex
4436 @iflatex
4437 \gnusfigure{The Summary Buffer}{180}{
4438 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4439 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4440 }
4441 @end iflatex
4442 @end iftex
4443
4444 @menu
4445 * Summary Buffer Lines::        You can specify how summary lines should look.
4446 * To From Newsgroups::          How to not display your own name.
4447 * Summary Buffer Mode Line::    You can say how the mode line should look.
4448 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4449 @end menu
4450
4451 @findex mail-extract-address-components
4452 @findex gnus-extract-address-components
4453 @vindex gnus-extract-address-components
4454 Gnus will use the value of the @code{gnus-extract-address-components}
4455 variable as a function for getting the name and address parts of a
4456 @code{From} header.  Three pre-defined functions exist:
4457 @code{gnus-extract-address-components}, which is the default, quite
4458 fast, and too simplistic solution;
4459 @code{mail-extract-address-components}, which works nicely, but is
4460 slower; and @code{std11-extract-address-components}, which works very
4461 nicely, but is slower.  The default function will return the wrong
4462 answer in 5% of the cases.  If this is unacceptable to you, use the
4463 other function instead:
4464
4465 @lisp
4466 (setq gnus-extract-address-components
4467       'mail-extract-address-components)
4468 @end lisp
4469
4470 @vindex gnus-summary-same-subject
4471 @code{gnus-summary-same-subject} is a string indicating that the current
4472 article has the same subject as the previous.  This string will be used
4473 with those specs that require it.  The default is @code{""}.
4474
4475
4476 @node Summary Buffer Lines
4477 @subsection Summary Buffer Lines
4478
4479 @vindex gnus-summary-line-format
4480 You can change the format of the lines in the summary buffer by changing
4481 the @code{gnus-summary-line-format} variable.  It works along the same
4482 lines as a normal @code{format} string, with some extensions
4483 (@pxref{Formatting Variables}).
4484
4485 There should always be a colon or a point position marker on the line;
4486 the cursor always moves to the point position marker or the colon after
4487 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4488 possible to change this.  Just write a new function
4489 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4490 @xref{Positioning Point}.
4491
4492 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4493
4494 The following format specification characters and extended format
4495 specification(s) are understood:
4496
4497 @table @samp
4498 @item N
4499 Article number.
4500 @item S
4501 Subject string.  List identifiers stripped,
4502 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4503 @item s
4504 Subject if the article is the root of the thread or the previous article
4505 had a different subject, @code{gnus-summary-same-subject} otherwise.
4506 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4507 @item F
4508 Full @code{From} header.
4509 @item n
4510 The name (from the @code{From} header).
4511 @item f
4512 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4513 From Newsgroups}).
4514 @item a
4515 The name (from the @code{From} header).  This differs from the @code{n}
4516 spec in that it uses the function designated by the
4517 @code{gnus-extract-address-components} variable, which is slower, but
4518 may be more thorough.
4519 @item A
4520 The address (from the @code{From} header).  This works the same way as
4521 the @code{a} spec.
4522 @item L
4523 Number of lines in the article.
4524 @item c
4525 Number of characters in the article.  This specifier is not supported
4526 in some methods (like nnfolder).
4527 @item k
4528 Pretty-printed version of the number of characters in the article;
4529 for example, @samp{1.2k} or @samp{0.4M}.
4530 @item I
4531 Indentation based on thread level (@pxref{Customizing Threading}).
4532 @item B
4533 A complex trn-style thread tree, showing response-connecting trace
4534 lines.  A thread could be drawn like this:
4535
4536 @example
4537 >
4538 +->
4539 | +->
4540 | | \->
4541 | |   \->
4542 | \->
4543 +->
4544 \->
4545 @end example
4546
4547 You can customize the appearance with the following options.  Note
4548 that it is possible to make the thread display look really neat by
4549 replacing the default @acronym{ASCII} characters with graphic
4550 line-drawing glyphs.
4551 @table @code
4552 @item gnus-sum-thread-tree-root
4553 @vindex gnus-sum-thread-tree-root
4554 Used for the root of a thread.  If @code{nil}, use subject
4555 instead.  The default is @samp{> }.
4556
4557 @item gnus-sum-thread-tree-false-root
4558 @vindex gnus-sum-thread-tree-false-root
4559 Used for the false root of a thread (@pxref{Loose Threads}).  If
4560 @code{nil}, use subject instead.  The default is @samp{> }.
4561
4562 @item gnus-sum-thread-tree-single-indent
4563 @vindex gnus-sum-thread-tree-single-indent
4564 Used for a thread with just one message.  If @code{nil}, use subject
4565 instead.  The default is @samp{}.
4566
4567 @item gnus-sum-thread-tree-vertical
4568 @vindex gnus-sum-thread-tree-vertical
4569 Used for drawing a vertical line.  The default is @samp{| }.
4570
4571 @item gnus-sum-thread-tree-indent
4572 @vindex gnus-sum-thread-tree-indent
4573 Used for indenting.  The default is @samp{  }.
4574
4575 @item gnus-sum-thread-tree-leaf-with-other
4576 @vindex gnus-sum-thread-tree-leaf-with-other
4577 Used for a leaf with brothers.  The default is @samp{+-> }.
4578
4579 @item gnus-sum-thread-tree-single-leaf
4580 @vindex gnus-sum-thread-tree-single-leaf
4581 Used for a leaf without brothers.  The default is @samp{\-> }
4582
4583 @end table
4584
4585 @item T
4586 Nothing if the article is a root and lots of spaces if it isn't (it
4587 pushes everything after it off the screen).
4588 @item [
4589 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4590 for adopted articles (@pxref{Customizing Threading}).
4591 @item ]
4592 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4593 for adopted articles.
4594 @item >
4595 One space for each thread level.
4596 @item <
4597 Twenty minus thread level spaces.
4598 @item U
4599 Unread.  @xref{Read Articles}.
4600
4601 @item R
4602 This misleadingly named specifier is the @dfn{secondary mark}.  This
4603 mark will say whether the article has been replied to, has been cached,
4604 or has been saved.  @xref{Other Marks}.
4605
4606 @item i
4607 Score as a number (@pxref{Scoring}).
4608 @item z
4609 @vindex gnus-summary-zcore-fuzz
4610 Zcore, @samp{+} if above the default level and @samp{-} if below the
4611 default level.  If the difference between
4612 @code{gnus-summary-default-score} and the score is less than
4613 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4614 @item V
4615 Total thread score.
4616 @item x
4617 @code{Xref}.
4618 @item D
4619 @code{Date}.
4620 @item d
4621 The @code{Date} in @code{DD-MMM} format.
4622 @item o
4623 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4624 @item M
4625 @code{Message-ID}.
4626 @item r
4627 @code{References}.
4628 @item t
4629 Number of articles in the current sub-thread.  Using this spec will slow
4630 down summary buffer generation somewhat.
4631 @item e
4632 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4633 article has any children.
4634 @item P
4635 The line number.
4636 @item O
4637 Download mark.
4638 @item &user-date;
4639 Age sensitive date format.  Various date format is defined in
4640 @code{gnus-user-date-format-alist}.
4641 @item u
4642 User defined specifier.  The next character in the format string should
4643 be a letter.  Gnus will call the function
4644 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4645 following @samp{%u}.  The function will be passed the current header as
4646 argument.  The function should return a string, which will be inserted
4647 into the summary just like information from any other summary specifier.
4648 @end table
4649
4650 Text between @samp{%(} and @samp{%)} will be highlighted with
4651 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4652 There can only be one such area.
4653
4654 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4655 have to be handled with care.  For reasons of efficiency, gnus will
4656 compute what column these characters will end up in, and ``hard-code''
4657 that.  This means that it is invalid to have these specs after a
4658 variable-length spec.  Well, you might not be arrested, but your summary
4659 buffer will look strange, which is bad enough.
4660
4661 The smart choice is to have these specs as far to the left as possible.
4662 (Isn't that the case with everything, though?  But I digress.)
4663
4664 This restriction may disappear in later versions of gnus.
4665
4666
4667 @node To From Newsgroups
4668 @subsection To From Newsgroups
4669 @cindex To
4670 @cindex Newsgroups
4671
4672 In some groups (particularly in archive groups), the @code{From} header
4673 isn't very interesting, since all the articles there are written by
4674 you.  To display the information in the @code{To} or @code{Newsgroups}
4675 headers instead, you need to decide three things: What information to
4676 gather; where to display it; and when to display it.
4677
4678 @enumerate
4679 @item
4680 @vindex gnus-extra-headers
4681 The reading of extra header information is controlled by the
4682 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4683 instance:
4684
4685 @lisp
4686 (setq gnus-extra-headers
4687       '(To Newsgroups X-Newsreader))
4688 @end lisp
4689
4690 This will result in Gnus trying to obtain these three headers, and
4691 storing it in header structures for later easy retrieval.
4692
4693 @item
4694 @findex gnus-extra-header
4695 The value of these extra headers can be accessed via the
4696 @code{gnus-extra-header} function.  Here's a format line spec that will
4697 access the @code{X-Newsreader} header:
4698
4699 @example
4700 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4701 @end example
4702
4703 @item
4704 @vindex gnus-ignored-from-addresses
4705 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4706 summary line spec returns the @code{To}, @code{Newsreader} or
4707 @code{From} header.  If this regexp matches the contents of the
4708 @code{From} header, the value of the @code{To} or @code{Newsreader}
4709 headers are used instead.
4710
4711 @end enumerate
4712
4713 @vindex nnmail-extra-headers
4714 A related variable is @code{nnmail-extra-headers}, which controls when
4715 to include extra headers when generating overview (@acronym{NOV}) files.
4716 If you have old overview files, you should regenerate them after
4717 changing this variable, by entering the server buffer using @kbd{^},
4718 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4719 regeneration.
4720
4721 @vindex gnus-summary-line-format
4722 You also have to instruct Gnus to display the data by changing the
4723 @code{%n} spec to the @code{%f} spec in the
4724 @code{gnus-summary-line-format} variable.
4725
4726 In summary, you'd typically put something like the following in
4727 @file{~/.gnus.el}:
4728
4729 @lisp
4730 (setq gnus-extra-headers
4731       '(To Newsgroups))
4732 (setq nnmail-extra-headers gnus-extra-headers)
4733 (setq gnus-summary-line-format
4734       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4735 (setq gnus-ignored-from-addresses
4736       "Your Name Here")
4737 @end lisp
4738
4739 (The values listed above are the default values in Gnus.  Alter them
4740 to fit your needs.)
4741
4742 A note for news server administrators, or for users who wish to try to
4743 convince their news server administrator to provide some additional
4744 support:
4745
4746 The above is mostly useful for mail groups, where you have control over
4747 the @acronym{NOV} files that are created.  However, if you can persuade your
4748 nntp admin to add (in the usual implementation, notably INN):
4749
4750 @example
4751 Newsgroups:full
4752 @end example
4753
4754 to the end of her @file{overview.fmt} file, then you can use that just
4755 as you would the extra headers from the mail groups.
4756
4757
4758 @node Summary Buffer Mode Line
4759 @subsection Summary Buffer Mode Line
4760
4761 @vindex gnus-summary-mode-line-format
4762 You can also change the format of the summary mode bar (@pxref{Mode Line
4763 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4764 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4765
4766 Here are the elements you can play with:
4767
4768 @table @samp
4769 @item G
4770 Group name.
4771 @item p
4772 Unprefixed group name.
4773 @item A
4774 Current article number.
4775 @item z
4776 Current article score.
4777 @item V
4778 Gnus version.
4779 @item U
4780 Number of unread articles in this group.
4781 @item e
4782 Number of unread articles in this group that aren't displayed in the
4783 summary buffer.
4784 @item Z
4785 A string with the number of unread and unselected articles represented
4786 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4787 articles, and just as @samp{<%U more>} if there are just unread articles
4788 and no unselected ones.
4789 @item g
4790 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4791 shortened to @samp{r.a.anime}.
4792 @item S
4793 Subject of the current article.
4794 @item u
4795 User-defined spec (@pxref{User-Defined Specs}).
4796 @item s
4797 Name of the current score file (@pxref{Scoring}).
4798 @item d
4799 Number of dormant articles (@pxref{Unread Articles}).
4800 @item t
4801 Number of ticked articles (@pxref{Unread Articles}).
4802 @item r
4803 Number of articles that have been marked as read in this session.
4804 @item E
4805 Number of articles expunged by the score files.
4806 @end table
4807
4808
4809 @node Summary Highlighting
4810 @subsection Summary Highlighting
4811
4812 @table @code
4813
4814 @item gnus-visual-mark-article-hook
4815 @vindex gnus-visual-mark-article-hook
4816 This hook is run after selecting an article.  It is meant to be used for
4817 highlighting the article in some way.  It is not run if
4818 @code{gnus-visual} is @code{nil}.
4819
4820 @item gnus-summary-update-hook
4821 @vindex gnus-summary-update-hook
4822 This hook is called when a summary line is changed.  It is not run if
4823 @code{gnus-visual} is @code{nil}.
4824
4825 @item gnus-summary-selected-face
4826 @vindex gnus-summary-selected-face
4827 This is the face (or @dfn{font} as some people call it) used to
4828 highlight the current article in the summary buffer.
4829
4830 @item gnus-summary-highlight
4831 @vindex gnus-summary-highlight
4832 Summary lines are highlighted according to this variable, which is a
4833 list where the elements are of the format @code{(@var{form}
4834 . @var{face})}.  If you would, for instance, like ticked articles to be
4835 italic and high-scored articles to be bold, you could set this variable
4836 to something like
4837 @lisp
4838 (((eq mark gnus-ticked-mark) . italic)
4839  ((> score default) . bold))
4840 @end lisp
4841 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4842 @var{face} will be applied to the line.
4843 @end table
4844
4845
4846 @node Summary Maneuvering
4847 @section Summary Maneuvering
4848 @cindex summary movement
4849
4850 All the straight movement commands understand the numeric prefix and
4851 behave pretty much as you'd expect.
4852
4853 None of these commands select articles.
4854
4855 @table @kbd
4856 @item G M-n
4857 @itemx M-n
4858 @kindex M-n (Summary)
4859 @kindex G M-n (Summary)
4860 @findex gnus-summary-next-unread-subject
4861 Go to the next summary line of an unread article
4862 (@code{gnus-summary-next-unread-subject}).
4863
4864 @item G M-p
4865 @itemx M-p
4866 @kindex M-p (Summary)
4867 @kindex G M-p (Summary)
4868 @findex gnus-summary-prev-unread-subject
4869 Go to the previous summary line of an unread article
4870 (@code{gnus-summary-prev-unread-subject}).
4871
4872 @item G g
4873 @kindex G g (Summary)
4874 @findex gnus-summary-goto-subject
4875 Ask for an article number and then go to the summary line of that article
4876 without displaying the article (@code{gnus-summary-goto-subject}).
4877 @end table
4878
4879 If gnus asks you to press a key to confirm going to the next group, you
4880 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4881 buffer, searching for the next group to read without actually returning
4882 to the group buffer.
4883
4884 Variables related to summary movement:
4885
4886 @table @code
4887
4888 @vindex gnus-auto-select-next
4889 @item gnus-auto-select-next
4890 If you issue one of the movement commands (like @kbd{n}) and there are
4891 no more unread articles after the current one, gnus will offer to go to
4892 the next group.  If this variable is @code{t} and the next group is
4893 empty, gnus will exit summary mode and return to the group buffer.  If
4894 this variable is neither @code{t} nor @code{nil}, gnus will select the
4895 next group with unread articles.  As a special case, if this variable
4896 is @code{quietly}, Gnus will select the next group without asking for
4897 confirmation.  If this variable is @code{almost-quietly}, the same
4898 will happen only if you are located on the last article in the group.
4899 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4900 command will go to the next group without confirmation.  Also
4901 @pxref{Group Levels}.
4902
4903 @item gnus-auto-select-same
4904 @vindex gnus-auto-select-same
4905 If non-@code{nil}, all the movement commands will try to go to the next
4906 article with the same subject as the current.  (@dfn{Same} here might
4907 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4908 for details (@pxref{Customizing Threading}).)  If there are no more
4909 articles with the same subject, go to the first unread article.
4910
4911 This variable is not particularly useful if you use a threaded display.
4912
4913 @item gnus-summary-check-current
4914 @vindex gnus-summary-check-current
4915 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4916 to the next (or previous) article if the current article is unread.
4917 Instead, they will choose the current article.
4918
4919 @item gnus-auto-center-summary
4920 @vindex gnus-auto-center-summary
4921 If non-@code{nil}, gnus will keep the point in the summary buffer
4922 centered at all times.  This makes things quite tidy, but if you have a
4923 slow network connection, or simply do not like this un-Emacsism, you can
4924 set this variable to @code{nil} to get the normal Emacs scrolling
4925 action.  This will also inhibit horizontal re-centering of the summary
4926 buffer, which might make it more inconvenient to read extremely long
4927 threads.
4928
4929 This variable can also be a number.  In that case, center the window at
4930 the given number of lines from the top.
4931
4932 @end table
4933
4934
4935 @node Choosing Articles
4936 @section Choosing Articles
4937 @cindex selecting articles
4938
4939 @menu
4940 * Choosing Commands::           Commands for choosing articles.
4941 * Choosing Variables::          Variables that influence these commands.
4942 @end menu
4943
4944
4945 @node Choosing Commands
4946 @subsection Choosing Commands
4947
4948 None of the following movement commands understand the numeric prefix,
4949 and they all select and display an article.
4950
4951 If you want to fetch new articles or redisplay the group, see
4952 @ref{Exiting the Summary Buffer}.
4953
4954 @table @kbd
4955 @item SPACE
4956 @kindex SPACE (Summary)
4957 @findex gnus-summary-next-page
4958 Select the current article, or, if that one's read already, the next
4959 unread article (@code{gnus-summary-next-page}).
4960
4961 If you have an article window open already and you press @kbd{SPACE}
4962 again, the article will be scrolled.  This lets you conveniently
4963 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
4964
4965 @item G n
4966 @itemx n
4967 @kindex n (Summary)
4968 @kindex G n (Summary)
4969 @findex gnus-summary-next-unread-article
4970 @c @icon{gnus-summary-next-unread}
4971 Go to next unread article (@code{gnus-summary-next-unread-article}).
4972
4973 @item G p
4974 @itemx p
4975 @kindex p (Summary)
4976 @findex gnus-summary-prev-unread-article
4977 @c @icon{gnus-summary-prev-unread}
4978 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4979
4980 @item G N
4981 @itemx N
4982 @kindex N (Summary)
4983 @kindex G N (Summary)
4984 @findex gnus-summary-next-article
4985 Go to the next article (@code{gnus-summary-next-article}).
4986
4987 @item G P
4988 @itemx P
4989 @kindex P (Summary)
4990 @kindex G P (Summary)
4991 @findex gnus-summary-prev-article
4992 Go to the previous article (@code{gnus-summary-prev-article}).
4993
4994 @item G C-n
4995 @kindex G C-n (Summary)
4996 @findex gnus-summary-next-same-subject
4997 Go to the next article with the same subject
4998 (@code{gnus-summary-next-same-subject}).
4999
5000 @item G C-p
5001 @kindex G C-p (Summary)
5002 @findex gnus-summary-prev-same-subject
5003 Go to the previous article with the same subject
5004 (@code{gnus-summary-prev-same-subject}).
5005
5006 @item G f
5007 @itemx .
5008 @kindex G f  (Summary)
5009 @kindex .  (Summary)
5010 @findex gnus-summary-first-unread-article
5011 Go to the first unread article
5012 (@code{gnus-summary-first-unread-article}).
5013
5014 @item G b
5015 @itemx ,
5016 @kindex G b (Summary)
5017 @kindex , (Summary)
5018 @findex gnus-summary-best-unread-article
5019 Go to the unread article with the highest score
5020 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5021 go to the first unread article that has a score over the default score.
5022
5023 @item G l
5024 @itemx l
5025 @kindex l (Summary)
5026 @kindex G l (Summary)
5027 @findex gnus-summary-goto-last-article
5028 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5029
5030 @item G o
5031 @kindex G o (Summary)
5032 @findex gnus-summary-pop-article
5033 @cindex history
5034 @cindex article history
5035 Pop an article off the summary history and go to this article
5036 (@code{gnus-summary-pop-article}).  This command differs from the
5037 command above in that you can pop as many previous articles off the
5038 history as you like, while @kbd{l} toggles the two last read articles.
5039 For a somewhat related issue (if you use these commands a lot),
5040 @pxref{Article Backlog}.
5041
5042 @item G j
5043 @itemx j
5044 @kindex j (Summary)
5045 @kindex G j (Summary)
5046 @findex gnus-summary-goto-article
5047 Ask for an article number or @code{Message-ID}, and then go to that
5048 article (@code{gnus-summary-goto-article}).
5049
5050 @end table
5051
5052
5053 @node Choosing Variables
5054 @subsection Choosing Variables
5055
5056 Some variables relevant for moving and selecting articles:
5057
5058 @table @code
5059 @item gnus-auto-extend-newsgroup
5060 @vindex gnus-auto-extend-newsgroup
5061 All the movement commands will try to go to the previous (or next)
5062 article, even if that article isn't displayed in the Summary buffer if
5063 this variable is non-@code{nil}.  Gnus will then fetch the article from
5064 the server and display it in the article buffer.
5065
5066 @item gnus-select-article-hook
5067 @vindex gnus-select-article-hook
5068 This hook is called whenever an article is selected.  By default it
5069 exposes any threads hidden under the selected article.  If you would
5070 like each article to be saved in the Agent as you read it, putting
5071 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5072
5073 @item gnus-mark-article-hook
5074 @vindex gnus-mark-article-hook
5075 @findex gnus-summary-mark-unread-as-read
5076 @findex gnus-summary-mark-read-and-unread-as-read
5077 @findex gnus-unread-mark
5078 This hook is called whenever an article is selected.  It is intended to
5079 be used for marking articles as read.  The default value is
5080 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5081 mark of almost any article you read to @code{gnus-unread-mark}.  The
5082 only articles not affected by this function are ticked, dormant, and
5083 expirable articles.  If you'd instead like to just have unread articles
5084 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5085 instead.  It will leave marks like @code{gnus-low-score-mark},
5086 @code{gnus-del-mark} (and so on) alone.
5087
5088 @end table
5089
5090
5091 @node Paging the Article
5092 @section Scrolling the Article
5093 @cindex article scrolling
5094
5095 @table @kbd
5096
5097 @item SPACE
5098 @kindex SPACE (Summary)
5099 @findex gnus-summary-next-page
5100 Pressing @kbd{SPACE} will scroll the current article forward one page,
5101 or, if you have come to the end of the current article, will choose the
5102 next article (@code{gnus-summary-next-page}).
5103
5104 @vindex gnus-article-boring-faces
5105 @vindex gnus-article-skip-boring
5106 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5107 the article consists only of citations and signature, then it will be
5108 skipped; the next article will be shown instead.  You can customize
5109 what is considered uninteresting with
5110 @code{gnus-article-boring-faces}.  You can manually view the article's
5111 pages, no matter how boring, using @kbd{C-M-v}.
5112
5113 @item DEL
5114 @kindex DEL (Summary)
5115 @findex gnus-summary-prev-page
5116 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5117
5118 @item RET
5119 @kindex RET (Summary)
5120 @findex gnus-summary-scroll-up
5121 Scroll the current article one line forward
5122 (@code{gnus-summary-scroll-up}).
5123
5124 @item M-RET
5125 @kindex M-RET (Summary)
5126 @findex gnus-summary-scroll-down
5127 Scroll the current article one line backward
5128 (@code{gnus-summary-scroll-down}).
5129
5130 @item A g
5131 @itemx g
5132 @kindex A g (Summary)
5133 @kindex g (Summary)
5134 @findex gnus-summary-show-article
5135 @vindex gnus-summary-show-article-charset-alist
5136 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5137 given a prefix, fetch the current article, but don't run any of the
5138 article treatment functions.  This will give you a ``raw'' article, just
5139 the way it came from the server.
5140
5141 If given a numerical prefix, you can do semi-manual charset stuff.
5142 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5143 encoded in the @code{cn-gb-2312} charset.  If you have
5144
5145 @lisp
5146 (setq gnus-summary-show-article-charset-alist
5147       '((1 . cn-gb-2312)
5148         (2 . big5)))
5149 @end lisp
5150
5151 then you can say @kbd{C-u 1 g} to get the same effect.
5152
5153 @item A <
5154 @itemx <
5155 @kindex < (Summary)
5156 @kindex A < (Summary)
5157 @findex gnus-summary-beginning-of-article
5158 Scroll to the beginning of the article
5159 (@code{gnus-summary-beginning-of-article}).
5160
5161 @item A >
5162 @itemx >
5163 @kindex > (Summary)
5164 @kindex A > (Summary)
5165 @findex gnus-summary-end-of-article
5166 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5167
5168 @item A s
5169 @itemx s
5170 @kindex A s (Summary)
5171 @kindex s (Summary)
5172 @findex gnus-summary-isearch-article
5173 Perform an isearch in the article buffer
5174 (@code{gnus-summary-isearch-article}).
5175
5176 @item h
5177 @kindex h (Summary)
5178 @findex gnus-summary-select-article-buffer
5179 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5180
5181 @end table
5182
5183
5184 @node Reply Followup and Post
5185 @section Reply, Followup and Post
5186
5187 @menu
5188 * Summary Mail Commands::       Sending mail.
5189 * Summary Post Commands::       Sending news.
5190 * Summary Message Commands::    Other Message-related commands.
5191 * Canceling and Superseding::
5192 @end menu
5193
5194
5195 @node Summary Mail Commands
5196 @subsection Summary Mail Commands
5197 @cindex mail
5198 @cindex composing mail
5199
5200 Commands for composing a mail message:
5201
5202 @table @kbd
5203
5204 @item S r
5205 @itemx r
5206 @kindex S r (Summary)
5207 @kindex r (Summary)
5208 @findex gnus-summary-reply
5209 @c @icon{gnus-summary-mail-reply}
5210 @c @icon{gnus-summary-reply}
5211 Mail a reply to the author of the current article
5212 (@code{gnus-summary-reply}).
5213
5214 @item S R
5215 @itemx R
5216 @kindex R (Summary)
5217 @kindex S R (Summary)
5218 @findex gnus-summary-reply-with-original
5219 @c @icon{gnus-summary-reply-with-original}
5220 Mail a reply to the author of the current article and include the
5221 original message (@code{gnus-summary-reply-with-original}).  This
5222 command uses the process/prefix convention.
5223
5224 @item S w
5225 @kindex S w (Summary)
5226 @findex gnus-summary-wide-reply
5227 Mail a wide reply to the author of the current article
5228 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5229 goes out to all people listed in the @code{To}, @code{From} (or
5230 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5231 present, that's used instead.
5232
5233 @item S W
5234 @kindex S W (Summary)
5235 @findex gnus-summary-wide-reply-with-original
5236 Mail a wide reply to the current article and include the original
5237 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5238 the process/prefix convention.
5239
5240 @item S v
5241 @kindex S v (Summary)
5242 @findex gnus-summary-very-wide-reply
5243 Mail a very wide reply to the author of the current article
5244 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5245 that goes out to all people listed in the @code{To}, @code{From} (or
5246 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5247 articles.  This command uses the process/prefix convention.
5248
5249 @item S V
5250 @kindex S V (Summary)
5251 @findex gnus-summary-very-wide-reply-with-original
5252 Mail a very wide reply to the author of the current article and include the
5253 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5254 command uses the process/prefix convention.
5255
5256 @item S B r
5257 @kindex S B r (Summary)
5258 @findex gnus-summary-reply-broken-reply-to
5259 Mail a reply to the author of the current article but ignore the
5260 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5261 If you need this because a mailing list incorrectly sets a
5262 @code{Reply-To} header pointing to the list, you probably want to set
5263 the @code{broken-reply-to} group parameter instead, so things will work
5264 correctly.  @xref{Group Parameters}.
5265
5266 @item S B R
5267 @kindex S B R (Summary)
5268 @findex gnus-summary-reply-broken-reply-to-with-original
5269 Mail a reply to the author of the current article and include the
5270 original message but ignore the @code{Reply-To} field
5271 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5272
5273 @item S o m
5274 @itemx C-c C-f
5275 @kindex S o m (Summary)
5276 @kindex C-c C-f (Summary)
5277 @findex gnus-summary-mail-forward
5278 @c @icon{gnus-summary-mail-forward}
5279 Forward the current article to some other person
5280 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5281 headers of the forwarded article.
5282
5283 @item S m
5284 @itemx m
5285 @kindex m (Summary)
5286 @kindex S m (Summary)
5287 @findex gnus-summary-mail-other-window
5288 @c @icon{gnus-summary-mail-originate}
5289 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5290 the posting style of the current group.  If given a prefix, disable that.
5291 If the prefix is 1, prompt for a group name to find the posting style.
5292
5293 @item S i
5294 @itemx i
5295 @kindex i (Summary)
5296 @kindex S i (Summary)
5297 @findex gnus-summary-news-other-window
5298 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5299 post to the current group.  If given a prefix, disable that.  If the
5300 prefix is 1, prompt for a group to post to.
5301
5302 This function actually prepares a news even when using mail groups.
5303 This is useful for ``posting'' messages to mail groups without actually
5304 sending them over the network: they're just saved directly to the group
5305 in question.  The corresponding back end must have a request-post method
5306 for this to work though.
5307
5308 @item S D b
5309 @kindex S D b (Summary)
5310 @findex gnus-summary-resend-bounced-mail
5311 @cindex bouncing mail
5312 If you have sent a mail, but the mail was bounced back to you for some
5313 reason (wrong address, transient failure), you can use this command to
5314 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5315 will be popped into a mail buffer where you can edit the headers before
5316 sending the mail off again.  If you give a prefix to this command, and
5317 the bounced mail is a reply to some other mail, gnus will try to fetch
5318 that mail and display it for easy perusal of its headers.  This might
5319 very well fail, though.
5320
5321 @item S D r
5322 @kindex S D r (Summary)
5323 @findex gnus-summary-resend-message
5324 Not to be confused with the previous command,
5325 @code{gnus-summary-resend-message} will prompt you for an address to
5326 send the current message off to, and then send it to that place.  The
5327 headers of the message won't be altered---but lots of headers that say
5328 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5329 means that you actually send a mail to someone that has a @code{To}
5330 header that (probably) points to yourself.  This will confuse people.
5331 So, natcherly you'll only do that if you're really eVIl.
5332
5333 This command is mainly used if you have several accounts and want to
5334 ship a mail to a different account of yours.  (If you're both
5335 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5336 to the @code{root} account, you may want to resend it to
5337 @code{postmaster}.  Ordnung muss sein!
5338
5339 This command understands the process/prefix convention
5340 (@pxref{Process/Prefix}).
5341
5342 @item S O m
5343 @kindex S O m (Summary)
5344 @findex gnus-summary-digest-mail-forward
5345 Digest the current series (@pxref{Decoding Articles}) and forward the
5346 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5347 command uses the process/prefix convention (@pxref{Process/Prefix}).
5348
5349 @item S M-c
5350 @kindex S M-c (Summary)
5351 @findex gnus-summary-mail-crosspost-complaint
5352 @cindex crossposting
5353 @cindex excessive crossposting
5354 Send a complaint about excessive crossposting to the author of the
5355 current article (@code{gnus-summary-mail-crosspost-complaint}).
5356
5357 @findex gnus-crosspost-complaint
5358 This command is provided as a way to fight back against the current
5359 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5360 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5361 command understands the process/prefix convention
5362 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5363
5364 @end table
5365
5366 Also @xref{Header Commands, ,Header Commands, message, The Message
5367 Manual}, for more information.
5368
5369
5370 @node Summary Post Commands
5371 @subsection Summary Post Commands
5372 @cindex post
5373 @cindex composing news
5374
5375 Commands for posting a news article:
5376
5377 @table @kbd
5378 @item S p
5379 @itemx a
5380 @kindex a (Summary)
5381 @kindex S p (Summary)
5382 @findex gnus-summary-post-news
5383 @c @icon{gnus-summary-post-news}
5384 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5385 default, post to the current group.  If given a prefix, disable that.
5386 If the prefix is 1, prompt for another group instead.
5387
5388 @item S f
5389 @itemx f
5390 @kindex f (Summary)
5391 @kindex S f (Summary)
5392 @findex gnus-summary-followup
5393 @c @icon{gnus-summary-followup}
5394 Post a followup to the current article (@code{gnus-summary-followup}).
5395
5396 @item S F
5397 @itemx F
5398 @kindex S F (Summary)
5399 @kindex F (Summary)
5400 @c @icon{gnus-summary-followup-with-original}
5401 @findex gnus-summary-followup-with-original
5402 Post a followup to the current article and include the original message
5403 (@code{gnus-summary-followup-with-original}).  This command uses the
5404 process/prefix convention.
5405
5406 @item S n
5407 @kindex S n (Summary)
5408 @findex gnus-summary-followup-to-mail
5409 Post a followup to the current article via news, even if you got the
5410 message through mail (@code{gnus-summary-followup-to-mail}).
5411
5412 @item S N
5413 @kindex S N (Summary)
5414 @findex gnus-summary-followup-to-mail-with-original
5415 Post a followup to the current article via news, even if you got the
5416 message through mail and include the original message
5417 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5418 the process/prefix convention.
5419
5420 @item S o p
5421 @kindex S o p (Summary)
5422 @findex gnus-summary-post-forward
5423 Forward the current article to a newsgroup
5424 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5425 headers of the forwarded article.
5426
5427 @item S O p
5428 @kindex S O p (Summary)
5429 @findex gnus-summary-digest-post-forward
5430 @cindex digests
5431 @cindex making digests
5432 Digest the current series and forward the result to a newsgroup
5433 (@code{gnus-summary-digest-post-forward}).  This command uses the
5434 process/prefix convention.
5435
5436 @item S u
5437 @kindex S u (Summary)
5438 @findex gnus-uu-post-news
5439 @c @icon{gnus-uu-post-news}
5440 Uuencode a file, split it into parts, and post it as a series
5441 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5442 @end table
5443
5444 Also @xref{Header Commands, ,Header Commands, message, The Message
5445 Manual}, for more information.
5446
5447
5448 @node Summary Message Commands
5449 @subsection Summary Message Commands
5450
5451 @table @kbd
5452 @item S y
5453 @kindex S y (Summary)
5454 @findex gnus-summary-yank-message
5455 Yank the current article into an already existing Message composition
5456 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5457 what message buffer you want to yank into, and understands the
5458 process/prefix convention (@pxref{Process/Prefix}).
5459
5460 @end table
5461
5462
5463 @node Canceling and Superseding
5464 @subsection Canceling Articles
5465 @cindex canceling articles
5466 @cindex superseding articles
5467
5468 Have you ever written something, and then decided that you really,
5469 really, really wish you hadn't posted that?
5470
5471 Well, you can't cancel mail, but you can cancel posts.
5472
5473 @findex gnus-summary-cancel-article
5474 @kindex C (Summary)
5475 @c @icon{gnus-summary-cancel-article}
5476 Find the article you wish to cancel (you can only cancel your own
5477 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5478 c} (@code{gnus-summary-cancel-article}).  Your article will be
5479 canceled---machines all over the world will be deleting your article.
5480 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5481
5482 Be aware, however, that not all sites honor cancels, so your article may
5483 live on here and there, while most sites will delete the article in
5484 question.
5485
5486 Gnus will use the ``current'' select method when canceling.  If you
5487 want to use the standard posting method, use the @samp{a} symbolic
5488 prefix (@pxref{Symbolic Prefixes}).
5489
5490 If you discover that you have made some mistakes and want to do some
5491 corrections, you can post a @dfn{superseding} article that will replace
5492 your original article.
5493
5494 @findex gnus-summary-supersede-article
5495 @kindex S (Summary)
5496 Go to the original article and press @kbd{S s}
5497 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5498 where you can edit the article all you want before sending it off the
5499 usual way.
5500
5501 The same goes for superseding as for canceling, only more so: Some
5502 sites do not honor superseding.  On those sites, it will appear that you
5503 have posted almost the same article twice.
5504
5505 If you have just posted the article, and change your mind right away,
5506 there is a trick you can use to cancel/supersede the article without
5507 waiting for the article to appear on your site first.  You simply return
5508 to the post buffer (which is called @code{*sent ...*}).  There you will
5509 find the article you just posted, with all the headers intact.  Change
5510 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5511 header by substituting one of those words for the word
5512 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5513 you would do normally.  The previous article will be
5514 canceled/superseded.
5515
5516 Just remember, kids: There is no 'c' in 'supersede'.
5517
5518 @node Delayed Articles
5519 @section Delayed Articles
5520 @cindex delayed sending
5521 @cindex send delayed
5522
5523 Sometimes, you might wish to delay the sending of a message.  For
5524 example, you might wish to arrange for a message to turn up just in time
5525 to remind your about the birthday of your Significant Other.  For this,
5526 there is the @code{gnus-delay} package.  Setup is simple:
5527
5528 @lisp
5529 (gnus-delay-initialize)
5530 @end lisp
5531
5532 @findex gnus-delay-article
5533 Normally, to send a message you use the @kbd{C-c C-c} command from
5534 Message mode.  To delay a message, use @kbd{C-c C-j}
5535 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5536 message should be delayed.  Possible answers are:
5537
5538 @itemize @bullet
5539 @item
5540 A time span.  Consists of an integer and a letter.  For example,
5541 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5542 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5543 (months) and @code{Y} (years).
5544
5545 @item
5546 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5547 delayed until that day, at a specific time (eight o'clock by default).
5548 See also @code{gnus-delay-default-hour}.
5549
5550 @item
5551 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5552 stuff.  The deadline will be at that time today, except if that time has
5553 already passed, then it's at the given time tomorrow.  So if it's ten
5554 o'clock in the morning and you specify @code{11:15}, then the deadline
5555 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5556 that means a time tomorrow.
5557 @end itemize
5558
5559 The action of the @code{gnus-delay-article} command is influenced by a
5560 couple of variables:
5561
5562 @table @code
5563 @item gnus-delay-default-hour
5564 @vindex gnus-delay-default-hour
5565 When you specify a specific date, the message will be due on that hour
5566 on the given date.  Possible values are integers 0 through 23.
5567
5568 @item gnus-delay-default-delay
5569 @vindex gnus-delay-default-delay
5570 This is a string and gives the default delay.  It can be of any of the
5571 formats described above.
5572
5573 @item gnus-delay-group
5574 @vindex gnus-delay-group
5575 Delayed articles will be kept in this group on the drafts server until
5576 they are due.  You probably don't need to change this.  The default
5577 value is @code{"delayed"}.
5578
5579 @item gnus-delay-header
5580 @vindex gnus-delay-header
5581 The deadline for each article will be stored in a header.  This variable
5582 is a string and gives the header name.  You probably don't need to
5583 change this.  The default value is @code{"X-Gnus-Delayed"}.
5584 @end table
5585
5586 The way delaying works is like this: when you use the
5587 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5588 calculates the deadline of the message and stores it in the
5589 @code{X-Gnus-Delayed} header and puts the message in the
5590 @code{nndraft:delayed} group.
5591
5592 @findex gnus-delay-send-queue
5593 And whenever you get new news, Gnus looks through the group for articles
5594 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5595 function for this.  By default, this function is added to the hook
5596 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5597 Maybe you want to use the demon to send drafts?  Just tell the demon to
5598 execute the @code{gnus-delay-send-queue} function.
5599
5600 @table @code
5601 @item gnus-delay-initialize
5602 @findex gnus-delay-initialize
5603
5604 By default, this function installs @code{gnus-delay-send-queue} in
5605 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5606 argument @code{no-check}.  If it is non-@code{nil},
5607 @code{gnus-get-new-news-hook} is not changed.  The optional first
5608 argument is ignored.
5609
5610 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5611 Presumably, you want to use the demon for sending due delayed articles.
5612 Just don't forget to set that up :-)
5613 @end table
5614
5615
5616 @node Marking Articles
5617 @section Marking Articles
5618 @cindex article marking
5619 @cindex article ticking
5620 @cindex marks
5621
5622 There are several marks you can set on an article.
5623
5624 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5625 neologism ohoy!) of the article.  Alphabetic marks generally mean
5626 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5627
5628 In addition, you also have marks that do not affect readedness.
5629
5630 @menu
5631 * Unread Articles::             Marks for unread articles.
5632 * Read Articles::               Marks for read articles.
5633 * Other Marks::                 Marks that do not affect readedness.
5634 @end menu
5635
5636 @ifinfo
5637 There's a plethora of commands for manipulating these marks:
5638 @end ifinfo
5639
5640 @menu
5641 * Setting Marks::             How to set and remove marks.
5642 * Generic Marking Commands::  How to customize the marking.
5643 * Setting Process Marks::     How to mark articles for later processing.
5644 @end menu
5645
5646
5647 @node Unread Articles
5648 @subsection Unread Articles
5649
5650 The following marks mark articles as (kinda) unread, in one form or
5651 other.
5652
5653 @table @samp
5654 @item !
5655 @vindex gnus-ticked-mark
5656 Marked as ticked (@code{gnus-ticked-mark}).
5657
5658 @dfn{Ticked articles} are articles that will remain visible always.  If
5659 you see an article that you find interesting, or you want to put off
5660 reading it, or replying to it, until sometime later, you'd typically
5661 tick it.  However, articles can be expired (from news servers by the
5662 news server software, Gnus itself never expires ticked messages), so if
5663 you want to keep an article forever, you'll have to make it persistent
5664 (@pxref{Persistent Articles}).
5665
5666 @item ?
5667 @vindex gnus-dormant-mark
5668 Marked as dormant (@code{gnus-dormant-mark}).
5669
5670 @dfn{Dormant articles} will only appear in the summary buffer if there
5671 are followups to it.  If you want to see them even if they don't have
5672 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5673 Otherwise (except for the visibility issue), they are just like ticked
5674 messages.
5675
5676 @item SPACE
5677 @vindex gnus-unread-mark
5678 Marked as unread (@code{gnus-unread-mark}).
5679
5680 @dfn{Unread articles} are articles that haven't been read at all yet.
5681 @end table
5682
5683
5684 @node Read Articles
5685 @subsection Read Articles
5686 @cindex expirable mark
5687
5688 All the following marks mark articles as read.
5689
5690 @table @samp
5691
5692 @item r
5693 @vindex gnus-del-mark
5694 These are articles that the user has marked as read with the @kbd{d}
5695 command manually, more or less (@code{gnus-del-mark}).
5696
5697 @item R
5698 @vindex gnus-read-mark
5699 Articles that have actually been read (@code{gnus-read-mark}).
5700
5701 @item O
5702 @vindex gnus-ancient-mark
5703 Articles that were marked as read in previous sessions and are now
5704 @dfn{old} (@code{gnus-ancient-mark}).
5705
5706 @item K
5707 @vindex gnus-killed-mark
5708 Marked as killed (@code{gnus-killed-mark}).
5709
5710 @item X
5711 @vindex gnus-kill-file-mark
5712 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5713
5714 @item Y
5715 @vindex gnus-low-score-mark
5716 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5717
5718 @item C
5719 @vindex gnus-catchup-mark
5720 Marked as read by a catchup (@code{gnus-catchup-mark}).
5721
5722 @item G
5723 @vindex gnus-canceled-mark
5724 Canceled article (@code{gnus-canceled-mark})
5725
5726 @item F
5727 @vindex gnus-souped-mark
5728 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5729
5730 @item Q
5731 @vindex gnus-sparse-mark
5732 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5733 Threading}.
5734
5735 @item M
5736 @vindex gnus-duplicate-mark
5737 Article marked as read by duplicate suppression
5738 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5739
5740 @end table
5741
5742 All these marks just mean that the article is marked as read, really.
5743 They are interpreted differently when doing adaptive scoring, though.
5744
5745 One more special mark, though:
5746
5747 @table @samp
5748 @item E
5749 @vindex gnus-expirable-mark
5750 Marked as expirable (@code{gnus-expirable-mark}).
5751
5752 Marking articles as @dfn{expirable} (or have them marked as such
5753 automatically) doesn't make much sense in normal groups---a user doesn't
5754 control expiring of news articles, but in mail groups, for instance,
5755 articles marked as @dfn{expirable} can be deleted by gnus at
5756 any time.
5757 @end table
5758
5759
5760 @node Other Marks
5761 @subsection Other Marks
5762 @cindex process mark
5763 @cindex bookmarks
5764
5765 There are some marks that have nothing to do with whether the article is
5766 read or not.
5767
5768 @itemize @bullet
5769
5770 @item
5771 You can set a bookmark in the current article.  Say you are reading a
5772 long thesis on cats' urinary tracts, and have to go home for dinner
5773 before you've finished reading the thesis.  You can then set a bookmark
5774 in the article, and gnus will jump to this bookmark the next time it
5775 encounters the article.  @xref{Setting Marks}.
5776
5777 @item
5778 @vindex gnus-replied-mark
5779 All articles that you have replied to or made a followup to (i.e., have
5780 answered) will be marked with an @samp{A} in the second column
5781 (@code{gnus-replied-mark}).
5782
5783 @item
5784 @vindex gnus-forwarded-mark
5785 All articles that you have forwarded will be marked with an @samp{F} in
5786 the second column (@code{gnus-forwarded-mark}).
5787
5788 @item
5789 @vindex gnus-cached-mark
5790 Articles stored in the article cache will be marked with an @samp{*} in
5791 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5792
5793 @item
5794 @vindex gnus-saved-mark
5795 Articles ``saved'' (in some manner or other; not necessarily
5796 religiously) are marked with an @samp{S} in the second column
5797 (@code{gnus-saved-mark}).
5798
5799 @item
5800 @vindex gnus-recent-mark
5801 Articles that according to the server haven't been shown to the user
5802 before are marked with a @samp{N} in the second column
5803 (@code{gnus-recent-mark}).  Note that not all servers support this
5804 mark, in which case it simply never appears.  Compare with
5805 @code{gnus-unseen-mark}.
5806
5807 @item
5808 @vindex gnus-unseen-mark
5809 Articles that haven't been seen before in Gnus by the user are marked
5810 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5811 Compare with @code{gnus-recent-mark}.
5812
5813 @item
5814 @vindex gnus-downloaded-mark
5815 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5816 downloaded for unplugged (offline) viewing.  If you are using the
5817 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5818 (The variable @code{gnus-downloaded-mark} controls which character to
5819 use.)
5820
5821 @item
5822 @vindex gnus-undownloaded-mark
5823 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5824 not have been downloaded.  Such articles cannot be viewed while you
5825 are unplugged (offline).  If you are using the @samp{%O} spec, these
5826 articles get the @samp{-} mark in that spec.  (The variable
5827 @code{gnus-undownloaded-mark} controls which character to use.)
5828
5829 @item
5830 @vindex gnus-downloadable-mark
5831 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5832 automatically, but it is also possible to explicitly mark articles for
5833 download, even if they would not be downloaded automatically.  Such
5834 explicitly-marked articles get the @samp{%} mark in the first column.
5835 (The variable @code{gnus-downloadable-mark} controls which character to
5836 use.)
5837
5838 @item
5839 @vindex gnus-not-empty-thread-mark
5840 @vindex gnus-empty-thread-mark
5841 If the @samp{%e} spec is used, the presence of threads or not will be
5842 marked with @code{gnus-not-empty-thread-mark} and
5843 @code{gnus-empty-thread-mark} in the third column, respectively.
5844
5845 @item
5846 @vindex gnus-process-mark
5847 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5848 variety of commands react to the presence of the process mark.  For
5849 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5850 all articles that have been marked with the process mark.  Articles
5851 marked with the process mark have a @samp{#} in the second column.
5852
5853 @end itemize
5854
5855 You might have noticed that most of these ``non-readedness'' marks
5856 appear in the second column by default.  So if you have a cached, saved,
5857 replied article that you have process-marked, what will that look like?
5858
5859 Nothing much.  The precedence rules go as follows: process -> cache ->
5860 replied -> saved.  So if the article is in the cache and is replied,
5861 you'll only see the cache mark and not the replied mark.
5862
5863
5864 @node Setting Marks
5865 @subsection Setting Marks
5866 @cindex setting marks
5867
5868 All the marking commands understand the numeric prefix.
5869
5870 @table @kbd
5871 @item M c
5872 @itemx M-u
5873 @kindex M c (Summary)
5874 @kindex M-u (Summary)
5875 @findex gnus-summary-clear-mark-forward
5876 @cindex mark as unread
5877 Clear all readedness-marks from the current article
5878 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5879 article as unread.
5880
5881 @item M t
5882 @itemx !
5883 @kindex ! (Summary)
5884 @kindex M t (Summary)
5885 @findex gnus-summary-tick-article-forward
5886 Tick the current article (@code{gnus-summary-tick-article-forward}).
5887 @xref{Article Caching}.
5888
5889 @item M ?
5890 @itemx ?
5891 @kindex ? (Summary)
5892 @kindex M ? (Summary)
5893 @findex gnus-summary-mark-as-dormant
5894 Mark the current article as dormant
5895 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5896
5897 @item M d
5898 @itemx d
5899 @kindex M d (Summary)
5900 @kindex d (Summary)
5901 @findex gnus-summary-mark-as-read-forward
5902 Mark the current article as read
5903 (@code{gnus-summary-mark-as-read-forward}).
5904
5905 @item D
5906 @kindex D (Summary)
5907 @findex gnus-summary-mark-as-read-backward
5908 Mark the current article as read and move point to the previous line
5909 (@code{gnus-summary-mark-as-read-backward}).
5910
5911 @item M k
5912 @itemx k
5913 @kindex k (Summary)
5914 @kindex M k (Summary)
5915 @findex gnus-summary-kill-same-subject-and-select
5916 Mark all articles that have the same subject as the current one as read,
5917 and then select the next unread article
5918 (@code{gnus-summary-kill-same-subject-and-select}).
5919
5920 @item M K
5921 @itemx C-k
5922 @kindex M K (Summary)
5923 @kindex C-k (Summary)
5924 @findex gnus-summary-kill-same-subject
5925 Mark all articles that have the same subject as the current one as read
5926 (@code{gnus-summary-kill-same-subject}).
5927
5928 @item M C
5929 @kindex M C (Summary)
5930 @findex gnus-summary-catchup
5931 @c @icon{gnus-summary-catchup}
5932 Mark all unread articles as read (@code{gnus-summary-catchup}).
5933
5934 @item M C-c
5935 @kindex M C-c (Summary)
5936 @findex gnus-summary-catchup-all
5937 Mark all articles in the group as read---even the ticked and dormant
5938 articles (@code{gnus-summary-catchup-all}).
5939
5940 @item M H
5941 @kindex M H (Summary)
5942 @findex gnus-summary-catchup-to-here
5943 Catchup the current group to point (before the point)
5944 (@code{gnus-summary-catchup-to-here}).
5945
5946 @item M h
5947 @kindex M h (Summary)
5948 @findex gnus-summary-catchup-from-here
5949 Catchup the current group from point (after the point)
5950 (@code{gnus-summary-catchup-from-here}).
5951
5952 @item C-w
5953 @kindex C-w (Summary)
5954 @findex gnus-summary-mark-region-as-read
5955 Mark all articles between point and mark as read
5956 (@code{gnus-summary-mark-region-as-read}).
5957
5958 @item M V k
5959 @kindex M V k (Summary)
5960 @findex gnus-summary-kill-below
5961 Kill all articles with scores below the default score (or below the
5962 numeric prefix) (@code{gnus-summary-kill-below}).
5963
5964 @item M e
5965 @itemx E
5966 @kindex M e (Summary)
5967 @kindex E (Summary)
5968 @findex gnus-summary-mark-as-expirable
5969 Mark the current article as expirable
5970 (@code{gnus-summary-mark-as-expirable}).
5971
5972 @item M b
5973 @kindex M b (Summary)
5974 @findex gnus-summary-set-bookmark
5975 Set a bookmark in the current article
5976 (@code{gnus-summary-set-bookmark}).
5977
5978 @item M B
5979 @kindex M B (Summary)
5980 @findex gnus-summary-remove-bookmark
5981 Remove the bookmark from the current article
5982 (@code{gnus-summary-remove-bookmark}).
5983
5984 @item M V c
5985 @kindex M V c (Summary)
5986 @findex gnus-summary-clear-above
5987 Clear all marks from articles with scores over the default score (or
5988 over the numeric prefix) (@code{gnus-summary-clear-above}).
5989
5990 @item M V u
5991 @kindex M V u (Summary)
5992 @findex gnus-summary-tick-above
5993 Tick all articles with scores over the default score (or over the
5994 numeric prefix) (@code{gnus-summary-tick-above}).
5995
5996 @item M V m
5997 @kindex M V m (Summary)
5998 @findex gnus-summary-mark-above
5999 Prompt for a mark, and mark all articles with scores over the default
6000 score (or over the numeric prefix) with this mark
6001 (@code{gnus-summary-clear-above}).
6002 @end table
6003
6004 @vindex gnus-summary-goto-unread
6005 The @code{gnus-summary-goto-unread} variable controls what action should
6006 be taken after setting a mark.  If non-@code{nil}, point will move to
6007 the next/previous unread article.  If @code{nil}, point will just move
6008 one line up or down.  As a special case, if this variable is
6009 @code{never}, all the marking commands as well as other commands (like
6010 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6011 The default is @code{t}.
6012
6013
6014 @node Generic Marking Commands
6015 @subsection Generic Marking Commands
6016
6017 Some people would like the command that ticks an article (@kbd{!}) go to
6018 the next article.  Others would like it to go to the next unread
6019 article.  Yet others would like it to stay on the current article.  And
6020 even though I haven't heard of anybody wanting it to go to the
6021 previous (unread) article, I'm sure there are people that want that as
6022 well.
6023
6024 Multiply these five behaviors with five different marking commands, and
6025 you get a potentially complex set of variable to control what each
6026 command should do.
6027
6028 To sidestep that mess, Gnus provides commands that do all these
6029 different things.  They can be found on the @kbd{M M} map in the summary
6030 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6031 to list in this manual.
6032
6033 While you can use these commands directly, most users would prefer
6034 altering the summary mode keymap.  For instance, if you would like the
6035 @kbd{!} command to go to the next article instead of the next unread
6036 article, you could say something like:
6037
6038 @lisp
6039 @group
6040 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6041 (defun my-alter-summary-map ()
6042   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6043 @end group
6044 @end lisp
6045
6046 @noindent
6047 or
6048
6049 @lisp
6050 (defun my-alter-summary-map ()
6051   (local-set-key "!" "MM!n"))
6052 @end lisp
6053
6054
6055 @node Setting Process Marks
6056 @subsection Setting Process Marks
6057 @cindex setting process marks
6058
6059 Process marks are displayed as @code{#} in the summary buffer, and are
6060 used for marking articles in such a way that other commands will
6061 process these articles.  For instance, if you process mark four
6062 articles and then use the @kbd{*} command, Gnus will enter these four
6063 commands into the cache.  For more information,
6064 @pxref{Process/Prefix}.
6065
6066 @table @kbd
6067
6068 @item M P p
6069 @itemx #
6070 @kindex # (Summary)
6071 @kindex M P p (Summary)
6072 @findex gnus-summary-mark-as-processable
6073 Mark the current article with the process mark
6074 (@code{gnus-summary-mark-as-processable}).
6075 @findex gnus-summary-unmark-as-processable
6076
6077 @item M P u
6078 @itemx M-#
6079 @kindex M P u (Summary)
6080 @kindex M-# (Summary)
6081 Remove the process mark, if any, from the current article
6082 (@code{gnus-summary-unmark-as-processable}).
6083
6084 @item M P U
6085 @kindex M P U (Summary)
6086 @findex gnus-summary-unmark-all-processable
6087 Remove the process mark from all articles
6088 (@code{gnus-summary-unmark-all-processable}).
6089
6090 @item M P i
6091 @kindex M P i (Summary)
6092 @findex gnus-uu-invert-processable
6093 Invert the list of process marked articles
6094 (@code{gnus-uu-invert-processable}).
6095
6096 @item M P R
6097 @kindex M P R (Summary)
6098 @findex gnus-uu-mark-by-regexp
6099 Mark articles that have a @code{Subject} header that matches a regular
6100 expression (@code{gnus-uu-mark-by-regexp}).
6101
6102 @item M P G
6103 @kindex M P G (Summary)
6104 @findex gnus-uu-unmark-by-regexp
6105 Unmark articles that have a @code{Subject} header that matches a regular
6106 expression (@code{gnus-uu-unmark-by-regexp}).
6107
6108 @item M P r
6109 @kindex M P r (Summary)
6110 @findex gnus-uu-mark-region
6111 Mark articles in region (@code{gnus-uu-mark-region}).
6112
6113 @item M P g
6114 @kindex M P g
6115 @findex gnus-uu-unmark-region
6116 Unmark articles in region (@code{gnus-uu-unmark-region}).
6117
6118 @item M P t
6119 @kindex M P t (Summary)
6120 @findex gnus-uu-mark-thread
6121 Mark all articles in the current (sub)thread
6122 (@code{gnus-uu-mark-thread}).
6123
6124 @item M P T
6125 @kindex M P T (Summary)
6126 @findex gnus-uu-unmark-thread
6127 Unmark all articles in the current (sub)thread
6128 (@code{gnus-uu-unmark-thread}).
6129
6130 @item M P v
6131 @kindex M P v (Summary)
6132 @findex gnus-uu-mark-over
6133 Mark all articles that have a score above the prefix argument
6134 (@code{gnus-uu-mark-over}).
6135
6136 @item M P s
6137 @kindex M P s (Summary)
6138 @findex gnus-uu-mark-series
6139 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6140
6141 @item M P S
6142 @kindex M P S (Summary)
6143 @findex gnus-uu-mark-sparse
6144 Mark all series that have already had some articles marked
6145 (@code{gnus-uu-mark-sparse}).
6146
6147 @item M P a
6148 @kindex M P a (Summary)
6149 @findex gnus-uu-mark-all
6150 Mark all articles in series order (@code{gnus-uu-mark-series}).
6151
6152 @item M P b
6153 @kindex M P b (Summary)
6154 @findex gnus-uu-mark-buffer
6155 Mark all articles in the buffer in the order they appear
6156 (@code{gnus-uu-mark-buffer}).
6157
6158 @item M P k
6159 @kindex M P k (Summary)
6160 @findex gnus-summary-kill-process-mark
6161 Push the current process mark set onto the stack and unmark all articles
6162 (@code{gnus-summary-kill-process-mark}).
6163
6164 @item M P y
6165 @kindex M P y (Summary)
6166 @findex gnus-summary-yank-process-mark
6167 Pop the previous process mark set from the stack and restore it
6168 (@code{gnus-summary-yank-process-mark}).
6169
6170 @item M P w
6171 @kindex M P w (Summary)
6172 @findex gnus-summary-save-process-mark
6173 Push the current process mark set onto the stack
6174 (@code{gnus-summary-save-process-mark}).
6175
6176 @end table
6177
6178 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6179 set process marks based on article body contents.
6180
6181
6182 @node Limiting
6183 @section Limiting
6184 @cindex limiting
6185
6186 It can be convenient to limit the summary buffer to just show some
6187 subset of the articles currently in the group.  The effect most limit
6188 commands have is to remove a few (or many) articles from the summary
6189 buffer.
6190
6191 All limiting commands work on subsets of the articles already fetched
6192 from the servers.  None of these commands query the server for
6193 additional articles.
6194
6195 @table @kbd
6196
6197 @item / /
6198 @itemx / s
6199 @kindex / / (Summary)
6200 @findex gnus-summary-limit-to-subject
6201 Limit the summary buffer to articles that match some subject
6202 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6203 matching articles.
6204
6205 @item / a
6206 @kindex / a (Summary)
6207 @findex gnus-summary-limit-to-author
6208 Limit the summary buffer to articles that match some author
6209 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6210 matching articles.
6211
6212 @item / x
6213 @kindex / x (Summary)
6214 @findex gnus-summary-limit-to-extra
6215 Limit the summary buffer to articles that match one of the ``extra''
6216 headers (@pxref{To From Newsgroups})
6217 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6218 matching articles.
6219
6220 @item / u
6221 @itemx x
6222 @kindex / u (Summary)
6223 @kindex x (Summary)
6224 @findex gnus-summary-limit-to-unread
6225 Limit the summary buffer to articles not marked as read
6226 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6227 buffer to articles strictly unread.  This means that ticked and
6228 dormant articles will also be excluded.
6229
6230 @item / m
6231 @kindex / m (Summary)
6232 @findex gnus-summary-limit-to-marks
6233 Ask for a mark and then limit to all articles that have been marked
6234 with that mark (@code{gnus-summary-limit-to-marks}).
6235
6236 @item / t
6237 @kindex / t (Summary)
6238 @findex gnus-summary-limit-to-age
6239 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6240 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6241 articles younger than that number of days.
6242
6243 @item / n
6244 @kindex / n (Summary)
6245 @findex gnus-summary-limit-to-articles
6246 Limit the summary buffer to the current article
6247 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6248 convention (@pxref{Process/Prefix}).
6249
6250 @item / w
6251 @kindex / w (Summary)
6252 @findex gnus-summary-pop-limit
6253 Pop the previous limit off the stack and restore it
6254 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6255 the stack.
6256
6257 @item / .
6258 @kindex / . (Summary)
6259 @findex gnus-summary-limit-to-unseen
6260 Limit the summary buffer to the unseen articles
6261 (@code{gnus-summary-limit-to-unseen}).
6262
6263 @item / v
6264 @kindex / v (Summary)
6265 @findex gnus-summary-limit-to-score
6266 Limit the summary buffer to articles that have a score at or above some
6267 score (@code{gnus-summary-limit-to-score}).
6268
6269 @item / p
6270 @kindex / p (Summary)
6271 @findex gnus-summary-limit-to-display-predicate
6272 Limit the summary buffer to articles that satisfy the @code{display}
6273 group parameter predicate
6274 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6275 Parameters}, for more on this predicate.
6276
6277 @item / E
6278 @itemx M S
6279 @kindex M S (Summary)
6280 @kindex / E (Summary)
6281 @findex gnus-summary-limit-include-expunged
6282 Include all expunged articles in the limit
6283 (@code{gnus-summary-limit-include-expunged}).
6284
6285 @item / D
6286 @kindex / D (Summary)
6287 @findex gnus-summary-limit-include-dormant
6288 Include all dormant articles in the limit
6289 (@code{gnus-summary-limit-include-dormant}).
6290
6291 @item / *
6292 @kindex / * (Summary)
6293 @findex gnus-summary-limit-include-cached
6294 Include all cached articles in the limit
6295 (@code{gnus-summary-limit-include-cached}).
6296
6297 @item / d
6298 @kindex / d (Summary)
6299 @findex gnus-summary-limit-exclude-dormant
6300 Exclude all dormant articles from the limit
6301 (@code{gnus-summary-limit-exclude-dormant}).
6302
6303 @item / M
6304 @kindex / M (Summary)
6305 @findex gnus-summary-limit-exclude-marks
6306 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6307
6308 @item / T
6309 @kindex / T (Summary)
6310 @findex gnus-summary-limit-include-thread
6311 Include all the articles in the current thread in the limit.
6312
6313 @item / c
6314 @kindex / c (Summary)
6315 @findex gnus-summary-limit-exclude-childless-dormant
6316 Exclude all dormant articles that have no children from the limit@*
6317 (@code{gnus-summary-limit-exclude-childless-dormant}).
6318
6319 @item / C
6320 @kindex / C (Summary)
6321 @findex gnus-summary-limit-mark-excluded-as-read
6322 Mark all excluded unread articles as read
6323 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6324 also mark excluded ticked and dormant articles as read.
6325
6326 @item / N
6327 @kindex / N (Summary)
6328 @findex gnus-summary-insert-new-articles
6329 Insert all new articles in the summary buffer.  It scans for new emails
6330 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6331
6332 @item / o
6333 @kindex / o (Summary)
6334 @findex gnus-summary-insert-old-articles
6335 Insert all old articles in the summary buffer.  If given a numbered
6336 prefix, fetch this number of articles.
6337
6338 @end table
6339
6340
6341 @node Threading
6342 @section Threading
6343 @cindex threading
6344 @cindex article threading
6345
6346 Gnus threads articles by default.  @dfn{To thread} is to put responses
6347 to articles directly after the articles they respond to---in a
6348 hierarchical fashion.
6349
6350 Threading is done by looking at the @code{References} headers of the
6351 articles.  In a perfect world, this would be enough to build pretty
6352 trees, but unfortunately, the @code{References} header is often broken
6353 or simply missing.  Weird news propagation exacerbates the problem,
6354 so one has to employ other heuristics to get pleasing results.  A
6355 plethora of approaches exists, as detailed in horrible detail in
6356 @ref{Customizing Threading}.
6357
6358 First, a quick overview of the concepts:
6359
6360 @table @dfn
6361 @item root
6362 The top-most article in a thread; the first article in the thread.
6363
6364 @item thread
6365 A tree-like article structure.
6366
6367 @item sub-thread
6368 A small(er) section of this tree-like structure.
6369
6370 @item loose threads
6371 Threads often lose their roots due to article expiry, or due to the root
6372 already having been read in a previous session, and not displayed in the
6373 summary buffer.  We then typically have many sub-threads that really
6374 belong to one thread, but are without connecting roots.  These are
6375 called loose threads.
6376
6377 @item thread gathering
6378 An attempt to gather loose threads into bigger threads.
6379
6380 @item sparse threads
6381 A thread where the missing articles have been ``guessed'' at, and are
6382 displayed as empty lines in the summary buffer.
6383
6384 @end table
6385
6386
6387 @menu
6388 * Customizing Threading::       Variables you can change to affect the threading.
6389 * Thread Commands::             Thread based commands in the summary buffer.
6390 @end menu
6391
6392
6393 @node Customizing Threading
6394 @subsection Customizing Threading
6395 @cindex customizing threading
6396
6397 @menu
6398 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6399 * Filling In Threads::          Making the threads displayed look fuller.
6400 * More Threading::              Even more variables for fiddling with threads.
6401 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6402 @end menu
6403
6404
6405 @node Loose Threads
6406 @subsubsection Loose Threads
6407 @cindex <
6408 @cindex >
6409 @cindex loose threads
6410
6411 @table @code
6412 @item gnus-summary-make-false-root
6413 @vindex gnus-summary-make-false-root
6414 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6415 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6416 Yup.)  Loose subtrees occur when the real root has expired, or you've
6417 read or killed the root in a previous session.
6418
6419 When there is no real root of a thread, gnus will have to fudge
6420 something.  This variable says what fudging method gnus should use.
6421 There are four possible values:
6422
6423 @iftex
6424 @iflatex
6425 \gnusfigure{The Summary Buffer}{390}{
6426 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6427 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6428 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6429 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6430 }
6431 @end iflatex
6432 @end iftex
6433
6434 @cindex adopting articles
6435
6436 @table @code
6437
6438 @item adopt
6439 Gnus will make the first of the orphaned articles the parent.  This
6440 parent will adopt all the other articles.  The adopted articles will be
6441 marked as such by pointy brackets (@samp{<>}) instead of the standard
6442 square brackets (@samp{[]}).  This is the default method.
6443
6444 @item dummy
6445 @vindex gnus-summary-dummy-line-format
6446 @vindex gnus-summary-make-false-root-always
6447 Gnus will create a dummy summary line that will pretend to be the
6448 parent.  This dummy line does not correspond to any real article, so
6449 selecting it will just select the first real article after the dummy
6450 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6451 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6452 which is the subject of the article.  @xref{Formatting Variables}.
6453 If you want all threads to have a dummy root, even the non-gathered
6454 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6455
6456 @item empty
6457 Gnus won't actually make any article the parent, but simply leave the
6458 subject field of all orphans except the first empty.  (Actually, it will
6459 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6460 Buffer Format}).)
6461
6462 @item none
6463 Don't make any article parent at all.  Just gather the threads and
6464 display them after one another.
6465
6466 @item nil
6467 Don't gather loose threads.
6468 @end table
6469
6470 @item gnus-summary-gather-subject-limit
6471 @vindex gnus-summary-gather-subject-limit
6472 Loose threads are gathered by comparing subjects of articles.  If this
6473 variable is @code{nil}, gnus requires an exact match between the
6474 subjects of the loose threads before gathering them into one big
6475 super-thread.  This might be too strict a requirement, what with the
6476 presence of stupid newsreaders that chop off long subject lines.  If
6477 you think so, set this variable to, say, 20 to require that only the
6478 first 20 characters of the subjects have to match.  If you set this
6479 variable to a really low number, you'll find that gnus will gather
6480 everything in sight into one thread, which isn't very helpful.
6481
6482 @cindex fuzzy article gathering
6483 If you set this variable to the special value @code{fuzzy}, gnus will
6484 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6485 Matching}).
6486
6487 @item gnus-simplify-subject-fuzzy-regexp
6488 @vindex gnus-simplify-subject-fuzzy-regexp
6489 This can either be a regular expression or list of regular expressions
6490 that match strings that will be removed from subjects if fuzzy subject
6491 simplification is used.
6492
6493 @item gnus-simplify-ignored-prefixes
6494 @vindex gnus-simplify-ignored-prefixes
6495 If you set @code{gnus-summary-gather-subject-limit} to something as low
6496 as 10, you might consider setting this variable to something sensible:
6497
6498 @c Written by Michael Ernst <mernst@cs.rice.edu>
6499 @lisp
6500 (setq gnus-simplify-ignored-prefixes
6501       (concat
6502        "\\`\\[?\\("
6503        (mapconcat
6504         'identity
6505         '("looking"
6506           "wanted" "followup" "summary\\( of\\)?"
6507           "help" "query" "problem" "question"
6508           "answer" "reference" "announce"
6509           "How can I" "How to" "Comparison of"
6510           ;; ...
6511           )
6512         "\\|")
6513        "\\)\\s *\\("
6514        (mapconcat 'identity
6515                   '("for" "for reference" "with" "about")
6516                   "\\|")
6517        "\\)?\\]?:?[ \t]*"))
6518 @end lisp
6519
6520 All words that match this regexp will be removed before comparing two
6521 subjects.
6522
6523 @item gnus-simplify-subject-functions
6524 @vindex gnus-simplify-subject-functions
6525 If non-@code{nil}, this variable overrides
6526 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6527 list of functions to apply to the @code{Subject} string iteratively to
6528 arrive at the simplified version of the string.
6529
6530 Useful functions to put in this list include:
6531
6532 @table @code
6533 @item gnus-simplify-subject-re
6534 @findex gnus-simplify-subject-re
6535 Strip the leading @samp{Re:}.
6536
6537 @item gnus-simplify-subject-fuzzy
6538 @findex gnus-simplify-subject-fuzzy
6539 Simplify fuzzily.
6540
6541 @item gnus-simplify-whitespace
6542 @findex gnus-simplify-whitespace
6543 Remove excessive whitespace.
6544
6545 @item gnus-simplify-all-whitespace
6546 @findex gnus-simplify-all-whitespace
6547 Remove all whitespace.
6548 @end table
6549
6550 You may also write your own functions, of course.
6551
6552
6553 @item gnus-summary-gather-exclude-subject
6554 @vindex gnus-summary-gather-exclude-subject
6555 Since loose thread gathering is done on subjects only, that might lead
6556 to many false hits, especially with certain common subjects like
6557 @samp{} and @samp{(none)}.  To make the situation slightly better,
6558 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6559 what subjects should be excluded from the gathering process.@*
6560 The default is @samp{^ *$\\|^(none)$}.
6561
6562 @item gnus-summary-thread-gathering-function
6563 @vindex gnus-summary-thread-gathering-function
6564 Gnus gathers threads by looking at @code{Subject} headers.  This means
6565 that totally unrelated articles may end up in the same ``thread'', which
6566 is confusing.  An alternate approach is to look at all the
6567 @code{Message-ID}s in all the @code{References} headers to find matches.
6568 This will ensure that no gathered threads ever include unrelated
6569 articles, but it also means that people who have posted with broken
6570 newsreaders won't be gathered properly.  The choice is yours---plague or
6571 cholera:
6572
6573 @table @code
6574 @item gnus-gather-threads-by-subject
6575 @findex gnus-gather-threads-by-subject
6576 This function is the default gathering function and looks at
6577 @code{Subject}s exclusively.
6578
6579 @item gnus-gather-threads-by-references
6580 @findex gnus-gather-threads-by-references
6581 This function looks at @code{References} headers exclusively.
6582 @end table
6583
6584 If you want to test gathering by @code{References}, you could say
6585 something like:
6586
6587 @lisp
6588 (setq gnus-summary-thread-gathering-function
6589       'gnus-gather-threads-by-references)
6590 @end lisp
6591
6592 @end table
6593
6594
6595 @node Filling In Threads
6596 @subsubsection Filling In Threads
6597
6598 @table @code
6599 @item gnus-fetch-old-headers
6600 @vindex gnus-fetch-old-headers
6601 If non-@code{nil}, gnus will attempt to build old threads by fetching
6602 more old headers---headers to articles marked as read.  If you
6603 would like to display as few summary lines as possible, but still
6604 connect as many loose threads as possible, you should set this variable
6605 to @code{some} or a number.  If you set it to a number, no more than
6606 that number of extra old headers will be fetched.  In either case,
6607 fetching old headers only works if the back end you are using carries
6608 overview files---this would normally be @code{nntp}, @code{nnspool},
6609 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6610 the thread has been expired by the server, there's not much Gnus can do
6611 about that.
6612
6613 This variable can also be set to @code{invisible}.  This won't have any
6614 visible effects, but is useful if you use the @kbd{A T} command a lot
6615 (@pxref{Finding the Parent}).
6616
6617 @item gnus-fetch-old-ephemeral-headers
6618 @vindex gnus-fetch-old-ephemeral-headers
6619 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6620 newsgroups.
6621
6622 @item gnus-build-sparse-threads
6623 @vindex gnus-build-sparse-threads
6624 Fetching old headers can be slow.  A low-rent similar effect can be
6625 gotten by setting this variable to @code{some}.  Gnus will then look at
6626 the complete @code{References} headers of all articles and try to string
6627 together articles that belong in the same thread.  This will leave
6628 @dfn{gaps} in the threading display where gnus guesses that an article
6629 is missing from the thread.  (These gaps appear like normal summary
6630 lines.  If you select a gap, gnus will try to fetch the article in
6631 question.)  If this variable is @code{t}, gnus will display all these
6632 ``gaps'' without regard for whether they are useful for completing the
6633 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6634 off sparse leaf nodes that don't lead anywhere.  This variable is
6635 @code{nil} by default.
6636
6637 @item gnus-read-all-available-headers
6638 @vindex gnus-read-all-available-headers
6639 This is a rather obscure variable that few will find useful.  It's
6640 intended for those non-news newsgroups where the back end has to fetch
6641 quite a lot to present the summary buffer, and where it's impossible to
6642 go back to parents of articles.  This is mostly the case in the
6643 web-based groups, like the @code{nnultimate} groups.
6644
6645 If you don't use those, then it's safe to leave this as the default
6646 @code{nil}.  If you want to use this variable, it should be a regexp
6647 that matches the group name, or @code{t} for all groups.
6648
6649 @end table
6650
6651
6652 @node More Threading
6653 @subsubsection More Threading
6654
6655 @table @code
6656 @item gnus-show-threads
6657 @vindex gnus-show-threads
6658 If this variable is @code{nil}, no threading will be done, and all of
6659 the rest of the variables here will have no effect.  Turning threading
6660 off will speed group selection up a bit, but it is sure to make reading
6661 slower and more awkward.
6662
6663 @item gnus-thread-hide-subtree
6664 @vindex gnus-thread-hide-subtree
6665 If non-@code{nil}, all threads will be hidden when the summary buffer is
6666 generated.
6667
6668 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6669 Available predicates are @code{gnus-article-unread-p} and
6670 @code{gnus-article-unseen-p}.
6671
6672 Here's an example:
6673
6674 @lisp
6675 (setq gnus-thread-hide-subtree
6676       '(or gnus-article-unread-p
6677            gnus-article-unseen-p))
6678 @end lisp
6679
6680 (It's a pretty nonsensical example, since all unseen articles are also
6681 unread, but you get my drift.)
6682
6683
6684 @item gnus-thread-expunge-below
6685 @vindex gnus-thread-expunge-below
6686 All threads that have a total score (as defined by
6687 @code{gnus-thread-score-function}) less than this number will be
6688 expunged.  This variable is @code{nil} by default, which means that no
6689 threads are expunged.
6690
6691 @item gnus-thread-hide-killed
6692 @vindex gnus-thread-hide-killed
6693 if you kill a thread and this variable is non-@code{nil}, the subtree
6694 will be hidden.
6695
6696 @item gnus-thread-ignore-subject
6697 @vindex gnus-thread-ignore-subject
6698 Sometimes somebody changes the subject in the middle of a thread.  If
6699 this variable is non-@code{nil}, which is the default, the subject
6700 change is ignored.  If it is @code{nil}, a change in the subject will
6701 result in a new thread.
6702
6703 @item gnus-thread-indent-level
6704 @vindex gnus-thread-indent-level
6705 This is a number that says how much each sub-thread should be indented.
6706 The default is 4.
6707
6708 @item gnus-sort-gathered-threads-function
6709 @vindex gnus-sort-gathered-threads-function
6710 Sometimes, particularly with mailing lists, the order in which mails
6711 arrive locally is not necessarily the same as the order in which they
6712 arrived on the mailing list.  Consequently, when sorting sub-threads
6713 using the default @code{gnus-thread-sort-by-number}, responses can end
6714 up appearing before the article to which they are responding to.
6715 Setting this variable to an alternate value
6716 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6717 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6718 more logical sub-thread ordering in such instances.
6719
6720 @end table
6721
6722
6723 @node Low-Level Threading
6724 @subsubsection Low-Level Threading
6725
6726 @table @code
6727
6728 @item gnus-parse-headers-hook
6729 @vindex gnus-parse-headers-hook
6730 Hook run before parsing any headers.  The default value is
6731 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6732 @code{default-mime-charset} in summary buffer based on variable
6733 @code{gnus-newsgroup-default-charset-alist}.
6734
6735 @item gnus-alter-header-function
6736 @vindex gnus-alter-header-function
6737 If non-@code{nil}, this function will be called to allow alteration of
6738 article header structures.  The function is called with one parameter,
6739 the article header vector, which it may alter in any way.  For instance,
6740 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6741 in systematic ways (by adding prefixes and such), you can use this
6742 variable to un-scramble the @code{Message-ID}s so that they are more
6743 meaningful.  Here's one example:
6744
6745 @lisp
6746 (setq gnus-alter-header-function 'my-alter-message-id)
6747
6748 (defun my-alter-message-id (header)
6749   (let ((id (mail-header-id header)))
6750     (when (string-match
6751            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6752       (mail-header-set-id
6753        (concat (match-string 1 id) "@@" (match-string 2 id))
6754        header))))
6755 @end lisp
6756
6757 @end table
6758
6759
6760 @node Thread Commands
6761 @subsection Thread Commands
6762 @cindex thread commands
6763
6764 @table @kbd
6765
6766 @item T k
6767 @itemx C-M-k
6768 @kindex T k (Summary)
6769 @kindex C-M-k (Summary)
6770 @findex gnus-summary-kill-thread
6771 Mark all articles in the current (sub-)thread as read
6772 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6773 remove all marks instead.  If the prefix argument is negative, tick
6774 articles instead.
6775
6776 @item T l
6777 @itemx C-M-l
6778 @kindex T l (Summary)
6779 @kindex C-M-l (Summary)
6780 @findex gnus-summary-lower-thread
6781 Lower the score of the current (sub-)thread
6782 (@code{gnus-summary-lower-thread}).
6783
6784 @item T i
6785 @kindex T i (Summary)
6786 @findex gnus-summary-raise-thread
6787 Increase the score of the current (sub-)thread
6788 (@code{gnus-summary-raise-thread}).
6789
6790 @item T #
6791 @kindex T # (Summary)
6792 @findex gnus-uu-mark-thread
6793 Set the process mark on the current (sub-)thread
6794 (@code{gnus-uu-mark-thread}).
6795
6796 @item T M-#
6797 @kindex T M-# (Summary)
6798 @findex gnus-uu-unmark-thread
6799 Remove the process mark from the current (sub-)thread
6800 (@code{gnus-uu-unmark-thread}).
6801
6802 @item T T
6803 @kindex T T (Summary)
6804 @findex gnus-summary-toggle-threads
6805 Toggle threading (@code{gnus-summary-toggle-threads}).
6806
6807 @item T s
6808 @kindex T s (Summary)
6809 @findex gnus-summary-show-thread
6810 Expose the (sub-)thread hidden under the current article, if any@*
6811 (@code{gnus-summary-show-thread}).
6812
6813 @item T h
6814 @kindex T h (Summary)
6815 @findex gnus-summary-hide-thread
6816 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6817
6818 @item T S
6819 @kindex T S (Summary)
6820 @findex gnus-summary-show-all-threads
6821 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6822
6823 @item T H
6824 @kindex T H (Summary)
6825 @findex gnus-summary-hide-all-threads
6826 Hide all threads (@code{gnus-summary-hide-all-threads}).
6827
6828 @item T t
6829 @kindex T t (Summary)
6830 @findex gnus-summary-rethread-current
6831 Re-thread the current article's thread
6832 (@code{gnus-summary-rethread-current}).  This works even when the
6833 summary buffer is otherwise unthreaded.
6834
6835 @item T ^
6836 @kindex T ^ (Summary)
6837 @findex gnus-summary-reparent-thread
6838 Make the current article the child of the marked (or previous) article
6839 (@code{gnus-summary-reparent-thread}).
6840
6841 @end table
6842
6843 The following commands are thread movement commands.  They all
6844 understand the numeric prefix.
6845
6846 @table @kbd
6847
6848 @item T n
6849 @kindex T n (Summary)
6850 @itemx C-M-f
6851 @kindex C-M-n (Summary)
6852 @itemx M-down
6853 @kindex M-down (Summary)
6854 @findex gnus-summary-next-thread
6855 Go to the next thread (@code{gnus-summary-next-thread}).
6856
6857 @item T p
6858 @kindex T p (Summary)
6859 @itemx C-M-b
6860 @kindex C-M-p (Summary)
6861 @itemx M-up
6862 @kindex M-up (Summary)
6863 @findex gnus-summary-prev-thread
6864 Go to the previous thread (@code{gnus-summary-prev-thread}).
6865
6866 @item T d
6867 @kindex T d (Summary)
6868 @findex gnus-summary-down-thread
6869 Descend the thread (@code{gnus-summary-down-thread}).
6870
6871 @item T u
6872 @kindex T u (Summary)
6873 @findex gnus-summary-up-thread
6874 Ascend the thread (@code{gnus-summary-up-thread}).
6875
6876 @item T o
6877 @kindex T o (Summary)
6878 @findex gnus-summary-top-thread
6879 Go to the top of the thread (@code{gnus-summary-top-thread}).
6880 @end table
6881
6882 @vindex gnus-thread-operation-ignore-subject
6883 If you ignore subject while threading, you'll naturally end up with
6884 threads that have several different subjects in them.  If you then issue
6885 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6886 wish to kill the entire thread, but just those parts of the thread that
6887 have the same subject as the current article.  If you like this idea,
6888 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6889 is non-@code{nil} (which it is by default), subjects will be ignored
6890 when doing thread commands.  If this variable is @code{nil}, articles in
6891 the same thread with different subjects will not be included in the
6892 operation in question.  If this variable is @code{fuzzy}, only articles
6893 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6894 Matching}).
6895
6896
6897 @node Sorting the Summary Buffer
6898 @section Sorting the Summary Buffer
6899
6900 @findex gnus-thread-sort-by-total-score
6901 @findex gnus-thread-sort-by-date
6902 @findex gnus-thread-sort-by-score
6903 @findex gnus-thread-sort-by-subject
6904 @findex gnus-thread-sort-by-author
6905 @findex gnus-thread-sort-by-number
6906 @findex gnus-thread-sort-by-random
6907 @vindex gnus-thread-sort-functions
6908 @findex gnus-thread-sort-by-most-recent-thread
6909 If you are using a threaded summary display, you can sort the threads by
6910 setting @code{gnus-thread-sort-functions}, which can be either a single
6911 function, a list of functions, or a list containing functions and
6912 @code{(not some-function)} elements.
6913
6914 By default, sorting is done on article numbers.  Ready-made sorting
6915 predicate functions include @code{gnus-thread-sort-by-number},
6916 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6917 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6918 @code{gnus-thread-sort-by-most-recent-number},
6919 @code{gnus-thread-sort-by-most-recent-date},
6920 @code{gnus-thread-sort-by-random} and
6921 @code{gnus-thread-sort-by-total-score}.
6922
6923 Each function takes two threads and returns non-@code{nil} if the first
6924 thread should be sorted before the other.  Note that sorting really is
6925 normally done by looking only at the roots of each thread.
6926
6927 If you use more than one function, the primary sort key should be the
6928 last function in the list.  You should probably always include
6929 @code{gnus-thread-sort-by-number} in the list of sorting
6930 functions---preferably first.  This will ensure that threads that are
6931 equal with respect to the other sort criteria will be displayed in
6932 ascending article order.
6933
6934 If you would like to sort by reverse score, then by subject, and finally
6935 by number, you could do something like:
6936
6937 @lisp
6938 (setq gnus-thread-sort-functions
6939       '(gnus-thread-sort-by-number
6940         gnus-thread-sort-by-subject
6941         (not gnus-thread-sort-by-total-score)))
6942 @end lisp
6943
6944 The threads that have highest score will be displayed first in the
6945 summary buffer.  When threads have the same score, they will be sorted
6946 alphabetically.  The threads that have the same score and the same
6947 subject will be sorted by number, which is (normally) the sequence in
6948 which the articles arrived.
6949
6950 If you want to sort by score and then reverse arrival order, you could
6951 say something like:
6952
6953 @lisp
6954 (setq gnus-thread-sort-functions
6955       '((lambda (t1 t2)
6956           (not (gnus-thread-sort-by-number t1 t2)))
6957         gnus-thread-sort-by-score))
6958 @end lisp
6959
6960 @vindex gnus-thread-score-function
6961 The function in the @code{gnus-thread-score-function} variable (default
6962 @code{+}) is used for calculating the total score of a thread.  Useful
6963 functions might be @code{max}, @code{min}, or squared means, or whatever
6964 tickles your fancy.
6965
6966 @findex gnus-article-sort-functions
6967 @findex gnus-article-sort-by-date
6968 @findex gnus-article-sort-by-score
6969 @findex gnus-article-sort-by-subject
6970 @findex gnus-article-sort-by-author
6971 @findex gnus-article-sort-by-random
6972 @findex gnus-article-sort-by-number
6973 If you are using an unthreaded display for some strange reason or
6974 other, you have to fiddle with the @code{gnus-article-sort-functions}
6975 variable.  It is very similar to the
6976 @code{gnus-thread-sort-functions}, except that it uses slightly
6977 different functions for article comparison.  Available sorting
6978 predicate functions are @code{gnus-article-sort-by-number},
6979 @code{gnus-article-sort-by-author},
6980 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6981 @code{gnus-article-sort-by-random}, and
6982 @code{gnus-article-sort-by-score}.
6983
6984 If you want to sort an unthreaded summary display by subject, you could
6985 say something like:
6986
6987 @lisp
6988 (setq gnus-article-sort-functions
6989       '(gnus-article-sort-by-number
6990         gnus-article-sort-by-subject))
6991 @end lisp
6992
6993
6994
6995 @node Asynchronous Fetching
6996 @section Asynchronous Article Fetching
6997 @cindex asynchronous article fetching
6998 @cindex article pre-fetch
6999 @cindex pre-fetch
7000
7001 If you read your news from an @acronym{NNTP} server that's far away, the
7002 network latencies may make reading articles a chore.  You have to wait
7003 for a while after pressing @kbd{n} to go to the next article before the
7004 article appears.  Why can't gnus just go ahead and fetch the article
7005 while you are reading the previous one?  Why not, indeed.
7006
7007 First, some caveats.  There are some pitfalls to using asynchronous
7008 article fetching, especially the way gnus does it.
7009
7010 Let's say you are reading article 1, which is short, and article 2 is
7011 quite long, and you are not interested in reading that.  Gnus does not
7012 know this, so it goes ahead and fetches article 2.  You decide to read
7013 article 3, but since gnus is in the process of fetching article 2, the
7014 connection is blocked.
7015
7016 To avoid these situations, gnus will open two (count 'em two)
7017 connections to the server.  Some people may think this isn't a very nice
7018 thing to do, but I don't see any real alternatives.  Setting up that
7019 extra connection takes some time, so gnus startup will be slower.
7020
7021 Gnus will fetch more articles than you will read.  This will mean that
7022 the link between your machine and the @acronym{NNTP} server will become more
7023 loaded than if you didn't use article pre-fetch.  The server itself will
7024 also become more loaded---both with the extra article requests, and the
7025 extra connection.
7026
7027 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7028 you really want to.
7029
7030 @vindex gnus-asynchronous
7031 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7032 happen automatically.
7033
7034 @vindex gnus-use-article-prefetch
7035 You can control how many articles are to be pre-fetched by setting
7036 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7037 that when you read an article in the group, the back end will pre-fetch
7038 the next 30 articles.  If this variable is @code{t}, the back end will
7039 pre-fetch all the articles it can without bound.  If it is
7040 @code{nil}, no pre-fetching will be done.
7041
7042 @vindex gnus-async-prefetch-article-p
7043 @findex gnus-async-read-p
7044 There are probably some articles that you don't want to pre-fetch---read
7045 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7046 variable controls whether an article is to be pre-fetched.  This
7047 function should return non-@code{nil} when the article in question is
7048 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7049 returns @code{nil} on read articles.  The function is called with an
7050 article data structure as the only parameter.
7051
7052 If, for instance, you wish to pre-fetch only unread articles shorter
7053 than 100 lines, you could say something like:
7054
7055 @lisp
7056 (defun my-async-short-unread-p (data)
7057   "Return non-nil for short, unread articles."
7058   (and (gnus-data-unread-p data)
7059        (< (mail-header-lines (gnus-data-header data))
7060           100)))
7061
7062 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7063 @end lisp
7064
7065 These functions will be called many, many times, so they should
7066 preferably be short and sweet to avoid slowing down gnus too much.
7067 It's probably a good idea to byte-compile things like this.
7068
7069 @vindex gnus-prefetched-article-deletion-strategy
7070 Articles have to be removed from the asynch buffer sooner or later.  The
7071 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7072 articles.  This is a list that may contain the following elements:
7073
7074 @table @code
7075 @item read
7076 Remove articles when they are read.
7077
7078 @item exit
7079 Remove articles when exiting the group.
7080 @end table
7081
7082 The default value is @code{(read exit)}.
7083
7084 @c @vindex gnus-use-header-prefetch
7085 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7086 @c from the next group.
7087
7088
7089 @node Article Caching
7090 @section Article Caching
7091 @cindex article caching
7092 @cindex caching
7093
7094 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7095 consider turning article caching on.  Each article will then be stored
7096 locally under your home directory.  As you may surmise, this could
7097 potentially use @emph{huge} amounts of disk space, as well as eat up all
7098 your inodes so fast it will make your head swim.  In vodka.
7099
7100 Used carefully, though, it could be just an easier way to save articles.
7101
7102 @vindex gnus-use-long-file-name
7103 @vindex gnus-cache-directory
7104 @vindex gnus-use-cache
7105 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7106 all articles ticked or marked as dormant will then be copied
7107 over to your local cache (@code{gnus-cache-directory}).  Whether this
7108 cache is flat or hierarchical is controlled by the
7109 @code{gnus-use-long-file-name} variable, as usual.
7110
7111 When re-selecting a ticked or dormant article, it will be fetched from the
7112 cache instead of from the server.  As articles in your cache will never
7113 expire, this might serve as a method of saving articles while still
7114 keeping them where they belong.  Just mark all articles you want to save
7115 as dormant, and don't worry.
7116
7117 When an article is marked as read, is it removed from the cache.
7118
7119 @vindex gnus-cache-remove-articles
7120 @vindex gnus-cache-enter-articles
7121 The entering/removal of articles from the cache is controlled by the
7122 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7123 variables.  Both are lists of symbols.  The first is @code{(ticked
7124 dormant)} by default, meaning that ticked and dormant articles will be
7125 put in the cache.  The latter is @code{(read)} by default, meaning that
7126 articles marked as read are removed from the cache.  Possibly
7127 symbols in these two lists are @code{ticked}, @code{dormant},
7128 @code{unread} and @code{read}.
7129
7130 @findex gnus-jog-cache
7131 So where does the massive article-fetching and storing come into the
7132 picture?  The @code{gnus-jog-cache} command will go through all
7133 subscribed newsgroups, request all unread articles, score them, and
7134 store them in the cache.  You should only ever, ever ever ever, use this
7135 command if 1) your connection to the @acronym{NNTP} server is really, really,
7136 really slow and 2) you have a really, really, really huge disk.
7137 Seriously.  One way to cut down on the number of articles downloaded is
7138 to score unwanted articles down and have them marked as read.  They will
7139 not then be downloaded by this command.
7140
7141 @vindex gnus-uncacheable-groups
7142 @vindex gnus-cacheable-groups
7143 It is likely that you do not want caching on all groups.  For instance,
7144 if your @code{nnml} mail is located under your home directory, it makes no
7145 sense to cache it somewhere else under your home directory.  Unless you
7146 feel that it's neat to use twice as much space.
7147
7148 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7149 regexp of groups to cache, @samp{^nntp} for instance, or set the
7150 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7151 Both variables are @code{nil} by default.  If a group matches both
7152 variables, the group is not cached.
7153
7154 @findex gnus-cache-generate-nov-databases
7155 @findex gnus-cache-generate-active
7156 @vindex gnus-cache-active-file
7157 The cache stores information on what articles it contains in its active
7158 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7159 of the cache) becomes all messed up for some reason or other, gnus
7160 offers two functions that will try to set things right.  @kbd{M-x
7161 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7162 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7163 file.
7164
7165 @findex gnus-cache-move-cache
7166 @code{gnus-cache-move-cache} will move your whole
7167 @code{gnus-cache-directory} to some other location.  You get asked to
7168 where, isn't that cool?
7169
7170 @node Persistent Articles
7171 @section Persistent Articles
7172 @cindex persistent articles
7173
7174 Closely related to article caching, we have @dfn{persistent articles}.
7175 In fact, it's just a different way of looking at caching, and much more
7176 useful in my opinion.
7177
7178 Say you're reading a newsgroup, and you happen on to some valuable gem
7179 that you want to keep and treasure forever.  You'd normally just save it
7180 (using one of the many saving commands) in some file.  The problem with
7181 that is that it's just, well, yucky.  Ideally you'd prefer just having
7182 the article remain in the group where you found it forever; untouched by
7183 the expiry going on at the news server.
7184
7185 This is what a @dfn{persistent article} is---an article that just won't
7186 be deleted.  It's implemented using the normal cache functions, but
7187 you use two explicit commands for managing persistent articles:
7188
7189 @table @kbd
7190
7191 @item *
7192 @kindex * (Summary)
7193 @findex gnus-cache-enter-article
7194 Make the current article persistent (@code{gnus-cache-enter-article}).
7195
7196 @item M-*
7197 @kindex M-* (Summary)
7198 @findex gnus-cache-remove-article
7199 Remove the current article from the persistent articles
7200 (@code{gnus-cache-remove-article}).  This will normally delete the
7201 article.
7202 @end table
7203
7204 Both these commands understand the process/prefix convention.
7205
7206 To avoid having all ticked articles (and stuff) entered into the cache,
7207 you should set @code{gnus-use-cache} to @code{passive} if you're just
7208 interested in persistent articles:
7209
7210 @lisp
7211 (setq gnus-use-cache 'passive)
7212 @end lisp
7213
7214
7215 @node Article Backlog
7216 @section Article Backlog
7217 @cindex backlog
7218 @cindex article backlog
7219
7220 If you have a slow connection, but the idea of using caching seems
7221 unappealing to you (and it is, really), you can help the situation some
7222 by switching on the @dfn{backlog}.  This is where gnus will buffer
7223 already read articles so that it doesn't have to re-fetch articles
7224 you've already read.  This only helps if you are in the habit of
7225 re-selecting articles you've recently read, of course.  If you never do
7226 that, turning the backlog on will slow gnus down a little bit, and
7227 increase memory usage some.
7228
7229 @vindex gnus-keep-backlog
7230 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7231 at most @var{n} old articles in a buffer for later re-fetching.  If this
7232 variable is non-@code{nil} and is not a number, gnus will store
7233 @emph{all} read articles, which means that your Emacs will grow without
7234 bound before exploding and taking your machine down with you.  I put
7235 that in there just to keep y'all on your toes.
7236
7237 The default value is 20.
7238
7239
7240 @node Saving Articles
7241 @section Saving Articles
7242 @cindex saving articles
7243
7244 Gnus can save articles in a number of ways.  Below is the documentation
7245 for saving articles in a fairly straight-forward fashion (i.e., little
7246 processing of the article is done before it is saved).  For a different
7247 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7248 (@pxref{Decoding Articles}).
7249
7250 For the commands listed here, the target is a file.  If you want to
7251 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7252 command (@pxref{Mail Group Commands}).
7253
7254 @vindex gnus-save-all-headers
7255 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7256 unwanted headers before saving the article.
7257
7258 @vindex gnus-saved-headers
7259 If the preceding variable is @code{nil}, all headers that match the
7260 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7261 deleted before saving.
7262
7263 @table @kbd
7264
7265 @item O o
7266 @itemx o
7267 @kindex O o (Summary)
7268 @kindex o (Summary)
7269 @findex gnus-summary-save-article
7270 @c @icon{gnus-summary-save-article}
7271 Save the current article using the default article saver
7272 (@code{gnus-summary-save-article}).
7273
7274 @item O m
7275 @kindex O m (Summary)
7276 @findex gnus-summary-save-article-mail
7277 Save the current article in mail format
7278 (@code{gnus-summary-save-article-mail}).
7279
7280 @item O r
7281 @kindex O r (Summary)
7282 @findex gnus-summary-save-article-rmail
7283 Save the current article in Rmail format
7284 (@code{gnus-summary-save-article-rmail}).
7285
7286 @item O f
7287 @kindex O f (Summary)
7288 @findex gnus-summary-save-article-file
7289 @c @icon{gnus-summary-save-article-file}
7290 Save the current article in plain file format
7291 (@code{gnus-summary-save-article-file}).
7292
7293 @item O F
7294 @kindex O F (Summary)
7295 @findex gnus-summary-write-article-file
7296 Write the current article in plain file format, overwriting any previous
7297 file contents (@code{gnus-summary-write-article-file}).
7298
7299 @item O b
7300 @kindex O b (Summary)
7301 @findex gnus-summary-save-article-body-file
7302 Save the current article body in plain file format
7303 (@code{gnus-summary-save-article-body-file}).
7304
7305 @item O h
7306 @kindex O h (Summary)
7307 @findex gnus-summary-save-article-folder
7308 Save the current article in mh folder format
7309 (@code{gnus-summary-save-article-folder}).
7310
7311 @item O v
7312 @kindex O v (Summary)
7313 @findex gnus-summary-save-article-vm
7314 Save the current article in a VM folder
7315 (@code{gnus-summary-save-article-vm}).
7316
7317 @item O p
7318 @itemx |
7319 @kindex O p (Summary)
7320 @kindex | (Summary)
7321 @findex gnus-summary-pipe-output
7322 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7323 the current article to a process (@code{gnus-summary-pipe-output}).
7324 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7325 complete headers in the piped output.
7326
7327 @item O P
7328 @kindex O P (Summary)
7329 @findex gnus-summary-muttprint
7330 @vindex gnus-summary-muttprint-program
7331 Save the current article into muttprint.  That is, print it using the
7332 external program @uref{http://muttprint.sourceforge.net/,
7333 Muttprint}.  The program name and options to use is controlled by the
7334 variable @code{gnus-summary-muttprint-program}.
7335 (@code{gnus-summary-muttprint}).
7336
7337 @end table
7338
7339 @vindex gnus-prompt-before-saving
7340 All these commands use the process/prefix convention
7341 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7342 functions, you might get tired of being prompted for files to save each
7343 and every article in.  The prompting action is controlled by
7344 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7345 default, giving you that excessive prompting action you know and
7346 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7347 just once for each series of articles you save.  If you like to really
7348 have Gnus do all your thinking for you, you can even set this variable
7349 to @code{nil}, which means that you will never be prompted for files to
7350 save articles in.  Gnus will simply save all the articles in the default
7351 files.
7352
7353
7354 @vindex gnus-default-article-saver
7355 You can customize the @code{gnus-default-article-saver} variable to make
7356 gnus do what you want it to.  You can use any of the six ready-made
7357 functions below, or you can create your own.
7358
7359 @table @code
7360
7361 @item gnus-summary-save-in-rmail
7362 @findex gnus-summary-save-in-rmail
7363 @vindex gnus-rmail-save-name
7364 @findex gnus-plain-save-name
7365 This is the default format, @dfn{Babyl}.  Uses the function in the
7366 @code{gnus-rmail-save-name} variable to get a file name to save the
7367 article in.  The default is @code{gnus-plain-save-name}.
7368
7369 @item gnus-summary-save-in-mail
7370 @findex gnus-summary-save-in-mail
7371 @vindex gnus-mail-save-name
7372 Save in a Unix mail (mbox) file.  Uses the function in the
7373 @code{gnus-mail-save-name} variable to get a file name to save the
7374 article in.  The default is @code{gnus-plain-save-name}.
7375
7376 @item gnus-summary-save-in-file
7377 @findex gnus-summary-save-in-file
7378 @vindex gnus-file-save-name
7379 @findex gnus-numeric-save-name
7380 Append the article straight to an ordinary file.  Uses the function in
7381 the @code{gnus-file-save-name} variable to get a file name to save the
7382 article in.  The default is @code{gnus-numeric-save-name}.
7383
7384 @item gnus-summary-write-to-file
7385 @findex gnus-summary-write-to-file
7386 Write the article straight to an ordinary file.  The file is
7387 overwritten if it exists.  Uses the function in the
7388 @code{gnus-file-save-name} variable to get a file name to save the
7389 article in.  The default is @code{gnus-numeric-save-name}.
7390
7391 @item gnus-summary-save-body-in-file
7392 @findex gnus-summary-save-body-in-file
7393 Append the article body to an ordinary file.  Uses the function in the
7394 @code{gnus-file-save-name} variable to get a file name to save the
7395 article in.  The default is @code{gnus-numeric-save-name}.
7396
7397 @item gnus-summary-save-in-folder
7398 @findex gnus-summary-save-in-folder
7399 @findex gnus-folder-save-name
7400 @findex gnus-Folder-save-name
7401 @vindex gnus-folder-save-name
7402 @cindex rcvstore
7403 @cindex MH folders
7404 Save the article to an MH folder using @code{rcvstore} from the MH
7405 library.  Uses the function in the @code{gnus-folder-save-name} variable
7406 to get a file name to save the article in.  The default is
7407 @code{gnus-folder-save-name}, but you can also use
7408 @code{gnus-Folder-save-name}, which creates capitalized names.
7409
7410 @item gnus-summary-save-in-vm
7411 @findex gnus-summary-save-in-vm
7412 Save the article in a VM folder.  You have to have the VM mail
7413 reader to use this setting.
7414 @end table
7415
7416 @vindex gnus-article-save-directory
7417 All of these functions, except for the last one, will save the article
7418 in the @code{gnus-article-save-directory}, which is initialized from the
7419 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7420 default.
7421
7422 As you can see above, the functions use different functions to find a
7423 suitable name of a file to save the article in.  Below is a list of
7424 available functions that generate names:
7425
7426 @table @code
7427
7428 @item gnus-Numeric-save-name
7429 @findex gnus-Numeric-save-name
7430 File names like @file{~/News/Alt.andrea-dworkin/45}.
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-Plain-save-name
7437 @findex gnus-Plain-save-name
7438 File names like @file{~/News/Alt.andrea-dworkin}.
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-sender-save-name
7445 @findex gnus-sender-save-name
7446 File names like @file{~/News/larsi}.
7447 @end table
7448
7449 @vindex gnus-split-methods
7450 You can have gnus suggest where to save articles by plonking a regexp into
7451 the @code{gnus-split-methods} alist.  For instance, if you would like to
7452 save articles related to gnus in the file @file{gnus-stuff}, and articles
7453 related to VM in @file{vm-stuff}, you could set this variable to something
7454 like:
7455
7456 @lisp
7457 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7458  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7459  (my-choosing-function "../other-dir/my-stuff")
7460  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7461 @end lisp
7462
7463 We see that this is a list where each element is a list that has two
7464 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7465 a string (in which case it is used as a regexp to match on the article
7466 head); it can be a symbol (which will be called as a function with the
7467 group name as a parameter); or it can be a list (which will be
7468 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7469 the @dfn{file} will be used as a default prompt.  In addition, the
7470 result of the operation itself will be used if the function or form
7471 called returns a string or a list of strings.
7472
7473 You basically end up with a list of file names that might be used when
7474 saving the current article.  (All ``matches'' will be used.)  You will
7475 then be prompted for what you really want to use as a name, with file
7476 name completion over the results from applying this variable.
7477
7478 This variable is @code{((gnus-article-archive-name))} by default, which
7479 means that gnus will look at the articles it saves for an
7480 @code{Archive-name} line and use that as a suggestion for the file
7481 name.
7482
7483 Here's an example function to clean up file names somewhat.  If you have
7484 lots of mail groups called things like
7485 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7486 these group names before creating the file name to save to.  The
7487 following will do just that:
7488
7489 @lisp
7490 (defun my-save-name (group)
7491   (when (string-match "^nnml:mail." group)
7492     (substring group (match-end 0))))
7493
7494 (setq gnus-split-methods
7495       '((gnus-article-archive-name)
7496         (my-save-name)))
7497 @end lisp
7498
7499
7500 @vindex gnus-use-long-file-name
7501 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7502 @code{nil}, all the preceding functions will replace all periods
7503 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7504 the functions will generate hierarchies of directories instead of having
7505 all the files in the top level directory
7506 (@file{~/News/alt/andrea-dworkin} instead of
7507 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7508 on most systems.  However, for historical reasons, this is @code{nil} on
7509 Xenix and usg-unix-v machines by default.
7510
7511 This function also affects kill and score file names.  If this variable
7512 is a list, and the list contains the element @code{not-score}, long file
7513 names will not be used for score files, if it contains the element
7514 @code{not-save}, long file names will not be used for saving, and if it
7515 contains the element @code{not-kill}, long file names will not be used
7516 for kill files.
7517
7518 If you'd like to save articles in a hierarchy that looks something like
7519 a spool, you could
7520
7521 @lisp
7522 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7523 (setq gnus-default-article-saver
7524       'gnus-summary-save-in-file)          ; @r{no encoding}
7525 @end lisp
7526
7527 Then just save with @kbd{o}.  You'd then read this hierarchy with
7528 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7529 the top level directory as the argument (@file{~/News/}).  Then just walk
7530 around to the groups/directories with @code{nneething}.
7531
7532
7533 @node Decoding Articles
7534 @section Decoding Articles
7535 @cindex decoding articles
7536
7537 Sometime users post articles (or series of articles) that have been
7538 encoded in some way or other.  Gnus can decode them for you.
7539
7540 @menu
7541 * Uuencoded Articles::          Uudecode articles.
7542 * Shell Archives::              Unshar articles.
7543 * PostScript Files::            Split PostScript.
7544 * Other Files::                 Plain save and binhex.
7545 * Decoding Variables::          Variables for a happy decoding.
7546 * Viewing Files::               You want to look at the result of the decoding?
7547 @end menu
7548
7549 @cindex series
7550 @cindex article series
7551 All these functions use the process/prefix convention
7552 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7553 the extension that a ``single article'' means ``a single series''.  Gnus
7554 can find out by itself what articles belong to a series, decode all the
7555 articles and unpack/view/save the resulting file(s).
7556
7557 Gnus guesses what articles are in the series according to the following
7558 simplish rule: The subjects must be (nearly) identical, except for the
7559 last two numbers of the line.  (Spaces are largely ignored, however.)
7560
7561 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7562 will find all the articles that match the regexp @samp{^cat.gif
7563 ([0-9]+/[0-9]+).*$}.
7564
7565 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7566 series}, will not be properly recognized by any of the automatic viewing
7567 commands, and you have to mark the articles manually with @kbd{#}.
7568
7569
7570 @node Uuencoded Articles
7571 @subsection Uuencoded Articles
7572 @cindex uudecode
7573 @cindex uuencoded articles
7574
7575 @table @kbd
7576
7577 @item X u
7578 @kindex X u (Summary)
7579 @findex gnus-uu-decode-uu
7580 @c @icon{gnus-uu-decode-uu}
7581 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7582
7583 @item X U
7584 @kindex X U (Summary)
7585 @findex gnus-uu-decode-uu-and-save
7586 Uudecodes and saves the current series
7587 (@code{gnus-uu-decode-uu-and-save}).
7588
7589 @item X v u
7590 @kindex X v u (Summary)
7591 @findex gnus-uu-decode-uu-view
7592 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7593
7594 @item X v U
7595 @kindex X v U (Summary)
7596 @findex gnus-uu-decode-uu-and-save-view
7597 Uudecodes, views and saves the current series
7598 (@code{gnus-uu-decode-uu-and-save-view}).
7599
7600 @end table
7601
7602 Remember that these all react to the presence of articles marked with
7603 the process mark.  If, for instance, you'd like to decode and save an
7604 entire newsgroup, you'd typically do @kbd{M P a}
7605 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7606 (@code{gnus-uu-decode-uu-and-save}).
7607
7608 All this is very much different from how @code{gnus-uu} worked with
7609 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7610 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7611 articles in some way (@pxref{Setting Process Marks}) and then press
7612 @kbd{X u}.
7613
7614 @vindex gnus-uu-notify-files
7615 Note: When trying to decode articles that have names matching
7616 @code{gnus-uu-notify-files}, which is hard-coded to
7617 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7618 automatically post an article on @samp{comp.unix.wizards} saying that
7619 you have just viewed the file in question.  This feature can't be turned
7620 off.
7621
7622
7623 @node Shell Archives
7624 @subsection Shell Archives
7625 @cindex unshar
7626 @cindex shell archives
7627 @cindex shared articles
7628
7629 Shell archives (``shar files'') used to be a popular way to distribute
7630 sources, but it isn't used all that much today.  In any case, we have
7631 some commands to deal with these:
7632
7633 @table @kbd
7634
7635 @item X s
7636 @kindex X s (Summary)
7637 @findex gnus-uu-decode-unshar
7638 Unshars the current series (@code{gnus-uu-decode-unshar}).
7639
7640 @item X S
7641 @kindex X S (Summary)
7642 @findex gnus-uu-decode-unshar-and-save
7643 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7644
7645 @item X v s
7646 @kindex X v s (Summary)
7647 @findex gnus-uu-decode-unshar-view
7648 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7649
7650 @item X v S
7651 @kindex X v S (Summary)
7652 @findex gnus-uu-decode-unshar-and-save-view
7653 Unshars, views and saves the current series
7654 (@code{gnus-uu-decode-unshar-and-save-view}).
7655 @end table
7656
7657
7658 @node PostScript Files
7659 @subsection PostScript Files
7660 @cindex PostScript
7661
7662 @table @kbd
7663
7664 @item X p
7665 @kindex X p (Summary)
7666 @findex gnus-uu-decode-postscript
7667 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7668
7669 @item X P
7670 @kindex X P (Summary)
7671 @findex gnus-uu-decode-postscript-and-save
7672 Unpack and save the current PostScript series
7673 (@code{gnus-uu-decode-postscript-and-save}).
7674
7675 @item X v p
7676 @kindex X v p (Summary)
7677 @findex gnus-uu-decode-postscript-view
7678 View the current PostScript series
7679 (@code{gnus-uu-decode-postscript-view}).
7680
7681 @item X v P
7682 @kindex X v P (Summary)
7683 @findex gnus-uu-decode-postscript-and-save-view
7684 View and save the current PostScript series
7685 (@code{gnus-uu-decode-postscript-and-save-view}).
7686 @end table
7687
7688
7689 @node Other Files
7690 @subsection Other Files
7691
7692 @table @kbd
7693 @item X o
7694 @kindex X o (Summary)
7695 @findex gnus-uu-decode-save
7696 Save the current series
7697 (@code{gnus-uu-decode-save}).
7698
7699 @item X b
7700 @kindex X b (Summary)
7701 @findex gnus-uu-decode-binhex
7702 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7703 doesn't really work yet.
7704 @end table
7705
7706
7707 @node Decoding Variables
7708 @subsection Decoding Variables
7709
7710 Adjective, not verb.
7711
7712 @menu
7713 * Rule Variables::              Variables that say how a file is to be viewed.
7714 * Other Decode Variables::      Other decode variables.
7715 * Uuencoding and Posting::      Variables for customizing uuencoding.
7716 @end menu
7717
7718
7719 @node Rule Variables
7720 @subsubsection Rule Variables
7721 @cindex rule variables
7722
7723 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7724 variables are of the form
7725
7726 @lisp
7727       (list '(regexp1 command2)
7728             '(regexp2 command2)
7729             ...)
7730 @end lisp
7731
7732 @table @code
7733
7734 @item gnus-uu-user-view-rules
7735 @vindex gnus-uu-user-view-rules
7736 @cindex sox
7737 This variable is consulted first when viewing files.  If you wish to use,
7738 for instance, @code{sox} to convert an @file{.au} sound file, you could
7739 say something like:
7740 @lisp
7741 (setq gnus-uu-user-view-rules
7742       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7743 @end lisp
7744
7745 @item gnus-uu-user-view-rules-end
7746 @vindex gnus-uu-user-view-rules-end
7747 This variable is consulted if gnus couldn't make any matches from the
7748 user and default view rules.
7749
7750 @item gnus-uu-user-archive-rules
7751 @vindex gnus-uu-user-archive-rules
7752 This variable can be used to say what commands should be used to unpack
7753 archives.
7754 @end table
7755
7756
7757 @node Other Decode Variables
7758 @subsubsection Other Decode Variables
7759
7760 @table @code
7761 @vindex gnus-uu-grabbed-file-functions
7762
7763 @item gnus-uu-grabbed-file-functions
7764 All functions in this list will be called right after each file has been
7765 successfully decoded---so that you can move or view files right away,
7766 and don't have to wait for all files to be decoded before you can do
7767 anything.  Ready-made functions you can put in this list are:
7768
7769 @table @code
7770
7771 @item gnus-uu-grab-view
7772 @findex gnus-uu-grab-view
7773 View the file.
7774
7775 @item gnus-uu-grab-move
7776 @findex gnus-uu-grab-move
7777 Move the file (if you're using a saving function.)
7778 @end table
7779
7780 @item gnus-uu-be-dangerous
7781 @vindex gnus-uu-be-dangerous
7782 Specifies what to do if unusual situations arise during decoding.  If
7783 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7784 that didn't work, and overwrite existing files.  Otherwise, ask each
7785 time.
7786
7787 @item gnus-uu-ignore-files-by-name
7788 @vindex gnus-uu-ignore-files-by-name
7789 Files with name matching this regular expression won't be viewed.
7790
7791 @item gnus-uu-ignore-files-by-type
7792 @vindex gnus-uu-ignore-files-by-type
7793 Files with a @acronym{MIME} type matching this variable won't be viewed.
7794 Note that Gnus tries to guess what type the file is based on the name.
7795 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7796 kludgey.
7797
7798 @item gnus-uu-tmp-dir
7799 @vindex gnus-uu-tmp-dir
7800 Where @code{gnus-uu} does its work.
7801
7802 @item gnus-uu-do-not-unpack-archives
7803 @vindex gnus-uu-do-not-unpack-archives
7804 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7805 looking for files to display.
7806
7807 @item gnus-uu-view-and-save
7808 @vindex gnus-uu-view-and-save
7809 Non-@code{nil} means that the user will always be asked to save a file
7810 after viewing it.
7811
7812 @item gnus-uu-ignore-default-view-rules
7813 @vindex gnus-uu-ignore-default-view-rules
7814 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7815 rules.
7816
7817 @item gnus-uu-ignore-default-archive-rules
7818 @vindex gnus-uu-ignore-default-archive-rules
7819 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7820 unpacking commands.
7821
7822 @item gnus-uu-kill-carriage-return
7823 @vindex gnus-uu-kill-carriage-return
7824 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7825 from articles.
7826
7827 @item gnus-uu-unmark-articles-not-decoded
7828 @vindex gnus-uu-unmark-articles-not-decoded
7829 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7830 decoded articles as unread.
7831
7832 @item gnus-uu-correct-stripped-uucode
7833 @vindex gnus-uu-correct-stripped-uucode
7834 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7835 uuencoded files that have had trailing spaces deleted.
7836
7837 @item gnus-uu-pre-uudecode-hook
7838 @vindex gnus-uu-pre-uudecode-hook
7839 Hook run before sending a message to @code{uudecode}.
7840
7841 @item gnus-uu-view-with-metamail
7842 @vindex gnus-uu-view-with-metamail
7843 @cindex metamail
7844 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7845 commands defined by the rule variables and just fudge a @acronym{MIME}
7846 content type based on the file name.  The result will be fed to
7847 @code{metamail} for viewing.
7848
7849 @item gnus-uu-save-in-digest
7850 @vindex gnus-uu-save-in-digest
7851 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7852 decoding, will save in digests.  If this variable is @code{nil},
7853 @code{gnus-uu} will just save everything in a file without any
7854 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7855 to specify any meaningful volume and issue numbers were found, so I
7856 simply dropped them.
7857
7858 @end table
7859
7860
7861 @node Uuencoding and Posting
7862 @subsubsection Uuencoding and Posting
7863
7864 @table @code
7865
7866 @item gnus-uu-post-include-before-composing
7867 @vindex gnus-uu-post-include-before-composing
7868 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7869 before you compose the article.  If this variable is @code{t}, you can
7870 either include an encoded file with @kbd{C-c C-i} or have one included
7871 for you when you post the article.
7872
7873 @item gnus-uu-post-length
7874 @vindex gnus-uu-post-length
7875 Maximum length of an article.  The encoded file will be split into how
7876 many articles it takes to post the entire file.
7877
7878 @item gnus-uu-post-threaded
7879 @vindex gnus-uu-post-threaded
7880 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7881 thread.  This may not be smart, as no other decoder I have seen is able
7882 to follow threads when collecting uuencoded articles.  (Well, I have
7883 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7884 think that counts@dots{}) Default is @code{nil}.
7885
7886 @item gnus-uu-post-separate-description
7887 @vindex gnus-uu-post-separate-description
7888 Non-@code{nil} means that the description will be posted in a separate
7889 article.  The first article will typically be numbered (0/x).  If this
7890 variable is @code{nil}, the description the user enters will be included
7891 at the beginning of the first article, which will be numbered (1/x).
7892 Default is @code{t}.
7893
7894 @end table
7895
7896
7897 @node Viewing Files
7898 @subsection Viewing Files
7899 @cindex viewing files
7900 @cindex pseudo-articles
7901
7902 After decoding, if the file is some sort of archive, gnus will attempt
7903 to unpack the archive and see if any of the files in the archive can be
7904 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7905 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7906 uncompress and de-tar the main file, and then view the two pictures.
7907 This unpacking process is recursive, so if the archive contains archives
7908 of archives, it'll all be unpacked.
7909
7910 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7911 extracted file into the summary buffer.  If you go to these
7912 ``articles'', you will be prompted for a command to run (usually Gnus
7913 will make a suggestion), and then the command will be run.
7914
7915 @vindex gnus-view-pseudo-asynchronously
7916 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7917 until the viewing is done before proceeding.
7918
7919 @vindex gnus-view-pseudos
7920 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7921 the pseudo-articles into the summary buffer, but view them
7922 immediately.  If this variable is @code{not-confirm}, the user won't even
7923 be asked for a confirmation before viewing is done.
7924
7925 @vindex gnus-view-pseudos-separately
7926 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7927 pseudo-article will be created for each file to be viewed.  If
7928 @code{nil}, all files that use the same viewing command will be given as
7929 a list of parameters to that command.
7930
7931 @vindex gnus-insert-pseudo-articles
7932 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7933 pseudo-articles when decoding.  It is @code{t} by default.
7934
7935 So; there you are, reading your @emph{pseudo-articles} in your
7936 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7937 Why isn't anything real anymore? How did we get here?
7938
7939
7940 @node Article Treatment
7941 @section Article Treatment
7942
7943 Reading through this huge manual, you may have quite forgotten that the
7944 object of newsreaders is to actually, like, read what people have
7945 written.  Reading articles.  Unfortunately, people are quite bad at
7946 writing, so there are tons of functions and variables to make reading
7947 these articles easier.
7948
7949 @menu
7950 * Article Highlighting::        You want to make the article look like fruit salad.
7951 * Article Fontisizing::         Making emphasized text look nice.
7952 * Article Hiding::              You also want to make certain info go away.
7953 * Article Washing::             Lots of way-neat functions to make life better.
7954 * Article Header::              Doing various header transformations.
7955 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7956 * Article Button Levels::       Controlling appearance of buttons.
7957 * Article Date::                Grumble, UT!
7958 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7959 * Article Signature::           What is a signature?
7960 * Article Miscellanea::         Various other stuff.
7961 @end menu
7962
7963
7964 @node Article Highlighting
7965 @subsection Article Highlighting
7966 @cindex highlighting
7967
7968 Not only do you want your article buffer to look like fruit salad, but
7969 you want it to look like technicolor fruit salad.
7970
7971 @table @kbd
7972
7973 @item W H a
7974 @kindex W H a (Summary)
7975 @findex gnus-article-highlight
7976 @findex gnus-article-maybe-highlight
7977 Do much highlighting of the current article
7978 (@code{gnus-article-highlight}).  This function highlights header, cited
7979 text, the signature, and adds buttons to the body and the head.
7980
7981 @item W H h
7982 @kindex W H h (Summary)
7983 @findex gnus-article-highlight-headers
7984 @vindex gnus-header-face-alist
7985 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7986 highlighting will be done according to the @code{gnus-header-face-alist}
7987 variable, which is a list where each element has the form
7988 @code{(@var{regexp} @var{name} @var{content})}.
7989 @var{regexp} is a regular expression for matching the
7990 header, @var{name} is the face used for highlighting the header name
7991 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7992 the header value.  The first match made will be used.  Note that
7993 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7994
7995 @item W H c
7996 @kindex W H c (Summary)
7997 @findex gnus-article-highlight-citation
7998 Highlight cited text (@code{gnus-article-highlight-citation}).
7999
8000 Some variables to customize the citation highlights:
8001
8002 @table @code
8003 @vindex gnus-cite-parse-max-size
8004
8005 @item gnus-cite-parse-max-size
8006 If the article size if bigger than this variable (which is 25000 by
8007 default), no citation highlighting will be performed.
8008
8009 @item gnus-cite-max-prefix
8010 @vindex gnus-cite-max-prefix
8011 Maximum possible length for a citation prefix (default 20).
8012
8013 @item gnus-cite-face-list
8014 @vindex gnus-cite-face-list
8015 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8016 When there are citations from multiple articles in the same message,
8017 gnus will try to give each citation from each article its own face.
8018 This should make it easier to see who wrote what.
8019
8020 @item gnus-supercite-regexp
8021 @vindex gnus-supercite-regexp
8022 Regexp matching normal Supercite attribution lines.
8023
8024 @item gnus-supercite-secondary-regexp
8025 @vindex gnus-supercite-secondary-regexp
8026 Regexp matching mangled Supercite attribution lines.
8027
8028 @item gnus-cite-minimum-match-count
8029 @vindex gnus-cite-minimum-match-count
8030 Minimum number of identical prefixes we have to see before we believe
8031 that it's a citation.
8032
8033 @item gnus-cite-attribution-prefix
8034 @vindex gnus-cite-attribution-prefix
8035 Regexp matching the beginning of an attribution line.
8036
8037 @item gnus-cite-attribution-suffix
8038 @vindex gnus-cite-attribution-suffix
8039 Regexp matching the end of an attribution line.
8040
8041 @item gnus-cite-attribution-face
8042 @vindex gnus-cite-attribution-face
8043 Face used for attribution lines.  It is merged with the face for the
8044 cited text belonging to the attribution.
8045
8046 @end table
8047
8048
8049 @item W H s
8050 @kindex W H s (Summary)
8051 @vindex gnus-signature-separator
8052 @vindex gnus-signature-face
8053 @findex gnus-article-highlight-signature
8054 Highlight the signature (@code{gnus-article-highlight-signature}).
8055 Everything after @code{gnus-signature-separator} (@pxref{Article
8056 Signature}) in an article will be considered a signature and will be
8057 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8058 default.
8059
8060 @end table
8061
8062 @xref{Customizing Articles}, for how to highlight articles automatically.
8063
8064
8065 @node Article Fontisizing
8066 @subsection Article Fontisizing
8067 @cindex emphasis
8068 @cindex article emphasis
8069
8070 @findex gnus-article-emphasize
8071 @kindex W e (Summary)
8072 People commonly add emphasis to words in news articles by writing things
8073 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8074 this look nicer by running the article through the @kbd{W e}
8075 (@code{gnus-article-emphasize}) command.
8076
8077 @vindex gnus-emphasis-alist
8078 How the emphasis is computed is controlled by the
8079 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8080 element is a regular expression to be matched.  The second is a number
8081 that says what regular expression grouping is used to find the entire
8082 emphasized word.  The third is a number that says what regexp grouping
8083 should be displayed and highlighted.  (The text between these two
8084 groupings will be hidden.)  The fourth is the face used for
8085 highlighting.
8086
8087 @lisp
8088 (setq gnus-emphasis-alist
8089       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8090         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8091 @end lisp
8092
8093 @cindex slash
8094 @cindex asterisk
8095 @cindex underline
8096 @cindex /
8097 @cindex *
8098
8099 @vindex gnus-emphasis-underline
8100 @vindex gnus-emphasis-bold
8101 @vindex gnus-emphasis-italic
8102 @vindex gnus-emphasis-underline-bold
8103 @vindex gnus-emphasis-underline-italic
8104 @vindex gnus-emphasis-bold-italic
8105 @vindex gnus-emphasis-underline-bold-italic
8106 By default, there are seven rules, and they use the following faces:
8107 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8108 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8109 @code{gnus-emphasis-underline-italic},
8110 @code{gnus-emphasis-underline-bold}, and
8111 @code{gnus-emphasis-underline-bold-italic}.
8112
8113 If you want to change these faces, you can either use @kbd{M-x
8114 customize}, or you can use @code{copy-face}.  For instance, if you want
8115 to make @code{gnus-emphasis-italic} use a red face instead, you could
8116 say something like:
8117
8118 @lisp
8119 (copy-face 'red 'gnus-emphasis-italic)
8120 @end lisp
8121
8122 @vindex gnus-group-highlight-words-alist
8123
8124 If you want to highlight arbitrary words, you can use the
8125 @code{gnus-group-highlight-words-alist} variable, which uses the same
8126 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8127 parameter (@pxref{Group Parameters}) can also be used.
8128
8129 @xref{Customizing Articles}, for how to fontize articles automatically.
8130
8131
8132 @node Article Hiding
8133 @subsection Article Hiding
8134 @cindex article hiding
8135
8136 Or rather, hiding certain things in each article.  There usually is much
8137 too much cruft in most articles.
8138
8139 @table @kbd
8140
8141 @item W W a
8142 @kindex W W a (Summary)
8143 @findex gnus-article-hide
8144 Do quite a lot of hiding on the article buffer
8145 (@kbd{gnus-article-hide}).  In particular, this function will hide
8146 headers, @acronym{PGP}, cited text and the signature.
8147
8148 @item W W h
8149 @kindex W W h (Summary)
8150 @findex gnus-article-hide-headers
8151 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8152 Headers}.
8153
8154 @item W W b
8155 @kindex W W b (Summary)
8156 @findex gnus-article-hide-boring-headers
8157 Hide headers that aren't particularly interesting
8158 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8159
8160 @item W W s
8161 @kindex W W s (Summary)
8162 @findex gnus-article-hide-signature
8163 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8164 Signature}.
8165
8166 @item W W l
8167 @kindex W W l (Summary)
8168 @findex gnus-article-hide-list-identifiers
8169 @vindex gnus-list-identifiers
8170 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8171 are strings some mailing list servers add to the beginning of all
8172 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8173 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8174 may not contain @code{\\(..\\)}.
8175
8176 @table @code
8177
8178 @item gnus-list-identifiers
8179 @vindex gnus-list-identifiers
8180 A regular expression that matches list identifiers to be removed from
8181 subject.  This can also be a list of regular expressions.
8182
8183 @end table
8184
8185 @item W W P
8186 @kindex W W P (Summary)
8187 @findex gnus-article-hide-pem
8188 Hide @acronym{PEM} (privacy enhanced messages) cruft
8189 (@code{gnus-article-hide-pem}).
8190
8191 @item W W B
8192 @kindex W W B (Summary)
8193 @findex gnus-article-strip-banner
8194 @vindex gnus-article-banner-alist
8195 @vindex gnus-article-address-banner-alist
8196 @cindex banner
8197 @cindex OneList
8198 @cindex stripping advertisements
8199 @cindex advertisements
8200 Strip the banner specified by the @code{banner} group parameter
8201 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8202 annoying banners and/or signatures that some mailing lists and moderated
8203 groups adds to all the messages.  The way to use this function is to add
8204 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8205 group you want banners stripped from.  The parameter either be a string,
8206 which will be interpreted as a regular expression matching text to be
8207 removed, or the symbol @code{signature}, meaning that the (last)
8208 signature should be removed, or other symbol, meaning that the
8209 corresponding regular expression in @code{gnus-article-banner-alist} is
8210 used.
8211
8212 Regardless of a group, you can hide things like advertisements only when
8213 the sender of an article has a certain mail address specified in
8214 @code{gnus-article-address-banner-alist}.
8215
8216 @table @code
8217
8218 @item gnus-article-address-banner-alist
8219 @vindex gnus-article-address-banner-alist
8220 Alist of mail addresses and banners.  Each element has the form
8221 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8222 matching a mail address in the From header, @var{banner} is one of a
8223 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8224 a regexp and @code{nil}.  If @var{address} matches author's mail
8225 address, it will remove things like advertisements.  For example, if a
8226 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8227 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8228 sends, you can use the following element to remove them:
8229
8230 @lisp
8231 ("@@yoo-hoo\\.co\\.jp\\'" .
8232  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8233 @end lisp
8234
8235 @end table
8236
8237 @item W W c
8238 @kindex W W c (Summary)
8239 @findex gnus-article-hide-citation
8240 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8241 customizing the hiding:
8242
8243 @table @code
8244
8245 @item gnus-cited-opened-text-button-line-format
8246 @itemx gnus-cited-closed-text-button-line-format
8247 @vindex gnus-cited-closed-text-button-line-format
8248 @vindex gnus-cited-opened-text-button-line-format
8249 Gnus adds buttons to show where the cited text has been hidden, and to
8250 allow toggle hiding the text.  The format of the variable is specified
8251 by these format-like variable (@pxref{Formatting Variables}).  These
8252 specs are valid:
8253
8254 @table @samp
8255 @item b
8256 Starting point of the hidden text.
8257 @item e
8258 Ending point of the hidden text.
8259 @item l
8260 Number of characters in the hidden region.
8261 @item n
8262 Number of lines of hidden text.
8263 @end table
8264
8265 @item gnus-cited-lines-visible
8266 @vindex gnus-cited-lines-visible
8267 The number of lines at the beginning of the cited text to leave
8268 shown.  This can also be a cons cell with the number of lines at the top
8269 and bottom of the text, respectively, to remain visible.
8270
8271 @end table
8272
8273 @item W W C-c
8274 @kindex W W C-c (Summary)
8275 @findex gnus-article-hide-citation-maybe
8276
8277 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8278 following two variables:
8279
8280 @table @code
8281 @item gnus-cite-hide-percentage
8282 @vindex gnus-cite-hide-percentage
8283 If the cited text is of a bigger percentage than this variable (default
8284 50), hide the cited text.
8285
8286 @item gnus-cite-hide-absolute
8287 @vindex gnus-cite-hide-absolute
8288 The cited text must have at least this length (default 10) before it
8289 is hidden.
8290 @end table
8291
8292 @item W W C
8293 @kindex W W C (Summary)
8294 @findex gnus-article-hide-citation-in-followups
8295 Hide cited text in articles that aren't roots
8296 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8297 useful as an interactive command, but might be a handy function to stick
8298 have happen automatically (@pxref{Customizing Articles}).
8299
8300 @end table
8301
8302 All these ``hiding'' commands are toggles, but if you give a negative
8303 prefix to these commands, they will show what they have previously
8304 hidden.  If you give a positive prefix, they will always hide.
8305
8306 Also @pxref{Article Highlighting} for further variables for
8307 citation customization.
8308
8309 @xref{Customizing Articles}, for how to hide article elements
8310 automatically.
8311
8312
8313 @node Article Washing
8314 @subsection Article Washing
8315 @cindex washing
8316 @cindex article washing
8317
8318 We call this ``article washing'' for a really good reason.  Namely, the
8319 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8320
8321 @dfn{Washing} is defined by us as ``changing something from something to
8322 something else'', but normally results in something looking better.
8323 Cleaner, perhaps.
8324
8325 @xref{Customizing Articles}, if you want to change how Gnus displays
8326 articles by default.
8327
8328 @table @kbd
8329
8330 @item C-u g
8331 This is not really washing, it's sort of the opposite of washing.  If
8332 you type this, you see the article exactly as it exists on disk or on
8333 the server.
8334
8335 @item g
8336 Force redisplaying of the current article
8337 (@code{gnus-summary-show-article}).  This is also not really washing.
8338 If you type this, you see the article without any previously applied
8339 interactive Washing functions but with all default treatments
8340 (@pxref{Customizing Articles}).
8341
8342 @item W l
8343 @kindex W l (Summary)
8344 @findex gnus-summary-stop-page-breaking
8345 Remove page breaks from the current article
8346 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8347 delimiters.
8348
8349 @item W r
8350 @kindex W r (Summary)
8351 @findex gnus-summary-caesar-message
8352 @c @icon{gnus-summary-caesar-message}
8353 Do a Caesar rotate (rot13) on the article buffer
8354 (@code{gnus-summary-caesar-message}).
8355 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8356 (Typically offensive jokes and such.)
8357
8358 It's commonly called ``rot13'' because each letter is rotated 13
8359 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8360 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8361 is rumored to have employed this form of, uh, somewhat weak encryption.
8362
8363 @item W m
8364 @kindex W m (Summary)
8365 @findex gnus-summary-morse-message
8366 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8367
8368 @item W t
8369 @item t
8370 @kindex W t (Summary)
8371 @kindex t (Summary)
8372 @findex gnus-summary-toggle-header
8373 Toggle whether to display all headers in the article buffer
8374 (@code{gnus-summary-toggle-header}).
8375
8376 @item W v
8377 @kindex W v (Summary)
8378 @findex gnus-summary-verbose-headers
8379 Toggle whether to display all headers in the article buffer permanently
8380 (@code{gnus-summary-verbose-headers}).
8381
8382 @item W m
8383 @kindex W m (Summary)
8384 @findex gnus-summary-toggle-mime
8385 Toggle whether to run the article through @acronym{MIME} before
8386 displaying (@code{gnus-summary-toggle-mime}).
8387
8388 @item W o
8389 @kindex W o (Summary)
8390 @findex gnus-article-treat-overstrike
8391 Treat overstrike (@code{gnus-article-treat-overstrike}).
8392
8393 @item W d
8394 @kindex W d (Summary)
8395 @findex gnus-article-treat-dumbquotes
8396 @vindex gnus-article-dumbquotes-map
8397 @cindex Smartquotes
8398 @cindex M****s*** sm*rtq**t*s
8399 @cindex Latin 1
8400 Treat M****s*** sm*rtq**t*s according to
8401 @code{gnus-article-dumbquotes-map}
8402 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8403 whether a character is a sm*rtq**t* or not, so it should only be used
8404 interactively.
8405
8406 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8407 an attempt to provide more quoting characters.  If you see something
8408 like @code{\222} or @code{\264} where you're expecting some kind of
8409 apostrophe or quotation mark, then try this wash.
8410
8411 @item W Y f
8412 @kindex W Y f (Summary)
8413 @findex gnus-article-outlook-deuglify-article
8414 @cindex Outlook Express
8415 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8416 unwrap lines, repair attribution and rearrange citation.
8417 (@code{gnus-article-outlook-deuglify-article}).
8418
8419 @item W Y u
8420 @kindex W Y u (Summary)
8421 @findex gnus-article-outlook-unwrap-lines
8422 @vindex gnus-outlook-deuglify-unwrap-min
8423 @vindex gnus-outlook-deuglify-unwrap-max
8424 Unwrap lines that appear to be wrapped citation lines.  You can control
8425 what lines will be unwrapped by frobbing
8426 @code{gnus-outlook-deuglify-unwrap-min} and
8427 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8428 maximum length of an unwrapped citation line.
8429 (@code{gnus-article-outlook-unwrap-lines}).
8430
8431 @item W Y a
8432 @kindex W Y a (Summary)
8433 @findex gnus-article-outlook-repair-attribution
8434 Repair a broken attribution line.@*
8435 (@code{gnus-article-outlook-repair-attribution}).
8436
8437 @item W Y c
8438 @kindex W Y c (Summary)
8439 @findex gnus-article-outlook-rearrange-citation
8440 Repair broken citations by rearranging the text.
8441 (@code{gnus-article-outlook-rearrange-citation}).
8442
8443 @item W w
8444 @kindex W w (Summary)
8445 @findex gnus-article-fill-cited-article
8446 Do word wrap (@code{gnus-article-fill-cited-article}).
8447
8448 You can give the command a numerical prefix to specify the width to use
8449 when filling.
8450
8451 @item W Q
8452 @kindex W Q (Summary)
8453 @findex gnus-article-fill-long-lines
8454 Fill long lines (@code{gnus-article-fill-long-lines}).
8455
8456 @item W C
8457 @kindex W C (Summary)
8458 @findex gnus-article-capitalize-sentences
8459 Capitalize the first word in each sentence
8460 (@code{gnus-article-capitalize-sentences}).
8461
8462 @item W c
8463 @kindex W c (Summary)
8464 @findex gnus-article-remove-cr
8465 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8466 (this takes care of DOS line endings), and then translate any remaining
8467 CRs into LF (this takes care of Mac line endings)
8468 (@code{gnus-article-remove-cr}).
8469
8470 @kindex W q (Summary)
8471 @findex gnus-article-de-quoted-unreadable
8472 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8473 Quoted-Printable is one common @acronym{MIME} encoding employed when
8474 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8475 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8476 doesn't look very readable to me.  Note that this is usually done
8477 automatically by Gnus if the message in question has a
8478 @code{Content-Transfer-Encoding} header that says that this encoding
8479 has been done.  If a prefix is given, a charset will be asked for.
8480
8481 @item W 6
8482 @kindex W 6 (Summary)
8483 @findex gnus-article-de-base64-unreadable
8484 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8485 one common @acronym{MIME} encoding employed when sending
8486 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8487 usually done automatically by Gnus if the message in question has a
8488 @code{Content-Transfer-Encoding} header that says that this encoding
8489 has been done.  If a prefix is given, a charset will be asked for.
8490
8491 @item W Z
8492 @kindex W Z (Summary)
8493 @findex gnus-article-decode-HZ
8494 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8495 common encoding employed when sending Chinese articles.  It typically
8496 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8497
8498 @item W u
8499 @kindex W u (Summary)
8500 @findex gnus-article-unsplit-urls
8501 Remove newlines from within URLs.  Some mailers insert newlines into
8502 outgoing email messages to keep lines short.  This reformatting can
8503 split long URLs onto multiple lines.  Repair those URLs by removing
8504 the newlines (@code{gnus-article-unsplit-urls}).
8505
8506 @item W h
8507 @kindex W h (Summary)
8508 @findex gnus-article-wash-html
8509 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8510 usually done automatically by Gnus if the message in question has a
8511 @code{Content-Type} header that says that the message is @acronym{HTML}.
8512
8513 If a prefix is given, a charset will be asked for.
8514
8515 @vindex gnus-article-wash-function
8516 The default is to use the function specified by
8517 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8518 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8519 @acronym{HTML}, but this is controlled by the
8520 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8521 can use include:
8522
8523 @table @code
8524 @item w3
8525 Use Emacs/w3.
8526
8527 @item w3m
8528 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8529
8530 @item links
8531 Use @uref{http://links.sf.net/, Links}.
8532
8533 @item lynx
8534 Use @uref{http://lynx.isc.org/, Lynx}.
8535
8536 @item html2text
8537 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8538
8539 @end table
8540
8541 @item W b
8542 @kindex W b (Summary)
8543 @findex gnus-article-add-buttons
8544 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8545 @xref{Article Buttons}.
8546
8547 @item W B
8548 @kindex W B (Summary)
8549 @findex gnus-article-add-buttons-to-head
8550 Add clickable buttons to the article headers
8551 (@code{gnus-article-add-buttons-to-head}).
8552
8553 @item W p
8554 @kindex W p (Summary)
8555 @findex gnus-article-verify-x-pgp-sig
8556 Verify a signed control message
8557 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8558 @code{newgroup} and @code{checkgroups} are usually signed by the
8559 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8560 the maintainer to your keyring to verify the
8561 message.@footnote{@acronym{PGP} keys for many hierarchies are
8562 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8563
8564 @item W s
8565 @kindex W s (Summary)
8566 @findex gnus-summary-force-verify-and-decrypt
8567 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8568 @acronym{S/MIME}) message
8569 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8570
8571 @item W a
8572 @kindex W a (Summary)
8573 @findex gnus-article-strip-headers-in-body
8574 Strip headers like the @code{X-No-Archive} header from the beginning of
8575 article bodies (@code{gnus-article-strip-headers-in-body}).
8576
8577 @item W E l
8578 @kindex W E l (Summary)
8579 @findex gnus-article-strip-leading-blank-lines
8580 Remove all blank lines from the beginning of the article
8581 (@code{gnus-article-strip-leading-blank-lines}).
8582
8583 @item W E m
8584 @kindex W E m (Summary)
8585 @findex gnus-article-strip-multiple-blank-lines
8586 Replace all blank lines with empty lines and then all multiple empty
8587 lines with a single empty line.
8588 (@code{gnus-article-strip-multiple-blank-lines}).
8589
8590 @item W E t
8591 @kindex W E t (Summary)
8592 @findex gnus-article-remove-trailing-blank-lines
8593 Remove all blank lines at the end of the article
8594 (@code{gnus-article-remove-trailing-blank-lines}).
8595
8596 @item W E a
8597 @kindex W E a (Summary)
8598 @findex gnus-article-strip-blank-lines
8599 Do all the three commands above
8600 (@code{gnus-article-strip-blank-lines}).
8601
8602 @item W E A
8603 @kindex W E A (Summary)
8604 @findex gnus-article-strip-all-blank-lines
8605 Remove all blank lines
8606 (@code{gnus-article-strip-all-blank-lines}).
8607
8608 @item W E s
8609 @kindex W E s (Summary)
8610 @findex gnus-article-strip-leading-space
8611 Remove all white space from the beginning of all lines of the article
8612 body (@code{gnus-article-strip-leading-space}).
8613
8614 @item W E e
8615 @kindex W E e (Summary)
8616 @findex gnus-article-strip-trailing-space
8617 Remove all white space from the end of all lines of the article
8618 body (@code{gnus-article-strip-trailing-space}).
8619
8620 @end table
8621
8622 @xref{Customizing Articles}, for how to wash articles automatically.
8623
8624
8625 @node Article Header
8626 @subsection Article Header
8627
8628 These commands perform various transformations of article header.
8629
8630 @table @kbd
8631
8632 @item W G u
8633 @kindex W G u (Summary)
8634 @findex gnus-article-treat-unfold-headers
8635 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8636
8637 @item W G n
8638 @kindex W G n (Summary)
8639 @findex gnus-article-treat-fold-newsgroups
8640 Fold the @code{Newsgroups} and @code{Followup-To} headers
8641 (@code{gnus-article-treat-fold-newsgroups}).
8642
8643 @item W G f
8644 @kindex W G f (Summary)
8645 @findex gnus-article-treat-fold-headers
8646 Fold all the message headers
8647 (@code{gnus-article-treat-fold-headers}).
8648
8649 @item W E w
8650 @kindex W E w
8651 @findex gnus-article-remove-leading-whitespace
8652 Remove excessive whitespace from all headers
8653 (@code{gnus-article-remove-leading-whitespace}).
8654
8655 @end table
8656
8657
8658 @node Article Buttons
8659 @subsection Article Buttons
8660 @cindex buttons
8661
8662 People often include references to other stuff in articles, and it would
8663 be nice if Gnus could just fetch whatever it is that people talk about
8664 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8665 button on these references.
8666
8667 @vindex gnus-button-man-handler
8668 Gnus adds @dfn{buttons} to certain standard references by default:
8669 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8670 Emacs or Gnus related references.  This is controlled by two variables,
8671 one that handles article bodies and one that handles article heads:
8672
8673 @table @code
8674
8675 @item gnus-button-alist
8676 @vindex gnus-button-alist
8677 This is an alist where each entry has this form:
8678
8679 @lisp
8680 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8681 @end lisp
8682
8683 @table @var
8684
8685 @item regexp
8686 All text that match this regular expression (case insensitive) will be
8687 considered an external reference.  Here's a typical regexp that matches
8688 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8689 variable containing a regexp, useful variables to use include
8690 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8691
8692 @item button-par
8693 Gnus has to know which parts of the matches is to be highlighted.  This
8694 is a number that says what sub-expression of the regexp is to be
8695 highlighted.  If you want it all highlighted, you use 0 here.
8696
8697 @item use-p
8698 This form will be @code{eval}ed, and if the result is non-@code{nil},
8699 this is considered a match.  This is useful if you want extra sifting to
8700 avoid false matches.  Often variables named
8701 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8702 Levels}, but any other form may be used too.
8703
8704 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8705
8706 @item function
8707 This function will be called when you click on this button.
8708
8709 @item data-par
8710 As with @var{button-par}, this is a sub-expression number, but this one
8711 says which part of the match is to be sent as data to @var{function}.
8712
8713 @end table
8714
8715 So the full entry for buttonizing URLs is then
8716
8717 @lisp
8718 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8719 @end lisp
8720
8721 @item gnus-header-button-alist
8722 @vindex gnus-header-button-alist
8723 This is just like the other alist, except that it is applied to the
8724 article head only, and that each entry has an additional element that is
8725 used to say what headers to apply the buttonize coding to:
8726
8727 @lisp
8728 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8729 @end lisp
8730
8731 @var{header} is a regular expression.
8732 @end table
8733
8734 @subsubsection Related variables and functions
8735
8736 @table @code
8737 @item gnus-button-@var{*}-level
8738 @xref{Article Button Levels}.
8739
8740 @c Stuff related to gnus-button-browse-level
8741
8742 @item gnus-button-url-regexp
8743 @vindex gnus-button-url-regexp
8744 A regular expression that matches embedded URLs.  It is used in the
8745 default values of the variables above.
8746
8747 @c Stuff related to gnus-button-man-level
8748
8749 @item gnus-button-man-handler
8750 @vindex gnus-button-man-handler
8751 The function to use for displaying man pages.  It must take at least one
8752 argument with a string naming the man page.
8753
8754 @c Stuff related to gnus-button-message-level
8755
8756 @item gnus-button-mid-or-mail-regexp
8757 @vindex gnus-button-mid-or-mail-regexp
8758 Regular expression that matches a message ID or a mail address.
8759
8760 @item gnus-button-prefer-mid-or-mail
8761 @vindex gnus-button-prefer-mid-or-mail
8762 This variable determines what to do when the button on a string as
8763 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8764 message ID or a mail address.  If it is one of the symbols @code{mid} or
8765 @code{mail}, Gnus will always assume that the string is a message ID or
8766 a mail address, respectively.  If this variable is set to the symbol
8767 @code{ask}, always query the user what do do.  If it is a function, this
8768 function will be called with the string as its only argument.  The
8769 function must return @code{mid}, @code{mail}, @code{invalid} or
8770 @code{ask}.  The default value is the function
8771 @code{gnus-button-mid-or-mail-heuristic}.
8772
8773 @item gnus-button-mid-or-mail-heuristic
8774 @findex gnus-button-mid-or-mail-heuristic
8775 Function that guesses whether its argument is a message ID or a mail
8776 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8777 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8778 string is invalid.
8779
8780 @item gnus-button-mid-or-mail-heuristic-alist
8781 @vindex gnus-button-mid-or-mail-heuristic-alist
8782 An alist of @code{(RATE . REGEXP)} pairs used by the function
8783 @code{gnus-button-mid-or-mail-heuristic}.
8784
8785 @c Stuff related to gnus-button-tex-level
8786
8787 @item gnus-button-ctan-handler
8788 @findex gnus-button-ctan-handler
8789 The function to use for displaying CTAN links.  It must take one
8790 argument, the string naming the URL.
8791
8792 @item gnus-ctan-url
8793 @vindex gnus-ctan-url
8794 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8795 by @code{gnus-button-ctan-handler}.
8796
8797 @c Misc stuff
8798
8799 @item gnus-article-button-face
8800 @vindex gnus-article-button-face
8801 Face used on buttons.
8802
8803 @item gnus-article-mouse-face
8804 @vindex gnus-article-mouse-face
8805 Face used when the mouse cursor is over a button.
8806
8807 @end table
8808
8809 @xref{Customizing Articles}, for how to buttonize articles automatically.
8810
8811
8812 @node Article Button Levels
8813 @subsection Article button levels
8814 @cindex button levels
8815 The higher the value of the variables @code{gnus-button-@var{*}-level},
8816 the more buttons will appear.  If the level is zero, no corresponding
8817 buttons are displayed.  With the default value (which is 5) you should
8818 already see quite a lot of buttons.  With higher levels, you will see
8819 more buttons, but you may also get more false positives.  To avoid them,
8820 you can set the variables @code{gnus-button-@var{*}-level} local to
8821 specific groups (@pxref{Group Parameters}).  Here's an example for the
8822 variable @code{gnus-parameters}:
8823
8824 @lisp
8825 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8826 (setq gnus-parameters
8827       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8828         ("\\<unix\\>"               (gnus-button-man-level 10))
8829         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8830 @end lisp
8831
8832 @table @code
8833
8834 @item gnus-button-browse-level
8835 @vindex gnus-button-browse-level
8836 Controls the display of references to message IDs, mail addresses and
8837 news URLs.  Related variables and functions include
8838 @code{gnus-button-url-regexp}, @code{browse-url}, and
8839 @code{browse-url-browser-function}.
8840
8841 @item gnus-button-emacs-level
8842 @vindex gnus-button-emacs-level
8843 Controls the display of Emacs or Gnus references.  Related functions are
8844 @code{gnus-button-handle-custom},
8845 @code{gnus-button-handle-describe-function},
8846 @code{gnus-button-handle-describe-variable},
8847 @code{gnus-button-handle-symbol},
8848 @code{gnus-button-handle-describe-key},
8849 @code{gnus-button-handle-apropos},
8850 @code{gnus-button-handle-apropos-command},
8851 @code{gnus-button-handle-apropos-variable},
8852 @code{gnus-button-handle-apropos-documentation}, and
8853 @code{gnus-button-handle-library}.
8854
8855 @item gnus-button-man-level
8856 @vindex gnus-button-man-level
8857 Controls the display of references to (Unix) man pages.
8858 See @code{gnus-button-man-handler}.
8859
8860 @item gnus-button-message-level
8861 @vindex gnus-button-message-level
8862 Controls the display of message IDs, mail addresses and news URLs.
8863 Related variables and functions include
8864 @code{gnus-button-mid-or-mail-regexp},
8865 @code{gnus-button-prefer-mid-or-mail},
8866 @code{gnus-button-mid-or-mail-heuristic}, and
8867 @code{gnus-button-mid-or-mail-heuristic-alist}.
8868
8869 @item gnus-button-tex-level
8870 @vindex gnus-button-tex-level
8871 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8872 URLs.  See the variables @code{gnus-ctan-url},
8873 @code{gnus-button-ctan-handler},
8874 @code{gnus-button-ctan-directory-regexp}, and
8875 @code{gnus-button-handle-ctan-bogus-regexp}.
8876
8877 @end table
8878
8879
8880 @node Article Date
8881 @subsection Article Date
8882
8883 The date is most likely generated in some obscure timezone you've never
8884 heard of, so it's quite nice to be able to find out what the time was
8885 when the article was sent.
8886
8887 @table @kbd
8888
8889 @item W T u
8890 @kindex W T u (Summary)
8891 @findex gnus-article-date-ut
8892 Display the date in UT (aka. GMT, aka ZULU)
8893 (@code{gnus-article-date-ut}).
8894
8895 @item W T i
8896 @kindex W T i (Summary)
8897 @findex gnus-article-date-iso8601
8898 @cindex ISO 8601
8899 Display the date in international format, aka. ISO 8601
8900 (@code{gnus-article-date-iso8601}).
8901
8902 @item W T l
8903 @kindex W T l (Summary)
8904 @findex gnus-article-date-local
8905 Display the date in the local timezone (@code{gnus-article-date-local}).
8906
8907 @item W T p
8908 @kindex W T p (Summary)
8909 @findex gnus-article-date-english
8910 Display the date in a format that's easily pronounceable in English
8911 (@code{gnus-article-date-english}).
8912
8913 @item W T s
8914 @kindex W T s (Summary)
8915 @vindex gnus-article-time-format
8916 @findex gnus-article-date-user
8917 @findex format-time-string
8918 Display the date using a user-defined format
8919 (@code{gnus-article-date-user}).  The format is specified by the
8920 @code{gnus-article-time-format} variable, and is a string that's passed
8921 to @code{format-time-string}.  See the documentation of that variable
8922 for a list of possible format specs.
8923
8924 @item W T e
8925 @kindex W T e (Summary)
8926 @findex gnus-article-date-lapsed
8927 @findex gnus-start-date-timer
8928 @findex gnus-stop-date-timer
8929 Say how much time has elapsed between the article was posted and now
8930 (@code{gnus-article-date-lapsed}).  It looks something like:
8931
8932 @example
8933 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8934 @end example
8935
8936 @vindex gnus-article-date-lapsed-new-header
8937 The value of @code{gnus-article-date-lapsed-new-header} determines
8938 whether this header will just be added below the old Date one, or will
8939 replace it.
8940
8941 An advantage of using Gnus to read mail is that it converts simple bugs
8942 into wonderful absurdities.
8943
8944 If you want to have this line updated continually, you can put
8945
8946 @lisp
8947 (gnus-start-date-timer)
8948 @end lisp
8949
8950 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8951 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8952 command.
8953
8954 @item W T o
8955 @kindex W T o (Summary)
8956 @findex gnus-article-date-original
8957 Display the original date (@code{gnus-article-date-original}).  This can
8958 be useful if you normally use some other conversion function and are
8959 worried that it might be doing something totally wrong.  Say, claiming
8960 that the article was posted in 1854.  Although something like that is
8961 @emph{totally} impossible.  Don't you trust me? *titter*
8962
8963 @end table
8964
8965 @xref{Customizing Articles}, for how to display the date in your
8966 preferred format automatically.
8967
8968
8969 @node Article Display
8970 @subsection Article Display
8971 @cindex picons
8972 @cindex x-face
8973 @cindex smileys
8974
8975 These commands add various frivolous display gimmicks to the article
8976 buffer in Emacs versions that support them.
8977
8978 @code{X-Face} headers are small black-and-white images supplied by the
8979 message headers (@pxref{X-Face}).
8980
8981 @code{Face} headers are small colored images supplied by the message
8982 headers (@pxref{Face}).
8983
8984 Smileys are those little @samp{:-)} symbols that people like to litter
8985 their messages with (@pxref{Smileys}).
8986
8987 Picons, on the other hand, reside on your own system, and Gnus will
8988 try to match the headers to what you have (@pxref{Picons}).
8989
8990 All these functions are toggles---if the elements already exist,
8991 they'll be removed.
8992
8993 @table @kbd
8994 @item W D x
8995 @kindex W D x (Summary)
8996 @findex gnus-article-display-x-face
8997 Display an @code{X-Face} in the @code{From} header.
8998 (@code{gnus-article-display-x-face}).
8999
9000 @item W D d
9001 @kindex W D d (Summary)
9002 @findex gnus-article-display-face
9003 Display a @code{Face} in the @code{From} header.
9004 (@code{gnus-article-display-face}).
9005
9006 @item W D s
9007 @kindex W D s (Summary)
9008 @findex gnus-treat-smiley
9009 Display smileys (@code{gnus-treat-smiley}).
9010
9011 @item W D f
9012 @kindex W D f (Summary)
9013 @findex gnus-treat-from-picon
9014 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9015
9016 @item W D m
9017 @kindex W D m (Summary)
9018 @findex gnus-treat-mail-picon
9019 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9020 (@code{gnus-treat-mail-picon}).
9021
9022 @item W D n
9023 @kindex W D n (Summary)
9024 @findex gnus-treat-newsgroups-picon
9025 Piconify all news headers (i. e., @code{Newsgroups} and
9026 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9027
9028 @item W D D
9029 @kindex W D D (Summary)
9030 @findex gnus-article-remove-images
9031 Remove all images from the article buffer
9032 (@code{gnus-article-remove-images}).
9033
9034 @end table
9035
9036
9037
9038 @node Article Signature
9039 @subsection Article Signature
9040 @cindex signatures
9041 @cindex article signature
9042
9043 @vindex gnus-signature-separator
9044 Each article is divided into two parts---the head and the body.  The
9045 body can be divided into a signature part and a text part.  The variable
9046 that says what is to be considered a signature is
9047 @code{gnus-signature-separator}.  This is normally the standard
9048 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9049 non-standard signature separators, so this variable can also be a list
9050 of regular expressions to be tested, one by one.  (Searches are done
9051 from the end of the body towards the beginning.)  One likely value is:
9052
9053 @lisp
9054 (setq gnus-signature-separator
9055       '("^-- $"         ; @r{The standard}
9056         "^-- *$"        ; @r{A common mangling}
9057         "^-------*$"    ; @r{Many people just use a looong}
9058                         ; @r{line of dashes.  Shame!}
9059         "^ *--------*$" ; @r{Double-shame!}
9060         "^________*$"   ; @r{Underscores are also popular}
9061         "^========*$")) ; @r{Pervert!}
9062 @end lisp
9063
9064 The more permissive you are, the more likely it is that you'll get false
9065 positives.
9066
9067 @vindex gnus-signature-limit
9068 @code{gnus-signature-limit} provides a limit to what is considered a
9069 signature when displaying articles.
9070
9071 @enumerate
9072 @item
9073 If it is an integer, no signature may be longer (in characters) than
9074 that integer.
9075 @item
9076 If it is a floating point number, no signature may be longer (in lines)
9077 than that number.
9078 @item
9079 If it is a function, the function will be called without any parameters,
9080 and if it returns @code{nil}, there is no signature in the buffer.
9081 @item
9082 If it is a string, it will be used as a regexp.  If it matches, the text
9083 in question is not a signature.
9084 @end enumerate
9085
9086 This variable can also be a list where the elements may be of the types
9087 listed above.  Here's an example:
9088
9089 @lisp
9090 (setq gnus-signature-limit
9091       '(200.0 "^---*Forwarded article"))
9092 @end lisp
9093
9094 This means that if there are more than 200 lines after the signature
9095 separator, or the text after the signature separator is matched by
9096 the regular expression @samp{^---*Forwarded article}, then it isn't a
9097 signature after all.
9098
9099
9100 @node Article Miscellanea
9101 @subsection Article Miscellanea
9102
9103 @table @kbd
9104 @item A t
9105 @kindex A t (Summary)
9106 @findex gnus-article-babel
9107 Translate the article from one language to another
9108 (@code{gnus-article-babel}).
9109
9110 @end table
9111
9112
9113 @node MIME Commands
9114 @section MIME Commands
9115 @cindex MIME decoding
9116 @cindex attachments
9117 @cindex viewing attachments
9118
9119 The following commands all understand the numerical prefix.  For
9120 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9121
9122 @table @kbd
9123 @item b
9124 @itemx K v
9125 @kindex b (Summary)
9126 @kindex K v (Summary)
9127 View the @acronym{MIME} part.
9128
9129 @item K o
9130 @kindex K o (Summary)
9131 Save the @acronym{MIME} part.
9132
9133 @item K c
9134 @kindex K c (Summary)
9135 Copy the @acronym{MIME} part.
9136
9137 @item K e
9138 @kindex K e (Summary)
9139 View the @acronym{MIME} part externally.
9140
9141 @item K i
9142 @kindex K i (Summary)
9143 View the @acronym{MIME} part internally.
9144
9145 @item K |
9146 @kindex K | (Summary)
9147 Pipe the @acronym{MIME} part to an external command.
9148 @end table
9149
9150 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9151 the same manner:
9152
9153 @table @kbd
9154 @item K b
9155 @kindex K b (Summary)
9156 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9157 mostly useful if you wish to save (or perform other actions) on inlined
9158 parts.
9159
9160 @item K m
9161 @kindex K m (Summary)
9162 @findex gnus-summary-repair-multipart
9163 Some multipart messages are transmitted with missing or faulty headers.
9164 This command will attempt to ``repair'' these messages so that they can
9165 be viewed in a more pleasant manner
9166 (@code{gnus-summary-repair-multipart}).
9167
9168 @item X m
9169 @kindex X m (Summary)
9170 @findex gnus-summary-save-parts
9171 Save all parts matching a @acronym{MIME} type to a directory
9172 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9173 convention (@pxref{Process/Prefix}).
9174
9175 @item M-t
9176 @kindex M-t (Summary)
9177 @findex gnus-summary-toggle-display-buttonized
9178 Toggle the buttonized display of the article buffer
9179 (@code{gnus-summary-toggle-display-buttonized}).
9180
9181 @item W M w
9182 @kindex W M w (Summary)
9183 @findex gnus-article-decode-mime-words
9184 Decode RFC 2047-encoded words in the article headers
9185 (@code{gnus-article-decode-mime-words}).
9186
9187 @item W M c
9188 @kindex W M c (Summary)
9189 @findex gnus-article-decode-charset
9190 Decode encoded article bodies as well as charsets
9191 (@code{gnus-article-decode-charset}).
9192
9193 This command looks in the @code{Content-Type} header to determine the
9194 charset.  If there is no such header in the article, you can give it a
9195 prefix, which will prompt for the charset to decode as.  In regional
9196 groups where people post using some common encoding (but do not
9197 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9198 parameter to the required charset (@pxref{Group Parameters}).
9199
9200 @item W M v
9201 @kindex W M v (Summary)
9202 @findex gnus-mime-view-all-parts
9203 View all the @acronym{MIME} parts in the current article
9204 (@code{gnus-mime-view-all-parts}).
9205
9206 @end table
9207
9208 Relevant variables:
9209
9210 @table @code
9211 @item gnus-ignored-mime-types
9212 @vindex gnus-ignored-mime-types
9213 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9214 this list will be completely ignored by Gnus.  The default value is
9215 @code{nil}.
9216
9217 To have all Vcards be ignored, you'd say something like this:
9218
9219 @lisp
9220 (setq gnus-ignored-mime-types
9221       '("text/x-vcard"))
9222 @end lisp
9223
9224 @item gnus-article-loose-mime
9225 @vindex gnus-article-loose-mime
9226 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9227 before interpreting the message as a @acronym{MIME} message.  This helps
9228 when reading messages from certain broken mail user agents.  The
9229 default is @code{nil}.
9230
9231 @item gnus-article-emulate-mime
9232 @vindex gnus-article-emulate-mime
9233 There are other, non-@acronym{MIME} encoding methods used.  The most common
9234 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9235 this variable is non-@code{nil}, Gnus will look in message bodies to
9236 see if it finds these encodings, and if so, it'll run them through the
9237 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9238
9239 @item gnus-unbuttonized-mime-types
9240 @vindex gnus-unbuttonized-mime-types
9241 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9242 this list won't have @acronym{MIME} buttons inserted unless they aren't
9243 displayed or this variable is overridden by
9244 @code{gnus-buttonized-mime-types}.  The default value is
9245 @code{(".*/.*")}.  This variable is only used when
9246 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9247
9248 @item gnus-buttonized-mime-types
9249 @vindex gnus-buttonized-mime-types
9250 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9251 this list will have @acronym{MIME} buttons inserted unless they aren't
9252 displayed.  This variable overrides
9253 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9254 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9255 is @code{nil}.
9256
9257 To see e.g. security buttons but no other buttons, you could set this
9258 variable to @code{("multipart/signed")} and leave
9259 @code{gnus-unbuttonized-mime-types} at the default value.
9260
9261 @item gnus-inhibit-mime-unbuttonizing
9262 @vindex gnus-inhibit-mime-unbuttonizing
9263 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9264 default value is @code{nil}.
9265
9266 @item gnus-article-mime-part-function
9267 @vindex gnus-article-mime-part-function
9268 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9269 handle as the parameter.  The function is meant to be used to allow
9270 users to gather information from the article (e. g., add Vcard info to
9271 the bbdb database) or to do actions based on parts (e. g., automatically
9272 save all jpegs into some directory).
9273
9274 Here's an example function the does the latter:
9275
9276 @lisp
9277 (defun my-save-all-jpeg-parts (handle)
9278   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9279     (with-temp-buffer
9280       (insert (mm-get-part handle))
9281       (write-region (point-min) (point-max)
9282                     (read-file-name "Save jpeg to: ")))))
9283 (setq gnus-article-mime-part-function
9284       'my-save-all-jpeg-parts)
9285 @end lisp
9286
9287 @vindex gnus-mime-multipart-functions
9288 @item gnus-mime-multipart-functions
9289 Alist of @acronym{MIME} multipart types and functions to handle them.
9290
9291 @vindex mm-file-name-rewrite-functions
9292 @item mm-file-name-rewrite-functions
9293 List of functions used for rewriting file names of @acronym{MIME} parts.
9294 Each function takes a file name as input and returns a file name.
9295
9296 Ready-made functions include@*
9297 @code{mm-file-name-delete-whitespace},
9298 @code{mm-file-name-trim-whitespace},
9299 @code{mm-file-name-collapse-whitespace}, and
9300 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9301 the variable @code{mm-file-name-replace-whitespace} to replace each
9302 whitespace character in a file name with that string; default value
9303 is @code{"_"} (a single underscore).
9304 @findex mm-file-name-delete-whitespace
9305 @findex mm-file-name-trim-whitespace
9306 @findex mm-file-name-collapse-whitespace
9307 @findex mm-file-name-replace-whitespace
9308 @vindex mm-file-name-replace-whitespace
9309
9310 The standard functions @code{capitalize}, @code{downcase},
9311 @code{upcase}, and @code{upcase-initials} may be useful, too.
9312
9313 Everybody knows that whitespace characters in file names are evil,
9314 except those who don't know.  If you receive lots of attachments from
9315 such unenlightened users, you can make live easier by adding
9316
9317 @lisp
9318 (setq mm-file-name-rewrite-functions
9319       '(mm-file-name-trim-whitespace
9320         mm-file-name-collapse-whitespace
9321         mm-file-name-replace-whitespace))
9322 @end lisp
9323
9324 @noindent
9325 to your @file{~/.gnus.el} file.
9326
9327 @end table
9328
9329
9330 @node Charsets
9331 @section Charsets
9332 @cindex charsets
9333
9334 People use different charsets, and we have @acronym{MIME} to let us know what
9335 charsets they use.  Or rather, we wish we had.  Many people use
9336 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9337 just send out messages without saying what character sets they use.  To
9338 help a bit with this, some local news hierarchies have policies that say
9339 what character set is the default.  For instance, the @samp{fj}
9340 hierarchy uses @code{iso-2022-jp-2}.
9341
9342 @vindex gnus-group-charset-alist
9343 This knowledge is encoded in the @code{gnus-group-charset-alist}
9344 variable, which is an alist of regexps (use the first item to match full
9345 group names) and default charsets to be used when reading these groups.
9346
9347 @vindex gnus-newsgroup-ignored-charsets
9348 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9349 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9350 even if they really are in @code{koi-8}.  To help here, the
9351 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9352 charsets that are listed here will be ignored.  The variable can be
9353 set on a group-by-group basis using the group parameters (@pxref{Group
9354 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9355 which includes values some agents insist on having in there.
9356
9357 @vindex gnus-group-posting-charset-alist
9358 When posting, @code{gnus-group-posting-charset-alist} is used to
9359 determine which charsets should not be encoded using the @acronym{MIME}
9360 encodings.  For instance, some hierarchies discourage using
9361 quoted-printable header encoding.
9362
9363 This variable is an alist of regexps and permitted unencoded charsets
9364 for posting.  Each element of the alist has the form @code{(}@var{test
9365 header body-list}@code{)}, where:
9366
9367 @table @var
9368 @item test
9369 is either a regular expression matching the newsgroup header or a
9370 variable to query,
9371 @item header
9372 is the charset which may be left unencoded in the header (@code{nil}
9373 means encode all charsets),
9374 @item body-list
9375 is a list of charsets which may be encoded using 8bit content-transfer
9376 encoding in the body, or one of the special values @code{nil} (always
9377 encode using quoted-printable) or @code{t} (always use 8bit).
9378 @end table
9379
9380 @cindex Russian
9381 @cindex koi8-r
9382 @cindex koi8-u
9383 @cindex iso-8859-5
9384 @cindex coding system aliases
9385 @cindex preferred charset
9386
9387 Other charset tricks that may be useful, although not Gnus-specific:
9388
9389 If there are several @acronym{MIME} charsets that encode the same Emacs
9390 charset, you can choose what charset to use by saying the following:
9391
9392 @lisp
9393 (put-charset-property 'cyrillic-iso8859-5
9394                       'preferred-coding-system 'koi8-r)
9395 @end lisp
9396
9397 This means that Russian will be encoded using @code{koi8-r} instead of
9398 the default @code{iso-8859-5} @acronym{MIME} charset.
9399
9400 If you want to read messages in @code{koi8-u}, you can cheat and say
9401
9402 @lisp
9403 (define-coding-system-alias 'koi8-u 'koi8-r)
9404 @end lisp
9405
9406 This will almost do the right thing.
9407
9408 And finally, to read charsets like @code{windows-1251}, you can say
9409 something like
9410
9411 @lisp
9412 (codepage-setup 1251)
9413 (define-coding-system-alias 'windows-1251 'cp1251)
9414 @end lisp
9415
9416
9417 @node Article Commands
9418 @section Article Commands
9419
9420 @table @kbd
9421
9422 @item A P
9423 @cindex PostScript
9424 @cindex printing
9425 @kindex A P (Summary)
9426 @vindex gnus-ps-print-hook
9427 @findex gnus-summary-print-article
9428 Generate and print a PostScript image of the article buffer
9429 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9430 be run just before printing the buffer.  An alternative way to print
9431 article is to use Muttprint (@pxref{Saving Articles}).
9432
9433 @end table
9434
9435
9436 @node Summary Sorting
9437 @section Summary Sorting
9438 @cindex summary sorting
9439
9440 You can have the summary buffer sorted in various ways, even though I
9441 can't really see why you'd want that.
9442
9443 @table @kbd
9444
9445 @item C-c C-s C-n
9446 @kindex C-c C-s C-n (Summary)
9447 @findex gnus-summary-sort-by-number
9448 Sort by article number (@code{gnus-summary-sort-by-number}).
9449
9450 @item C-c C-s C-a
9451 @kindex C-c C-s C-a (Summary)
9452 @findex gnus-summary-sort-by-author
9453 Sort by author (@code{gnus-summary-sort-by-author}).
9454
9455 @item C-c C-s C-s
9456 @kindex C-c C-s C-s (Summary)
9457 @findex gnus-summary-sort-by-subject
9458 Sort by subject (@code{gnus-summary-sort-by-subject}).
9459
9460 @item C-c C-s C-d
9461 @kindex C-c C-s C-d (Summary)
9462 @findex gnus-summary-sort-by-date
9463 Sort by date (@code{gnus-summary-sort-by-date}).
9464
9465 @item C-c C-s C-l
9466 @kindex C-c C-s C-l (Summary)
9467 @findex gnus-summary-sort-by-lines
9468 Sort by lines (@code{gnus-summary-sort-by-lines}).
9469
9470 @item C-c C-s C-c
9471 @kindex C-c C-s C-c (Summary)
9472 @findex gnus-summary-sort-by-chars
9473 Sort by article length (@code{gnus-summary-sort-by-chars}).
9474
9475 @item C-c C-s C-i
9476 @kindex C-c C-s C-i (Summary)
9477 @findex gnus-summary-sort-by-score
9478 Sort by score (@code{gnus-summary-sort-by-score}).
9479
9480 @item C-c C-s C-r
9481 @kindex C-c C-s C-r (Summary)
9482 @findex gnus-summary-sort-by-random
9483 Randomize (@code{gnus-summary-sort-by-random}).
9484
9485 @item C-c C-s C-o
9486 @kindex C-c C-s C-o (Summary)
9487 @findex gnus-summary-sort-by-original
9488 Sort using the default sorting method
9489 (@code{gnus-summary-sort-by-original}).
9490 @end table
9491
9492 These functions will work both when you use threading and when you don't
9493 use threading.  In the latter case, all summary lines will be sorted,
9494 line by line.  In the former case, sorting will be done on a
9495 root-by-root basis, which might not be what you were looking for.  To
9496 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9497 Commands}).
9498
9499
9500 @node Finding the Parent
9501 @section Finding the Parent
9502 @cindex parent articles
9503 @cindex referring articles
9504
9505 @table @kbd
9506 @item ^
9507 @kindex ^ (Summary)
9508 @findex gnus-summary-refer-parent-article
9509 If you'd like to read the parent of the current article, and it is not
9510 displayed in the summary buffer, you might still be able to.  That is,
9511 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9512 and the @code{References} in the current article are not mangled, you
9513 can just press @kbd{^} or @kbd{A r}
9514 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9515 you'll get the parent.  If the parent is already displayed in the
9516 summary buffer, point will just move to this article.
9517
9518 If given a positive numerical prefix, fetch that many articles back into
9519 the ancestry.  If given a negative numerical prefix, fetch just that
9520 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9521 grandparent and the grandgrandparent of the current article.  If you say
9522 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9523 article.
9524
9525 @item A R (Summary)
9526 @findex gnus-summary-refer-references
9527 @kindex A R (Summary)
9528 Fetch all articles mentioned in the @code{References} header of the
9529 article (@code{gnus-summary-refer-references}).
9530
9531 @item A T (Summary)
9532 @findex gnus-summary-refer-thread
9533 @kindex A T (Summary)
9534 Display the full thread where the current article appears
9535 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9536 headers in the current group to work, so it usually takes a while.  If
9537 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9538 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9539 visible effects normally, but it'll make this command work a whole lot
9540 faster.  Of course, it'll make group entry somewhat slow.
9541
9542 @vindex gnus-refer-thread-limit
9543 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9544 articles before the first displayed in the current group) headers to
9545 fetch when doing this command.  The default is 200.  If @code{t}, all
9546 the available headers will be fetched.  This variable can be overridden
9547 by giving the @kbd{A T} command a numerical prefix.
9548
9549 @item M-^ (Summary)
9550 @findex gnus-summary-refer-article
9551 @kindex M-^ (Summary)
9552 @cindex Message-ID
9553 @cindex fetching by Message-ID
9554 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9555 matter what group it belongs to.  @kbd{M-^}
9556 (@code{gnus-summary-refer-article}) will ask you for a
9557 @code{Message-ID}, which is one of those long, hard-to-read thingies
9558 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9559 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9560 @end table
9561
9562 The current select method will be used when fetching by
9563 @code{Message-ID} from non-news select method, but you can override this
9564 by giving this command a prefix.
9565
9566 @vindex gnus-refer-article-method
9567 If the group you are reading is located on a back end that does not
9568 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9569 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9570 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9571 updating the spool you are reading from, but that's not really
9572 necessary.
9573
9574 It can also be a list of select methods, as well as the special symbol
9575 @code{current}, which means to use the current select method.  If it
9576 is a list, Gnus will try all the methods in the list until it finds a
9577 match.
9578
9579 Here's an example setting that will first try the current method, and
9580 then ask Google if that fails:
9581
9582 @lisp
9583 (setq gnus-refer-article-method
9584       '(current
9585         (nnweb "google" (nnweb-type google))))
9586 @end lisp
9587
9588 Most of the mail back ends support fetching by @code{Message-ID}, but
9589 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9590 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9591 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9592 only able to locate articles that have been posted to the current group.
9593 (Anything else would be too time consuming.)  @code{nnmh} does not
9594 support this at all.
9595
9596
9597 @node Alternative Approaches
9598 @section Alternative Approaches
9599
9600 Different people like to read news using different methods.  This being
9601 gnus, we offer a small selection of minor modes for the summary buffers.
9602
9603 @menu
9604 * Pick and Read::               First mark articles and then read them.
9605 * Binary Groups::               Auto-decode all articles.
9606 @end menu
9607
9608
9609 @node Pick and Read
9610 @subsection Pick and Read
9611 @cindex pick and read
9612
9613 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9614 a two-phased reading interface.  The user first marks in a summary
9615 buffer the articles she wants to read.  Then she starts reading the
9616 articles with just an article buffer displayed.
9617
9618 @findex gnus-pick-mode
9619 @kindex M-x gnus-pick-mode
9620 Gnus provides a summary buffer minor mode that allows
9621 this---@code{gnus-pick-mode}.  This basically means that a few process
9622 mark commands become one-keystroke commands to allow easy marking, and
9623 it provides one additional command for switching to the summary buffer.
9624
9625 Here are the available keystrokes when using pick mode:
9626
9627 @table @kbd
9628 @item .
9629 @kindex . (Pick)
9630 @findex gnus-pick-article-or-thread
9631 Pick the article or thread on the current line
9632 (@code{gnus-pick-article-or-thread}).  If the variable
9633 @code{gnus-thread-hide-subtree} is true, then this key selects the
9634 entire thread when used at the first article of the thread.  Otherwise,
9635 it selects just the article.  If given a numerical prefix, go to that
9636 thread or article and pick it.  (The line number is normally displayed
9637 at the beginning of the summary pick lines.)
9638
9639 @item SPACE
9640 @kindex SPACE (Pick)
9641 @findex gnus-pick-next-page
9642 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9643 at the end of the buffer, start reading the picked articles.
9644
9645 @item u
9646 @kindex u (Pick)
9647 @findex gnus-pick-unmark-article-or-thread.
9648 Unpick the thread or article
9649 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9650 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9651 thread if used at the first article of the thread.  Otherwise it unpicks
9652 just the article.  You can give this key a numerical prefix to unpick
9653 the thread or article at that line.
9654
9655 @item RET
9656 @kindex RET (Pick)
9657 @findex gnus-pick-start-reading
9658 @vindex gnus-pick-display-summary
9659 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9660 given a prefix, mark all unpicked articles as read first.  If
9661 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9662 will still be visible when you are reading.
9663
9664 @end table
9665
9666 All the normal summary mode commands are still available in the
9667 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9668 which is mapped to the same function
9669 @code{gnus-summary-tick-article-forward}.
9670
9671 If this sounds like a good idea to you, you could say:
9672
9673 @lisp
9674 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9675 @end lisp
9676
9677 @vindex gnus-pick-mode-hook
9678 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9679
9680 @vindex gnus-mark-unpicked-articles-as-read
9681 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9682 all unpicked articles as read.  The default is @code{nil}.
9683
9684 @vindex gnus-summary-pick-line-format
9685 The summary line format in pick mode is slightly different from the
9686 standard format.  At the beginning of each line the line number is
9687 displayed.  The pick mode line format is controlled by the
9688 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9689 Variables}).  It accepts the same format specs that
9690 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9691
9692
9693 @node Binary Groups
9694 @subsection Binary Groups
9695 @cindex binary groups
9696
9697 @findex gnus-binary-mode
9698 @kindex M-x gnus-binary-mode
9699 If you spend much time in binary groups, you may grow tired of hitting
9700 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9701 is a minor mode for summary buffers that makes all ordinary Gnus article
9702 selection functions uudecode series of articles and display the result
9703 instead of just displaying the articles the normal way.
9704
9705 @kindex g (Binary)
9706 @findex gnus-binary-show-article
9707 The only way, in fact, to see the actual articles is the @kbd{g}
9708 command, when you have turned on this mode
9709 (@code{gnus-binary-show-article}).
9710
9711 @vindex gnus-binary-mode-hook
9712 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9713
9714
9715 @node Tree Display
9716 @section Tree Display
9717 @cindex trees
9718
9719 @vindex gnus-use-trees
9720 If you don't like the normal gnus summary display, you might try setting
9721 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9722 additional @dfn{tree buffer}.  You can execute all summary mode commands
9723 in the tree buffer.
9724
9725 There are a few variables to customize the tree display, of course:
9726
9727 @table @code
9728 @item gnus-tree-mode-hook
9729 @vindex gnus-tree-mode-hook
9730 A hook called in all tree mode buffers.
9731
9732 @item gnus-tree-mode-line-format
9733 @vindex gnus-tree-mode-line-format
9734 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9735 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9736 of valid specs, @pxref{Summary Buffer Mode Line}.
9737
9738 @item gnus-selected-tree-face
9739 @vindex gnus-selected-tree-face
9740 Face used for highlighting the selected article in the tree buffer.  The
9741 default is @code{modeline}.
9742
9743 @item gnus-tree-line-format
9744 @vindex gnus-tree-line-format
9745 A format string for the tree nodes.  The name is a bit of a misnomer,
9746 though---it doesn't define a line, but just the node.  The default value
9747 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9748 the name of the poster.  It is vital that all nodes are of the same
9749 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9750
9751 Valid specs are:
9752
9753 @table @samp
9754 @item n
9755 The name of the poster.
9756 @item f
9757 The @code{From} header.
9758 @item N
9759 The number of the article.
9760 @item [
9761 The opening bracket.
9762 @item ]
9763 The closing bracket.
9764 @item s
9765 The subject.
9766 @end table
9767
9768 @xref{Formatting Variables}.
9769
9770 Variables related to the display are:
9771
9772 @table @code
9773 @item gnus-tree-brackets
9774 @vindex gnus-tree-brackets
9775 This is used for differentiating between ``real'' articles and
9776 ``sparse'' articles.  The format is
9777 @example
9778 ((@var{real-open} . @var{real-close})
9779  (@var{sparse-open} . @var{sparse-close})
9780  (@var{dummy-open} . @var{dummy-close}))
9781 @end example
9782 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9783
9784 @item gnus-tree-parent-child-edges
9785 @vindex gnus-tree-parent-child-edges
9786 This is a list that contains the characters used for connecting parent
9787 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9788
9789 @end table
9790
9791 @item gnus-tree-minimize-window
9792 @vindex gnus-tree-minimize-window
9793 If this variable is non-@code{nil}, gnus will try to keep the tree
9794 buffer as small as possible to allow more room for the other gnus
9795 windows.  If this variable is a number, the tree buffer will never be
9796 higher than that number.  The default is @code{t}.  Note that if you
9797 have several windows displayed side-by-side in a frame and the tree
9798 buffer is one of these, minimizing the tree window will also resize all
9799 other windows displayed next to it.
9800
9801 You may also wish to add the following hook to keep the window minimized
9802 at all times:
9803
9804 @lisp
9805 (add-hook 'gnus-configure-windows-hook
9806           'gnus-tree-perhaps-minimize)
9807 @end lisp
9808
9809 @item gnus-generate-tree-function
9810 @vindex gnus-generate-tree-function
9811 @findex gnus-generate-horizontal-tree
9812 @findex gnus-generate-vertical-tree
9813 The function that actually generates the thread tree.  Two predefined
9814 functions are available: @code{gnus-generate-horizontal-tree} and
9815 @code{gnus-generate-vertical-tree} (which is the default).
9816
9817 @end table
9818
9819 Here's an example from a horizontal tree buffer:
9820
9821 @example
9822 @{***@}-(***)-[odd]-[Gun]
9823      |      \[Jan]
9824      |      \[odd]-[Eri]
9825      |      \(***)-[Eri]
9826      |            \[odd]-[Paa]
9827      \[Bjo]
9828      \[Gun]
9829      \[Gun]-[Jor]
9830 @end example
9831
9832 Here's the same thread displayed in a vertical tree buffer:
9833
9834 @example
9835 @group
9836 @{***@}
9837   |--------------------------\-----\-----\
9838 (***)                         [Bjo] [Gun] [Gun]
9839   |--\-----\-----\                          |
9840 [odd] [Jan] [odd] (***)                   [Jor]
9841   |           |     |--\
9842 [Gun]       [Eri] [Eri] [odd]
9843                           |
9844                         [Paa]
9845 @end group
9846 @end example
9847
9848 If you're using horizontal trees, it might be nice to display the trees
9849 side-by-side with the summary buffer.  You could add something like the
9850 following to your @file{~/.gnus.el} file:
9851
9852 @lisp
9853 (setq gnus-use-trees t
9854       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9855       gnus-tree-minimize-window nil)
9856 (gnus-add-configuration
9857  '(article
9858    (vertical 1.0
9859              (horizontal 0.25
9860                          (summary 0.75 point)
9861                          (tree 1.0))
9862              (article 1.0))))
9863 @end lisp
9864
9865 @xref{Window Layout}.
9866
9867
9868 @node Mail Group Commands
9869 @section Mail Group Commands
9870 @cindex mail group commands
9871
9872 Some commands only make sense in mail groups.  If these commands are
9873 invalid in the current group, they will raise a hell and let you know.
9874
9875 All these commands (except the expiry and edit commands) use the
9876 process/prefix convention (@pxref{Process/Prefix}).
9877
9878 @table @kbd
9879
9880 @item B e
9881 @kindex B e (Summary)
9882 @findex gnus-summary-expire-articles
9883 Run all expirable articles in the current group through the expiry
9884 process (@code{gnus-summary-expire-articles}).  That is, delete all
9885 expirable articles in the group that have been around for a while.
9886 (@pxref{Expiring Mail}).
9887
9888 @item B C-M-e
9889 @kindex B C-M-e (Summary)
9890 @findex gnus-summary-expire-articles-now
9891 Delete all the expirable articles in the group
9892 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9893 articles eligible for expiry in the current group will
9894 disappear forever into that big @file{/dev/null} in the sky.
9895
9896 @item B DEL
9897 @kindex B DEL (Summary)
9898 @findex gnus-summary-delete-article
9899 @c @icon{gnus-summary-mail-delete}
9900 Delete the mail article.  This is ``delete'' as in ``delete it from your
9901 disk forever and ever, never to return again.'' Use with caution.
9902 (@code{gnus-summary-delete-article}).
9903
9904 @item B m
9905 @kindex B m (Summary)
9906 @cindex move mail
9907 @findex gnus-summary-move-article
9908 @vindex gnus-preserve-marks
9909 Move the article from one mail group to another
9910 (@code{gnus-summary-move-article}).  Marks will be preserved if
9911 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9912
9913 @item B c
9914 @kindex B c (Summary)
9915 @cindex copy mail
9916 @findex gnus-summary-copy-article
9917 @c @icon{gnus-summary-mail-copy}
9918 Copy the article from one group (mail group or not) to a mail group
9919 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9920 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9921
9922 @item B B
9923 @kindex B B (Summary)
9924 @cindex crosspost mail
9925 @findex gnus-summary-crosspost-article
9926 Crosspost the current article to some other group
9927 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9928 the article in the other group, and the Xref headers of the article will
9929 be properly updated.
9930
9931 @item B i
9932 @kindex B i (Summary)
9933 @findex gnus-summary-import-article
9934 Import an arbitrary file into the current mail newsgroup
9935 (@code{gnus-summary-import-article}).  You will be prompted for a file
9936 name, a @code{From} header and a @code{Subject} header.
9937
9938 @item B I
9939 @kindex B I (Summary)
9940 @findex gnus-summary-create-article
9941 Create an empty article in the current mail newsgroups
9942 (@code{gnus-summary-create-article}).  You will be prompted for a
9943 @code{From} header and a @code{Subject} header.
9944
9945 @item B r
9946 @kindex B r (Summary)
9947 @findex gnus-summary-respool-article
9948 @vindex gnus-summary-respool-default-method
9949 Respool the mail article (@code{gnus-summary-respool-article}).
9950 @code{gnus-summary-respool-default-method} will be used as the default
9951 select method when respooling.  This variable is @code{nil} by default,
9952 which means that the current group select method will be used instead.
9953 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9954 (which is the default).
9955
9956 @item B w
9957 @itemx e
9958 @kindex B w (Summary)
9959 @kindex e (Summary)
9960 @findex gnus-summary-edit-article
9961 @kindex C-c C-c (Article)
9962 @findex gnus-summary-edit-article-done
9963 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9964 editing and make the changes permanent, type @kbd{C-c C-c}
9965 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9966 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9967
9968 @item B q
9969 @kindex B q (Summary)
9970 @findex gnus-summary-respool-query
9971 If you want to re-spool an article, you might be curious as to what group
9972 the article will end up in before you do the re-spooling.  This command
9973 will tell you (@code{gnus-summary-respool-query}).
9974
9975 @item B t
9976 @kindex B t (Summary)
9977 @findex gnus-summary-respool-trace
9978 Similarly, this command will display all fancy splitting patterns used
9979 when respooling, if any (@code{gnus-summary-respool-trace}).
9980
9981 @item B p
9982 @kindex B p (Summary)
9983 @findex gnus-summary-article-posted-p
9984 Some people have a tendency to send you ``courtesy'' copies when they
9985 follow up to articles you have posted.  These usually have a
9986 @code{Newsgroups} header in them, but not always.  This command
9987 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9988 article from your news server (or rather, from
9989 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9990 report back whether it found the article or not.  Even if it says that
9991 it didn't find the article, it may have been posted anyway---mail
9992 propagation is much faster than news propagation, and the news copy may
9993 just not have arrived yet.
9994
9995 @item K E
9996 @kindex K E (Summary)
9997 @findex gnus-article-encrypt-body
9998 @vindex gnus-article-encrypt-protocol
9999 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10000 The body is encrypted with the encryption protocol specified by the
10001 variable @code{gnus-article-encrypt-protocol}.
10002
10003 @end table
10004
10005 @vindex gnus-move-split-methods
10006 @cindex moving articles
10007 If you move (or copy) articles regularly, you might wish to have gnus
10008 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10009 variable that uses the same syntax as @code{gnus-split-methods}
10010 (@pxref{Saving Articles}).  You may customize that variable to create
10011 suggestions you find reasonable.  (Note that
10012 @code{gnus-move-split-methods} uses group names where
10013 @code{gnus-split-methods} uses file names.)
10014
10015 @lisp
10016 (setq gnus-move-split-methods
10017       '(("^From:.*Lars Magne" "nnml:junk")
10018         ("^Subject:.*gnus" "nnfolder:important")
10019         (".*" "nnml:misc")))
10020 @end lisp
10021
10022
10023 @node Various Summary Stuff
10024 @section Various Summary Stuff
10025
10026 @menu
10027 * Summary Group Information::   Information oriented commands.
10028 * Searching for Articles::      Multiple article commands.
10029 * Summary Generation Commands::
10030 * Really Various Summary Commands::  Those pesky non-conformant commands.
10031 @end menu
10032
10033 @table @code
10034 @vindex gnus-summary-display-while-building
10035 @item gnus-summary-display-while-building
10036 If non-@code{nil}, show and update the summary buffer as it's being
10037 built.  If @code{t}, update the buffer after every line is inserted.
10038 If the value is an integer, @var{n}, update the display every @var{n}
10039 lines.  The default is @code{nil}.
10040
10041 @vindex gnus-summary-display-arrow
10042 @item gnus-summary-display-arrow
10043 If non-@code{nil}, display an arrow in the fringe to indicate the
10044 current article.
10045
10046 @vindex gnus-summary-mode-hook
10047 @item gnus-summary-mode-hook
10048 This hook is called when creating a summary mode buffer.
10049
10050 @vindex gnus-summary-generate-hook
10051 @item gnus-summary-generate-hook
10052 This is called as the last thing before doing the threading and the
10053 generation of the summary buffer.  It's quite convenient for customizing
10054 the threading variables based on what data the newsgroup has.  This hook
10055 is called from the summary buffer after most summary buffer variables
10056 have been set.
10057
10058 @vindex gnus-summary-prepare-hook
10059 @item gnus-summary-prepare-hook
10060 It is called after the summary buffer has been generated.  You might use
10061 it to, for instance, highlight lines or modify the look of the buffer in
10062 some other ungodly manner.  I don't care.
10063
10064 @vindex gnus-summary-prepared-hook
10065 @item gnus-summary-prepared-hook
10066 A hook called as the very last thing after the summary buffer has been
10067 generated.
10068
10069 @vindex gnus-summary-ignore-duplicates
10070 @item gnus-summary-ignore-duplicates
10071 When gnus discovers two articles that have the same @code{Message-ID},
10072 it has to do something drastic.  No articles are allowed to have the
10073 same @code{Message-ID}, but this may happen when reading mail from some
10074 sources.  Gnus allows you to customize what happens with this variable.
10075 If it is @code{nil} (which is the default), gnus will rename the
10076 @code{Message-ID} (for display purposes only) and display the article as
10077 any other article.  If this variable is @code{t}, it won't display the
10078 article---it'll be as if it never existed.
10079
10080 @vindex gnus-alter-articles-to-read-function
10081 @item gnus-alter-articles-to-read-function
10082 This function, which takes two parameters (the group name and the list
10083 of articles to be selected), is called to allow the user to alter the
10084 list of articles to be selected.
10085
10086 For instance, the following function adds the list of cached articles to
10087 the list in one particular group:
10088
10089 @lisp
10090 (defun my-add-cached-articles (group articles)
10091   (if (string= group "some.group")
10092       (append gnus-newsgroup-cached articles)
10093     articles))
10094 @end lisp
10095
10096 @vindex gnus-newsgroup-variables
10097 @item gnus-newsgroup-variables
10098 A list of newsgroup (summary buffer) local variables, or cons of
10099 variables and their default values (when the default values are not
10100 @code{nil}), that should be made global while the summary buffer is
10101 active.  These variables can be used to set variables in the group
10102 parameters while still allowing them to affect operations done in
10103 other buffers.  For example:
10104
10105 @lisp
10106 (setq gnus-newsgroup-variables
10107       '(message-use-followup-to
10108         (gnus-visible-headers .
10109  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10110 @end lisp
10111
10112 @end table
10113
10114
10115 @node Summary Group Information
10116 @subsection Summary Group Information
10117
10118 @table @kbd
10119
10120 @item H f
10121 @kindex H f (Summary)
10122 @findex gnus-summary-fetch-faq
10123 @vindex gnus-group-faq-directory
10124 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10125 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10126 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10127 is usually a directory on a remote machine.  This variable can also be
10128 a list of directories.  In that case, giving a prefix to this command
10129 will allow you to choose between the various sites.  @code{ange-ftp}
10130 or @code{efs} will probably be used for fetching the file.
10131
10132 @item H d
10133 @kindex H d (Summary)
10134 @findex gnus-summary-describe-group
10135 Give a brief description of the current group
10136 (@code{gnus-summary-describe-group}).  If given a prefix, force
10137 rereading the description from the server.
10138
10139 @item H h
10140 @kindex H h (Summary)
10141 @findex gnus-summary-describe-briefly
10142 Give an extremely brief description of the most important summary
10143 keystrokes (@code{gnus-summary-describe-briefly}).
10144
10145 @item H i
10146 @kindex H i (Summary)
10147 @findex gnus-info-find-node
10148 Go to the gnus info node (@code{gnus-info-find-node}).
10149 @end table
10150
10151
10152 @node Searching for Articles
10153 @subsection Searching for Articles
10154
10155 @table @kbd
10156
10157 @item M-s
10158 @kindex M-s (Summary)
10159 @findex gnus-summary-search-article-forward
10160 Search through all subsequent (raw) articles for a regexp
10161 (@code{gnus-summary-search-article-forward}).
10162
10163 @item M-r
10164 @kindex M-r (Summary)
10165 @findex gnus-summary-search-article-backward
10166 Search through all previous (raw) articles for a regexp
10167 (@code{gnus-summary-search-article-backward}).
10168
10169 @item &
10170 @kindex & (Summary)
10171 @findex gnus-summary-execute-command
10172 This command will prompt you for a header, a regular expression to match
10173 on this field, and a command to be executed if the match is made
10174 (@code{gnus-summary-execute-command}).  If the header is an empty
10175 string, the match is done on the entire article.  If given a prefix,
10176 search backward instead.
10177
10178 For instance, @kbd{& RET some.*string #} will put the process mark on
10179 all articles that have heads or bodies that match @samp{some.*string}.
10180
10181 @item M-&
10182 @kindex M-& (Summary)
10183 @findex gnus-summary-universal-argument
10184 Perform any operation on all articles that have been marked with
10185 the process mark (@code{gnus-summary-universal-argument}).
10186 @end table
10187
10188 @node Summary Generation Commands
10189 @subsection Summary Generation Commands
10190
10191 @table @kbd
10192
10193 @item Y g
10194 @kindex Y g (Summary)
10195 @findex gnus-summary-prepare
10196 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10197
10198 @item Y c
10199 @kindex Y c (Summary)
10200 @findex gnus-summary-insert-cached-articles
10201 Pull all cached articles (for the current group) into the summary buffer
10202 (@code{gnus-summary-insert-cached-articles}).
10203
10204 @item Y d
10205 @kindex Y d (Summary)
10206 @findex gnus-summary-insert-dormant-articles
10207 Pull all dormant articles (for the current group) into the summary buffer
10208 (@code{gnus-summary-insert-dormant-articles}).
10209
10210 @end table
10211
10212
10213 @node Really Various Summary Commands
10214 @subsection Really Various Summary Commands
10215
10216 @table @kbd
10217
10218 @item A D
10219 @itemx C-d
10220 @kindex C-d (Summary)
10221 @kindex A D (Summary)
10222 @findex gnus-summary-enter-digest-group
10223 If the current article is a collection of other articles (for instance,
10224 a digest), you might use this command to enter a group based on the that
10225 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10226 guess what article type is currently displayed unless you give a prefix
10227 to this command, which forces a ``digest'' interpretation.  Basically,
10228 whenever you see a message that is a collection of other messages of
10229 some format, you @kbd{C-d} and read these messages in a more convenient
10230 fashion.
10231
10232 @item C-M-d
10233 @kindex C-M-d (Summary)
10234 @findex gnus-summary-read-document
10235 This command is very similar to the one above, but lets you gather
10236 several documents into one biiig group
10237 (@code{gnus-summary-read-document}).  It does this by opening several
10238 @code{nndoc} groups for each document, and then opening an
10239 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10240 command understands the process/prefix convention
10241 (@pxref{Process/Prefix}).
10242
10243 @item C-t
10244 @kindex C-t (Summary)
10245 @findex gnus-summary-toggle-truncation
10246 Toggle truncation of summary lines
10247 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10248 line centering function in the summary buffer, so it's not a good idea
10249 to have truncation switched off while reading articles.
10250
10251 @item =
10252 @kindex = (Summary)
10253 @findex gnus-summary-expand-window
10254 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10255 If given a prefix, force an @code{article} window configuration.
10256
10257 @item C-M-e
10258 @kindex C-M-e (Summary)
10259 @findex gnus-summary-edit-parameters
10260 Edit the group parameters (@pxref{Group Parameters}) of the current
10261 group (@code{gnus-summary-edit-parameters}).
10262
10263 @item C-M-a
10264 @kindex C-M-a (Summary)
10265 @findex gnus-summary-customize-parameters
10266 Customize the group parameters (@pxref{Group Parameters}) of the current
10267 group (@code{gnus-summary-customize-parameters}).
10268
10269 @end table
10270
10271
10272 @node Exiting the Summary Buffer
10273 @section Exiting the Summary Buffer
10274 @cindex summary exit
10275 @cindex exiting groups
10276
10277 Exiting from the summary buffer will normally update all info on the
10278 group and return you to the group buffer.
10279
10280 @table @kbd
10281
10282 @item Z Z
10283 @itemx q
10284 @kindex Z Z (Summary)
10285 @kindex q (Summary)
10286 @findex gnus-summary-exit
10287 @vindex gnus-summary-exit-hook
10288 @vindex gnus-summary-prepare-exit-hook
10289 @vindex gnus-group-no-more-groups-hook
10290 @c @icon{gnus-summary-exit}
10291 Exit the current group and update all information on the group
10292 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10293 called before doing much of the exiting, which calls
10294 @code{gnus-summary-expire-articles} by default.
10295 @code{gnus-summary-exit-hook} is called after finishing the exit
10296 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10297 group mode having no more (unread) groups.
10298
10299 @item Z E
10300 @itemx Q
10301 @kindex Z E (Summary)
10302 @kindex Q (Summary)
10303 @findex gnus-summary-exit-no-update
10304 Exit the current group without updating any information on the group
10305 (@code{gnus-summary-exit-no-update}).
10306
10307 @item Z c
10308 @itemx c
10309 @kindex Z c (Summary)
10310 @kindex c (Summary)
10311 @findex gnus-summary-catchup-and-exit
10312 @c @icon{gnus-summary-catchup-and-exit}
10313 Mark all unticked articles in the group as read and then exit
10314 (@code{gnus-summary-catchup-and-exit}).
10315
10316 @item Z C
10317 @kindex Z C (Summary)
10318 @findex gnus-summary-catchup-all-and-exit
10319 Mark all articles, even the ticked ones, as read and then exit
10320 (@code{gnus-summary-catchup-all-and-exit}).
10321
10322 @item Z n
10323 @kindex Z n (Summary)
10324 @findex gnus-summary-catchup-and-goto-next-group
10325 Mark all articles as read and go to the next group
10326 (@code{gnus-summary-catchup-and-goto-next-group}).
10327
10328 @item Z R
10329 @kindex Z R (Summary)
10330 @findex gnus-summary-reselect-current-group
10331 Exit this group, and then enter it again
10332 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10333 all articles, both read and unread.
10334
10335 @item Z G
10336 @itemx M-g
10337 @kindex Z G (Summary)
10338 @kindex M-g (Summary)
10339 @findex gnus-summary-rescan-group
10340 @c @icon{gnus-summary-mail-get}
10341 Exit the group, check for new articles in the group, and select the
10342 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10343 articles, both read and unread.
10344
10345 @item Z N
10346 @kindex Z N (Summary)
10347 @findex gnus-summary-next-group
10348 Exit the group and go to the next group
10349 (@code{gnus-summary-next-group}).
10350
10351 @item Z P
10352 @kindex Z P (Summary)
10353 @findex gnus-summary-prev-group
10354 Exit the group and go to the previous group
10355 (@code{gnus-summary-prev-group}).
10356
10357 @item Z s
10358 @kindex Z s (Summary)
10359 @findex gnus-summary-save-newsrc
10360 Save the current number of read/marked articles in the dribble buffer
10361 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10362 given a prefix, also save the @file{.newsrc} file(s).  Using this
10363 command will make exit without updating (the @kbd{Q} command) worthless.
10364 @end table
10365
10366 @vindex gnus-exit-group-hook
10367 @code{gnus-exit-group-hook} is called when you exit the current group
10368 with an ``updating'' exit.  For instance @kbd{Q}
10369 (@code{gnus-summary-exit-no-update}) does not call this hook.
10370
10371 @findex gnus-summary-wake-up-the-dead
10372 @findex gnus-dead-summary-mode
10373 @vindex gnus-kill-summary-on-exit
10374 If you're in the habit of exiting groups, and then changing your mind
10375 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10376 If you do that, gnus won't kill the summary buffer when you exit it.
10377 (Quelle surprise!)  Instead it will change the name of the buffer to
10378 something like @samp{*Dead Summary ... *} and install a minor mode
10379 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10380 buffer, you'll find that all keys are mapped to a function called
10381 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10382 summary buffer will result in a live, normal summary buffer.
10383
10384 There will never be more than one dead summary buffer at any one time.
10385
10386 @vindex gnus-use-cross-reference
10387 The data on the current group will be updated (which articles you have
10388 read, which articles you have replied to, etc.) when you exit the
10389 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10390 @code{t} (which is the default), articles that are cross-referenced to
10391 this group and are marked as read, will also be marked as read in the
10392 other subscribed groups they were cross-posted to.  If this variable is
10393 neither @code{nil} nor @code{t}, the article will be marked as read in
10394 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10395
10396
10397 @node Crosspost Handling
10398 @section Crosspost Handling
10399
10400 @cindex velveeta
10401 @cindex spamming
10402 Marking cross-posted articles as read ensures that you'll never have to
10403 read the same article more than once.  Unless, of course, somebody has
10404 posted it to several groups separately.  Posting the same article to
10405 several groups (not cross-posting) is called @dfn{spamming}, and you are
10406 by law required to send nasty-grams to anyone who perpetrates such a
10407 heinous crime.  You may want to try NoCeM handling to filter out spam
10408 (@pxref{NoCeM}).
10409
10410 Remember: Cross-posting is kinda ok, but posting the same article
10411 separately to several groups is not.  Massive cross-posting (aka.
10412 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10413 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10414 excessive crossposting (@pxref{Summary Mail Commands}).
10415
10416 @cindex cross-posting
10417 @cindex Xref
10418 @cindex @acronym{NOV}
10419 One thing that may cause Gnus to not do the cross-posting thing
10420 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10421 (which is very nice, because it speeds things up considerably) which
10422 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10423 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10424 even with @sc{xover} by registering the @code{Xref} lines of all
10425 articles you actually read, but if you kill the articles, or just mark
10426 them as read without reading them, Gnus will not get a chance to snoop
10427 the @code{Xref} lines out of these articles, and will be unable to use
10428 the cross reference mechanism.
10429
10430 @cindex LIST overview.fmt
10431 @cindex overview.fmt
10432 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10433 in its overview files, try @samp{telnet your.nntp.server nntp},
10434 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10435 overview.fmt}.  This may not work, but if it does, and the last line you
10436 get does not read @samp{Xref:full}, then you should shout and whine at
10437 your news admin until she includes the @code{Xref} header in the
10438 overview files.
10439
10440 @vindex gnus-nov-is-evil
10441 If you want Gnus to get the @code{Xref}s right all the time, you have to
10442 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10443 considerably.
10444
10445 C'est la vie.
10446
10447 For an alternative approach, @pxref{Duplicate Suppression}.
10448
10449
10450 @node Duplicate Suppression
10451 @section Duplicate Suppression
10452
10453 By default, gnus tries to make sure that you don't have to read the same
10454 article more than once by utilizing the crossposting mechanism
10455 (@pxref{Crosspost Handling}).  However, that simple and efficient
10456 approach may not work satisfactory for some users for various
10457 reasons.
10458
10459 @enumerate
10460 @item
10461 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10462 is evil and not very common.
10463
10464 @item
10465 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10466 @file{.overview} data bases.  This is evil and all too common, alas.
10467
10468 @item
10469 You may be reading the same group (or several related groups) from
10470 different @acronym{NNTP} servers.
10471
10472 @item
10473 You may be getting mail that duplicates articles posted to groups.
10474 @end enumerate
10475
10476 I'm sure there are other situations where @code{Xref} handling fails as
10477 well, but these four are the most common situations.
10478
10479 If, and only if, @code{Xref} handling fails for you, then you may
10480 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10481 will remember the @code{Message-ID}s of all articles you have read or
10482 otherwise marked as read, and then, as if by magic, mark them as read
10483 all subsequent times you see them---in @emph{all} groups.  Using this
10484 mechanism is quite likely to be somewhat inefficient, but not overly
10485 so.  It's certainly preferable to reading the same articles more than
10486 once.
10487
10488 Duplicate suppression is not a very subtle instrument.  It's more like a
10489 sledge hammer than anything else.  It works in a very simple
10490 fashion---if you have marked an article as read, it adds this Message-ID
10491 to a cache.  The next time it sees this Message-ID, it will mark the
10492 article as read with the @samp{M} mark.  It doesn't care what group it
10493 saw the article in.
10494
10495 @table @code
10496 @item gnus-suppress-duplicates
10497 @vindex gnus-suppress-duplicates
10498 If non-@code{nil}, suppress duplicates.
10499
10500 @item gnus-save-duplicate-list
10501 @vindex gnus-save-duplicate-list
10502 If non-@code{nil}, save the list of duplicates to a file.  This will
10503 make startup and shutdown take longer, so the default is @code{nil}.
10504 However, this means that only duplicate articles read in a single gnus
10505 session are suppressed.
10506
10507 @item gnus-duplicate-list-length
10508 @vindex gnus-duplicate-list-length
10509 This variable says how many @code{Message-ID}s to keep in the duplicate
10510 suppression list.  The default is 10000.
10511
10512 @item gnus-duplicate-file
10513 @vindex gnus-duplicate-file
10514 The name of the file to store the duplicate suppression list in.  The
10515 default is @file{~/News/suppression}.
10516 @end table
10517
10518 If you have a tendency to stop and start gnus often, setting
10519 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10520 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10521 the other hand, saving the list makes startup and shutdown much slower,
10522 so that means that if you stop and start gnus often, you should set
10523 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10524 to you to figure out, I think.
10525
10526 @node Security
10527 @section Security
10528
10529 Gnus is able to verify signed messages or decrypt encrypted messages.
10530 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10531 and @acronym{S/MIME}, however you need some external programs to get
10532 things to work:
10533
10534 @enumerate
10535 @item
10536 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10537 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10538 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10539 Manual}), but Mailcrypt and gpg.el are also supported.
10540
10541 @item
10542 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10543 or newer is recommended.
10544
10545 @end enumerate
10546
10547 More information on how to set things up can be found in the message
10548 manual (@pxref{Security, ,Security, message, Message Manual}).
10549
10550 @table @code
10551 @item mm-verify-option
10552 @vindex mm-verify-option
10553 Option of verifying signed parts.  @code{never}, not verify;
10554 @code{always}, always verify; @code{known}, only verify known
10555 protocols.  Otherwise, ask user.
10556
10557 @item mm-decrypt-option
10558 @vindex mm-decrypt-option
10559 Option of decrypting encrypted parts.  @code{never}, no decryption;
10560 @code{always}, always decrypt; @code{known}, only decrypt known
10561 protocols.  Otherwise, ask user.
10562
10563 @item mml1991-use
10564 @vindex mml1991-use
10565 Symbol indicating elisp interface to OpenPGP implementation for
10566 @acronym{PGP} messages.  The default is @code{pgg}, but
10567 @code{mailcrypt} and @code{gpg} are also supported although
10568 deprecated.
10569
10570 @item mml2015-use
10571 @vindex mml2015-use
10572 Symbol indicating elisp interface to OpenPGP implementation for
10573 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10574 @code{mailcrypt} and @code{gpg} are also supported although
10575 deprecated.
10576
10577 @end table
10578
10579 @cindex snarfing keys
10580 @cindex importing PGP keys
10581 @cindex PGP key ring import
10582 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10583 key ring) is not supported explicitly through a menu item or command,
10584 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10585 allowing you to specify whatever action you think is appropriate
10586 through the usual @acronym{MIME} infrastructure.  You can use a
10587 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10588 Emacs MIME Manual}) such as the following to import keys using GNU
10589 Privacy Guard when you click on the @acronym{MIME} button
10590 (@pxref{Using MIME}).
10591
10592 @example
10593 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10594 @end example
10595 @noindent
10596 This happens to also be the default action defined in
10597 @code{mailcap-mime-data}.
10598
10599 @node Mailing List
10600 @section Mailing List
10601 @cindex mailing list
10602 @cindex RFC 2396
10603
10604 @kindex A M (summary)
10605 @findex gnus-mailing-list-insinuate
10606 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10607 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10608 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10609 summary buffer.
10610
10611 That enables the following commands to the summary buffer:
10612
10613 @table @kbd
10614
10615 @item C-c C-n h
10616 @kindex C-c C-n h (Summary)
10617 @findex gnus-mailing-list-help
10618 Send a message to fetch mailing list help, if List-Help field exists.
10619
10620 @item C-c C-n s
10621 @kindex C-c C-n s (Summary)
10622 @findex gnus-mailing-list-subscribe
10623 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10624
10625 @item C-c C-n u
10626 @kindex C-c C-n u (Summary)
10627 @findex gnus-mailing-list-unsubscribe
10628 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10629 field exists.
10630
10631 @item C-c C-n p
10632 @kindex C-c C-n p (Summary)
10633 @findex gnus-mailing-list-post
10634 Post to the mailing list, if List-Post field exists.
10635
10636 @item C-c C-n o
10637 @kindex C-c C-n o (Summary)
10638 @findex gnus-mailing-list-owner
10639 Send a message to the mailing list owner, if List-Owner field exists.
10640
10641 @item C-c C-n a
10642 @kindex C-c C-n a (Summary)
10643 @findex gnus-mailing-list-owner
10644 Browse the mailing list archive, if List-Archive field exists.
10645
10646 @end table
10647
10648
10649 @node Article Buffer
10650 @chapter Article Buffer
10651 @cindex article buffer
10652
10653 The articles are displayed in the article buffer, of which there is only
10654 one.  All the summary buffers share the same article buffer unless you
10655 tell gnus otherwise.
10656
10657 @menu
10658 * Hiding Headers::              Deciding what headers should be displayed.
10659 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10660 * Customizing Articles::        Tailoring the look of the articles.
10661 * Article Keymap::              Keystrokes available in the article buffer.
10662 * Misc Article::                Other stuff.
10663 @end menu
10664
10665
10666 @node Hiding Headers
10667 @section Hiding Headers
10668 @cindex hiding headers
10669 @cindex deleting headers
10670
10671 The top section of each article is the @dfn{head}.  (The rest is the
10672 @dfn{body}, but you may have guessed that already.)
10673
10674 @vindex gnus-show-all-headers
10675 There is a lot of useful information in the head: the name of the person
10676 who wrote the article, the date it was written and the subject of the
10677 article.  That's well and nice, but there's also lots of information
10678 most people do not want to see---what systems the article has passed
10679 through before reaching you, the @code{Message-ID}, the
10680 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10681 of some of those lines.  If you want to keep all those lines in the
10682 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10683
10684 Gnus provides you with two variables for sifting headers:
10685
10686 @table @code
10687
10688 @item gnus-visible-headers
10689 @vindex gnus-visible-headers
10690 If this variable is non-@code{nil}, it should be a regular expression
10691 that says what headers you wish to keep in the article buffer.  All
10692 headers that do not match this variable will be hidden.
10693
10694 For instance, if you only want to see the name of the person who wrote
10695 the article and the subject, you'd say:
10696
10697 @lisp
10698 (setq gnus-visible-headers "^From:\\|^Subject:")
10699 @end lisp
10700
10701 This variable can also be a list of regexps to match headers to
10702 remain visible.
10703
10704 @item gnus-ignored-headers
10705 @vindex gnus-ignored-headers
10706 This variable is the reverse of @code{gnus-visible-headers}.  If this
10707 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10708 should be a regular expression that matches all lines that you want to
10709 hide.  All lines that do not match this variable will remain visible.
10710
10711 For instance, if you just want to get rid of the @code{References} field
10712 and the @code{Xref} field, you might say:
10713
10714 @lisp
10715 (setq gnus-ignored-headers "^References:\\|^Xref:")
10716 @end lisp
10717
10718 This variable can also be a list of regexps to match headers to
10719 be removed.
10720
10721 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10722 variable will have no effect.
10723
10724 @end table
10725
10726 @vindex gnus-sorted-header-list
10727 Gnus can also sort the headers for you.  (It does this by default.)  You
10728 can control the sorting by setting the @code{gnus-sorted-header-list}
10729 variable.  It is a list of regular expressions that says in what order
10730 the headers are to be displayed.
10731
10732 For instance, if you want the name of the author of the article first,
10733 and then the subject, you might say something like:
10734
10735 @lisp
10736 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10737 @end lisp
10738
10739 Any headers that are to remain visible, but are not listed in this
10740 variable, will be displayed in random order after all the headers listed in this variable.
10741
10742 @findex gnus-article-hide-boring-headers
10743 @vindex gnus-boring-article-headers
10744 You can hide further boring headers by setting
10745 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10746 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10747 list, but this list doesn't actually contain header names.  Instead is
10748 lists various @dfn{boring conditions} that Gnus can check and remove
10749 from sight.
10750
10751 These conditions are:
10752 @table @code
10753 @item empty
10754 Remove all empty headers.
10755 @item followup-to
10756 Remove the @code{Followup-To} header if it is identical to the
10757 @code{Newsgroups} header.
10758 @item reply-to
10759 Remove the @code{Reply-To} header if it lists the same address as the
10760 @code{From} header, or if the @code{broken-reply-to} group parameter is
10761 set.
10762 @item newsgroups
10763 Remove the @code{Newsgroups} header if it only contains the current group
10764 name.
10765 @item to-address
10766 Remove the @code{To} header if it only contains the address identical to
10767 the current group's @code{to-address} parameter.
10768 @item to-list
10769 Remove the @code{To} header if it only contains the address identical to
10770 the current group's @code{to-list} parameter.
10771 @item cc-list
10772 Remove the @code{CC} header if it only contains the address identical to
10773 the current group's @code{to-list} parameter.
10774 @item date
10775 Remove the @code{Date} header if the article is less than three days
10776 old.
10777 @item long-to
10778 Remove the @code{To} header if it is very long.
10779 @item many-to
10780 Remove all @code{To} headers if there are more than one.
10781 @end table
10782
10783 To include these three elements, you could say something like:
10784
10785 @lisp
10786 (setq gnus-boring-article-headers
10787       '(empty followup-to reply-to))
10788 @end lisp
10789
10790 This is also the default value for this variable.
10791
10792
10793 @node Using MIME
10794 @section Using MIME
10795 @cindex @acronym{MIME}
10796
10797 Mime is a standard for waving your hands through the air, aimlessly,
10798 while people stand around yawning.
10799
10800 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10801 while all newsreaders die of fear.
10802
10803 @acronym{MIME} may specify what character set the article uses, the encoding
10804 of the characters, and it also makes it possible to embed pictures and
10805 other naughty stuff in innocent-looking articles.
10806
10807 @vindex gnus-show-mime
10808 @vindex gnus-article-display-method-for-mime
10809 @findex gnus-article-display-mime-message
10810 gnus handles @acronym{MIME} by pushing the articles through
10811 @code{gnus-article-display-method-for-mime}, which is
10812 @code{gnus-article-display-mime-message} by default.  This function
10813 calls the @acronym{SEMI} MIME-View program to actually do the work.  For
10814 more information on @acronym{SEMI} MIME-View, see its manual page
10815 (however it is not existed yet, sorry).
10816
10817 Set @code{gnus-show-mime} to @code{t} if you want to use
10818 @acronym{MIME} all the time.  If you have @code{gnus-show-mime} set,
10819 then you'll see some unfortunate display glitches in the article buffer.
10820 These can't be avoided.
10821
10822 In GNUS or Gnus, it might be best to just use the toggling functions
10823 from the summary buffer to avoid getting nasty surprises. (For instance,
10824 you enter the group @samp{alt.sing-a-long} and, before you know it,
10825 @acronym{MIME} has decoded the sound file in the article and some
10826 horrible sing-a-long song comes screaming out your speakers, and you
10827 can't find the volume button, because there isn't one, and people are
10828 starting to look at you, and you try to stop the program, but you can't,
10829 and you can't find the program to control the volume, and everybody else
10830 in the room suddenly decides to look at you disdainfully, and you'll
10831 feel rather stupid.)
10832
10833 Any similarity to real events and people is purely coincidental.  Ahem.
10834
10835 To avoid such kind of situation, gnus stops to use
10836 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10837 non-@code{nil} every-time, then you can push button in the article
10838 buffer when there are nobody else.
10839
10840 Also @pxref{MIME Commands}.
10841
10842
10843 @node Customizing Articles
10844 @section Customizing Articles
10845 @cindex article customization
10846
10847 A slew of functions for customizing how the articles are to look like
10848 exist.  You can call these functions interactively
10849 (@pxref{Article Washing}), or you can have them
10850 called automatically when you select the articles.
10851
10852 To have them called automatically, you should set the corresponding
10853 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10854 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10855 be set, but first we discuss the values these variables can have.
10856
10857 Note: Some values, while valid, make little sense.  Check the list below
10858 for sensible values.
10859
10860 @enumerate
10861 @item
10862 @code{nil}: Don't do this treatment.
10863
10864 @item
10865 @code{t}: Do this treatment on all body parts.
10866
10867 @item
10868 @code{head}: Do the treatment on the headers.
10869
10870 @item
10871 @code{last}: Do this treatment on the last part.
10872
10873 @item
10874 An integer: Do this treatment on all body parts that have a length less
10875 than this number.
10876
10877 @item
10878 A list of strings: Do this treatment on all body parts that are in
10879 articles that are read in groups that have names that match one of the
10880 regexps in the list.
10881
10882 @item
10883 A list where the first element is not a string:
10884
10885 The list is evaluated recursively.  The first element of the list is a
10886 predicate.  The following predicates are recognized: @code{or},
10887 @code{and}, @code{not} and @code{typep}.  Here's an example:
10888
10889 @lisp
10890 (or last
10891     (typep "text/x-vcard"))
10892 @end lisp
10893
10894 @item
10895 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10896 non-nil.
10897
10898 @end enumerate
10899
10900 You may have noticed that the word @dfn{part} is used here.  This refers
10901 to the fact that some messages are @acronym{MIME} multipart articles that may
10902 be divided into several parts.  Articles that are not multiparts are
10903 considered to contain just a single part.
10904
10905 @vindex gnus-article-treat-types
10906 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10907 want to, but by default, only @samp{text/plain} parts are given the
10908 treatment.  This is controlled by the @code{gnus-article-treat-types}
10909 variable, which is a list of regular expressions that are matched to the
10910 type of the part.  This variable is ignored if the value of the
10911 controlling variable is a predicate list, as described above.
10912
10913 The following treatment options are available.  The easiest way to
10914 customize this is to examine the @code{gnus-article-treat} customization
10915 group.  Values in parenthesis are suggested sensible values.  Others are
10916 possible but those listed are probably sufficient for most people.
10917
10918 @table @code
10919 @item gnus-treat-buttonize (t, integer)
10920 @item gnus-treat-buttonize-head (head)
10921
10922 @xref{Article Buttons}.
10923
10924 @item gnus-treat-capitalize-sentences (t, integer)
10925 @item gnus-treat-overstrike (t, integer)
10926 @item gnus-treat-strip-cr (t, integer)
10927 @item gnus-treat-strip-headers-in-body (t, integer)
10928 @item gnus-treat-strip-leading-blank-lines (t, integer)
10929 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10930 @item gnus-treat-strip-pem (t, last, integer)
10931 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10932 @item gnus-treat-unsplit-urls (t, integer)
10933 @item gnus-treat-wash-html (t, integer)
10934 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10935
10936 @xref{Article Washing}.
10937
10938 @item gnus-treat-date-english (head)
10939 @item gnus-treat-date-iso8601 (head)
10940 @item gnus-treat-date-lapsed (head)
10941 @item gnus-treat-date-local (head)
10942 @item gnus-treat-date-original (head)
10943 @item gnus-treat-date-user-defined (head)
10944 @item gnus-treat-date-ut (head)
10945
10946 @xref{Article Date}.
10947
10948 @item gnus-treat-from-picon (head)
10949 @item gnus-treat-mail-picon (head)
10950 @item gnus-treat-newsgroups-picon (head)
10951
10952 @xref{Picons}.
10953
10954 @item gnus-treat-display-smileys (t, integer)
10955
10956 @item gnus-treat-body-boundary (head)
10957
10958 @vindex gnus-body-boundary-delimiter
10959 Adds a delimiter between header and body, the string used as delimiter
10960 is controlled by @code{gnus-body-boundary-delimiter}.
10961
10962 @xref{Smileys}.
10963
10964 @item gnus-treat-display-xface (head)
10965
10966 @xref{X-Face}.
10967
10968 @item gnus-treat-display-face (head)
10969
10970 @xref{Face}.
10971
10972 @item gnus-treat-emphasize (t, head, integer)
10973 @item gnus-treat-fill-article (t, integer)
10974 @item gnus-treat-fill-long-lines (t, integer)
10975 @item gnus-treat-hide-boring-headers (head)
10976 @item gnus-treat-hide-citation (t, integer)
10977 @item gnus-treat-hide-citation-maybe (t, integer)
10978 @item gnus-treat-hide-headers (head)
10979 @item gnus-treat-hide-signature (t, last)
10980 @item gnus-treat-strip-banner (t, last)
10981 @item gnus-treat-strip-list-identifiers (head)
10982
10983 @xref{Article Hiding}.
10984
10985 @item gnus-treat-highlight-citation (t, integer)
10986 @item gnus-treat-highlight-headers (head)
10987 @item gnus-treat-highlight-signature (t, last, integer)
10988
10989 @xref{Article Highlighting}.
10990
10991 @item gnus-treat-play-sounds
10992 @item gnus-treat-translate
10993 @item gnus-treat-x-pgp-sig (head)
10994
10995 @item gnus-treat-unfold-headers (head)
10996 @item gnus-treat-fold-headers (head)
10997 @item gnus-treat-fold-newsgroups (head)
10998 @item gnus-treat-leading-whitespace (head)
10999
11000 @xref{Article Header}.
11001
11002
11003 @end table
11004
11005 @vindex gnus-part-display-hook
11006 You can, of course, write your own functions to be called from
11007 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11008 part, and you can do anything you like, pretty much.  There is no
11009 information that you have to keep in the buffer---you can change
11010 everything.
11011
11012
11013 @node Article Keymap
11014 @section Article Keymap
11015
11016 Most of the keystrokes in the summary buffer can also be used in the
11017 article buffer.  They should behave as if you typed them in the summary
11018 buffer, which means that you don't actually have to have a summary
11019 buffer displayed while reading.  You can do it all from the article
11020 buffer.
11021
11022 A few additional keystrokes are available:
11023
11024 @table @kbd
11025
11026 @item SPACE
11027 @kindex SPACE (Article)
11028 @findex gnus-article-next-page
11029 Scroll forwards one page (@code{gnus-article-next-page}).
11030 This is exactly the same as @kbd{h SPACE h}.
11031
11032 @item DEL
11033 @kindex DEL (Article)
11034 @findex gnus-article-prev-page
11035 Scroll backwards one page (@code{gnus-article-prev-page}).
11036 This is exactly the same as @kbd{h DEL h}.
11037
11038 @item C-c ^
11039 @kindex C-c ^ (Article)
11040 @findex gnus-article-refer-article
11041 If point is in the neighborhood of a @code{Message-ID} and you press
11042 @kbd{C-c ^}, Gnus will try to get that article from the server
11043 (@code{gnus-article-refer-article}).
11044
11045 @item C-c C-m
11046 @kindex C-c C-m (Article)
11047 @findex gnus-article-mail
11048 Send a reply to the address near point (@code{gnus-article-mail}).  If
11049 given a prefix, include the mail.
11050
11051 @item s
11052 @kindex s (Article)
11053 @findex gnus-article-show-summary
11054 Reconfigure the buffers so that the summary buffer becomes visible
11055 (@code{gnus-article-show-summary}).
11056
11057 @item ?
11058 @kindex ? (Article)
11059 @findex gnus-article-describe-briefly
11060 Give a very brief description of the available keystrokes
11061 (@code{gnus-article-describe-briefly}).
11062
11063 @item TAB
11064 @kindex TAB (Article)
11065 @findex gnus-article-next-button
11066 Go to the next button, if any (@code{gnus-article-next-button}).  This
11067 only makes sense if you have buttonizing turned on.
11068
11069 @item M-TAB
11070 @kindex M-TAB (Article)
11071 @findex gnus-article-prev-button
11072 Go to the previous button, if any (@code{gnus-article-prev-button}).
11073
11074 @item R
11075 @kindex R (Article)
11076 @findex gnus-article-reply-with-original
11077 Send a reply to the current article and yank the current article
11078 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11079 wide reply.  If the region is active, only yank the text in the
11080 region.
11081
11082 @item F
11083 @kindex F (Article)
11084 @findex gnus-article-followup-with-original
11085 Send a followup to the current article and yank the current article
11086 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11087 a wide reply.  If the region is active, only yank the text in the
11088 region.
11089
11090
11091 @end table
11092
11093
11094 @node Misc Article
11095 @section Misc Article
11096
11097 @table @code
11098
11099 @item gnus-single-article-buffer
11100 @vindex gnus-single-article-buffer
11101 If non-@code{nil}, use the same article buffer for all the groups.
11102 (This is the default.)  If @code{nil}, each group will have its own
11103 article buffer.
11104
11105 @vindex gnus-article-decode-hook
11106 @item gnus-article-decode-hook
11107 @cindex @acronym{MIME}
11108 Hook used to decode @acronym{MIME} articles.  The default value is
11109 @code{(article-decode-charset article-decode-encoded-words)}
11110
11111 @vindex gnus-article-prepare-hook
11112 @item gnus-article-prepare-hook
11113 This hook is called right after the article has been inserted into the
11114 article buffer.  It is mainly intended for functions that do something
11115 depending on the contents; it should probably not be used for changing
11116 the contents of the article buffer.
11117
11118 @item gnus-article-mode-hook
11119 @vindex gnus-article-mode-hook
11120 Hook called in article mode buffers.
11121
11122 @item gnus-article-mode-syntax-table
11123 @vindex gnus-article-mode-syntax-table
11124 Syntax table used in article buffers.  It is initialized from
11125 @code{text-mode-syntax-table}.
11126
11127 @vindex gnus-article-over-scroll
11128 @item gnus-article-over-scroll
11129 If non-@code{nil}, allow scrolling the article buffer even when there
11130 no more new text to scroll in.  The default is @code{nil}.
11131
11132 @vindex gnus-article-mode-line-format
11133 @item gnus-article-mode-line-format
11134 This variable is a format string along the same lines as
11135 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11136 accepts the same format specifications as that variable, with two
11137 extensions:
11138
11139 @table @samp
11140
11141 @item w
11142 The @dfn{wash status} of the article.  This is a short string with one
11143 character for each possible article wash operation that may have been
11144 performed.  The characters and their meaning:
11145
11146 @table @samp
11147
11148 @item c
11149 Displayed when cited text may be hidden in the article buffer.
11150
11151 @item h
11152 Displayed when headers are hidden in the article buffer.
11153
11154 @item p
11155 Displayed when article is digitally signed or encrypted, and Gnus has
11156 hidden the security headers.  (N.B. does not tell anything about
11157 security status, i.e. good or bad signature.)
11158
11159 @item s
11160 Displayed when the signature has been hidden in the Article buffer.
11161
11162 @item o
11163 Displayed when Gnus has treated overstrike characters in the article buffer.
11164
11165 @item e
11166 Displayed when Gnus has treated emphasised strings in the article buffer.
11167
11168 @end table
11169
11170 @item m
11171 The number of @acronym{MIME} parts in the article.
11172
11173 @end table
11174
11175 @vindex gnus-break-pages
11176
11177 @item gnus-break-pages
11178 Controls whether @dfn{page breaking} is to take place.  If this variable
11179 is non-@code{nil}, the articles will be divided into pages whenever a
11180 page delimiter appears in the article.  If this variable is @code{nil},
11181 paging will not be done.
11182
11183 @item gnus-page-delimiter
11184 @vindex gnus-page-delimiter
11185 This is the delimiter mentioned above.  By default, it is @samp{^L}
11186 (formfeed).
11187
11188 @cindex IDNA
11189 @cindex internationalized domain names
11190 @vindex gnus-use-idna
11191 @item gnus-use-idna
11192 This variable controls whether Gnus performs IDNA decoding of
11193 internationalized domain names inside @samp{From}, @samp{To} and
11194 @samp{Cc} headers.  This requires
11195 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11196 variable is only enabled if you have installed it.
11197
11198 @end table
11199
11200
11201 @node Composing Messages
11202 @chapter Composing Messages
11203 @cindex composing messages
11204 @cindex messages
11205 @cindex mail
11206 @cindex sending mail
11207 @cindex reply
11208 @cindex followup
11209 @cindex post
11210 @cindex using gpg
11211 @cindex using s/mime
11212 @cindex using smime
11213
11214 @kindex C-c C-c (Post)
11215 All commands for posting and mailing will put you in a message buffer
11216 where you can edit the article all you like, before you send the
11217 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11218 Message Manual}.  Where the message will be posted/mailed to depends
11219 on your setup (@pxref{Posting Server}).
11220
11221 @menu
11222 * Mail::                        Mailing and replying.
11223 * Posting Server::              What server should you post and mail via?
11224 * Mail and Post::               Mailing and posting at the same time.
11225 * Archived Messages::           Where Gnus stores the messages you've sent.
11226 * Posting Styles::              An easier way to specify who you are.
11227 * Drafts::                      Postponing messages and rejected messages.
11228 * Rejected Articles::           What happens if the server doesn't like your article?
11229 * Signing and encrypting::      How to compose secure messages.
11230 @end menu
11231
11232 Also @pxref{Canceling and Superseding} for information on how to
11233 remove articles you shouldn't have posted.
11234
11235
11236 @node Mail
11237 @section Mail
11238
11239 Variables for customizing outgoing mail:
11240
11241 @table @code
11242 @item gnus-uu-digest-headers
11243 @vindex gnus-uu-digest-headers
11244 List of regexps to match headers included in digested messages.  The
11245 headers will be included in the sequence they are matched.  If
11246 @code{nil} include all headers.
11247
11248 @item gnus-add-to-list
11249 @vindex gnus-add-to-list
11250 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11251 that have none when you do a @kbd{a}.
11252
11253 @item gnus-confirm-mail-reply-to-news
11254 @vindex gnus-confirm-mail-reply-to-news
11255 This can also be a function receiving the group name as the only
11256 parameter which should return non-@code{nil} if a confirmation is
11257 needed, or a regular expression matching group names, where
11258 confirmation is should be asked for.
11259
11260 If you find yourself never wanting to reply to mail, but occasionally
11261 press R anyway, this variable might be for you.
11262
11263 @item gnus-confirm-treat-mail-like-news
11264 @vindex gnus-confirm-treat-mail-like-news
11265 If non-@code{nil}, Gnus also requests confirmation according to
11266 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11267 useful for treating mailing lists like newsgroups.
11268
11269 @end table
11270
11271
11272 @node Posting Server
11273 @section Posting Server
11274
11275 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11276 (extremely intelligent, of course) article, where does it go?
11277
11278 Thank you for asking.  I hate you.
11279
11280 It can be quite complicated.
11281
11282 @vindex gnus-post-method
11283 When posting news, Message usually invokes @code{message-send-news}
11284 (@pxref{News Variables, , News Variables, message, Message Manual}).
11285 Normally, Gnus will post using the same select method as you're
11286 reading from (which might be convenient if you're reading lots of
11287 groups from different private servers).  However.  If the server
11288 you're reading from doesn't allow posting, just reading, you probably
11289 want to use some other server to post your (extremely intelligent and
11290 fabulously interesting) articles.  You can then set the
11291 @code{gnus-post-method} to some other method:
11292
11293 @lisp
11294 (setq gnus-post-method '(nnspool ""))
11295 @end lisp
11296
11297 Now, if you've done this, and then this server rejects your article, or
11298 this server is down, what do you do then?  To override this variable you
11299 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11300 the ``current'' server, to get back the default behavior, for posting.
11301
11302 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11303 gnus will prompt you for what method to use for posting.
11304
11305 You can also set @code{gnus-post-method} to a list of select methods.
11306 If that's the case, gnus will always prompt you for what method to use
11307 for posting.
11308
11309 Finally, if you want to always post using the native select method,
11310 you can set this variable to @code{native}.
11311
11312 When sending mail, Message invokes @code{message-send-mail-function}.
11313 The default function, @code{message-send-mail-with-sendmail}, pipes
11314 your article to the @code{sendmail} binary for further queuing and
11315 sending.  When your local system is not configured for sending mail
11316 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11317 server, you can set @code{message-send-mail-function} to
11318 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11319 package correctly.  An example:
11320
11321 @lisp
11322 (setq message-send-mail-function 'smtpmail-send-it
11323       smtpmail-default-smtp-server "YOUR SMTP HOST")
11324 ;; The following variable needs to be set because of the FLIM version of
11325 ;; smtpmail.el.  Which smtpmail.el is used depends on the `load-path'.
11326 (setq smtp-default-smtp-server "YOUR SMTP HOST")
11327 @end lisp
11328
11329 To the thing similar to this, there is
11330 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11331 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11332 documentation for the function @code{mail-source-touch-pop}.
11333
11334 Other possible choices for @code{message-send-mail-function} includes
11335 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11336 and @code{feedmail-send-it}.
11337
11338 @node Mail and Post
11339 @section Mail and Post
11340
11341 Here's a list of variables relevant to both mailing and
11342 posting:
11343
11344 @table @code
11345 @item gnus-mailing-list-groups
11346 @findex gnus-mailing-list-groups
11347 @cindex mailing lists
11348
11349 If your news server offers groups that are really mailing lists
11350 gatewayed to the @acronym{NNTP} server, you can read those groups without
11351 problems, but you can't post/followup to them without some difficulty.
11352 One solution is to add a @code{to-address} to the group parameters
11353 (@pxref{Group Parameters}).  An easier thing to do is set the
11354 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11355 really are mailing lists.  Then, at least, followups to the mailing
11356 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11357 still a pain, though.
11358
11359 @item gnus-user-agent
11360 @vindex gnus-user-agent
11361 @cindex User-Agent
11362
11363 This variable controls which information should be exposed in the
11364 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11365 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11366 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11367 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11368 system type) or a custom string.  If you set it to a string, be sure to
11369 use a valid format, see RFC 2616.
11370
11371 @end table
11372
11373 You may want to do spell-checking on messages that you send out.  Or, if
11374 you don't want to spell-check by hand, you could add automatic
11375 spell-checking via the @code{ispell} package:
11376
11377 @cindex ispell
11378 @findex ispell-message
11379 @lisp
11380 (add-hook 'message-send-hook 'ispell-message)
11381 @end lisp
11382
11383 If you want to change the @code{ispell} dictionary based on what group
11384 you're in, you could say something like the following:
11385
11386 @lisp
11387 (add-hook 'gnus-select-group-hook
11388           (lambda ()
11389             (cond
11390              ((string-match
11391                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11392               (ispell-change-dictionary "deutsch"))
11393              (t
11394               (ispell-change-dictionary "english")))))
11395 @end lisp
11396
11397 Modify to suit your needs.
11398
11399
11400 @node Archived Messages
11401 @section Archived Messages
11402 @cindex archived messages
11403 @cindex sent messages
11404
11405 Gnus provides a few different methods for storing the mail and news you
11406 send.  The default method is to use the @dfn{archive virtual server} to
11407 store the messages.  If you want to disable this completely, the
11408 @code{gnus-message-archive-group} variable should be @code{nil}, which
11409 is the default.
11410
11411 For archiving interesting messages in a group you read, see the
11412 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11413 Group Commands}).
11414
11415 @vindex gnus-message-archive-method
11416 @code{gnus-message-archive-method} says what virtual server gnus is to
11417 use to store sent messages.  The default is:
11418
11419 @lisp
11420 (nnfolder "archive"
11421           (nnfolder-directory   "~/Mail/archive")
11422           (nnfolder-active-file "~/Mail/archive/active")
11423           (nnfolder-get-new-mail nil)
11424           (nnfolder-inhibit-expiry t))
11425 @end lisp
11426
11427 You can, however, use any mail select method (@code{nnml},
11428 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11429 for doing this sort of thing, though.  If you don't like the default
11430 directory chosen, you could say something like:
11431
11432 @lisp
11433 (setq gnus-message-archive-method
11434       '(nnfolder "archive"
11435                  (nnfolder-inhibit-expiry t)
11436                  (nnfolder-active-file "~/News/sent-mail/active")
11437                  (nnfolder-directory "~/News/sent-mail/")))
11438 @end lisp
11439
11440 @vindex gnus-message-archive-group
11441 @cindex Gcc
11442 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11443 to one or more group(s) on that server.  Which group to use is
11444 determined by the @code{gnus-message-archive-group} variable.
11445
11446 This variable can be used to do the following:
11447
11448 @itemize @bullet
11449 @item
11450 a string
11451 Messages will be saved in that group.
11452
11453 Note that you can include a select method in the group name, then the
11454 message will not be stored in the select method given by
11455 @code{gnus-message-archive-method}, but in the select method specified
11456 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11457 has the default value shown above.  Then setting
11458 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11459 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11460 value @code{"nnml:foo"}, then outgoing messages will be stored in
11461 @samp{nnml:foo}.
11462 @item
11463 a list of strings
11464 Messages will be saved in all those groups.
11465 @item
11466 an alist of regexps, functions and forms
11467 When a key ``matches'', the result is used.
11468 @item
11469 @code{nil}
11470 No message archiving will take place.  This is the default.
11471 @end itemize
11472
11473 Let's illustrate:
11474
11475 Just saving to a single group called @samp{MisK}:
11476 @lisp
11477 (setq gnus-message-archive-group "MisK")
11478 @end lisp
11479
11480 Saving to two groups, @samp{MisK} and @samp{safe}:
11481 @lisp
11482 (setq gnus-message-archive-group '("MisK" "safe"))
11483 @end lisp
11484
11485 Save to different groups based on what group you are in:
11486 @lisp
11487 (setq gnus-message-archive-group
11488       '(("^alt" "sent-to-alt")
11489         ("mail" "sent-to-mail")
11490         (".*" "sent-to-misc")))
11491 @end lisp
11492
11493 More complex stuff:
11494 @lisp
11495 (setq gnus-message-archive-group
11496       '((if (message-news-p)
11497             "misc-news"
11498           "misc-mail")))
11499 @end lisp
11500
11501 How about storing all news messages in one file, but storing all mail
11502 messages in one file per month:
11503
11504 @lisp
11505 (setq gnus-message-archive-group
11506       '((if (message-news-p)
11507             "misc-news"
11508           (concat "mail." (format-time-string "%Y-%m")))))
11509 @end lisp
11510
11511 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11512 @c use a different value for @code{gnus-message-archive-group} there.)
11513
11514 Now, when you send a message off, it will be stored in the appropriate
11515 group.  (If you want to disable storing for just one particular message,
11516 you can just remove the @code{Gcc} header that has been inserted.)  The
11517 archive group will appear in the group buffer the next time you start
11518 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11519 enter it and read the articles in it just like you'd read any other
11520 group.  If the group gets really big and annoying, you can simply rename
11521 if (using @kbd{G r} in the group buffer) to something
11522 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11523 continue to be stored in the old (now empty) group.
11524
11525 That's the default method of archiving sent messages.  Gnus offers a
11526 different way for the people who don't like the default method.  In that
11527 case you should set @code{gnus-message-archive-group} to @code{nil};
11528 this will disable archiving.
11529
11530 @table @code
11531 @item gnus-outgoing-message-group
11532 @vindex gnus-outgoing-message-group
11533 All outgoing messages will be put in this group.  If you want to store
11534 all your outgoing mail and articles in the group @samp{nnml:archive},
11535 you set this variable to that value.  This variable can also be a list of
11536 group names.
11537
11538 If you want to have greater control over what group to put each
11539 message in, you can set this variable to a function that checks the
11540 current newsgroup name and then returns a suitable group name (or list
11541 of names).
11542
11543 This variable can be used instead of @code{gnus-message-archive-group},
11544 but the latter is the preferred method.
11545
11546 @item gnus-gcc-mark-as-read
11547 @vindex gnus-gcc-mark-as-read
11548 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11549
11550 @item gnus-gcc-externalize-attachments
11551 @vindex gnus-gcc-externalize-attachments
11552 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11553 and matches the Gcc group name, attach files as external parts; if it is
11554 @code{all}, attach local files as external parts; if it is other
11555 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11556 changed in the future.
11557
11558 @end table
11559
11560
11561 @node Posting Styles
11562 @section Posting Styles
11563 @cindex posting styles
11564 @cindex styles
11565
11566 All them variables, they make my head swim.
11567
11568 So what if you want a different @code{Organization} and signature based
11569 on what groups you post to?  And you post both from your home machine
11570 and your work machine, and you want different @code{From} lines, and so
11571 on?
11572
11573 @vindex gnus-posting-styles
11574 One way to do stuff like that is to write clever hooks that change the
11575 variables you need to have changed.  That's a bit boring, so somebody
11576 came up with the bright idea of letting the user specify these things in
11577 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11578 variable:
11579
11580 @lisp
11581 ((".*"
11582   (signature "Peace and happiness")
11583   (organization "What me?"))
11584  ("^comp"
11585   (signature "Death to everybody"))
11586  ("comp.emacs.i-love-it"
11587   (organization "Emacs is it")))
11588 @end lisp
11589
11590 As you might surmise from this example, this alist consists of several
11591 @dfn{styles}.  Each style will be applicable if the first element
11592 ``matches'', in some form or other.  The entire alist will be iterated
11593 over, from the beginning towards the end, and each match will be
11594 applied, which means that attributes in later styles that match override
11595 the same attributes in earlier matching styles.  So
11596 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11597 signature and the @samp{What me?} @code{Organization} header.
11598
11599 The first element in each style is called the @code{match}.  If it's a
11600 string, then Gnus will try to regexp match it against the group name.
11601 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11602 will look in the original article for a header whose name is
11603 @var{match} and compare that @var{regexp}.  @var{match} and
11604 @var{regexp} are strings.  (There original article is the one you are
11605 replying or following up to.  If you are not composing a reply or a
11606 followup, then there is nothing to match against.)  If the
11607 @code{match} is a function symbol, that function will be called with
11608 no arguments.  If it's a variable symbol, then the variable will be
11609 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11610 any case, if this returns a non-@code{nil} value, then the style is
11611 said to @dfn{match}.
11612
11613 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11614 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11615 attribute name can be one of @code{signature}, @code{signature-file},
11616 @code{x-face-file}, @code{address} (overriding
11617 @code{user-mail-address}), @code{name} (overriding
11618 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11619 be a string or a symbol.  In that case, this will be used as a header
11620 name, and the value will be inserted in the headers of the article; if
11621 the value is @code{nil}, the header name will be removed.  If the
11622 attribute name is @code{eval}, the form is evaluated, and the result
11623 is thrown away.
11624
11625 The attribute value can be a string (used verbatim), a function with
11626 zero arguments (the return value will be used), a variable (its value
11627 will be used) or a list (it will be @code{eval}ed and the return value
11628 will be used).  The functions and sexps are called/@code{eval}ed in the
11629 message buffer that is being set up.  The headers of the current article
11630 are available through the @code{message-reply-headers} variable, which
11631 is a vector of the following headers: number subject from date id
11632 references chars lines xref extra.
11633
11634 @vindex message-reply-headers
11635
11636 If you wish to check whether the message you are about to compose is
11637 meant to be a news article or a mail message, you can check the values
11638 of the @code{message-news-p} and @code{message-mail-p} functions.
11639
11640 @findex message-mail-p
11641 @findex message-news-p
11642
11643 So here's a new example:
11644
11645 @lisp
11646 (setq gnus-posting-styles
11647       '((".*"
11648          (signature-file "~/.signature")
11649          (name "User Name")
11650          ("X-Home-Page" (getenv "WWW_HOME"))
11651          (organization "People's Front Against MWM"))
11652         ("^rec.humor"
11653          (signature my-funny-signature-randomizer))
11654         ((equal (system-name) "gnarly")  ;; @r{A form}
11655          (signature my-quote-randomizer))
11656         (message-news-p        ;; @r{A function symbol}
11657          (signature my-news-signature))
11658         (window-system         ;; @r{A value symbol}
11659          ("X-Window-System" (format "%s" window-system)))
11660         ;; @r{If I'm replying to Larsi, set the Organization header.}
11661         ((header "from" "larsi.*org")
11662          (Organization "Somewhere, Inc."))
11663         ((posting-from-work-p) ;; @r{A user defined function}
11664          (signature-file "~/.work-signature")
11665          (address "user@@bar.foo")
11666          (body "You are fired.\n\nSincerely, your boss.")
11667          (organization "Important Work, Inc"))
11668         ("nnml:.*"
11669          (From (save-excursion
11670                  (set-buffer gnus-article-buffer)
11671                  (message-fetch-field "to"))))
11672         ("^nn.+:"
11673          (signature-file "~/.mail-signature"))))
11674 @end lisp
11675
11676 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11677 @code{From} address in all your outgoing replies, which might be handy
11678 if you fill many roles.
11679
11680 Setting the @code{gnus-named-posting-styles} variable will make
11681 posting-styles allow to have distinctive names.  You can specify an
11682 arbitrary posting-style when article posting with @kbd{S P} in the
11683 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11684 the names to styles.  Once a posting-style is added to the alist, we can
11685 import it from @code{gnus-posting-styles}.  If an attribute whose name
11686 is @code{import} is found, Gnus will look for the attribute value in
11687 @code{gnus-named-posting-styles} and expand it in place.
11688
11689 Here's an example:
11690
11691 @lisp
11692 (setq gnus-named-posting-styles
11693       '(("Default"
11694          (signature-file "~/.signature")
11695          (name "User Name")
11696          ("X-Home-Page" (getenv "WWW_HOME"))
11697          (organization "People's Front Against MWM"))
11698         ("Emacs"
11699          (import "Default")
11700          (organization "The Church of Emacs"))))
11701 @end lisp
11702
11703 The posting-style named "Emacs" will inherit all the attributes from
11704 "Default" except @code{organization}.
11705
11706
11707 @node Drafts
11708 @section Drafts
11709 @cindex drafts
11710
11711 If you are writing a message (mail or news) and suddenly remember that
11712 you have a steak in the oven (or some pesto in the food processor, you
11713 craaazy vegetarians), you'll probably wish there was a method to save
11714 the message you are writing so that you can continue editing it some
11715 other day, and send it when you feel its finished.
11716
11717 Well, don't worry about it.  Whenever you start composing a message of
11718 some sort using the gnus mail and post commands, the buffer you get will
11719 automatically associate to an article in a special @dfn{draft} group.
11720 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11721 article will be saved there.  (Auto-save files also go to the draft
11722 group.)
11723
11724 @cindex nndraft
11725 @vindex nndraft-directory
11726 The draft group is a special group (which is implemented as an
11727 @code{nndraft} group, if you absolutely have to know) called
11728 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11729 @code{nndraft} is to store its files.  What makes this group special is
11730 that you can't tick any articles in it or mark any articles as
11731 read---all articles in the group are permanently unread.
11732
11733 If the group doesn't exist, it will be created and you'll be subscribed
11734 to it.  The only way to make it disappear from the Group buffer is to
11735 unsubscribe it.  The special properties of the draft group comes from
11736 a group property (@pxref{Group Parameters}), and if lost the group
11737 behaves like any other group.  This means the commands below will not
11738 be available.  To restore the special properties of the group, the
11739 simplest way is to kill the group, using @kbd{C-k}, and restart
11740 Gnus.  The group is automatically created again with the
11741 correct parameters.  The content of the group is not lost.
11742
11743 @c @findex gnus-dissociate-buffer-from-draft
11744 @c @kindex C-c M-d (Mail)
11745 @c @kindex C-c M-d (Post)
11746 @c @findex gnus-associate-buffer-with-draft
11747 @c @kindex C-c C-d (Mail)
11748 @c @kindex C-c C-d (Post)
11749 @c If you're writing some super-secret message that you later want to
11750 @c encode with PGP before sending, you may wish to turn the auto-saving
11751 @c (and association with the draft group) off.  You never know who might be
11752 @c interested in reading all your extremely valuable and terribly horrible
11753 @c and interesting secrets.  The @kbd{C-c M-d}
11754 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11755 @c If you change your mind and want to turn the auto-saving back on again,
11756 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11757 @c
11758 @c @vindex gnus-use-draft
11759 @c To leave association with the draft group off by default, set
11760 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11761
11762 @findex gnus-draft-edit-message
11763 @kindex D e (Draft)
11764 When you want to continue editing the article, you simply enter the
11765 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11766 that.  You will be placed in a buffer where you left off.
11767
11768 Rejected articles will also be put in this draft group (@pxref{Rejected
11769 Articles}).
11770
11771 @findex gnus-draft-send-all-messages
11772 @kindex D s (Draft)
11773 @findex gnus-draft-send-message
11774 @kindex D S (Draft)
11775 If you have lots of rejected messages you want to post (or mail) without
11776 doing further editing, you can use the @kbd{D s} command
11777 (@code{gnus-draft-send-message}).  This command understands the
11778 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11779 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11780 in the buffer.
11781
11782 @findex gnus-draft-toggle-sending
11783 @kindex D t (Draft)
11784 If you have some messages that you wish not to send, you can use the
11785 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11786 as unsendable.  This is a toggling command.
11787
11788
11789 @node Rejected Articles
11790 @section Rejected Articles
11791 @cindex rejected articles
11792
11793 Sometimes a news server will reject an article.  Perhaps the server
11794 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11795 @emph{there be demons}.  Perhaps you have included too much cited text.
11796 Perhaps the disk is full.  Perhaps the server is down.
11797
11798 These situations are, of course, totally beyond the control of gnus.
11799 (Gnus, of course, loves the way you look, always feels great, has angels
11800 fluttering around inside of it, doesn't care about how much cited text
11801 you include, never runs full and never goes down.)  So gnus saves these
11802 articles until some later time when the server feels better.
11803
11804 The rejected articles will automatically be put in a special draft group
11805 (@pxref{Drafts}).  When the server comes back up again, you'd then
11806 typically enter that group and send all the articles off.
11807
11808 @node Signing and encrypting
11809 @section Signing and encrypting
11810 @cindex using gpg
11811 @cindex using s/mime
11812 @cindex using smime
11813
11814 Gnus can digitally sign and encrypt your messages, using vanilla
11815 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11816 decoding such messages, see the @code{mm-verify-option} and
11817 @code{mm-decrypt-option} options (@pxref{Security}).
11818
11819 @vindex gnus-message-replysign
11820 @vindex gnus-message-replyencrypt
11821 @vindex gnus-message-replysignencrypted
11822 Often, you would like to sign replies to people who send you signed
11823 messages.  Even more often, you might want to encrypt messages which
11824 are in reply to encrypted messages.  Gnus offers
11825 @code{gnus-message-replysign} to enable the former, and
11826 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11827 @code{gnus-message-replysignencrypted} (on by default) will sign
11828 automatically encrypted messages.
11829
11830 Instructing MML to perform security operations on a @acronym{MIME} part is
11831 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11832 C-m c} key map for encryption, as follows.
11833
11834 @table @kbd
11835
11836 @item C-c C-m s s
11837 @kindex C-c C-m s s
11838 @findex mml-secure-message-sign-smime
11839
11840 Digitally sign current message using @acronym{S/MIME}.
11841
11842 @item C-c C-m s o
11843 @kindex C-c C-m s o
11844 @findex mml-secure-message-sign-pgp
11845
11846 Digitally sign current message using @acronym{PGP}.
11847
11848 @item C-c C-m s p
11849 @kindex C-c C-m s p
11850 @findex mml-secure-message-sign-pgp
11851
11852 Digitally sign current message using @acronym{PGP/MIME}.
11853
11854 @item C-c C-m c s
11855 @kindex C-c C-m c s
11856 @findex mml-secure-message-encrypt-smime
11857
11858 Digitally encrypt current message using @acronym{S/MIME}.
11859
11860 @item C-c C-m c o
11861 @kindex C-c C-m c o
11862 @findex mml-secure-message-encrypt-pgp
11863
11864 Digitally encrypt current message using @acronym{PGP}.
11865
11866 @item C-c C-m c p
11867 @kindex C-c C-m c p
11868 @findex mml-secure-message-encrypt-pgpmime
11869
11870 Digitally encrypt current message using @acronym{PGP/MIME}.
11871
11872 @item C-c C-m C-n
11873 @kindex C-c C-m C-n
11874 @findex mml-unsecure-message
11875 Remove security related MML tags from message.
11876
11877 @end table
11878
11879 @xref{Security, ,Security, message, Message Manual}, for more information.
11880
11881 @node Select Methods
11882 @chapter Select Methods
11883 @cindex foreign groups
11884 @cindex select methods
11885
11886 A @dfn{foreign group} is a group not read by the usual (or
11887 default) means.  It could be, for instance, a group from a different
11888 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11889 personal mail group.
11890
11891 A foreign group (or any group, really) is specified by a @dfn{name} and
11892 a @dfn{select method}.  To take the latter first, a select method is a
11893 list where the first element says what back end to use (e.g. @code{nntp},
11894 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11895 name}.  There may be additional elements in the select method, where the
11896 value may have special meaning for the back end in question.
11897
11898 One could say that a select method defines a @dfn{virtual server}---so
11899 we do just that (@pxref{Server Buffer}).
11900
11901 The @dfn{name} of the group is the name the back end will recognize the
11902 group as.
11903
11904 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11905 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11906 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11907 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11908 back end just knows this group as @samp{soc.motss}.
11909
11910 The different methods all have their peculiarities, of course.
11911
11912 @menu
11913 * Server Buffer::               Making and editing virtual servers.
11914 * Getting News::                Reading USENET news with Gnus.
11915 * Getting Mail::                Reading your personal mail with Gnus.
11916 * Browsing the Web::            Getting messages from a plethora of Web sources.
11917 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11918 * Other Sources::               Reading directories, files, SOUP packets.
11919 * Combined Groups::             Combining groups into one group.
11920 * Gnus Unplugged::              Reading news and mail offline.
11921 @end menu
11922
11923
11924 @node Server Buffer
11925 @section Server Buffer
11926
11927 Traditionally, a @dfn{server} is a machine or a piece of software that
11928 one connects to, and then requests information from.  Gnus does not
11929 connect directly to any real servers, but does all transactions through
11930 one back end or other.  But that's just putting one layer more between
11931 the actual media and Gnus, so we might just as well say that each
11932 back end represents a virtual server.
11933
11934 For instance, the @code{nntp} back end may be used to connect to several
11935 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11936 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11937 use, and what parameters to set by specifying a @dfn{select method}.
11938
11939 These select method specifications can sometimes become quite
11940 complicated---say, for instance, that you want to read from the
11941 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11942 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11943 Anyway, if you had to specify that for each group that used this
11944 server, that would be too much work, so Gnus offers a way of naming
11945 select methods, which is what you do in the server buffer.
11946
11947 To enter the server buffer, use the @kbd{^}
11948 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11949
11950 @menu
11951 * Server Buffer Format::        You can customize the look of this buffer.
11952 * Server Commands::             Commands to manipulate servers.
11953 * Example Methods::             Examples server specifications.
11954 * Creating a Virtual Server::   An example session.
11955 * Server Variables::            Which variables to set.
11956 * Servers and Methods::         You can use server names as select methods.
11957 * Unavailable Servers::         Some servers you try to contact may be down.
11958 @end menu
11959
11960 @vindex gnus-server-mode-hook
11961 @code{gnus-server-mode-hook} is run when creating the server buffer.
11962
11963
11964 @node Server Buffer Format
11965 @subsection Server Buffer Format
11966 @cindex server buffer format
11967
11968 @vindex gnus-server-line-format
11969 You can change the look of the server buffer lines by changing the
11970 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11971 variable, with some simple extensions:
11972
11973 @table @samp
11974
11975 @item h
11976 How the news is fetched---the back end name.
11977
11978 @item n
11979 The name of this server.
11980
11981 @item w
11982 Where the news is to be fetched from---the address.
11983
11984 @item s
11985 The opened/closed/denied status of the server.
11986 @end table
11987
11988 @vindex gnus-server-mode-line-format
11989 The mode line can also be customized by using the
11990 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11991 Formatting}).  The following specs are understood:
11992
11993 @table @samp
11994 @item S
11995 Server name.
11996
11997 @item M
11998 Server method.
11999 @end table
12000
12001 Also @pxref{Formatting Variables}.
12002
12003
12004 @node Server Commands
12005 @subsection Server Commands
12006 @cindex server commands
12007
12008 @table @kbd
12009
12010 @item a
12011 @kindex a (Server)
12012 @findex gnus-server-add-server
12013 Add a new server (@code{gnus-server-add-server}).
12014
12015 @item e
12016 @kindex e (Server)
12017 @findex gnus-server-edit-server
12018 Edit a server (@code{gnus-server-edit-server}).
12019
12020 @item SPACE
12021 @kindex SPACE (Server)
12022 @findex gnus-server-read-server
12023 Browse the current server (@code{gnus-server-read-server}).
12024
12025 @item q
12026 @kindex q (Server)
12027 @findex gnus-server-exit
12028 Return to the group buffer (@code{gnus-server-exit}).
12029
12030 @item k
12031 @kindex k (Server)
12032 @findex gnus-server-kill-server
12033 Kill the current server (@code{gnus-server-kill-server}).
12034
12035 @item y
12036 @kindex y (Server)
12037 @findex gnus-server-yank-server
12038 Yank the previously killed server (@code{gnus-server-yank-server}).
12039
12040 @item c
12041 @kindex c (Server)
12042 @findex gnus-server-copy-server
12043 Copy the current server (@code{gnus-server-copy-server}).
12044
12045 @item l
12046 @kindex l (Server)
12047 @findex gnus-server-list-servers
12048 List all servers (@code{gnus-server-list-servers}).
12049
12050 @item s
12051 @kindex s (Server)
12052 @findex gnus-server-scan-server
12053 Request that the server scan its sources for new articles
12054 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12055 servers.
12056
12057 @item g
12058 @kindex g (Server)
12059 @findex gnus-server-regenerate-server
12060 Request that the server regenerate all its data structures
12061 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12062 a mail back end that has gotten out of sync.
12063
12064 @end table
12065
12066
12067 @node Example Methods
12068 @subsection Example Methods
12069
12070 Most select methods are pretty simple and self-explanatory:
12071
12072 @lisp
12073 (nntp "news.funet.fi")
12074 @end lisp
12075
12076 Reading directly from the spool is even simpler:
12077
12078 @lisp
12079 (nnspool "")
12080 @end lisp
12081
12082 As you can see, the first element in a select method is the name of the
12083 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12084 will.
12085
12086 After these two elements, there may be an arbitrary number of
12087 @code{(@var{variable} @var{form})} pairs.
12088
12089 To go back to the first example---imagine that you want to read from
12090 port 15 on that machine.  This is what the select method should
12091 look like then:
12092
12093 @lisp
12094 (nntp "news.funet.fi" (nntp-port-number 15))
12095 @end lisp
12096
12097 You should read the documentation to each back end to find out what
12098 variables are relevant, but here's an @code{nnmh} example:
12099
12100 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12101 you have two structures that you wish to access: One is your private
12102 mail spool, and the other is a public one.  Here's the possible spec for
12103 your private mail:
12104
12105 @lisp
12106 (nnmh "private" (nnmh-directory "~/private/mail/"))
12107 @end lisp
12108
12109 (This server is then called @samp{private}, but you may have guessed
12110 that.)
12111
12112 Here's the method for a public spool:
12113
12114 @lisp
12115 (nnmh "public"
12116       (nnmh-directory "/usr/information/spool/")
12117       (nnmh-get-new-mail nil))
12118 @end lisp
12119
12120 @cindex proxy
12121 @cindex firewall
12122
12123 If you are behind a firewall and only have access to the @acronym{NNTP}
12124 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12125 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12126 Doing this can be rather fiddly, but your virtual server definition
12127 should probably look something like this:
12128
12129 @lisp
12130 (nntp "firewall"
12131       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12132       (nntp-via-address "the.firewall.machine")
12133       (nntp-address "the.real.nntp.host")
12134       (nntp-end-of-line "\n"))
12135 @end lisp
12136
12137 If you want to use the wonderful @code{ssh} program to provide a
12138 compressed connection over the modem line, you could add the following
12139 configuration to the example above:
12140
12141 @lisp
12142       (nntp-via-rlogin-command "ssh")
12143 @end lisp
12144
12145 See also @code{nntp-via-rlogin-command-switches}.
12146
12147 If you're behind a firewall, but have direct access to the outside world
12148 through a wrapper command like "runsocks", you could open a socksified
12149 telnet connection to the news server as follows:
12150
12151 @lisp
12152 (nntp "outside"
12153       (nntp-pre-command "runsocks")
12154       (nntp-open-connection-function nntp-open-via-telnet)
12155       (nntp-address "the.news.server")
12156       (nntp-end-of-line "\n"))
12157 @end lisp
12158
12159 This means that you have to have set up @code{ssh-agent} correctly to
12160 provide automatic authorization, of course.  And to get a compressed
12161 connection, you have to have the @samp{Compression} option in the
12162 @code{ssh} @file{config} file.
12163
12164
12165 @node Creating a Virtual Server
12166 @subsection Creating a Virtual Server
12167
12168 If you're saving lots of articles in the cache by using persistent
12169 articles, you may want to create a virtual server to read the cache.
12170
12171 First you need to add a new server.  The @kbd{a} command does that.  It
12172 would probably be best to use @code{nnspool} to read the cache.  You
12173 could also use @code{nnml} or @code{nnmh}, though.
12174
12175 Type @kbd{a nnspool RET cache RET}.
12176
12177 You should now have a brand new @code{nnspool} virtual server called
12178 @samp{cache}.  You now need to edit it to have the right definitions.
12179 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12180 will contain the following:
12181
12182 @lisp
12183 (nnspool "cache")
12184 @end lisp
12185
12186 Change that to:
12187
12188 @lisp
12189 (nnspool "cache"
12190          (nnspool-spool-directory "~/News/cache/")
12191          (nnspool-nov-directory "~/News/cache/")
12192          (nnspool-active-file "~/News/cache/active"))
12193 @end lisp
12194
12195 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12196 @kbd{RET} over this virtual server, you should be entered into a browse
12197 buffer, and you should be able to enter any of the groups displayed.
12198
12199
12200 @node Server Variables
12201 @subsection Server Variables
12202 @cindex server variables
12203 @cindex server parameters
12204
12205 One sticky point when defining variables (both on back ends and in Emacs
12206 in general) is that some variables are typically initialized from other
12207 variables when the definition of the variables is being loaded.  If you
12208 change the ``base'' variable after the variables have been loaded, you
12209 won't change the ``derived'' variables.
12210
12211 This typically affects directory and file variables.  For instance,
12212 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12213 directory variables are initialized from that variable, so
12214 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12215 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12216 @code{nnml-directory}---you have to explicitly set all the file
12217 variables to be what you want them to be.  For a complete list of
12218 variables for each back end, see each back end's section later in this
12219 manual, but here's an example @code{nnml} definition:
12220
12221 @lisp
12222 (nnml "public"
12223       (nnml-directory "~/my-mail/")
12224       (nnml-active-file "~/my-mail/active")
12225       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12226 @end lisp
12227
12228 Server variables are often called @dfn{server parameters}.
12229
12230 @node Servers and Methods
12231 @subsection Servers and Methods
12232
12233 Wherever you would normally use a select method
12234 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12235 when browsing a foreign server) you can use a virtual server name
12236 instead.  This could potentially save lots of typing.  And it's nice all
12237 over.
12238
12239
12240 @node Unavailable Servers
12241 @subsection Unavailable Servers
12242
12243 If a server seems to be unreachable, Gnus will mark that server as
12244 @code{denied}.  That means that any subsequent attempt to make contact
12245 with that server will just be ignored.  ``It can't be opened,'' Gnus
12246 will tell you, without making the least effort to see whether that is
12247 actually the case or not.
12248
12249 That might seem quite naughty, but it does make sense most of the time.
12250 Let's say you have 10 groups subscribed to on server
12251 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12252 away from you and the machine is quite slow, so it takes 1 minute just
12253 to find out that it refuses connection to you today.  If Gnus were to
12254 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12255 attempt to do that.  Once it has gotten a single ``connection refused'',
12256 it will regard that server as ``down''.
12257
12258 So, what happens if the machine was only feeling unwell temporarily?
12259 How do you test to see whether the machine has come up again?
12260
12261 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12262 with the following commands:
12263
12264 @table @kbd
12265
12266 @item O
12267 @kindex O (Server)
12268 @findex gnus-server-open-server
12269 Try to establish connection to the server on the current line
12270 (@code{gnus-server-open-server}).
12271
12272 @item C
12273 @kindex C (Server)
12274 @findex gnus-server-close-server
12275 Close the connection (if any) to the server
12276 (@code{gnus-server-close-server}).
12277
12278 @item D
12279 @kindex D (Server)
12280 @findex gnus-server-deny-server
12281 Mark the current server as unreachable
12282 (@code{gnus-server-deny-server}).
12283
12284 @item M-o
12285 @kindex M-o (Server)
12286 @findex gnus-server-open-all-servers
12287 Open the connections to all servers in the buffer
12288 (@code{gnus-server-open-all-servers}).
12289
12290 @item M-c
12291 @kindex M-c (Server)
12292 @findex gnus-server-close-all-servers
12293 Close the connections to all servers in the buffer
12294 (@code{gnus-server-close-all-servers}).
12295
12296 @item R
12297 @kindex R (Server)
12298 @findex gnus-server-remove-denials
12299 Remove all marks to whether Gnus was denied connection from any servers
12300 (@code{gnus-server-remove-denials}).
12301
12302 @item L
12303 @kindex L (Server)
12304 @findex gnus-server-offline-server
12305 Set server status to offline (@code{gnus-server-offline-server}).
12306
12307 @end table
12308
12309
12310 @node Getting News
12311 @section Getting News
12312 @cindex reading news
12313 @cindex news back ends
12314
12315 A newsreader is normally used for reading news.  Gnus currently provides
12316 only two methods of getting news---it can read from an @acronym{NNTP} server,
12317 or it can read from a local spool.
12318
12319 @menu
12320 * NNTP::                        Reading news from an @acronym{NNTP} server.
12321 * News Spool::                  Reading news from the local spool.
12322 @end menu
12323
12324
12325 @node NNTP
12326 @subsection NNTP
12327 @cindex nntp
12328
12329 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12330 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12331 server as the, uhm, address.
12332
12333 If the @acronym{NNTP} server is located at a non-standard port, setting the
12334 third element of the select method to this port number should allow you
12335 to connect to the right port.  You'll have to edit the group info for
12336 that (@pxref{Foreign Groups}).
12337
12338 The name of the foreign group can be the same as a native group.  In
12339 fact, you can subscribe to the same group from as many different servers
12340 you feel like.  There will be no name collisions.
12341
12342 The following variables can be used to create a virtual @code{nntp}
12343 server:
12344
12345 @table @code
12346
12347 @item nntp-server-opened-hook
12348 @vindex nntp-server-opened-hook
12349 @cindex @sc{mode reader}
12350 @cindex authinfo
12351 @cindex authentification
12352 @cindex nntp authentification
12353 @findex nntp-send-authinfo
12354 @findex nntp-send-mode-reader
12355 is run after a connection has been made.  It can be used to send
12356 commands to the @acronym{NNTP} server after it has been contacted.  By
12357 default it sends the command @code{MODE READER} to the server with the
12358 @code{nntp-send-mode-reader} function.  This function should always be
12359 present in this hook.
12360
12361 @item nntp-authinfo-function
12362 @vindex nntp-authinfo-function
12363 @findex nntp-send-authinfo
12364 @vindex nntp-authinfo-file
12365 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12366 server.  The default function is @code{nntp-send-authinfo}, which looks
12367 through your @file{~/.authinfo} (or whatever you've set the
12368 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12369 are found, it will prompt you for a login name and a password.  The
12370 format of the @file{~/.authinfo} file is (almost) the same as the
12371 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12372 manual page, but here are the salient facts:
12373
12374 @enumerate
12375 @item
12376 The file contains one or more line, each of which define one server.
12377
12378 @item
12379 Each line may contain an arbitrary number of token/value pairs.
12380
12381 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12382 @samp{default}.  In addition Gnus introduces two new tokens, not present
12383 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12384 @samp{force}.  (This is the only way the @file{.authinfo} file format
12385 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12386 indicate what port on the server the credentials apply to and
12387 @samp{force} is explained below.
12388
12389 @end enumerate
12390
12391 Here's an example file:
12392
12393 @example
12394 machine news.uio.no login larsi password geheimnis
12395 machine nntp.ifi.uio.no login larsi force yes
12396 @end example
12397
12398 The token/value pairs may appear in any order; @samp{machine} doesn't
12399 have to be first, for instance.
12400
12401 In this example, both login name and password have been supplied for the
12402 former server, while the latter has only the login name listed, and the
12403 user will be prompted for the password.  The latter also has the
12404 @samp{force} tag, which means that the authinfo will be sent to the
12405 @var{nntp} server upon connection; the default (i.e., when there is not
12406 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12407 until the @var{nntp} server asks for it.
12408
12409 You can also add @samp{default} lines that will apply to all servers
12410 that don't have matching @samp{machine} lines.
12411
12412 @example
12413 default force yes
12414 @end example
12415
12416 This will force sending @samp{AUTHINFO} commands to all servers not
12417 previously mentioned.
12418
12419 Remember to not leave the @file{~/.authinfo} file world-readable.
12420
12421 @item nntp-server-action-alist
12422 @vindex nntp-server-action-alist
12423 This is a list of regexps to match on server types and actions to be
12424 taken when matches are made.  For instance, if you want Gnus to beep
12425 every time you connect to innd, you could say something like:
12426
12427 @lisp
12428 (setq nntp-server-action-alist
12429       '(("innd" (ding))))
12430 @end lisp
12431
12432 You probably don't want to do that, though.
12433
12434 The default value is
12435
12436 @lisp
12437 '(("nntpd 1\\.5\\.11t"
12438    (remove-hook 'nntp-server-opened-hook
12439                 'nntp-send-mode-reader)))
12440 @end lisp
12441
12442 This ensures that Gnus doesn't send the @code{MODE READER} command to
12443 nntpd 1.5.11t, since that command chokes that server, I've been told.
12444
12445 @item nntp-maximum-request
12446 @vindex nntp-maximum-request
12447 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12448 will collect headers by sending a series of @code{head} commands.  To
12449 speed things up, the back end sends lots of these commands without
12450 waiting for reply, and then reads all the replies.  This is controlled
12451 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12452 your network is buggy, you should set this to 1.
12453
12454 @item nntp-connection-timeout
12455 @vindex nntp-connection-timeout
12456 If you have lots of foreign @code{nntp} groups that you connect to
12457 regularly, you're sure to have problems with @acronym{NNTP} servers not
12458 responding properly, or being too loaded to reply within reasonable
12459 time.  This is can lead to awkward problems, which can be helped
12460 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12461 that says how many seconds the @code{nntp} back end should wait for a
12462 connection before giving up.  If it is @code{nil}, which is the default,
12463 no timeouts are done.
12464
12465 @c @item nntp-command-timeout
12466 @c @vindex nntp-command-timeout
12467 @c @cindex PPP connections
12468 @c @cindex dynamic IP addresses
12469 @c If you're running Gnus on a machine that has a dynamically assigned
12470 @c address, Gnus may become confused.  If the address of your machine
12471 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12472 @c waiting forever for replies from the server.  To help with this
12473 @c unfortunate problem, you can set this command to a number.  Gnus will
12474 @c then, if it sits waiting for a reply from the server longer than that
12475 @c number of seconds, shut down the connection, start a new one, and resend
12476 @c the command.  This should hopefully be transparent to the user.  A
12477 @c likely number is 30 seconds.
12478 @c
12479 @c @item nntp-retry-on-break
12480 @c @vindex nntp-retry-on-break
12481 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12482 @c hangs.  This will have much the same effect as the command timeout
12483 @c described above.
12484
12485 @item nntp-server-hook
12486 @vindex nntp-server-hook
12487 This hook is run as the last step when connecting to an @acronym{NNTP}
12488 server.
12489
12490 @item nntp-buggy-select
12491 @vindex nntp-buggy-select
12492 Set this to non-@code{nil} if your select routine is buggy.
12493
12494 @item nntp-nov-is-evil
12495 @vindex nntp-nov-is-evil
12496 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12497 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12498 can be used.
12499
12500 @item nntp-xover-commands
12501 @vindex nntp-xover-commands
12502 @cindex @acronym{NOV}
12503 @cindex XOVER
12504 List of strings used as commands to fetch @acronym{NOV} lines from a
12505 server.  The default value of this variable is @code{("XOVER"
12506 "XOVERVIEW")}.
12507
12508 @item nntp-nov-gap
12509 @vindex nntp-nov-gap
12510 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12511 the server.  The server responds with one huge list of lines.  However,
12512 if you have read articles 2-5000 in the group, and only want to read
12513 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12514 lines that you will not need.  This variable says how
12515 big a gap between two consecutive articles is allowed to be before the
12516 @code{XOVER} request is split into several request.  Note that if your
12517 network is fast, setting this variable to a really small number means
12518 that fetching will probably be slower.  If this variable is @code{nil},
12519 @code{nntp} will never split requests.  The default is 5.
12520
12521 @item nntp-prepare-server-hook
12522 @vindex nntp-prepare-server-hook
12523 A hook run before attempting to connect to an @acronym{NNTP} server.
12524
12525 @item nntp-warn-about-losing-connection
12526 @vindex nntp-warn-about-losing-connection
12527 If this variable is non-@code{nil}, some noise will be made when a
12528 server closes connection.
12529
12530 @item nntp-record-commands
12531 @vindex nntp-record-commands
12532 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12533 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12534 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12535 that doesn't seem to work.
12536
12537 @item nntp-open-connection-function
12538 @vindex nntp-open-connection-function
12539 It is possible to customize how the connection to the nntp server will
12540 be opened.  If you specify an @code{nntp-open-connection-function}
12541 parameter, Gnus will use that function to establish the connection.
12542 Five pre-made functions are supplied.  These functions can be grouped in
12543 two categories: direct connection functions (three pre-made), and
12544 indirect ones (two pre-made).
12545
12546 @item nntp-prepare-post-hook
12547 @vindex nntp-prepare-post-hook
12548 A hook run just before posting an article.  If there is no
12549 @code{Message-ID} header in the article and the news server provides the
12550 recommended ID, it will be added to the article before running this
12551 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12552 inhibit Gnus to add a @code{Message-ID} header, you could say:
12553
12554 @lisp
12555 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12556 @end lisp
12557
12558 Note that not all servers support the recommended ID.  This works for
12559 INN versions 2.3.0 and later, for instance.
12560
12561 @item nntp-read-timeout
12562 @vindex nntp-read-timeout
12563 How long nntp should wait between checking for the end of output.
12564 Shorter values mean quicker response, but is more CPU intensive.  The
12565 default is 0.1 seconds.  If you have a slow line to the server (and
12566 don't like to see Emacs eat your available CPU power), you might set
12567 this to, say, 1.
12568
12569 @item nntp-list-options
12570 @vindex nntp-list-options
12571 List of newsgroup name used for a option of the LIST command to restrict
12572 the listing output to only the specified newsgroups.  Each newsgroup name
12573 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12574 etc.  Fortunately, if the server can accept such a option, it will
12575 probably make gnus run faster.  You may use it as a server variable as
12576 follows:
12577
12578 @lisp
12579 (setq gnus-select-method
12580       '(nntp "news.somewhere.edu"
12581              (nntp-list-options ("fj.*" "japan.*"))))
12582 @end lisp
12583
12584 @item nntp-options-subscribe
12585 @vindex nntp-options-subscribe
12586 Regexp matching the newsgroup names which will be subscribed
12587 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12588 It may be effective as well as @code{nntp-list-options} even though the
12589 server could not accept a shell-style wildcard as a option of the LIST
12590 command.  You may use it as a server variable as follows:
12591
12592 @lisp
12593 (setq gnus-select-method
12594       '(nntp "news.somewhere.edu"
12595              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12596 @end lisp
12597
12598 @item nntp-options-not-subscribe
12599 @vindex nntp-options-not-subscribe
12600 Regexp matching the newsgroup names which will not be subscribed
12601 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12602 It may be effective as well as @code{nntp-list-options} even though the
12603 server could not accept a shell-style wildcard as a option of the LIST
12604 command.  You may use it as a server variable as follows:
12605
12606 @lisp
12607 (setq gnus-select-method
12608       '(nntp "news.somewhere.edu"
12609              (nntp-options-not-subscribe "\\.binaries\\.")))
12610 @end lisp
12611 @end table
12612
12613 @menu
12614 * Direct Functions::            Connecting directly to the server.
12615 * Indirect Functions::          Connecting indirectly to the server.
12616 * Common Variables::            Understood by several connection functions.
12617 @end menu
12618
12619
12620 @node Direct Functions
12621 @subsubsection Direct Functions
12622 @cindex direct connection functions
12623
12624 These functions are called direct because they open a direct connection
12625 between your machine and the @acronym{NNTP} server.  The behavior of these
12626 functions is also affected by commonly understood variables
12627 (@pxref{Common Variables}).
12628
12629 @table @code
12630 @findex nntp-open-network-stream
12631 @item nntp-open-network-stream
12632 This is the default, and simply connects to some port or other on the
12633 remote system.
12634
12635 @findex nntp-open-tls-stream
12636 @item nntp-open-tls-stream
12637 Opens a connection to a server over a @dfn{secure} channel.  To use
12638 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12639 installed.  You then define a server as follows:
12640
12641 @lisp
12642 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12643 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12644 ;;
12645 (nntp "snews.bar.com"
12646       (nntp-open-connection-function nntp-open-tls-stream)
12647       (nntp-port-number )
12648       (nntp-address "snews.bar.com"))
12649 @end lisp
12650
12651 @findex nntp-open-ssl-stream
12652 @item nntp-open-ssl-stream
12653 Opens a connection to a server over a @dfn{secure} channel.  To use
12654 this you must have @uref{http://www.openssl.org, OpenSSL} or
12655 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12656 then define a server as follows:
12657
12658 @lisp
12659 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12660 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12661 ;;
12662 (nntp "snews.bar.com"
12663       (nntp-open-connection-function nntp-open-ssl-stream)
12664       (nntp-port-number 563)
12665       (nntp-address "snews.bar.com"))
12666 @end lisp
12667
12668 @findex nntp-open-telnet-stream
12669 @item nntp-open-telnet-stream
12670 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12671 it.  You might wonder why this function exists, since we have the
12672 default @code{nntp-open-network-stream} which would do the job.  (One
12673 of) the reason(s) is that if you are behind a firewall but have direct
12674 connections to the outside world thanks to a command wrapper like
12675 @code{runsocks}, you can use it like this:
12676
12677 @lisp
12678 (nntp "socksified"
12679       (nntp-pre-command "runsocks")
12680       (nntp-open-connection-function nntp-open-telnet-stream)
12681       (nntp-address "the.news.server"))
12682 @end lisp
12683
12684 With the default method, you would need to wrap your whole Emacs
12685 session, which is not a good idea.
12686 @end table
12687
12688
12689 @node Indirect Functions
12690 @subsubsection Indirect Functions
12691 @cindex indirect connection functions
12692
12693 These functions are called indirect because they connect to an
12694 intermediate host before actually connecting to the @acronym{NNTP} server.
12695 All of these functions and related variables are also said to belong to
12696 the ``via'' family of connection: they're all prefixed with ``via'' to make
12697 things cleaner.  The behavior of these functions is also affected by
12698 commonly understood variables (@pxref{Common Variables}).
12699
12700 @table @code
12701 @item nntp-open-via-rlogin-and-telnet
12702 @findex nntp-open-via-rlogin-and-telnet
12703 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12704 to the real @acronym{NNTP} server from there.  This is useful for instance if
12705 you need to connect to a firewall machine first.
12706
12707 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12708
12709 @table @code
12710 @item nntp-via-rlogin-command
12711 @vindex nntp-via-rlogin-command
12712 Command used to log in on the intermediate host.  The default is
12713 @samp{rsh}, but @samp{ssh} is a popular alternative.
12714
12715 @item nntp-via-rlogin-command-switches
12716 @vindex nntp-via-rlogin-command-switches
12717 List of strings to be used as the switches to
12718 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12719 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12720 @samp{("-C")} in order to compress all data connections, otherwise set
12721 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12722 the telnet command requires a pseudo-tty allocation on an intermediate
12723 host.
12724 @end table
12725
12726 @item nntp-open-via-telnet-and-telnet
12727 @findex nntp-open-via-telnet-and-telnet
12728 Does essentially the same, but uses @samp{telnet} instead of
12729 @samp{rlogin} to connect to the intermediate host.
12730
12731 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12732
12733 @table @code
12734 @item nntp-via-telnet-command
12735 @vindex nntp-via-telnet-command
12736 Command used to @code{telnet} the intermediate host.  The default is
12737 @samp{telnet}.
12738
12739 @item nntp-via-telnet-switches
12740 @vindex nntp-via-telnet-switches
12741 List of strings to be used as the switches to the
12742 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12743
12744 @item nntp-via-user-password
12745 @vindex nntp-via-user-password
12746 Password to use when logging in on the intermediate host.
12747
12748 @item nntp-via-envuser
12749 @vindex nntp-via-envuser
12750 If non-@code{nil}, the intermediate @code{telnet} session (client and
12751 server both) will support the @code{ENVIRON} option and not prompt for
12752 login name.  This works for Solaris @code{telnet}, for instance.
12753
12754 @item nntp-via-shell-prompt
12755 @vindex nntp-via-shell-prompt
12756 Regexp matching the shell prompt on the intermediate host.  The default
12757 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12758
12759 @end table
12760
12761 @end table
12762
12763
12764 Here are some additional variables that are understood by all the above
12765 functions:
12766
12767 @table @code
12768
12769 @item nntp-via-user-name
12770 @vindex nntp-via-user-name
12771 User name to use when connecting to the intermediate host.
12772
12773 @item nntp-via-address
12774 @vindex nntp-via-address
12775 Address of the intermediate host to connect to.
12776
12777 @end table
12778
12779
12780 @node Common Variables
12781 @subsubsection Common Variables
12782
12783 The following variables affect the behavior of all, or several of the
12784 pre-made connection functions.  When not specified, all functions are
12785 affected.
12786
12787 @table @code
12788
12789 @item nntp-pre-command
12790 @vindex nntp-pre-command
12791 A command wrapper to use when connecting through a non native
12792 connection function (all except @code{nntp-open-network-stream},
12793 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12794 where you would put a @samp{SOCKS} wrapper for instance.
12795
12796 @item nntp-address
12797 @vindex nntp-address
12798 The address of the @acronym{NNTP} server.
12799
12800 @item nntp-port-number
12801 @vindex nntp-port-number
12802 Port number to connect to the @acronym{NNTP} server.  The default is
12803 @samp{nntp}.  If you use @acronym{NNTP} over
12804 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
12805 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12806 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12807 not work with named ports.
12808
12809 @item nntp-end-of-line
12810 @vindex nntp-end-of-line
12811 String to use as end-of-line marker when talking to the @acronym{NNTP}
12812 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12813 using a non native connection function.
12814
12815 @item nntp-telnet-command
12816 @vindex nntp-telnet-command
12817 Command to use when connecting to the @acronym{NNTP} server through
12818 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12819 just for the real @acronym{NNTP} server.  The default is
12820 @samp{telnet}.
12821
12822 @item nntp-telnet-switches
12823 @vindex nntp-telnet-switches
12824 A list of switches to pass to @code{nntp-telnet-command}.  The default
12825 is @samp{("-8")}.
12826
12827 @end table
12828
12829
12830 @node News Spool
12831 @subsection News Spool
12832 @cindex nnspool
12833 @cindex news spool
12834
12835 Subscribing to a foreign group from the local spool is extremely easy,
12836 and might be useful, for instance, to speed up reading groups that
12837 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12838 instance.
12839
12840 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12841 anything else) as the address.
12842
12843 If you have access to a local spool, you should probably use that as the
12844 native select method (@pxref{Finding the News}).  It is normally faster
12845 than using an @code{nntp} select method, but might not be.  It depends.
12846 You just have to try to find out what's best at your site.
12847
12848 @table @code
12849
12850 @item nnspool-inews-program
12851 @vindex nnspool-inews-program
12852 Program used to post an article.
12853
12854 @item nnspool-inews-switches
12855 @vindex nnspool-inews-switches
12856 Parameters given to the inews program when posting an article.
12857
12858 @item nnspool-spool-directory
12859 @vindex nnspool-spool-directory
12860 Where @code{nnspool} looks for the articles.  This is normally
12861 @file{/usr/spool/news/}.
12862
12863 @item nnspool-nov-directory
12864 @vindex nnspool-nov-directory
12865 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12866 @file{/usr/spool/news/over.view/}.
12867
12868 @item nnspool-lib-dir
12869 @vindex nnspool-lib-dir
12870 Where the news lib dir is (@file{/usr/lib/news/} by default).
12871
12872 @item nnspool-active-file
12873 @vindex nnspool-active-file
12874 The name of the active file.
12875
12876 @item nnspool-newsgroups-file
12877 @vindex nnspool-newsgroups-file
12878 The name of the group descriptions file.
12879
12880 @item nnspool-history-file
12881 @vindex nnspool-history-file
12882 The name of the news history file.
12883
12884 @item nnspool-active-times-file
12885 @vindex nnspool-active-times-file
12886 The name of the active date file.
12887
12888 @item nnspool-nov-is-evil
12889 @vindex nnspool-nov-is-evil
12890 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12891 that it finds.
12892
12893 @item nnspool-sift-nov-with-sed
12894 @vindex nnspool-sift-nov-with-sed
12895 @cindex sed
12896 If non-@code{nil}, which is the default, use @code{sed} to get the
12897 relevant portion from the overview file.  If @code{nil},
12898 @code{nnspool} will load the entire file into a buffer and process it
12899 there.
12900
12901 @end table
12902
12903
12904 @node Getting Mail
12905 @section Getting Mail
12906 @cindex reading mail
12907 @cindex mail
12908
12909 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12910 course.
12911
12912 @menu
12913 * Mail in a Newsreader::        Important introductory notes.
12914 * Getting Started Reading Mail::  A simple cookbook example.
12915 * Splitting Mail::              How to create mail groups.
12916 * Mail Sources::                How to tell Gnus where to get mail from.
12917 * Mail Back End Variables::     Variables for customizing mail handling.
12918 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12919 * Group Mail Splitting::        Use group customize to drive mail splitting.
12920 * Incorporating Old Mail::      What about the old mail you have?
12921 * Expiring Mail::               Getting rid of unwanted mail.
12922 * Washing Mail::                Removing cruft from the mail you get.
12923 * Duplicates::                  Dealing with duplicated mail.
12924 * Not Reading Mail::            Using mail back ends for reading other files.
12925 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12926 @end menu
12927
12928
12929 @node Mail in a Newsreader
12930 @subsection Mail in a Newsreader
12931
12932 If you are used to traditional mail readers, but have decided to switch
12933 to reading mail with Gnus, you may find yourself experiencing something
12934 of a culture shock.
12935
12936 Gnus does not behave like traditional mail readers.  If you want to make
12937 it behave that way, you can, but it's an uphill battle.
12938
12939 Gnus, by default, handles all its groups using the same approach.  This
12940 approach is very newsreaderly---you enter a group, see the new/unread
12941 messages, and when you read the messages, they get marked as read, and
12942 you don't see them any more.  (Unless you explicitly ask for them.)
12943
12944 In particular, you do not do anything explicitly to delete messages.
12945
12946 Does this mean that all the messages that have been marked as read are
12947 deleted?  How awful!
12948
12949 But, no, it means that old messages are @dfn{expired} according to some
12950 scheme or other.  For news messages, the expire process is controlled by
12951 the news administrator; for mail, the expire process is controlled by
12952 you.  The expire process for mail is covered in depth in @ref{Expiring
12953 Mail}.
12954
12955 What many Gnus users find, after using it a while for both news and
12956 mail, is that the transport mechanism has very little to do with how
12957 they want to treat a message.
12958
12959 Many people subscribe to several mailing lists.  These are transported
12960 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12961 answering, or even reading these messages very carefully.  We may not
12962 need to save them because if we should need to read one again, they are
12963 archived somewhere else.
12964
12965 Some people have local news groups which have only a handful of readers.
12966 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12967 to read and answer a large fraction of the messages very carefully in
12968 order to do our work.  And there may not be an archive, so we may need
12969 to save the interesting messages the same way we would personal mail.
12970
12971 The important distinction turns out to be not the transport mechanism,
12972 but other factors such as how interested we are in the subject matter,
12973 or how easy it is to retrieve the message if we need to read it again.
12974
12975 Gnus provides many options for sorting mail into ``groups'' which behave
12976 like newsgroups, and for treating each group (whether mail or news)
12977 differently.
12978
12979 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12980 that Gnus should grow up and be a male, er, mail reader.  It is possible
12981 to whip Gnus into a more mailreaderly being, but, as said before, it's
12982 not easy.  People who prefer proper mail readers should try @sc{vm}
12983 instead, which is an excellent, and proper, mail reader.
12984
12985 I don't mean to scare anybody off, but I want to make it clear that you
12986 may be required to learn a new way of thinking about messages.  After
12987 you've been subjected to The Gnus Way, you will come to love it.  I can
12988 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12989 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12990 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12991 You Do.)
12992
12993
12994 @node Getting Started Reading Mail
12995 @subsection Getting Started Reading Mail
12996
12997 It's quite easy to use Gnus to read your new mail.  You just plonk the
12998 mail back end of your choice into @code{gnus-secondary-select-methods},
12999 and things will happen automatically.
13000
13001 For instance, if you want to use @code{nnml} (which is a ``one file per
13002 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13003
13004 @lisp
13005 (setq gnus-secondary-select-methods '((nnml "")))
13006 @end lisp
13007
13008 Now, the next time you start Gnus, this back end will be queried for new
13009 articles, and it will move all the messages in your spool file to its
13010 directory, which is @file{~/Mail/} by default.  The new group that will
13011 be created (@samp{mail.misc}) will be subscribed, and you can read it
13012 like any other group.
13013
13014 You will probably want to split the mail into several groups, though:
13015
13016 @lisp
13017 (setq nnmail-split-methods
13018       '(("junk" "^From:.*Lars Ingebrigtsen")
13019         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13020         ("other" "")))
13021 @end lisp
13022
13023 This will result in three new @code{nnml} mail groups being created:
13024 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13025 mail that doesn't fit into the first two groups will be placed in the
13026 last group.
13027
13028 This should be sufficient for reading mail with Gnus.  You might want to
13029 give the other sections in this part of the manual a perusal, though.
13030 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13031
13032
13033 @node Splitting Mail
13034 @subsection Splitting Mail
13035 @cindex splitting mail
13036 @cindex mail splitting
13037 @cindex mail filtering (splitting)
13038
13039 @vindex nnmail-split-methods
13040 The @code{nnmail-split-methods} variable says how the incoming mail is
13041 to be split into groups.
13042
13043 @lisp
13044 (setq nnmail-split-methods
13045   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13046     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13047     ("mail.other" "")))
13048 @end lisp
13049
13050 This variable is a list of lists, where the first element of each of
13051 these lists is the name of the mail group (they do not have to be called
13052 something beginning with @samp{mail}, by the way), and the second
13053 element is a regular expression used on the header of each mail to
13054 determine if it belongs in this mail group.  The first string may
13055 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13056 insert sub-expressions from the matched text.  For instance:
13057
13058 @lisp
13059 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13060 @end lisp
13061
13062 The second element can also be a function.  In that case, it will be
13063 called narrowed to the headers with the first element of the rule as the
13064 argument.  It should return a non-@code{nil} value if it thinks that the
13065 mail belongs in that group.
13066
13067 The last of these groups should always be a general one, and the regular
13068 expression should @emph{always} be @samp{*} so that it matches any mails
13069 that haven't been matched by any of the other regexps.  (These rules are
13070 processed from the beginning of the alist toward the end.  The first
13071 rule to make a match will ``win'', unless you have crossposting enabled.
13072 In that case, all matching rules will ``win''.)
13073
13074 If you like to tinker with this yourself, you can set this variable to a
13075 function of your choice.  This function will be called without any
13076 arguments in a buffer narrowed to the headers of an incoming mail
13077 message.  The function should return a list of group names that it
13078 thinks should carry this mail message.
13079
13080 Note that the mail back ends are free to maul the poor, innocent,
13081 incoming headers all they want to.  They all add @code{Lines} headers;
13082 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13083 @code{From<SPACE>} line to something else.
13084
13085 @vindex nnmail-crosspost
13086 The mail back ends all support cross-posting.  If several regexps match,
13087 the mail will be ``cross-posted'' to all those groups.
13088 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13089 that no articles are crossposted to the general (@samp{*}) group.
13090
13091 @vindex nnmail-crosspost-link-function
13092 @cindex crosspost
13093 @cindex links
13094 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13095 the crossposted articles.  However, not all file systems support hard
13096 links.  If that's the case for you, set
13097 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13098 variable is @code{add-name-to-file} by default.)
13099
13100 @kindex M-x nnmail-split-history
13101 @findex nnmail-split-history
13102 If you wish to see where the previous mail split put the messages, you
13103 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13104 where re-spooling messages would put the messages, you can use
13105 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13106 Group Commands}).
13107
13108 @vindex nnmail-split-header-length-limit
13109 Header lines longer than the value of
13110 @code{nnmail-split-header-length-limit} are excluded from the split
13111 function.
13112
13113 @vindex nnmail-mail-splitting-charset
13114 @vindex nnmail-mail-splitting-decodes
13115 By default the splitting codes @acronym{MIME} decodes headers so you
13116 can match on non-@acronym{ASCII} strings.  The
13117 @code{nnmail-mail-splitting-charset} variable specifies the default
13118 charset for decoding.  The behaviour can be turned off completely by
13119 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13120 useful if you want to match articles based on the raw header data.
13121
13122 @vindex nnmail-resplit-incoming
13123 By default, splitting is performed on all incoming messages.  If you
13124 specify a @code{directory} entry for the variable @code{mail-sources}
13125 (@pxref{Mail Source Specifiers}), however, then splitting does
13126 @emph{not} happen by default.  You can set the variable
13127 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13128 splitting happen even in this case.  (This variable has no effect on
13129 other kinds of entries.)
13130
13131 Gnus gives you all the opportunity you could possibly want for shooting
13132 yourself in the foot.  Let's say you create a group that will contain
13133 all the mail you get from your boss.  And then you accidentally
13134 unsubscribe from the group.  Gnus will still put all the mail from your
13135 boss in the unsubscribed group, and so, when your boss mails you ``Have
13136 that report ready by Monday or you're fired!'', you'll never see it and,
13137 come Tuesday, you'll still believe that you're gainfully employed while
13138 you really should be out collecting empty bottles to save up for next
13139 month's rent money.
13140
13141
13142 @node Mail Sources
13143 @subsection Mail Sources
13144
13145 Mail can be gotten from many different sources---the mail spool, from
13146 a @acronym{POP} mail server, from a procmail directory, or from a
13147 maildir, for instance.
13148
13149 @menu
13150 * Mail Source Specifiers::      How to specify what a mail source is.
13151 * Mail Source Customization::   Some variables that influence things.
13152 * Fetching Mail::               Using the mail source specifiers.
13153 @end menu
13154
13155
13156 @node Mail Source Specifiers
13157 @subsubsection Mail Source Specifiers
13158 @cindex POP
13159 @cindex mail server
13160 @cindex procmail
13161 @cindex mail spool
13162 @cindex mail source
13163
13164 You tell Gnus how to fetch mail by setting @code{mail-sources}
13165 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13166
13167 Here's an example:
13168
13169 @lisp
13170 (pop :server "pop3.mailserver.com" :user "myname")
13171 @end lisp
13172
13173 As can be observed, a mail source specifier is a list where the first
13174 element is a @dfn{mail source type}, followed by an arbitrary number of
13175 @dfn{keywords}.  Keywords that are not explicitly specified are given
13176 default values.
13177
13178 The following mail source types are available:
13179
13180 @table @code
13181 @item file
13182 Get mail from a single file; typically from the mail spool.
13183
13184 Keywords:
13185
13186 @table @code
13187 @item :path
13188 The file name.  Defaults to the value of the @env{MAIL}
13189 environment variable or the value of @code{rmail-spool-directory}
13190 (usually something like @file{/usr/mail/spool/user-name}).
13191
13192 @item :prescript
13193 @itemx :postscript
13194 Script run before/after fetching mail.
13195 @end table
13196
13197 An example file mail source:
13198
13199 @lisp
13200 (file :path "/usr/spool/mail/user-name")
13201 @end lisp
13202
13203 Or using the default file name:
13204
13205 @lisp
13206 (file)
13207 @end lisp
13208
13209 If the mail spool file is not located on the local machine, it's best
13210 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13211 You can not use ange-ftp file names here---it has no way to lock the
13212 mail spool while moving the mail.
13213
13214 If it's impossible to set up a proper server, you can use ssh instead.
13215
13216 @lisp
13217 (setq mail-sources
13218       '((file :prescript "ssh host bin/getmail >%t")))
13219 @end lisp
13220
13221 The @samp{getmail} script would look something like the following:
13222
13223 @example
13224 #!/bin/sh
13225 #  getmail - move mail from spool to stdout
13226 #  flu@@iki.fi
13227
13228 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13229 TMP=$HOME/Mail/tmp
13230 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13231 @end example
13232
13233 Alter this script to fit find the @samp{movemail} you want to use.
13234
13235
13236 @item directory
13237 @vindex nnmail-scan-directory-mail-source-once
13238 Get mail from several files in a directory.  This is typically used
13239 when you have procmail split the incoming mail into several files.
13240 That is, there is a one-to-one correspondence between files in that
13241 directory and groups, so that mail from the file @file{foo.bar.spool}
13242 will be put in the group @code{foo.bar}.  (You can change the suffix
13243 to be used instead of @code{.spool}.)  Setting
13244 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13245 Gnus to scan the mail source only once.  This is particularly useful
13246 if you want to scan mail groups at a specified level.
13247
13248 @vindex nnmail-resplit-incoming
13249 There is also the variable @code{nnmail-resplit-incoming}, if you set
13250 that to a non-@code{nil} value, then the normal splitting process is
13251 applied to all the files from the directory, @ref{Splitting Mail}.
13252
13253 Keywords:
13254
13255 @table @code
13256 @item :path
13257 The name of the directory where the files are.  There is no default
13258 value.
13259
13260 @item :suffix
13261 Only files ending with this suffix are used.  The default is
13262 @samp{.spool}.
13263
13264 @item :predicate
13265 Only files that have this predicate return non-@code{nil} are returned.
13266 The default is @code{identity}.  This is used as an additional
13267 filter---only files that have the right suffix @emph{and} satisfy this
13268 predicate are considered.
13269
13270 @item :prescript
13271 @itemx :postscript
13272 Script run before/after fetching mail.
13273
13274 @end table
13275
13276 An example directory mail source:
13277
13278 @lisp
13279 (directory :path "/home/user-name/procmail-dir/"
13280            :suffix ".prcml")
13281 @end lisp
13282
13283 @item pop
13284 Get mail from a @acronym{POP} server.
13285
13286 Keywords:
13287
13288 @table @code
13289 @item :server
13290 The name of the @acronym{POP} server.  The default is taken from the
13291 @env{MAILHOST} environment variable.
13292
13293 @item :port
13294 The port number of the @acronym{POP} server.  This can be a number (eg,
13295 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13296 string, it should be a service name as listed in @file{/etc/services} on
13297 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13298 need to specify it as @samp{"pop-3"} instead.
13299
13300 @item :user
13301 The user name to give to the @acronym{POP} server.  The default is the login
13302 name.
13303
13304 @item :password
13305 The password to give to the @acronym{POP} server.  If not specified,
13306 the user is prompted.
13307
13308 @item :program
13309 The program to use to fetch mail from the @acronym{POP} server.  This
13310 should be a @code{format}-like string.  Here's an example:
13311
13312 @example
13313 fetchmail %u@@%s -P %p %t
13314 @end example
13315
13316 The valid format specifier characters are:
13317
13318 @table @samp
13319 @item t
13320 The name of the file the mail is to be moved to.  This must always be
13321 included in this string.
13322
13323 @item s
13324 The name of the server.
13325
13326 @item P
13327 The port number of the server.
13328
13329 @item u
13330 The user name to use.
13331
13332 @item p
13333 The password to use.
13334 @end table
13335
13336 The values used for these specs are taken from the values you give the
13337 corresponding keywords.
13338
13339 @item :prescript
13340 A script to be run before fetching the mail.  The syntax is the same as
13341 the @code{:program} keyword.  This can also be a function to be run.
13342
13343 @item :postscript
13344 A script to be run after fetching the mail.  The syntax is the same as
13345 the @code{:program} keyword.  This can also be a function to be run.
13346
13347 @item :function
13348 The function to use to fetch mail from the @acronym{POP} server.  The
13349 function is called with one parameter---the name of the file where the
13350 mail should be moved to.
13351
13352 @item :authentication
13353 This can be either the symbol @code{password} or the symbol @code{apop}
13354 and says what authentication scheme to use.  The default is
13355 @code{password}.
13356
13357 @item :connection
13358 What stream to use for connecting to the server, this can be the symbol
13359 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
13360 and use insecure connections.  Note that for SSL/TLS, you need external
13361 programs and libraries:
13362
13363 @itemize @bullet
13364 @item
13365 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
13366 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
13367 library @samp{ssl.el}.
13368 @item
13369 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
13370 Requires the external library @samp{starttls.el} and program
13371 @samp{starttls}.
13372 @end itemize
13373
13374 @item :leave
13375 Non-@code{nil} if mail is to be left on the server and UIDL used for
13376 message retrieval.  The default is @code{nil}.
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 has loved and used for years, and now
16077 the rest of the world is catching up.  Yeah, dream on, not many
16078 @acronym{IMAP} server has server side splitting and those that have splitting
16079 seem to use some non-standard protocol.  This means that @acronym{IMAP}
16080 support for Gnus has to do its own splitting.
16081
16082 And it does.
16083
16084 Here are the variables of interest:
16085
16086 @table @code
16087
16088 @item nnimap-split-crosspost
16089 @cindex splitting, crosspost
16090 @cindex crosspost
16091 @vindex nnimap-split-crosspost
16092
16093 If non-@code{nil}, do crossposting if several split methods match the
16094 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16095 found will be used.
16096
16097 Nnmail equivalent: @code{nnmail-crosspost}.
16098
16099 @item nnimap-split-inbox
16100 @cindex splitting, inbox
16101 @cindex inbox
16102 @vindex nnimap-split-inbox
16103
16104 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16105 mailboxes to split from.  Defaults to @code{nil}, which means that
16106 splitting is disabled!
16107
16108 @lisp
16109 (setq nnimap-split-inbox
16110       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16111 @end lisp
16112
16113 No nnmail equivalent.
16114
16115 @item nnimap-split-rule
16116 @cindex splitting, rules
16117 @vindex nnimap-split-rule
16118
16119 New mail found in @code{nnimap-split-inbox} will be split according to
16120 this variable.
16121
16122 This variable contains a list of lists, where the first element in the
16123 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16124 matching the regexp in the second element in the sublist.  Got that?
16125 Neither did I, we need examples.
16126
16127 @lisp
16128 (setq nnimap-split-rule
16129       '(("INBOX.nnimap"
16130          "^Sender: owner-nnimap@@vic20.globalcom.se")
16131         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16132         ("INBOX.private" "")))
16133 @end lisp
16134
16135 This will put all articles from the nnimap mailing list into mailbox
16136 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16137 into INBOX.junk and everything else in INBOX.private.
16138
16139 The first string may contain @samp{\\1} forms, like the ones used by
16140 replace-match to insert sub-expressions from the matched text.  For
16141 instance:
16142
16143 @lisp
16144 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16145 @end lisp
16146
16147 The first element can also be the symbol @code{junk} to indicate that
16148 matching messages should simply be deleted.  Use with care.
16149
16150 The second element can also be a function.  In that case, it will be
16151 called with the first element of the rule as the argument, in a buffer
16152 containing the headers of the article.  It should return a
16153 non-@code{nil} value if it thinks that the mail belongs in that group.
16154
16155 Nnmail users might recollect that the last regexp had to be empty to
16156 match all articles (like in the example above).  This is not required in
16157 nnimap.  Articles not matching any of the regexps will not be moved out
16158 of your inbox.  (This might affect performance if you keep lots of
16159 unread articles in your inbox, since the splitting code would go over
16160 them every time you fetch new mail.)
16161
16162 These rules are processed from the beginning of the alist toward the
16163 end.  The first rule to make a match will ``win'', unless you have
16164 crossposting enabled.  In that case, all matching rules will ``win''.
16165
16166 This variable can also have a function as its value, the function will
16167 be called with the headers narrowed and should return a group where it
16168 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16169
16170 The splitting code tries to create mailboxes if it needs to.
16171
16172 To allow for different split rules on different virtual servers, and
16173 even different split rules in different inboxes on the same server,
16174 the syntax of this variable have been extended along the lines of:
16175
16176 @lisp
16177 (setq nnimap-split-rule
16178       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16179                                ("junk"    "From:.*Simon"))))
16180         ("my2server"    ("INBOX" nnimap-split-fancy))
16181         ("my[34]server" (".*" (("private" "To:.*Simon")
16182                                ("junk"    my-junk-func))))))
16183 @end lisp
16184
16185 The virtual server name is in fact a regexp, so that the same rules
16186 may apply to several servers.  In the example, the servers
16187 @code{my3server} and @code{my4server} both use the same rules.
16188 Similarly, the inbox string is also a regexp.  The actual splitting
16189 rules are as before, either a function, or a list with group/regexp or
16190 group/function elements.
16191
16192 Nnmail equivalent: @code{nnmail-split-methods}.
16193
16194 @item nnimap-split-predicate
16195 @cindex splitting
16196 @vindex nnimap-split-predicate
16197
16198 Mail matching this predicate in @code{nnimap-split-inbox} will be
16199 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16200
16201 This might be useful if you use another @acronym{IMAP} client to read mail in
16202 your inbox but would like Gnus to split all articles in the inbox
16203 regardless of readedness.  Then you might change this to
16204 @samp{UNDELETED}.
16205
16206 @item nnimap-split-fancy
16207 @cindex splitting, fancy
16208 @findex nnimap-split-fancy
16209 @vindex nnimap-split-fancy
16210
16211 It's possible to set @code{nnimap-split-rule} to
16212 @code{nnmail-split-fancy} if you want to use fancy
16213 splitting.  @xref{Fancy Mail Splitting}.
16214
16215 However, to be able to have different fancy split rules for nnmail and
16216 nnimap back ends you can set @code{nnimap-split-rule} to
16217 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16218 rule in @code{nnimap-split-fancy}.
16219
16220 Example:
16221
16222 @lisp
16223 (setq nnimap-split-rule 'nnimap-split-fancy
16224       nnimap-split-fancy ...)
16225 @end lisp
16226
16227 Nnmail equivalent: @code{nnmail-split-fancy}.
16228
16229 @item nnimap-split-download-body
16230 @findex nnimap-split-download-body
16231 @vindex nnimap-split-download-body
16232
16233 Set to non-@code{nil} to download entire articles during splitting.
16234 This is generally not required, and will slow things down
16235 considerably.  You may need it if you want to use an advanced
16236 splitting function that analyses the body to split the article.
16237
16238 @end table
16239
16240 @node Expiring in IMAP
16241 @subsection Expiring in IMAP
16242 @cindex expiring imap mail
16243
16244 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16245 end, it supports most features in regular expiring (@pxref{Expiring
16246 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16247 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16248 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16249 follows below are the variables used by the @code{nnimap} expiry
16250 process.
16251
16252 A note on how the expire mark is stored on the @acronym{IMAP} server is
16253 appropriate here as well.  The expire mark is translated into a
16254 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16255 message.  This means that likely only Gnus will understand and treat
16256 the @code{gnus-expire} mark properly, although other clients may allow
16257 you to view client specific flags on the message.  It also means that
16258 your server must support permanent storage of client specific flags on
16259 messages.  Most do, fortunately.
16260
16261 @table @code
16262
16263 @item nnmail-expiry-wait
16264 @item nnmail-expiry-wait-function
16265
16266 These variables are fully supported.  The expire value can be a
16267 number, the symbol @code{immediate} or @code{never}.
16268
16269 @item nnmail-expiry-target
16270
16271 This variable is supported, and internally implemented by calling the
16272 @code{nnmail} functions that handle this.  It contains an optimization
16273 that if the destination is a @acronym{IMAP} group on the same server, the
16274 article is copied instead of appended (that is, uploaded again).
16275
16276 @end table
16277
16278 @node Editing IMAP ACLs
16279 @subsection Editing IMAP ACLs
16280 @cindex editing imap acls
16281 @cindex Access Control Lists
16282 @cindex Editing @acronym{IMAP} ACLs
16283 @kindex G l
16284 @findex gnus-group-nnimap-edit-acl
16285
16286 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16287 limiting (or enabling) other users access to your mail boxes.  Not all
16288 @acronym{IMAP} servers support this, this function will give an error if it
16289 doesn't.
16290
16291 To edit an ACL for a mailbox, type @kbd{G l}
16292 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16293 editing window with detailed instructions.
16294
16295 Some possible uses:
16296
16297 @itemize @bullet
16298 @item
16299 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16300 on your mailing list mailboxes enables other users on the same server to
16301 follow the list without subscribing to it.
16302 @item
16303 At least with the Cyrus server, you are required to give the user
16304 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16305 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16306 INBOX.mailbox).
16307 @end itemize
16308
16309 @node Expunging mailboxes
16310 @subsection Expunging mailboxes
16311 @cindex expunging
16312
16313 @cindex expunge
16314 @cindex manual expunging
16315 @kindex G x
16316 @findex gnus-group-nnimap-expunge
16317
16318 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16319 you may want the option of expunging all deleted articles in a mailbox
16320 manually.  This is exactly what @kbd{G x} does.
16321
16322 Currently there is no way of showing deleted articles, you can just
16323 delete them.
16324
16325 @node A note on namespaces
16326 @subsection A note on namespaces
16327 @cindex IMAP namespace
16328 @cindex namespaces
16329
16330 The @acronym{IMAP} protocol has a concept called namespaces, described
16331 by the following text in the RFC:
16332
16333 @display
16334 5.1.2.  Mailbox Namespace Naming Convention
16335
16336    By convention, the first hierarchical element of any mailbox name
16337    which begins with "#" identifies the "namespace" of the remainder of
16338    the name.  This makes it possible to disambiguate between different
16339    types of mailbox stores, each of which have their own namespaces.
16340
16341       For example, implementations which offer access to USENET
16342       newsgroups MAY use the "#news" namespace to partition the USENET
16343       newsgroup namespace from that of other mailboxes.  Thus, the
16344       comp.mail.misc newsgroup would have an mailbox name of
16345       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16346       to a different object (e.g. a user's private mailbox).
16347 @end display
16348
16349 While there is nothing in this text that warrants concern for the
16350 @acronym{IMAP} implementation in Gnus, some servers use namespace
16351 prefixes in a way that does not work with how Gnus uses mailbox names.
16352
16353 Specifically, University of Washington's @acronym{IMAP} server uses
16354 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16355 in the @sc{create} and @sc{append} commands.  After the mailbox is
16356 created (or a messages is appended to a mailbox), it must be accessed
16357 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16358 not make it possible for the user to guarantee that user entered
16359 mailbox names will only be used with the CREATE and APPEND commands,
16360 you should simply not use the namespace prefixed mailbox names in
16361 Gnus.
16362
16363 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16364 for more information on how to use the prefixes.  They are a power
16365 tool and should be used only if you are sure what the effects are.
16366
16367 @node Other Sources
16368 @section Other Sources
16369
16370 Gnus can do more than just read news or mail.  The methods described
16371 below allow Gnus to view directories and files as if they were
16372 newsgroups.
16373
16374 @menu
16375 * Directory Groups::            You can read a directory as if it was a newsgroup.
16376 * Anything Groups::             Dired?  Who needs dired?
16377 * Document Groups::             Single files can be the basis of a group.
16378 * SOUP::                        Reading @sc{soup} packets ``offline''.
16379 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16380 @end menu
16381
16382
16383 @node Directory Groups
16384 @subsection Directory Groups
16385 @cindex nndir
16386 @cindex directory groups
16387
16388 If you have a directory that has lots of articles in separate files in
16389 it, you might treat it as a newsgroup.  The files have to have numerical
16390 names, of course.
16391
16392 This might be an opportune moment to mention @code{ange-ftp} (and its
16393 successor @code{efs}), that most wonderful of all wonderful Emacs
16394 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16395 back end to read directories.  Big deal.
16396
16397 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16398 enter the @code{ange-ftp} file name
16399 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16400 @code{ange-ftp} or @code{efs} will actually allow you to read this
16401 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16402
16403 @code{nndir} will use @acronym{NOV} files if they are present.
16404
16405 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16406 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16407 whatever you use @code{nndir} for, so you could switch to any of those
16408 methods if you feel the need to have a non-read-only @code{nndir}.
16409
16410
16411 @node Anything Groups
16412 @subsection Anything Groups
16413 @cindex nneething
16414
16415 From the @code{nndir} back end (which reads a single spool-like
16416 directory), it's just a hop and a skip to @code{nneething}, which
16417 pretends that any arbitrary directory is a newsgroup.  Strange, but
16418 true.
16419
16420 When @code{nneething} is presented with a directory, it will scan this
16421 directory and assign article numbers to each file.  When you enter such
16422 a group, @code{nneething} must create ``headers'' that Gnus can use.
16423 After all, Gnus is a newsreader, in case you're forgetting.
16424 @code{nneething} does this in a two-step process.  First, it snoops each
16425 file in question.  If the file looks like an article (i.e., the first
16426 few lines look like headers), it will use this as the head.  If this is
16427 just some arbitrary file without a head (e.g. a C source file),
16428 @code{nneething} will cobble up a header out of thin air.  It will use
16429 file ownership, name and date and do whatever it can with these
16430 elements.
16431
16432 All this should happen automatically for you, and you will be presented
16433 with something that looks very much like a newsgroup.  Totally like a
16434 newsgroup, to be precise.  If you select an article, it will be displayed
16435 in the article buffer, just as usual.
16436
16437 If you select a line that represents a directory, Gnus will pop you into
16438 a new summary buffer for this @code{nneething} group.  And so on.  You can
16439 traverse the entire disk this way, if you feel like, but remember that
16440 Gnus is not dired, really, and does not intend to be, either.
16441
16442 There are two overall modes to this action---ephemeral or solid.  When
16443 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16444 will not store information on what files you have read, and what files
16445 are new, and so on.  If you create a solid @code{nneething} group the
16446 normal way with @kbd{G m}, Gnus will store a mapping table between
16447 article numbers and file names, and you can treat this group like any
16448 other groups.  When you activate a solid @code{nneething} group, you will
16449 be told how many unread articles it contains, etc., etc.
16450
16451 Some variables:
16452
16453 @table @code
16454 @item nneething-map-file-directory
16455 @vindex nneething-map-file-directory
16456 All the mapping files for solid @code{nneething} groups will be stored
16457 in this directory, which defaults to @file{~/.nneething/}.
16458
16459 @item nneething-exclude-files
16460 @vindex nneething-exclude-files
16461 All files that match this regexp will be ignored.  Nice to use to exclude
16462 auto-save files and the like, which is what it does by default.
16463
16464 @item nneething-include-files
16465 @vindex nneething-include-files
16466 Regexp saying what files to include in the group.  If this variable is
16467 non-@code{nil}, only files matching this regexp will be included.
16468
16469 @item nneething-map-file
16470 @vindex nneething-map-file
16471 Name of the map files.
16472 @end table
16473
16474
16475 @node Document Groups
16476 @subsection Document Groups
16477 @cindex nndoc
16478 @cindex documentation group
16479 @cindex help group
16480
16481 @code{nndoc} is a cute little thing that will let you read a single file
16482 as a newsgroup.  Several files types are supported:
16483
16484 @table @code
16485 @cindex Babyl
16486 @cindex Rmail mbox
16487
16488 @item babyl
16489 The Babyl (Rmail) mail box.
16490 @cindex mbox
16491 @cindex Unix mbox
16492
16493 @item mbox
16494 The standard Unix mbox file.
16495
16496 @cindex MMDF mail box
16497 @item mmdf
16498 The MMDF mail box format.
16499
16500 @item news
16501 Several news articles appended into a file.
16502
16503 @item rnews
16504 @cindex rnews batch files
16505 The rnews batch transport format.
16506 @cindex forwarded messages
16507
16508 @item forward
16509 Forwarded articles.
16510
16511 @item nsmail
16512 Netscape mail boxes.
16513
16514 @item mime-parts
16515 @acronym{MIME} multipart messages.
16516
16517 @item standard-digest
16518 The standard (RFC 1153) digest format.
16519
16520 @item mime-digest
16521 A @acronym{MIME} digest of messages.
16522
16523 @item lanl-gov-announce
16524 Announcement messages from LANL Gov Announce.
16525
16526 @item rfc822-forward
16527 A message forwarded according to RFC822.
16528
16529 @item outlook
16530 The Outlook mail box.
16531
16532 @item oe-dbx
16533 The Outlook Express dbx mail box.
16534
16535 @item exim-bounce
16536 A bounce message from the Exim MTA.
16537
16538 @item forward
16539 A message forwarded according to informal rules.
16540
16541 @item rfc934
16542 An RFC934-forwarded message.
16543
16544 @item mailman
16545 A mailman digest.
16546
16547 @item clari-briefs
16548 A digest of Clarinet brief news items.
16549
16550 @item slack-digest
16551 Non-standard digest format---matches most things, but does it badly.
16552
16553 @item mail-in-mail
16554 The last resort.
16555 @end table
16556
16557 You can also use the special ``file type'' @code{guess}, which means
16558 that @code{nndoc} will try to guess what file type it is looking at.
16559 @code{digest} means that @code{nndoc} should guess what digest type the
16560 file is.
16561
16562 @code{nndoc} will not try to change the file or insert any extra headers into
16563 it---it will simply, like, let you use the file as the basis for a
16564 group.  And that's it.
16565
16566 If you have some old archived articles that you want to insert into your
16567 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16568 that.  Say you have an old @file{RMAIL} file with mail that you now want
16569 to split into your new @code{nnml} groups.  You look at that file using
16570 @code{nndoc} (using the @kbd{G f} command in the group buffer
16571 (@pxref{Foreign Groups})), set the process mark on all the articles in
16572 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16573 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16574 file is now also stored in lots of @code{nnml} directories, and you can
16575 delete that pesky @file{RMAIL} file.  If you have the guts!
16576
16577 Virtual server variables:
16578
16579 @table @code
16580 @item nndoc-article-type
16581 @vindex nndoc-article-type
16582 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16583 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16584 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16585 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16586 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16587
16588 @item nndoc-post-type
16589 @vindex nndoc-post-type
16590 This variable says whether Gnus is to consider the group a news group or
16591 a mail group.  There are two valid values:  @code{mail} (the default)
16592 and @code{news}.
16593 @end table
16594
16595 @menu
16596 * Document Server Internals::   How to add your own document types.
16597 @end menu
16598
16599
16600 @node Document Server Internals
16601 @subsubsection Document Server Internals
16602
16603 Adding new document types to be recognized by @code{nndoc} isn't
16604 difficult.  You just have to whip up a definition of what the document
16605 looks like, write a predicate function to recognize that document type,
16606 and then hook into @code{nndoc}.
16607
16608 First, here's an example document type definition:
16609
16610 @example
16611 (mmdf
16612  (article-begin .  "^\^A\^A\^A\^A\n")
16613  (body-end .  "^\^A\^A\^A\^A\n"))
16614 @end example
16615
16616 The definition is simply a unique @dfn{name} followed by a series of
16617 regexp pseudo-variable settings.  Below are the possible
16618 variables---don't be daunted by the number of variables; most document
16619 types can be defined with very few settings:
16620
16621 @table @code
16622 @item first-article
16623 If present, @code{nndoc} will skip past all text until it finds
16624 something that match this regexp.  All text before this will be
16625 totally ignored.
16626
16627 @item article-begin
16628 This setting has to be present in all document type definitions.  It
16629 says what the beginning of each article looks like.
16630
16631 @item head-begin-function
16632 If present, this should be a function that moves point to the head of
16633 the article.
16634
16635 @item nndoc-head-begin
16636 If present, this should be a regexp that matches the head of the
16637 article.
16638
16639 @item nndoc-head-end
16640 This should match the end of the head of the article.  It defaults to
16641 @samp{^$}---the empty line.
16642
16643 @item body-begin-function
16644 If present, this function should move point to the beginning of the body
16645 of the article.
16646
16647 @item body-begin
16648 This should match the beginning of the body of the article.  It defaults
16649 to @samp{^\n}.
16650
16651 @item body-end-function
16652 If present, this function should move point to the end of the body of
16653 the article.
16654
16655 @item body-end
16656 If present, this should match the end of the body of the article.
16657
16658 @item file-end
16659 If present, this should match the end of the file.  All text after this
16660 regexp will be totally ignored.
16661
16662 @end table
16663
16664 So, using these variables @code{nndoc} is able to dissect a document
16665 file into a series of articles, each with a head and a body.  However, a
16666 few more variables are needed since not all document types are all that
16667 news-like---variables needed to transform the head or the body into
16668 something that's palatable for Gnus:
16669
16670 @table @code
16671 @item prepare-body-function
16672 If present, this function will be called when requesting an article.  It
16673 will be called with point at the start of the body, and is useful if the
16674 document has encoded some parts of its contents.
16675
16676 @item article-transform-function
16677 If present, this function is called when requesting an article.  It's
16678 meant to be used for more wide-ranging transformation of both head and
16679 body of the article.
16680
16681 @item generate-head-function
16682 If present, this function is called to generate a head that Gnus can
16683 understand.  It is called with the article number as a parameter, and is
16684 expected to generate a nice head for the article in question.  It is
16685 called when requesting the headers of all articles.
16686
16687 @end table
16688
16689 Let's look at the most complicated example I can come up with---standard
16690 digests:
16691
16692 @example
16693 (standard-digest
16694  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16695  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16696  (prepare-body-function . nndoc-unquote-dashes)
16697  (body-end-function . nndoc-digest-body-end)
16698  (head-end . "^ ?$")
16699  (body-begin . "^ ?\n")
16700  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16701  (subtype digest guess))
16702 @end example
16703
16704 We see that all text before a 70-width line of dashes is ignored; all
16705 text after a line that starts with that @samp{^End of} is also ignored;
16706 each article begins with a 30-width line of dashes; the line separating
16707 the head from the body may contain a single space; and that the body is
16708 run through @code{nndoc-unquote-dashes} before being delivered.
16709
16710 To hook your own document definition into @code{nndoc}, use the
16711 @code{nndoc-add-type} function.  It takes two parameters---the first
16712 is the definition itself and the second (optional) parameter says
16713 where in the document type definition alist to put this definition.
16714 The alist is traversed sequentially, and
16715 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16716 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16717 @code{mmdf} type, and so on.  These type predicates should return
16718 @code{nil} if the document is not of the correct type; @code{t} if it
16719 is of the correct type; and a number if the document might be of the
16720 correct type.  A high number means high probability; a low number
16721 means low probability with @samp{0} being the lowest valid number.
16722
16723
16724 @node SOUP
16725 @subsection SOUP
16726 @cindex SOUP
16727 @cindex offline
16728
16729 In the PC world people often talk about ``offline'' newsreaders.  These
16730 are thingies that are combined reader/news transport monstrosities.
16731 With built-in modem programs.  Yecchh!
16732
16733 Of course, us Unix Weenie types of human beans use things like
16734 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16735 transport things like Ghod intended.  And then we just use normal
16736 newsreaders.
16737
16738 However, it can sometimes be convenient to do something that's a bit
16739 easier on the brain if you have a very slow modem, and you're not really
16740 that interested in doing things properly.
16741
16742 A file format called @sc{soup} has been developed for transporting news
16743 and mail from servers to home machines and back again.  It can be a bit
16744 fiddly.
16745
16746 First some terminology:
16747
16748 @table @dfn
16749
16750 @item server
16751 This is the machine that is connected to the outside world and where you
16752 get news and/or mail from.
16753
16754 @item home machine
16755 This is the machine that you want to do the actual reading and responding
16756 on.  It is typically not connected to the rest of the world in any way.
16757
16758 @item packet
16759 Something that contains messages and/or commands.  There are two kinds
16760 of packets:
16761
16762 @table @dfn
16763 @item message packets
16764 These are packets made at the server, and typically contain lots of
16765 messages for you to read.  These are called @file{SoupoutX.tgz} by
16766 default, where @var{x} is a number.
16767
16768 @item response packets
16769 These are packets made at the home machine, and typically contains
16770 replies that you've written.  These are called @file{SoupinX.tgz} by
16771 default, where @var{x} is a number.
16772
16773 @end table
16774
16775 @end table
16776
16777
16778 @enumerate
16779
16780 @item
16781 You log in on the server and create a @sc{soup} packet.  You can either
16782 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16783 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16784 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16785
16786 @item
16787 You transfer the packet home.  Rail, boat, car or modem will do fine.
16788
16789 @item
16790 You put the packet in your home directory.
16791
16792 @item
16793 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16794 the native or secondary server.
16795
16796 @item
16797 You read articles and mail and answer and followup to the things you
16798 want (@pxref{SOUP Replies}).
16799
16800 @item
16801 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16802 packet.
16803
16804 @item
16805 You transfer this packet to the server.
16806
16807 @item
16808 You use Gnus to mail this packet out with the @kbd{G s s} command.
16809
16810 @item
16811 You then repeat until you die.
16812
16813 @end enumerate
16814
16815 So you basically have a bipartite system---you use @code{nnsoup} for
16816 reading and Gnus for packing/sending these @sc{soup} packets.
16817
16818 @menu
16819 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16820 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16821 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16822 @end menu
16823
16824
16825 @node SOUP Commands
16826 @subsubsection SOUP Commands
16827
16828 These are commands for creating and manipulating @sc{soup} packets.
16829
16830 @table @kbd
16831 @item G s b
16832 @kindex G s b (Group)
16833 @findex gnus-group-brew-soup
16834 Pack all unread articles in the current group
16835 (@code{gnus-group-brew-soup}).  This command understands the
16836 process/prefix convention.
16837
16838 @item G s w
16839 @kindex G s w (Group)
16840 @findex gnus-soup-save-areas
16841 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16842
16843 @item G s s
16844 @kindex G s s (Group)
16845 @findex gnus-soup-send-replies
16846 Send all replies from the replies packet
16847 (@code{gnus-soup-send-replies}).
16848
16849 @item G s p
16850 @kindex G s p (Group)
16851 @findex gnus-soup-pack-packet
16852 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16853
16854 @item G s r
16855 @kindex G s r (Group)
16856 @findex nnsoup-pack-replies
16857 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16858
16859 @item O s
16860 @kindex O s (Summary)
16861 @findex gnus-soup-add-article
16862 This summary-mode command adds the current article to a @sc{soup} packet
16863 (@code{gnus-soup-add-article}).  It understands the process/prefix
16864 convention (@pxref{Process/Prefix}).
16865
16866 @end table
16867
16868
16869 There are a few variables to customize where Gnus will put all these
16870 thingies:
16871
16872 @table @code
16873
16874 @item gnus-soup-directory
16875 @vindex gnus-soup-directory
16876 Directory where Gnus will save intermediate files while composing
16877 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16878
16879 @item gnus-soup-replies-directory
16880 @vindex gnus-soup-replies-directory
16881 This is what Gnus will use as a temporary directory while sending our
16882 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16883
16884 @item gnus-soup-prefix-file
16885 @vindex gnus-soup-prefix-file
16886 Name of the file where Gnus stores the last used prefix.  The default is
16887 @samp{gnus-prefix}.
16888
16889 @item gnus-soup-packer
16890 @vindex gnus-soup-packer
16891 A format string command for packing a @sc{soup} packet.  The default is
16892 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16893
16894 @item gnus-soup-unpacker
16895 @vindex gnus-soup-unpacker
16896 Format string command for unpacking a @sc{soup} packet.  The default is
16897 @samp{gunzip -c %s | tar xvf -}.
16898
16899 @item gnus-soup-packet-directory
16900 @vindex gnus-soup-packet-directory
16901 Where Gnus will look for reply packets.  The default is @file{~/}.
16902
16903 @item gnus-soup-packet-regexp
16904 @vindex gnus-soup-packet-regexp
16905 Regular expression matching @sc{soup} reply packets in
16906 @code{gnus-soup-packet-directory}.
16907
16908 @end table
16909
16910
16911 @node SOUP Groups
16912 @subsubsection SOUP Groups
16913 @cindex nnsoup
16914
16915 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16916 read incoming packets, unpack them, and put them in a directory where
16917 you can read them at leisure.
16918
16919 These are the variables you can use to customize its behavior:
16920
16921 @table @code
16922
16923 @item nnsoup-tmp-directory
16924 @vindex nnsoup-tmp-directory
16925 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16926 directory.  (@file{/tmp/} by default.)
16927
16928 @item nnsoup-directory
16929 @vindex nnsoup-directory
16930 @code{nnsoup} then moves each message and index file to this directory.
16931 The default is @file{~/SOUP/}.
16932
16933 @item nnsoup-replies-directory
16934 @vindex nnsoup-replies-directory
16935 All replies will be stored in this directory before being packed into a
16936 reply packet.  The default is @file{~/SOUP/replies/}.
16937
16938 @item nnsoup-replies-format-type
16939 @vindex nnsoup-replies-format-type
16940 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16941 (rnews), and I don't think you should touch that variable.  I probably
16942 shouldn't even have documented it.  Drats!  Too late!
16943
16944 @item nnsoup-replies-index-type
16945 @vindex nnsoup-replies-index-type
16946 The index type of the replies packet.  The default is @samp{?n}, which
16947 means ``none''.  Don't fiddle with this one either!
16948
16949 @item nnsoup-active-file
16950 @vindex nnsoup-active-file
16951 Where @code{nnsoup} stores lots of information.  This is not an ``active
16952 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16953 this file or mess it up in any way, you're dead.  The default is
16954 @file{~/SOUP/active}.
16955
16956 @item nnsoup-packer
16957 @vindex nnsoup-packer
16958 Format string command for packing a reply @sc{soup} packet.  The default
16959 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16960
16961 @item nnsoup-unpacker
16962 @vindex nnsoup-unpacker
16963 Format string command for unpacking incoming @sc{soup} packets.  The
16964 default is @samp{gunzip -c %s | tar xvf -}.
16965
16966 @item nnsoup-packet-directory
16967 @vindex nnsoup-packet-directory
16968 Where @code{nnsoup} will look for incoming packets.  The default is
16969 @file{~/}.
16970
16971 @item nnsoup-packet-regexp
16972 @vindex nnsoup-packet-regexp
16973 Regular expression matching incoming @sc{soup} packets.  The default is
16974 @samp{Soupout}.
16975
16976 @item nnsoup-always-save
16977 @vindex nnsoup-always-save
16978 If non-@code{nil}, save the replies buffer after each posted message.
16979
16980 @end table
16981
16982
16983 @node SOUP Replies
16984 @subsubsection SOUP Replies
16985
16986 Just using @code{nnsoup} won't mean that your postings and mailings end
16987 up in @sc{soup} reply packets automagically.  You have to work a bit
16988 more for that to happen.
16989
16990 @findex nnsoup-set-variables
16991 The @code{nnsoup-set-variables} command will set the appropriate
16992 variables to ensure that all your followups and replies end up in the
16993 @sc{soup} system.
16994
16995 In specific, this is what it does:
16996
16997 @lisp
16998 (setq message-send-news-function 'nnsoup-request-post)
16999 (setq message-send-mail-function 'nnsoup-request-mail)
17000 @end lisp
17001
17002 And that's it, really.  If you only want news to go into the @sc{soup}
17003 system you just use the first line.  If you only want mail to be
17004 @sc{soup}ed you use the second.
17005
17006
17007 @node Mail-To-News Gateways
17008 @subsection Mail-To-News Gateways
17009 @cindex mail-to-news gateways
17010 @cindex gateways
17011
17012 If your local @code{nntp} server doesn't allow posting, for some reason
17013 or other, you can post using one of the numerous mail-to-news gateways.
17014 The @code{nngateway} back end provides the interface.
17015
17016 Note that you can't read anything from this back end---it can only be
17017 used to post with.
17018
17019 Server variables:
17020
17021 @table @code
17022 @item nngateway-address
17023 @vindex nngateway-address
17024 This is the address of the mail-to-news gateway.
17025
17026 @item nngateway-header-transformation
17027 @vindex nngateway-header-transformation
17028 News headers often have to be transformed in some odd way or other
17029 for the mail-to-news gateway to accept it.  This variable says what
17030 transformation should be called, and defaults to
17031 @code{nngateway-simple-header-transformation}.  The function is called
17032 narrowed to the headers to be transformed and with one parameter---the
17033 gateway address.
17034
17035 This default function just inserts a new @code{To} header based on the
17036 @code{Newsgroups} header and the gateway address.
17037 For instance, an article with this @code{Newsgroups} header:
17038
17039 @example
17040 Newsgroups: alt.religion.emacs
17041 @end example
17042
17043 will get this @code{To} header inserted:
17044
17045 @example
17046 To: alt-religion-emacs@@GATEWAY
17047 @end example
17048
17049 The following pre-defined functions exist:
17050
17051 @findex nngateway-simple-header-transformation
17052 @table @code
17053
17054 @item nngateway-simple-header-transformation
17055 Creates a @code{To} header that looks like
17056 @var{newsgroup}@@@code{nngateway-address}.
17057
17058 @findex nngateway-mail2news-header-transformation
17059
17060 @item nngateway-mail2news-header-transformation
17061 Creates a @code{To} header that looks like
17062 @code{nngateway-address}.
17063 @end table
17064
17065 @end table
17066
17067 Here's an example:
17068
17069 @lisp
17070 (setq gnus-post-method
17071       '(nngateway
17072         "mail2news@@replay.com"
17073         (nngateway-header-transformation
17074          nngateway-mail2news-header-transformation)))
17075 @end lisp
17076
17077 So, to use this, simply say something like:
17078
17079 @lisp
17080 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17081 @end lisp
17082
17083
17084
17085 @node Combined Groups
17086 @section Combined Groups
17087
17088 Gnus allows combining a mixture of all the other group types into bigger
17089 groups.
17090
17091 @menu
17092 * Virtual Groups::              Combining articles from many groups.
17093 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17094 @end menu
17095
17096
17097 @node Virtual Groups
17098 @subsection Virtual Groups
17099 @cindex nnvirtual
17100 @cindex virtual groups
17101 @cindex merging groups
17102
17103 An @dfn{nnvirtual group} is really nothing more than a collection of
17104 other groups.
17105
17106 For instance, if you are tired of reading many small groups, you can
17107 put them all in one big group, and then grow tired of reading one
17108 big, unwieldy group.  The joys of computing!
17109
17110 You specify @code{nnvirtual} as the method.  The address should be a
17111 regexp to match component groups.
17112
17113 All marks in the virtual group will stick to the articles in the
17114 component groups.  So if you tick an article in a virtual group, the
17115 article will also be ticked in the component group from whence it
17116 came.  (And vice versa---marks from the component groups will also be
17117 shown in the virtual group.).  To create an empty virtual group, run
17118 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17119 and edit the method regexp with @kbd{M-e}
17120 (@code{gnus-group-edit-group-method})
17121
17122 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17123 newsgroups into one, big, happy newsgroup:
17124
17125 @lisp
17126 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17127 @end lisp
17128
17129 The component groups can be native or foreign; everything should work
17130 smoothly, but if your computer explodes, it was probably my fault.
17131
17132 Collecting the same group from several servers might actually be a good
17133 idea if users have set the Distribution header to limit distribution.
17134 If you would like to read @samp{soc.motss} both from a server in Japan
17135 and a server in Norway, you could use the following as the group regexp:
17136
17137 @example
17138 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17139 @end example
17140
17141 (Remember, though, that if you're creating the group with @kbd{G m}, you
17142 shouldn't double the backslashes, and you should leave off the quote
17143 characters at the beginning and the end of the string.)
17144
17145 This should work kinda smoothly---all articles from both groups should
17146 end up in this one, and there should be no duplicates.  Threading (and
17147 the rest) will still work as usual, but there might be problems with the
17148 sequence of articles.  Sorting on date might be an option here
17149 (@pxref{Selecting a Group}).
17150
17151 One limitation, however---all groups included in a virtual
17152 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17153 zombie groups can't be component groups for @code{nnvirtual} groups.
17154
17155 @vindex nnvirtual-always-rescan
17156 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17157 @code{nnvirtual} will always scan groups for unread articles when
17158 entering a virtual group.  If this variable is @code{nil} (which is the
17159 default) and you read articles in a component group after the virtual
17160 group has been activated, the read articles from the component group
17161 will show up when you enter the virtual group.  You'll also see this
17162 effect if you have two virtual groups that have a component group in
17163 common.  If that's the case, you should set this variable to @code{t}.
17164 Or you can just tap @code{M-g} on the virtual group every time before
17165 you enter it---it'll have much the same effect.
17166
17167 @code{nnvirtual} can have both mail and news groups as component groups.
17168 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17169 has to ask the back end of the component group the article comes from
17170 whether it is a news or mail back end.  However, when you do a @kbd{^},
17171 there is typically no sure way for the component back end to know this,
17172 and in that case @code{nnvirtual} tells Gnus that the article came from a
17173 not-news back end.  (Just to be on the safe side.)
17174
17175 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17176 line from the article you respond to in these cases.
17177
17178 @code{nnvirtual} groups do not inherit anything but articles and marks
17179 from component groups---group parameters, for instance, are not
17180 inherited.
17181
17182
17183 @node Kibozed Groups
17184 @subsection Kibozed Groups
17185 @cindex nnkiboze
17186 @cindex kibozing
17187
17188 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17189 the news feed''.  @code{nnkiboze} is a back end that will do this for
17190 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17191 with useless requests!  Oh happiness!
17192
17193 @kindex G k (Group)
17194 To create a kibozed group, use the @kbd{G k} command in the group
17195 buffer.
17196
17197 The address field of the @code{nnkiboze} method is, as with
17198 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17199 @code{nnkiboze} group.  That's where most similarities between
17200 @code{nnkiboze} and @code{nnvirtual} end.
17201
17202 In addition to this regexp detailing component groups, an
17203 @code{nnkiboze} group must have a score file to say what articles are
17204 to be included in the group (@pxref{Scoring}).
17205
17206 @kindex M-x nnkiboze-generate-groups
17207 @findex nnkiboze-generate-groups
17208 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17209 @code{nnkiboze} groups you want to have.  This command will take time.
17210 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17211 headers from all the articles in all the component groups and run them
17212 through the scoring process to determine if there are any articles in
17213 the groups that are to be part of the @code{nnkiboze} groups.
17214
17215 Please limit the number of component groups by using restrictive
17216 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17217 @acronym{NNTP} site may throw you off and never let you back in again.
17218 Stranger things have happened.
17219
17220 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17221 and they can be foreign.  No restrictions.
17222
17223 @vindex nnkiboze-directory
17224 The generation of an @code{nnkiboze} group means writing two files in
17225 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17226 contains the @acronym{NOV} header lines for all the articles in the group,
17227 and the other is an additional @file{.newsrc} file to store information
17228 on what groups have been searched through to find component articles.
17229
17230 Articles marked as read in the @code{nnkiboze} group will have
17231 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17232
17233
17234 @node Gnus Unplugged
17235 @section Gnus Unplugged
17236 @cindex offline
17237 @cindex unplugged
17238 @cindex agent
17239 @cindex Gnus agent
17240 @cindex Gnus unplugged
17241
17242 In olden times (ca. February '88), people used to run their newsreaders
17243 on big machines with permanent connections to the net.  News transport
17244 was dealt with by news servers, and all the newsreaders had to do was to
17245 read news.  Believe it or not.
17246
17247 Nowadays most people read news and mail at home, and use some sort of
17248 modem to connect to the net.  To avoid running up huge phone bills, it
17249 would be nice to have a way to slurp down all the news and mail, hang up
17250 the phone, read for several hours, and then upload any responses you
17251 have to make.  And then you repeat the procedure.
17252
17253 Of course, you can use news servers for doing this as well.  I've used
17254 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17255 for some years, but doing that's a bore.  Moving the news server
17256 functionality up to the newsreader makes sense if you're the only person
17257 reading news on a machine.
17258
17259 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17260 fact, you don't even have to configure anything.
17261
17262 Of course, to use it as such, you have to learn a few new commands.
17263
17264 @menu
17265 * Agent Basics::                How it all is supposed to work.
17266 * Agent Categories::            How to tell the Gnus Agent what to download.
17267 * Agent Commands::              New commands for all the buffers.
17268 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17269 * Agent as Cache::              The Agent is a big cache too.
17270 * Agent Expiry::                How to make old articles go away.
17271 * Agent Regeneration::          How to recover from lost connections and other accidents.
17272 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17273 * Outgoing Messages::           What happens when you post/mail something?
17274 * Agent Variables::             Customizing is fun.
17275 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17276 * Batching Agents::             How to fetch news from a @code{cron} job.
17277 * Agent Caveats::               What you think it'll do and what it does.
17278 @end menu
17279
17280
17281 @node Agent Basics
17282 @subsection Agent Basics
17283
17284 First, let's get some terminology out of the way.
17285
17286 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17287 connection to the net (and notified the Agent that this is the case).
17288 When the connection to the net is up again (and Gnus knows this), the
17289 Agent is @dfn{plugged}.
17290
17291 The @dfn{local} machine is the one you're running on, and which isn't
17292 connected to the net continuously.
17293
17294 @dfn{Downloading} means fetching things from the net to your local
17295 machine.  @dfn{Uploading} is doing the opposite.
17296
17297 You know that Gnus gives you all the opportunity you'd ever want for
17298 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17299 is also customizable to a great extent, which means that the user has a
17300 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17301 you in your foot, but with Gnus, you have a choice!
17302
17303 Gnus is never really in plugged or unplugged state.  Rather, it applies
17304 that state to each server individually.  This means that some servers
17305 can be plugged while others can be unplugged.  Additionally, some
17306 servers can be ignored by the Agent altogether (which means that
17307 they're kinda like plugged always).
17308
17309 So when you unplug the Agent and then wonder why is Gnus opening a
17310 connection to the Net, the next step to do is to look whether all
17311 servers are agentized.  If there is an unagentized server, you found
17312 the culprit.
17313
17314 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17315 reachable.  When Gnus notices this, it asks you whether you want the
17316 server to be switched to offline state.  If you say yes, then the
17317 server will behave somewhat as if it was unplugged, except that Gnus
17318 will ask you whether you want to switch it back online again.
17319
17320 Let's take a typical Gnus session using the Agent.
17321
17322 @itemize @bullet
17323
17324 @item
17325 @findex gnus-unplugged
17326 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17327 Agent in a disconnected state.  You can read all the news that you have
17328 already fetched while in this mode.
17329
17330 @item
17331 You then decide to see whether any new news has arrived.  You connect
17332 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17333 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17334 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17335 Source Specifiers}).
17336
17337 @item
17338 You can then read the new news immediately, or you can download the
17339 news onto your local machine.  If you want to do the latter, you press
17340 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17341 all the eligible articles in all the groups.  (To let Gnus know which
17342 articles you want to download, @pxref{Agent Categories}).
17343
17344 @item
17345 After fetching the articles, you press @kbd{J j} to make Gnus become
17346 unplugged again, and you shut down the PPP thing (or whatever).  And
17347 then you read the news offline.
17348
17349 @item
17350 And then you go to step 2.
17351 @end itemize
17352
17353 Here are some things you should do the first time (or so) that you use
17354 the Agent.
17355
17356 @itemize @bullet
17357
17358 @item
17359 Decide which servers should be covered by the Agent.  If you have a mail
17360 back end, it would probably be nonsensical to have it covered by the
17361 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17362 @kbd{J a} on the server (or servers) that you wish to have covered by the
17363 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17364 added servers you do not wish to have covered by the Agent.  By default,
17365 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17366 @code{gnus-secondary-select-methods} are agentized.
17367
17368 @item
17369 Decide on download policy.  It's fairly simple once you decide whether
17370 you are going to use agent categories, topic parameters, and/or group
17371 parameters to implement your policy.  If you're new to gnus, it
17372 is probably best to start with a category, @xref{Agent Categories}.
17373
17374 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17375 (@pxref{Agent Categories}) provide for setting a policy that applies
17376 to multiple groups.  Which you use is entirely up to you.  Topic
17377 parameters do override categories so, if you mix the two, you'll have
17378 to take that into account.  If you have a few groups that deviate from
17379 your policy, you can use group parameters (@pxref{Group Parameters}) to
17380 configure them.
17381
17382 @item
17383 Uhm@dots{} that's it.
17384 @end itemize
17385
17386
17387 @node Agent Categories
17388 @subsection Agent Categories
17389
17390 One of the main reasons to integrate the news transport layer into the
17391 newsreader is to allow greater control over what articles to download.
17392 There's not much point in downloading huge amounts of articles, just to
17393 find out that you're not interested in reading any of them.  It's better
17394 to be somewhat more conservative in choosing what to download, and then
17395 mark the articles for downloading manually if it should turn out that
17396 you're interested in the articles anyway.
17397
17398 One of the more effective methods for controlling what is to be
17399 downloaded is to create a @dfn{category} and then assign some (or all)
17400 groups to this category.  Groups that do not belong in any other
17401 category belong to the @code{default} category.  Gnus has its own
17402 buffer for creating and managing categories.
17403
17404 If you prefer, you can also use group parameters (@pxref{Group
17405 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17406 alternative approach to controlling the agent.  The only real
17407 difference is that categories are specific to the agent (so there is
17408 less to learn) while group and topic parameters include the kitchen
17409 sink.
17410
17411 Since you can set agent parameters in several different places we have
17412 a rule to decide which source to believe.  This rule specifies that
17413 the parameter sources are checked in the following order: group
17414 parameters, topic parameters, agent category, and finally customizable
17415 variables.  So you can mix all of these sources to produce a wide range
17416 of behavior, just don't blame me if you don't remember where you put
17417 your settings.
17418
17419 @menu
17420 * Category Syntax::             What a category looks like.
17421 * Category Buffer::             A buffer for maintaining categories.
17422 * Category Variables::          Customize'r'Us.
17423 @end menu
17424
17425
17426 @node Category Syntax
17427 @subsubsection Category Syntax
17428
17429 A category consists of a name, the list of groups belonging to the
17430 category, and a number of optional parameters that override the
17431 customizable variables.  The complete list of agent parameters are
17432 listed below.
17433
17434 @table @code
17435 @item gnus-agent-cat-name
17436 The name of the category.
17437
17438 @item gnus-agent-cat-groups
17439 The list of groups that are in this category.
17440
17441 @item gnus-agent-cat-predicate
17442 A predicate which (generally) gives a rough outline of which articles
17443 are eligible for downloading; and
17444
17445 @item gnus-agent-cat-score-file
17446 a score rule which (generally) gives you a finer granularity when
17447 deciding what articles to download.  (Note that this @dfn{download
17448 score} is not necessarily related to normal scores.)
17449
17450 @item gnus-agent-cat-enable-expiration
17451 a boolean indicating whether the agent should expire old articles in
17452 this group.  Most groups should be expired to conserve disk space.  In
17453 fact, its probably safe to say that the gnus.* hierarchy contains the
17454 only groups that should not be expired.
17455
17456 @item gnus-agent-cat-days-until-old
17457 an integer indicating the number of days that the agent should wait
17458 before deciding that a read article is safe to expire.
17459
17460 @item gnus-agent-cat-low-score
17461 an integer that overrides the value of @code{gnus-agent-low-score}.
17462
17463 @item gnus-agent-cat-high-score
17464 an integer that overrides the value of @code{gnus-agent-high-score}.
17465
17466 @item gnus-agent-cat-length-when-short
17467 an integer that overrides the value of
17468 @code{gnus-agent-short-article}.
17469
17470 @item gnus-agent-cat-length-when-long
17471 an integer that overrides the value of @code{gnus-agent-long-article}.
17472 @end table
17473
17474 The name of a category can not be changed once the category has been
17475 created.
17476
17477 Each category maintains a list of groups that are exclusive members of
17478 that category.  The exclusivity rule is automatically enforced, add a
17479 group to a new category and it is automatically removed from its old
17480 category.
17481
17482 A predicate in its simplest form can be a single predicate such as
17483 @code{true} or @code{false}.  These two will download every available
17484 article or nothing respectively.  In the case of these two special
17485 predicates an additional score rule is superfluous.
17486
17487 Predicates of @code{high} or @code{low} download articles in respect of
17488 their scores in relationship to @code{gnus-agent-high-score} and
17489 @code{gnus-agent-low-score} as described below.
17490
17491 To gain even finer control of what is to be regarded eligible for
17492 download a predicate can consist of a number of predicates with logical
17493 operators sprinkled in between.
17494
17495 Perhaps some examples are in order.
17496
17497 Here's a simple predicate.  (It's the default predicate, in fact, used
17498 for all groups that don't belong to any other category.)
17499
17500 @lisp
17501 short
17502 @end lisp
17503
17504 Quite simple, eh?  This predicate is true if and only if the article is
17505 short (for some value of ``short'').
17506
17507 Here's a more complex predicate:
17508
17509 @lisp
17510 (or high
17511     (and
17512      (not low)
17513      (not long)))
17514 @end lisp
17515
17516 This means that an article should be downloaded if it has a high score,
17517 or if the score is not low and the article is not long.  You get the
17518 drift.
17519
17520 The available logical operators are @code{or}, @code{and} and
17521 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17522 @samp{|}, @code{&} and @code{!} instead.)
17523
17524 The following predicates are pre-defined, but if none of these fit what
17525 you want to do, you can write your own.
17526
17527 When evaluating each of these predicates, the named constant will be
17528 bound to the value determined by calling
17529 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17530 example, gnus-agent-short-article will be bound to
17531 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17532 means that you can specify a predicate in your category then tune that
17533 predicate to individual groups.
17534
17535 @table @code
17536 @item short
17537 True iff the article is shorter than @code{gnus-agent-short-article}
17538 lines; default 100.
17539
17540 @item long
17541 True iff the article is longer than @code{gnus-agent-long-article}
17542 lines; default 200.
17543
17544 @item low
17545 True iff the article has a download score less than
17546 @code{gnus-agent-low-score}; default 0.
17547
17548 @item high
17549 True iff the article has a download score greater than
17550 @code{gnus-agent-high-score}; default 0.
17551
17552 @item spam
17553 True iff the Gnus Agent guesses that the article is spam.  The
17554 heuristics may change over time, but at present it just computes a
17555 checksum and sees whether articles match.
17556
17557 @item true
17558 Always true.
17559
17560 @item false
17561 Always false.
17562 @end table
17563
17564 If you want to create your own predicate function, here's what you have
17565 to know:  The functions are called with no parameters, but the
17566 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17567 useful values.
17568
17569 For example, you could decide that you don't want to download articles
17570 that were posted more than a certain number of days ago (e.g. posted
17571 more than @code{gnus-agent-expire-days} ago) you might write a function
17572 something along the lines of the following:
17573
17574 @lisp
17575 (defun my-article-old-p ()
17576   "Say whether an article is old."
17577   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17578      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17579 @end lisp
17580
17581 with the predicate then defined as:
17582
17583 @lisp
17584 (not my-article-old-p)
17585 @end lisp
17586
17587 or you could append your predicate to the predefined
17588 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17589 wherever.
17590
17591 @lisp
17592 (require 'gnus-agent)
17593 (setq  gnus-category-predicate-alist
17594   (append gnus-category-predicate-alist
17595          '((old . my-article-old-p))))
17596 @end lisp
17597
17598 and simply specify your predicate as:
17599
17600 @lisp
17601 (not old)
17602 @end lisp
17603
17604 If/when using something like the above, be aware that there are many
17605 misconfigured systems/mailers out there and so an article's date is not
17606 always a reliable indication of when it was posted.  Hell, some people
17607 just don't give a damn.
17608
17609 The above predicates apply to @emph{all} the groups which belong to the
17610 category.  However, if you wish to have a specific predicate for an
17611 individual group within a category, or you're just too lazy to set up a
17612 new category, you can enter a group's individual predicate in its group
17613 parameters like so:
17614
17615 @lisp
17616 (agent-predicate . short)
17617 @end lisp
17618
17619 This is the group/topic parameter equivalent of the agent category default.
17620 Note that when specifying a single word predicate like this, the
17621 @code{agent-predicate} specification must be in dotted pair notation.
17622
17623 The equivalent of the longer example from above would be:
17624
17625 @lisp
17626 (agent-predicate or high (and (not low) (not long)))
17627 @end lisp
17628
17629 The outer parenthesis required in the category specification are not
17630 entered here as, not being in dotted pair notation, the value of the
17631 predicate is assumed to be a list.
17632
17633
17634 Now, the syntax of the download score is the same as the syntax of
17635 normal score files, except that all elements that require actually
17636 seeing the article itself are verboten.  This means that only the
17637 following headers can be scored on: @code{Subject}, @code{From},
17638 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17639 @code{Lines}, and @code{Xref}.
17640
17641 As with predicates, the specification of the @code{download score rule}
17642 to use in respect of a group can be in either the category definition if
17643 it's to be applicable to all groups in therein, or a group's parameters
17644 if it's to be specific to that group.
17645
17646 In both of these places the @code{download score rule} can take one of
17647 three forms:
17648
17649 @enumerate
17650 @item
17651 Score rule
17652
17653 This has the same syntax as a normal gnus score file except only a
17654 subset of scoring keywords are available as mentioned above.
17655
17656 example:
17657
17658 @itemize @bullet
17659 @item
17660 Category specification
17661
17662 @lisp
17663 (("from"
17664        ("Lars Ingebrigtsen" 1000000 nil s))
17665 ("lines"
17666        (500 -100 nil <)))
17667 @end lisp
17668
17669 @item
17670 Group/Topic Parameter specification
17671
17672 @lisp
17673 (agent-score ("from"
17674                    ("Lars Ingebrigtsen" 1000000 nil s))
17675              ("lines"
17676                    (500 -100 nil <)))
17677 @end lisp
17678
17679 Again, note the omission of the outermost parenthesis here.
17680 @end itemize
17681
17682 @item
17683 Agent score file
17684
17685 These score files must @emph{only} contain the permitted scoring
17686 keywords stated above.
17687
17688 example:
17689
17690 @itemize @bullet
17691 @item
17692 Category specification
17693
17694 @lisp
17695 ("~/News/agent.SCORE")
17696 @end lisp
17697
17698 or perhaps
17699
17700 @lisp
17701 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17702 @end lisp
17703
17704 @item
17705 Group Parameter specification
17706
17707 @lisp
17708 (agent-score "~/News/agent.SCORE")
17709 @end lisp
17710
17711 Additional score files can be specified as above.  Need I say anything
17712 about parenthesis?
17713 @end itemize
17714
17715 @item
17716 Use @code{normal} score files
17717
17718 If you don't want to maintain two sets of scoring rules for a group, and
17719 your desired @code{downloading} criteria for a group are the same as your
17720 @code{reading} criteria then you can tell the agent to refer to your
17721 @code{normal} score files when deciding what to download.
17722
17723 These directives in either the category definition or a group's
17724 parameters will cause the agent to read in all the applicable score
17725 files for a group, @emph{filtering out} those sections that do not
17726 relate to one of the permitted subset of scoring keywords.
17727
17728 @itemize @bullet
17729 @item
17730 Category Specification
17731
17732 @lisp
17733 file
17734 @end lisp
17735
17736 @item
17737 Group Parameter specification
17738
17739 @lisp
17740 (agent-score . file)
17741 @end lisp
17742 @end itemize
17743 @end enumerate
17744
17745 @node Category Buffer
17746 @subsubsection Category Buffer
17747
17748 You'd normally do all category maintenance from the category buffer.
17749 When you enter it for the first time (with the @kbd{J c} command from
17750 the group buffer), you'll only see the @code{default} category.
17751
17752 The following commands are available in this buffer:
17753
17754 @table @kbd
17755 @item q
17756 @kindex q (Category)
17757 @findex gnus-category-exit
17758 Return to the group buffer (@code{gnus-category-exit}).
17759
17760 @item e
17761 @kindex e (Category)
17762 @findex gnus-category-customize-category
17763 Use a customization buffer to set all of the selected category's
17764 parameters at one time (@code{gnus-category-customize-category}).
17765
17766 @item k
17767 @kindex k (Category)
17768 @findex gnus-category-kill
17769 Kill the current category (@code{gnus-category-kill}).
17770
17771 @item c
17772 @kindex c (Category)
17773 @findex gnus-category-copy
17774 Copy the current category (@code{gnus-category-copy}).
17775
17776 @item a
17777 @kindex a (Category)
17778 @findex gnus-category-add
17779 Add a new category (@code{gnus-category-add}).
17780
17781 @item p
17782 @kindex p (Category)
17783 @findex gnus-category-edit-predicate
17784 Edit the predicate of the current category
17785 (@code{gnus-category-edit-predicate}).
17786
17787 @item g
17788 @kindex g (Category)
17789 @findex gnus-category-edit-groups
17790 Edit the list of groups belonging to the current category
17791 (@code{gnus-category-edit-groups}).
17792
17793 @item s
17794 @kindex s (Category)
17795 @findex gnus-category-edit-score
17796 Edit the download score rule of the current category
17797 (@code{gnus-category-edit-score}).
17798
17799 @item l
17800 @kindex l (Category)
17801 @findex gnus-category-list
17802 List all the categories (@code{gnus-category-list}).
17803 @end table
17804
17805
17806 @node Category Variables
17807 @subsubsection Category Variables
17808
17809 @table @code
17810 @item gnus-category-mode-hook
17811 @vindex gnus-category-mode-hook
17812 Hook run in category buffers.
17813
17814 @item gnus-category-line-format
17815 @vindex gnus-category-line-format
17816 Format of the lines in the category buffer (@pxref{Formatting
17817 Variables}).  Valid elements are:
17818
17819 @table @samp
17820 @item c
17821 The name of the category.
17822
17823 @item g
17824 The number of groups in the category.
17825 @end table
17826
17827 @item gnus-category-mode-line-format
17828 @vindex gnus-category-mode-line-format
17829 Format of the category mode line (@pxref{Mode Line Formatting}).
17830
17831 @item gnus-agent-short-article
17832 @vindex gnus-agent-short-article
17833 Articles that have fewer lines than this are short.  Default 100.
17834
17835 @item gnus-agent-long-article
17836 @vindex gnus-agent-long-article
17837 Articles that have more lines than this are long.  Default 200.
17838
17839 @item gnus-agent-low-score
17840 @vindex gnus-agent-low-score
17841 Articles that have a score lower than this have a low score.  Default
17842 0.
17843
17844 @item gnus-agent-high-score
17845 @vindex gnus-agent-high-score
17846 Articles that have a score higher than this have a high score.  Default
17847 0.
17848
17849 @item gnus-agent-expire-days
17850 @vindex gnus-agent-expire-days
17851 The number of days that a @samp{read} article must stay in the agent's
17852 local disk before becoming eligible for expiration (While the name is
17853 the same, this doesn't mean expiring the article on the server.  It
17854 just means deleting the local copy of the article).  What is also
17855 important to understand is that the counter starts with the time the
17856 article was written to the local disk and not the time the article was
17857 read.
17858 Default 7.
17859
17860 @item gnus-agent-enable-expiration
17861 @vindex gnus-agent-enable-expiration
17862 Determines whether articles in a group are, by default, expired or
17863 retained indefinitely.  The default is @code{ENABLE} which means that
17864 you'll have to disable expiration when desired.  On the other hand,
17865 you could set this to @code{DISABLE}.  In that case, you would then
17866 have to enable expiration in selected groups.
17867
17868 @end table
17869
17870
17871 @node Agent Commands
17872 @subsection Agent Commands
17873 @findex gnus-agent-toggle-plugged
17874 @kindex J j (Agent)
17875
17876 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17877 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17878 toggles the plugged/unplugged state of the Gnus Agent.
17879
17880
17881 @menu
17882 * Group Agent Commands::        Configure groups and fetch their contents.
17883 * Summary Agent Commands::      Manually select then fetch specific articles.
17884 * Server Agent Commands::       Select the servers that are supported by the agent.
17885 @end menu
17886
17887
17888
17889
17890 @node Group Agent Commands
17891 @subsubsection Group Agent Commands
17892
17893 @table @kbd
17894 @item J u
17895 @kindex J u (Agent Group)
17896 @findex gnus-agent-fetch-groups
17897 Fetch all eligible articles in the current group
17898 (@code{gnus-agent-fetch-groups}).
17899
17900 @item J c
17901 @kindex J c (Agent Group)
17902 @findex gnus-enter-category-buffer
17903 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17904
17905 @item J s
17906 @kindex J s (Agent Group)
17907 @findex gnus-agent-fetch-session
17908 Fetch all eligible articles in all groups
17909 (@code{gnus-agent-fetch-session}).
17910
17911 @item J S
17912 @kindex J S (Agent Group)
17913 @findex gnus-group-send-queue
17914 Send all sendable messages in the queue group
17915 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17916
17917 @item J a
17918 @kindex J a (Agent Group)
17919 @findex gnus-agent-add-group
17920 Add the current group to an Agent category
17921 (@code{gnus-agent-add-group}).  This command understands the
17922 process/prefix convention (@pxref{Process/Prefix}).
17923
17924 @item J r
17925 @kindex J r (Agent Group)
17926 @findex gnus-agent-remove-group
17927 Remove the current group from its category, if any
17928 (@code{gnus-agent-remove-group}).  This command understands the
17929 process/prefix convention (@pxref{Process/Prefix}).
17930
17931 @item J Y
17932 @kindex J Y (Agent Group)
17933 @findex gnus-agent-synchronize-flags
17934 Synchronize flags changed while unplugged with remote server, if any.
17935
17936
17937 @end table
17938
17939
17940 @node Summary Agent Commands
17941 @subsubsection Summary Agent Commands
17942
17943 @table @kbd
17944 @item J #
17945 @kindex J # (Agent Summary)
17946 @findex gnus-agent-mark-article
17947 Mark the article for downloading (@code{gnus-agent-mark-article}).
17948
17949 @item J M-#
17950 @kindex J M-# (Agent Summary)
17951 @findex gnus-agent-unmark-article
17952 Remove the downloading mark from the article
17953 (@code{gnus-agent-unmark-article}).
17954
17955 @cindex %
17956 @item @@
17957 @kindex @@ (Agent Summary)
17958 @findex gnus-agent-toggle-mark
17959 Toggle whether to download the article
17960 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17961 default.
17962
17963 @item J c
17964 @kindex J c (Agent Summary)
17965 @findex gnus-agent-catchup
17966 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17967
17968 @item J S
17969 @kindex J S (Agent Summary)
17970 @findex gnus-agent-fetch-group
17971 Download all eligible (@pxref{Agent Categories}) articles in this group.
17972 (@code{gnus-agent-fetch-group}).
17973
17974 @item J s
17975 @kindex J s (Agent Summary)
17976 @findex gnus-agent-fetch-series
17977 Download all processable articles in this group.
17978 (@code{gnus-agent-fetch-series}).
17979
17980 @item J u
17981 @kindex J u (Agent Summary)
17982 @findex gnus-agent-summary-fetch-group
17983 Download all downloadable articles in the current group
17984 (@code{gnus-agent-summary-fetch-group}).
17985
17986 @end table
17987
17988
17989 @node Server Agent Commands
17990 @subsubsection Server Agent Commands
17991
17992 @table @kbd
17993 @item J a
17994 @kindex J a (Agent Server)
17995 @findex gnus-agent-add-server
17996 Add the current server to the list of servers covered by the Gnus Agent
17997 (@code{gnus-agent-add-server}).
17998
17999 @item J r
18000 @kindex J r (Agent Server)
18001 @findex gnus-agent-remove-server
18002 Remove the current server from the list of servers covered by the Gnus
18003 Agent (@code{gnus-agent-remove-server}).
18004
18005 @end table
18006
18007
18008 @node Agent Visuals
18009 @subsection Agent Visuals
18010
18011 If you open a summary while unplugged and, Gnus knows from the group's
18012 active range that there are more articles than the headers currently
18013 stored in the Agent, you may see some articles whose subject looks
18014 something like @samp{[Undownloaded article #####]}.  These are
18015 placeholders for the missing headers.  Aside from setting a mark,
18016 there is not much that can be done with one of these placeholders.
18017 When Gnus finally gets a chance to fetch the group's headers, the
18018 placeholders will automatically be replaced by the actual headers.
18019 You can configure the summary buffer's maneuvering to skip over the
18020 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18021
18022 While it may be obvious to all, the only headers and articles
18023 available while unplugged are those headers and articles that were
18024 fetched into the Agent while previously plugged.  To put it another
18025 way, "If you forget to fetch something while plugged, you might have a
18026 less than satisfying unplugged session".  For this reason, the Agent
18027 adds two visual effects to your summary buffer.  These effects display
18028 the download status of each article so that you always know which
18029 articles will be available when unplugged.
18030
18031 The first visual effect is the @samp{%O} spec.  If you customize
18032 @code{gnus-summary-line-format} to include this specifier, you will add
18033 a single character field that indicates an article's download status.
18034 Articles that have been fetched into either the Agent or the Cache,
18035 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18036 other articles will display @code{gnus-undownloaded-mark} (defaults to
18037 @samp{-}).  If you open a group that has not been agentized, a space
18038 (@samp{ }) will be displayed.
18039
18040 The second visual effect are the undownloaded faces.  The faces, there
18041 are three indicating the article's score (low, normal, high), seem to
18042 result in a love/hate response from many Gnus users.  The problem is
18043 that the face selection is controlled by a list of condition tests and
18044 face names (See @code{gnus-summary-highlight}).  Each condition is
18045 tested in the order in which it appears in the list so early
18046 conditions have precedence over later conditions.  All of this means
18047 that, if you tick an undownloaded article, the article will continue
18048 to be displayed in the undownloaded face rather than the ticked face.
18049
18050 If you use the Agent as a cache (to avoid downloading the same article
18051 each time you visit it or to minimize your connection time), the
18052 undownloaded face will probably seem like a good idea.  The reason
18053 being that you do all of our work (marking, reading, deleting) with
18054 downloaded articles so the normal faces always appear.
18055
18056 For occasional Agent users, the undownloaded faces may appear to be an
18057 absolutely horrible idea.  The issue being that, since most of their
18058 articles have not been fetched into the Agent, most of the normal
18059 faces will be obscured by the undownloaded faces.  If this is your
18060 situation, you have two choices available.  First, you can completely
18061 disable the undownload faces by customizing
18062 @code{gnus-summary-highlight} to delete the three cons-cells that
18063 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18064 you prefer to take a more fine-grained approach, you may set the
18065 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18066 parameter, like all other agent parameters, may be set on an Agent
18067 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18068 Parameters}), or an individual group (@pxref{Group Parameters}).
18069
18070 @node Agent as Cache
18071 @subsection Agent as Cache
18072
18073 When Gnus is plugged, it is not efficient to download headers or
18074 articles from the server again, if they are already stored in the
18075 Agent.  So, Gnus normally only downloads headers once, and stores them
18076 in the Agent.  These headers are later used when generating the summary
18077 buffer, regardless of whether you are plugged or unplugged.  Articles
18078 are not cached in the Agent by default though (that would potentially
18079 consume lots of disk space), but if you have already downloaded an
18080 article into the Agent, Gnus will not download the article from the
18081 server again but use the locally stored copy instead.
18082
18083 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18084 @pxref{Agent Variables}) to always download headers and articles while
18085 plugged.  Gnus will almost certainly be slower, but it will be kept
18086 synchronized with the server.  That last point probably won't make any
18087 sense if you are using a nntp or nnimap back end.
18088
18089 @node Agent Expiry
18090 @subsection Agent Expiry
18091
18092 @vindex gnus-agent-expire-days
18093 @findex gnus-agent-expire
18094 @kindex M-x gnus-agent-expire
18095 @kindex M-x gnus-agent-expire-group
18096 @findex gnus-agent-expire-group
18097 @cindex agent expiry
18098 @cindex Gnus agent expiry
18099 @cindex expiry
18100
18101 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18102 least it doesn't handle it like other back ends.  Instead, there are
18103 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18104 commands that will expire all read articles that are older than
18105 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18106 that you're running out of space.  Neither are particularly fast or
18107 efficient, and it's not a particularly good idea to interrupt them (with
18108 @kbd{C-g} or anything else) once you've started one of them.
18109
18110 Note that other functions, e.g. @code{gnus-request-expire-articles},
18111 might run @code{gnus-agent-expire} for you to keep the agent
18112 synchronized with the group.
18113
18114 The agent parameter @code{agent-enable-expiration} may be used to
18115 prevent expiration in selected groups.
18116
18117 @vindex gnus-agent-expire-all
18118 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18119 expiration commands will expire all articles---unread, read, ticked
18120 and dormant.  If @code{nil} (which is the default), only read articles
18121 are eligible for expiry, and unread, ticked and dormant articles will
18122 be kept indefinitely.
18123
18124 If you find that some articles eligible for expiry are never expired,
18125 perhaps some Gnus Agent files are corrupted.  There's are special
18126 commands, @code{gnus-agent-regenerate} and
18127 @code{gnus-agent-regenerate-group}, to fix possible problems.
18128
18129 @node Agent Regeneration
18130 @subsection Agent Regeneration
18131
18132 @cindex agent regeneration
18133 @cindex Gnus agent regeneration
18134 @cindex regeneration
18135
18136 The local data structures used by @code{nnagent} may become corrupted
18137 due to certain exceptional conditions.  When this happens,
18138 @code{nnagent} functionality may degrade or even fail.  The solution
18139 to this problem is to repair the local data structures by removing all
18140 internal inconsistencies.
18141
18142 For example, if your connection to your server is lost while
18143 downloaded articles into the agent, the local data structures will not
18144 know about articles successfully downloaded prior to the connection
18145 failure.  Running @code{gnus-agent-regenerate} or
18146 @code{gnus-agent-regenerate-group} will update the data structures
18147 such that you don't need to download these articles a second time.
18148
18149 @findex gnus-agent-regenerate
18150 @kindex M-x gnus-agent-regenerate
18151 The command @code{gnus-agent-regenerate} will perform
18152 @code{gnus-agent-regenerate-group} on every agentized group.  While
18153 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18154 recommended that you first close all summary buffers.
18155
18156 @findex gnus-agent-regenerate-group
18157 @kindex M-x gnus-agent-regenerate-group
18158 The command @code{gnus-agent-regenerate-group} uses the local copies
18159 of individual articles to repair the local @acronym{NOV}(header) database.  It
18160 then updates the internal data structures that document which articles
18161 are stored locally.  An optional argument will mark articles in the
18162 agent as unread.
18163
18164 @node Agent and IMAP
18165 @subsection Agent and IMAP
18166
18167 The Agent works with any Gnus back end, including nnimap.  However,
18168 since there are some conceptual differences between @acronym{NNTP} and
18169 @acronym{IMAP}, this section (should) provide you with some information to
18170 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18171
18172 The first thing to keep in mind is that all flags (read, ticked, etc)
18173 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18174 case for nntp.  Thus Gnus need to remember flag changes when
18175 disconnected, and synchronize these flags when you plug back in.
18176
18177 Gnus keeps track of flag changes when reading nnimap groups under the
18178 Agent.  When you plug back in, Gnus will check if you have any changed
18179 any flags and ask if you wish to synchronize these with the server.
18180 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18181
18182 @vindex gnus-agent-synchronize-flags
18183 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18184 never automatically synchronize flags.  If it is @code{ask}, which is
18185 the default, the Agent will check if you made any changes and if so
18186 ask if you wish to synchronize these when you re-connect.  If it has
18187 any other value, all flags will be synchronized automatically.
18188
18189 If you do not wish to synchronize flags automatically when you
18190 re-connect, you can do it manually with the
18191 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18192 in the group buffer.
18193
18194 Some things are currently not implemented in the Agent that you'd might
18195 expect from a disconnected @acronym{IMAP} client, including:
18196
18197 @itemize @bullet
18198
18199 @item
18200 Copying/moving articles into nnimap groups when unplugged.
18201
18202 @item
18203 Creating/deleting nnimap groups when unplugged.
18204
18205 @end itemize
18206
18207 Technical note: the synchronization algorithm does not work by ``pushing''
18208 all local flags to the server, but rather incrementally update the
18209 server view of flags by changing only those flags that were changed by
18210 the user.  Thus, if you set one flag on an article, quit the group and
18211 re-select the group and remove the flag; the flag will be set and
18212 removed from the server when you ``synchronize''.  The queued flag
18213 operations can be found in the per-server @code{flags} file in the Agent
18214 directory.  It's emptied when you synchronize flags.
18215
18216
18217 @node Outgoing Messages
18218 @subsection Outgoing Messages
18219
18220 When Gnus is unplugged, all outgoing messages (both mail and news) are
18221 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18222 them there after posting, and edit them at will.
18223
18224 When Gnus is plugged again, you can send the messages either from the
18225 draft group with the special commands available there, or you can use
18226 the @kbd{J S} command in the group buffer to send all the sendable
18227 messages in the draft group.
18228
18229
18230
18231 @node Agent Variables
18232 @subsection Agent Variables
18233
18234 @table @code
18235 @item gnus-agent-directory
18236 @vindex gnus-agent-directory
18237 Where the Gnus Agent will store its files.  The default is
18238 @file{~/News/agent/}.
18239
18240 @item gnus-agent-handle-level
18241 @vindex gnus-agent-handle-level
18242 Groups on levels (@pxref{Group Levels}) higher than this variable will
18243 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18244 which means that only subscribed group will be considered by the Agent
18245 by default.
18246
18247 @item gnus-agent-plugged-hook
18248 @vindex gnus-agent-plugged-hook
18249 Hook run when connecting to the network.
18250
18251 @item gnus-agent-unplugged-hook
18252 @vindex gnus-agent-unplugged-hook
18253 Hook run when disconnecting from the network.
18254
18255 @item gnus-agent-fetched-hook
18256 @vindex gnus-agent-fetched-hook
18257 Hook run when finished fetching articles.
18258
18259 @item gnus-agent-cache
18260 @vindex gnus-agent-cache
18261 Variable to control whether use the locally stored @acronym{NOV} and
18262 articles when plugged, e.g. essentially using the Agent as a cache.
18263 The default is non-@code{nil}, which means to use the Agent as a cache.
18264
18265 @item gnus-agent-go-online
18266 @vindex gnus-agent-go-online
18267 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18268 automatically switch offline servers into online status.  If it is
18269 @code{ask}, the default, the Agent will ask if you wish to switch
18270 offline servers into online status when you re-connect.  If it has any
18271 other value, all offline servers will be automatically switched into
18272 online status.
18273
18274 @item gnus-agent-mark-unread-after-downloaded
18275 @vindex gnus-agent-mark-unread-after-downloaded
18276 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18277 mark articles as unread after downloading.  This is usually a safe
18278 thing to do as the newly downloaded article has obviously not been
18279 read.  The default is t.
18280
18281 @item gnus-agent-consider-all-articles
18282 @vindex gnus-agent-consider-all-articles
18283 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18284 agent will fetch all missing headers.  When @code{nil}, the agent will
18285 fetch only new headers.  The default is @code{nil}.
18286
18287 @item gnus-agent-max-fetch-size
18288 @vindex gnus-agent-max-fetch-size
18289 The agent fetches articles into a temporary buffer prior to parsing
18290 them into individual files.  To avoid exceeding the max. buffer size,
18291 the agent alternates between fetching and parsing until all articles
18292 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18293 limit to control how often the cycling occurs.  A large value improves
18294 performance.  A small value minimizes the time lost should the
18295 connection be lost while fetching (You may need to run
18296 @code{gnus-agent-regenerate-group} to update the group's state.
18297 However, all articles parsed prior to loosing the connection will be
18298 available while unplugged).  The default is 10M so it is unusual to
18299 see any cycling.
18300
18301 @item gnus-server-unopen-status
18302 @vindex gnus-server-unopen-status
18303 Perhaps not an Agent variable, but closely related to the Agent, this
18304 variable says what will happen if Gnus cannot open a server.  If the
18305 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18306 whether to deny the server or whether to unplug the agent.  If the
18307 Agent is disabled, Gnus always simply deny the server.  Other choices
18308 for this variable include @code{denied} and @code{offline} the latter
18309 is only valid if the Agent is used.
18310
18311 @item gnus-auto-goto-ignores
18312 @vindex gnus-auto-goto-ignores
18313 Another variable that isn't an Agent variable, yet so closely related
18314 that most will look for it here, this variable tells the summary
18315 buffer how to maneuver around undownloaded (only headers stored in the
18316 agent) and unfetched (neither article nor headers stored) articles.
18317
18318 The legal values are @code{nil} (maneuver to any article),
18319 @code{undownloaded} (maneuvering while unplugged ignores articles that
18320 have not been fetched), @code{always-undownloaded} (maneuvering always
18321 ignores articles that have not been fetched), @code{unfetched}
18322 (maneuvering ignores articles whose headers have not been fetched).
18323
18324 @end table
18325
18326
18327 @node Example Setup
18328 @subsection Example Setup
18329
18330 If you don't want to read this manual, and you have a fairly standard
18331 setup, you may be able to use something like the following as your
18332 @file{~/.gnus.el} file to get started.
18333
18334 @lisp
18335 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18336 ;;; @r{from your ISP's server.}
18337 (setq gnus-select-method '(nntp "news.your-isp.com"))
18338
18339 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18340 ;;; @r{your ISP's @acronym{POP} server.}
18341 (setq mail-sources '((pop :server "pop.your-isp.com")))
18342
18343 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18344 (setq gnus-secondary-select-methods '((nnml "")))
18345
18346 ;;; @r{Make Gnus into an offline newsreader.}
18347 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18348 ;;; (setq gnus-agent t) ; @r{Now the default.}
18349 @end lisp
18350
18351 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18352 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18353 gnus}.
18354
18355 If this is the first time you've run Gnus, you will be subscribed
18356 automatically to a few default newsgroups.  You'll probably want to
18357 subscribe to more groups, and to do that, you have to query the
18358 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18359 command.  This usually takes quite a while, but you only have to do it
18360 once.
18361
18362 After reading and parsing a while, you'll be presented with a list of
18363 groups.  Subscribe to the ones you want to read with the @kbd{u}
18364 command.  @kbd{l} to make all the killed groups disappear after you've
18365 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18366 back all the killed groups.)
18367
18368 You can now read the groups at once, or you can download the articles
18369 with the @kbd{J s} command.  And then read the rest of this manual to
18370 find out which of the other gazillion things you want to customize.
18371
18372
18373 @node Batching Agents
18374 @subsection Batching Agents
18375 @findex gnus-agent-batch
18376
18377 Having the Gnus Agent fetch articles (and post whatever messages you've
18378 written) is quite easy once you've gotten things set up properly.  The
18379 following shell script will do everything that is necessary:
18380
18381 You can run a complete batch command from the command line with the
18382 following incantation:
18383
18384 @example
18385 #!/bin/sh
18386 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18387 @end example
18388
18389
18390 @node Agent Caveats
18391 @subsection Agent Caveats
18392
18393 The Gnus Agent doesn't seem to work like most other offline
18394 newsreaders.  Here are some common questions that some imaginary people
18395 may ask:
18396
18397 @table @dfn
18398 @item If I read an article while plugged, do they get entered into the Agent?
18399
18400 @strong{No}.  If you want this behaviour, add
18401 @code{gnus-agent-fetch-selected-article} to
18402 @code{gnus-select-article-hook}.
18403
18404 @item If I read an article while plugged, and the article already exists in
18405 the Agent, will it get downloaded once more?
18406
18407 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18408
18409 @end table
18410
18411 In short, when Gnus is unplugged, it only looks into the locally stored
18412 articles; when it's plugged, it talks to your ISP and may also use the
18413 locally stored articles.
18414
18415
18416 @node Scoring
18417 @chapter Scoring
18418 @cindex scoring
18419
18420 Other people use @dfn{kill files}, but we here at Gnus Towers like
18421 scoring better than killing, so we'd rather switch than fight.  They do
18422 something completely different as well, so sit up straight and pay
18423 attention!
18424
18425 @vindex gnus-summary-mark-below
18426 All articles have a default score (@code{gnus-summary-default-score}),
18427 which is 0 by default.  This score may be raised or lowered either
18428 interactively or by score files.  Articles that have a score lower than
18429 @code{gnus-summary-mark-below} are marked as read.
18430
18431 Gnus will read any @dfn{score files} that apply to the current group
18432 before generating the summary buffer.
18433
18434 There are several commands in the summary buffer that insert score
18435 entries based on the current article.  You can, for instance, ask Gnus to
18436 lower or increase the score of all articles with a certain subject.
18437
18438 There are two sorts of scoring entries: Permanent and temporary.
18439 Temporary score entries are self-expiring entries.  Any entries that are
18440 temporary and have not been used for, say, a week, will be removed
18441 silently to help keep the sizes of the score files down.
18442
18443 @menu
18444 * Summary Score Commands::      Adding score entries for the current group.
18445 * Group Score Commands::        General score commands.
18446 * Score Variables::             Customize your scoring.  (My, what terminology).
18447 * Score File Format::           What a score file may contain.
18448 * Score File Editing::          You can edit score files by hand as well.
18449 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18450 * Home Score File::             How to say where new score entries are to go.
18451 * Followups To Yourself::       Having Gnus notice when people answer you.
18452 * Scoring On Other Headers::    Scoring on non-standard headers.
18453 * Scoring Tips::                How to score effectively.
18454 * Reverse Scoring::             That problem child of old is not problem.
18455 * Global Score Files::          Earth-spanning, ear-splitting score files.
18456 * Kill Files::                  They are still here, but they can be ignored.
18457 * Converting Kill Files::       Translating kill files to score files.
18458 * GroupLens::                   Getting predictions on what you like to read.
18459 * Advanced Scoring::            Using logical expressions to build score rules.
18460 * Score Decays::                It can be useful to let scores wither away.
18461 @end menu
18462
18463
18464 @node Summary Score Commands
18465 @section Summary Score Commands
18466 @cindex score commands
18467
18468 The score commands that alter score entries do not actually modify real
18469 score files.  That would be too inefficient.  Gnus maintains a cache of
18470 previously loaded score files, one of which is considered the
18471 @dfn{current score file alist}.  The score commands simply insert
18472 entries into this list, and upon group exit, this list is saved.
18473
18474 The current score file is by default the group's local score file, even
18475 if no such score file actually exists.  To insert score commands into
18476 some other score file (e.g. @file{all.SCORE}), you must first make this
18477 score file the current one.
18478
18479 General score commands that don't actually change the score file:
18480
18481 @table @kbd
18482
18483 @item V s
18484 @kindex V s (Summary)
18485 @findex gnus-summary-set-score
18486 Set the score of the current article (@code{gnus-summary-set-score}).
18487
18488 @item V S
18489 @kindex V S (Summary)
18490 @findex gnus-summary-current-score
18491 Display the score of the current article
18492 (@code{gnus-summary-current-score}).
18493
18494 @item V t
18495 @kindex V t (Summary)
18496 @findex gnus-score-find-trace
18497 Display all score rules that have been used on the current article
18498 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18499 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18500 When point is on a string within the match element, @kbd{e} will try to
18501 bring you to this string in the score file.
18502
18503 @item V w
18504 @kindex V w (Summary)
18505 @findex gnus-score-find-favourite-words
18506 List words used in scoring (@code{gnus-score-find-favourite-words}).
18507
18508 @item V R
18509 @kindex V R (Summary)
18510 @findex gnus-summary-rescore
18511 Run the current summary through the scoring process
18512 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18513 around with your score files behind Gnus' back and want to see the
18514 effect you're having.
18515
18516 @item V c
18517 @kindex V c (Summary)
18518 @findex gnus-score-change-score-file
18519 Make a different score file the current
18520 (@code{gnus-score-change-score-file}).
18521
18522 @item V e
18523 @kindex V e (Summary)
18524 @findex gnus-score-edit-current-scores
18525 Edit the current score file (@code{gnus-score-edit-current-scores}).
18526 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18527 File Editing}).
18528
18529 @item V f
18530 @kindex V f (Summary)
18531 @findex gnus-score-edit-file
18532 Edit a score file and make this score file the current one
18533 (@code{gnus-score-edit-file}).
18534
18535 @item V F
18536 @kindex V F (Summary)
18537 @findex gnus-score-flush-cache
18538 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18539 after editing score files.
18540
18541 @item V C
18542 @kindex V C (Summary)
18543 @findex gnus-score-customize
18544 Customize a score file in a visually pleasing manner
18545 (@code{gnus-score-customize}).
18546
18547 @end table
18548
18549 The rest of these commands modify the local score file.
18550
18551 @table @kbd
18552
18553 @item V m
18554 @kindex V m (Summary)
18555 @findex gnus-score-set-mark-below
18556 Prompt for a score, and mark all articles with a score below this as
18557 read (@code{gnus-score-set-mark-below}).
18558
18559 @item V x
18560 @kindex V x (Summary)
18561 @findex gnus-score-set-expunge-below
18562 Prompt for a score, and add a score rule to the current score file to
18563 expunge all articles below this score
18564 (@code{gnus-score-set-expunge-below}).
18565 @end table
18566
18567 The keystrokes for actually making score entries follow a very regular
18568 pattern, so there's no need to list all the commands.  (Hundreds of
18569 them.)
18570
18571 @findex gnus-summary-increase-score
18572 @findex gnus-summary-lower-score
18573
18574 @enumerate
18575 @item
18576 The first key is either @kbd{I} (upper case i) for increasing the score
18577 or @kbd{L} for lowering the score.
18578 @item
18579 The second key says what header you want to score on.  The following
18580 keys are available:
18581 @table @kbd
18582
18583 @item a
18584 Score on the author name.
18585
18586 @item s
18587 Score on the subject line.
18588
18589 @item x
18590 Score on the @code{Xref} line---i.e., the cross-posting line.
18591
18592 @item r
18593 Score on the @code{References} line.
18594
18595 @item d
18596 Score on the date.
18597
18598 @item l
18599 Score on the number of lines.
18600
18601 @item i
18602 Score on the @code{Message-ID} header.
18603
18604 @item e
18605 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18606 if your @acronym{NNTP} server tracks additional header data in overviews.
18607
18608 @item f
18609 Score on followups---this matches the author name, and adds scores to
18610 the followups to this author.  (Using this key leads to the creation of
18611 @file{ADAPT} files.)
18612
18613 @item b
18614 Score on the body.
18615
18616 @item h
18617 Score on the head.
18618
18619 @item t
18620 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18621 files.)
18622
18623 @end table
18624
18625 @item
18626 The third key is the match type.  Which match types are valid depends on
18627 what headers you are scoring on.
18628
18629 @table @code
18630
18631 @item strings
18632
18633 @table @kbd
18634
18635 @item e
18636 Exact matching.
18637
18638 @item s
18639 Substring matching.
18640
18641 @item f
18642 Fuzzy matching (@pxref{Fuzzy Matching}).
18643
18644 @item r
18645 Regexp matching
18646 @end table
18647
18648 @item date
18649 @table @kbd
18650
18651 @item b
18652 Before date.
18653
18654 @item a
18655 After date.
18656
18657 @item n
18658 This date.
18659 @end table
18660
18661 @item number
18662 @table @kbd
18663
18664 @item <
18665 Less than number.
18666
18667 @item =
18668 Equal to number.
18669
18670 @item >
18671 Greater than number.
18672 @end table
18673 @end table
18674
18675 @item
18676 The fourth and usually final key says whether this is a temporary (i.e.,
18677 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18678 or whether it is to be done immediately, without adding to the score
18679 file.
18680 @table @kbd
18681
18682 @item t
18683 Temporary score entry.
18684
18685 @item p
18686 Permanent score entry.
18687
18688 @item i
18689 Immediately scoring.
18690 @end table
18691
18692 @item
18693 If you are scoring on `e' (extra) headers, you will then be prompted for
18694 the header name on which you wish to score.  This must be a header named
18695 in gnus-extra-headers, and @samp{TAB} completion is available.
18696
18697 @end enumerate
18698
18699 So, let's say you want to increase the score on the current author with
18700 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18701 score based on the subject line, using substring matching, and make a
18702 temporary score entry: @kbd{L s s t}.  Pretty easy.
18703
18704 To make things a bit more complicated, there are shortcuts.  If you use
18705 a capital letter on either the second or third keys, Gnus will use
18706 defaults for the remaining one or two keystrokes.  The defaults are
18707 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18708 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18709
18710 These functions take both the numerical prefix and the symbolic prefix
18711 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18712 (or increase) the score of the article.  A symbolic prefix of @code{a}
18713 says to use the @file{all.SCORE} file for the command instead of the
18714 current score file.
18715
18716 @vindex gnus-score-mimic-keymap
18717 The @code{gnus-score-mimic-keymap} says whether these commands will
18718 pretend they are keymaps or not.
18719
18720
18721 @node Group Score Commands
18722 @section Group Score Commands
18723 @cindex group score commands
18724
18725 There aren't many of these as yet, I'm afraid.
18726
18727 @table @kbd
18728
18729 @item W f
18730 @kindex W f (Group)
18731 @findex gnus-score-flush-cache
18732 Gnus maintains a cache of score alists to avoid having to reload them
18733 all the time.  This command will flush the cache
18734 (@code{gnus-score-flush-cache}).
18735
18736 @end table
18737
18738 You can do scoring from the command line by saying something like:
18739
18740 @findex gnus-batch-score
18741 @cindex batch scoring
18742 @example
18743 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18744 @end example
18745
18746
18747 @node Score Variables
18748 @section Score Variables
18749 @cindex score variables
18750
18751 @table @code
18752
18753 @item gnus-use-scoring
18754 @vindex gnus-use-scoring
18755 If @code{nil}, Gnus will not check for score files, and will not, in
18756 general, do any score-related work.  This is @code{t} by default.
18757
18758 @item gnus-kill-killed
18759 @vindex gnus-kill-killed
18760 If this variable is @code{nil}, Gnus will never apply score files to
18761 articles that have already been through the kill process.  While this
18762 may save you lots of time, it also means that if you apply a kill file
18763 to a group, and then change the kill file and want to run it over you
18764 group again to kill more articles, it won't work.  You have to set this
18765 variable to @code{t} to do that.  (It is @code{t} by default.)
18766
18767 @item gnus-kill-files-directory
18768 @vindex gnus-kill-files-directory
18769 All kill and score files will be stored in this directory, which is
18770 initialized from the @env{SAVEDIR} environment variable by default.
18771 This is @file{~/News/} by default.
18772
18773 @item gnus-score-file-suffix
18774 @vindex gnus-score-file-suffix
18775 Suffix to add to the group name to arrive at the score file name
18776 (@file{SCORE} by default.)
18777
18778 @item gnus-score-uncacheable-files
18779 @vindex gnus-score-uncacheable-files
18780 @cindex score cache
18781 All score files are normally cached to avoid excessive re-loading of
18782 score files.  However, if this might make your Emacs grow big and
18783 bloated, so this regexp can be used to weed out score files unlikely
18784 to be needed again.  It would be a bad idea to deny caching of
18785 @file{all.SCORE}, while it might be a good idea to not cache
18786 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18787 variable is @samp{ADAPT$} by default, so no adaptive score files will
18788 be cached.
18789
18790 @item gnus-save-score
18791 @vindex gnus-save-score
18792 If you have really complicated score files, and do lots of batch
18793 scoring, then you might set this variable to @code{t}.  This will make
18794 Gnus save the scores into the @file{.newsrc.eld} file.
18795
18796 If you do not set this to @code{t}, then manual scores (like those set
18797 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18798 across group visits.
18799
18800 @item gnus-score-interactive-default-score
18801 @vindex gnus-score-interactive-default-score
18802 Score used by all the interactive raise/lower commands to raise/lower
18803 score with.  Default is 1000, which may seem excessive, but this is to
18804 ensure that the adaptive scoring scheme gets enough room to play with.
18805 We don't want the small changes from the adaptive scoring to overwrite
18806 manually entered data.
18807
18808 @item gnus-summary-default-score
18809 @vindex gnus-summary-default-score
18810 Default score of an article, which is 0 by default.
18811
18812 @item gnus-summary-expunge-below
18813 @vindex gnus-summary-expunge-below
18814 Don't display the summary lines of articles that have scores lower than
18815 this variable.  This is @code{nil} by default, which means that no
18816 articles will be hidden.  This variable is local to the summary buffers,
18817 and has to be set from @code{gnus-summary-mode-hook}.
18818
18819 @item gnus-score-over-mark
18820 @vindex gnus-score-over-mark
18821 Mark (in the third column) used for articles with a score over the
18822 default.  Default is @samp{+}.
18823
18824 @item gnus-score-below-mark
18825 @vindex gnus-score-below-mark
18826 Mark (in the third column) used for articles with a score below the
18827 default.  Default is @samp{-}.
18828
18829 @item gnus-score-find-score-files-function
18830 @vindex gnus-score-find-score-files-function
18831 Function used to find score files for the current group.  This function
18832 is called with the name of the group as the argument.
18833
18834 Predefined functions available are:
18835 @table @code
18836
18837 @item gnus-score-find-single
18838 @findex gnus-score-find-single
18839 Only apply the group's own score file.
18840
18841 @item gnus-score-find-bnews
18842 @findex gnus-score-find-bnews
18843 Apply all score files that match, using bnews syntax.  This is the
18844 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18845 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18846 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18847 @samp{all} in the score file names are translated into @samp{.*}, and
18848 then a regexp match is done.
18849
18850 This means that if you have some score entries that you want to apply to
18851 all groups, then you put those entries in the @file{all.SCORE} file.
18852
18853 The score files are applied in a semi-random order, although Gnus will
18854 try to apply the more general score files before the more specific score
18855 files.  It does this by looking at the number of elements in the score
18856 file names---discarding the @samp{all} elements.
18857
18858 @item gnus-score-find-hierarchical
18859 @findex gnus-score-find-hierarchical
18860 Apply all score files from all the parent groups.  This means that you
18861 can't have score files like @file{all.SCORE}, but you can have
18862 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18863 server.
18864
18865 @end table
18866 This variable can also be a list of functions.  In that case, all
18867 these functions will be called with the group name as argument, and
18868 all the returned lists of score files will be applied.  These
18869 functions can also return lists of lists of score alists directly.  In
18870 that case, the functions that return these non-file score alists
18871 should probably be placed before the ``real'' score file functions, to
18872 ensure that the last score file returned is the local score file.
18873 Phu.
18874
18875 For example, to do hierarchical scoring but use a non-server-specific
18876 overall score file, you could use the value
18877 @example
18878 (list (lambda (group) ("all.SCORE"))
18879       'gnus-score-find-hierarchical)
18880 @end example
18881
18882 @item gnus-score-expiry-days
18883 @vindex gnus-score-expiry-days
18884 This variable says how many days should pass before an unused score file
18885 entry is expired.  If this variable is @code{nil}, no score file entries
18886 are expired.  It's 7 by default.
18887
18888 @item gnus-update-score-entry-dates
18889 @vindex gnus-update-score-entry-dates
18890 If this variable is non-@code{nil}, temporary score entries that have
18891 been triggered (matched) will have their dates updated.  (This is how Gnus
18892 controls expiry---all non-matched-entries will become too old while
18893 matched entries will stay fresh and young.)  However, if you set this
18894 variable to @code{nil}, even matched entries will grow old and will
18895 have to face that oh-so grim reaper.
18896
18897 @item gnus-score-after-write-file-function
18898 @vindex gnus-score-after-write-file-function
18899 Function called with the name of the score file just written.
18900
18901 @item gnus-score-thread-simplify
18902 @vindex gnus-score-thread-simplify
18903 If this variable is non-@code{nil}, article subjects will be
18904 simplified for subject scoring purposes in the same manner as with
18905 threading---according to the current value of
18906 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18907 @code{substring} or @code{exact} matching, the match will also be
18908 simplified in this manner.
18909
18910 @end table
18911
18912
18913 @node Score File Format
18914 @section Score File Format
18915 @cindex score file format
18916
18917 A score file is an @code{emacs-lisp} file that normally contains just a
18918 single form.  Casual users are not expected to edit these files;
18919 everything can be changed from the summary buffer.
18920
18921 Anyway, if you'd like to dig into it yourself, here's an example:
18922
18923 @lisp
18924 (("from"
18925   ("Lars Ingebrigtsen" -10000)
18926   ("Per Abrahamsen")
18927   ("larsi\\|lmi" -50000 nil R))
18928  ("subject"
18929   ("Ding is Badd" nil 728373))
18930  ("xref"
18931   ("alt.politics" -1000 728372 s))
18932  ("lines"
18933   (2 -100 nil <))
18934  (mark 0)
18935  (expunge -1000)
18936  (mark-and-expunge -10)
18937  (read-only nil)
18938  (orphan -10)
18939  (adapt t)
18940  (files "/hom/larsi/News/gnu.SCORE")
18941  (exclude-files "all.SCORE")
18942  (local (gnus-newsgroup-auto-expire t)
18943         (gnus-summary-make-false-root empty))
18944  (eval (ding)))
18945 @end lisp
18946
18947 This example demonstrates most score file elements.  @xref{Advanced
18948 Scoring}, for a different approach.
18949
18950 Even though this looks much like Lisp code, nothing here is actually
18951 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18952 has to be valid syntactically, if not semantically.
18953
18954 Six keys are supported by this alist:
18955
18956 @table @code
18957
18958 @item STRING
18959 If the key is a string, it is the name of the header to perform the
18960 match on.  Scoring can only be performed on these eight headers:
18961 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18962 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18963 these headers, there are three strings to tell Gnus to fetch the entire
18964 article and do the match on larger parts of the article: @code{Body}
18965 will perform the match on the body of the article, @code{Head} will
18966 perform the match on the head of the article, and @code{All} will
18967 perform the match on the entire article.  Note that using any of these
18968 last three keys will slow down group entry @emph{considerably}.  The
18969 final ``header'' you can score on is @code{Followup}.  These score
18970 entries will result in new score entries being added for all follow-ups
18971 to articles that matches these score entries.
18972
18973 Following this key is an arbitrary number of score entries, where each
18974 score entry has one to four elements.
18975 @enumerate
18976
18977 @item
18978 The first element is the @dfn{match element}.  On most headers this will
18979 be a string, but on the Lines and Chars headers, this must be an
18980 integer.
18981
18982 @item
18983 If the second element is present, it should be a number---the @dfn{score
18984 element}.  This number should be an integer in the neginf to posinf
18985 interval.  This number is added to the score of the article if the match
18986 is successful.  If this element is not present, the
18987 @code{gnus-score-interactive-default-score} number will be used
18988 instead.  This is 1000 by default.
18989
18990 @item
18991 If the third element is present, it should be a number---the @dfn{date
18992 element}.  This date says when the last time this score entry matched,
18993 which provides a mechanism for expiring the score entries.  It this
18994 element is not present, the score entry is permanent.  The date is
18995 represented by the number of days since December 31, 1 BCE.
18996
18997 @item
18998 If the fourth element is present, it should be a symbol---the @dfn{type
18999 element}.  This element specifies what function should be used to see
19000 whether this score entry matches the article.  What match types that can
19001 be used depends on what header you wish to perform the match on.
19002 @table @dfn
19003
19004 @item From, Subject, References, Xref, Message-ID
19005 For most header types, there are the @code{r} and @code{R} (regexp), as
19006 well as @code{s} and @code{S} (substring) types, and @code{e} and
19007 @code{E} (exact match), and @code{w} (word match) types.  If this
19008 element is not present, Gnus will assume that substring matching should
19009 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19010 that the matches will be done in a case-sensitive manner.  All these
19011 one-letter types are really just abbreviations for the @code{regexp},
19012 @code{string}, @code{exact}, and @code{word} types, which you can use
19013 instead, if you feel like.
19014
19015 @item Extra
19016 Just as for the standard string overview headers, if you are using
19017 gnus-extra-headers, you can score on these headers' values.  In this
19018 case, there is a 5th element in the score entry, being the name of the
19019 header to be scored.  The following entry is useful in your
19020 @file{all.SCORE} file in case of spam attacks from a single origin host,
19021 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
19022
19023 @lisp
19024 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
19025 @end lisp
19026
19027 @item Lines, Chars
19028 These two headers use different match types: @code{<}, @code{>},
19029 @code{=}, @code{>=} and @code{<=}.
19030
19031 These predicates are true if
19032
19033 @example
19034 (PREDICATE HEADER MATCH)
19035 @end example
19036
19037 evaluates to non-@code{nil}.  For instance, the advanced match
19038 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19039 following form:
19040
19041 @lisp
19042 (< header-value 4)
19043 @end lisp
19044
19045 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19046 the match, we get the score added if the article has less than 4 lines.
19047 (It's easy to get confused and think it's the other way around.  But
19048 it's not.  I think.)
19049
19050 When matching on @code{Lines}, be careful because some back ends (like
19051 @code{nndir}) do not generate @code{Lines} header, so every article ends
19052 up being marked as having 0 lines.  This can lead to strange results if
19053 you happen to lower score of the articles with few lines.
19054
19055 @item Date
19056 For the Date header we have three kinda silly match types:
19057 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19058 ever being useful, but, like, it would feel kinda silly not to provide
19059 this function.  Just in case.  You never know.  Better safe than sorry.
19060 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19061 sex on a first date.  (I have been told that at least one person, and I
19062 quote, ``found this function indispensable'', however.)
19063
19064 @cindex ISO8601
19065 @cindex date
19066 A more useful match type is @code{regexp}.  With it, you can match the
19067 date string using a regular expression.  The date is normalized to
19068 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19069 you want to match all articles that have been posted on April 1st in
19070 every year, you could use @samp{....0401.........} as a match string,
19071 for instance.  (Note that the date is kept in its original time zone, so
19072 this will match articles that were posted when it was April 1st where
19073 the article was posted from.  Time zones are such wholesome fun for the
19074 whole family, eh?)
19075
19076 @item Head, Body, All
19077 These three match keys use the same match types as the @code{From} (etc)
19078 header uses.
19079
19080 @item Followup
19081 This match key is somewhat special, in that it will match the
19082 @code{From} header, and affect the score of not only the matching
19083 articles, but also all followups to the matching articles.  This allows
19084 you e.g. increase the score of followups to your own articles, or
19085 decrease the score of followups to the articles of some known
19086 trouble-maker.  Uses the same match types as the @code{From} header
19087 uses.  (Using this match key will lead to creation of @file{ADAPT}
19088 files.)
19089
19090 @item Thread
19091 This match key works along the same lines as the @code{Followup} match
19092 key.  If you say that you want to score on a (sub-)thread started by an
19093 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19094 match.  This will add a new @samp{thread} match for each article that
19095 has @var{x} in its @code{References} header.  (These new @samp{thread}
19096 matches will use the @code{Message-ID}s of these matching articles.)
19097 This will ensure that you can raise/lower the score of an entire thread,
19098 even though some articles in the thread may not have complete
19099 @code{References} headers.  Note that using this may lead to
19100 undeterministic scores of the articles in the thread.  (Using this match
19101 key will lead to creation of @file{ADAPT} files.)
19102 @end table
19103 @end enumerate
19104
19105 @cindex score file atoms
19106 @item mark
19107 The value of this entry should be a number.  Any articles with a score
19108 lower than this number will be marked as read.
19109
19110 @item expunge
19111 The value of this entry should be a number.  Any articles with a score
19112 lower than this number will be removed from the summary buffer.
19113
19114 @item mark-and-expunge
19115 The value of this entry should be a number.  Any articles with a score
19116 lower than this number will be marked as read and removed from the
19117 summary buffer.
19118
19119 @item thread-mark-and-expunge
19120 The value of this entry should be a number.  All articles that belong to
19121 a thread that has a total score below this number will be marked as read
19122 and removed from the summary buffer.  @code{gnus-thread-score-function}
19123 says how to compute the total score for a thread.
19124
19125 @item files
19126 The value of this entry should be any number of file names.  These files
19127 are assumed to be score files as well, and will be loaded the same way
19128 this one was.
19129
19130 @item exclude-files
19131 The clue of this entry should be any number of files.  These files will
19132 not be loaded, even though they would normally be so, for some reason or
19133 other.
19134
19135 @item eval
19136 The value of this entry will be @code{eval}el.  This element will be
19137 ignored when handling global score files.
19138
19139 @item read-only
19140 Read-only score files will not be updated or saved.  Global score files
19141 should feature this atom (@pxref{Global Score Files}).  (Note:
19142 @dfn{Global} here really means @dfn{global}; not your personal
19143 apply-to-all-groups score files.)
19144
19145 @item orphan
19146 The value of this entry should be a number.  Articles that do not have
19147 parents will get this number added to their scores.  Imagine you follow
19148 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19149 will only follow a few of the threads, also want to see any new threads.
19150
19151 You can do this with the following two score file entries:
19152
19153 @example
19154         (orphan -500)
19155         (mark-and-expunge -100)
19156 @end example
19157
19158 When you enter the group the first time, you will only see the new
19159 threads.  You then raise the score of the threads that you find
19160 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19161 rest.  Next time you enter the group, you will see new articles in the
19162 interesting threads, plus any new threads.
19163
19164 I.e.---the orphan score atom is for high-volume groups where a few
19165 interesting threads which can't be found automatically by ordinary
19166 scoring rules exist.
19167
19168 @item adapt
19169 This entry controls the adaptive scoring.  If it is @code{t}, the
19170 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19171 adaptive scoring will be performed on this group.  If it is a list, this
19172 list will be used as the adaptive scoring rules.  If it isn't present,
19173 or is something other than @code{t} or @code{ignore}, the default
19174 adaptive scoring rules will be used.  If you want to use adaptive
19175 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19176 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19177 not want adaptive scoring.  If you only want adaptive scoring in a few
19178 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19179 insert @code{(adapt t)} in the score files of the groups where you want
19180 it.
19181
19182 @item adapt-file
19183 All adaptive score entries will go to the file named by this entry.  It
19184 will also be applied when entering the group.  This atom might be handy
19185 if you want to adapt on several groups at once, using the same adaptive
19186 file for a number of groups.
19187
19188 @item local
19189 @cindex local variables
19190 The value of this entry should be a list of @code{(@var{var}
19191 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19192 current summary buffer, and set to the value specified.  This is a
19193 convenient, if somewhat strange, way of setting variables in some
19194 groups if you don't like hooks much.  Note that the @var{value} won't
19195 be evaluated.
19196 @end table
19197
19198
19199 @node Score File Editing
19200 @section Score File Editing
19201
19202 You normally enter all scoring commands from the summary buffer, but you
19203 might feel the urge to edit them by hand as well, so we've supplied you
19204 with a mode for that.
19205
19206 It's simply a slightly customized @code{emacs-lisp} mode, with these
19207 additional commands:
19208
19209 @table @kbd
19210
19211 @item C-c C-c
19212 @kindex C-c C-c (Score)
19213 @findex gnus-score-edit-done
19214 Save the changes you have made and return to the summary buffer
19215 (@code{gnus-score-edit-done}).
19216
19217 @item C-c C-d
19218 @kindex C-c C-d (Score)
19219 @findex gnus-score-edit-insert-date
19220 Insert the current date in numerical format
19221 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19222 you were wondering.
19223
19224 @item C-c C-p
19225 @kindex C-c C-p (Score)
19226 @findex gnus-score-pretty-print
19227 The adaptive score files are saved in an unformatted fashion.  If you
19228 intend to read one of these files, you want to @dfn{pretty print} it
19229 first.  This command (@code{gnus-score-pretty-print}) does that for
19230 you.
19231
19232 @end table
19233
19234 Type @kbd{M-x gnus-score-mode} to use this mode.
19235
19236 @vindex gnus-score-mode-hook
19237 @code{gnus-score-menu-hook} is run in score mode buffers.
19238
19239 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19240 e} to begin editing score files.
19241
19242
19243 @node Adaptive Scoring
19244 @section Adaptive Scoring
19245 @cindex adaptive scoring
19246
19247 If all this scoring is getting you down, Gnus has a way of making it all
19248 happen automatically---as if by magic.  Or rather, as if by artificial
19249 stupidity, to be precise.
19250
19251 @vindex gnus-use-adaptive-scoring
19252 When you read an article, or mark an article as read, or kill an
19253 article, you leave marks behind.  On exit from the group, Gnus can sniff
19254 these marks and add score elements depending on what marks it finds.
19255 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19256 @code{t} or @code{(line)}.  If you want score adaptively on separate
19257 words appearing in the subjects, you should set this variable to
19258 @code{(word)}.  If you want to use both adaptive methods, set this
19259 variable to @code{(word line)}.
19260
19261 @vindex gnus-default-adaptive-score-alist
19262 To give you complete control over the scoring process, you can customize
19263 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19264 might look something like this:
19265
19266 @lisp
19267 (setq gnus-default-adaptive-score-alist
19268   '((gnus-unread-mark)
19269     (gnus-ticked-mark (from 4))
19270     (gnus-dormant-mark (from 5))
19271     (gnus-del-mark (from -4) (subject -1))
19272     (gnus-read-mark (from 4) (subject 2))
19273     (gnus-expirable-mark (from -1) (subject -1))
19274     (gnus-killed-mark (from -1) (subject -3))
19275     (gnus-kill-file-mark)
19276     (gnus-ancient-mark)
19277     (gnus-low-score-mark)
19278     (gnus-catchup-mark (from -1) (subject -1))))
19279 @end lisp
19280
19281 As you see, each element in this alist has a mark as a key (either a
19282 variable name or a ``real'' mark---a character).  Following this key is
19283 a arbitrary number of header/score pairs.  If there are no header/score
19284 pairs following the key, no adaptive scoring will be done on articles
19285 that have that key as the article mark.  For instance, articles with
19286 @code{gnus-unread-mark} in the example above will not get adaptive score
19287 entries.
19288
19289 Each article can have only one mark, so just a single of these rules
19290 will be applied to each article.
19291
19292 To take @code{gnus-del-mark} as an example---this alist says that all
19293 articles that have that mark (i.e., are marked with @samp{e}) will have a
19294 score entry added to lower based on the @code{From} header by -4, and
19295 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19296
19297 If you have marked 10 articles with the same subject with
19298 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19299 That means that that subject will get a score of ten times -1, which
19300 should be, unless I'm much mistaken, -10.
19301
19302 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19303 the read articles will be marked with the @samp{E} mark.  This'll
19304 probably make adaptive scoring slightly impossible, so auto-expiring and
19305 adaptive scoring doesn't really mix very well.
19306
19307 The headers you can score on are @code{from}, @code{subject},
19308 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19309 @code{chars} and @code{date}.  In addition, you can score on
19310 @code{followup}, which will create an adaptive score entry that matches
19311 on the @code{References} header using the @code{Message-ID} of the
19312 current article, thereby matching the following thread.
19313
19314 If you use this scheme, you should set the score file atom @code{mark}
19315 to something small---like -300, perhaps, to avoid having small random
19316 changes result in articles getting marked as read.
19317
19318 After using adaptive scoring for a week or so, Gnus should start to
19319 become properly trained and enhance the authors you like best, and kill
19320 the authors you like least, without you having to say so explicitly.
19321
19322 You can control what groups the adaptive scoring is to be performed on
19323 by using the score files (@pxref{Score File Format}).  This will also
19324 let you use different rules in different groups.
19325
19326 @vindex gnus-adaptive-file-suffix
19327 The adaptive score entries will be put into a file where the name is the
19328 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19329 is @file{ADAPT}.
19330
19331 @vindex gnus-score-exact-adapt-limit
19332 When doing adaptive scoring, substring or fuzzy matching would probably
19333 give you the best results in most cases.  However, if the header one
19334 matches is short, the possibility for false positives is great, so if
19335 the length of the match is less than
19336 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19337 this variable is @code{nil}, exact matching will always be used to avoid
19338 this problem.
19339
19340 @vindex gnus-default-adaptive-word-score-alist
19341 As mentioned above, you can adapt either on individual words or entire
19342 headers.  If you adapt on words, the
19343 @code{gnus-default-adaptive-word-score-alist} variable says what score
19344 each instance of a word should add given a mark.
19345
19346 @lisp
19347 (setq gnus-default-adaptive-word-score-alist
19348       `((,gnus-read-mark . 30)
19349         (,gnus-catchup-mark . -10)
19350         (,gnus-killed-mark . -20)
19351         (,gnus-del-mark . -15)))
19352 @end lisp
19353
19354 This is the default value.  If you have adaption on words enabled, every
19355 word that appears in subjects of articles marked with
19356 @code{gnus-read-mark} will result in a score rule that increase the
19357 score with 30 points.
19358
19359 @vindex gnus-default-ignored-adaptive-words
19360 @vindex gnus-ignored-adaptive-words
19361 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19362 will be ignored.  If you wish to add more words to be ignored, use the
19363 @code{gnus-ignored-adaptive-words} list instead.
19364
19365 @vindex gnus-adaptive-word-length-limit
19366 Some may feel that short words shouldn't count when doing adaptive
19367 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19368 an integer.  Words shorter than this number will be ignored.  This
19369 variable defaults to @code{nil}.
19370
19371 @vindex gnus-adaptive-word-syntax-table
19372 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19373 syntax table in effect.  It is similar to the standard syntax table, but
19374 it considers numbers to be non-word-constituent characters.
19375
19376 @vindex gnus-adaptive-word-minimum
19377 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19378 word scoring process will never bring down the score of an article to
19379 below this number.  The default is @code{nil}.
19380
19381 @vindex gnus-adaptive-word-no-group-words
19382 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19383 won't adaptively word score any of the words in the group name.  Useful
19384 for groups like @samp{comp.editors.emacs}, where most of the subject
19385 lines contain the word @samp{emacs}.
19386
19387 After using this scheme for a while, it might be nice to write a
19388 @code{gnus-psychoanalyze-user} command to go through the rules and see
19389 what words you like and what words you don't like.  Or perhaps not.
19390
19391 Note that the adaptive word scoring thing is highly experimental and is
19392 likely to change in the future.  Initial impressions seem to indicate
19393 that it's totally useless as it stands.  Some more work (involving more
19394 rigorous statistical methods) will have to be done to make this useful.
19395
19396
19397 @node Home Score File
19398 @section Home Score File
19399
19400 The score file where new score file entries will go is called the
19401 @dfn{home score file}.  This is normally (and by default) the score file
19402 for the group itself.  For instance, the home score file for
19403 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19404
19405 However, this may not be what you want.  It is often convenient to share
19406 a common home score file among many groups---all @samp{emacs} groups
19407 could perhaps use the same home score file.
19408
19409 @vindex gnus-home-score-file
19410 The variable that controls this is @code{gnus-home-score-file}.  It can
19411 be:
19412
19413 @enumerate
19414 @item
19415 A string.  Then this file will be used as the home score file for all
19416 groups.
19417
19418 @item
19419 A function.  The result of this function will be used as the home score
19420 file.  The function will be called with the name of the group as the
19421 parameter.
19422
19423 @item
19424 A list.  The elements in this list can be:
19425
19426 @enumerate
19427 @item
19428 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19429 group name, the @var{file-name} will be used as the home score file.
19430
19431 @item
19432 A function.  If the function returns non-@code{nil}, the result will
19433 be used as the home score file.
19434
19435 @item
19436 A string.  Use the string as the home score file.
19437 @end enumerate
19438
19439 The list will be traversed from the beginning towards the end looking
19440 for matches.
19441
19442 @end enumerate
19443
19444 So, if you want to use just a single score file, you could say:
19445
19446 @lisp
19447 (setq gnus-home-score-file
19448       "my-total-score-file.SCORE")
19449 @end lisp
19450
19451 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19452 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19453
19454 @findex gnus-hierarchial-home-score-file
19455 @lisp
19456 (setq gnus-home-score-file
19457       'gnus-hierarchial-home-score-file)
19458 @end lisp
19459
19460 This is a ready-made function provided for your convenience.
19461 Other functions include
19462
19463 @table @code
19464 @item gnus-current-home-score-file
19465 @findex gnus-current-home-score-file
19466 Return the ``current'' regular score file.  This will make scoring
19467 commands add entry to the ``innermost'' matching score file.
19468
19469 @end table
19470
19471 If you want to have one score file for the @samp{emacs} groups and
19472 another for the @samp{comp} groups, while letting all other groups use
19473 their own home score files:
19474
19475 @lisp
19476 (setq gnus-home-score-file
19477       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19478       '(("\\.emacs" "emacs.SCORE")
19479         ;; @r{All the comp groups in one score file}
19480         ("^comp" "comp.SCORE")))
19481 @end lisp
19482
19483 @vindex gnus-home-adapt-file
19484 @code{gnus-home-adapt-file} works exactly the same way as
19485 @code{gnus-home-score-file}, but says what the home adaptive score file
19486 is instead.  All new adaptive file entries will go into the file
19487 specified by this variable, and the same syntax is allowed.
19488
19489 In addition to using @code{gnus-home-score-file} and
19490 @code{gnus-home-adapt-file}, you can also use group parameters
19491 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19492 Parameters}) to achieve much the same.  Group and topic parameters take
19493 precedence over this variable.
19494
19495
19496 @node Followups To Yourself
19497 @section Followups To Yourself
19498
19499 Gnus offers two commands for picking out the @code{Message-ID} header in
19500 the current buffer.  Gnus will then add a score rule that scores using
19501 this @code{Message-ID} on the @code{References} header of other
19502 articles.  This will, in effect, increase the score of all articles that
19503 respond to the article in the current buffer.  Quite useful if you want
19504 to easily note when people answer what you've said.
19505
19506 @table @code
19507
19508 @item gnus-score-followup-article
19509 @findex gnus-score-followup-article
19510 This will add a score to articles that directly follow up your own
19511 article.
19512
19513 @item gnus-score-followup-thread
19514 @findex gnus-score-followup-thread
19515 This will add a score to all articles that appear in a thread ``below''
19516 your own article.
19517 @end table
19518
19519 @vindex message-sent-hook
19520 These two functions are both primarily meant to be used in hooks like
19521 @code{message-sent-hook}, like this:
19522 @lisp
19523 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19524 @end lisp
19525
19526
19527 If you look closely at your own @code{Message-ID}, you'll notice that
19528 the first two or three characters are always the same.  Here's two of
19529 mine:
19530
19531 @example
19532 <x6u3u47icf.fsf@@eyesore.no>
19533 <x6sp9o7ibw.fsf@@eyesore.no>
19534 @end example
19535
19536 So ``my'' ident on this machine is @samp{x6}.  This can be
19537 exploited---the following rule will raise the score on all followups to
19538 myself:
19539
19540 @lisp
19541 ("references"
19542  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19543   1000 nil r))
19544 @end lisp
19545
19546 Whether it's the first two or first three characters that are ``yours''
19547 is system-dependent.
19548
19549
19550 @node Scoring On Other Headers
19551 @section Scoring On Other Headers
19552 @cindex scoring on other headers
19553
19554 Gnus is quite fast when scoring the ``traditional''
19555 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19556 other headers requires writing a @code{head} scoring rule, which means
19557 that Gnus has to request every single article from the back end to find
19558 matches.  This takes a long time in big groups.
19559
19560 Now, there's not much you can do about this for news groups, but for
19561 mail groups, you have greater control.  In @ref{To From Newsgroups},
19562 it's explained in greater detail what this mechanism does, but here's
19563 a cookbook example for @code{nnml} on how to allow scoring on the
19564 @samp{To} and @samp{Cc} headers.
19565
19566 Put the following in your @file{~/.gnus.el} file.
19567
19568 @lisp
19569 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19570       nnmail-extra-headers gnus-extra-headers)
19571 @end lisp
19572
19573 Restart Gnus and rebuild your @code{nnml} overview files with the
19574 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19575 time if you have much mail.
19576
19577 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19578 so: @kbd{I e s p To RET <your name> RET}.
19579
19580 See?  Simple.
19581
19582
19583 @node Scoring Tips
19584 @section Scoring Tips
19585 @cindex scoring tips
19586
19587 @table @dfn
19588
19589 @item Crossposts
19590 @cindex crossposts
19591 @cindex scoring crossposts
19592 If you want to lower the score of crossposts, the line to match on is
19593 the @code{Xref} header.
19594 @lisp
19595 ("xref" (" talk.politics.misc:" -1000))
19596 @end lisp
19597
19598 @item Multiple crossposts
19599 If you want to lower the score of articles that have been crossposted to
19600 more than, say, 3 groups:
19601 @lisp
19602 ("xref"
19603   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19604    -1000 nil r))
19605 @end lisp
19606
19607 @item Matching on the body
19608 This is generally not a very good idea---it takes a very long time.
19609 Gnus actually has to fetch each individual article from the server.  But
19610 you might want to anyway, I guess.  Even though there are three match
19611 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19612 and stick with it in each score file.  If you use any two, each article
19613 will be fetched @emph{twice}.  If you want to match a bit on the
19614 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19615 the matches.
19616
19617 @item Marking as read
19618 You will probably want to mark articles that have scores below a certain
19619 number as read.  This is most easily achieved by putting the following
19620 in your @file{all.SCORE} file:
19621 @lisp
19622 ((mark -100))
19623 @end lisp
19624 You may also consider doing something similar with @code{expunge}.
19625
19626 @item Negated character classes
19627 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19628 That will match newlines, which might lead to, well, The Unknown.  Say
19629 @code{[^abcd\n]*} instead.
19630 @end table
19631
19632
19633 @node Reverse Scoring
19634 @section Reverse Scoring
19635 @cindex reverse scoring
19636
19637 If you want to keep just articles that have @samp{Sex with Emacs} in the
19638 subject header, and expunge all other articles, you could put something
19639 like this in your score file:
19640
19641 @lisp
19642 (("subject"
19643   ("Sex with Emacs" 2))
19644  (mark 1)
19645  (expunge 1))
19646 @end lisp
19647
19648 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19649 rest as read, and expunge them to boot.
19650
19651
19652 @node Global Score Files
19653 @section Global Score Files
19654 @cindex global score files
19655
19656 Sure, other newsreaders have ``global kill files''.  These are usually
19657 nothing more than a single kill file that applies to all groups, stored
19658 in the user's home directory.  Bah!  Puny, weak newsreaders!
19659
19660 What I'm talking about here are Global Score Files.  Score files from
19661 all over the world, from users everywhere, uniting all nations in one
19662 big, happy score file union!  Ange-score!  New and untested!
19663
19664 @vindex gnus-global-score-files
19665 All you have to do to use other people's score files is to set the
19666 @code{gnus-global-score-files} variable.  One entry for each score file,
19667 or each score file directory.  Gnus will decide by itself what score
19668 files are applicable to which group.
19669
19670 To use the score file
19671 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19672 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19673 say this:
19674
19675 @lisp
19676 (setq gnus-global-score-files
19677       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19678         "/ftp@@ftp.some-where:/pub/score/"))
19679 @end lisp
19680
19681 @findex gnus-score-search-global-directories
19682 @noindent
19683 Simple, eh?  Directory names must end with a @samp{/}.  These
19684 directories are typically scanned only once during each Gnus session.
19685 If you feel the need to manually re-scan the remote directories, you can
19686 use the @code{gnus-score-search-global-directories} command.
19687
19688 Note that, at present, using this option will slow down group entry
19689 somewhat.  (That is---a lot.)
19690
19691 If you want to start maintaining score files for other people to use,
19692 just put your score file up for anonymous ftp and announce it to the
19693 world.  Become a retro-moderator!  Participate in the retro-moderator
19694 wars sure to ensue, where retro-moderators battle it out for the
19695 sympathy of the people, luring them to use their score files on false
19696 premises!  Yay!  The net is saved!
19697
19698 Here are some tips for the would-be retro-moderator, off the top of my
19699 head:
19700
19701 @itemize @bullet
19702
19703 @item
19704 Articles heavily crossposted are probably junk.
19705 @item
19706 To lower a single inappropriate article, lower by @code{Message-ID}.
19707 @item
19708 Particularly brilliant authors can be raised on a permanent basis.
19709 @item
19710 Authors that repeatedly post off-charter for the group can safely be
19711 lowered out of existence.
19712 @item
19713 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19714 articles completely.
19715
19716 @item
19717 Use expiring score entries to keep the size of the file down.  You
19718 should probably have a long expiry period, though, as some sites keep
19719 old articles for a long time.
19720 @end itemize
19721
19722 @dots{} I wonder whether other newsreaders will support global score files
19723 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19724 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19725 holding our breath yet?
19726
19727
19728 @node Kill Files
19729 @section Kill Files
19730 @cindex kill files
19731
19732 Gnus still supports those pesky old kill files.  In fact, the kill file
19733 entries can now be expiring, which is something I wrote before Daniel
19734 Quinlan thought of doing score files, so I've left the code in there.
19735
19736 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19737 than score processing, so it might be a good idea to rewrite your kill
19738 files into score files.
19739
19740 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19741 forms into this file, which means that you can use kill files as some
19742 sort of primitive hook function to be run on group entry, even though
19743 that isn't a very good idea.
19744
19745 Normal kill files look like this:
19746
19747 @lisp
19748 (gnus-kill "From" "Lars Ingebrigtsen")
19749 (gnus-kill "Subject" "ding")
19750 (gnus-expunge "X")
19751 @end lisp
19752
19753 This will mark every article written by me as read, and remove the
19754 marked articles from the summary buffer.  Very useful, you'll agree.
19755
19756 Other programs use a totally different kill file syntax.  If Gnus
19757 encounters what looks like a @code{rn} kill file, it will take a stab at
19758 interpreting it.
19759
19760 Two summary functions for editing a @sc{gnus} kill file:
19761
19762 @table @kbd
19763
19764 @item M-k
19765 @kindex M-k (Summary)
19766 @findex gnus-summary-edit-local-kill
19767 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19768
19769 @item M-K
19770 @kindex M-K (Summary)
19771 @findex gnus-summary-edit-global-kill
19772 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19773 @end table
19774
19775 Two group mode functions for editing the kill files:
19776
19777 @table @kbd
19778
19779 @item M-k
19780 @kindex M-k (Group)
19781 @findex gnus-group-edit-local-kill
19782 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19783
19784 @item M-K
19785 @kindex M-K (Group)
19786 @findex gnus-group-edit-global-kill
19787 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19788 @end table
19789
19790 Kill file variables:
19791
19792 @table @code
19793 @item gnus-kill-file-name
19794 @vindex gnus-kill-file-name
19795 A kill file for the group @samp{soc.motss} is normally called
19796 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19797 this file name is detailed by the @code{gnus-kill-file-name} variable.
19798 The ``global'' kill file (not in the score file sense of ``global'', of
19799 course) is just called @file{KILL}.
19800
19801 @vindex gnus-kill-save-kill-file
19802 @item gnus-kill-save-kill-file
19803 If this variable is non-@code{nil}, Gnus will save the
19804 kill file after processing, which is necessary if you use expiring
19805 kills.
19806
19807 @item gnus-apply-kill-hook
19808 @vindex gnus-apply-kill-hook
19809 @findex gnus-apply-kill-file-unless-scored
19810 @findex gnus-apply-kill-file
19811 A hook called to apply kill files to a group.  It is
19812 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19813 kill file if you have a score file for the same group, you can set this
19814 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19815 kill files to be processed, you should set this variable to @code{nil}.
19816
19817 @item gnus-kill-file-mode-hook
19818 @vindex gnus-kill-file-mode-hook
19819 A hook called in kill-file mode buffers.
19820
19821 @end table
19822
19823
19824 @node Converting Kill Files
19825 @section Converting Kill Files
19826 @cindex kill files
19827 @cindex converting kill files
19828
19829 If you have loads of old kill files, you may want to convert them into
19830 score files.  If they are ``regular'', you can use
19831 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19832 by hand.
19833
19834 The kill to score conversion package isn't included in Gnus by default.
19835 You can fetch it from
19836 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19837
19838 If your old kill files are very complex---if they contain more
19839 non-@code{gnus-kill} forms than not, you'll have to convert them by
19840 hand.  Or just let them be as they are.  Gnus will still use them as
19841 before.
19842
19843
19844 @node GroupLens
19845 @section GroupLens
19846 @cindex GroupLens
19847
19848 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19849 collaborative filtering system that helps you work together with other
19850 people to find the quality news articles out of the huge volume of
19851 news articles generated every day.
19852
19853 To accomplish this the GroupLens system combines your opinions about
19854 articles you have already read with the opinions of others who have done
19855 likewise and gives you a personalized prediction for each unread news
19856 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19857 rate articles, and finds other people that rate articles the same way.
19858 Once it has found some people you agree with it tells you, in the form
19859 of a prediction, what they thought of the article.  You can use this
19860 prediction to help you decide whether or not you want to read the
19861 article.
19862
19863 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19864 so this section is mostly of historical interest.
19865
19866 @menu
19867 * Using GroupLens::             How to make Gnus use GroupLens.
19868 * Rating Articles::             Letting GroupLens know how you rate articles.
19869 * Displaying Predictions::      Displaying predictions given by GroupLens.
19870 * GroupLens Variables::         Customizing GroupLens.
19871 @end menu
19872
19873
19874 @node Using GroupLens
19875 @subsection Using GroupLens
19876
19877 To use GroupLens you must register a pseudonym with your local
19878 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19879 Bureau (BBB)} is the only better bit in town at the moment.
19880
19881 Once you have registered you'll need to set a couple of variables.
19882
19883 @table @code
19884
19885 @item gnus-use-grouplens
19886 @vindex gnus-use-grouplens
19887 Setting this variable to a non-@code{nil} value will make Gnus hook into
19888 all the relevant GroupLens functions.
19889
19890 @item grouplens-pseudonym
19891 @vindex grouplens-pseudonym
19892 This variable should be set to the pseudonym you got when registering
19893 with the Better Bit Bureau.
19894
19895 @item grouplens-newsgroups
19896 @vindex grouplens-newsgroups
19897 A list of groups that you want to get GroupLens predictions for.
19898
19899 @end table
19900
19901 That's the minimum of what you need to get up and running with GroupLens.
19902 Once you've registered, GroupLens will start giving you scores for
19903 articles based on the average of what other people think.  But, to get
19904 the real benefit of GroupLens you need to start rating articles
19905 yourself.  Then the scores GroupLens gives you will be personalized for
19906 you, based on how the people you usually agree with have already rated.
19907
19908
19909 @node Rating Articles
19910 @subsection Rating Articles
19911
19912 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19913 Where 1 means something like this article is a waste of bandwidth and 5
19914 means that the article was really good.  The basic question to ask
19915 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19916 like this one?''
19917
19918 There are four ways to enter a rating for an article in GroupLens.
19919
19920 @table @kbd
19921
19922 @item r
19923 @kindex r (GroupLens)
19924 @findex bbb-summary-rate-article
19925 This function will prompt you for a rating on a scale of one to five.
19926
19927 @item k
19928 @kindex k (GroupLens)
19929 @findex grouplens-score-thread
19930 This function will prompt you for a rating, and rate all the articles in
19931 the thread.  This is really useful for some of those long running giant
19932 threads in rec.humor.
19933
19934 @end table
19935
19936 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19937 the score of the article you're reading.
19938
19939 @table @kbd
19940
19941 @item 1-5 n
19942 @kindex n (GroupLens)
19943 @findex grouplens-next-unread-article
19944 Rate the article and go to the next unread article.
19945
19946 @item 1-5 ,
19947 @kindex , (GroupLens)
19948 @findex grouplens-best-unread-article
19949 Rate the article and go to the next unread article with the highest score.
19950
19951 @end table
19952
19953 If you want to give the current article a score of 4 and then go to the
19954 next article, just type @kbd{4 n}.
19955
19956
19957 @node Displaying Predictions
19958 @subsection Displaying Predictions
19959
19960 GroupLens makes a prediction for you about how much you will like a
19961 news article.  The predictions from GroupLens are on a scale from 1 to
19962 5, where 1 is the worst and 5 is the best.  You can use the predictions
19963 from GroupLens in one of three ways controlled by the variable
19964 @code{gnus-grouplens-override-scoring}.
19965
19966 @vindex gnus-grouplens-override-scoring
19967 There are three ways to display predictions in grouplens.  You may
19968 choose to have the GroupLens scores contribute to, or override the
19969 regular gnus scoring mechanism.  override is the default; however, some
19970 people prefer to see the Gnus scores plus the grouplens scores.  To get
19971 the separate scoring behavior you need to set
19972 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19973 GroupLens predictions combined with the grouplens scores set it to
19974 @code{'override} and to combine the scores set
19975 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19976 the combine option you will also want to set the values for
19977 @code{grouplens-prediction-offset} and
19978 @code{grouplens-score-scale-factor}.
19979
19980 @vindex grouplens-prediction-display
19981 In either case, GroupLens gives you a few choices for how you would like
19982 to see your predictions displayed.  The display of predictions is
19983 controlled by the @code{grouplens-prediction-display} variable.
19984
19985 The following are valid values for that variable.
19986
19987 @table @code
19988 @item prediction-spot
19989 The higher the prediction, the further to the right an @samp{*} is
19990 displayed.
19991
19992 @item confidence-interval
19993 A numeric confidence interval.
19994
19995 @item prediction-bar
19996 The higher the prediction, the longer the bar.
19997
19998 @item confidence-bar
19999 Numerical confidence.
20000
20001 @item confidence-spot
20002 The spot gets bigger with more confidence.
20003
20004 @item prediction-num
20005 Plain-old numeric value.
20006
20007 @item confidence-plus-minus
20008 Prediction +/- confidence.
20009
20010 @end table
20011
20012
20013 @node GroupLens Variables
20014 @subsection GroupLens Variables
20015
20016 @table @code
20017
20018 @item gnus-summary-grouplens-line-format
20019 The summary line format used in GroupLens-enhanced summary buffers.  It
20020 accepts the same specs as the normal summary line format (@pxref{Summary
20021 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20022 %s\n}.
20023
20024 @item grouplens-bbb-host
20025 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20026 default.
20027
20028 @item grouplens-bbb-port
20029 Port of the host running the bbbd server.  The default is 9000.
20030
20031 @item grouplens-score-offset
20032 Offset the prediction by this value.  In other words, subtract the
20033 prediction value by this number to arrive at the effective score.  The
20034 default is 0.
20035
20036 @item grouplens-score-scale-factor
20037 This variable allows the user to magnify the effect of GroupLens scores.
20038 The scale factor is applied after the offset.  The default is 1.
20039
20040 @end table
20041
20042
20043 @node Advanced Scoring
20044 @section Advanced Scoring
20045
20046 Scoring on Subjects and From headers is nice enough, but what if you're
20047 really interested in what a person has to say only when she's talking
20048 about a particular subject?  Or what if you really don't want to
20049 read what person A has to say when she's following up to person B, but
20050 want to read what she says when she's following up to person C?
20051
20052 By using advanced scoring rules you may create arbitrarily complex
20053 scoring patterns.
20054
20055 @menu
20056 * Advanced Scoring Syntax::     A definition.
20057 * Advanced Scoring Examples::   What they look like.
20058 * Advanced Scoring Tips::       Getting the most out of it.
20059 @end menu
20060
20061
20062 @node Advanced Scoring Syntax
20063 @subsection Advanced Scoring Syntax
20064
20065 Ordinary scoring rules have a string as the first element in the rule.
20066 Advanced scoring rules have a list as the first element.  The second
20067 element is the score to be applied if the first element evaluated to a
20068 non-@code{nil} value.
20069
20070 These lists may consist of three logical operators, one redirection
20071 operator, and various match operators.
20072
20073 Logical operators:
20074
20075 @table @code
20076 @item &
20077 @itemx and
20078 This logical operator will evaluate each of its arguments until it finds
20079 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20080 evaluate to @code{true} values, then this operator will return
20081 @code{true}.
20082
20083 @item |
20084 @itemx or
20085 This logical operator will evaluate each of its arguments until it finds
20086 one that evaluates to @code{true}.  If no arguments are @code{true},
20087 then this operator will return @code{false}.
20088
20089 @item !
20090 @itemx not
20091 @itemx Â¬
20092 This logical operator only takes a single argument.  It returns the
20093 logical negation of the value of its argument.
20094
20095 @end table
20096
20097 There is an @dfn{indirection operator} that will make its arguments
20098 apply to the ancestors of the current article being scored.  For
20099 instance, @code{1-} will make score rules apply to the parent of the
20100 current article.  @code{2-} will make score rules apply to the
20101 grandparent of the current article.  Alternatively, you can write
20102 @code{^^}, where the number of @code{^}s (carets) says how far back into
20103 the ancestry you want to go.
20104
20105 Finally, we have the match operators.  These are the ones that do the
20106 real work.  Match operators are header name strings followed by a match
20107 and a match type.  A typical match operator looks like @samp{("from"
20108 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20109 simple scoring, and the match types are also the same.
20110
20111
20112 @node Advanced Scoring Examples
20113 @subsection Advanced Scoring Examples
20114
20115 Please note that the following examples are score file rules.  To
20116 make a complete score file from them, surround them with another pair
20117 of parentheses.
20118
20119 Let's say you want to increase the score of articles written by Lars
20120 when he's talking about Gnus:
20121
20122 @example
20123 @group
20124 ((&
20125   ("from" "Lars Ingebrigtsen")
20126   ("subject" "Gnus"))
20127  1000)
20128 @end group
20129 @end example
20130
20131 Quite simple, huh?
20132
20133 When he writes long articles, he sometimes has something nice to say:
20134
20135 @example
20136 ((&
20137   ("from" "Lars Ingebrigtsen")
20138   (|
20139    ("subject" "Gnus")
20140    ("lines" 100 >)))
20141  1000)
20142 @end example
20143
20144 However, when he responds to things written by Reig Eigil Logge, you
20145 really don't want to read what he's written:
20146
20147 @example
20148 ((&
20149   ("from" "Lars Ingebrigtsen")
20150   (1- ("from" "Reig Eigir Logge")))
20151  -100000)
20152 @end example
20153
20154 Everybody that follows up Redmondo when he writes about disappearing
20155 socks should have their scores raised, but only when they talk about
20156 white socks.  However, when Lars talks about socks, it's usually not
20157 very interesting:
20158
20159 @example
20160 ((&
20161   (1-
20162    (&
20163     ("from" "redmondo@@.*no" r)
20164     ("body" "disappearing.*socks" t)))
20165   (! ("from" "Lars Ingebrigtsen"))
20166   ("body" "white.*socks"))
20167  1000)
20168 @end example
20169
20170 The possibilities are endless.
20171
20172
20173 @node Advanced Scoring Tips
20174 @subsection Advanced Scoring Tips
20175
20176 The @code{&} and @code{|} logical operators do short-circuit logic.
20177 That is, they stop processing their arguments when it's clear what the
20178 result of the operation will be.  For instance, if one of the arguments
20179 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20180 the rest of the arguments.  This means that you should put slow matches
20181 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20182 @samp{subject}) first.
20183
20184 The indirection arguments (@code{1-} and so on) will make their
20185 arguments work on previous generations of the thread.  If you say
20186 something like:
20187
20188 @example
20189 ...
20190 (1-
20191  (1-
20192   ("from" "lars")))
20193 ...
20194 @end example
20195
20196 Then that means "score on the from header of the grandparent of the
20197 current article".  An indirection is quite fast, but it's better to say:
20198
20199 @example
20200 (1-
20201  (&
20202   ("from" "Lars")
20203   ("subject" "Gnus")))
20204 @end example
20205
20206 than it is to say:
20207
20208 @example
20209 (&
20210  (1- ("from" "Lars"))
20211  (1- ("subject" "Gnus")))
20212 @end example
20213
20214
20215 @node Score Decays
20216 @section Score Decays
20217 @cindex score decays
20218 @cindex decays
20219
20220 You may find that your scores have a tendency to grow without
20221 bounds, especially if you're using adaptive scoring.  If scores get too
20222 big, they lose all meaning---they simply max out and it's difficult to
20223 use them in any sensible way.
20224
20225 @vindex gnus-decay-scores
20226 @findex gnus-decay-score
20227 @vindex gnus-decay-score-function
20228 Gnus provides a mechanism for decaying scores to help with this problem.
20229 When score files are loaded and @code{gnus-decay-scores} is
20230 non-@code{nil}, Gnus will run the score files through the decaying
20231 mechanism thereby lowering the scores of all non-permanent score rules.
20232 The decay itself if performed by the @code{gnus-decay-score-function}
20233 function, which is @code{gnus-decay-score} by default.  Here's the
20234 definition of that function:
20235
20236 @lisp
20237 (defun gnus-decay-score (score)
20238   "Decay SCORE.
20239 This is done according to `gnus-score-decay-constant'
20240 and `gnus-score-decay-scale'."
20241   (floor
20242    (- score
20243       (* (if (< score 0) 1 -1)
20244          (min (abs score)
20245               (max gnus-score-decay-constant
20246                    (* (abs score)
20247                       gnus-score-decay-scale)))))))
20248 @end lisp
20249
20250 @vindex gnus-score-decay-scale
20251 @vindex gnus-score-decay-constant
20252 @code{gnus-score-decay-constant} is 3 by default and
20253 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20254
20255 @enumerate
20256 @item
20257 Scores between -3 and 3 will be set to 0 when this function is called.
20258
20259 @item
20260 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20261
20262 @item
20263 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20264 score.
20265 @end enumerate
20266
20267 If you don't like this decay function, write your own.  It is called
20268 with the score to be decayed as its only parameter, and it should return
20269 the new score, which should be an integer.
20270
20271 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20272 four days, Gnus will decay the scores four times, for instance.
20273
20274 @iftex
20275 @iflatex
20276 @chapter Message
20277 @include message.texi
20278 @chapter Emacs MIME
20279 @include emacs-mime.texi
20280 @chapter Sieve
20281 @include sieve.texi
20282 @c @chapter PGG
20283 @c @include pgg.texi
20284 @end iflatex
20285 @end iftex
20286
20287 @node Various
20288 @chapter Various
20289
20290 @menu
20291 * Process/Prefix::              A convention used by many treatment commands.
20292 * Interactive::                 Making Gnus ask you many questions.
20293 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20294 * Formatting Variables::        You can specify what buffers should look like.
20295 * Window Layout::               Configuring the Gnus buffer windows.
20296 * Faces and Fonts::             How to change how faces look.
20297 * Compilation::                 How to speed Gnus up.
20298 * Mode Lines::                  Displaying information in the mode lines.
20299 * Highlighting and Menus::      Making buffers look all nice and cozy.
20300 * Buttons::                     Get tendinitis in ten easy steps!
20301 * Daemons::                     Gnus can do things behind your back.
20302 * NoCeM::                       How to avoid spam and other fatty foods.
20303 * Undo::                        Some actions can be undone.
20304 * Predicate Specifiers::        Specifying predicates.
20305 * Moderation::                  What to do if you're a moderator.
20306 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20307 * Fuzzy Matching::              What's the big fuzz?
20308 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20309 * Various Various::             Things that are really various.
20310 @end menu
20311
20312
20313 @node Process/Prefix
20314 @section Process/Prefix
20315 @cindex process/prefix convention
20316
20317 Many functions, among them functions for moving, decoding and saving
20318 articles, use what is known as the @dfn{Process/Prefix convention}.
20319
20320 This is a method for figuring out what articles the user wants the
20321 command to be performed on.
20322
20323 It goes like this:
20324
20325 If the numeric prefix is N, perform the operation on the next N
20326 articles, starting with the current one.  If the numeric prefix is
20327 negative, perform the operation on the previous N articles, starting
20328 with the current one.
20329
20330 @vindex transient-mark-mode
20331 If @code{transient-mark-mode} in non-@code{nil} and the region is
20332 active, all articles in the region will be worked upon.
20333
20334 If there is no numeric prefix, but some articles are marked with the
20335 process mark, perform the operation on the articles marked with
20336 the process mark.
20337
20338 If there is neither a numeric prefix nor any articles marked with the
20339 process mark, just perform the operation on the current article.
20340
20341 Quite simple, really, but it needs to be made clear so that surprises
20342 are avoided.
20343
20344 Commands that react to the process mark will push the current list of
20345 process marked articles onto a stack and will then clear all process
20346 marked articles.  You can restore the previous configuration with the
20347 @kbd{M P y} command (@pxref{Setting Process Marks}).
20348
20349 @vindex gnus-summary-goto-unread
20350 One thing that seems to shock & horrify lots of people is that, for
20351 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20352 Since each @kbd{d} (which marks the current article as read) by default
20353 goes to the next unread article after marking, this means that @kbd{3 d}
20354 will mark the next three unread articles as read, no matter what the
20355 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20356 @code{nil} for a more straightforward action.
20357
20358 Many commands do not use the process/prefix convention.  All commands
20359 that do explicitly say so in this manual.  To apply the process/prefix
20360 convention to commands that do not use it, you can use the @kbd{M-&}
20361 command.  For instance, to mark all the articles in the group as
20362 expirable, you could say @kbd{M P b M-& E}.
20363
20364
20365 @node Interactive
20366 @section Interactive
20367 @cindex interaction
20368
20369 @table @code
20370
20371 @item gnus-novice-user
20372 @vindex gnus-novice-user
20373 If this variable is non-@code{nil}, you are either a newcomer to the
20374 World of Usenet, or you are very cautious, which is a nice thing to be,
20375 really.  You will be given questions of the type ``Are you sure you want
20376 to do this?'' before doing anything dangerous.  This is @code{t} by
20377 default.
20378
20379 @item gnus-expert-user
20380 @vindex gnus-expert-user
20381 If this variable is non-@code{nil}, you will seldom be asked any
20382 questions by Gnus.  It will simply assume you know what you're doing, no
20383 matter how strange.
20384
20385 @item gnus-interactive-catchup
20386 @vindex gnus-interactive-catchup
20387 Require confirmation before catching up a group if non-@code{nil}.  It
20388 is @code{t} by default.
20389
20390 @item gnus-interactive-exit
20391 @vindex gnus-interactive-exit
20392 Require confirmation before exiting Gnus.  This variable is @code{t} by
20393 default.
20394 @end table
20395
20396
20397 @node Symbolic Prefixes
20398 @section Symbolic Prefixes
20399 @cindex symbolic prefixes
20400
20401 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20402 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20403 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20404 rule of 900 to the current article.
20405
20406 This is all nice and well, but what if you want to give a command some
20407 additional information?  Well, what most commands do is interpret the
20408 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20409 doesn't want a backup file to be created when saving the current buffer,
20410 for instance.  But what if you want to save without making a backup
20411 file, and you want Emacs to flash lights and play a nice tune at the
20412 same time?  You can't, and you're probably perfectly happy that way.
20413
20414 @kindex M-i (Summary)
20415 @findex gnus-symbolic-argument
20416 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20417 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20418 character typed in is the value.  You can stack as many @kbd{M-i}
20419 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20420 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20421 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20422 @code{b}''.  You get the drift.
20423
20424 Typing in symbolic prefixes to commands that don't accept them doesn't
20425 hurt, but it doesn't do any good either.  Currently not many Gnus
20426 functions make use of the symbolic prefix.
20427
20428 If you're interested in how Gnus implements this, @pxref{Extended
20429 Interactive}.
20430
20431
20432 @node Formatting Variables
20433 @section Formatting Variables
20434 @cindex formatting variables
20435
20436 Throughout this manual you've probably noticed lots of variables called
20437 things like @code{gnus-group-line-format} and
20438 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20439 output lines in the various buffers.  There's quite a lot of them.
20440 Fortunately, they all use the same syntax, so there's not that much to
20441 be annoyed by.
20442
20443 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20444 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20445 lots of percentages everywhere.
20446
20447 @menu
20448 * Formatting Basics::           A formatting variable is basically a format string.
20449 * Mode Line Formatting::        Some rules about mode line formatting variables.
20450 * Advanced Formatting::         Modifying output in various ways.
20451 * User-Defined Specs::          Having Gnus call your own functions.
20452 * Formatting Fonts::            Making the formatting look colorful and nice.
20453 * Positioning Point::           Moving point to a position after an operation.
20454 * Tabulation::                  Tabulating your output.
20455 * Wide Characters::             Dealing with wide characters.
20456 @end menu
20457
20458 Currently Gnus uses the following formatting variables:
20459 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20460 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20461 @code{gnus-group-mode-line-format},
20462 @code{gnus-summary-mode-line-format},
20463 @code{gnus-article-mode-line-format},
20464 @code{gnus-server-mode-line-format}, and
20465 @code{gnus-summary-pick-line-format}.
20466
20467 All these format variables can also be arbitrary elisp forms.  In that
20468 case, they will be @code{eval}ed to insert the required lines.
20469
20470 @kindex M-x gnus-update-format
20471 @findex gnus-update-format
20472 Gnus includes a command to help you while creating your own format
20473 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20474 update the spec in question and pop you to a buffer where you can
20475 examine the resulting Lisp code to be run to generate the line.
20476
20477
20478
20479 @node Formatting Basics
20480 @subsection Formatting Basics
20481
20482 Each @samp{%} element will be replaced by some string or other when the
20483 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20484 spec, and pad with spaces to get a 5-character field''.
20485
20486 As with normal C and Emacs Lisp formatting strings, the numerical
20487 modifier between the @samp{%} and the formatting type character will
20488 @dfn{pad} the output so that it is always at least that long.
20489 @samp{%5y} will make the field always (at least) five characters wide by
20490 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20491 the right instead.
20492
20493 You may also wish to limit the length of the field to protect against
20494 particularly wide values.  For that you can say @samp{%4,6y}, which
20495 means that the field will never be more than 6 characters wide and never
20496 less than 4 characters wide.
20497
20498 Also Gnus supports some extended format specifications, such as
20499 @samp{%&user-date;}.
20500
20501
20502 @node Mode Line Formatting
20503 @subsection Mode Line Formatting
20504
20505 Mode line formatting variables (e.g.,
20506 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20507 buffer line oriented formatting variables (@pxref{Formatting Basics})
20508 with the following two differences:
20509
20510 @enumerate
20511
20512 @item
20513 There must be no newline (@samp{\n}) at the end.
20514
20515 @item
20516 The special @samp{%%b} spec can be used to display the buffer name.
20517 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20518 @samp{%} to allow it to pass through the formatting machinery unmangled,
20519 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20520 display interprets to mean ``show the buffer name''.  For a full list of
20521 mode line specs Emacs understands, see the documentation of the
20522 @code{mode-line-format} variable.
20523
20524 @end enumerate
20525
20526
20527 @node Advanced Formatting
20528 @subsection Advanced Formatting
20529
20530 It is frequently useful to post-process the fields in some way.
20531 Padding, limiting, cutting off parts and suppressing certain values can
20532 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20533 look like @samp{%~(cut 3)~(ignore "0")y}.
20534
20535 These are the valid modifiers:
20536
20537 @table @code
20538 @item pad
20539 @itemx pad-left
20540 Pad the field to the left with spaces until it reaches the required
20541 length.
20542
20543 @item pad-right
20544 Pad the field to the right with spaces until it reaches the required
20545 length.
20546
20547 @item max
20548 @itemx max-left
20549 Cut off characters from the left until it reaches the specified length.
20550
20551 @item max-right
20552 Cut off characters from the right until it reaches the specified
20553 length.
20554
20555 @item cut
20556 @itemx cut-left
20557 Cut off the specified number of characters from the left.
20558
20559 @item cut-right
20560 Cut off the specified number of characters from the right.
20561
20562 @item ignore
20563 Return an empty string if the field is equal to the specified value.
20564
20565 @item form
20566 Use the specified form as the field value when the @samp{@@} spec is
20567 used.
20568
20569 Here's an example:
20570
20571 @lisp
20572 "~(form (current-time-string))@@"
20573 @end lisp
20574
20575 @end table
20576
20577 Let's take an example.  The @samp{%o} spec in the summary mode lines
20578 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20579 This is quite a mouthful, so we want to shave off the century number and
20580 the time, leaving us with a six-character date.  That would be
20581 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20582 maxing, and we need the padding to ensure that the date is never less
20583 than 6 characters to make it look nice in columns.)
20584
20585 Ignoring is done first; then cutting; then maxing; and then as the very
20586 last operation, padding.
20587
20588 @vindex gnus-compile-user-specs
20589 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
20590 default) with your strong personality, and use a lots of these advanced
20591 thingies, you'll find that Gnus gets quite slow.  This can be helped
20592 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
20593 the look of your lines.
20594 @xref{Compilation}.
20595
20596
20597 @node User-Defined Specs
20598 @subsection User-Defined Specs
20599
20600 All the specs allow for inserting user defined specifiers---@samp{u}.
20601 The next character in the format string should be a letter.  Gnus
20602 will call the function @code{gnus-user-format-function-}@samp{X}, where
20603 @samp{X} is the letter following @samp{%u}.  The function will be passed
20604 a single parameter---what the parameter means depends on what buffer
20605 it's being called from.  The function should return a string, which will
20606 be inserted into the buffer just like information from any other
20607 specifier.  This function may also be called with dummy values, so it
20608 should protect against that.
20609
20610 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20611 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20612
20613 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20614 much the same without defining new functions.  Here's an example:
20615 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20616 given here will be evaluated to yield the current line number, and then
20617 inserted.
20618
20619
20620 @node Formatting Fonts
20621 @subsection Formatting Fonts
20622
20623 There are specs for highlighting, and these are shared by all the format
20624 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20625 the special @code{mouse-face} property set, which means that it will be
20626 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20627 over it.
20628
20629 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20630 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20631 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20632 and so on.  Create as many faces as you wish.  The same goes for the
20633 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20634 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20635
20636 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20637 special @code{balloon-help} property set to
20638 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20639 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20640 variables should be either strings or symbols naming functions that
20641 return a string.  When the mouse passes over text with this property
20642 set, a balloon window will appear and display the string.  Please
20643 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20644 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20645 XEmacs) for more information on this.  (For technical reasons, the
20646 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20647 paragraph.)
20648
20649 Here's an alternative recipe for the group buffer:
20650
20651 @lisp
20652 ;; @r{Create three face types.}
20653 (setq gnus-face-1 'bold)
20654 (setq gnus-face-3 'italic)
20655
20656 ;; @r{We want the article count to be in}
20657 ;; @r{a bold and green face.  So we create}
20658 ;; @r{a new face called @code{my-green-bold}.}
20659 (copy-face 'bold 'my-green-bold)
20660 ;; @r{Set the color.}
20661 (set-face-foreground 'my-green-bold "ForestGreen")
20662 (setq gnus-face-2 'my-green-bold)
20663
20664 ;; @r{Set the new & fancy format.}
20665 (setq gnus-group-line-format
20666       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20667 @end lisp
20668
20669 I'm sure you'll be able to use this scheme to create totally unreadable
20670 and extremely vulgar displays.  Have fun!
20671
20672 Note that the @samp{%(} specs (and friends) do not make any sense on the
20673 mode-line variables.
20674
20675 @node Positioning Point
20676 @subsection Positioning Point
20677
20678 Gnus usually moves point to a pre-defined place on each line in most
20679 buffers.  By default, point move to the first colon character on the
20680 line.  You can customize this behaviour in three different ways.
20681
20682 You can move the colon character to somewhere else on the line.
20683
20684 @findex gnus-goto-colon
20685 You can redefine the function that moves the point to the colon.  The
20686 function is called @code{gnus-goto-colon}.
20687
20688 But perhaps the most convenient way to deal with this, if you don't want
20689 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20690 put a @samp{%*} somewhere in your format line definition, Gnus will
20691 place point there.
20692
20693
20694 @node Tabulation
20695 @subsection Tabulation
20696
20697 You can usually line up your displays by padding and cutting your
20698 strings.  However, when combining various strings of different size, it
20699 can often be more convenient to just output the strings, and then worry
20700 about lining up the following text afterwards.
20701
20702 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20703 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20704
20705 @samp{%50=} will insert space characters to pad the line up to column
20706 50.  If the text is already past column 50, nothing will be inserted.
20707 This is the soft tabulator.
20708
20709 @samp{%-50=} will insert space characters to pad the line up to column
20710 50.  If the text is already past column 50, the excess text past column
20711 50 will be removed.  This is the hard tabulator.
20712
20713
20714 @node Wide Characters
20715 @subsection Wide Characters
20716
20717 Fixed width fonts in most countries have characters of the same width.
20718 Some countries, however, use Latin characters mixed with wider
20719 characters---most notable East Asian countries.
20720
20721 The problem is that when formatting, Gnus assumes that if a string is 10
20722 characters wide, it'll be 10 Latin characters wide on the screen.  In
20723 these countries, that's not true.
20724
20725 @vindex gnus-use-correct-string-widths
20726 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20727 @code{t}.  This makes buffer generation slower, but the results will be
20728 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20729 for Emacs.
20730
20731
20732 @node Window Layout
20733 @section Window Layout
20734 @cindex window layout
20735
20736 No, there's nothing here about X, so be quiet.
20737
20738 @vindex gnus-use-full-window
20739 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20740 other windows and occupy the entire Emacs screen by itself.  It is
20741 @code{t} by default.
20742
20743 Setting this variable to @code{nil} kinda works, but there are
20744 glitches.  Use at your own peril.
20745
20746 @vindex gnus-buffer-configuration
20747 @code{gnus-buffer-configuration} describes how much space each Gnus
20748 buffer should be given.  Here's an excerpt of this variable:
20749
20750 @lisp
20751 ((group (vertical 1.0 (group 1.0 point)
20752                       (if gnus-carpal (group-carpal 4))))
20753  (article (vertical 1.0 (summary 0.25 point)
20754                         (article 1.0))))
20755 @end lisp
20756
20757 This is an alist.  The @dfn{key} is a symbol that names some action or
20758 other.  For instance, when displaying the group buffer, the window
20759 configuration function will use @code{group} as the key.  A full list of
20760 possible names is listed below.
20761
20762 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20763 should occupy.  To take the @code{article} split as an example -
20764
20765 @lisp
20766 (article (vertical 1.0 (summary 0.25 point)
20767                        (article 1.0)))
20768 @end lisp
20769
20770 This @dfn{split} says that the summary buffer should occupy 25% of upper
20771 half of the screen, and that it is placed over the article buffer.  As
20772 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20773 reaching for that calculator there).  However, the special number
20774 @code{1.0} is used to signal that this buffer should soak up all the
20775 rest of the space available after the rest of the buffers have taken
20776 whatever they need.  There should be only one buffer with the @code{1.0}
20777 size spec per split.
20778
20779 Point will be put in the buffer that has the optional third element
20780 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20781 split where the tag @code{frame-focus} is a member (i.e. is the third or
20782 fourth element in the list, depending on whether the @code{point} tag is
20783 present) gets focus.
20784
20785 Here's a more complicated example:
20786
20787 @lisp
20788 (article (vertical 1.0 (group 4)
20789                        (summary 0.25 point)
20790                        (if gnus-carpal (summary-carpal 4))
20791                        (article 1.0)))
20792 @end lisp
20793
20794 If the size spec is an integer instead of a floating point number,
20795 then that number will be used to say how many lines a buffer should
20796 occupy, not a percentage.
20797
20798 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20799 precise---if the @code{car} of the split is a function or a subr), this
20800 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20801 be used as a split.  This means that there will be three buffers if
20802 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20803 is non-@code{nil}.
20804
20805 Not complicated enough for you?  Well, try this on for size:
20806
20807 @lisp
20808 (article (horizontal 1.0
20809              (vertical 0.5
20810                  (group 1.0)
20811                  (gnus-carpal 4))
20812              (vertical 1.0
20813                  (summary 0.25 point)
20814                  (summary-carpal 4)
20815                  (article 1.0))))
20816 @end lisp
20817
20818 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20819 @code{horizontal} thingie?
20820
20821 If the first element in one of the split is @code{horizontal}, Gnus will
20822 split the window horizontally, giving you two windows side-by-side.
20823 Inside each of these strips you may carry on all you like in the normal
20824 fashion.  The number following @code{horizontal} says what percentage of
20825 the screen is to be given to this strip.
20826
20827 For each split, there @emph{must} be one element that has the 100% tag.
20828 The splitting is never accurate, and this buffer will eat any leftover
20829 lines from the splits.
20830
20831 To be slightly more formal, here's a definition of what a valid split
20832 may look like:
20833
20834 @example
20835 @group
20836 split      = frame | horizontal | vertical | buffer | form
20837 frame      = "(frame " size *split ")"
20838 horizontal = "(horizontal " size *split ")"
20839 vertical   = "(vertical " size *split ")"
20840 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20841 size       = number | frame-params
20842 buf-name   = group | article | summary ...
20843 @end group
20844 @end example
20845
20846 The limitations are that the @code{frame} split can only appear as the
20847 top-level split.  @var{form} should be an Emacs Lisp form that should
20848 return a valid split.  We see that each split is fully recursive, and
20849 may contain any number of @code{vertical} and @code{horizontal} splits.
20850
20851 @vindex gnus-window-min-width
20852 @vindex gnus-window-min-height
20853 @cindex window height
20854 @cindex window width
20855 Finding the right sizes can be a bit complicated.  No window may be less
20856 than @code{gnus-window-min-height} (default 1) characters high, and all
20857 windows must be at least @code{gnus-window-min-width} (default 1)
20858 characters wide.  Gnus will try to enforce this before applying the
20859 splits.  If you want to use the normal Emacs window width/height limit,
20860 you can just set these two variables to @code{nil}.
20861
20862 If you're not familiar with Emacs terminology, @code{horizontal} and
20863 @code{vertical} splits may work the opposite way of what you'd expect.
20864 Windows inside a @code{horizontal} split are shown side-by-side, and
20865 windows within a @code{vertical} split are shown above each other.
20866
20867 @findex gnus-configure-frame
20868 If you want to experiment with window placement, a good tip is to call
20869 @code{gnus-configure-frame} directly with a split.  This is the function
20870 that does all the real work when splitting buffers.  Below is a pretty
20871 nonsensical configuration with 5 windows; two for the group buffer and
20872 three for the article buffer.  (I said it was nonsensical.)  If you
20873 @code{eval} the statement below, you can get an idea of how that would
20874 look straight away, without going through the normal Gnus channels.
20875 Play with it until you're satisfied, and then use
20876 @code{gnus-add-configuration} to add your new creation to the buffer
20877 configuration list.
20878
20879 @lisp
20880 (gnus-configure-frame
20881  '(horizontal 1.0
20882     (vertical 10
20883       (group 1.0)
20884       (article 0.3 point))
20885     (vertical 1.0
20886       (article 1.0)
20887       (horizontal 4
20888         (group 1.0)
20889         (article 10)))))
20890 @end lisp
20891
20892 You might want to have several frames as well.  No prob---just use the
20893 @code{frame} split:
20894
20895 @lisp
20896 (gnus-configure-frame
20897  '(frame 1.0
20898          (vertical 1.0
20899                    (summary 0.25 point frame-focus)
20900                    (article 1.0))
20901          (vertical ((height . 5) (width . 15)
20902                     (user-position . t)
20903                     (left . -1) (top . 1))
20904                    (picon 1.0))))
20905
20906 @end lisp
20907
20908 This split will result in the familiar summary/article window
20909 configuration in the first (or ``main'') frame, while a small additional
20910 frame will be created where picons will be shown.  As you can see,
20911 instead of the normal @code{1.0} top-level spec, each additional split
20912 should have a frame parameter alist as the size spec.
20913 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20914 Reference Manual}.  Under XEmacs, a frame property list will be
20915 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20916 is such a plist.
20917 The list of all possible keys for @code{gnus-buffer-configuration} can
20918 be found in its default value.
20919
20920 Note that the @code{message} key is used for both
20921 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20922 it is desirable to distinguish between the two, something like this
20923 might be used:
20924
20925 @lisp
20926 (message (horizontal 1.0
20927                      (vertical 1.0 (message 1.0 point))
20928                      (vertical 0.24
20929                                (if (buffer-live-p gnus-summary-buffer)
20930                                    '(summary 0.5))
20931                                (group 1.0))))
20932 @end lisp
20933
20934 One common desire for a multiple frame split is to have a separate frame
20935 for composing mail and news while leaving the original frame intact.  To
20936 accomplish that, something like the following can be done:
20937
20938 @lisp
20939 (message
20940   (frame 1.0
20941          (if (not (buffer-live-p gnus-summary-buffer))
20942              (car (cdr (assoc 'group gnus-buffer-configuration)))
20943            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20944          (vertical ((user-position . t) (top . 1) (left . 1)
20945                     (name . "Message"))
20946                    (message 1.0 point))))
20947 @end lisp
20948
20949 @findex gnus-add-configuration
20950 Since the @code{gnus-buffer-configuration} variable is so long and
20951 complicated, there's a function you can use to ease changing the config
20952 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20953 you want to change the @code{article} setting, you could say:
20954
20955 @lisp
20956 (gnus-add-configuration
20957  '(article (vertical 1.0
20958                (group 4)
20959                (summary .25 point)
20960                (article 1.0))))
20961 @end lisp
20962
20963 You'd typically stick these @code{gnus-add-configuration} calls in your
20964 @file{~/.gnus.el} file or in some startup hook---they should be run after
20965 Gnus has been loaded.
20966
20967 @vindex gnus-always-force-window-configuration
20968 If all windows mentioned in the configuration are already visible, Gnus
20969 won't change the window configuration.  If you always want to force the
20970 ``right'' window configuration, you can set
20971 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20972
20973 If you're using tree displays (@pxref{Tree Display}), and the tree
20974 window is displayed vertically next to another window, you may also want
20975 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20976 windows resized.
20977
20978 @subsection Example Window Configurations
20979
20980 @itemize @bullet
20981 @item
20982 Narrow left hand side occupied by group buffer.  Right hand side split
20983 between summary buffer (top one-sixth) and article buffer (bottom).
20984
20985 @ifinfo
20986 @example
20987 +---+---------+
20988 | G | Summary |
20989 | r +---------+
20990 | o |         |
20991 | u | Article |
20992 | p |         |
20993 +---+---------+
20994 @end example
20995 @end ifinfo
20996
20997 @lisp
20998 (gnus-add-configuration
20999  '(article
21000    (horizontal 1.0
21001                (vertical 25 (group 1.0))
21002                (vertical 1.0
21003                          (summary 0.16 point)
21004                          (article 1.0)))))
21005
21006 (gnus-add-configuration
21007  '(summary
21008    (horizontal 1.0
21009                (vertical 25 (group 1.0))
21010                (vertical 1.0 (summary 1.0 point)))))
21011 @end lisp
21012
21013 @end itemize
21014
21015
21016 @node Faces and Fonts
21017 @section Faces and Fonts
21018 @cindex faces
21019 @cindex fonts
21020 @cindex colors
21021
21022 Fiddling with fonts and faces used to be very difficult, but these days
21023 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21024 the face you want to alter, and alter it via the standard Customize
21025 interface.
21026
21027
21028 @node Compilation
21029 @section Compilation
21030 @cindex compilation
21031 @cindex byte-compilation
21032
21033 @findex gnus-compile
21034
21035 Remember all those line format specification variables?
21036 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21037 on.  By default, T-gnus will use the byte-compiled codes of these
21038 variables and we can keep a slow-down to a minimum.  However, if you set
21039 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
21040 unfortunately, changing them will mean a quite significant slow-down.
21041 (The default values of these variables have byte-compiled functions
21042 associated with them, while the user-generated versions do not, of
21043 course.)
21044
21045 To help with this, you can run @kbd{M-x gnus-compile} after you've
21046 fiddled around with the variables and feel that you're (kind of)
21047 satisfied.  This will result in the new specs being byte-compiled, and
21048 you'll get top speed again.  Note that T-gnus will not save these
21049 compiled specs in the @file{.newsrc.eld} file.
21050
21051 @table @code
21052 @item gnus-compile-user-specs
21053 @vindex gnus-compile-user-specs
21054 If it is non-nil, the user-defined format specs will be byte-compiled
21055 automatically.  The default value of this variable is @code{t}.  It has
21056 an effect on the values of @code{gnus-*-line-format-spec}.
21057 @end table
21058
21059
21060 @node Mode Lines
21061 @section Mode Lines
21062 @cindex mode lines
21063
21064 @vindex gnus-updated-mode-lines
21065 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21066 lines updated.  It is a list of symbols.  Supported symbols include
21067 @code{group}, @code{article}, @code{summary}, @code{server},
21068 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21069 Gnus will keep that mode line updated with information that may be
21070 pertinent.  If this variable is @code{nil}, screen refresh may be
21071 quicker.
21072
21073 @cindex display-time
21074
21075 @vindex gnus-mode-non-string-length
21076 By default, Gnus displays information on the current article in the mode
21077 lines of the summary and article buffers.  The information Gnus wishes
21078 to display (e.g. the subject of the article) is often longer than the
21079 mode lines, and therefore have to be cut off at some point.  The
21080 @code{gnus-mode-non-string-length} variable says how long the other
21081 elements on the line is (i.e., the non-info part).  If you put
21082 additional elements on the mode line (e.g. a clock), you should modify
21083 this variable:
21084
21085 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21086 @lisp
21087 (add-hook 'display-time-hook
21088           (lambda () (setq gnus-mode-non-string-length
21089                            (+ 21
21090                               (if line-number-mode 5 0)
21091                               (if column-number-mode 4 0)
21092                               (length display-time-string)))))
21093 @end lisp
21094
21095 If this variable is @code{nil} (which is the default), the mode line
21096 strings won't be chopped off, and they won't be padded either.  Note
21097 that the default is unlikely to be desirable, as even the percentage
21098 complete in the buffer may be crowded off the mode line; the user should
21099 configure this variable appropriately for her configuration.
21100
21101
21102 @node Highlighting and Menus
21103 @section Highlighting and Menus
21104 @cindex visual
21105 @cindex highlighting
21106 @cindex menus
21107
21108 @vindex gnus-visual
21109 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21110 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21111 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21112 file.
21113
21114 This variable can be a list of visual properties that are enabled.  The
21115 following elements are valid, and are all included by default:
21116
21117 @table @code
21118 @item group-highlight
21119 Do highlights in the group buffer.
21120 @item summary-highlight
21121 Do highlights in the summary buffer.
21122 @item article-highlight
21123 Do highlights in the article buffer.
21124 @item highlight
21125 Turn on highlighting in all buffers.
21126 @item group-menu
21127 Create menus in the group buffer.
21128 @item summary-menu
21129 Create menus in the summary buffers.
21130 @item article-menu
21131 Create menus in the article buffer.
21132 @item browse-menu
21133 Create menus in the browse buffer.
21134 @item server-menu
21135 Create menus in the server buffer.
21136 @item score-menu
21137 Create menus in the score buffers.
21138 @item menu
21139 Create menus in all buffers.
21140 @end table
21141
21142 So if you only want highlighting in the article buffer and menus in all
21143 buffers, you could say something like:
21144
21145 @lisp
21146 (setq gnus-visual '(article-highlight menu))
21147 @end lisp
21148
21149 If you want highlighting only and no menus whatsoever, you'd say:
21150
21151 @lisp
21152 (setq gnus-visual '(highlight))
21153 @end lisp
21154
21155 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21156 in all Gnus buffers.
21157
21158 Other general variables that influence the look of all buffers include:
21159
21160 @table @code
21161 @item gnus-mouse-face
21162 @vindex gnus-mouse-face
21163 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21164 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21165
21166 @end table
21167
21168 There are hooks associated with the creation of all the different menus:
21169
21170 @table @code
21171
21172 @item gnus-article-menu-hook
21173 @vindex gnus-article-menu-hook
21174 Hook called after creating the article mode menu.
21175
21176 @item gnus-group-menu-hook
21177 @vindex gnus-group-menu-hook
21178 Hook called after creating the group mode menu.
21179
21180 @item gnus-summary-menu-hook
21181 @vindex gnus-summary-menu-hook
21182 Hook called after creating the summary mode menu.
21183
21184 @item gnus-server-menu-hook
21185 @vindex gnus-server-menu-hook
21186 Hook called after creating the server mode menu.
21187
21188 @item gnus-browse-menu-hook
21189 @vindex gnus-browse-menu-hook
21190 Hook called after creating the browse mode menu.
21191
21192 @item gnus-score-menu-hook
21193 @vindex gnus-score-menu-hook
21194 Hook called after creating the score mode menu.
21195
21196 @end table
21197
21198
21199 @node Buttons
21200 @section Buttons
21201 @cindex buttons
21202 @cindex mouse
21203 @cindex click
21204
21205 Those new-fangled @dfn{mouse} contraptions is very popular with the
21206 young, hep kids who don't want to learn the proper way to do things
21207 these days.  Why, I remember way back in the summer of '89, when I was
21208 using Emacs on a Tops 20 system.  Three hundred users on one single
21209 machine, and every user was running Simula compilers.  Bah!
21210
21211 Right.
21212
21213 @vindex gnus-carpal
21214 Well, you can make Gnus display bufferfuls of buttons you can click to
21215 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21216 really.  Tell the chiropractor I sent you.
21217
21218
21219 @table @code
21220
21221 @item gnus-carpal-mode-hook
21222 @vindex gnus-carpal-mode-hook
21223 Hook run in all carpal mode buffers.
21224
21225 @item gnus-carpal-button-face
21226 @vindex gnus-carpal-button-face
21227 Face used on buttons.
21228
21229 @item gnus-carpal-header-face
21230 @vindex gnus-carpal-header-face
21231 Face used on carpal buffer headers.
21232
21233 @item gnus-carpal-group-buffer-buttons
21234 @vindex gnus-carpal-group-buffer-buttons
21235 Buttons in the group buffer.
21236
21237 @item gnus-carpal-summary-buffer-buttons
21238 @vindex gnus-carpal-summary-buffer-buttons
21239 Buttons in the summary buffer.
21240
21241 @item gnus-carpal-server-buffer-buttons
21242 @vindex gnus-carpal-server-buffer-buttons
21243 Buttons in the server buffer.
21244
21245 @item gnus-carpal-browse-buffer-buttons
21246 @vindex gnus-carpal-browse-buffer-buttons
21247 Buttons in the browse buffer.
21248 @end table
21249
21250 All the @code{buttons} variables are lists.  The elements in these list
21251 are either cons cells where the @code{car} contains a text to be displayed and
21252 the @code{cdr} contains a function symbol, or a simple string.
21253
21254
21255 @node Daemons
21256 @section Daemons
21257 @cindex demons
21258 @cindex daemons
21259
21260 Gnus, being larger than any program ever written (allegedly), does lots
21261 of strange stuff that you may wish to have done while you're not
21262 present.  For instance, you may want it to check for new mail once in a
21263 while.  Or you may want it to close down all connections to all servers
21264 when you leave Emacs idle.  And stuff like that.
21265
21266 Gnus will let you do stuff like that by defining various
21267 @dfn{handlers}.  Each handler consists of three elements:  A
21268 @var{function}, a @var{time}, and an @var{idle} parameter.
21269
21270 Here's an example of a handler that closes connections when Emacs has
21271 been idle for thirty minutes:
21272
21273 @lisp
21274 (gnus-demon-close-connections nil 30)
21275 @end lisp
21276
21277 Here's a handler that scans for @acronym{PGP} headers every hour when
21278 Emacs is idle:
21279
21280 @lisp
21281 (gnus-demon-scan-pgp 60 t)
21282 @end lisp
21283
21284 This @var{time} parameter and that @var{idle} parameter work together
21285 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21286 @code{nil}, then the function will be called every @var{time} minutes.
21287
21288 If @var{idle} is @code{t}, then the function will be called after
21289 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21290 the function will never be called.  But once Emacs goes idle, the
21291 function will be called every @var{time} minutes.
21292
21293 If @var{idle} is a number and @var{time} is a number, the function will
21294 be called every @var{time} minutes only when Emacs has been idle for
21295 @var{idle} minutes.
21296
21297 If @var{idle} is a number and @var{time} is @code{nil}, the function
21298 will be called once every time Emacs has been idle for @var{idle}
21299 minutes.
21300
21301 And if @var{time} is a string, it should look like @samp{07:31}, and
21302 the function will then be called once every day somewhere near that
21303 time.  Modified by the @var{idle} parameter, of course.
21304
21305 @vindex gnus-demon-timestep
21306 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21307 seconds.  This is 60 by default.  If you change that variable,
21308 all the timings in the handlers will be affected.)
21309
21310 So, if you want to add a handler, you could put something like this in
21311 your @file{~/.gnus.el} file:
21312
21313 @findex gnus-demon-add-handler
21314 @lisp
21315 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21316 @end lisp
21317
21318 @findex gnus-demon-add-nocem
21319 @findex gnus-demon-add-scanmail
21320 @findex gnus-demon-add-rescan
21321 @findex gnus-demon-add-scan-timestamps
21322 @findex gnus-demon-add-disconnection
21323 Some ready-made functions to do this have been created:
21324 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21325 @code{gnus-demon-add-nntp-close-connection},
21326 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21327 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21328 @file{~/.gnus.el} if you want those abilities.
21329
21330 @findex gnus-demon-init
21331 @findex gnus-demon-cancel
21332 @vindex gnus-demon-handlers
21333 If you add handlers to @code{gnus-demon-handlers} directly, you should
21334 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21335 daemons, you can use the @code{gnus-demon-cancel} function.
21336
21337 Note that adding daemons can be pretty naughty if you over do it.  Adding
21338 functions that scan all news and mail from all servers every two seconds
21339 is a sure-fire way of getting booted off any respectable system.  So
21340 behave.
21341
21342
21343 @node NoCeM
21344 @section NoCeM
21345 @cindex nocem
21346 @cindex spam
21347
21348 @dfn{Spamming} is posting the same article lots and lots of times.
21349 Spamming is bad.  Spamming is evil.
21350
21351 Spamming is usually canceled within a day or so by various anti-spamming
21352 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21353 NoCeM is pronounced ``no see-'em'', and means what the name
21354 implies---these are messages that make the offending articles, like, go
21355 away.
21356
21357 What use are these NoCeM messages if the articles are canceled anyway?
21358 Some sites do not honor cancel messages and some sites just honor cancels
21359 from a select few people.  Then you may wish to make use of the NoCeM
21360 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21361
21362 Gnus can read and parse the messages in this group automatically, and
21363 this will make spam disappear.
21364
21365 There are some variables to customize, of course:
21366
21367 @table @code
21368 @item gnus-use-nocem
21369 @vindex gnus-use-nocem
21370 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21371 by default.
21372
21373 @item gnus-nocem-groups
21374 @vindex gnus-nocem-groups
21375 Gnus will look for NoCeM messages in the groups in this list.  The
21376 default is
21377 @lisp
21378 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21379  "alt.nocem.misc" "news.admin.net-abuse.announce")
21380 @end lisp
21381
21382 @item gnus-nocem-issuers
21383 @vindex gnus-nocem-issuers
21384 There are many people issuing NoCeM messages.  This list says what
21385 people you want to listen to.  The default is
21386 @lisp
21387 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21388  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21389 @end lisp
21390 fine, upstanding citizens all of them.
21391
21392 Known despammers that you can put in this list are listed at@*
21393 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21394
21395 You do not have to heed NoCeM messages from all these people---just the
21396 ones you want to listen to.  You also don't have to accept all NoCeM
21397 messages from the people you like.  Each NoCeM message has a @dfn{type}
21398 header that gives the message a (more or less, usually less) rigorous
21399 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21400 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21401 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21402 Each condition is either a string (which is a regexp that matches types
21403 you want to use) or a list on the form @code{(not @var{string})}, where
21404 @var{string} is a regexp that matches types you don't want to use.
21405
21406 For instance, if you want all NoCeM messages from Chris Lewis except his
21407 @samp{troll} messages, you'd say:
21408
21409 @lisp
21410 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21411 @end lisp
21412
21413 On the other hand, if you just want nothing but his @samp{spam} and
21414 @samp{spew} messages, you'd say:
21415
21416 @lisp
21417 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21418 @end lisp
21419
21420 The specs are applied left-to-right.
21421
21422
21423 @item gnus-nocem-verifyer
21424 @vindex gnus-nocem-verifyer
21425 @findex mc-verify
21426 This should be a function for verifying that the NoCeM issuer is who she
21427 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21428 function.  If this is too slow and you don't care for verification
21429 (which may be dangerous), you can set this variable to @code{nil}.
21430
21431 If you want signed NoCeM messages to be verified and unsigned messages
21432 not to be verified (but used anyway), you could do something like:
21433
21434 @lisp
21435 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21436
21437 (defun my-gnus-mc-verify ()
21438   (not (eq 'forged
21439            (ignore-errors
21440              (if (mc-verify)
21441                  t
21442                'forged)))))
21443 @end lisp
21444
21445 This might be dangerous, though.
21446
21447 @item gnus-nocem-directory
21448 @vindex gnus-nocem-directory
21449 This is where Gnus will store its NoCeM cache files.  The default is@*
21450 @file{~/News/NoCeM/}.
21451
21452 @item gnus-nocem-expiry-wait
21453 @vindex gnus-nocem-expiry-wait
21454 The number of days before removing old NoCeM entries from the cache.
21455 The default is 15.  If you make it shorter Gnus will be faster, but you
21456 might then see old spam.
21457
21458 @item gnus-nocem-check-from
21459 @vindex gnus-nocem-check-from
21460 Non-@code{nil} means check for valid issuers in message bodies.
21461 Otherwise don't bother fetching articles unless their author matches a
21462 valid issuer; that is much faster if you are selective about the
21463 issuers.
21464
21465 @item gnus-nocem-check-article-limit
21466 @vindex gnus-nocem-check-article-limit
21467 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21468 group.  NoCeM groups can be huge and very slow to process.
21469
21470 @end table
21471
21472 Using NoCeM could potentially be a memory hog.  If you have many living
21473 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21474 big.  If this is a problem, you should kill off all (or most) of your
21475 unsubscribed groups (@pxref{Subscription Commands}).
21476
21477
21478 @node Undo
21479 @section Undo
21480 @cindex undo
21481
21482 It is very useful to be able to undo actions one has done.  In normal
21483 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21484 In Gnus buffers, however, it isn't that simple.
21485
21486 The things Gnus displays in its buffer is of no value whatsoever to
21487 Gnus---it's all just data designed to look nice to the user.
21488 Killing a group in the group buffer with @kbd{C-k} makes the line
21489 disappear, but that's just a side-effect of the real action---the
21490 removal of the group in question from the internal Gnus structures.
21491 Undoing something like that can't be done by the normal Emacs
21492 @code{undo} function.
21493
21494 Gnus tries to remedy this somewhat by keeping track of what the user
21495 does and coming up with actions that would reverse the actions the user
21496 takes.  When the user then presses the @code{undo} key, Gnus will run
21497 the code to reverse the previous action, or the previous actions.
21498 However, not all actions are easily reversible, so Gnus currently offers
21499 a few key functions to be undoable.  These include killing groups,
21500 yanking groups, and changing the list of read articles of groups.
21501 That's it, really.  More functions may be added in the future, but each
21502 added function means an increase in data to be stored, so Gnus will
21503 never be totally undoable.
21504
21505 @findex gnus-undo-mode
21506 @vindex gnus-use-undo
21507 @findex gnus-undo
21508 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21509 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21510 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21511 command, which should feel kinda like the normal Emacs @code{undo}
21512 command.
21513
21514
21515 @node Predicate Specifiers
21516 @section Predicate Specifiers
21517 @cindex predicate specifiers
21518
21519 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21520 form that allows flexible specification of predicates without having
21521 to type all that much.
21522
21523 These specifiers are lists consisting of functions, symbols and lists.
21524
21525 Here's an example:
21526
21527 @lisp
21528 (or gnus-article-unseen-p
21529     gnus-article-unread-p)
21530 @end lisp
21531
21532 The available symbols are @code{or}, @code{and} and @code{not}.  The
21533 functions all take one parameter.
21534
21535 @findex gnus-make-predicate
21536 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21537 to create a function that can be called.  This input parameter to this
21538 function will be passed along to all the functions in the predicate
21539 specifier.
21540
21541
21542 @node Moderation
21543 @section Moderation
21544 @cindex moderation
21545
21546 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21547 It is not included in the standard Gnus package.  Write a mail to
21548 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21549 get a copy.
21550
21551 The moderation package is implemented as a minor mode for summary
21552 buffers.  Put
21553
21554 @lisp
21555 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21556 @end lisp
21557
21558 in your @file{~/.gnus.el} file.
21559
21560 If you are the moderator of @samp{rec.zoofle}, this is how it's
21561 supposed to work:
21562
21563 @enumerate
21564 @item
21565 You split your incoming mail by matching on
21566 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21567 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21568
21569 @item
21570 You enter that group once in a while and post articles using the @kbd{e}
21571 (edit-and-post) or @kbd{s} (just send unedited) commands.
21572
21573 @item
21574 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21575 articles that weren't approved by you, you can cancel them with the
21576 @kbd{c} command.
21577 @end enumerate
21578
21579 To use moderation mode in these two groups, say:
21580
21581 @lisp
21582 (setq gnus-moderated-list
21583       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21584 @end lisp
21585
21586
21587 @node Image Enhancements
21588 @section Image Enhancements
21589
21590 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21591 support images yet.}, is able to display pictures and stuff, so Gnus has
21592 taken advantage of that.
21593
21594 @menu
21595 * X-Face::                      Display a funky, teensy black-and-white image.
21596 * Face::                        Display a funkier, teensier colored image.
21597 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21598 * Picons::                      How to display pictures of what you're reading.
21599 * XVarious::                    Other XEmacsy Gnusey variables.
21600 @end menu
21601
21602
21603 @node X-Face
21604 @subsection X-Face
21605 @cindex x-face
21606
21607 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21608 depth) image that's supposed to represent the author of the message.
21609 It seems to be supported by an ever-growing number of mail and news
21610 readers.
21611
21612 @cindex x-face
21613 @findex gnus-article-display-x-face
21614 @vindex gnus-article-x-face-command
21615 @vindex gnus-article-x-face-too-ugly
21616 @iftex
21617 @iflatex
21618 \include{xface}
21619 @end iflatex
21620 @end iftex
21621 @c @anchor{X-Face}
21622
21623 Decoding an @code{X-Face} header either requires an Emacs that has
21624 @samp{compface} support (which most XEmacs versions has), or that you
21625 have @samp{compface} installed on your system.  If either is true,
21626 Gnus will default to displaying @code{X-Face} headers.
21627
21628 The variable that controls this is the
21629 @code{gnus-article-x-face-command} variable.  If this variable is a
21630 string, this string will be executed in a sub-shell.  If it is a
21631 function, this function will be called with the face as the argument.
21632 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21633 the @code{From} header, the face will not be shown.
21634
21635 The default action under Emacs 20 is to fork off the @code{display}
21636 program@footnote{@code{display} is from the ImageMagick package.  For
21637 the @code{uncompface} and @code{icontopbm} programs look for a package
21638 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21639 view the face.
21640
21641 Under XEmacs or Emacs 21+ with suitable image support, the default
21642 action is to display the face before the @code{From} header.  (It's
21643 nicer if XEmacs has been compiled with @code{X-Face} support---that
21644 will make display somewhat faster.  If there's no native @code{X-Face}
21645 support, Gnus will try to convert the @code{X-Face} header using
21646 external programs from the @code{pbmplus} package and
21647 friends.@footnote{On a GNU/Linux system look for packages with names
21648 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21649
21650 (Note: @code{x-face} is used in the variable/function names, not
21651 @code{xface}).
21652
21653 Gnus provides a few convenience functions and variables to allow
21654 easier insertion of X-Face headers in outgoing messages.
21655
21656 @findex gnus-random-x-face
21657 @vindex gnus-convert-pbm-to-x-face-command
21658 @vindex gnus-x-face-directory
21659 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21660 @code{gnus-x-face-directory} and picks one at random, and then
21661 converts it to the X-Face format by using the
21662 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21663 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21664 header data as a string.
21665
21666 @findex gnus-insert-random-x-face-header
21667 @code{gnus-insert-random-x-face-header} calls
21668 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21669 randomly generated data.
21670
21671 @findex gnus-x-face-from-file
21672 @vindex gnus-convert-image-to-x-face-command
21673 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21674 converts the file to X-Face format by using the
21675 @code{gnus-convert-image-to-x-face-command} shell command.
21676
21677 Here's how you would typically use the first function.  Put something
21678 like the following in your @file{~/.gnus.el} file:
21679
21680 @lisp
21681 (setq message-required-news-headers
21682       (nconc message-required-news-headers
21683              (list '(X-Face . gnus-random-x-face))))
21684 @end lisp
21685
21686 Using the last function would be something like this:
21687
21688 @lisp
21689 (setq message-required-news-headers
21690       (nconc message-required-news-headers
21691              (list '(X-Face . (lambda ()
21692                                 (gnus-x-face-from-file
21693                                  "~/My-face.gif"))))))
21694 @end lisp
21695
21696
21697 @node Face
21698 @subsection Face
21699 @cindex face
21700
21701 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21702
21703 @code{Face} headers are essentially a funkier version of @code{X-Face}
21704 ones. They describe a 48x48 pixel colored image that's supposed to
21705 represent the author of the message.
21706
21707 @cindex face
21708 @findex gnus-article-display-face
21709 The contents of a @code{Face} header must be a base64 encoded PNG image.
21710 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21711 specifications.
21712
21713 Gnus provides a few convenience functions and variables to allow
21714 easier insertion of Face headers in outgoing messages.
21715
21716 @findex gnus-convert-png-to-face
21717 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21718 726 bytes long, and converts it to a face.
21719
21720 @findex gnus-face-from-file
21721 @vindex gnus-convert-image-to-face-command
21722 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21723 converts the file to Face format by using the
21724 @code{gnus-convert-image-to-face-command} shell command.
21725
21726 Here's how you would typically use this function. Put something like the
21727 following in your @file{~/.gnus.el} file:
21728
21729 @lisp
21730 (setq message-required-news-headers
21731       (nconc message-required-news-headers
21732              (list '(Face . (lambda ()
21733                               (gnus-face-from-file "~/face.jpg"))))))
21734 @end lisp
21735
21736
21737 @node Smileys
21738 @subsection Smileys
21739 @cindex smileys
21740
21741 @iftex
21742 @iflatex
21743 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21744 \input{smiley}
21745 @end iflatex
21746 @end iftex
21747
21748 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21749 currently the only package that uses Smiley, it is documented here.
21750
21751 In short---to use Smiley in Gnus, put the following in your
21752 @file{~/.gnus.el} file:
21753
21754 @lisp
21755 (setq gnus-treat-display-smileys t)
21756 @end lisp
21757
21758 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21759 the like---to pictures and displays those instead of the text smiley
21760 faces.  The conversion is controlled by a list of regexps that matches
21761 text and maps that to file names.
21762
21763 @vindex smiley-regexp-alist
21764 The alist used is specified by the @code{smiley-regexp-alist}
21765 variable.  The first item in each element is the regexp to be matched;
21766 the second element is the regexp match group that is to be replaced by
21767 the picture; and the third element is the name of the file to be
21768 displayed.
21769
21770 The following variables customize where Smiley will look for these
21771 files:
21772
21773 @table @code
21774
21775 @item smiley-data-directory
21776 @vindex smiley-data-directory
21777 Where Smiley will look for smiley faces files.
21778
21779 @item gnus-smiley-file-types
21780 @vindex gnus-smiley-file-types
21781 List of suffixes on smiley file names to try.
21782
21783 @end table
21784
21785
21786 @node Picons
21787 @subsection Picons
21788
21789 @iftex
21790 @iflatex
21791 \include{picons}
21792 @end iflatex
21793 @end iftex
21794
21795 So@dots{}  You want to slow down your news reader even more!  This is a
21796 good way to do so.  It's also a great way to impress people staring
21797 over your shoulder as you read news.
21798
21799 What are Picons?  To quote directly from the Picons Web site:
21800
21801 @iftex
21802 @iflatex
21803 \margindex{}
21804 @end iflatex
21805 @end iftex
21806
21807 @quotation
21808 @dfn{Picons} is short for ``personal icons''.  They're small,
21809 constrained images used to represent users and domains on the net,
21810 organized into databases so that the appropriate image for a given
21811 e-mail address can be found.  Besides users and domains, there are picon
21812 databases for Usenet newsgroups and weather forecasts.  The picons are
21813 in either monochrome @code{XBM} format or color @code{XPM} and
21814 @code{GIF} formats.
21815 @end quotation
21816
21817 @vindex gnus-picon-databases
21818 For instructions on obtaining and installing the picons databases,
21819 point your Web browser at
21820 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21821
21822 If you are using Debian GNU/Linux, saying @samp{apt-get install
21823 picons.*} will install the picons where Gnus can find them.
21824
21825 To enable displaying picons, simply make sure that
21826 @code{gnus-picon-databases} points to the directory containing the
21827 Picons databases.
21828
21829 The following variables offer control over where things are located.
21830
21831 @table @code
21832
21833 @item gnus-picon-databases
21834 @vindex gnus-picon-databases
21835 The location of the picons database.  This is a list of directories
21836 containing the @file{news}, @file{domains}, @file{users} (and so on)
21837 subdirectories.  Defaults to @code{("/usr/lib/picon"
21838 "/usr/local/faces")}.
21839
21840 @item gnus-picon-news-directories
21841 @vindex gnus-picon-news-directories
21842 List of subdirectories to search in @code{gnus-picon-databases} for
21843 newsgroups faces.  @code{("news")} is the default.
21844
21845 @item gnus-picon-user-directories
21846 @vindex gnus-picon-user-directories
21847 List of subdirectories to search in @code{gnus-picon-databases} for user
21848 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21849
21850 @item gnus-picon-domain-directories
21851 @vindex gnus-picon-domain-directories
21852 List of subdirectories to search in @code{gnus-picon-databases} for
21853 domain name faces.  Defaults to @code{("domains")}.  Some people may
21854 want to add @samp{"unknown"} to this list.
21855
21856 @item gnus-picon-file-types
21857 @vindex gnus-picon-file-types
21858 Ordered list of suffixes on picon file names to try.  Defaults to
21859 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21860
21861 @end table
21862
21863
21864 @node XVarious
21865 @subsection Various XEmacs Variables
21866
21867 @table @code
21868 @item gnus-xmas-glyph-directory
21869 @vindex gnus-xmas-glyph-directory
21870 This is where Gnus will look for pictures.  Gnus will normally
21871 auto-detect this directory, but you may set it manually if you have an
21872 unusual directory structure.
21873
21874 @item gnus-xmas-logo-color-alist
21875 @vindex gnus-xmas-logo-color-alist
21876 This is an alist where the key is a type symbol and the values are the
21877 foreground and background color of the splash page glyph.
21878
21879 @item gnus-xmas-logo-color-style
21880 @vindex gnus-xmas-logo-color-style
21881 This is the key used to look up the color in the alist described above.
21882 Valid values include @code{flame}, @code{pine}, @code{moss},
21883 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21884 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21885
21886 @item gnus-xmas-modeline-glyph
21887 @vindex gnus-xmas-modeline-glyph
21888 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21889 default.
21890
21891 @end table
21892
21893 @subsubsection Toolbar
21894
21895 @table @code
21896
21897 @item gnus-use-toolbar
21898 @vindex gnus-use-toolbar
21899 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21900 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21901 @code{right-toolbar}, or @code{left-toolbar}.
21902
21903 @item gnus-group-toolbar
21904 @vindex gnus-group-toolbar
21905 The toolbar in the group buffer.
21906
21907 @item gnus-summary-toolbar
21908 @vindex gnus-summary-toolbar
21909 The toolbar in the summary buffer.
21910
21911 @item gnus-summary-mail-toolbar
21912 @vindex gnus-summary-mail-toolbar
21913 The toolbar in the summary buffer of mail groups.
21914
21915 @end table
21916
21917 @iftex
21918 @iflatex
21919 \margindex{}
21920 @end iflatex
21921 @end iftex
21922
21923
21924 @node Fuzzy Matching
21925 @section Fuzzy Matching
21926 @cindex fuzzy matching
21927
21928 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21929 things like scoring, thread gathering and thread comparison.
21930
21931 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21932 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21933 means, and the implementation has changed over time.
21934
21935 Basically, it tries to remove all noise from lines before comparing.
21936 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21937 out of the strings before comparing the results.  This often leads to
21938 adequate results---even when faced with strings generated by text
21939 manglers masquerading as newsreaders.
21940
21941
21942 @node Thwarting Email Spam
21943 @section Thwarting Email Spam
21944 @cindex email spam
21945 @cindex spam
21946 @cindex UCE
21947 @cindex unsolicited commercial email
21948
21949 In these last days of the Usenet, commercial vultures are hanging about
21950 and grepping through news like crazy to find email addresses they can
21951 foist off their scams and products to.  As a reaction to this, many
21952 people have started putting nonsense addresses into their @code{From}
21953 lines.  I think this is counterproductive---it makes it difficult for
21954 people to send you legitimate mail in response to things you write, as
21955 well as making it difficult to see who wrote what.  This rewriting may
21956 perhaps be a bigger menace than the unsolicited commercial email itself
21957 in the end.
21958
21959 The biggest problem I have with email spam is that it comes in under
21960 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21961 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21962 mail group, only to find two pyramid schemes, seven advertisements
21963 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21964 and one mail asking me to repent and find some god.
21965
21966 This is annoying.  Here's what you can do about it.
21967
21968 @menu
21969 * The problem of spam::         Some background, and some solutions
21970 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21971 * SpamAssassin::                How to use external anti-spam tools.
21972 * Hashcash::                    Reduce spam by burning CPU time.
21973 * Filtering Spam Using The Spam ELisp Package::
21974 * Filtering Spam Using Statistics with spam-stat::
21975 @end menu
21976
21977 @node The problem of spam
21978 @subsection The problem of spam
21979 @cindex email spam
21980 @cindex spam filtering approaches
21981 @cindex filtering approaches, spam
21982 @cindex UCE
21983 @cindex unsolicited commercial email
21984
21985 First, some background on spam.
21986
21987 If you have access to e-mail, you are familiar with spam (technically
21988 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21989 because e-mail delivery is very cheap compared to paper mail, so only
21990 a very small percentage of people need to respond to an UCE to make it
21991 worthwhile to the advertiser.  Ironically, one of the most common
21992 spams is the one offering a database of e-mail addresses for further
21993 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21994 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21995
21996 Spam comes from a wide variety of sources.  It is simply impossible to
21997 dispose of all spam without discarding useful messages.  A good
21998 example is the TMDA system, which requires senders
21999 unknown to you to confirm themselves as legitimate senders before
22000 their e-mail can reach you.  Without getting into the technical side
22001 of TMDA, a downside is clearly that e-mail from legitimate sources may
22002 be discarded if those sources can't or won't confirm themselves
22003 through the TMDA system.  Another problem with TMDA is that it
22004 requires its users to have a basic understanding of e-mail delivery
22005 and processing.
22006
22007 The simplest approach to filtering spam is filtering.  If you get 200
22008 spam messages per day from @samp{random-address@@vmadmin.com}, you
22009 block @samp{vmadmin.com}.  If you get 200 messages about
22010 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22011 message.  This, unfortunately, is a great way to discard legitimate
22012 e-mail.  For instance, the very informative and useful RISKS digest
22013 has been blocked by overzealous mail filters because it
22014 @strong{contained} words that were common in spam messages.
22015 Nevertheless, in isolated cases, with great care, direct filtering of
22016 mail can be useful.
22017
22018 Another approach to filtering e-mail is the distributed spam
22019 processing, for instance DCC implements such a system.  In essence,
22020 @var{N} systems around the world agree that a machine @var{X} in
22021 China, Ghana, or California is sending out spam e-mail, and these
22022 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22023 a database.  The criteria for spam detection vary---it may be the
22024 number of messages sent, the content of the messages, and so on.  When
22025 a user of the distributed processing system wants to find out if a
22026 message is spam, he consults one of those @var{N} systems.
22027
22028 Distributed spam processing works very well against spammers that send
22029 a large number of messages at once, but it requires the user to set up
22030 fairly complicated checks.  There are commercial and free distributed
22031 spam processing systems.  Distributed spam processing has its risks as
22032 well.  For instance legitimate e-mail senders have been accused of
22033 sending spam, and their web sites have been shut down for some time
22034 because of the incident.
22035
22036 The statistical approach to spam filtering is also popular.  It is
22037 based on a statistical analysis of previous spam messages.  Usually
22038 the analysis is a simple word frequency count, with perhaps pairs of
22039 words or 3-word combinations thrown into the mix.  Statistical
22040 analysis of spam works very well in most of the cases, but it can
22041 classify legitimate e-mail as spam in some cases.  It takes time to
22042 run the analysis, the full message must be analyzed, and the user has
22043 to store the database of spam analyses.
22044
22045 @node Anti-Spam Basics
22046 @subsection Anti-Spam Basics
22047 @cindex email spam
22048 @cindex spam
22049 @cindex UCE
22050 @cindex unsolicited commercial email
22051
22052 One way of dealing with spam is having Gnus split out all spam into a
22053 @samp{spam} mail group (@pxref{Splitting Mail}).
22054
22055 First, pick one (1) valid mail address that you can be reached at, and
22056 put it in your @code{From} header of all your news articles.  (I've
22057 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22058 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22059 sysadmin whether your sendmail installation accepts keywords in the local
22060 part of the mail address.)
22061
22062 @lisp
22063 (setq message-default-news-headers
22064       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22065 @end lisp
22066
22067 Then put the following split rule in @code{nnmail-split-fancy}
22068 (@pxref{Fancy Mail Splitting}):
22069
22070 @lisp
22071 (
22072  ...
22073  (to "larsi@@trym.ifi.uio.no"
22074       (| ("subject" "re:.*" "misc")
22075          ("references" ".*@@.*" "misc")
22076          "spam"))
22077  ...
22078 )
22079 @end lisp
22080
22081 This says that all mail to this address is suspect, but if it has a
22082 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22083 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22084 (This idea probably comes from Tim Pierce.)
22085
22086 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22087 and do not include your email address explicitly in the @code{To}
22088 header.  Why they do this is unknown---perhaps it's to thwart this
22089 thwarting scheme?  In any case, this is trivial to deal with---you just
22090 put anything not addressed to you in the @samp{spam} group by ending
22091 your fancy split rule in this way:
22092
22093 @lisp
22094 (
22095  ...
22096  (to "larsi" "misc")
22097  "spam")
22098 @end lisp
22099
22100 In my experience, this will sort virtually everything into the right
22101 group.  You still have to check the @samp{spam} group from time to time to
22102 check for legitimate mail, though.  If you feel like being a good net
22103 citizen, you can even send off complaints to the proper authorities on
22104 each unsolicited commercial email---at your leisure.
22105
22106 This works for me.  It allows people an easy way to contact me (they can
22107 just press @kbd{r} in the usual way), and I'm not bothered at all with
22108 spam.  It's a win-win situation.  Forging @code{From} headers to point
22109 to non-existent domains is yucky, in my opinion.
22110
22111
22112
22113 @node SpamAssassin
22114 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22115 @cindex SpamAssassin
22116 @cindex Vipul's Razor
22117 @cindex DCC
22118
22119 The days where the hints in the previous section was sufficient in
22120 avoiding spam are coming to an end.  There are many tools out there
22121 that claim to reduce the amount of spam you get.  This section could
22122 easily become outdated fast, as new products replace old, but
22123 fortunately most of these tools seem to have similar interfaces.  Even
22124 though this section will use SpamAssassin as an example, it should be
22125 easy to adapt it to most other tools.
22126
22127 If the tool you are using is not installed on the mail server, you
22128 need to invoke it yourself.  Ideas on how to use the
22129 @code{:postscript} mail source parameter (@pxref{Mail Source
22130 Specifiers}) follow.
22131
22132 @lisp
22133 (setq mail-sources
22134       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22135         (pop :user "jrl"
22136              :server "pophost"
22137              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22138 @end lisp
22139
22140 Once you manage to process your incoming spool somehow, thus making
22141 the mail contain e.g.@: a header indicating it is spam, you are ready to
22142 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22143
22144 @lisp
22145 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22146                              ...))
22147 @end lisp
22148
22149 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22150
22151 @lisp
22152 (setq nnmail-split-methods 'nnmail-split-fancy
22153       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22154                              ...))
22155 @end lisp
22156
22157 Some people might not like the idea of piping the mail through various
22158 programs using a @code{:prescript} (if some program is buggy, you
22159 might lose all mail).  If you are one of them, another solution is to
22160 call the external tools during splitting.  Example fancy split method:
22161
22162 @lisp
22163 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22164                              ...))
22165 (defun kevin-spamassassin ()
22166   (save-excursion
22167     (let ((buf (or (get-buffer " *nnmail incoming*")
22168                    (get-buffer " *nnml move*"))))
22169       (if (not buf)
22170           (progn (message "Oops, cannot find message buffer") nil)
22171         (set-buffer buf)
22172         (if (eq 1 (call-process-region (point-min) (point-max)
22173                                        "spamc" nil nil nil "-c"))
22174             "spam")))))
22175 @end lisp
22176
22177 That is about it.  As some spam is likely to get through anyway, you
22178 might want to have a nifty function to call when you happen to read
22179 spam.  And here is the nifty function:
22180
22181 @lisp
22182  (defun my-gnus-raze-spam ()
22183   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22184   (interactive)
22185   (gnus-summary-show-raw-article)
22186   (gnus-summary-save-in-pipe "razor-report -f -d")
22187   (gnus-summary-mark-as-expirable 1))
22188 @end lisp
22189
22190 @node Hashcash
22191 @subsection Hashcash
22192 @cindex hashcash
22193
22194 A novel technique to fight spam is to require senders to do something
22195 costly for each message they send.  This has the obvious drawback that
22196 you cannot rely on everyone in the world using this technique,
22197 since it is not part of the Internet standards, but it may be useful
22198 in smaller communities.
22199
22200 While the tools in the previous section work well in practice, they
22201 work only because the tools are constantly maintained and updated as
22202 new form of spam appears.  This means that a small percentage of spam
22203 will always get through.  It also means that somewhere, someone needs
22204 to read lots of spam to update these tools.  Hashcash avoids that, but
22205 instead requires that everyone you communicate with supports the
22206 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22207 The approaches have their own advantages and disadvantages, but as
22208 often in the real world, a combination of them is stronger than either
22209 one of them separately.
22210
22211 @cindex X-Hashcash
22212 The ``something costly'' is to burn CPU time, more specifically to
22213 compute a hash collision up to a certain number of bits.  The
22214 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22215 header.  For more details, and for the external application
22216 @code{hashcash} you need to install to use this feature, see
22217 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22218 information can be found at @uref{http://www.camram.org/}.
22219
22220 If you wish to call hashcash for each message you send, say something
22221 like:
22222
22223 @lisp
22224 (require 'hashcash)
22225 (add-hook 'message-send-hook 'mail-add-payment)
22226 @end lisp
22227
22228 The @file{hashcash.el} library can be found in the Gnus development
22229 contrib directory or at
22230 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22231
22232 You will need to set up some additional variables as well:
22233
22234 @table @code
22235
22236 @item hashcash-default-payment
22237 @vindex hashcash-default-payment
22238 This variable indicates the default number of bits the hash collision
22239 should consist of.  By default this is 0, meaning nothing will be
22240 done.  Suggested useful values include 17 to 29.
22241
22242 @item hashcash-payment-alist
22243 @vindex hashcash-payment-alist
22244 Some receivers may require you to spend burn more CPU time than the
22245 default.  This variable contains a list of @samp{(@var{addr}
22246 @var{amount})} cells, where @var{addr} is the receiver (email address
22247 or newsgroup) and @var{amount} is the number of bits in the collision
22248 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22249 @var{amount})} cells, where the @var{string} is the string to use
22250 (normally the email address or newsgroup name is used).
22251
22252 @item hashcash
22253 @vindex hashcash
22254 Where the @code{hashcash} binary is installed.
22255
22256 @end table
22257
22258 Currently there is no built in functionality in Gnus to verify
22259 hashcash cookies, it is expected that this is performed by your hand
22260 customized mail filtering scripts.  Improvements in this area would be
22261 a useful contribution, however.
22262
22263 @node Filtering Spam Using The Spam ELisp Package
22264 @subsection Filtering Spam Using The Spam ELisp Package
22265 @cindex spam filtering
22266 @cindex spam
22267
22268 The idea behind @file{spam.el} is to have a control center for spam detection
22269 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22270 filters incoming mail, and it analyzes mail known to be spam or ham.
22271 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22272 non-spam messages.
22273
22274 So, what happens when you load @file{spam.el}?  First of all, you get
22275 the following keyboard commands:
22276
22277 @table @kbd
22278
22279 @item M-d
22280 @itemx M s x
22281 @itemx S x
22282 @kindex M-d
22283 @kindex S x
22284 @kindex M s x
22285 @findex gnus-summary-mark-as-spam
22286 @code{gnus-summary-mark-as-spam}.
22287
22288 Mark current article as spam, showing it with the @samp{$} mark.
22289 Whenever you see a spam article, make sure to mark its summary line
22290 with @kbd{M-d} before leaving the group.  This is done automatically
22291 for unread articles in @emph{spam} groups.
22292
22293 @item M s t
22294 @itemx S t
22295 @kindex M s t
22296 @kindex S t
22297 @findex spam-bogofilter-score
22298 @code{spam-bogofilter-score}.
22299
22300 You must have Bogofilter installed for that command to work properly.
22301
22302 @xref{Bogofilter}.
22303
22304 @end table
22305
22306 Also, when you load @file{spam.el}, you will be able to customize its
22307 variables.  Try @code{customize-group} on the @samp{spam} variable
22308 group.
22309
22310 @vindex gnus-spam-process-newsgroups
22311 The concepts of ham processors and spam processors are very important.
22312 Ham processors and spam processors for a group can be set with the
22313 @code{spam-process} group parameter, or the
22314 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22315 mail known to be non-spam (@emph{ham}) and process it in some way so
22316 that later similar mail will also be considered non-spam.  Spam
22317 processors take mail known to be spam and process it so similar spam
22318 will be detected later.
22319
22320 @vindex gnus-spam-newsgroup-contents
22321 Gnus learns from the spam you get.  You have to collect your spam in
22322 one or more spam groups, and set or customize the variable
22323 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22324 groups to contain spam by setting their group parameter
22325 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22326 by customizing the corresponding variable
22327 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22328 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22329 also be used to declare groups as @emph{ham} groups if you set their
22330 classification to @code{gnus-group-spam-classification-ham}.  If
22331 groups are not classified by means of @code{spam-junk-mailgroups},
22332 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22333 considered @emph{unclassified}.  All groups are unclassified by
22334 default.
22335
22336 @vindex gnus-spam-mark
22337 @cindex $
22338 In spam groups, all messages are considered to be spam by default:
22339 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22340 group.  If you have seen a message, had it marked as spam, then
22341 unmarked it, it won't be marked as spam when you enter the group
22342 thereafter.  You can disable that behavior, so all unread messages
22343 will get the @samp{$} mark, if you set the
22344 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22345 remove the @samp{$} mark when you are in the group summary buffer for
22346 every message that is not spam after all.  To remove the @samp{$}
22347 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22348 declaring it read the non-spam way.  When you leave a group, all
22349 spam-marked (@samp{$}) articles are sent to a spam processor which
22350 will study them as spam samples.
22351
22352 Messages may also be deleted in various other ways, and unless
22353 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22354 and @samp{r} for default read or explicit delete, marks @samp{X} and
22355 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22356 low scores, are all considered to be associated with articles which
22357 are not spam.  This assumption might be false, in particular if you
22358 use kill files or score files as means for detecting genuine spam, you
22359 should then adjust the @code{ham-marks} group parameter.
22360
22361 @defvar ham-marks
22362 You can customize this group or topic parameter to be the list of
22363 marks you want to consider ham.  By default, the list contains the
22364 deleted, read, killed, kill-filed, and low-score marks.
22365 @end defvar
22366
22367 @defvar spam-marks
22368 You can customize this group or topic parameter to be the list of
22369 marks you want to consider spam.  By default, the list contains only
22370 the spam mark.
22371 @end defvar
22372
22373 When you leave @emph{any} group, regardless of its
22374 @code{spam-contents} classification, all spam-marked articles are sent
22375 to a spam processor, which will study these as spam samples.  If you
22376 explicit kill a lot, you might sometimes end up with articles marked
22377 @samp{K} which you never saw, and which might accidentally contain
22378 spam.  Best is to make sure that real spam is marked with @samp{$},
22379 and nothing else.
22380
22381 @vindex gnus-ham-process-destinations
22382 When you leave a @emph{spam} group, all spam-marked articles are
22383 marked as expired after processing with the spam processor.  This is
22384 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22385 @strong{ham} articles in a spam group will be moved to a location
22386 determined by either the @code{ham-process-destination} group
22387 parameter or a match in the @code{gnus-ham-process-destinations}
22388 variable, which is a list of regular expressions matched with group
22389 names (it's easiest to customize this variable with
22390 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22391 location is a group name.  If the @code{ham-process-destination}
22392 parameter is not set, ham articles are left in place.  If the
22393 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22394 set, the ham articles are marked as unread before being moved.
22395
22396 When you leave a @emph{ham} group, all ham-marked articles are sent to
22397 a ham processor, which will study these as non-spam samples.
22398
22399 @vindex gnus-spam-process-destinations
22400 When you leave a @emph{ham} or @emph{unclassified} group, all
22401 @strong{spam} articles are moved to a location determined by either
22402 the @code{spam-process-destination} group parameter or a match in the
22403 @code{gnus-spam-process-destinations} variable, which is a list of
22404 regular expressions matched with group names (it's easiest to
22405 customize this variable with @code{customize-variable
22406 gnus-spam-process-destinations}).  The ultimate location is a group
22407 name.  If the @code{spam-process-destination} parameter is not set,
22408 the spam articles are only expired.
22409
22410 To use the @file{spam.el} facilities for incoming mail filtering, you
22411 must add the following to your fancy split list
22412 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22413
22414 @example
22415 (: spam-split)
22416 @end example
22417
22418 Note that the fancy split may be called @code{nnmail-split-fancy} or
22419 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22420 nnimap back ends to retrieve your mail.
22421
22422 The @code{spam-split} function will process incoming mail and send the
22423 mail considered to be spam into the group name given by the variable
22424 @code{spam-split-group}.  By default that group name is @samp{spam},
22425 but you can customize @code{spam-split-group}.
22426
22427 You can also give @code{spam-split} a parameter,
22428 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22429
22430 Take these split rules (with @code{spam-use-regex-headers} and
22431 @code{spam-use-blackholes} set):
22432
22433 @example
22434  nnimap-split-fancy '(|
22435                       (any "ding" "ding")
22436                       (: spam-split)
22437                       ;; default mailbox
22438                       "mail")
22439 @end example
22440
22441 Now, the problem is that you want all ding messages to make it to the
22442 ding folder.  But that will let obvious spam (for example, spam
22443 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22444 when it's sent to the ding list.  On the other hand, some messages to
22445 the ding list are from a mail server in the blackhole list, so the
22446 invocation of @code{spam-split} can't be before the ding rule.
22447
22448 You can let SpamAssassin headers supercede ding rules, but all other
22449 @code{spam-split} rules (including a second invocation of the
22450 regex-headers check) will be after the ding rule:
22451
22452 @example
22453  nnimap-split-fancy '(|
22454                       (: spam-split 'spam-use-regex-headers)
22455                       (any "ding" "ding")
22456                       (: spam-split)
22457                       ;; default mailbox
22458                       "mail")
22459 @end example
22460
22461 Basically, this lets you invoke specific @code{spam-split} checks
22462 depending on your particular needs.  You don't have to throw all mail
22463 into all the spam tests.  Another reason why this is nice is that
22464 messages to mailing lists you have rules for don't have to have
22465 resource-intensive blackhole checks performed on them.  You could also
22466 specify different spam checks for your nnmail split vs. your nnimap
22467 split.  Go crazy.
22468
22469 You still have to have specific checks such as
22470 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22471 invoke @code{spam-split} with the check.  The reason is that when
22472 loading @file{spam.el}, some conditional loading is done depending on
22473 what @code{spam-use-xyz} variables you have set.
22474
22475 @emph{Note for IMAP users}
22476
22477 The boolean variable @code{nnimap-split-download-body} needs to be
22478 set, if you want to split based on the whole message instead of just
22479 the headers.  By default, the nnimap back end will only retrieve the
22480 message headers.  If you use @code{spam-check-bogofilter},
22481 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22482 can benefit from the full message body), you should set this variable.
22483 It is not set by default because it will slow @acronym{IMAP} down, and
22484 that is not an appropriate decision to make on behalf of the user.
22485
22486 @xref{Splitting in IMAP}.
22487
22488 @emph{TODO: Currently, spam.el only supports insertion of articles
22489 into a back end.  There is no way to tell spam.el that an article is no
22490 longer spam or ham.}
22491
22492 @emph{TODO: spam.el needs to provide a uniform way of training all the
22493 statistical databases.  Some have that functionality built-in, others
22494 don't.}
22495
22496 The following are the methods you can use to control the behavior of
22497 @code{spam-split} and their corresponding spam and ham processors:
22498
22499 @menu
22500 * Blacklists and Whitelists::
22501 * BBDB Whitelists::
22502 * Gmane Spam Reporting::
22503 * Anti-spam Hashcash Payments::
22504 * Blackholes::
22505 * Regular Expressions Header Matching::
22506 * Bogofilter::
22507 * ifile spam filtering::
22508 * spam-stat spam filtering::
22509 * SpamOracle::
22510 * Extending the spam elisp package::
22511 @end menu
22512
22513 @node Blacklists and Whitelists
22514 @subsubsection Blacklists and Whitelists
22515 @cindex spam filtering
22516 @cindex whitelists, spam filtering
22517 @cindex blacklists, spam filtering
22518 @cindex spam
22519
22520 @defvar spam-use-blacklist
22521
22522 Set this variable to @code{t} if you want to use blacklists when
22523 splitting incoming mail.  Messages whose senders are in the blacklist
22524 will be sent to the @code{spam-split-group}.  This is an explicit
22525 filter, meaning that it acts only on mail senders @emph{declared} to
22526 be spammers.
22527
22528 @end defvar
22529
22530 @defvar spam-use-whitelist
22531
22532 Set this variable to @code{t} if you want to use whitelists when
22533 splitting incoming mail.  Messages whose senders are not in the
22534 whitelist will be sent to the next spam-split rule.  This is an
22535 explicit filter, meaning that unless someone is in the whitelist, their
22536 messages are not assumed to be spam or ham.
22537
22538 @end defvar
22539
22540 @defvar spam-use-whitelist-exclusive
22541
22542 Set this variable to @code{t} if you want to use whitelists as an
22543 implicit filter, meaning that every message will be considered spam
22544 unless the sender is in the whitelist.  Use with care.
22545
22546 @end defvar
22547
22548 @defvar gnus-group-spam-exit-processor-blacklist
22549
22550 Add this symbol to a group's @code{spam-process} parameter by
22551 customizing the group parameters or the
22552 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22553 added to a group's @code{spam-process} parameter, the senders of
22554 spam-marked articles will be added to the blacklist.
22555
22556 @end defvar
22557
22558 @defvar gnus-group-ham-exit-processor-whitelist
22559
22560 Add this symbol to a group's @code{spam-process} parameter by
22561 customizing the group parameters or the
22562 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22563 added to a group's @code{spam-process} parameter, the senders of
22564 ham-marked articles in @emph{ham} groups will be added to the
22565 whitelist.  Note that this ham processor has no effect in @emph{spam}
22566 or @emph{unclassified} groups.
22567
22568 @end defvar
22569
22570 Blacklists are lists of regular expressions matching addresses you
22571 consider to be spam senders.  For instance, to block mail from any
22572 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22573 blacklist.  You start out with an empty blacklist.  Blacklist entries
22574 use the Emacs regular expression syntax.
22575
22576 Conversely, whitelists tell Gnus what addresses are considered
22577 legitimate.  All messages from whitelisted addresses are considered
22578 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22579 Emacs regular expression syntax.
22580
22581 The blacklist and whitelist file locations can be customized with the
22582 @code{spam-directory} variable (@file{~/News/spam} by default), or
22583 the @code{spam-whitelist} and @code{spam-blacklist} variables
22584 directly.  The whitelist and blacklist files will by default be in the
22585 @code{spam-directory} directory, named @file{whitelist} and
22586 @file{blacklist} respectively.
22587
22588 @node BBDB Whitelists
22589 @subsubsection BBDB Whitelists
22590 @cindex spam filtering
22591 @cindex BBDB whitelists, spam filtering
22592 @cindex BBDB, spam filtering
22593 @cindex spam
22594
22595 @defvar spam-use-BBDB
22596
22597 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22598 Whitelists}), but uses the BBDB as the source of whitelisted
22599 addresses, without regular expressions.  You must have the BBDB loaded
22600 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22601 not in the BBDB will be sent to the next spam-split rule.  This is an
22602 explicit filter, meaning that unless someone is in the BBDB, their
22603 messages are not assumed to be spam or ham.
22604
22605 @end defvar
22606
22607 @defvar spam-use-BBDB-exclusive
22608
22609 Set this variable to @code{t} if you want to use the BBDB as an
22610 implicit filter, meaning that every message will be considered spam
22611 unless the sender is in the BBDB.  Use with care.  Only sender
22612 addresses in the BBDB will be allowed through; all others will be
22613 classified as spammers.
22614
22615 @end defvar
22616
22617 @defvar gnus-group-ham-exit-processor-BBDB
22618
22619 Add this symbol to a group's @code{spam-process} parameter by
22620 customizing the group parameters or the
22621 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22622 added to a group's @code{spam-process} parameter, the senders of
22623 ham-marked articles in @emph{ham} groups will be added to the
22624 BBDB.  Note that this ham processor has no effect in @emph{spam}
22625 or @emph{unclassified} groups.
22626
22627 @end defvar
22628
22629 @node Gmane Spam Reporting
22630 @subsubsection Gmane Spam Reporting
22631 @cindex spam reporting
22632 @cindex Gmane, spam reporting
22633 @cindex Gmane, spam reporting
22634 @cindex spam
22635
22636 @defvar gnus-group-spam-exit-processor-report-gmane
22637
22638 Add this symbol to a group's @code{spam-process} parameter by
22639 customizing the group parameters or the
22640 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22641 added to a group's @code{spam-process} parameter, the spam-marked
22642 articles groups will be reported to the Gmane administrators.
22643
22644 @end defvar
22645
22646 @node Anti-spam Hashcash Payments
22647 @subsubsection Anti-spam Hashcash Payments
22648 @cindex spam filtering
22649 @cindex hashcash, spam filtering
22650 @cindex spam
22651
22652 @defvar spam-use-hashcash
22653
22654 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22655 Whitelists}), but uses hashcash tokens for whitelisting messages
22656 instead of the sender address.  You must have the @code{hashcash.el}
22657 package loaded for @code{spam-use-hashcash} to work properly.
22658 Messages without a hashcash payment token will be sent to the next
22659 spam-split rule.  This is an explicit filter, meaning that unless a
22660 hashcash token is found, the messages are not assumed to be spam or
22661 ham.
22662
22663 @end defvar
22664
22665 @node Blackholes
22666 @subsubsection Blackholes
22667 @cindex spam filtering
22668 @cindex blackholes, spam filtering
22669 @cindex spam
22670
22671 @defvar spam-use-blackholes
22672
22673 This option is disabled by default.  You can let Gnus consult the
22674 blackhole-type distributed spam processing systems (DCC, for instance)
22675 when you set this option.  The variable @code{spam-blackhole-servers}
22676 holds the list of blackhole servers Gnus will consult.  The current
22677 list is fairly comprehensive, but make sure to let us know if it
22678 contains outdated servers.
22679
22680 The blackhole check uses the @code{dig.el} package, but you can tell
22681 @file{spam.el} to use @code{dns.el} instead for better performance if
22682 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22683 this time to set @code{spam-use-dig} to @code{nil} despite the
22684 possible performance improvements, because some users may be unable to
22685 use it, but you can try it and see if it works for you.
22686
22687 @end defvar
22688
22689 @defvar spam-blackhole-servers
22690
22691 The list of servers to consult for blackhole checks.
22692
22693 @end defvar
22694
22695 @defvar spam-blackhole-good-server-regex
22696
22697 A regular expression for IPs that should not be checked against the
22698 blackhole server list.  When set to @code{nil}, it has no effect.
22699
22700 @end defvar
22701
22702 @defvar spam-use-dig
22703
22704 Use the @code{dig.el} package instead of the @code{dns.el} package.
22705 The default setting of @code{t} is recommended.
22706
22707 @end defvar
22708
22709 Blackhole checks are done only on incoming mail.  There is no spam or
22710 ham processor for blackholes.
22711
22712 @node Regular Expressions Header Matching
22713 @subsubsection Regular Expressions Header Matching
22714 @cindex spam filtering
22715 @cindex regular expressions header matching, spam filtering
22716 @cindex spam
22717
22718 @defvar spam-use-regex-headers
22719
22720 This option is disabled by default.  You can let Gnus check the
22721 message headers against lists of regular expressions when you set this
22722 option.  The variables @code{spam-regex-headers-spam} and
22723 @code{spam-regex-headers-ham} hold the list of regular expressions.
22724 Gnus will check against the message headers to determine if the
22725 message is spam or ham, respectively.
22726
22727 @end defvar
22728
22729 @defvar spam-regex-headers-spam
22730
22731 The list of regular expressions that, when matched in the headers of
22732 the message, positively identify it as spam.
22733
22734 @end defvar
22735
22736 @defvar spam-regex-headers-ham
22737
22738 The list of regular expressions that, when matched in the headers of
22739 the message, positively identify it as ham.
22740
22741 @end defvar
22742
22743 Regular expression header checks are done only on incoming mail.
22744 There is no specific spam or ham processor for regular expressions.
22745
22746 @node Bogofilter
22747 @subsubsection Bogofilter
22748 @cindex spam filtering
22749 @cindex bogofilter, spam filtering
22750 @cindex spam
22751
22752 @defvar spam-use-bogofilter
22753
22754 Set this variable if you want @code{spam-split} to use Eric Raymond's
22755 speedy Bogofilter.
22756
22757 With a minimum of care for associating the @samp{$} mark for spam
22758 articles only, Bogofilter training all gets fairly automatic.  You
22759 should do this until you get a few hundreds of articles in each
22760 category, spam or not.  The command @kbd{S t} in summary mode, either
22761 for debugging or for curiosity, shows the @emph{spamicity} score of
22762 the current article (between 0.0 and 1.0).
22763
22764 Bogofilter determines if a message is spam based on a specific
22765 threshold.  That threshold can be customized, consult the Bogofilter
22766 documentation.
22767
22768 If the @code{bogofilter} executable is not in your path, Bogofilter
22769 processing will be turned off.
22770
22771 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22772
22773 @end defvar
22774
22775 @defvar spam-use-bogofilter-headers
22776
22777 Set this variable if you want @code{spam-split} to use Eric Raymond's
22778 speedy Bogofilter, looking only at the message headers.  It works
22779 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22780 must be in the message already.  Normally you would do this with a
22781 procmail recipe or something similar; consult the Bogofilter
22782 installation documents for details.
22783
22784 You should not enable this if you use @code{spam-use-bogofilter}.
22785
22786 @end defvar
22787
22788 @defvar gnus-group-spam-exit-processor-bogofilter
22789 Add this symbol to a group's @code{spam-process} parameter by
22790 customizing the group parameters or the
22791 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22792 added to a group's @code{spam-process} parameter, spam-marked articles
22793 will be added to the Bogofilter spam database.
22794 @end defvar
22795
22796 @defvar gnus-group-ham-exit-processor-bogofilter
22797 Add this symbol to a group's @code{spam-process} parameter by
22798 customizing the group parameters or the
22799 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22800 added to a group's @code{spam-process} parameter, the ham-marked
22801 articles in @emph{ham} groups will be added to the Bogofilter database
22802 of non-spam messages.  Note that this ham processor has no effect in
22803 @emph{spam} or @emph{unclassified} groups.
22804 @end defvar
22805
22806 @defvar spam-bogofilter-database-directory
22807
22808 This is the directory where Bogofilter will store its databases.  It
22809 is not specified by default, so Bogofilter will use its own default
22810 database directory.
22811
22812 @end defvar
22813
22814 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22815 purpose.  A ham and a spam processor are provided, plus the
22816 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22817 variables to indicate to spam-split that Bogofilter should either be
22818 used, or has already been used on the article.  The 0.9.2.1 version of
22819 Bogofilter was used to test this functionality.
22820
22821 @node ifile spam filtering
22822 @subsubsection ifile spam filtering
22823 @cindex spam filtering
22824 @cindex ifile, spam filtering
22825 @cindex spam
22826
22827 @defvar spam-use-ifile
22828
22829 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22830 statistical analyzer similar to Bogofilter.
22831
22832 @end defvar
22833
22834 @defvar spam-ifile-all-categories
22835
22836 Enable this variable if you want @code{spam-use-ifile} to give you all
22837 the ifile categories, not just spam/non-spam.  If you use this, make
22838 sure you train ifile as described in its documentation.
22839
22840 @end defvar
22841
22842 @defvar spam-ifile-spam-category
22843
22844 This is the category of spam messages as far as ifile is concerned.
22845 The actual string used is irrelevant, but you probably want to leave
22846 the default value of @samp{spam}.
22847 @end defvar
22848
22849 @defvar spam-ifile-database-path
22850
22851 This is the filename for the ifile database.  It is not specified by
22852 default, so ifile will use its own default database name.
22853
22854 @end defvar
22855
22856 The ifile mail classifier is similar to Bogofilter in intent and
22857 purpose.  A ham and a spam processor are provided, plus the
22858 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22859 should be used.  The 1.2.1 version of ifile was used to test this
22860 functionality.
22861
22862 @node spam-stat spam filtering
22863 @subsubsection spam-stat spam filtering
22864 @cindex spam filtering
22865 @cindex spam-stat, spam filtering
22866 @cindex spam-stat
22867 @cindex spam
22868
22869 @xref{Filtering Spam Using Statistics with spam-stat}.
22870
22871 @defvar spam-use-stat
22872
22873 Enable this variable if you want @code{spam-split} to use
22874 spam-stat.el, an Emacs Lisp statistical analyzer.
22875
22876 @end defvar
22877
22878 @defvar gnus-group-spam-exit-processor-stat
22879 Add this symbol to a group's @code{spam-process} parameter by
22880 customizing the group parameters or the
22881 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22882 added to a group's @code{spam-process} parameter, the spam-marked
22883 articles will be added to the spam-stat database of spam messages.
22884 @end defvar
22885
22886 @defvar gnus-group-ham-exit-processor-stat
22887 Add this symbol to a group's @code{spam-process} parameter by
22888 customizing the group parameters or the
22889 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22890 added to a group's @code{spam-process} parameter, the ham-marked
22891 articles in @emph{ham} groups will be added to the spam-stat database
22892 of non-spam messages.  Note that this ham processor has no effect in
22893 @emph{spam} or @emph{unclassified} groups.
22894 @end defvar
22895
22896 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
22897 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
22898 which unlike ifile or Bogofilter does not require external programs.
22899 A spam and a ham processor, and the @code{spam-use-stat} variable for
22900 @code{spam-split} are provided.
22901
22902 @node SpamOracle
22903 @subsubsection Using SpamOracle with Gnus
22904 @cindex spam filtering
22905 @cindex SpamOracle
22906 @cindex spam
22907
22908 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
22909 statistical mail filtering tool written by Xavier Leroy and needs to be
22910 installed separately.
22911
22912 There are several ways to use SpamOracle with Gnus.  In all cases, your
22913 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
22914 then enter an @samp{X-Spam} header indicating whether it regards the
22915 mail as a spam mail or not.
22916
22917 One possibility is to run SpamOracle as a @code{:prescript} from the
22918 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
22919 the advantage that the user can see the @emph{X-Spam} headers.
22920
22921 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
22922 Using The Spam ELisp Package}) call SpamOracle.
22923
22924 @vindex spam-use-spamoracle
22925 To enable SpamOracle usage by @file{spam.el}, set the variable
22926 @code{spam-use-spamoracle} to @code{t} and configure the
22927 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
22928 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
22929 this example the @samp{INBOX} of an nnimap server is filtered using
22930 SpamOracle.  Mails recognized as spam mails will be moved to
22931 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
22932 in @samp{INBOX}:
22933
22934 @example
22935 (setq spam-use-spamoracle t
22936       spam-split-group "Junk"
22937       nnimap-split-inbox '("INBOX")
22938       nnimap-split-rule 'nnimap-split-fancy
22939       nnimap-split-fancy '(| (: spam-split) "INBOX"))
22940 @end example
22941
22942 @defvar spam-use-spamoracle
22943 Set to @code{t} if you want Gnus to enable spam filtering using
22944 SpamOracle.
22945 @end defvar
22946
22947 @defvar spam-spamoracle-binary
22948 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
22949 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
22950 can be customized.
22951 @end defvar
22952
22953 @defvar spam-spamoracle-database
22954 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
22955 store its analyses.  This is controlled by the variable
22956 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
22957 the default SpamOracle database will be used.  In case you want your
22958 database to live somewhere special, set
22959 @code{spam-spamoracle-database} to this path.
22960 @end defvar
22961
22962 SpamOracle employs a statistical algorithm to determine whether a
22963 message is spam or ham.  In order to get good results, meaning few
22964 false hits or misses, SpamOracle needs training.  SpamOracle learns the
22965 characteristics of your spam mails.  Using the @emph{add} mode
22966 (training mode) one has to feed good (ham) and spam mails to
22967 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
22968 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
22969 spam- and ham-processors, which is much more convenient.  For a
22970 detailed description of spam- and ham-processors, @xref{Filtering Spam
22971 Using The Spam ELisp Package}.
22972
22973 @defvar gnus-group-spam-exit-processor-spamoracle
22974 Add this symbol to a group's @code{spam-process} parameter by
22975 customizing the group parameter or the
22976 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
22977 to a group's @code{spam-process} parameter, spam-marked articles will be
22978 sent to SpamOracle as spam samples.
22979 @end defvar
22980
22981 @defvar gnus-group-ham-exit-processor-spamoracle
22982 Add this symbol to a group's @code{spam-process} parameter by
22983 customizing the group parameter or the
22984 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
22985 to a grup's @code{spam-process} parameter, the ham-marked articles in
22986 @emph{ham} groups will be sent to the SpamOracle as samples of ham
22987 messages.  Note that this ham processor has no effect in @emph{spam} or
22988 @emph{unclassified} groups.
22989 @end defvar
22990
22991 @emph{Example:} These are the Group Parameters of an group that has been
22992 classified as a ham group, meaning that it should only contain ham
22993 messages.
22994 @example
22995  ((spam-contents gnus-group-spam-classification-ham)
22996   (spam-process
22997    (gnus-group-spam-exit-processor-spamoracle)))
22998 @end example
22999 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
23000 installed.  If the group contains spam message (e.g. because SpamOracle
23001 has not had enough sample messages yet) and the user marks some
23002 messages as spam messages, these messages will be processed by
23003 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23004 the messages to SpamOracle as new samples for spam.
23005
23006 @node Extending the spam elisp package
23007 @subsubsection Extending the spam elisp package
23008 @cindex spam filtering
23009 @cindex spam elisp package, extending
23010 @cindex extending the spam elisp package
23011
23012 Say you want to add a new back end called blackbox.  For filtering
23013 incoming mail, provide the following:
23014
23015 @enumerate
23016
23017 @item
23018 code
23019
23020 @lisp
23021 (defvar spam-use-blackbox nil
23022   "True if blackbox should be used.")
23023 @end lisp
23024
23025 Add
23026 @example
23027     (spam-use-blackbox   . spam-check-blackbox)
23028 @end example
23029 to @code{spam-list-of-checks}.
23030
23031 @item
23032 functionality
23033
23034 Write the @code{spam-check-blackbox} function.  It should return
23035 @samp{nil} or @code{spam-split-group}.  See the existing
23036 @code{spam-check-*} functions for examples of what you can do.
23037
23038 Make sure to add @code{spam-use-blackbox} to
23039 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23040 mail analyzer that needs the full message body to operate.
23041
23042 @end enumerate
23043
23044 For processing spam and ham messages, provide the following:
23045
23046 @enumerate
23047
23048 @item
23049 code
23050
23051 Note you don't have to provide a spam or a ham processor.  Only
23052 provide them if Blackbox supports spam or ham processing.
23053
23054 @lisp
23055 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23056   "The Blackbox summary exit spam processor.
23057 Only applicable to spam groups.")
23058
23059 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23060   "The whitelist summary exit ham processor.
23061 Only applicable to non-spam (unclassified and ham) groups.")
23062
23063 @end lisp
23064
23065 @item
23066 functionality
23067
23068 @lisp
23069 (defun spam-blackbox-register-spam-routine ()
23070   (spam-generic-register-routine
23071    ;; @r{the spam function}
23072    (lambda (article)
23073      (let ((from (spam-fetch-field-from-fast article)))
23074        (when (stringp from)
23075            (blackbox-do-something-with-this-spammer from))))
23076    ;; @r{the ham function}
23077    nil))
23078
23079 (defun spam-blackbox-register-ham-routine ()
23080   (spam-generic-register-routine
23081    ;; @r{the spam function}
23082    nil
23083    ;; @r{the ham function}
23084    (lambda (article)
23085      (let ((from (spam-fetch-field-from-fast article)))
23086        (when (stringp from)
23087            (blackbox-do-something-with-this-ham-sender from))))))
23088 @end lisp
23089
23090 Write the @code{blackbox-do-something-with-this-ham-sender} and
23091 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23092 more complex code than fetching the message sender, but keep in mind
23093 that retrieving the whole message takes significantly longer than the
23094 sender through @code{spam-fetch-field-from-fast}, because the message
23095 senders are kept in memory by Gnus.
23096
23097 @end enumerate
23098
23099
23100 @node Filtering Spam Using Statistics with spam-stat
23101 @subsection Filtering Spam Using Statistics with spam-stat
23102 @cindex Paul Graham
23103 @cindex Graham, Paul
23104 @cindex naive Bayesian spam filtering
23105 @cindex Bayesian spam filtering, naive
23106 @cindex spam filtering, naive Bayesian
23107
23108 Paul Graham has written an excellent essay about spam filtering using
23109 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23110 Spam}.  In it he describes the inherent deficiency of rule-based
23111 filtering as used by SpamAssassin, for example: Somebody has to write
23112 the rules, and everybody else has to install these rules.  You are
23113 always late.  It would be much better, he argues, to filter mail based
23114 on whether it somehow resembles spam or non-spam.  One way to measure
23115 this is word distribution.  He then goes on to describe a solution
23116 that checks whether a new mail resembles any of your other spam mails
23117 or not.
23118
23119 The basic idea is this:  Create a two collections of your mail, one
23120 with spam, one with non-spam.  Count how often each word appears in
23121 either collection, weight this by the total number of mails in the
23122 collections, and store this information in a dictionary.  For every
23123 word in a new mail, determine its probability to belong to a spam or a
23124 non-spam mail.  Use the 15 most conspicuous words, compute the total
23125 probability of the mail being spam.  If this probability is higher
23126 than a certain threshold, the mail is considered to be spam.
23127
23128 Gnus supports this kind of filtering.  But it needs some setting up.
23129 First, you need two collections of your mail, one with spam, one with
23130 non-spam.  Then you need to create a dictionary using these two
23131 collections, and save it.  And last but not least, you need to use
23132 this dictionary in your fancy mail splitting rules.
23133
23134 @menu
23135 * Creating a spam-stat dictionary::
23136 * Splitting mail using spam-stat::
23137 * Low-level interface to the spam-stat dictionary::
23138 @end menu
23139
23140 @node Creating a spam-stat dictionary
23141 @subsubsection Creating a spam-stat dictionary
23142
23143 Before you can begin to filter spam based on statistics, you must
23144 create these statistics based on two mail collections, one with spam,
23145 one with non-spam.  These statistics are then stored in a dictionary
23146 for later use.  In order for these statistics to be meaningful, you
23147 need several hundred emails in both collections.
23148
23149 Gnus currently supports only the nnml back end for automated dictionary
23150 creation.  The nnml back end stores all mails in a directory, one file
23151 per mail.  Use the following:
23152
23153 @defun spam-stat-process-spam-directory
23154 Create spam statistics for every file in this directory.  Every file
23155 is treated as one spam mail.
23156 @end defun
23157
23158 @defun spam-stat-process-non-spam-directory
23159 Create non-spam statistics for every file in this directory.  Every
23160 file is treated as one non-spam mail.
23161 @end defun
23162
23163 Usually you would call @code{spam-stat-process-spam-directory} on a
23164 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23165 the the group @samp{nnml:mail.spam}), and you would call
23166 @code{spam-stat-process-non-spam-directory} on a directory such as
23167 @file{~/Mail/mail/misc} (this usually corresponds the the group
23168 @samp{nnml:mail.misc}).
23169
23170 When you are using @acronym{IMAP}, you won't have the mails available
23171 locally, so that will not work.  One solution is to use the Gnus Agent
23172 to cache the articles.  Then you can use directories such as
23173 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23174 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23175
23176 @defvar spam-stat
23177 This variable holds the hash-table with all the statistics---the
23178 dictionary we have been talking about.  For every word in either
23179 collection, this hash-table stores a vector describing how often the
23180 word appeared in spam and often it appeared in non-spam mails.
23181 @end defvar
23182
23183 If you want to regenerate the statistics from scratch, you need to
23184 reset the dictionary.
23185
23186 @defun spam-stat-reset
23187 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23188 @end defun
23189
23190 When you are done, you must save the dictionary.  The dictionary may
23191 be rather large.  If you will not update the dictionary incrementally
23192 (instead, you will recreate it once a month, for example), then you
23193 can reduce the size of the dictionary by deleting all words that did
23194 not appear often enough or that do not clearly belong to only spam or
23195 only non-spam mails.
23196
23197 @defun spam-stat-reduce-size
23198 Reduce the size of the dictionary.  Use this only if you do not want
23199 to update the dictionary incrementally.
23200 @end defun
23201
23202 @defun spam-stat-save
23203 Save the dictionary.
23204 @end defun
23205
23206 @defvar spam-stat-file
23207 The filename used to store the dictionary.  This defaults to
23208 @file{~/.spam-stat.el}.
23209 @end defvar
23210
23211 @node Splitting mail using spam-stat
23212 @subsubsection Splitting mail using spam-stat
23213
23214 In order to use @code{spam-stat} to split your mail, you need to add the
23215 following to your @file{~/.gnus.el} file:
23216
23217 @lisp
23218 (require 'spam-stat)
23219 (spam-stat-load)
23220 @end lisp
23221
23222 This will load the necessary Gnus code, and the dictionary you
23223 created.
23224
23225 Next, you need to adapt your fancy splitting rules:  You need to
23226 determine how to use @code{spam-stat}.  The following examples are for
23227 the nnml back end.  Using the nnimap back end works just as well.  Just
23228 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23229
23230 In the simplest case, you only have two groups, @samp{mail.misc} and
23231 @samp{mail.spam}.  The following expression says that mail is either
23232 spam or it should go into @samp{mail.misc}.  If it is spam, then
23233 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23234
23235 @lisp
23236 (setq nnmail-split-fancy
23237       `(| (: spam-stat-split-fancy)
23238           "mail.misc"))
23239 @end lisp
23240
23241 @defvar spam-stat-split-fancy-spam-group
23242 The group to use for spam.  Default is @samp{mail.spam}.
23243 @end defvar
23244
23245 If you also filter mail with specific subjects into other groups, use
23246 the following expression.  Only mails not matching the regular
23247 expression are considered potential spam.
23248
23249 @lisp
23250 (setq nnmail-split-fancy
23251       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23252           (: spam-stat-split-fancy)
23253           "mail.misc"))
23254 @end lisp
23255
23256 If you want to filter for spam first, then you must be careful when
23257 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23258 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23259 non-spam, therefore both should be in your collection of non-spam
23260 mails, when creating the dictionary!
23261
23262 @lisp
23263 (setq nnmail-split-fancy
23264       `(| (: spam-stat-split-fancy)
23265           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23266           "mail.misc"))
23267 @end lisp
23268
23269 You can combine this with traditional filtering.  Here, we move all
23270 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23271 @code{spam-stat-split-fancy} will never see them, the mails in
23272 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23273 nor in your collection of non-spam mails, when creating the
23274 dictionary!
23275
23276 @lisp
23277 (setq nnmail-split-fancy
23278       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23279           (: spam-stat-split-fancy)
23280           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23281           "mail.misc"))
23282 @end lisp
23283
23284
23285 @node Low-level interface to the spam-stat dictionary
23286 @subsubsection Low-level interface to the spam-stat dictionary
23287
23288 The main interface to using @code{spam-stat}, are the following functions:
23289
23290 @defun spam-stat-buffer-is-spam
23291 Called in a buffer, that buffer is considered to be a new spam mail.
23292 Use this for new mail that has not been processed before.
23293 @end defun
23294
23295 @defun spam-stat-buffer-is-no-spam
23296 Called in a buffer, that buffer is considered to be a new non-spam
23297 mail.  Use this for new mail that has not been processed before.
23298 @end defun
23299
23300 @defun spam-stat-buffer-change-to-spam
23301 Called in a buffer, that buffer is no longer considered to be normal
23302 mail but spam.  Use this to change the status of a mail that has
23303 already been processed as non-spam.
23304 @end defun
23305
23306 @defun spam-stat-buffer-change-to-non-spam
23307 Called in a buffer, that buffer is no longer considered to be spam but
23308 normal mail.  Use this to change the status of a mail that has already
23309 been processed as spam.
23310 @end defun
23311
23312 @defun spam-stat-save
23313 Save the hash table to the file.  The filename used is stored in the
23314 variable @code{spam-stat-file}.
23315 @end defun
23316
23317 @defun spam-stat-load
23318 Load the hash table from a file.  The filename used is stored in the
23319 variable @code{spam-stat-file}.
23320 @end defun
23321
23322 @defun spam-stat-score-word
23323 Return the spam score for a word.
23324 @end defun
23325
23326 @defun spam-stat-score-buffer
23327 Return the spam score for a buffer.
23328 @end defun
23329
23330 @defun spam-stat-split-fancy
23331 Use this function for fancy mail splitting.  Add the rule @samp{(:
23332 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23333 @end defun
23334
23335 Make sure you load the dictionary before using it.  This requires the
23336 following in your @file{~/.gnus.el} file:
23337
23338 @lisp
23339 (require 'spam-stat)
23340 (spam-stat-load)
23341 @end lisp
23342
23343 Typical test will involve calls to the following functions:
23344
23345 @smallexample
23346 Reset: (setq spam-stat (make-hash-table :test 'equal))
23347 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23348 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23349 Save table: (spam-stat-save)
23350 File size: (nth 7 (file-attributes spam-stat-file))
23351 Number of words: (hash-table-count spam-stat)
23352 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23353 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23354 Reduce table size: (spam-stat-reduce-size)
23355 Save table: (spam-stat-save)
23356 File size: (nth 7 (file-attributes spam-stat-file))
23357 Number of words: (hash-table-count spam-stat)
23358 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23359 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23360 @end smallexample
23361
23362 Here is how you would create your dictionary:
23363
23364 @smallexample
23365 Reset: (setq spam-stat (make-hash-table :test 'equal))
23366 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23367 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23368 Repeat for any other non-spam group you need...
23369 Reduce table size: (spam-stat-reduce-size)
23370 Save table: (spam-stat-save)
23371 @end smallexample
23372
23373 @node Various Various
23374 @section Various Various
23375 @cindex mode lines
23376 @cindex highlights
23377
23378 @table @code
23379
23380 @item gnus-home-directory
23381 @vindex gnus-home-directory
23382 All Gnus file and directory variables will be initialized from this
23383 variable, which defaults to @file{~/}.
23384
23385 @item gnus-directory
23386 @vindex gnus-directory
23387 Most Gnus storage file and directory variables will be initialized from
23388 this variable, which defaults to the @env{SAVEDIR} environment
23389 variable, or @file{~/News/} if that variable isn't set.
23390
23391 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
23392 This means that other directory variables that are initialized from this
23393 variable won't be set properly if you set this variable in
23394 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
23395
23396 @item gnus-default-directory
23397 @vindex gnus-default-directory
23398 Not related to the above variable at all---this variable says what the
23399 default directory of all Gnus buffers should be.  If you issue commands
23400 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23401 default directory.  If this variable is @code{nil} (which is the
23402 default), the default directory will be the default directory of the
23403 buffer you were in when you started Gnus.
23404
23405 @item gnus-verbose
23406 @vindex gnus-verbose
23407 This variable is an integer between zero and ten.  The higher the value,
23408 the more messages will be displayed.  If this variable is zero, Gnus
23409 will never flash any messages, if it is seven (which is the default),
23410 most important messages will be shown, and if it is ten, Gnus won't ever
23411 shut up, but will flash so many messages it will make your head swim.
23412
23413 @item gnus-verbose-backends
23414 @vindex gnus-verbose-backends
23415 This variable works the same way as @code{gnus-verbose}, but it applies
23416 to the Gnus back ends instead of Gnus proper.
23417
23418 @item nnheader-max-head-length
23419 @vindex nnheader-max-head-length
23420 When the back ends read straight heads of articles, they all try to read
23421 as little as possible.  This variable (default 4096) specifies
23422 the absolute max length the back ends will try to read before giving up
23423 on finding a separator line between the head and the body.  If this
23424 variable is @code{nil}, there is no upper read bound.  If it is
23425 @code{t}, the back ends won't try to read the articles piece by piece,
23426 but read the entire articles.  This makes sense with some versions of
23427 @code{ange-ftp} or @code{efs}.
23428
23429 @item nnheader-head-chop-length
23430 @vindex nnheader-head-chop-length
23431 This variable (default 2048) says how big a piece of each article to
23432 read when doing the operation described above.
23433
23434 @item nnheader-file-name-translation-alist
23435 @vindex nnheader-file-name-translation-alist
23436 @cindex file names
23437 @cindex invalid characters in file names
23438 @cindex characters in file names
23439 This is an alist that says how to translate characters in file names.
23440 For instance, if @samp{:} is invalid as a file character in file names
23441 on your system (you OS/2 user you), you could say something like:
23442
23443 @lisp
23444 @group
23445 (setq nnheader-file-name-translation-alist
23446       '((?: . ?_)))
23447 @end group
23448 @end lisp
23449
23450 In fact, this is the default value for this variable on OS/2 and MS
23451 Windows (phooey) systems.
23452
23453 @item gnus-hidden-properties
23454 @vindex gnus-hidden-properties
23455 This is a list of properties to use to hide ``invisible'' text.  It is
23456 @code{(invisible t intangible t)} by default on most systems, which
23457 makes invisible text invisible and intangible.
23458
23459 @item gnus-parse-headers-hook
23460 @vindex gnus-parse-headers-hook
23461 A hook called before parsing headers.  It can be used, for instance, to
23462 gather statistics on the headers fetched, or perhaps you'd like to prune
23463 some headers.  I don't see why you'd want that, though.
23464
23465 @item gnus-shell-command-separator
23466 @vindex gnus-shell-command-separator
23467 String used to separate two shell commands.  The default is @samp{;}.
23468
23469 @item gnus-invalid-group-regexp
23470 @vindex gnus-invalid-group-regexp
23471
23472 Regexp to match ``invalid'' group names when querying user for a group
23473 name.  The default value catches some @strong{really} invalid group
23474 names who could possibly mess up Gnus internally (like allowing
23475 @samp{:} in a group name, which is normally used to delimit method and
23476 group).
23477
23478 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23479
23480
23481 @end table
23482
23483 @node The End
23484 @chapter The End
23485
23486 Well, that's the manual---you can get on with your life now.  Keep in
23487 touch.  Say hello to your cats from me.
23488
23489 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23490
23491 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23492
23493 @quotation
23494 @strong{Te Deum}
23495
23496 @sp 1
23497 Not because of victories @*
23498 I sing,@*
23499 having none,@*
23500 but for the common sunshine,@*
23501 the breeze,@*
23502 the largess of the spring.
23503
23504 @sp 1
23505 Not for victory@*
23506 but for the day's work done@*
23507 as well as I was able;@*
23508 not for a seat upon the dais@*
23509 but at the common table.@*
23510 @end quotation
23511
23512
23513 @node Appendices
23514 @chapter Appendices
23515
23516 @menu
23517 * XEmacs::                      Requirements for installing under XEmacs.
23518 * History::                     How Gnus got where it is today.
23519 * On Writing Manuals::          Why this is not a beginner's guide.
23520 * Terminology::                 We use really difficult, like, words here.
23521 * Customization::               Tailoring Gnus to your needs.
23522 * Troubleshooting::             What you might try if things do not work.
23523 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23524 * Emacs for Heathens::          A short introduction to Emacsian terms.
23525 * Frequently Asked Questions::  The Gnus FAQ
23526 @end menu
23527
23528
23529 @node XEmacs
23530 @section XEmacs
23531 @cindex XEmacs
23532 @cindex installing under XEmacs
23533
23534 XEmacs is distributed as a collection of packages.  You should install
23535 whatever packages the Gnus XEmacs package requires.  The current
23536 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23537 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23538 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23539 @samp{misc-games} package is required for Morse decoding.
23540
23541
23542 @node History
23543 @section History
23544
23545 @cindex history
23546 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23547 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23548
23549 If you want to investigate the person responsible for this outrage,
23550 you can point your (feh!) web browser to
23551 @uref{http://quimby.gnus.org/}.  This is also the primary
23552 distribution point for the new and spiffy versions of Gnus, and is
23553 known as The Site That Destroys Newsrcs And Drives People Mad.
23554
23555 During the first extended alpha period of development, the new Gnus was
23556 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23557 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23558 (Besides, the ``Gnus'' in this abbreviation should probably be
23559 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23560 appropriate name, don't you think?)
23561
23562 In any case, after spending all that energy on coming up with a new and
23563 spunky name, we decided that the name was @emph{too} spunky, so we
23564 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23565 ``@sc{gnus}''.  New vs. old.
23566
23567 @menu
23568 * Gnus Versions::               What Gnus versions have been released.
23569 * Other Gnus Versions::         Other Gnus versions that also have been released.
23570 * Why?::                        What's the point of Gnus?
23571 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23572 * Conformity::                  Gnus tries to conform to all standards.
23573 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23574 * Gnus Development::            How Gnus is developed.
23575 * Contributors::                Oodles of people.
23576 * New Features::                Pointers to some of the new stuff in Gnus.
23577 @end menu
23578
23579
23580 @node Gnus Versions
23581 @subsection Gnus Versions
23582 @cindex ding Gnus
23583 @cindex September Gnus
23584 @cindex Red Gnus
23585 @cindex Quassia Gnus
23586 @cindex Pterodactyl Gnus
23587 @cindex Oort Gnus
23588 @cindex No Gnus
23589 @cindex Gnus versions
23590
23591 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23592 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23593 plus 15 Gnus 5.0 releases).
23594
23595 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23596 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23597
23598 On July 28th 1996 work on Red Gnus was begun, and it was released on
23599 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23600
23601 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23602 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23603
23604 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23605 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23606 1999.
23607
23608 On the 26th of October 2000, Oort Gnus was begun.
23609
23610 If you happen upon a version of Gnus that has a prefixed name --
23611 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23612 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23613 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23614 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23615 released version of Gnus and snuggle up to that instead.
23616
23617
23618 @node Other Gnus Versions
23619 @subsection Other Gnus Versions
23620 @cindex Semi-gnus
23621
23622 In addition to the versions of Gnus which have had their releases
23623 coordinated by Lars, one major development has been Semi-gnus from
23624 Japan.  It's based on a library called @acronym{SEMI}, which provides
23625 @acronym{MIME} capabilities.
23626
23627 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23628 Collectively, they are called ``Semi-gnus'', and different strains are
23629 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23630 @acronym{MIME} and multilingualization things, especially important for
23631 Japanese users.
23632
23633
23634 @node Why?
23635 @subsection Why?
23636
23637 What's the point of Gnus?
23638
23639 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23640 newsreader, that lets you do anything you can think of.  That was my
23641 original motivation, but while working on Gnus, it has become clear to
23642 me that this generation of newsreaders really belong in the stone age.
23643 Newsreaders haven't developed much since the infancy of the net.  If the
23644 volume continues to rise with the current rate of increase, all current
23645 newsreaders will be pretty much useless.  How do you deal with
23646 newsgroups that have thousands of new articles each day?  How do you
23647 keep track of millions of people who post?
23648
23649 Gnus offers no real solutions to these questions, but I would very much
23650 like to see Gnus being used as a testing ground for new methods of
23651 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23652 to separate the newsreader from the back ends, Gnus now offers a simple
23653 interface for anybody who wants to write new back ends for fetching mail
23654 and news from different sources.  I have added hooks for customizations
23655 everywhere I could imagine it being useful.  By doing so, I'm inviting
23656 every one of you to explore and invent.
23657
23658 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23659 @kbd{C-u 100 M-x all-hail-xemacs}.
23660
23661
23662 @node Compatibility
23663 @subsection Compatibility
23664
23665 @cindex compatibility
23666 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23667 bindings have been kept.  More key bindings have been added, of course,
23668 but only in one or two obscure cases have old bindings been changed.
23669
23670 Our motto is:
23671 @quotation
23672 @cartouche
23673 @center In a cloud bones of steel.
23674 @end cartouche
23675 @end quotation
23676
23677 All commands have kept their names.  Some internal functions have changed
23678 their names.
23679
23680 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23681 Articles}.
23682
23683 One major compatibility question is the presence of several summary
23684 buffers.  All variables relevant while reading a group are
23685 buffer-local to the summary buffer they belong in.  Although many
23686 important variables have their values copied into their global
23687 counterparts whenever a command is executed in the summary buffer, this
23688 change might lead to incorrect values being used unless you are careful.
23689
23690 All code that relies on knowledge of @sc{gnus} internals will probably
23691 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23692 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23693 maintains a hash table that points to the entries in this alist (which
23694 speeds up many functions), and changing the alist directly will lead to
23695 peculiar results.
23696
23697 @cindex hilit19
23698 @cindex highlighting
23699 Old hilit19 code does not work at all.  In fact, you should probably
23700 remove all hilit code from all Gnus hooks
23701 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23702 Gnus provides various integrated functions for highlighting.  These are
23703 faster and more accurate.  To make life easier for everybody, Gnus will
23704 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23705 Away!
23706
23707 Packages like @code{expire-kill} will no longer work.  As a matter of
23708 fact, you should probably remove all old @sc{gnus} packages (and other
23709 code) when you start using Gnus.  More likely than not, Gnus already
23710 does what you have written code to make @sc{gnus} do.  (Snicker.)
23711
23712 Even though old methods of doing things are still supported, only the
23713 new methods are documented in this manual.  If you detect a new method of
23714 doing something while reading this manual, that does not mean you have
23715 to stop doing it the old way.
23716
23717 Gnus understands all @sc{gnus} startup files.
23718
23719 @kindex M-x gnus-bug
23720 @findex gnus-bug
23721 @cindex reporting bugs
23722 @cindex bugs
23723 Overall, a casual user who hasn't written much code that depends on
23724 @sc{gnus} internals should suffer no problems.  If problems occur,
23725 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23726
23727 @vindex gnus-bug-create-help-buffer
23728 If you are in the habit of sending bug reports @emph{very} often, you
23729 may find the helpful help buffer annoying after a while.  If so, set
23730 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23731 up at you.
23732
23733
23734 @node Conformity
23735 @subsection Conformity
23736
23737 No rebels without a clue here, ma'am.  We conform to all standards known
23738 to (wo)man.  Except for those standards and/or conventions we disagree
23739 with, of course.
23740
23741 @table @strong
23742
23743 @item RFC (2)822
23744 @cindex RFC 822
23745 @cindex RFC 2822
23746 There are no known breaches of this standard.
23747
23748 @item RFC 1036
23749 @cindex RFC 1036
23750 There are no known breaches of this standard, either.
23751
23752 @item Son-of-RFC 1036
23753 @cindex Son-of-RFC 1036
23754 We do have some breaches to this one.
23755
23756 @table @emph
23757
23758 @item X-Newsreader
23759 @itemx User-Agent
23760 These are considered to be ``vanity headers'', while I consider them
23761 to be consumer information.  After seeing so many badly formatted
23762 articles coming from @code{tin} and @code{Netscape} I know not to use
23763 either of those for posting articles.  I would not have known that if
23764 it wasn't for the @code{X-Newsreader} header.
23765 @end table
23766
23767 @item USEFOR
23768 @cindex USEFOR
23769 USEFOR is an IETF working group writing a successor to RFC 1036, based
23770 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23771 various changes to the format of news articles.  The Gnus towers will
23772 look into implementing the changes when the draft is accepted as an RFC.
23773
23774 @item MIME - RFC 2045-2049 etc
23775 @cindex @acronym{MIME}
23776 All the various @acronym{MIME} RFCs are supported.
23777
23778 @item Disposition Notifications - RFC 2298
23779 Message Mode is able to request notifications from the receiver.
23780
23781 @item PGP - RFC 1991 and RFC 2440
23782 @cindex RFC 1991
23783 @cindex RFC 2440
23784 RFC 1991 is the original @acronym{PGP} message specification,
23785 published as an informational RFC.  RFC 2440 was the follow-up, now
23786 called Open PGP, and put on the Standards Track.  Both document a
23787 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23788 encoding (signing and encryption) and decoding (verification and
23789 decryption).
23790
23791 @item PGP/MIME - RFC 2015/3156
23792 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23793 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23794 Gnus supports both encoding and decoding.
23795
23796 @item S/MIME - RFC 2633
23797 RFC 2633 describes the @acronym{S/MIME} format.
23798
23799 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23800 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23801 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23802 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23803 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23804 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23805 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23806 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23807
23808 @end table
23809
23810 If you ever notice Gnus acting non-compliant with regards to the texts
23811 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23812 know.
23813
23814
23815 @node Emacsen
23816 @subsection Emacsen
23817 @cindex Emacsen
23818 @cindex XEmacs
23819 @cindex Mule
23820 @cindex Emacs
23821
23822 Gnus should work on :
23823
23824 @itemize @bullet
23825
23826 @item
23827 Emacs 20.3 and up.
23828
23829 @item
23830 XEmacs 21.1.1 and up.
23831
23832 @end itemize
23833
23834 This Gnus version will absolutely not work on any Emacsen older than
23835 that.  Not reliably, at least.  Older versions of Gnus may work on older
23836 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
23837 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
23838 See the file ``README'' in the T-gnus distribution for more details.
23839
23840 There are some vague differences between Gnus on the various
23841 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23842 other than that, things should look pretty much the same under all
23843 Emacsen.
23844
23845
23846 @node Gnus Development
23847 @subsection Gnus Development
23848
23849 Gnus is developed in a two-phased cycle.  The first phase involves much
23850 discussion on the @samp{ding@@gnus.org} mailing list, where people
23851 propose changes and new features, post patches and new back ends.  This
23852 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23853 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23854 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23855 unstable and should not be used by casual users.  Gnus alpha releases
23856 have names like ``Red Gnus'' and ``Quassia Gnus''.
23857
23858 After futzing around for 50-100 alpha releases, Gnus is declared
23859 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23860 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23861 supposed to be able to use these, and these are mostly discussed on the
23862 @samp{gnu.emacs.gnus} newsgroup.
23863
23864 @cindex Incoming*
23865 @vindex mail-source-delete-incoming
23866 Some variable defaults differ between alpha Gnusae and released Gnusae.
23867 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23868 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23869 lossage of mail if an alpha release hiccups while handling the mail.
23870
23871 The division of discussion between the ding mailing list and the Gnus
23872 newsgroup is not purely based on publicity concerns.  It's true that
23873 having people write about the horrible things that an alpha Gnus release
23874 can do (sometimes) in a public forum may scare people off, but more
23875 importantly, talking about new experimental features that have been
23876 introduced may confuse casual users.  New features are frequently
23877 introduced, fiddled with, and judged to be found wanting, and then
23878 either discarded or totally rewritten.  People reading the mailing list
23879 usually keep up with these rapid changes, while people on the newsgroup
23880 can't be assumed to do so.
23881
23882
23883
23884 @node Contributors
23885 @subsection Contributors
23886 @cindex contributors
23887
23888 The new Gnus version couldn't have been done without the help of all the
23889 people on the (ding) mailing list.  Every day for over a year I have
23890 gotten billions of nice bug reports from them, filling me with joy,
23891 every single one of them.  Smooches.  The people on the list have been
23892 tried beyond endurance, what with my ``oh, that's a neat idea <type
23893 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23894 work at all <type type>, yup, I'll ship that one off right away <ship
23895 off> no, wait, that absolutely does not work'' policy for releases.
23896 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23897 ``worser''? ``much worser''?  ``worsest''?)
23898
23899 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23900 wrong show.
23901
23902 @itemize @bullet
23903
23904 @item
23905 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23906
23907 @item
23908 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23909 nnwarchive and many, many other things connected with @acronym{MIME} and
23910 other types of en/decoding, as well as general bug fixing, new
23911 functionality and stuff.
23912
23913 @item
23914 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23915 well as numerous other things).
23916
23917 @item
23918 Luis Fernandes---design and graphics.
23919
23920 @item
23921 Joe Reiss---creator of the smiley faces.
23922
23923 @item
23924 Justin Sheehy---the @acronym{FAQ} maintainer.
23925
23926 @item
23927 Erik Naggum---help, ideas, support, code and stuff.
23928
23929 @item
23930 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23931 @dfn{picons} (@pxref{Picons}).
23932
23933 @item
23934 Kim-Minh Kaplan---further work on the picon code.
23935
23936 @item
23937 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23938 (@pxref{GroupLens}).
23939
23940 @item
23941 Sudish Joseph---innumerable bug fixes.
23942
23943 @item
23944 Ilja Weis---@file{gnus-topic.el}.
23945
23946 @item
23947 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23948
23949 @item
23950 Vladimir Alexiev---the refcard and reference booklets.
23951
23952 @item
23953 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23954 distribution by Felix Lee and JWZ.
23955
23956 @item
23957 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23958
23959 @item
23960 Peter Mutsaers---orphan article scoring code.
23961
23962 @item
23963 Ken Raeburn---POP mail support.
23964
23965 @item
23966 Hallvard B Furuseth---various bits and pieces, especially dealing with
23967 .newsrc files.
23968
23969 @item
23970 Brian Edmonds---@file{gnus-bbdb.el}.
23971
23972 @item
23973 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23974
23975 @item
23976 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
23977
23978 @item
23979 François Pinard---many, many interesting and thorough bug reports, as
23980 well as autoconf support.
23981
23982 @end itemize
23983
23984 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
23985 Borges, and Jost Krieger proof-reading parts of the manual.
23986
23987 The following people have contributed many patches and suggestions:
23988
23989 Christopher Davis,
23990 Andrew Eskilsson,
23991 Kai Grossjohann,
23992 Kevin Greiner,
23993 Jesper Harder,
23994 Paul Jarc,
23995 Simon Josefsson,
23996 David KÃ¥gedal,
23997 Richard Pieri,
23998 Fabrice Popineau,
23999 Daniel Quinlan,
24000 Michael Shields,
24001 Reiner Steib,
24002 Jason L. Tibbitts, III,
24003 Jack Vinson,
24004 Katsumi Yamaoka, @c Yamaoka
24005 and
24006 Teodor Zlatanov.
24007
24008 Also thanks to the following for patches and stuff:
24009
24010 Jari Aalto,
24011 Adrian Aichner,
24012 Vladimir Alexiev,
24013 Russ Allbery,
24014 Peter Arius,
24015 Matt Armstrong,
24016 Marc Auslander,
24017 Miles Bader,
24018 Alexei V. Barantsev,
24019 Frank Bennett,
24020 Robert Bihlmeyer,
24021 Chris Bone,
24022 Mark Borges,
24023 Mark Boyns,
24024 Lance A. Brown,
24025 Rob Browning,
24026 Kees de Bruin,
24027 Martin Buchholz,
24028 Joe Buehler,
24029 Kevin Buhr,
24030 Alastair Burt,
24031 Joao Cachopo,
24032 Zlatko Calusic,
24033 Massimo Campostrini,
24034 Castor,
24035 David Charlap,
24036 Dan Christensen,
24037 Kevin Christian,
24038 Jae-you Chung, @c ?
24039 James H. Cloos, Jr.,
24040 Laura Conrad,
24041 Michael R. Cook,
24042 Glenn Coombs,
24043 Andrew J. Cosgriff,
24044 Neil Crellin,
24045 Frank D. Cringle,
24046 Geoffrey T. Dairiki,
24047 Andre Deparade,
24048 Ulrik Dickow,
24049 Dave Disser,
24050 Rui-Tao Dong, @c ?
24051 Joev Dubach,
24052 Michael Welsh Duggan,
24053 Dave Edmondson,
24054 Paul Eggert,
24055 Mark W. Eichin,
24056 Karl Eichwalder,
24057 Enami Tsugutomo, @c Enami
24058 Michael Ernst,
24059 Luc Van Eycken,
24060 Sam Falkner,
24061 Nelson Jose dos Santos Ferreira,
24062 Sigbjorn Finne,
24063 Sven Fischer,
24064 Paul Fisher,
24065 Decklin Foster,
24066 Gary D. Foster,
24067 Paul Franklin,
24068 Guy Geens,
24069 Arne Georg Gleditsch,
24070 David S. Goldberg,
24071 Michelangelo Grigni,
24072 Dale Hagglund,
24073 D. Hall,
24074 Magnus Hammerin,
24075 Kenichi Handa, @c Handa
24076 Raja R. Harinath,
24077 Yoshiki Hayashi, @c Hayashi
24078 P. E. Jareth Hein,
24079 Hisashige Kenji, @c Hisashige
24080 Scott Hofmann,
24081 Marc Horowitz,
24082 Gunnar Horrigmo,
24083 Richard Hoskins,
24084 Brad Howes,
24085 Miguel de Icaza,
24086 François Felix Ingrand,
24087 Tatsuya Ichikawa, @c Ichikawa
24088 Ishikawa Ichiro, @c Ishikawa
24089 Lee Iverson,
24090 Iwamuro Motonori, @c Iwamuro
24091 Rajappa Iyer,
24092 Andreas Jaeger,
24093 Adam P. Jenkins,
24094 Randell Jesup,
24095 Fred Johansen,
24096 Gareth Jones,
24097 Greg Klanderman,
24098 Karl Kleinpaste,
24099 Michael Klingbeil,
24100 Peter Skov Knudsen,
24101 Shuhei Kobayashi, @c Kobayashi
24102 Petr Konecny,
24103 Koseki Yoshinori, @c Koseki
24104 Thor Kristoffersen,
24105 Jens Lautenbacher,
24106 Martin Larose,
24107 Seokchan Lee, @c Lee
24108 Joerg Lenneis,
24109 Carsten Leonhardt,
24110 James LewisMoss,
24111 Christian Limpach,
24112 Markus Linnala,
24113 Dave Love,
24114 Mike McEwan,
24115 Tonny Madsen,
24116 Shlomo Mahlab,
24117 Nat Makarevitch,
24118 Istvan Marko,
24119 David Martin,
24120 Jason R. Mastaler,
24121 Gordon Matzigkeit,
24122 Timo Metzemakers,
24123 Richard Mlynarik,
24124 Lantz Moore,
24125 Morioka Tomohiko, @c Morioka
24126 Erik Toubro Nielsen,
24127 Hrvoje Niksic,
24128 Andy Norman,
24129 Fred Oberhauser,
24130 C. R. Oldham,
24131 Alexandre Oliva,
24132 Ken Olstad,
24133 Masaharu Onishi, @c Onishi
24134 Hideki Ono, @c Ono
24135 Ettore Perazzoli,
24136 William Perry,
24137 Stephen Peters,
24138 Jens-Ulrik Holger Petersen,
24139 Ulrich Pfeifer,
24140 Matt Pharr,
24141 Andy Piper,
24142 John McClary Prevost,
24143 Bill Pringlemeir,
24144 Mike Pullen,
24145 Jim Radford,
24146 Colin Rafferty,
24147 Lasse Rasinen,
24148 Lars Balker Rasmussen,
24149 Joe Reiss,
24150 Renaud Rioboo,
24151 Roland B. Roberts,
24152 Bart Robinson,
24153 Christian von Roques,
24154 Markus Rost,
24155 Jason Rumney,
24156 Wolfgang Rupprecht,
24157 Jay Sachs,
24158 Dewey M. Sasser,
24159 Conrad Sauerwald,
24160 Loren Schall,
24161 Dan Schmidt,
24162 Ralph Schleicher,
24163 Philippe Schnoebelen,
24164 Andreas Schwab,
24165 Randal L. Schwartz,
24166 Danny Siu,
24167 Matt Simmons,
24168 Paul D. Smith,
24169 Jeff Sparkes,
24170 Toby Speight,
24171 Michael Sperber,
24172 Darren Stalder,
24173 Richard Stallman,
24174 Greg Stark,
24175 Sam Steingold,
24176 Paul Stevenson,
24177 Jonas Steverud,
24178 Paul Stodghill,
24179 Kiyokazu Suto, @c Suto
24180 Kurt Swanson,
24181 Samuel Tardieu,
24182 Teddy,
24183 Chuck Thompson,
24184 Tozawa Akihiko, @c Tozawa
24185 Philippe Troin,
24186 James Troup,
24187 Trung Tran-Duc,
24188 Jack Twilley,
24189 Aaron M. Ucko,
24190 Aki Vehtari,
24191 Didier Verna,
24192 Vladimir Volovich,
24193 Jan Vroonhof,
24194 Stefan Waldherr,
24195 Pete Ware,
24196 Barry A. Warsaw,
24197 Christoph Wedler,
24198 Joe Wells,
24199 Lee Willis,
24200 and
24201 Lloyd Zusman.
24202
24203
24204 For a full overview of what each person has done, the ChangeLogs
24205 included in the Gnus alpha distributions should give ample reading
24206 (550kB and counting).
24207
24208 Apologies to everybody that I've forgotten, of which there are many, I'm
24209 sure.
24210
24211 Gee, that's quite a list of people.  I guess that must mean that there
24212 actually are people who are using Gnus.  Who'd'a thunk it!
24213
24214
24215 @node New Features
24216 @subsection New Features
24217 @cindex new features
24218
24219 @menu
24220 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24221 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24222 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24223 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24224 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24225 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24226 @end menu
24227
24228 These lists are, of course, just @emph{short} overviews of the
24229 @emph{most} important new features.  No, really.  There are tons more.
24230 Yes, we have feeping creaturism in full effect.
24231
24232 @node ding Gnus
24233 @subsubsection (ding) Gnus
24234
24235 New features in Gnus 5.0/5.1:
24236
24237 @itemize @bullet
24238
24239 @item
24240 The look of all buffers can be changed by setting format-like variables
24241 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24242
24243 @item
24244 Local spool and several @acronym{NNTP} servers can be used at once
24245 (@pxref{Select Methods}).
24246
24247 @item
24248 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24249
24250 @item
24251 You can read a number of different mail formats (@pxref{Getting Mail}).
24252 All the mail back ends implement a convenient mail expiry scheme
24253 (@pxref{Expiring Mail}).
24254
24255 @item
24256 Gnus can use various strategies for gathering threads that have lost
24257 their roots (thereby gathering loose sub-threads into one thread) or it
24258 can go back and retrieve enough headers to build a complete thread
24259 (@pxref{Customizing Threading}).
24260
24261 @item
24262 Killed groups can be displayed in the group buffer, and you can read
24263 them as well (@pxref{Listing Groups}).
24264
24265 @item
24266 Gnus can do partial group updates---you do not have to retrieve the
24267 entire active file just to check for new articles in a few groups
24268 (@pxref{The Active File}).
24269
24270 @item
24271 Gnus implements a sliding scale of subscribedness to groups
24272 (@pxref{Group Levels}).
24273
24274 @item
24275 You can score articles according to any number of criteria
24276 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24277 articles for you (@pxref{Adaptive Scoring}).
24278
24279 @item
24280 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24281 manner, so it should be difficult to lose much data on what you have
24282 read if your machine should go down (@pxref{Auto Save}).
24283
24284 @item
24285 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24286 cluttering up the @file{.emacs} file.
24287
24288 @item
24289 You can set the process mark on both groups and articles and perform
24290 operations on all the marked items (@pxref{Process/Prefix}).
24291
24292 @item
24293 You can grep through a subset of groups and create a group from the
24294 results (@pxref{Kibozed Groups}).
24295
24296 @item
24297 You can list subsets of groups according to, well, anything
24298 (@pxref{Listing Groups}).
24299
24300 @item
24301 You can browse foreign servers and subscribe to groups from those
24302 servers (@pxref{Browse Foreign Server}).
24303
24304 @item
24305 Gnus can fetch articles, asynchronously, on a second connection to the
24306 server (@pxref{Asynchronous Fetching}).
24307
24308 @item
24309 You can cache articles locally (@pxref{Article Caching}).
24310
24311 @item
24312 The uudecode functions have been expanded and generalized
24313 (@pxref{Decoding Articles}).
24314
24315 @item
24316 You can still post uuencoded articles, which was a little-known feature
24317 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24318
24319 @item
24320 Fetching parents (and other articles) now actually works without
24321 glitches (@pxref{Finding the Parent}).
24322
24323 @item
24324 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24325
24326 @item
24327 Digests (and other files) can be used as the basis for groups
24328 (@pxref{Document Groups}).
24329
24330 @item
24331 Articles can be highlighted and customized (@pxref{Customizing
24332 Articles}).
24333
24334 @item
24335 URLs and other external references can be buttonized (@pxref{Article
24336 Buttons}).
24337
24338 @item
24339 You can do lots of strange stuff with the Gnus window & frame
24340 configuration (@pxref{Window Layout}).
24341
24342 @item
24343 You can click on buttons instead of using the keyboard
24344 (@pxref{Buttons}).
24345
24346 @end itemize
24347
24348
24349 @node September Gnus
24350 @subsubsection September Gnus
24351
24352 @iftex
24353 @iflatex
24354 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24355 @end iflatex
24356 @end iftex
24357
24358 New features in Gnus 5.2/5.3:
24359
24360 @itemize @bullet
24361
24362 @item
24363 A new message composition mode is used.  All old customization variables
24364 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24365 now obsolete.
24366
24367 @item
24368 Gnus is now able to generate @dfn{sparse} threads---threads where
24369 missing articles are represented by empty nodes (@pxref{Customizing
24370 Threading}).
24371
24372 @lisp
24373 (setq gnus-build-sparse-threads 'some)
24374 @end lisp
24375
24376 @item
24377 Outgoing articles are stored on a special archive server
24378 (@pxref{Archived Messages}).
24379
24380 @item
24381 Partial thread regeneration now happens when articles are
24382 referred.
24383
24384 @item
24385 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24386
24387 @item
24388 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24389
24390 @item
24391 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24392
24393 @lisp
24394 (setq gnus-use-trees t)
24395 @end lisp
24396
24397 @item
24398 An @code{nn}-like pick-and-read minor mode is available for the summary
24399 buffers (@pxref{Pick and Read}).
24400
24401 @lisp
24402 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24403 @end lisp
24404
24405 @item
24406 In binary groups you can use a special binary minor mode (@pxref{Binary
24407 Groups}).
24408
24409 @item
24410 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24411 Topics}).
24412
24413 @lisp
24414 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24415 @end lisp
24416
24417 @item
24418 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24419
24420 @item
24421 Groups can now have a score, and bubbling based on entry frequency
24422 is possible (@pxref{Group Score}).
24423
24424 @lisp
24425 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24426 @end lisp
24427
24428 @item
24429 Groups can be process-marked, and commands can be performed on
24430 groups of groups (@pxref{Marking Groups}).
24431
24432 @item
24433 Caching is possible in virtual groups.
24434
24435 @item
24436 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24437 news batches, ClariNet briefs collections, and just about everything
24438 else (@pxref{Document Groups}).
24439
24440 @item
24441 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24442 (@pxref{SOUP}).
24443
24444 @item
24445 The Gnus cache is much faster.
24446
24447 @item
24448 Groups can be sorted according to many criteria (@pxref{Sorting
24449 Groups}).
24450
24451 @item
24452 New group parameters have been introduced to set list-addresses and
24453 expiry times (@pxref{Group Parameters}).
24454
24455 @item
24456 All formatting specs allow specifying faces to be used
24457 (@pxref{Formatting Fonts}).
24458
24459 @item
24460 There are several more commands for setting/removing/acting on process
24461 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24462
24463 @item
24464 The summary buffer can be limited to show parts of the available
24465 articles based on a wide range of criteria.  These commands have been
24466 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24467
24468 @item
24469 Articles can be made persistent with the @kbd{*} command
24470 (@pxref{Persistent Articles}).
24471
24472 @item
24473 All functions for hiding article elements are now toggles.
24474
24475 @item
24476 Article headers can be buttonized (@pxref{Article Washing}).
24477
24478 @item
24479 All mail back ends support fetching articles by @code{Message-ID}.
24480
24481 @item
24482 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24483
24484 @item
24485 All summary mode commands are available directly from the article
24486 buffer (@pxref{Article Keymap}).
24487
24488 @item
24489 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24490 Layout}).
24491
24492 @item
24493 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24494 @iftex
24495 @iflatex
24496 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24497 @end iflatex
24498 @end iftex
24499
24500 @item
24501 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24502
24503 @lisp
24504 (setq gnus-use-nocem t)
24505 @end lisp
24506
24507 @item
24508 Groups can be made permanently visible (@pxref{Listing Groups}).
24509
24510 @lisp
24511 (setq gnus-permanently-visible-groups "^nnml:")
24512 @end lisp
24513
24514 @item
24515 Many new hooks have been introduced to make customizing easier.
24516
24517 @item
24518 Gnus respects the @code{Mail-Copies-To} header.
24519
24520 @item
24521 Threads can be gathered by looking at the @code{References} header
24522 (@pxref{Customizing Threading}).
24523
24524 @lisp
24525 (setq gnus-summary-thread-gathering-function
24526       'gnus-gather-threads-by-references)
24527 @end lisp
24528
24529 @item
24530 Read articles can be stored in a special backlog buffer to avoid
24531 refetching (@pxref{Article Backlog}).
24532
24533 @lisp
24534 (setq gnus-keep-backlog 50)
24535 @end lisp
24536
24537 @item
24538 A clean copy of the current article is always stored in a separate
24539 buffer to allow easier treatment.
24540
24541 @item
24542 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24543
24544 @item
24545 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24546 Articles}).
24547
24548 @lisp
24549 (setq gnus-prompt-before-saving t)
24550 @end lisp
24551
24552 @item
24553 @code{gnus-uu} can view decoded files asynchronously while fetching
24554 articles (@pxref{Other Decode Variables}).
24555
24556 @lisp
24557 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24558 @end lisp
24559
24560 @item
24561 Filling in the article buffer now works properly on cited text
24562 (@pxref{Article Washing}).
24563
24564 @item
24565 Hiding cited text adds buttons to toggle hiding, and how much
24566 cited text to hide is now customizable (@pxref{Article Hiding}).
24567
24568 @lisp
24569 (setq gnus-cited-lines-visible 2)
24570 @end lisp
24571
24572 @item
24573 Boring headers can be hidden (@pxref{Article Hiding}).
24574
24575 @item
24576 Default scoring values can now be set from the menu bar.
24577
24578 @item
24579 Further syntax checking of outgoing articles have been added.
24580
24581 @end itemize
24582
24583
24584 @node Red Gnus
24585 @subsubsection Red Gnus
24586
24587 New features in Gnus 5.4/5.5:
24588
24589 @iftex
24590 @iflatex
24591 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24592 @end iflatex
24593 @end iftex
24594
24595 @itemize @bullet
24596
24597 @item
24598 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24599
24600 @item
24601 Article prefetching functionality has been moved up into
24602 Gnus (@pxref{Asynchronous Fetching}).
24603
24604 @item
24605 Scoring can now be performed with logical operators like @code{and},
24606 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24607 Scoring}).
24608
24609 @item
24610 Article washing status can be displayed in the
24611 article mode line (@pxref{Misc Article}).
24612
24613 @item
24614 @file{gnus.el} has been split into many smaller files.
24615
24616 @item
24617 Suppression of duplicate articles based on Message-ID can be done
24618 (@pxref{Duplicate Suppression}).
24619
24620 @lisp
24621 (setq gnus-suppress-duplicates t)
24622 @end lisp
24623
24624 @item
24625 New variables for specifying what score and adapt files are to be
24626 considered home score and adapt files (@pxref{Home Score File}) have
24627 been added.
24628
24629 @item
24630 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24631 Server Internals}).
24632
24633 @item
24634 Groups can inherit group parameters from parent topics (@pxref{Topic
24635 Parameters}).
24636
24637 @item
24638 Article editing has been revamped and is now actually usable.
24639
24640 @item
24641 Signatures can be recognized in more intelligent fashions
24642 (@pxref{Article Signature}).
24643
24644 @item
24645 Summary pick mode has been made to look more @code{nn}-like.  Line
24646 numbers are displayed and the @kbd{.} command can be used to pick
24647 articles (@code{Pick and Read}).
24648
24649 @item
24650 Commands for moving the @file{.newsrc.eld} from one server to
24651 another have been added (@pxref{Changing Servers}).
24652
24653 @item
24654 There's a way now to specify that ``uninteresting'' fields be suppressed
24655 when generating lines in buffers (@pxref{Advanced Formatting}).
24656
24657 @item
24658 Several commands in the group buffer can be undone with @kbd{C-M-_}
24659 (@pxref{Undo}).
24660
24661 @item
24662 Scoring can be done on words using the new score type @code{w}
24663 (@pxref{Score File Format}).
24664
24665 @item
24666 Adaptive scoring can be done on a Subject word-by-word basis
24667 (@pxref{Adaptive Scoring}).
24668
24669 @lisp
24670 (setq gnus-use-adaptive-scoring '(word))
24671 @end lisp
24672
24673 @item
24674 Scores can be decayed (@pxref{Score Decays}).
24675
24676 @lisp
24677 (setq gnus-decay-scores t)
24678 @end lisp
24679
24680 @item
24681 Scoring can be performed using a regexp on the Date header.  The Date is
24682 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24683
24684 @item
24685 A new command has been added to remove all data on articles from
24686 the native server (@pxref{Changing Servers}).
24687
24688 @item
24689 A new command for reading collections of documents
24690 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24691 (@pxref{Really Various Summary Commands}).
24692
24693 @item
24694 Process mark sets can be pushed and popped (@pxref{Setting Process
24695 Marks}).
24696
24697 @item
24698 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24699 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24700
24701 @item
24702 A new back end for reading searches from Web search engines
24703 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24704 (@pxref{Web Searches}).
24705
24706 @item
24707 Groups inside topics can now be sorted using the standard sorting
24708 functions, and each topic can be sorted independently (@pxref{Topic
24709 Sorting}).
24710
24711 @item
24712 Subsets of the groups can be sorted independently (@code{Sorting
24713 Groups}).
24714
24715 @item
24716 Cached articles can be pulled into the groups (@pxref{Summary Generation
24717 Commands}).
24718 @iftex
24719 @iflatex
24720 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24721 @end iflatex
24722 @end iftex
24723
24724 @item
24725 Score files are now applied in a more reliable order (@pxref{Score
24726 Variables}).
24727
24728 @item
24729 Reports on where mail messages end up can be generated (@pxref{Splitting
24730 Mail}).
24731
24732 @item
24733 More hooks and functions have been added to remove junk from incoming
24734 mail before saving the mail (@pxref{Washing Mail}).
24735
24736 @item
24737 Emphasized text can be properly fontisized:
24738
24739 @end itemize
24740
24741
24742 @node Quassia Gnus
24743 @subsubsection Quassia Gnus
24744
24745 New features in Gnus 5.6:
24746
24747 @itemize @bullet
24748
24749 @item
24750 New functionality for using Gnus as an offline newsreader has been
24751 added.  A plethora of new commands and modes have been added.
24752 @xref{Gnus Unplugged}, for the full story.
24753
24754 @item
24755 The @code{nndraft} back end has returned, but works differently than
24756 before.  All Message buffers are now also articles in the @code{nndraft}
24757 group, which is created automatically.
24758
24759 @item
24760 @code{gnus-alter-header-function} can now be used to alter header
24761 values.
24762
24763 @item
24764 @code{gnus-summary-goto-article} now accept Message-ID's.
24765
24766 @item
24767 A new Message command for deleting text in the body of a message
24768 outside the region: @kbd{C-c C-v}.
24769
24770 @item
24771 You can now post to component group in @code{nnvirtual} groups with
24772 @kbd{C-u C-c C-c}.
24773
24774 @item
24775  @code{nntp-rlogin-program}---new variable to ease customization.
24776
24777 @item
24778 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24779 re-highlighting of the article buffer.
24780
24781 @item
24782 New element in @code{gnus-boring-article-headers}---@code{long-to}.
24783
24784 @item
24785 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
24786 details.
24787
24788 @item
24789 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24790 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24791
24792 @item
24793 @code{gnus-simplify-subject-functions} variable to allow greater
24794 control over simplification.
24795
24796 @item
24797 @kbd{A T}---new command for fetching the current thread.
24798
24799 @item
24800 @kbd{/ T}---new command for including the current thread in the
24801 limit.
24802
24803 @item
24804 @kbd{M-RET} is a new Message command for breaking cited text.
24805
24806 @item
24807 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24808
24809 @item
24810 The @code{custom-face-lookup} function has been removed.
24811 If you used this function in your initialization files, you must
24812 rewrite them to use @code{face-spec-set} instead.
24813
24814 @item
24815 Canceling now uses the current select method.  Symbolic prefix
24816 @kbd{a} forces normal posting method.
24817
24818 @item
24819 New command to translate M******** sm*rtq**t*s into proper
24820 text---@kbd{W d}.
24821
24822 @item
24823 For easier debugging of @code{nntp}, you can set
24824 @code{nntp-record-commands} to a non-@code{nil} value.
24825
24826 @item
24827 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24828 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24829
24830 @item
24831 A command for editing group parameters from the summary buffer
24832 has been added.
24833
24834 @item
24835 A history of where mails have been split is available.
24836
24837 @item
24838 A new article date command has been added---@code{article-date-iso8601}.
24839
24840 @item
24841 Subjects can be simplified when threading by setting
24842 @code{gnus-score-thread-simplify}.
24843
24844 @item
24845 A new function for citing in Message has been
24846 added---@code{message-cite-original-without-signature}.
24847
24848 @item
24849 @code{article-strip-all-blank-lines}---new article command.
24850
24851 @item
24852 A new Message command to kill to the end of the article has
24853 been added.
24854
24855 @item
24856 A minimum adaptive score can be specified by using the
24857 @code{gnus-adaptive-word-minimum} variable.
24858
24859 @item
24860 The ``lapsed date'' article header can be kept continually
24861 updated by the @code{gnus-start-date-timer} command.
24862
24863 @item
24864 Web listserv archives can be read with the @code{nnlistserv} back end.
24865
24866 @item
24867 Old dejanews archives can now be read by @code{nnweb}.
24868
24869 @end itemize
24870
24871 @node Pterodactyl Gnus
24872 @subsubsection Pterodactyl Gnus
24873
24874 New features in Gnus 5.8:
24875
24876 @itemize @bullet
24877
24878 @item
24879 The mail-fetching functions have changed.  See the manual for the
24880 many details.  In particular, all procmail fetching variables are gone.
24881
24882 If you used procmail like in
24883
24884 @lisp
24885 (setq nnmail-use-procmail t)
24886 (setq nnmail-spool-file 'procmail)
24887 (setq nnmail-procmail-directory "~/mail/incoming/")
24888 (setq nnmail-procmail-suffix "\\.in")
24889 @end lisp
24890
24891 this now has changed to
24892
24893 @lisp
24894 (setq mail-sources
24895       '((directory :path "~/mail/incoming/"
24896                    :suffix ".in")))
24897 @end lisp
24898
24899 @xref{Mail Source Specifiers}.
24900
24901 @item
24902 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24903 Gnus, and adds a slew of new commands.  See the manual for details.
24904
24905 @item
24906 Gnus has also been multilingualized.  This also affects too
24907 many parts of Gnus to summarize here, and adds many new variables.
24908
24909 @item
24910 @code{gnus-auto-select-first} can now be a function to be
24911 called to position point.
24912
24913 @item
24914 The user can now decide which extra headers should be included in
24915 summary buffers and @acronym{NOV} files.
24916
24917 @item
24918 @code{gnus-article-display-hook} has been removed.  Instead, a number
24919 of variables starting with @code{gnus-treat-} have been added.
24920
24921 @item
24922 The Gnus posting styles have been redone again and now works in a
24923 subtly different manner.
24924
24925 @item
24926 New web-based back ends have been added: @code{nnslashdot},
24927 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24928 again, to keep up with ever-changing layouts.
24929
24930 @item
24931 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24932
24933 @end itemize
24934
24935 @node Oort Gnus
24936 @subsubsection Oort Gnus
24937 @cindex Oort Gnus
24938
24939 New features in Gnus 5.10:
24940
24941 @itemize @bullet
24942
24943 @item
24944 The revised Gnus @acronym{FAQ} is included in the manual,
24945 @xref{Frequently Asked Questions}.
24946
24947 @item
24948 Upgrading from previous (stable) version if you have used Oort.
24949
24950 If you have tried Oort (the unstable Gnus branch leading to this
24951 release) but went back to a stable version, be careful when upgrading to
24952 this version.  In particular, you will probably want to remove all
24953 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24954 read from your @file{.newsrc.eld} instead of from the
24955 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24956 later entry for more information about marks.  Note that downgrading
24957 isn't save in general.
24958
24959 @item
24960 Article Buttons
24961
24962 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24963 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24964 variables @code{gnus-button-@var{*}-level} can be used to control the
24965 appearance of all article buttons.  @xref{Article Button Levels}.
24966
24967 @item
24968 Dired integration
24969
24970 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24971 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
24972 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24973 (@kbd{C-c P}).  It is enabled with
24974 @lisp
24975 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24976 @end lisp
24977
24978 @item
24979 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
24980
24981 @item
24982 Single-part yenc encoded attachments can be decoded.
24983
24984 @item
24985 Picons
24986
24987 The picons code has been reimplemented to work in GNU Emacs---some of
24988 the previous options have been removed or renamed.
24989
24990 Picons are small ``personal icons'' representing users, domain and
24991 newsgroups, which can be displayed in the Article buffer.
24992 @xref{Picons}.
24993
24994 @item
24995 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
24996 boundary line is drawn at the end of the headers.
24997
24998 @item
24999 Retrieval of charters and control messages
25000
25001 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25002 control messages (@kbd{H C}).
25003
25004 @item
25005 Delayed articles
25006
25007 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25008 buffer.  The messages are delivered at specified time.  This is useful
25009 for sending yourself reminders.  @xref{Delayed Articles}.
25010
25011 @item
25012 If @code{auto-compression-mode} is enabled, attachments are automatically
25013 decompressed when activated.
25014
25015 @item
25016 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25017 the nnml back end allows compressed message files.
25018
25019 @item
25020 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25021
25022 @item
25023 The Summary Buffer uses an arrow in the fringe to indicate the current
25024 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25025
25026 @item
25027 Warn about email replies to news
25028
25029 Do you often find yourself replying to news by email by mistake?  Then
25030 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25031 you.
25032
25033 @item
25034 If the new option @code{gnus-summary-display-while-building} is
25035 non-@code{nil}, the summary buffer is shown and updated as it's being
25036 built.
25037
25038 @item
25039 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25040 opposed to old but unread messages).
25041
25042 @item
25043 The new option @code{gnus-gcc-mark-as-read} automatically marks
25044 Gcc articles as read.
25045
25046 @item
25047 The nndoc back end now supports mailman digests and exim bounces.
25048
25049 @item
25050 Gnus supports RFC 2369 mailing list headers, and adds a number of
25051 related commands in mailing list groups.  @xref{Mailing List}.
25052
25053 @item
25054 The Date header can be displayed in a format that can be read aloud
25055 in English.  @xref{Article Date}.
25056
25057 @item
25058 The envelope sender address can be customized when using Sendmail.
25059 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25060
25061 @item
25062 diffs are automatically highlighted in groups matching
25063 @code{mm-uu-diff-groups-regexp}
25064
25065 @item
25066 @acronym{TLS} wrapper shipped with Gnus
25067
25068 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25069 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25070 @acronym{TLS}/@acronym{SSL} support via (external third party)
25071 @file{ssl.el} and OpenSSL still works.
25072
25073 @item
25074 New @file{make.bat} for compiling and installing Gnus under MS Windows
25075
25076 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25077 first argument to the batch-program should be the directory where
25078 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25079 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25080 the second parameter.
25081
25082 @file{make.bat} has been rewritten from scratch, it now features
25083 automatic recognition of XEmacs and GNU Emacs, generates
25084 @file{gnus-load.el}, checks if errors occur while compilation and
25085 generation of info files and reports them at the end of the build
25086 process.  It now uses @code{makeinfo} if it is available and falls
25087 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25088 install all files which are necessary to run Gnus and be generally a
25089 complete replacement for the @code{configure; make; make install}
25090 cycle used under Unix systems.
25091
25092 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25093 been removed.
25094
25095 @item
25096 Support for non-@acronym{ASCII} domain names
25097
25098 Message supports non-@acronym{ASCII} domain names in From:, To: and
25099 Cc: and will query you whether to perform encoding when you try to
25100 send a message.  The variable @code{message-use-idna} controls this.
25101 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25102 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25103 controls this.
25104
25105 @item
25106 Better handling of Microsoft citation styles
25107
25108 Gnus now tries to recognize the mangled header block that some Microsoft
25109 mailers use to indicate that the rest of the message is a citation, even
25110 though it is not quoted in any way.  The variable
25111 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25112 citations.
25113
25114 @item
25115 @code{gnus-article-skip-boring}
25116
25117 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25118 not scroll down to show you a page that contains only boring text,
25119 which by default means cited text and signature.  You can customize
25120 what is skippable using @code{gnus-article-boring-faces}.
25121
25122 This feature is especially useful if you read many articles that
25123 consist of a little new content at the top with a long, untrimmed
25124 message cited below.
25125
25126 @item
25127 The format spec @code{%C} for positioning point has changed to @code{%*}.
25128
25129 @item
25130 The new variable @code{gnus-parameters} can be used to set group parameters.
25131
25132 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25133 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25134 enjoy the powers of customize, and simplified backups since you set the
25135 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25136 variable maps regular expressions matching group names to group
25137 parameters, a'la:
25138 @lisp
25139 (setq gnus-parameters
25140       '(("mail\\..*"
25141          (gnus-show-threads nil)
25142          (gnus-use-scoring nil))
25143         ("^nnimap:\\(foo.bar\\)$"
25144          (to-group . "\\1"))))
25145 @end lisp
25146
25147 @item
25148 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25149
25150 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25151 disable it.
25152
25153 @item
25154 Gnus no longer generate the Sender: header automatically.
25155
25156 Earlier it was generated iff the user configurable email address was
25157 different from the Gnus guessed default user address.  As the guessing
25158 algorithm is rarely correct these days, and (more controversially) the
25159 only use of the Sender: header was to check if you are entitled to
25160 cancel/supersede news (which is now solved by Cancel Locks instead,
25161 see another entry), generation of the header has been disabled by
25162 default.  See the variables @code{message-required-headers},
25163 @code{message-required-news-headers}, and
25164 @code{message-required-mail-headers}.
25165
25166 @item
25167 Features from third party @file{message-utils.el} added to @file{message.el}.
25168
25169 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25170 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25171 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25172 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25173 appropriate headers and a note in the body for cross-postings and
25174 followups (see the variables @code{message-cross-post-@var{*}}).
25175
25176 @item
25177 References and X-Draft-Headers are no longer generated when you start
25178 composing messages and @code{message-generate-headers-first} is
25179 @code{nil}.
25180
25181 @item
25182 Improved anti-spam features.
25183
25184 Gnus is now able to take out spam from your mail and news streams
25185 using a wide variety of programs and filter rules.  Among the supported
25186 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25187 for easy use of external packages such as SpamAssassin and Hashcash
25188 are also new.  @xref{Thwarting Email Spam}.
25189
25190 @item
25191 Easy inclusion of X-Faces headers.
25192
25193 @item
25194 Face headers handling.
25195
25196 @item
25197 In the summary buffer, the new command @kbd{/ N} inserts new messages
25198 and @kbd{/ o} inserts old messages.
25199
25200 @item
25201 Gnus decodes morse encoded messages if you press @kbd{W m}.
25202
25203 @item
25204 Unread count correct in nnimap groups.
25205
25206 The estimated number of unread articles in the group buffer should now
25207 be correct for nnimap groups.  This is achieved by calling
25208 @code{nnimap-fixup-unread-after-getting-new-news} from the
25209 @code{gnus-setup-news-hook} (called on startup) and
25210 @code{gnus-after-getting-new-news-hook}. (called after getting new
25211 mail).  If you have modified those variables from the default, you may
25212 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25213 you were happy with the estimate and want to save some (minimal) time
25214 when getting new mail, remove the function.
25215
25216 @item
25217 Group Carbon Copy (GCC) quoting
25218
25219 To support groups that contains SPC and other weird characters, groups
25220 are quoted before they are placed in the Gcc: header.  This means
25221 variables such as @code{gnus-message-archive-group} should no longer
25222 contain quote characters to make groups containing SPC work.  Also, if
25223 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25224 into two groups) you must change it to return the list
25225 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25226 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25227 was incorrect earlier, it just didn't generate any problems since it
25228 was inserted directly.
25229
25230 @item
25231 @file{~/News/overview/} not used.
25232
25233 As a result of the following change, the @file{~/News/overview/}
25234 directory is not used any more.  You can safely delete the entire
25235 hierarchy.
25236
25237 @item
25238 @code{gnus-agent}
25239
25240 The Gnus Agent has seen a major updated and is now enabled by default,
25241 and all nntp and nnimap servers from @code{gnus-select-method} and
25242 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25243 only the server in @code{gnus-select-method} was agentized by the
25244 default, and the agent was disabled by default.  When the agent is
25245 enabled, headers are now also retrieved from the Agent cache instead
25246 of the back ends when possible.  Earlier this only happened in the
25247 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25248 @kbd{J r} in the server buffer.  Gnus will not download articles into
25249 the Agent cache, unless you instruct it to do so, though, by using
25250 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25251 behaviour of having the Agent disabled with @code{(setq gnus-agent
25252 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25253 is not needed any more.
25254
25255 @item
25256 @code{gnus-summary-line-format}
25257
25258 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25259 %s\n}.  Moreover @code{gnus-extra-headers},
25260 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25261 changed their default so that the users name will be replaced by the
25262 recipient's name or the group name posting to for @acronym{NNTP}
25263 groups.
25264
25265 @item
25266 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25267
25268 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25269 broken Outlook (Express) articles.
25270
25271 @item
25272 @code{(require 'gnus-load)}
25273
25274 If you use a stand-alone Gnus distribution, you'd better add
25275 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25276 lisp directory into load-path.
25277
25278 File @file{gnus-load.el} contains autoload commands, functions and variables,
25279 some of which may not be included in distributions of Emacsen.
25280
25281 @item
25282 @code{gnus-slave-unplugged}
25283
25284 A new command which starts Gnus offline in slave mode.
25285
25286 @item
25287 @code{message-insinuate-rmail}
25288
25289 Adding @code{(message-insinuate-rmail)} and @code{(setq
25290 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25291 compose, reply and forward messages in message-mode, where you can
25292 enjoy the power of @acronym{MML}.
25293
25294 @item
25295 @code{message-minibuffer-local-map}
25296
25297 The line below enables BBDB in resending a message:
25298 @lisp
25299 (define-key message-minibuffer-local-map [(tab)]
25300   'bbdb-complete-name)
25301 @end lisp
25302
25303 @item
25304 Externalizing and deleting of attachments.
25305
25306 If @code{gnus-gcc-externalize-attachments} or
25307 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25308 local files as external parts.
25309
25310 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25311 on @acronym{MIME} buttons) saves a part and replaces the part with an
25312 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25313 @acronym{MIME} buttons) removes a part.  It works only on back ends
25314 that support editing.
25315
25316 @item
25317 @code{gnus-default-charset}
25318
25319 The default value is determined from the
25320 @code{current-language-environment} variable, instead of
25321 @code{iso-8859-1}.  Also the @samp{.*} item in
25322 @code{gnus-group-charset-alist} is removed.
25323
25324 @item
25325 @code{gnus-posting-styles}
25326
25327 Add a new format of match like
25328 @lisp
25329 ((header "to" "larsi.*org")
25330  (Organization "Somewhere, Inc."))
25331 @end lisp
25332 The old format like the lines below is obsolete, but still accepted.
25333 @lisp
25334 (header "to" "larsi.*org"
25335         (Organization "Somewhere, Inc."))
25336 @end lisp
25337
25338 @item
25339 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25340
25341 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25342 added into these two variables.  If you customized those, perhaps you
25343 need add those two headers too.
25344
25345 @item
25346 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25347
25348 If one reads an article while plugged, and the article already exists
25349 in the Agent, it won't get downloaded once more.  @code{(setq
25350 gnus-agent-cache nil)} reverts to the old behavior.
25351
25352 @item
25353 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25354 composing messages, it is enabled by @code{use-hard-newlines}.
25355 Decoding format=flowed was present but not documented in earlier
25356 versions.
25357
25358 @item
25359 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25360
25361 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25362
25363 @item
25364 Gnus supports Maildir groups.
25365
25366 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25367
25368 @item
25369 Printing capabilities are enhanced.
25370
25371 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25372 Article buffers.  Also, each individual @acronym{MIME} part can be
25373 printed using @kbd{p} on the @acronym{MIME} button.
25374
25375 @item
25376 Message supports the Importance: (RFC 2156) header.
25377
25378 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25379 the valid values.
25380
25381 @item
25382 Gnus supports Cancel Locks in News.
25383
25384 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25385 used to determine if you wrote an article or not (for cancelling and
25386 superseding).  Gnus generates a random password string the first time
25387 you post a message, and saves it in your @file{~/.emacs} using the Custom
25388 system.  While the variable is called @code{canlock-password}, it is not
25389 security sensitive data.  Publishing your canlock string on the web
25390 will not allow anyone to be able to anything she could not already do.
25391 The behaviour can be changed by customizing @code{message-insert-canlock}.
25392
25393 @item
25394 Gnus supports server-side mail filtering using Sieve.
25395
25396 Sieve rules can be added as Group Parameters for groups, and the
25397 complete Sieve script is generated using @kbd{D g} from the Group
25398 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25399 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25400 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25401
25402 @item
25403 Extended format specs.
25404
25405 Format spec @samp{%&user-date;} is added into
25406 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25407 format specs are supported.  The extended format specs look like
25408 @samp{%u&foo;}, which invokes function
25409 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25410 escape character, old user defined format @samp{%u&} is no longer supported.
25411
25412 @item
25413 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25414
25415 It was aliased to @kbd{Y c}
25416 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25417 out other articles.
25418
25419 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25420
25421 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25422 s}, @kbd{/ a}, and @kbd{/ x}
25423 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25424 result will be to display all articles that do not match the expression.
25425
25426 @item
25427 Group names are treated as UTF-8 by default.
25428
25429 This is supposedly what USEFOR wanted to migrate to.  See
25430 @code{gnus-group-name-charset-group-alist} and
25431 @code{gnus-group-name-charset-method-alist} for customization.
25432
25433 @item
25434 The nnml and nnfolder back ends store marks for each groups.
25435
25436 This makes it possible to take backup of nnml/nnfolder servers/groups
25437 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25438 makes it possible to share articles and marks between users (without
25439 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25440 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25441 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25442 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25443 another machine, Gnus will automatically use the @file{.marks} or
25444 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25445 The new server variables @code{nnml-marks-is-evil} and
25446 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25447
25448 @item
25449 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25450 been renamed to ``Gnus''.
25451
25452 @item
25453 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25454 renamed to ``Attachments''.  Note that this menu also contains security
25455 related stuff, like signing and encryption (@pxref{Security, Security,,
25456 message, Message Manual}).
25457
25458 @item
25459 @code{gnus-group-charset-alist} and
25460 @code{gnus-group-ignored-charsets-alist}.
25461
25462 The regexps in these variables are compared with full group names
25463 instead of real group names in 5.8.  Users who customize these
25464 variables should change those regexps accordingly.  For example:
25465 @lisp
25466 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25467 @end lisp
25468
25469 @item
25470 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25471 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25472
25473 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25474 additional Lisp libraries.  This add several menu items to the
25475 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25476 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25477
25478 @item
25479 Gnus inlines external parts (message/external).
25480
25481 @item
25482 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25483 C-m}.
25484
25485 This change was made to avoid conflict with the standard binding of
25486 @code{back-to-indentation}, which is also useful in message mode.
25487 @end itemize
25488
25489 @iftex
25490
25491 @page
25492 @node The Manual
25493 @section The Manual
25494 @cindex colophon
25495 @cindex manual
25496
25497 This manual was generated from a TeXinfo file and then run through
25498 either @code{texi2dvi}
25499 @iflatex
25500 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25501 and then run through @code{latex} and @code{dvips}
25502 @end iflatex
25503 to get what you hold in your hands now.
25504
25505 The following conventions have been used:
25506
25507 @enumerate
25508
25509 @item
25510 This is a @samp{string}
25511
25512 @item
25513 This is a @kbd{keystroke}
25514
25515 @item
25516 This is a @file{file}
25517
25518 @item
25519 This is a @code{symbol}
25520
25521 @end enumerate
25522
25523 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25524 mean:
25525
25526 @lisp
25527 (setq flargnoze "yes")
25528 @end lisp
25529
25530 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25531
25532 @lisp
25533 (setq flumphel 'yes)
25534 @end lisp
25535
25536 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25537 ever get them confused.
25538
25539 @iflatex
25540 @c @head
25541 Of course, everything in this manual is of vital interest, so you should
25542 read it all.  Several times.  However, if you feel like skimming the
25543 manual, look for that gnu head you should see in the margin over
25544 there---it means that what's being discussed is of more importance than
25545 the rest of the stuff.  (On the other hand, if everything is infinitely
25546 important, how can anything be more important than that?  Just one more
25547 of the mysteries of this world, I guess.)
25548 @end iflatex
25549
25550 @end iftex
25551
25552
25553 @node On Writing Manuals
25554 @section On Writing Manuals
25555
25556 I guess most manuals are written after-the-fact; documenting a program
25557 that's already there.  This is not how this manual is written.  When
25558 implementing something, I write the manual entry for that something
25559 straight away.  I then see that it's difficult to explain the
25560 functionality, so I write how it's supposed to be, and then I change the
25561 implementation.  Writing the documentation and writing the code goes
25562 hand in hand.
25563
25564 This, of course, means that this manual has no, or little, flow.  It
25565 documents absolutely everything in Gnus, but often not where you're
25566 looking for it.  It is a reference manual, and not a guide to how to get
25567 started with Gnus.
25568
25569 That would be a totally different book, that should be written using the
25570 reference manual as source material.  It would look quite differently.
25571
25572
25573 @page
25574 @node Terminology
25575 @section Terminology
25576
25577 @cindex terminology
25578 @table @dfn
25579
25580 @item news
25581 @cindex news
25582 This is what you are supposed to use this thing for---reading news.
25583 News is generally fetched from a nearby @acronym{NNTP} server, and is
25584 generally publicly available to everybody.  If you post news, the entire
25585 world is likely to read just what you have written, and they'll all
25586 snigger mischievously.  Behind your back.
25587
25588 @item mail
25589 @cindex mail
25590 Everything that's delivered to you personally is mail.  Some news/mail
25591 readers (like Gnus) blur the distinction between mail and news, but
25592 there is a difference.  Mail is private.  News is public.  Mailing is
25593 not posting, and replying is not following up.
25594
25595 @item reply
25596 @cindex reply
25597 Send a mail to the person who has written what you are reading.
25598
25599 @item follow up
25600 @cindex follow up
25601 Post an article to the current newsgroup responding to the article you
25602 are reading.
25603
25604 @item back end
25605 @cindex back end
25606 Gnus considers mail and news to be mostly the same, really.  The only
25607 difference is how to access the actual articles.  News articles are
25608 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25609 messages could be read from a file on the local disk.  The internal
25610 architecture of Gnus thus comprises a ``front end'' and a number of
25611 ``back ends''.  Internally, when you enter a group (by hitting
25612 @key{RET}, say), you thereby invoke a function in the front end in
25613 Gnus.  The front end then ``talks'' to a back end and says things like
25614 ``Give me the list of articles in the foo group'' or ``Show me article
25615 number 4711''.
25616
25617 So a back end mainly defines either a protocol (the @code{nntp} back
25618 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25619 accesses mail via @acronym{IMAP}) or a file format and directory
25620 layout (the @code{nnspool} back end accesses news via the common
25621 ``spool directory'' format, the @code{nnml} back end access mail via a
25622 file format and directory layout that's quite similar).
25623
25624 Gnus does not handle the underlying media, so to speak---this is all
25625 done by the back ends.  A back end is a collection of functions to
25626 access the articles.
25627
25628 However, sometimes the term ``back end'' is also used where ``server''
25629 would have been more appropriate.  And then there is the term ``select
25630 method'' which can mean either.  The Gnus terminology can be quite
25631 confusing.
25632
25633 @item native
25634 @cindex native
25635 Gnus will always use one method (and back end) as the @dfn{native}, or
25636 default, way of getting news.
25637
25638 @item foreign
25639 @cindex foreign
25640 You can also have any number of foreign groups active at the same time.
25641 These are groups that use non-native non-secondary back ends for getting
25642 news.
25643
25644 @item secondary
25645 @cindex secondary
25646 Secondary back ends are somewhere half-way between being native and being
25647 foreign, but they mostly act like they are native.
25648
25649 @item article
25650 @cindex article
25651 A message that has been posted as news.
25652
25653 @item mail message
25654 @cindex mail message
25655 A message that has been mailed.
25656
25657 @item message
25658 @cindex message
25659 A mail message or news article
25660
25661 @item head
25662 @cindex head
25663 The top part of a message, where administrative information (etc.) is
25664 put.
25665
25666 @item body
25667 @cindex body
25668 The rest of an article.  Everything not in the head is in the
25669 body.
25670
25671 @item header
25672 @cindex header
25673 A line from the head of an article.
25674
25675 @item headers
25676 @cindex headers
25677 A collection of such lines, or a collection of heads.  Or even a
25678 collection of @acronym{NOV} lines.
25679
25680 @item @acronym{NOV}
25681 @cindex @acronym{NOV}
25682 When Gnus enters a group, it asks the back end for the headers of all
25683 unread articles in the group.  Most servers support the News OverView
25684 format, which is more compact and much faster to read and parse than the
25685 normal @sc{head} format.
25686
25687 @item level
25688 @cindex levels
25689 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25690 that have a lower level are ``more'' subscribed than the groups with a
25691 higher level.  In fact, groups on levels 1-5 are considered
25692 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25693 are @dfn{killed}.  Commands for listing groups and scanning for new
25694 articles will all use the numeric prefix as @dfn{working level}.
25695
25696 @item killed groups
25697 @cindex killed groups
25698 No information on killed groups is stored or updated, which makes killed
25699 groups much easier to handle than subscribed groups.
25700
25701 @item zombie groups
25702 @cindex zombie groups
25703 Just like killed groups, only slightly less dead.
25704
25705 @item active file
25706 @cindex active file
25707 The news server has to keep track of what articles it carries, and what
25708 groups exist.  All this information in stored in the active file, which
25709 is rather large, as you might surmise.
25710
25711 @item bogus groups
25712 @cindex bogus groups
25713 A group that exists in the @file{.newsrc} file, but isn't known to the
25714 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25715 This means that the group probably doesn't exist (any more).
25716
25717 @item activating
25718 @cindex activating groups
25719 The act of asking the server for info on a group and computing the
25720 number of unread articles is called @dfn{activating the group}.
25721 Un-activated groups are listed with @samp{*} in the group buffer.
25722
25723 @item server
25724 @cindex server
25725 A machine one can connect to and get news (or mail) from.
25726
25727 @item select method
25728 @cindex select method
25729 A structure that specifies the back end, the server and the virtual
25730 server settings.
25731
25732 @item virtual server
25733 @cindex virtual server
25734 A named select method.  Since a select method defines all there is to
25735 know about connecting to a (physical) server, taking the thing as a
25736 whole is a virtual server.
25737
25738 @item washing
25739 @cindex washing
25740 Taking a buffer and running it through a filter of some sort.  The
25741 result will (more often than not) be cleaner and more pleasing than the
25742 original.
25743
25744 @item ephemeral groups
25745 @cindex ephemeral groups
25746 @cindex temporary groups
25747 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25748 groups are groups that will have no data stored---when you exit the
25749 group, it'll disappear into the aether.
25750
25751 @item solid groups
25752 @cindex solid groups
25753 This is the opposite of ephemeral groups.  All groups listed in the
25754 group buffer are solid groups.
25755
25756 @item sparse articles
25757 @cindex sparse articles
25758 These are article placeholders shown in the summary buffer when
25759 @code{gnus-build-sparse-threads} has been switched on.
25760
25761 @item threading
25762 @cindex threading
25763 To put responses to articles directly after the articles they respond
25764 to---in a hierarchical fashion.
25765
25766 @item root
25767 @cindex root
25768 @cindex thread root
25769 The first article in a thread is the root.  It is the ancestor of all
25770 articles in the thread.
25771
25772 @item parent
25773 @cindex parent
25774 An article that has responses.
25775
25776 @item child
25777 @cindex child
25778 An article that responds to a different article---its parent.
25779
25780 @item digest
25781 @cindex digest
25782 A collection of messages in one file.  The most common digest format is
25783 specified by RFC 1153.
25784
25785 @item splitting
25786 @cindex splitting, terminolgy
25787 @cindex mail sorting
25788 @cindex mail filtering (splitting)
25789 The action of sorting your emails according to certain rules. Sometimes
25790 incorrectly called mail filtering.
25791
25792 @end table
25793
25794
25795 @page
25796 @node Customization
25797 @section Customization
25798 @cindex general customization
25799
25800 All variables are properly documented elsewhere in this manual.  This
25801 section is designed to give general pointers on how to customize Gnus
25802 for some quite common situations.
25803
25804 @menu
25805 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25806 * Slow Terminal Connection::    You run a remote Emacs.
25807 * Little Disk Space::           You feel that having large setup files is icky.
25808 * Slow Machine::                You feel like buying a faster machine.
25809 @end menu
25810
25811
25812 @node Slow/Expensive Connection
25813 @subsection Slow/Expensive NNTP Connection
25814
25815 If you run Emacs on a machine locally, and get your news from a machine
25816 over some very thin strings, you want to cut down on the amount of data
25817 Gnus has to get from the @acronym{NNTP} server.
25818
25819 @table @code
25820
25821 @item gnus-read-active-file
25822 Set this to @code{nil}, which will inhibit Gnus from requesting the
25823 entire active file from the server.  This file is often v.  large.  You
25824 also have to set @code{gnus-check-new-newsgroups} and
25825 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25826 doesn't suddenly decide to fetch the active file anyway.
25827
25828 @item gnus-nov-is-evil
25829 This one has to be @code{nil}.  If not, grabbing article headers from
25830 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25831 support @sc{xover}; Gnus will detect this by itself.
25832 @end table
25833
25834
25835 @node Slow Terminal Connection
25836 @subsection Slow Terminal Connection
25837
25838 Let's say you use your home computer for dialing up the system that runs
25839 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25840 possible) the amount of data sent over the wires.
25841
25842 @table @code
25843
25844 @item gnus-auto-center-summary
25845 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25846 buffer all the time.  If it is @code{vertical}, do only vertical
25847 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25848 horizontal and vertical recentering.
25849
25850 @item gnus-visible-headers
25851 Cut down on the headers included in the articles to the
25852 minimum.  You can, in fact, make do without them altogether---most of the
25853 useful data is in the summary buffer, anyway.  Set this variable to
25854 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25855
25856 Set this hook to all the available hiding commands:
25857 @lisp
25858 (setq gnus-treat-hide-headers 'head
25859       gnus-treat-hide-signature t
25860       gnus-treat-hide-citation t)
25861 @end lisp
25862
25863 @item gnus-use-full-window
25864 By setting this to @code{nil}, you can make all the windows smaller.
25865 While this doesn't really cut down much generally, it means that you
25866 have to see smaller portions of articles before deciding that you didn't
25867 want to read them anyway.
25868
25869 @item gnus-thread-hide-subtree
25870 If this is non-@code{nil}, all threads in the summary buffer will be
25871 hidden initially.
25872
25873
25874 @item gnus-updated-mode-lines
25875 If this is @code{nil}, Gnus will not put information in the buffer mode
25876 lines, which might save some time.
25877 @end table
25878
25879
25880 @node Little Disk Space
25881 @subsection Little Disk Space
25882 @cindex disk space
25883
25884 The startup files can get rather large, so you may want to cut their
25885 sizes a bit if you are running out of space.
25886
25887 @table @code
25888
25889 @item gnus-save-newsrc-file
25890 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25891 only save @file{.newsrc.eld}.  This means that you will not be able to
25892 use any other newsreaders than Gnus.  This variable is @code{t} by
25893 default.
25894
25895 @item gnus-read-newsrc-file
25896 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25897 only read @file{.newsrc.eld}.  This means that you will not be able to
25898 use any other newsreaders than Gnus.  This variable is @code{t} by
25899 default.
25900
25901 @item gnus-save-killed-list
25902 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25903 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25904 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25905 variable to @code{nil}.  This variable is @code{t} by default.
25906
25907 @end table
25908
25909
25910 @node Slow Machine
25911 @subsection Slow Machine
25912 @cindex slow machine
25913
25914 If you have a slow machine, or are just really impatient, there are a
25915 few things you can do to make Gnus run faster.
25916
25917 Set @code{gnus-check-new-newsgroups} and
25918 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25919
25920 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25921 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25922 summary buffer faster.
25923
25924
25925 @page
25926 @node Troubleshooting
25927 @section Troubleshooting
25928 @cindex troubleshooting
25929
25930 Gnus works @emph{so} well straight out of the box---I can't imagine any
25931 problems, really.
25932
25933 Ahem.
25934
25935 @enumerate
25936
25937 @item
25938 Make sure your computer is switched on.
25939
25940 @item
25941 Make sure that you really load the current Gnus version.  If you have
25942 been running @sc{gnus}, you need to exit Emacs and start it up again before
25943 Gnus will work.
25944
25945 @item
25946 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25947 like @samp{T-gnus 6.16.* (based on Gnus v5.10.*; for SEMI 1.1*, FLIM
25948 1.1*)} you have the right files loaded.  If, on the other hand, you get
25949 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
25950 @file{.el} files lying around.  Delete these.
25951
25952 @item
25953 Read the help group (@kbd{G h} in the group buffer) for a
25954 @acronym{FAQ} and a how-to.
25955
25956 @item
25957 @vindex max-lisp-eval-depth
25958 Gnus works on many recursive structures, and in some extreme (and very
25959 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25960 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25961 something like that.
25962 @end enumerate
25963
25964 If all else fails, report the problem as a bug.
25965
25966 @cindex bugs
25967 @cindex reporting bugs
25968
25969 @kindex M-x gnus-bug
25970 @findex gnus-bug
25971 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25972 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25973 me the backtrace.  I will fix bugs, but I can only fix them if you send
25974 me a precise description as to how to reproduce the bug.
25975
25976 You really can never be too detailed in a bug report.  Always use the
25977 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
25978 a 10Kb mail each time you use it, and even if you have sent me your
25979 environment 500 times before.  I don't care.  I want the full info each
25980 time.
25981
25982 It is also important to remember that I have no memory whatsoever.  If
25983 you send a bug report, and I send you a reply, and then you just send
25984 back ``No, it's not! Moron!'', I will have no idea what you are
25985 insulting me about.  Always over-explain everything.  It's much easier
25986 for all of us---if I don't have all the information I need, I will just
25987 mail you and ask for more info, and everything takes more time.
25988
25989 If the problem you're seeing is very visual, and you can't quite explain
25990 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
25991 it somewhere it can be reached, and include the URL of the picture in
25992 the bug report.
25993
25994 @cindex patches
25995 If you would like to contribute a patch to fix bugs or make
25996 improvements, please produce the patch using @samp{diff -u}.
25997
25998 @cindex edebug
25999 If you want to debug your problem further before reporting, possibly
26000 in order to solve the problem yourself and send a patch, you can use
26001 edebug.  Debugging Lisp code is documented in the Elisp manual
26002 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26003 Lisp Reference Manual}).  To get you started with edebug, consider if
26004 you discover some weird behaviour when pressing @kbd{c}, the first
26005 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26006 the documentation buffer that leads you to the function definition,
26007 then press @kbd{M-x edebug-defun RET} with point inside that function,
26008 return to Gnus and press @kbd{c} to invoke the code.  You will be
26009 placed in the lisp buffer and can single step using @kbd{SPC} and
26010 evaluate expressions using @kbd{M-:} or inspect variables using
26011 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26012 @kbd{c} or @kbd{g}.
26013
26014 @cindex elp
26015 @cindex profile
26016 @cindex slow
26017 Sometimes, a problem do not directly generate an elisp error but
26018 manifests itself by causing Gnus to be very slow.  In these cases, you
26019 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26020 slow, and then try to analyze the backtrace (repeating the procedure
26021 helps isolating the real problem areas).
26022
26023 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26024 (or should be) fully documented elsewhere, but to get you started
26025 there are a few steps that need to be followed.  First, instrument the
26026 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26027 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26028 RET message}.  Then perform the operation that is slow and press
26029 @kbd{M-x elp-results}.  You will then see which operations that takes
26030 time, and can debug them further.  If the entire operation takes much
26031 longer than the time spent in the slowest function in the profiler
26032 output, you probably profiled the wrong part of Gnus.  To reset
26033 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26034 elp-restore-all} is supposed to remove profiling, but given the
26035 complexities and dynamic code generation in Gnus, it might not always
26036 work perfectly.
26037
26038 @cindex gnu.emacs.gnus
26039 @cindex ding mailing list
26040 If you just need help, you are better off asking on
26041 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26042 @email{ding@@gnus.org, the ding mailing list}.  Write to
26043 @email{ding-request@@gnus.org} to subscribe.
26044
26045
26046 @page
26047 @node Gnus Reference Guide
26048 @section Gnus Reference Guide
26049
26050 It is my hope that other people will figure out smart stuff that Gnus
26051 can do, and that other people will write those smart things as well.  To
26052 facilitate that I thought it would be a good idea to describe the inner
26053 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26054 it.
26055
26056 You can never expect the internals of a program not to change, but I
26057 will be defining (in some details) the interface between Gnus and its
26058 back ends (this is written in stone), the format of the score files
26059 (ditto), data structures (some are less likely to change than others)
26060 and general methods of operation.
26061
26062 @menu
26063 * Gnus Utility Functions::      Common functions and variable to use.
26064 * Back End Interface::          How Gnus communicates with the servers.
26065 * Score File Syntax::           A BNF definition of the score file standard.
26066 * Headers::                     How Gnus stores headers internally.
26067 * Ranges::                      A handy format for storing mucho numbers.
26068 * Group Info::                  The group info format.
26069 * Extended Interactive::        Symbolic prefixes and stuff.
26070 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26071 * Various File Formats::        Formats of files that Gnus use.
26072 @end menu
26073
26074
26075 @node Gnus Utility Functions
26076 @subsection Gnus Utility Functions
26077 @cindex Gnus utility functions
26078 @cindex utility functions
26079 @cindex functions
26080 @cindex internal variables
26081
26082 When writing small functions to be run from hooks (and stuff), it's
26083 vital to have access to the Gnus internal functions and variables.
26084 Below is a list of the most common ones.
26085
26086 @table @code
26087
26088 @item gnus-newsgroup-name
26089 @vindex gnus-newsgroup-name
26090 This variable holds the name of the current newsgroup.
26091
26092 @item gnus-find-method-for-group
26093 @findex gnus-find-method-for-group
26094 A function that returns the select method for @var{group}.
26095
26096 @item gnus-group-real-name
26097 @findex gnus-group-real-name
26098 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26099 name.
26100
26101 @item gnus-group-prefixed-name
26102 @findex gnus-group-prefixed-name
26103 Takes an unprefixed group name and a select method, and returns the full
26104 (prefixed) Gnus group name.
26105
26106 @item gnus-get-info
26107 @findex gnus-get-info
26108 Returns the group info list for @var{group}.
26109
26110 @item gnus-group-unread
26111 @findex gnus-group-unread
26112 The number of unread articles in @var{group}, or @code{t} if that is
26113 unknown.
26114
26115 @item gnus-active
26116 @findex gnus-active
26117 The active entry for @var{group}.
26118
26119 @item gnus-set-active
26120 @findex gnus-set-active
26121 Set the active entry for @var{group}.
26122
26123 @item gnus-add-current-to-buffer-list
26124 @findex gnus-add-current-to-buffer-list
26125 Adds the current buffer to the list of buffers to be killed on Gnus
26126 exit.
26127
26128 @item gnus-continuum-version
26129 @findex gnus-continuum-version
26130 Takes a Gnus version string as a parameter and returns a floating point
26131 number.  Earlier versions will always get a lower number than later
26132 versions.
26133
26134 @item gnus-group-read-only-p
26135 @findex gnus-group-read-only-p
26136 Says whether @var{group} is read-only or not.
26137
26138 @item gnus-news-group-p
26139 @findex gnus-news-group-p
26140 Says whether @var{group} came from a news back end.
26141
26142 @item gnus-ephemeral-group-p
26143 @findex gnus-ephemeral-group-p
26144 Says whether @var{group} is ephemeral or not.
26145
26146 @item gnus-server-to-method
26147 @findex gnus-server-to-method
26148 Returns the select method corresponding to @var{server}.
26149
26150 @item gnus-server-equal
26151 @findex gnus-server-equal
26152 Says whether two virtual servers are equal.
26153
26154 @item gnus-group-native-p
26155 @findex gnus-group-native-p
26156 Says whether @var{group} is native or not.
26157
26158 @item gnus-group-secondary-p
26159 @findex gnus-group-secondary-p
26160 Says whether @var{group} is secondary or not.
26161
26162 @item gnus-group-foreign-p
26163 @findex gnus-group-foreign-p
26164 Says whether @var{group} is foreign or not.
26165
26166 @item gnus-group-find-parameter
26167 @findex gnus-group-find-parameter
26168 Returns the parameter list of @var{group}.  If given a second parameter,
26169 returns the value of that parameter for @var{group}.
26170
26171 @item gnus-group-set-parameter
26172 @findex gnus-group-set-parameter
26173 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26174
26175 @item gnus-narrow-to-body
26176 @findex gnus-narrow-to-body
26177 Narrows the current buffer to the body of the article.
26178
26179 @item gnus-check-backend-function
26180 @findex gnus-check-backend-function
26181 Takes two parameters, @var{function} and @var{group}.  If the back end
26182 @var{group} comes from supports @var{function}, return non-@code{nil}.
26183
26184 @lisp
26185 (gnus-check-backend-function "request-scan" "nnml:misc")
26186 @result{} t
26187 @end lisp
26188
26189 @item gnus-read-method
26190 @findex gnus-read-method
26191 Prompts the user for a select method.
26192
26193 @end table
26194
26195
26196 @node Back End Interface
26197 @subsection Back End Interface
26198
26199 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26200 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26201 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26202 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26203 examples of the latter we have @code{nntp-port-number} and
26204 @code{nnmbox-directory}.
26205
26206 When Gnus asks for information from a back end---say @code{nntp}---on
26207 something, it will normally include a virtual server name in the
26208 function parameters.  (If not, the back end should use the ``current''
26209 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26210 server as its only (optional) parameter.  If this virtual server hasn't
26211 been opened, the function should fail.
26212
26213 Note that a virtual server name has no relation to some physical server
26214 name.  Take this example:
26215
26216 @lisp
26217 (nntp "odd-one"
26218       (nntp-address "ifi.uio.no")
26219       (nntp-port-number 4324))
26220 @end lisp
26221
26222 Here the virtual server name is @samp{odd-one} while the name of
26223 the physical server is @samp{ifi.uio.no}.
26224
26225 The back ends should be able to switch between several virtual servers.
26226 The standard back ends implement this by keeping an alist of virtual
26227 server environments that they pull down/push up when needed.
26228
26229 There are two groups of interface functions: @dfn{required functions},
26230 which must be present, and @dfn{optional functions}, which Gnus will
26231 always check for presence before attempting to call 'em.
26232
26233 All these functions are expected to return data in the buffer
26234 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26235 unfortunately named, but we'll have to live with it.  When I talk about
26236 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26237 talk about @dfn{return value}, I talk about the function value returned by
26238 the function call.  Functions that fail should return @code{nil} as the
26239 return value.
26240
26241 Some back ends could be said to be @dfn{server-forming} back ends, and
26242 some might be said not to be.  The latter are back ends that generally
26243 only operate on one group at a time, and have no concept of ``server''
26244 ---they have a group, and they deliver info on that group and nothing
26245 more.
26246
26247 Gnus identifies each message by way of group name and article number.  A
26248 few remarks about these article numbers might be useful.  First of all,
26249 the numbers are positive integers.  Secondly, it is normally not
26250 possible for later articles to ``re-use'' older article numbers without
26251 confusing Gnus.  That is, if a group has ever contained a message
26252 numbered 42, then no other message may get that number, or Gnus will get
26253 mightily confused.@footnote{See the function
26254 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26255 Third, article numbers must be assigned in order of arrival in the
26256 group; this is not necessarily the same as the date of the message.
26257
26258 The previous paragraph already mentions all the ``hard'' restrictions that
26259 article numbers must fulfill.  But it seems that it might be useful to
26260 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26261 if there are holes in the article numbering sequence.  However, due to
26262 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26263 also useful for the article numbers to start at 1 to avoid running out
26264 of numbers as long as possible.
26265
26266 Note that by convention, back ends are named @code{nnsomething}, but
26267 Gnus also comes with some @code{nnnotbackends}, such as
26268 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26269
26270 In the examples and definitions I will refer to the imaginary back end
26271 @code{nnchoke}.
26272
26273 @cindex @code{nnchoke}
26274
26275 @menu
26276 * Required Back End Functions::  Functions that must be implemented.
26277 * Optional Back End Functions::  Functions that need not be implemented.
26278 * Error Messaging::             How to get messages and report errors.
26279 * Writing New Back Ends::       Extending old back ends.
26280 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26281 * Mail-like Back Ends::         Some tips on mail back ends.
26282 @end menu
26283
26284
26285 @node Required Back End Functions
26286 @subsubsection Required Back End Functions
26287
26288 @table @code
26289
26290 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26291
26292 @var{articles} is either a range of article numbers or a list of
26293 @code{Message-ID}s.  Current back ends do not fully support either---only
26294 sequences (lists) of article numbers, and most back ends do not support
26295 retrieval of @code{Message-ID}s.  But they should try for both.
26296
26297 The result data should either be HEADs or @acronym{NOV} lines, and the result
26298 value should either be @code{headers} or @code{nov} to reflect this.
26299 This might later be expanded to @code{various}, which will be a mixture
26300 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26301
26302 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26303 headers'', in some meaning of the word.  This is generally done by
26304 fetching (at most) @var{fetch-old} extra headers less than the smallest
26305 article number in @code{articles}, and filling the gaps as well.  The
26306 presence of this parameter can be ignored if the back end finds it
26307 cumbersome to follow the request.  If this is non-@code{nil} and not a
26308 number, do maximum fetches.
26309
26310 Here's an example HEAD:
26311
26312 @example
26313 221 1056 Article retrieved.
26314 Path: ifi.uio.no!sturles
26315 From: sturles@@ifi.uio.no (Sturle Sunde)
26316 Newsgroups: ifi.discussion
26317 Subject: Re: Something very droll
26318 Date: 27 Oct 1994 14:02:57 +0100
26319 Organization: Dept. of Informatics, University of Oslo, Norway
26320 Lines: 26
26321 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26322 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26323 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26324 .
26325 @end example
26326
26327 So a @code{headers} return value would imply that there's a number of
26328 these in the data buffer.
26329
26330 Here's a BNF definition of such a buffer:
26331
26332 @example
26333 headers        = *head
26334 head           = error / valid-head
26335 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26336 valid-head     = valid-message *header "." eol
26337 valid-message  = "221 " <number> " Article retrieved." eol
26338 header         = <text> eol
26339 @end example
26340
26341 @cindex BNF
26342 (The version of BNF used here is the one used in RFC822.)
26343
26344 If the return value is @code{nov}, the data buffer should contain
26345 @dfn{network overview database} lines.  These are basically fields
26346 separated by tabs.
26347
26348 @example
26349 nov-buffer = *nov-line
26350 nov-line   = field 7*8[ <TAB> field ] eol
26351 field      = <text except TAB>
26352 @end example
26353
26354 For a closer look at what should be in those fields,
26355 @pxref{Headers}.
26356
26357
26358 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26359
26360 @var{server} is here the virtual server name.  @var{definitions} is a
26361 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26362
26363 If the server can't be opened, no error should be signaled.  The back end
26364 may then choose to refuse further attempts at connecting to this
26365 server.  In fact, it should do so.
26366
26367 If the server is opened already, this function should return a
26368 non-@code{nil} value.  There should be no data returned.
26369
26370
26371 @item (nnchoke-close-server &optional SERVER)
26372
26373 Close connection to @var{server} and free all resources connected
26374 to it.  Return @code{nil} if the server couldn't be closed for some
26375 reason.
26376
26377 There should be no data returned.
26378
26379
26380 @item (nnchoke-request-close)
26381
26382 Close connection to all servers and free all resources that the back end
26383 have reserved.  All buffers that have been created by that back end
26384 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26385 function is generally only called when Gnus is shutting down.
26386
26387 There should be no data returned.
26388
26389
26390 @item (nnchoke-server-opened &optional SERVER)
26391
26392 If @var{server} is the current virtual server, and the connection to the
26393 physical server is alive, then this function should return a
26394 non-@code{nil} value.  This function should under no circumstances
26395 attempt to reconnect to a server we have lost connection to.
26396
26397 There should be no data returned.
26398
26399
26400 @item (nnchoke-status-message &optional SERVER)
26401
26402 This function should return the last error message from @var{server}.
26403
26404 There should be no data returned.
26405
26406
26407 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26408
26409 The result data from this function should be the article specified by
26410 @var{article}.  This might either be a @code{Message-ID} or a number.
26411 It is optional whether to implement retrieval by @code{Message-ID}, but
26412 it would be nice if that were possible.
26413
26414 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26415 in this buffer instead of the normal data buffer.  This is to make it
26416 possible to avoid copying large amounts of data from one buffer to
26417 another, while Gnus mainly requests articles to be inserted directly
26418 into its article buffer.
26419
26420 If it is at all possible, this function should return a cons cell where
26421 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26422 the article number.  This will enable Gnus to find out what the real
26423 group and article numbers are when fetching articles by
26424 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26425 on successful article retrieval.
26426
26427
26428 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26429
26430 Get data on @var{group}.  This function also has the side effect of
26431 making @var{group} the current group.
26432
26433 If @var{fast}, don't bother to return useful data, just make @var{group}
26434 the current group.
26435
26436 Here's an example of some result data and a definition of the same:
26437
26438 @example
26439 211 56 1000 1059 ifi.discussion
26440 @end example
26441
26442 The first number is the status, which should be 211.  Next is the
26443 total number of articles in the group, the lowest article number, the
26444 highest article number, and finally the group name.  Note that the total
26445 number of articles may be less than one might think while just
26446 considering the highest and lowest article numbers, but some articles
26447 may have been canceled.  Gnus just discards the total-number, so
26448 whether one should take the bother to generate it properly (if that is a
26449 problem) is left as an exercise to the reader.  If the group contains no
26450 articles, the lowest article number should be reported as 1 and the
26451 highest as 0.
26452
26453 @example
26454 group-status = [ error / info ] eol
26455 error        = [ "4" / "5" ] 2<number> " " <Error message>
26456 info         = "211 " 3* [ <number> " " ] <string>
26457 @end example
26458
26459
26460 @item (nnchoke-close-group GROUP &optional SERVER)
26461
26462 Close @var{group} and free any resources connected to it.  This will be
26463 a no-op on most back ends.
26464
26465 There should be no data returned.
26466
26467
26468 @item (nnchoke-request-list &optional SERVER)
26469
26470 Return a list of all groups available on @var{server}.  And that means
26471 @emph{all}.
26472
26473 Here's an example from a server that only carries two groups:
26474
26475 @example
26476 ifi.test 0000002200 0000002000 y
26477 ifi.discussion 3324 3300 n
26478 @end example
26479
26480 On each line we have a group name, then the highest article number in
26481 that group, the lowest article number, and finally a flag.  If the group
26482 contains no articles, the lowest article number should be reported as 1
26483 and the highest as 0.
26484
26485 @example
26486 active-file = *active-line
26487 active-line = name " " <number> " " <number> " " flags eol
26488 name        = <string>
26489 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26490 @end example
26491
26492 The flag says whether the group is read-only (@samp{n}), is moderated
26493 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26494 (@samp{=other-group}) or none of the above (@samp{y}).
26495
26496
26497 @item (nnchoke-request-post &optional SERVER)
26498
26499 This function should post the current buffer.  It might return whether
26500 the posting was successful or not, but that's not required.  If, for
26501 instance, the posting is done asynchronously, it has generally not been
26502 completed by the time this function concludes.  In that case, this
26503 function should set up some kind of sentinel to beep the user loud and
26504 clear if the posting could not be completed.
26505
26506 There should be no result data from this function.
26507
26508 @end table
26509
26510
26511 @node Optional Back End Functions
26512 @subsubsection Optional Back End Functions
26513
26514 @table @code
26515
26516 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26517
26518 @var{groups} is a list of groups, and this function should request data
26519 on all those groups.  How it does it is of no concern to Gnus, but it
26520 should attempt to do this in a speedy fashion.
26521
26522 The return value of this function can be either @code{active} or
26523 @code{group}, which says what the format of the result data is.  The
26524 former is in the same format as the data from
26525 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26526 in the same format as @code{nnchoke-request-group} gives.
26527
26528 @example
26529 group-buffer = *active-line / *group-status
26530 @end example
26531
26532
26533 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26534
26535 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26536 alterations.  This comes in handy if the back end really carries all
26537 the information (as is the case with virtual and imap groups).  This
26538 function should destructively alter the info to suit its needs, and
26539 should return a non-@code{nil} value.
26540
26541 There should be no result data from this function.
26542
26543
26544 @item (nnchoke-request-type GROUP &optional ARTICLE)
26545
26546 When the user issues commands for ``sending news'' (@kbd{F} in the
26547 summary buffer, for instance), Gnus has to know whether the article the
26548 user is following up on is news or mail.  This function should return
26549 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26550 is mail and @code{unknown} if the type can't be decided.  (The
26551 @var{article} parameter is necessary in @code{nnvirtual} groups which
26552 might very well combine mail groups and news groups.)  Both @var{group}
26553 and @var{article} may be @code{nil}.
26554
26555 There should be no result data from this function.
26556
26557
26558 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26559
26560 Set/remove/add marks on articles.  Normally Gnus handles the article
26561 marks (such as read, ticked, expired etc) internally, and store them in
26562 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26563 all information about the articles on the server, so Gnus need to
26564 propagate the mark information to the server.
26565
26566 @var{action} is a list of mark setting requests, having this format:
26567
26568 @example
26569 (RANGE ACTION MARK)
26570 @end example
26571
26572 @var{range} is a range of articles you wish to update marks on.
26573 @var{action} is @code{add} or @code{del}, used to add marks or remove
26574 marks (preserving all marks not mentioned).  @var{mark} is a list of
26575 marks; where each mark is a symbol.  Currently used marks are
26576 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26577 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26578 @code{forward} and @code{recent}, but your back end should, if
26579 possible, not limit itself to these.
26580
26581 Given contradictory actions, the last action in the list should be the
26582 effective one.  That is, if your action contains a request to add the
26583 @code{tick} mark on article 1 and, later in the list, a request to
26584 remove the mark on the same article, the mark should in fact be removed.
26585
26586 An example action list:
26587
26588 @example
26589 (((5 12 30) 'del '(tick))
26590  ((10 . 90) 'add '(read expire))
26591  ((92 94) 'del '(read)))
26592 @end example
26593
26594 The function should return a range of articles it wasn't able to set the
26595 mark on (currently not used for anything).
26596
26597 There should be no result data from this function.
26598
26599 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26600
26601 If the user tries to set a mark that the back end doesn't like, this
26602 function may change the mark.  Gnus will use whatever this function
26603 returns as the mark for @var{article} instead of the original
26604 @var{mark}.  If the back end doesn't care, it must return the original
26605 @var{mark}, and not @code{nil} or any other type of garbage.
26606
26607 The only use for this I can see is what @code{nnvirtual} does with
26608 it---if a component group is auto-expirable, marking an article as read
26609 in the virtual group should result in the article being marked as
26610 expirable.
26611
26612 There should be no result data from this function.
26613
26614
26615 @item (nnchoke-request-scan &optional GROUP SERVER)
26616
26617 This function may be called at any time (by Gnus or anything else) to
26618 request that the back end check for incoming articles, in one way or
26619 another.  A mail back end will typically read the spool file or query
26620 the @acronym{POP} server when this function is invoked.  The
26621 @var{group} doesn't have to be heeded---if the back end decides that
26622 it is too much work just scanning for a single group, it may do a
26623 total scan of all groups.  It would be nice, however, to keep things
26624 local if that's practical.
26625
26626 There should be no result data from this function.
26627
26628
26629 @item (nnchoke-request-group-description GROUP &optional SERVER)
26630
26631 The result data from this function should be a description of
26632 @var{group}.
26633
26634 @example
26635 description-line = name <TAB> description eol
26636 name             = <string>
26637 description      = <text>
26638 @end example
26639
26640 @item (nnchoke-request-list-newsgroups &optional SERVER)
26641
26642 The result data from this function should be the description of all
26643 groups available on the server.
26644
26645 @example
26646 description-buffer = *description-line
26647 @end example
26648
26649
26650 @item (nnchoke-request-newgroups DATE &optional SERVER)
26651
26652 The result data from this function should be all groups that were
26653 created after @samp{date}, which is in normal human-readable date format
26654 (i.e., the date format used in mail and news headers, and returned by
26655 the function @code{message-make-date} by default).  The data should be
26656 in the active buffer format.
26657
26658 It is okay for this function to return ``too many'' groups; some back ends
26659 might find it cheaper to return the full list of groups, rather than
26660 just the new groups.  But don't do this for back ends with many groups.
26661 Normally, if the user creates the groups herself, there won't be too
26662 many groups, so @code{nnml} and the like are probably safe.  But for
26663 back ends like @code{nntp}, where the groups have been created by the
26664 server, it is quite likely that there can be many groups.
26665
26666
26667 @item (nnchoke-request-create-group GROUP &optional SERVER)
26668
26669 This function should create an empty group with name @var{group}.
26670
26671 There should be no return data.
26672
26673
26674 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26675
26676 This function should run the expiry process on all articles in the
26677 @var{articles} range (which is currently a simple list of article
26678 numbers.)  It is left up to the back end to decide how old articles
26679 should be before they are removed by this function.  If @var{force} is
26680 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26681 they are.
26682
26683 This function should return a list of articles that it did not/was not
26684 able to delete.
26685
26686 There should be no result data returned.
26687
26688
26689 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26690
26691 This function should move @var{article} (which is a number) from
26692 @var{group} by calling @var{accept-form}.
26693
26694 This function should ready the article in question for moving by
26695 removing any header lines it has added to the article, and generally
26696 should ``tidy up'' the article.  Then it should @code{eval}
26697 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26698 will do the actual copying.  If this @code{eval} returns a
26699 non-@code{nil} value, the article should be removed.
26700
26701 If @var{last} is @code{nil}, that means that there is a high likelihood
26702 that there will be more requests issued shortly, so that allows some
26703 optimizations.
26704
26705 The function should return a cons where the @code{car} is the group name and
26706 the @code{cdr} is the article number that the article was entered as.
26707
26708 The group should exist before the back end is asked to accept the
26709 article for that group.
26710
26711 There should be no data returned.
26712
26713
26714 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26715
26716 This function takes the current buffer and inserts it into @var{group}.
26717 If @var{last} in @code{nil}, that means that there will be more calls to
26718 this function in short order.
26719
26720 The function should return a cons where the @code{car} is the group name and
26721 the @code{cdr} is the article number that the article was entered as.
26722
26723 There should be no data returned.
26724
26725
26726 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26727
26728 This function should remove @var{article} (which is a number) from
26729 @var{group} and insert @var{buffer} there instead.
26730
26731 There should be no data returned.
26732
26733
26734 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26735
26736 This function should delete @var{group}.  If @var{force}, it should
26737 really delete all the articles in the group, and then delete the group
26738 itself.  (If there is such a thing as ``the group itself''.)
26739
26740 There should be no data returned.
26741
26742
26743 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26744
26745 This function should rename @var{group} into @var{new-name}.  All
26746 articles in @var{group} should move to @var{new-name}.
26747
26748 There should be no data returned.
26749
26750 @end table
26751
26752
26753 @node Error Messaging
26754 @subsubsection Error Messaging
26755
26756 @findex nnheader-report
26757 @findex nnheader-get-report
26758 The back ends should use the function @code{nnheader-report} to report
26759 error conditions---they should not raise errors when they aren't able to
26760 perform a request.  The first argument to this function is the back end
26761 symbol, and the rest are interpreted as arguments to @code{format} if
26762 there are multiple of them, or just a string if there is one of them.
26763 This function must always returns @code{nil}.
26764
26765 @lisp
26766 (nnheader-report 'nnchoke "You did something totally bogus")
26767
26768 (nnheader-report 'nnchoke "Could not request group %s" group)
26769 @end lisp
26770
26771 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26772 @code{nil} back from a server, and this function returns the most
26773 recently reported message for the back end in question.  This function
26774 takes one argument---the server symbol.
26775
26776 Internally, these functions access @var{back-end}@code{-status-string},
26777 so the @code{nnchoke} back end will have its error message stored in
26778 @code{nnchoke-status-string}.
26779
26780
26781 @node Writing New Back Ends
26782 @subsubsection Writing New Back Ends
26783
26784 Many back ends are quite similar.  @code{nnml} is just like
26785 @code{nnspool}, but it allows you to edit the articles on the server.
26786 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26787 and it doesn't maintain overview databases.  @code{nndir} is just like
26788 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26789 editing articles.
26790
26791 It would make sense if it were possible to ``inherit'' functions from
26792 back ends when writing new back ends.  And, indeed, you can do that if you
26793 want to.  (You don't have to if you don't want to, of course.)
26794
26795 All the back ends declare their public variables and functions by using a
26796 package called @code{nnoo}.
26797
26798 To inherit functions from other back ends (and allow other back ends to
26799 inherit functions from the current back end), you should use the
26800 following macros:
26801
26802 @table @code
26803
26804 @item nnoo-declare
26805 This macro declares the first parameter to be a child of the subsequent
26806 parameters.  For instance:
26807
26808 @lisp
26809 (nnoo-declare nndir
26810   nnml nnmh)
26811 @end lisp
26812
26813 @code{nndir} has declared here that it intends to inherit functions from
26814 both @code{nnml} and @code{nnmh}.
26815
26816 @item defvoo
26817 This macro is equivalent to @code{defvar}, but registers the variable as
26818 a public server variable.  Most state-oriented variables should be
26819 declared with @code{defvoo} instead of @code{defvar}.
26820
26821 In addition to the normal @code{defvar} parameters, it takes a list of
26822 variables in the parent back ends to map the variable to when executing
26823 a function in those back ends.
26824
26825 @lisp
26826 (defvoo nndir-directory nil
26827   "Where nndir will look for groups."
26828   nnml-current-directory nnmh-current-directory)
26829 @end lisp
26830
26831 This means that @code{nnml-current-directory} will be set to
26832 @code{nndir-directory} when an @code{nnml} function is called on behalf
26833 of @code{nndir}.  (The same with @code{nnmh}.)
26834
26835 @item nnoo-define-basics
26836 This macro defines some common functions that almost all back ends should
26837 have.
26838
26839 @lisp
26840 (nnoo-define-basics nndir)
26841 @end lisp
26842
26843 @item deffoo
26844 This macro is just like @code{defun} and takes the same parameters.  In
26845 addition to doing the normal @code{defun} things, it registers the
26846 function as being public so that other back ends can inherit it.
26847
26848 @item nnoo-map-functions
26849 This macro allows mapping of functions from the current back end to
26850 functions from the parent back ends.
26851
26852 @lisp
26853 (nnoo-map-functions nndir
26854   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26855   (nnmh-request-article 0 nndir-current-group 0 0))
26856 @end lisp
26857
26858 This means that when @code{nndir-retrieve-headers} is called, the first,
26859 third, and fourth parameters will be passed on to
26860 @code{nnml-retrieve-headers}, while the second parameter is set to the
26861 value of @code{nndir-current-group}.
26862
26863 @item nnoo-import
26864 This macro allows importing functions from back ends.  It should be the
26865 last thing in the source file, since it will only define functions that
26866 haven't already been defined.
26867
26868 @lisp
26869 (nnoo-import nndir
26870   (nnmh
26871    nnmh-request-list
26872    nnmh-request-newgroups)
26873   (nnml))
26874 @end lisp
26875
26876 This means that calls to @code{nndir-request-list} should just be passed
26877 on to @code{nnmh-request-list}, while all public functions from
26878 @code{nnml} that haven't been defined in @code{nndir} yet should be
26879 defined now.
26880
26881 @end table
26882
26883 Below is a slightly shortened version of the @code{nndir} back end.
26884
26885 @lisp
26886 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26887 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26888
26889 ;;; @r{Code:}
26890
26891 (require 'nnheader)
26892 (require 'nnmh)
26893 (require 'nnml)
26894 (require 'nnoo)
26895 (eval-when-compile (require 'cl))
26896
26897 (nnoo-declare nndir
26898   nnml nnmh)
26899
26900 (defvoo nndir-directory nil
26901   "Where nndir will look for groups."
26902   nnml-current-directory nnmh-current-directory)
26903
26904 (defvoo nndir-nov-is-evil nil
26905   "*Non-nil means that nndir will never retrieve NOV headers."
26906   nnml-nov-is-evil)
26907
26908 (defvoo nndir-current-group ""
26909   nil
26910   nnml-current-group nnmh-current-group)
26911 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26912 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26913
26914 (defvoo nndir-status-string "" nil nnmh-status-string)
26915 (defconst nndir-version "nndir 1.0")
26916
26917 ;;; @r{Interface functions.}
26918
26919 (nnoo-define-basics nndir)
26920
26921 (deffoo nndir-open-server (server &optional defs)
26922   (setq nndir-directory
26923         (or (cadr (assq 'nndir-directory defs))
26924             server))
26925   (unless (assq 'nndir-directory defs)
26926     (push `(nndir-directory ,server) defs))
26927   (push `(nndir-current-group
26928           ,(file-name-nondirectory
26929             (directory-file-name nndir-directory)))
26930         defs)
26931   (push `(nndir-top-directory
26932           ,(file-name-directory (directory-file-name nndir-directory)))
26933         defs)
26934   (nnoo-change-server 'nndir server defs))
26935
26936 (nnoo-map-functions nndir
26937   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26938   (nnmh-request-article 0 nndir-current-group 0 0)
26939   (nnmh-request-group nndir-current-group 0 0)
26940   (nnmh-close-group nndir-current-group 0))
26941
26942 (nnoo-import nndir
26943   (nnmh
26944    nnmh-status-message
26945    nnmh-request-list
26946    nnmh-request-newgroups))
26947
26948 (provide 'nndir)
26949 @end lisp
26950
26951
26952 @node Hooking New Back Ends Into Gnus
26953 @subsubsection Hooking New Back Ends Into Gnus
26954
26955 @vindex gnus-valid-select-methods
26956 @findex gnus-declare-backend
26957 Having Gnus start using your new back end is rather easy---you just
26958 declare it with the @code{gnus-declare-backend} functions.  This will
26959 enter the back end into the @code{gnus-valid-select-methods} variable.
26960
26961 @code{gnus-declare-backend} takes two parameters---the back end name and
26962 an arbitrary number of @dfn{abilities}.
26963
26964 Here's an example:
26965
26966 @lisp
26967 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26968 @end lisp
26969
26970 The above line would then go in the @file{nnchoke.el} file.
26971
26972 The abilities can be:
26973
26974 @table @code
26975 @item mail
26976 This is a mailish back end---followups should (probably) go via mail.
26977 @item post
26978 This is a newsish back end---followups should (probably) go via news.
26979 @item post-mail
26980 This back end supports both mail and news.
26981 @item none
26982 This is neither a post nor mail back end---it's something completely
26983 different.
26984 @item respool
26985 It supports respooling---or rather, it is able to modify its source
26986 articles and groups.
26987 @item address
26988 The name of the server should be in the virtual server name.  This is
26989 true for almost all back ends.
26990 @item prompt-address
26991 The user should be prompted for an address when doing commands like
26992 @kbd{B} in the group buffer.  This is true for back ends like
26993 @code{nntp}, but not @code{nnmbox}, for instance.
26994 @end table
26995
26996
26997 @node Mail-like Back Ends
26998 @subsubsection Mail-like Back Ends
26999
27000 One of the things that separate the mail back ends from the rest of the
27001 back ends is the heavy dependence by most of the mail back ends on
27002 common functions in @file{nnmail.el}.  For instance, here's the
27003 definition of @code{nnml-request-scan}:
27004
27005 @lisp
27006 (deffoo nnml-request-scan (&optional group server)
27007   (setq nnml-article-file-alist nil)
27008   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27009 @end lisp
27010
27011 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27012 and @code{nnmail} takes care of all the moving and splitting of the
27013 mail.
27014
27015 This function takes four parameters.
27016
27017 @table @var
27018 @item method
27019 This should be a symbol to designate which back end is responsible for
27020 the call.
27021
27022 @item exit-function
27023 This function should be called after the splitting has been performed.
27024
27025 @item temp-directory
27026 Where the temporary files should be stored.
27027
27028 @item group
27029 This optional argument should be a group name if the splitting is to be
27030 performed for one group only.
27031 @end table
27032
27033 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27034 save each article.  @var{back-end}@code{-active-number} will be called to
27035 find the article number assigned to this article.
27036
27037 The function also uses the following variables:
27038 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27039 this back end); and @var{back-end}@code{-group-alist} and
27040 @var{back-end}@code{-active-file} to generate the new active file.
27041 @var{back-end}@code{-group-alist} should be a group-active alist, like
27042 this:
27043
27044 @example
27045 (("a-group" (1 . 10))
27046  ("some-group" (34 . 39)))
27047 @end example
27048
27049
27050 @node Score File Syntax
27051 @subsection Score File Syntax
27052
27053 Score files are meant to be easily parseable, but yet extremely
27054 mallable.  It was decided that something that had the same read syntax
27055 as an Emacs Lisp list would fit that spec.
27056
27057 Here's a typical score file:
27058
27059 @lisp
27060 (("summary"
27061   ("win95" -10000 nil s)
27062   ("Gnus"))
27063  ("from"
27064   ("Lars" -1000))
27065  (mark -100))
27066 @end lisp
27067
27068 BNF definition of a score file:
27069
27070 @example
27071 score-file      = "" / "(" *element ")"
27072 element         = rule / atom
27073 rule            = string-rule / number-rule / date-rule
27074 string-rule     = "(" quote string-header quote space *string-match ")"
27075 number-rule     = "(" quote number-header quote space *number-match ")"
27076 date-rule       = "(" quote date-header quote space *date-match ")"
27077 quote           = <ascii 34>
27078 string-header   = "subject" / "from" / "references" / "message-id" /
27079                   "xref" / "body" / "head" / "all" / "followup"
27080 number-header   = "lines" / "chars"
27081 date-header     = "date"
27082 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27083                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27084 score           = "nil" / <integer>
27085 date            = "nil" / <natural number>
27086 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27087                   "r" / "regex" / "R" / "Regex" /
27088                   "e" / "exact" / "E" / "Exact" /
27089                   "f" / "fuzzy" / "F" / "Fuzzy"
27090 number-match    = "(" <integer> [ "" / [ space score [ "" /
27091                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27092 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27093 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27094                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27095 date-match-t    = "nil" / "at" / "before" / "after"
27096 atom            = "(" [ required-atom / optional-atom ] ")"
27097 required-atom   = mark / expunge / mark-and-expunge / files /
27098                   exclude-files / read-only / touched
27099 optional-atom   = adapt / local / eval
27100 mark            = "mark" space nil-or-number
27101 nil-or-number   = "nil" / <integer>
27102 expunge         = "expunge" space nil-or-number
27103 mark-and-expunge = "mark-and-expunge" space nil-or-number
27104 files           = "files" *[ space <string> ]
27105 exclude-files   = "exclude-files" *[ space <string> ]
27106 read-only       = "read-only" [ space "nil" / space "t" ]
27107 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27108 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27109 local           = "local" *[ space "(" <string> space <form> ")" ]
27110 eval            = "eval" space <form>
27111 space           = *[ " " / <TAB> / <NEWLINE> ]
27112 @end example
27113
27114 Any unrecognized elements in a score file should be ignored, but not
27115 discarded.
27116
27117 As you can see, white space is needed, but the type and amount of white
27118 space is irrelevant.  This means that formatting of the score file is
27119 left up to the programmer---if it's simpler to just spew it all out on
27120 one looong line, then that's ok.
27121
27122 The meaning of the various atoms are explained elsewhere in this
27123 manual (@pxref{Score File Format}).
27124
27125
27126 @node Headers
27127 @subsection Headers
27128
27129 Internally Gnus uses a format for storing article headers that
27130 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27131 almost suspect that the author looked at the @acronym{NOV} specification and
27132 just shamelessly @emph{stole} the entire thing, and one would be right.
27133
27134 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27135 RFC 1036 to talk about lines in the head of an article (e.g.,
27136 @code{From}).  It is used by many people as a synonym for
27137 ``head''---``the header and the body''.  (That should be avoided, in my
27138 opinion.)  And Gnus uses a format internally that it calls ``header'',
27139 which is what I'm talking about here.  This is a 9-element vector,
27140 basically, with each header (ouch) having one slot.
27141
27142 These slots are, in order: @code{number}, @code{subject}, @code{from},
27143 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27144 @code{xref}, and @code{extra}.  There are macros for accessing and
27145 setting these slots---they all have predictable names beginning with
27146 @code{mail-header-} and @code{mail-header-set-}, respectively.
27147
27148 All these slots contain strings, except the @code{extra} slot, which
27149 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27150
27151
27152 @node Ranges
27153 @subsection Ranges
27154
27155 @sc{gnus} introduced a concept that I found so useful that I've started
27156 using it a lot and have elaborated on it greatly.
27157
27158 The question is simple: If you have a large amount of objects that are
27159 identified by numbers (say, articles, to take a @emph{wild} example)
27160 that you want to qualify as being ``included'', a normal sequence isn't
27161 very useful.  (A 200,000 length sequence is a bit long-winded.)
27162
27163 The solution is as simple as the question: You just collapse the
27164 sequence.
27165
27166 @example
27167 (1 2 3 4 5 6 10 11 12)
27168 @end example
27169
27170 is transformed into
27171
27172 @example
27173 ((1 . 6) (10 . 12))
27174 @end example
27175
27176 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27177 lonesome object, a @samp{13} is a valid element:
27178
27179 @example
27180 ((1 . 6) 7 (10 . 12))
27181 @end example
27182
27183 This means that comparing two ranges to find out whether they are equal
27184 is slightly tricky:
27185
27186 @example
27187 ((1 . 5) 7 8 (10 . 12))
27188 @end example
27189
27190 and
27191
27192 @example
27193 ((1 . 5) (7 . 8) (10 . 12))
27194 @end example
27195
27196 are equal.  In fact, any non-descending list is a range:
27197
27198 @example
27199 (1 2 3 4 5)
27200 @end example
27201
27202 is a perfectly valid range, although a pretty long-winded one.  This is
27203 also valid:
27204
27205 @example
27206 (1 . 5)
27207 @end example
27208
27209 and is equal to the previous range.
27210
27211 Here's a BNF definition of ranges.  Of course, one must remember the
27212 semantic requirement that the numbers are non-descending.  (Any number
27213 of repetition of the same number is allowed, but apt to disappear in
27214 range handling.)
27215
27216 @example
27217 range           = simple-range / normal-range
27218 simple-range    = "(" number " . " number ")"
27219 normal-range    = "(" start-contents ")"
27220 contents        = "" / simple-range *[ " " contents ] /
27221                   number *[ " " contents ]
27222 @end example
27223
27224 Gnus currently uses ranges to keep track of read articles and article
27225 marks.  I plan on implementing a number of range operators in C if The
27226 Powers That Be are willing to let me.  (I haven't asked yet, because I
27227 need to do some more thinking on what operators I need to make life
27228 totally range-based without ever having to convert back to normal
27229 sequences.)
27230
27231
27232 @node Group Info
27233 @subsection Group Info
27234
27235 Gnus stores all permanent info on groups in a @dfn{group info} list.
27236 This list is from three to six elements (or more) long and exhaustively
27237 describes the group.
27238
27239 Here are two example group infos; one is a very simple group while the
27240 second is a more complex one:
27241
27242 @example
27243 ("no.group" 5 ((1 . 54324)))
27244
27245 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27246                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27247                 (nnml "")
27248                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27249 @end example
27250
27251 The first element is the @dfn{group name}---as Gnus knows the group,
27252 anyway.  The second element is the @dfn{subscription level}, which
27253 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27254 cons cell where the @code{car} is the level and the @code{cdr} is the
27255 score.)  The third element is a list of ranges of read articles.  The
27256 fourth element is a list of lists of article marks of various kinds.
27257 The fifth element is the select method (or virtual server, if you like).
27258 The sixth element is a list of @dfn{group parameters}, which is what
27259 this section is about.
27260
27261 Any of the last three elements may be missing if they are not required.
27262 In fact, the vast majority of groups will normally only have the first
27263 three elements, which saves quite a lot of cons cells.
27264
27265 Here's a BNF definition of the group info format:
27266
27267 @example
27268 info          = "(" group space ralevel space read
27269                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27270                 space parameters ] ] ] ] ] ")"
27271 group         = quote <string> quote
27272 ralevel       = rank / level
27273 level         = <integer in the range of 1 to inf>
27274 rank          = "(" level "." score ")"
27275 score         = <integer in the range of 1 to inf>
27276 read          = range
27277 marks-lists   = nil / "(" *marks ")"
27278 marks         = "(" <string> range ")"
27279 method        = "(" <string> *elisp-forms ")"
27280 parameters    = "(" *elisp-forms ")"
27281 @end example
27282
27283 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27284 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27285 in pseudo-BNF.
27286
27287 If you have a Gnus info and want to access the elements, Gnus offers a
27288 series of macros for getting/setting these elements.
27289
27290 @table @code
27291 @item gnus-info-group
27292 @itemx gnus-info-set-group
27293 @findex gnus-info-group
27294 @findex gnus-info-set-group
27295 Get/set the group name.
27296
27297 @item gnus-info-rank
27298 @itemx gnus-info-set-rank
27299 @findex gnus-info-rank
27300 @findex gnus-info-set-rank
27301 Get/set the group rank (@pxref{Group Score}).
27302
27303 @item gnus-info-level
27304 @itemx gnus-info-set-level
27305 @findex gnus-info-level
27306 @findex gnus-info-set-level
27307 Get/set the group level.
27308
27309 @item gnus-info-score
27310 @itemx gnus-info-set-score
27311 @findex gnus-info-score
27312 @findex gnus-info-set-score
27313 Get/set the group score (@pxref{Group Score}).
27314
27315 @item gnus-info-read
27316 @itemx gnus-info-set-read
27317 @findex gnus-info-read
27318 @findex gnus-info-set-read
27319 Get/set the ranges of read articles.
27320
27321 @item gnus-info-marks
27322 @itemx gnus-info-set-marks
27323 @findex gnus-info-marks
27324 @findex gnus-info-set-marks
27325 Get/set the lists of ranges of marked articles.
27326
27327 @item gnus-info-method
27328 @itemx gnus-info-set-method
27329 @findex gnus-info-method
27330 @findex gnus-info-set-method
27331 Get/set the group select method.
27332
27333 @item gnus-info-params
27334 @itemx gnus-info-set-params
27335 @findex gnus-info-params
27336 @findex gnus-info-set-params
27337 Get/set the group parameters.
27338 @end table
27339
27340 All the getter functions take one parameter---the info list.  The setter
27341 functions take two parameters---the info list and the new value.
27342
27343 The last three elements in the group info aren't mandatory, so it may be
27344 necessary to extend the group info before setting the element.  If this
27345 is necessary, you can just pass on a non-@code{nil} third parameter to
27346 the three final setter functions to have this happen automatically.
27347
27348
27349 @node Extended Interactive
27350 @subsection Extended Interactive
27351 @cindex interactive
27352 @findex gnus-interactive
27353
27354 Gnus extends the standard Emacs @code{interactive} specification
27355 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27356 Prefixes}).  Here's an example of how this is used:
27357
27358 @lisp
27359 (defun gnus-summary-increase-score (&optional score symp)
27360   (interactive (gnus-interactive "P\ny"))
27361   ...
27362   )
27363 @end lisp
27364
27365 The best thing to do would have been to implement
27366 @code{gnus-interactive} as a macro which would have returned an
27367 @code{interactive} form, but this isn't possible since Emacs checks
27368 whether a function is interactive or not by simply doing an @code{assq}
27369 on the lambda form.  So, instead we have @code{gnus-interactive}
27370 function that takes a string and returns values that are usable to
27371 @code{interactive}.
27372
27373 This function accepts (almost) all normal @code{interactive} specs, but
27374 adds a few more.
27375
27376 @table @samp
27377 @item y
27378 @vindex gnus-current-prefix-symbol
27379 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27380 variable.
27381
27382 @item Y
27383 @vindex gnus-current-prefix-symbols
27384 A list of the current symbolic prefixes---the
27385 @code{gnus-current-prefix-symbol} variable.
27386
27387 @item A
27388 The current article number---the @code{gnus-summary-article-number}
27389 function.
27390
27391 @item H
27392 The current article header---the @code{gnus-summary-article-header}
27393 function.
27394
27395 @item g
27396 The current group name---the @code{gnus-group-group-name}
27397 function.
27398
27399 @end table
27400
27401
27402 @node Emacs/XEmacs Code
27403 @subsection Emacs/XEmacs Code
27404 @cindex XEmacs
27405 @cindex Emacsen
27406
27407 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27408 platforms must be the primary one.  I chose Emacs.  Not because I don't
27409 like XEmacs or Mule, but because it comes first alphabetically.
27410
27411 This means that Gnus will byte-compile under Emacs with nary a warning,
27412 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27413 As I use byte-compilation warnings to help me root out trivial errors in
27414 Gnus, that's very useful.
27415
27416 I've also consistently used Emacs function interfaces, but have used
27417 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27418 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27419 function.  I then define a function called @code{gnus-run-at-time} that
27420 takes the same parameters as the Emacs @code{run-at-time}.  When running
27421 Gnus under Emacs, the former function is just an alias for the latter.
27422 However, when running under XEmacs, the former is an alias for the
27423 following function:
27424
27425 @lisp
27426 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27427   (start-itimer
27428    "gnus-run-at-time"
27429    `(lambda ()
27430       (,function ,@@args))
27431    time repeat))
27432 @end lisp
27433
27434 This sort of thing has been done for bunches of functions.  Gnus does
27435 not redefine any native Emacs functions while running under XEmacs---it
27436 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27437 all over.
27438
27439 In the cases where the XEmacs function interface was obviously cleaner,
27440 I used it instead.  For example @code{gnus-region-active-p} is an alias
27441 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27442
27443 Of course, I could have chosen XEmacs as my native platform and done
27444 mapping functions the other way around.  But I didn't.  The performance
27445 hit these indirections impose on Gnus under XEmacs should be slight.
27446
27447
27448 @node Various File Formats
27449 @subsection Various File Formats
27450
27451 @menu
27452 * Active File Format::          Information on articles and groups available.
27453 * Newsgroups File Format::      Group descriptions.
27454 @end menu
27455
27456
27457 @node Active File Format
27458 @subsubsection Active File Format
27459
27460 The active file lists all groups available on the server in
27461 question.  It also lists the highest and lowest current article numbers
27462 in each group.
27463
27464 Here's an excerpt from a typical active file:
27465
27466 @example
27467 soc.motss 296030 293865 y
27468 alt.binaries.pictures.fractals 3922 3913 n
27469 comp.sources.unix 1605 1593 m
27470 comp.binaries.ibm.pc 5097 5089 y
27471 no.general 1000 900 y
27472 @end example
27473
27474 Here's a pseudo-BNF definition of this file:
27475
27476 @example
27477 active      = *group-line
27478 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27479 group       = <non-white-space string>
27480 spc         = " "
27481 high-number = <non-negative integer>
27482 low-number  = <positive integer>
27483 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27484 @end example
27485
27486 For a full description of this file, see the manual pages for
27487 @samp{innd}, in particular @samp{active(5)}.
27488
27489
27490 @node Newsgroups File Format
27491 @subsubsection Newsgroups File Format
27492
27493 The newsgroups file lists groups along with their descriptions.  Not all
27494 groups on the server have to be listed,  and not all groups in the file
27495 have to exist on the server.  The file is meant purely as information to
27496 the user.
27497
27498 The format is quite simple; a group name, a tab, and the description.
27499 Here's the definition:
27500
27501 @example
27502 newsgroups    = *line
27503 line          = group tab description <NEWLINE>
27504 group         = <non-white-space string>
27505 tab           = <TAB>
27506 description   = <string>
27507 @end example
27508
27509
27510 @page
27511 @node Emacs for Heathens
27512 @section Emacs for Heathens
27513
27514 Believe it or not, but some people who use Gnus haven't really used
27515 Emacs much before they embarked on their journey on the Gnus Love Boat.
27516 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27517 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27518 is a regexp that is used for matching on the group name'' are magical
27519 phrases with little or no meaning, then this appendix is for you.  If
27520 you are already familiar with Emacs, just ignore this and go fondle your
27521 cat instead.
27522
27523 @menu
27524 * Keystrokes::                  Entering text and executing commands.
27525 * Emacs Lisp::                  The built-in Emacs programming language.
27526 @end menu
27527
27528
27529 @node Keystrokes
27530 @subsection Keystrokes
27531
27532 @itemize @bullet
27533 @item
27534 Q: What is an experienced Emacs user?
27535
27536 @item
27537 A: A person who wishes that the terminal had pedals.
27538 @end itemize
27539
27540 Yes, when you use Emacs, you are apt to use the control key, the shift
27541 key and the meta key a lot.  This is very annoying to some people
27542 (notably @code{vi}le users), and the rest of us just love the hell out
27543 of it.  Just give up and submit.  Emacs really does stand for
27544 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27545 may have heard from other disreputable sources (like the Emacs author).
27546
27547 The shift keys are normally located near your pinky fingers, and are
27548 normally used to get capital letters and stuff.  You probably use it all
27549 the time.  The control key is normally marked ``CTRL'' or something like
27550 that.  The meta key is, funnily enough, never marked as such on any
27551 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27552 which is the meta key on this keyboard.  It's usually located somewhere
27553 to the left hand side of the keyboard, usually on the bottom row.
27554
27555 Now, us Emacs people don't say ``press the meta-control-m key'',
27556 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27557 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27558 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27559 down the control key, and hold it down while you press @kbd{k}''.
27560 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27561 the control key and then press @kbd{k}''.  Simple, ay?
27562
27563 This is somewhat complicated by the fact that not all keyboards have a
27564 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27565 means ``press escape, release escape, press @kbd{k}''.  That's much more
27566 work than if you have a meta key, so if that's the case, I respectfully
27567 suggest you get a real keyboard with a meta key.  You can't live without
27568 it.
27569
27570
27571
27572 @node Emacs Lisp
27573 @subsection Emacs Lisp
27574
27575 Emacs is the King of Editors because it's really a Lisp interpreter.
27576 Each and every key you tap runs some Emacs Lisp code snippet, and since
27577 Emacs Lisp is an interpreted language, that means that you can configure
27578 any key to run any arbitrary code.  You just, like, do it.
27579
27580 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27581 functions.  (These are byte-compiled for speed, but it's still
27582 interpreted.)  If you decide that you don't like the way Gnus does
27583 certain things, it's trivial to have it do something a different way.
27584 (Well, at least if you know how to write Lisp code.)  However, that's
27585 beyond the scope of this manual, so we are simply going to talk about
27586 some common constructs that you normally use in your @file{.emacs} file
27587 to customize Gnus.
27588
27589 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27590 write the following:
27591
27592 @lisp
27593 (setq gnus-florgbnize 4)
27594 @end lisp
27595
27596 This function (really ``special form'') @code{setq} is the one that can
27597 set a variable to some value.  This is really all you need to know.  Now
27598 you can go and fill your @file{.emacs} file with lots of these to change
27599 how Gnus works.
27600
27601 If you have put that thing in your @file{.emacs} file, it will be read
27602 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27603 start Emacs.  If you want to change the variable right away, simply say
27604 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27605 previous ``form'', which is a simple @code{setq} statement here.
27606
27607 Go ahead---just try it, if you're located at your Emacs.  After you
27608 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27609 is the return value of the form you @code{eval}ed.
27610
27611 Some pitfalls:
27612
27613 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27614 that means:
27615
27616 @lisp
27617 (setq gnus-read-active-file 'some)
27618 @end lisp
27619
27620 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27621 @samp{nntp.ifi.uio.no}'', that means:
27622
27623 @lisp
27624 (setq gnus-nntp-server "nntp.ifi.uio.no")
27625 @end lisp
27626
27627 So be careful not to mix up strings (the latter) with symbols (the
27628 former).  The manual is unambiguous, but it can be confusing.
27629
27630 @page
27631 @include gnus-faq.texi
27632
27633 @node Index
27634 @chapter Index
27635 @printindex cp
27636
27637 @node Key Index
27638 @chapter Key Index
27639 @printindex ky
27640
27641 @summarycontents
27642 @contents
27643 @bye
27644
27645 @iftex
27646 @iflatex
27647 \end{document}
27648 @end iflatex
27649 @end iftex
27650
27651 @c Local Variables:
27652 @c mode: texinfo
27653 @c coding: iso-8859-1
27654 @c End: