Synch to Gnus 200306222256.
[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.  Look here @pxref{Mailing
2753 Lists, , Mailing Lists, message, The Message Manual} for a complete
2754 treatment of 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.
5231
5232 @item S W
5233 @kindex S W (Summary)
5234 @findex gnus-summary-wide-reply-with-original
5235 Mail a wide reply to the current article and include the original
5236 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5237 the process/prefix convention.
5238
5239 @item S v
5240 @kindex S v (Summary)
5241 @findex gnus-summary-very-wide-reply
5242 Mail a very wide reply to the author of the current article
5243 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5244 that goes out to all people listed in the @code{To}, @code{From} (or
5245 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5246 articles.  This command uses the process/prefix convention.
5247
5248 @item S V
5249 @kindex S V (Summary)
5250 @findex gnus-summary-very-wide-reply-with-original
5251 Mail a very wide reply to the author of the current article and include the
5252 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5253 command uses the process/prefix convention.
5254
5255 @item S B r
5256 @kindex S B r (Summary)
5257 @findex gnus-summary-reply-broken-reply-to
5258 Mail a reply to the author of the current article but ignore the
5259 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5260 If you need this because a mailing list incorrectly sets a
5261 @code{Reply-To} header pointing to the list, you probably want to set
5262 the @code{broken-reply-to} group parameter instead, so things will work
5263 correctly.  @xref{Group Parameters}.
5264
5265 @item S B R
5266 @kindex S B R (Summary)
5267 @findex gnus-summary-reply-broken-reply-to-with-original
5268 Mail a reply to the author of the current article and include the
5269 original message but ignore the @code{Reply-To} field
5270 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5271
5272 @item S o m
5273 @itemx C-c C-f
5274 @kindex S o m (Summary)
5275 @kindex C-c C-f (Summary)
5276 @findex gnus-summary-mail-forward
5277 @c @icon{gnus-summary-mail-forward}
5278 Forward the current article to some other person
5279 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5280 headers of the forwarded article.
5281
5282 @item S m
5283 @itemx m
5284 @kindex m (Summary)
5285 @kindex S m (Summary)
5286 @findex gnus-summary-mail-other-window
5287 @c @icon{gnus-summary-mail-originate}
5288 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5289 the posting style of the current group.  If given a prefix, disable that.
5290 If the prefix is 1, prompt for a group name to find the posting style.
5291
5292 @item S i
5293 @itemx i
5294 @kindex i (Summary)
5295 @kindex S i (Summary)
5296 @findex gnus-summary-news-other-window
5297 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5298 post to the current group.  If given a prefix, disable that.  If the
5299 prefix is 1, prompt for a group to post to.
5300
5301 This function actually prepares a news even when using mail groups.
5302 This is useful for ``posting'' messages to mail groups without actually
5303 sending them over the network: they're just saved directly to the group
5304 in question.  The corresponding back end must have a request-post method
5305 for this to work though.
5306
5307 @item S D b
5308 @kindex S D b (Summary)
5309 @findex gnus-summary-resend-bounced-mail
5310 @cindex bouncing mail
5311 If you have sent a mail, but the mail was bounced back to you for some
5312 reason (wrong address, transient failure), you can use this command to
5313 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5314 will be popped into a mail buffer where you can edit the headers before
5315 sending the mail off again.  If you give a prefix to this command, and
5316 the bounced mail is a reply to some other mail, gnus will try to fetch
5317 that mail and display it for easy perusal of its headers.  This might
5318 very well fail, though.
5319
5320 @item S D r
5321 @kindex S D r (Summary)
5322 @findex gnus-summary-resend-message
5323 Not to be confused with the previous command,
5324 @code{gnus-summary-resend-message} will prompt you for an address to
5325 send the current message off to, and then send it to that place.  The
5326 headers of the message won't be altered---but lots of headers that say
5327 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5328 means that you actually send a mail to someone that has a @code{To}
5329 header that (probably) points to yourself.  This will confuse people.
5330 So, natcherly you'll only do that if you're really eVIl.
5331
5332 This command is mainly used if you have several accounts and want to
5333 ship a mail to a different account of yours.  (If you're both
5334 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5335 to the @code{root} account, you may want to resend it to
5336 @code{postmaster}.  Ordnung muss sein!
5337
5338 This command understands the process/prefix convention
5339 (@pxref{Process/Prefix}).
5340
5341 @item S O m
5342 @kindex S O m (Summary)
5343 @findex gnus-summary-digest-mail-forward
5344 Digest the current series (@pxref{Decoding Articles}) and forward the
5345 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5346 command uses the process/prefix convention (@pxref{Process/Prefix}).
5347
5348 @item S M-c
5349 @kindex S M-c (Summary)
5350 @findex gnus-summary-mail-crosspost-complaint
5351 @cindex crossposting
5352 @cindex excessive crossposting
5353 Send a complaint about excessive crossposting to the author of the
5354 current article (@code{gnus-summary-mail-crosspost-complaint}).
5355
5356 @findex gnus-crosspost-complaint
5357 This command is provided as a way to fight back against the current
5358 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5359 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5360 command understands the process/prefix convention
5361 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5362
5363 @end table
5364
5365 Also @xref{Header Commands, ,Header Commands, message, The Message
5366 Manual}, for more information.
5367
5368
5369 @node Summary Post Commands
5370 @subsection Summary Post Commands
5371 @cindex post
5372 @cindex composing news
5373
5374 Commands for posting a news article:
5375
5376 @table @kbd
5377 @item S p
5378 @itemx a
5379 @kindex a (Summary)
5380 @kindex S p (Summary)
5381 @findex gnus-summary-post-news
5382 @c @icon{gnus-summary-post-news}
5383 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5384 default, post to the current group.  If given a prefix, disable that.
5385 If the prefix is 1, prompt for another group instead.
5386
5387 @item S f
5388 @itemx f
5389 @kindex f (Summary)
5390 @kindex S f (Summary)
5391 @findex gnus-summary-followup
5392 @c @icon{gnus-summary-followup}
5393 Post a followup to the current article (@code{gnus-summary-followup}).
5394
5395 @item S F
5396 @itemx F
5397 @kindex S F (Summary)
5398 @kindex F (Summary)
5399 @c @icon{gnus-summary-followup-with-original}
5400 @findex gnus-summary-followup-with-original
5401 Post a followup to the current article and include the original message
5402 (@code{gnus-summary-followup-with-original}).  This command uses the
5403 process/prefix convention.
5404
5405 @item S n
5406 @kindex S n (Summary)
5407 @findex gnus-summary-followup-to-mail
5408 Post a followup to the current article via news, even if you got the
5409 message through mail (@code{gnus-summary-followup-to-mail}).
5410
5411 @item S N
5412 @kindex S N (Summary)
5413 @findex gnus-summary-followup-to-mail-with-original
5414 Post a followup to the current article via news, even if you got the
5415 message through mail and include the original message
5416 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5417 the process/prefix convention.
5418
5419 @item S o p
5420 @kindex S o p (Summary)
5421 @findex gnus-summary-post-forward
5422 Forward the current article to a newsgroup
5423 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5424 headers of the forwarded article.
5425
5426 @item S O p
5427 @kindex S O p (Summary)
5428 @findex gnus-summary-digest-post-forward
5429 @cindex digests
5430 @cindex making digests
5431 Digest the current series and forward the result to a newsgroup
5432 (@code{gnus-summary-digest-post-forward}).  This command uses the
5433 process/prefix convention.
5434
5435 @item S u
5436 @kindex S u (Summary)
5437 @findex gnus-uu-post-news
5438 @c @icon{gnus-uu-post-news}
5439 Uuencode a file, split it into parts, and post it as a series
5440 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5441 @end table
5442
5443 Also @xref{Header Commands, ,Header Commands, message, The Message
5444 Manual}, for more information.
5445
5446
5447 @node Summary Message Commands
5448 @subsection Summary Message Commands
5449
5450 @table @kbd
5451 @item S y
5452 @kindex S y (Summary)
5453 @findex gnus-summary-yank-message
5454 Yank the current article into an already existing Message composition
5455 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5456 what message buffer you want to yank into, and understands the
5457 process/prefix convention (@pxref{Process/Prefix}).
5458
5459 @end table
5460
5461
5462 @node Canceling and Superseding
5463 @subsection Canceling Articles
5464 @cindex canceling articles
5465 @cindex superseding articles
5466
5467 Have you ever written something, and then decided that you really,
5468 really, really wish you hadn't posted that?
5469
5470 Well, you can't cancel mail, but you can cancel posts.
5471
5472 @findex gnus-summary-cancel-article
5473 @kindex C (Summary)
5474 @c @icon{gnus-summary-cancel-article}
5475 Find the article you wish to cancel (you can only cancel your own
5476 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5477 c} (@code{gnus-summary-cancel-article}).  Your article will be
5478 canceled---machines all over the world will be deleting your article.
5479 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5480
5481 Be aware, however, that not all sites honor cancels, so your article may
5482 live on here and there, while most sites will delete the article in
5483 question.
5484
5485 Gnus will use the ``current'' select method when canceling.  If you
5486 want to use the standard posting method, use the @samp{a} symbolic
5487 prefix (@pxref{Symbolic Prefixes}).
5488
5489 If you discover that you have made some mistakes and want to do some
5490 corrections, you can post a @dfn{superseding} article that will replace
5491 your original article.
5492
5493 @findex gnus-summary-supersede-article
5494 @kindex S (Summary)
5495 Go to the original article and press @kbd{S s}
5496 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5497 where you can edit the article all you want before sending it off the
5498 usual way.
5499
5500 The same goes for superseding as for canceling, only more so: Some
5501 sites do not honor superseding.  On those sites, it will appear that you
5502 have posted almost the same article twice.
5503
5504 If you have just posted the article, and change your mind right away,
5505 there is a trick you can use to cancel/supersede the article without
5506 waiting for the article to appear on your site first.  You simply return
5507 to the post buffer (which is called @code{*sent ...*}).  There you will
5508 find the article you just posted, with all the headers intact.  Change
5509 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5510 header by substituting one of those words for the word
5511 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5512 you would do normally.  The previous article will be
5513 canceled/superseded.
5514
5515 Just remember, kids: There is no 'c' in 'supersede'.
5516
5517 @node Delayed Articles
5518 @section Delayed Articles
5519 @cindex delayed sending
5520 @cindex send delayed
5521
5522 Sometimes, you might wish to delay the sending of a message.  For
5523 example, you might wish to arrange for a message to turn up just in time
5524 to remind your about the birthday of your Significant Other.  For this,
5525 there is the @code{gnus-delay} package.  Setup is simple:
5526
5527 @lisp
5528 (gnus-delay-initialize)
5529 @end lisp
5530
5531 @findex gnus-delay-article
5532 Normally, to send a message you use the @kbd{C-c C-c} command from
5533 Message mode.  To delay a message, use @kbd{C-c C-j}
5534 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5535 message should be delayed.  Possible answers are:
5536
5537 @itemize @bullet
5538 @item
5539 A time span.  Consists of an integer and a letter.  For example,
5540 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5541 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5542 (months) and @code{Y} (years).
5543
5544 @item
5545 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5546 delayed until that day, at a specific time (eight o'clock by default).
5547 See also @code{gnus-delay-default-hour}.
5548
5549 @item
5550 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5551 stuff.  The deadline will be at that time today, except if that time has
5552 already passed, then it's at the given time tomorrow.  So if it's ten
5553 o'clock in the morning and you specify @code{11:15}, then the deadline
5554 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5555 that means a time tomorrow.
5556 @end itemize
5557
5558 The action of the @code{gnus-delay-article} command is influenced by a
5559 couple of variables:
5560
5561 @table @code
5562 @item gnus-delay-default-hour
5563 @vindex gnus-delay-default-hour
5564 When you specify a specific date, the message will be due on that hour
5565 on the given date.  Possible values are integers 0 through 23.
5566
5567 @item gnus-delay-default-delay
5568 @vindex gnus-delay-default-delay
5569 This is a string and gives the default delay.  It can be of any of the
5570 formats described above.
5571
5572 @item gnus-delay-group
5573 @vindex gnus-delay-group
5574 Delayed articles will be kept in this group on the drafts server until
5575 they are due.  You probably don't need to change this.  The default
5576 value is @code{"delayed"}.
5577
5578 @item gnus-delay-header
5579 @vindex gnus-delay-header
5580 The deadline for each article will be stored in a header.  This variable
5581 is a string and gives the header name.  You probably don't need to
5582 change this.  The default value is @code{"X-Gnus-Delayed"}.
5583 @end table
5584
5585 The way delaying works is like this: when you use the
5586 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5587 calculates the deadline of the message and stores it in the
5588 @code{X-Gnus-Delayed} header and puts the message in the
5589 @code{nndraft:delayed} group.
5590
5591 @findex gnus-delay-send-queue
5592 And whenever you get new news, Gnus looks through the group for articles
5593 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5594 function for this.  By default, this function is added to the hook
5595 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5596 Maybe you want to use the demon to send drafts?  Just tell the demon to
5597 execute the @code{gnus-delay-send-queue} function.
5598
5599 @table @code
5600 @item gnus-delay-initialize
5601 @findex gnus-delay-initialize
5602
5603 By default, this function installs @code{gnus-delay-send-queue} in
5604 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5605 argument @code{no-check}.  If it is non-@code{nil},
5606 @code{gnus-get-new-news-hook} is not changed.  The optional first
5607 argument is ignored.
5608
5609 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5610 Presumably, you want to use the demon for sending due delayed articles.
5611 Just don't forget to set that up :-)
5612 @end table
5613
5614
5615 @node Marking Articles
5616 @section Marking Articles
5617 @cindex article marking
5618 @cindex article ticking
5619 @cindex marks
5620
5621 There are several marks you can set on an article.
5622
5623 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5624 neologism ohoy!) of the article.  Alphabetic marks generally mean
5625 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5626
5627 In addition, you also have marks that do not affect readedness.
5628
5629 @menu
5630 * Unread Articles::             Marks for unread articles.
5631 * Read Articles::               Marks for read articles.
5632 * Other Marks::                 Marks that do not affect readedness.
5633 @end menu
5634
5635 @ifinfo
5636 There's a plethora of commands for manipulating these marks:
5637 @end ifinfo
5638
5639 @menu
5640 * Setting Marks::             How to set and remove marks.
5641 * Generic Marking Commands::  How to customize the marking.
5642 * Setting Process Marks::     How to mark articles for later processing.
5643 @end menu
5644
5645
5646 @node Unread Articles
5647 @subsection Unread Articles
5648
5649 The following marks mark articles as (kinda) unread, in one form or
5650 other.
5651
5652 @table @samp
5653 @item !
5654 @vindex gnus-ticked-mark
5655 Marked as ticked (@code{gnus-ticked-mark}).
5656
5657 @dfn{Ticked articles} are articles that will remain visible always.  If
5658 you see an article that you find interesting, or you want to put off
5659 reading it, or replying to it, until sometime later, you'd typically
5660 tick it.  However, articles can be expired (from news servers by the
5661 news server software, Gnus itself never expires ticked messages), so if
5662 you want to keep an article forever, you'll have to make it persistent
5663 (@pxref{Persistent Articles}).
5664
5665 @item ?
5666 @vindex gnus-dormant-mark
5667 Marked as dormant (@code{gnus-dormant-mark}).
5668
5669 @dfn{Dormant articles} will only appear in the summary buffer if there
5670 are followups to it.  If you want to see them even if they don't have
5671 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5672 Otherwise (except for the visibility issue), they are just like ticked
5673 messages.
5674
5675 @item SPACE
5676 @vindex gnus-unread-mark
5677 Marked as unread (@code{gnus-unread-mark}).
5678
5679 @dfn{Unread articles} are articles that haven't been read at all yet.
5680 @end table
5681
5682
5683 @node Read Articles
5684 @subsection Read Articles
5685 @cindex expirable mark
5686
5687 All the following marks mark articles as read.
5688
5689 @table @samp
5690
5691 @item r
5692 @vindex gnus-del-mark
5693 These are articles that the user has marked as read with the @kbd{d}
5694 command manually, more or less (@code{gnus-del-mark}).
5695
5696 @item R
5697 @vindex gnus-read-mark
5698 Articles that have actually been read (@code{gnus-read-mark}).
5699
5700 @item O
5701 @vindex gnus-ancient-mark
5702 Articles that were marked as read in previous sessions and are now
5703 @dfn{old} (@code{gnus-ancient-mark}).
5704
5705 @item K
5706 @vindex gnus-killed-mark
5707 Marked as killed (@code{gnus-killed-mark}).
5708
5709 @item X
5710 @vindex gnus-kill-file-mark
5711 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5712
5713 @item Y
5714 @vindex gnus-low-score-mark
5715 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5716
5717 @item C
5718 @vindex gnus-catchup-mark
5719 Marked as read by a catchup (@code{gnus-catchup-mark}).
5720
5721 @item G
5722 @vindex gnus-canceled-mark
5723 Canceled article (@code{gnus-canceled-mark})
5724
5725 @item F
5726 @vindex gnus-souped-mark
5727 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5728
5729 @item Q
5730 @vindex gnus-sparse-mark
5731 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5732 Threading}.
5733
5734 @item M
5735 @vindex gnus-duplicate-mark
5736 Article marked as read by duplicate suppression
5737 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5738
5739 @end table
5740
5741 All these marks just mean that the article is marked as read, really.
5742 They are interpreted differently when doing adaptive scoring, though.
5743
5744 One more special mark, though:
5745
5746 @table @samp
5747 @item E
5748 @vindex gnus-expirable-mark
5749 Marked as expirable (@code{gnus-expirable-mark}).
5750
5751 Marking articles as @dfn{expirable} (or have them marked as such
5752 automatically) doesn't make much sense in normal groups---a user doesn't
5753 control expiring of news articles, but in mail groups, for instance,
5754 articles marked as @dfn{expirable} can be deleted by gnus at
5755 any time.
5756 @end table
5757
5758
5759 @node Other Marks
5760 @subsection Other Marks
5761 @cindex process mark
5762 @cindex bookmarks
5763
5764 There are some marks that have nothing to do with whether the article is
5765 read or not.
5766
5767 @itemize @bullet
5768
5769 @item
5770 You can set a bookmark in the current article.  Say you are reading a
5771 long thesis on cats' urinary tracts, and have to go home for dinner
5772 before you've finished reading the thesis.  You can then set a bookmark
5773 in the article, and gnus will jump to this bookmark the next time it
5774 encounters the article.  @xref{Setting Marks}.
5775
5776 @item
5777 @vindex gnus-replied-mark
5778 All articles that you have replied to or made a followup to (i.e., have
5779 answered) will be marked with an @samp{A} in the second column
5780 (@code{gnus-replied-mark}).
5781
5782 @item
5783 @vindex gnus-forwarded-mark
5784 All articles that you have forwarded will be marked with an @samp{F} in
5785 the second column (@code{gnus-forwarded-mark}).
5786
5787 @item
5788 @vindex gnus-cached-mark
5789 Articles stored in the article cache will be marked with an @samp{*} in
5790 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5791
5792 @item
5793 @vindex gnus-saved-mark
5794 Articles ``saved'' (in some manner or other; not necessarily
5795 religiously) are marked with an @samp{S} in the second column
5796 (@code{gnus-saved-mark}).
5797
5798 @item
5799 @vindex gnus-recent-mark
5800 Articles that according to the server haven't been shown to the user
5801 before are marked with a @samp{N} in the second column
5802 (@code{gnus-recent-mark}).  Note that not all servers support this
5803 mark, in which case it simply never appears.  Compare with
5804 @code{gnus-unseen-mark}.
5805
5806 @item
5807 @vindex gnus-unseen-mark
5808 Articles that haven't been seen before in Gnus by the user are marked
5809 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5810 Compare with @code{gnus-recent-mark}.
5811
5812 @item
5813 @vindex gnus-downloaded-mark
5814 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5815 downloaded for unplugged (offline) viewing.  If you are using the
5816 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5817 (The variable @code{gnus-downloaded-mark} controls which character to
5818 use.)
5819
5820 @item
5821 @vindex gnus-undownloaded-mark
5822 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5823 not have been downloaded.  Such articles cannot be viewed while you
5824 are unplugged (offline).  If you are using the @samp{%O} spec, these
5825 articles get the @samp{-} mark in that spec.  (The variable
5826 @code{gnus-undownloaded-mark} controls which character to use.)
5827
5828 @item
5829 @vindex gnus-downloadable-mark
5830 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5831 automatically, but it is also possible to explicitly mark articles for
5832 download, even if they would not be downloaded automatically.  Such
5833 explicitly-marked articles get the @samp{%} mark in the first column.
5834 (The variable @code{gnus-downloadable-mark} controls which character to
5835 use.)
5836
5837 @item
5838 @vindex gnus-not-empty-thread-mark
5839 @vindex gnus-empty-thread-mark
5840 If the @samp{%e} spec is used, the presence of threads or not will be
5841 marked with @code{gnus-not-empty-thread-mark} and
5842 @code{gnus-empty-thread-mark} in the third column, respectively.
5843
5844 @item
5845 @vindex gnus-process-mark
5846 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5847 variety of commands react to the presence of the process mark.  For
5848 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5849 all articles that have been marked with the process mark.  Articles
5850 marked with the process mark have a @samp{#} in the second column.
5851
5852 @end itemize
5853
5854 You might have noticed that most of these ``non-readedness'' marks
5855 appear in the second column by default.  So if you have a cached, saved,
5856 replied article that you have process-marked, what will that look like?
5857
5858 Nothing much.  The precedence rules go as follows: process -> cache ->
5859 replied -> saved.  So if the article is in the cache and is replied,
5860 you'll only see the cache mark and not the replied mark.
5861
5862
5863 @node Setting Marks
5864 @subsection Setting Marks
5865 @cindex setting marks
5866
5867 All the marking commands understand the numeric prefix.
5868
5869 @table @kbd
5870 @item M c
5871 @itemx M-u
5872 @kindex M c (Summary)
5873 @kindex M-u (Summary)
5874 @findex gnus-summary-clear-mark-forward
5875 @cindex mark as unread
5876 Clear all readedness-marks from the current article
5877 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5878 article as unread.
5879
5880 @item M t
5881 @itemx !
5882 @kindex ! (Summary)
5883 @kindex M t (Summary)
5884 @findex gnus-summary-tick-article-forward
5885 Tick the current article (@code{gnus-summary-tick-article-forward}).
5886 @xref{Article Caching}.
5887
5888 @item M ?
5889 @itemx ?
5890 @kindex ? (Summary)
5891 @kindex M ? (Summary)
5892 @findex gnus-summary-mark-as-dormant
5893 Mark the current article as dormant
5894 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5895
5896 @item M d
5897 @itemx d
5898 @kindex M d (Summary)
5899 @kindex d (Summary)
5900 @findex gnus-summary-mark-as-read-forward
5901 Mark the current article as read
5902 (@code{gnus-summary-mark-as-read-forward}).
5903
5904 @item D
5905 @kindex D (Summary)
5906 @findex gnus-summary-mark-as-read-backward
5907 Mark the current article as read and move point to the previous line
5908 (@code{gnus-summary-mark-as-read-backward}).
5909
5910 @item M k
5911 @itemx k
5912 @kindex k (Summary)
5913 @kindex M k (Summary)
5914 @findex gnus-summary-kill-same-subject-and-select
5915 Mark all articles that have the same subject as the current one as read,
5916 and then select the next unread article
5917 (@code{gnus-summary-kill-same-subject-and-select}).
5918
5919 @item M K
5920 @itemx C-k
5921 @kindex M K (Summary)
5922 @kindex C-k (Summary)
5923 @findex gnus-summary-kill-same-subject
5924 Mark all articles that have the same subject as the current one as read
5925 (@code{gnus-summary-kill-same-subject}).
5926
5927 @item M C
5928 @kindex M C (Summary)
5929 @findex gnus-summary-catchup
5930 @c @icon{gnus-summary-catchup}
5931 Mark all unread articles as read (@code{gnus-summary-catchup}).
5932
5933 @item M C-c
5934 @kindex M C-c (Summary)
5935 @findex gnus-summary-catchup-all
5936 Mark all articles in the group as read---even the ticked and dormant
5937 articles (@code{gnus-summary-catchup-all}).
5938
5939 @item M H
5940 @kindex M H (Summary)
5941 @findex gnus-summary-catchup-to-here
5942 Catchup the current group to point (before the point)
5943 (@code{gnus-summary-catchup-to-here}).
5944
5945 @item M h
5946 @kindex M h (Summary)
5947 @findex gnus-summary-catchup-from-here
5948 Catchup the current group from point (after the point)
5949 (@code{gnus-summary-catchup-from-here}).
5950
5951 @item C-w
5952 @kindex C-w (Summary)
5953 @findex gnus-summary-mark-region-as-read
5954 Mark all articles between point and mark as read
5955 (@code{gnus-summary-mark-region-as-read}).
5956
5957 @item M V k
5958 @kindex M V k (Summary)
5959 @findex gnus-summary-kill-below
5960 Kill all articles with scores below the default score (or below the
5961 numeric prefix) (@code{gnus-summary-kill-below}).
5962
5963 @item M e
5964 @itemx E
5965 @kindex M e (Summary)
5966 @kindex E (Summary)
5967 @findex gnus-summary-mark-as-expirable
5968 Mark the current article as expirable
5969 (@code{gnus-summary-mark-as-expirable}).
5970
5971 @item M b
5972 @kindex M b (Summary)
5973 @findex gnus-summary-set-bookmark
5974 Set a bookmark in the current article
5975 (@code{gnus-summary-set-bookmark}).
5976
5977 @item M B
5978 @kindex M B (Summary)
5979 @findex gnus-summary-remove-bookmark
5980 Remove the bookmark from the current article
5981 (@code{gnus-summary-remove-bookmark}).
5982
5983 @item M V c
5984 @kindex M V c (Summary)
5985 @findex gnus-summary-clear-above
5986 Clear all marks from articles with scores over the default score (or
5987 over the numeric prefix) (@code{gnus-summary-clear-above}).
5988
5989 @item M V u
5990 @kindex M V u (Summary)
5991 @findex gnus-summary-tick-above
5992 Tick all articles with scores over the default score (or over the
5993 numeric prefix) (@code{gnus-summary-tick-above}).
5994
5995 @item M V m
5996 @kindex M V m (Summary)
5997 @findex gnus-summary-mark-above
5998 Prompt for a mark, and mark all articles with scores over the default
5999 score (or over the numeric prefix) with this mark
6000 (@code{gnus-summary-clear-above}).
6001 @end table
6002
6003 @vindex gnus-summary-goto-unread
6004 The @code{gnus-summary-goto-unread} variable controls what action should
6005 be taken after setting a mark.  If non-@code{nil}, point will move to
6006 the next/previous unread article.  If @code{nil}, point will just move
6007 one line up or down.  As a special case, if this variable is
6008 @code{never}, all the marking commands as well as other commands (like
6009 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6010 The default is @code{t}.
6011
6012
6013 @node Generic Marking Commands
6014 @subsection Generic Marking Commands
6015
6016 Some people would like the command that ticks an article (@kbd{!}) go to
6017 the next article.  Others would like it to go to the next unread
6018 article.  Yet others would like it to stay on the current article.  And
6019 even though I haven't heard of anybody wanting it to go to the
6020 previous (unread) article, I'm sure there are people that want that as
6021 well.
6022
6023 Multiply these five behaviors with five different marking commands, and
6024 you get a potentially complex set of variable to control what each
6025 command should do.
6026
6027 To sidestep that mess, Gnus provides commands that do all these
6028 different things.  They can be found on the @kbd{M M} map in the summary
6029 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6030 to list in this manual.
6031
6032 While you can use these commands directly, most users would prefer
6033 altering the summary mode keymap.  For instance, if you would like the
6034 @kbd{!} command to go to the next article instead of the next unread
6035 article, you could say something like:
6036
6037 @lisp
6038 @group
6039 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6040 (defun my-alter-summary-map ()
6041   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6042 @end group
6043 @end lisp
6044
6045 @noindent
6046 or
6047
6048 @lisp
6049 (defun my-alter-summary-map ()
6050   (local-set-key "!" "MM!n"))
6051 @end lisp
6052
6053
6054 @node Setting Process Marks
6055 @subsection Setting Process Marks
6056 @cindex setting process marks
6057
6058 Process marks are displayed as @code{#} in the summary buffer, and are
6059 used for marking articles in such a way that other commands will
6060 process these articles.  For instance, if you process mark four
6061 articles and then use the @kbd{*} command, Gnus will enter these four
6062 commands into the cache.  For more information,
6063 @pxref{Process/Prefix}.
6064
6065 @table @kbd
6066
6067 @item M P p
6068 @itemx #
6069 @kindex # (Summary)
6070 @kindex M P p (Summary)
6071 @findex gnus-summary-mark-as-processable
6072 Mark the current article with the process mark
6073 (@code{gnus-summary-mark-as-processable}).
6074 @findex gnus-summary-unmark-as-processable
6075
6076 @item M P u
6077 @itemx M-#
6078 @kindex M P u (Summary)
6079 @kindex M-# (Summary)
6080 Remove the process mark, if any, from the current article
6081 (@code{gnus-summary-unmark-as-processable}).
6082
6083 @item M P U
6084 @kindex M P U (Summary)
6085 @findex gnus-summary-unmark-all-processable
6086 Remove the process mark from all articles
6087 (@code{gnus-summary-unmark-all-processable}).
6088
6089 @item M P i
6090 @kindex M P i (Summary)
6091 @findex gnus-uu-invert-processable
6092 Invert the list of process marked articles
6093 (@code{gnus-uu-invert-processable}).
6094
6095 @item M P R
6096 @kindex M P R (Summary)
6097 @findex gnus-uu-mark-by-regexp
6098 Mark articles that have a @code{Subject} header that matches a regular
6099 expression (@code{gnus-uu-mark-by-regexp}).
6100
6101 @item M P G
6102 @kindex M P G (Summary)
6103 @findex gnus-uu-unmark-by-regexp
6104 Unmark articles that have a @code{Subject} header that matches a regular
6105 expression (@code{gnus-uu-unmark-by-regexp}).
6106
6107 @item M P r
6108 @kindex M P r (Summary)
6109 @findex gnus-uu-mark-region
6110 Mark articles in region (@code{gnus-uu-mark-region}).
6111
6112 @item M P g
6113 @kindex M P g
6114 @findex gnus-uu-unmark-region
6115 Unmark articles in region (@code{gnus-uu-unmark-region}).
6116
6117 @item M P t
6118 @kindex M P t (Summary)
6119 @findex gnus-uu-mark-thread
6120 Mark all articles in the current (sub)thread
6121 (@code{gnus-uu-mark-thread}).
6122
6123 @item M P T
6124 @kindex M P T (Summary)
6125 @findex gnus-uu-unmark-thread
6126 Unmark all articles in the current (sub)thread
6127 (@code{gnus-uu-unmark-thread}).
6128
6129 @item M P v
6130 @kindex M P v (Summary)
6131 @findex gnus-uu-mark-over
6132 Mark all articles that have a score above the prefix argument
6133 (@code{gnus-uu-mark-over}).
6134
6135 @item M P s
6136 @kindex M P s (Summary)
6137 @findex gnus-uu-mark-series
6138 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6139
6140 @item M P S
6141 @kindex M P S (Summary)
6142 @findex gnus-uu-mark-sparse
6143 Mark all series that have already had some articles marked
6144 (@code{gnus-uu-mark-sparse}).
6145
6146 @item M P a
6147 @kindex M P a (Summary)
6148 @findex gnus-uu-mark-all
6149 Mark all articles in series order (@code{gnus-uu-mark-series}).
6150
6151 @item M P b
6152 @kindex M P b (Summary)
6153 @findex gnus-uu-mark-buffer
6154 Mark all articles in the buffer in the order they appear
6155 (@code{gnus-uu-mark-buffer}).
6156
6157 @item M P k
6158 @kindex M P k (Summary)
6159 @findex gnus-summary-kill-process-mark
6160 Push the current process mark set onto the stack and unmark all articles
6161 (@code{gnus-summary-kill-process-mark}).
6162
6163 @item M P y
6164 @kindex M P y (Summary)
6165 @findex gnus-summary-yank-process-mark
6166 Pop the previous process mark set from the stack and restore it
6167 (@code{gnus-summary-yank-process-mark}).
6168
6169 @item M P w
6170 @kindex M P w (Summary)
6171 @findex gnus-summary-save-process-mark
6172 Push the current process mark set onto the stack
6173 (@code{gnus-summary-save-process-mark}).
6174
6175 @end table
6176
6177 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6178 set process marks based on article body contents.
6179
6180
6181 @node Limiting
6182 @section Limiting
6183 @cindex limiting
6184
6185 It can be convenient to limit the summary buffer to just show some
6186 subset of the articles currently in the group.  The effect most limit
6187 commands have is to remove a few (or many) articles from the summary
6188 buffer.
6189
6190 All limiting commands work on subsets of the articles already fetched
6191 from the servers.  None of these commands query the server for
6192 additional articles.
6193
6194 @table @kbd
6195
6196 @item / /
6197 @itemx / s
6198 @kindex / / (Summary)
6199 @findex gnus-summary-limit-to-subject
6200 Limit the summary buffer to articles that match some subject
6201 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6202 matching articles.
6203
6204 @item / a
6205 @kindex / a (Summary)
6206 @findex gnus-summary-limit-to-author
6207 Limit the summary buffer to articles that match some author
6208 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6209 matching articles.
6210
6211 @item / x
6212 @kindex / x (Summary)
6213 @findex gnus-summary-limit-to-extra
6214 Limit the summary buffer to articles that match one of the ``extra''
6215 headers (@pxref{To From Newsgroups})
6216 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6217 matching articles.
6218
6219 @item / u
6220 @itemx x
6221 @kindex / u (Summary)
6222 @kindex x (Summary)
6223 @findex gnus-summary-limit-to-unread
6224 Limit the summary buffer to articles not marked as read
6225 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6226 buffer to articles strictly unread.  This means that ticked and
6227 dormant articles will also be excluded.
6228
6229 @item / m
6230 @kindex / m (Summary)
6231 @findex gnus-summary-limit-to-marks
6232 Ask for a mark and then limit to all articles that have been marked
6233 with that mark (@code{gnus-summary-limit-to-marks}).
6234
6235 @item / t
6236 @kindex / t (Summary)
6237 @findex gnus-summary-limit-to-age
6238 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6239 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6240 articles younger than that number of days.
6241
6242 @item / n
6243 @kindex / n (Summary)
6244 @findex gnus-summary-limit-to-articles
6245 Limit the summary buffer to the current article
6246 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6247 convention (@pxref{Process/Prefix}).
6248
6249 @item / w
6250 @kindex / w (Summary)
6251 @findex gnus-summary-pop-limit
6252 Pop the previous limit off the stack and restore it
6253 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6254 the stack.
6255
6256 @item / .
6257 @kindex / . (Summary)
6258 @findex gnus-summary-limit-to-unseen
6259 Limit the summary buffer to the unseen articles
6260 (@code{gnus-summary-limit-to-unseen}).
6261
6262 @item / v
6263 @kindex / v (Summary)
6264 @findex gnus-summary-limit-to-score
6265 Limit the summary buffer to articles that have a score at or above some
6266 score (@code{gnus-summary-limit-to-score}).
6267
6268 @item / p
6269 @kindex / p (Summary)
6270 @findex gnus-summary-limit-to-display-predicate
6271 Limit the summary buffer to articles that satisfy the @code{display}
6272 group parameter predicate
6273 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6274 Parameters}, for more on this predicate.
6275
6276 @item / E
6277 @itemx M S
6278 @kindex M S (Summary)
6279 @kindex / E (Summary)
6280 @findex gnus-summary-limit-include-expunged
6281 Include all expunged articles in the limit
6282 (@code{gnus-summary-limit-include-expunged}).
6283
6284 @item / D
6285 @kindex / D (Summary)
6286 @findex gnus-summary-limit-include-dormant
6287 Include all dormant articles in the limit
6288 (@code{gnus-summary-limit-include-dormant}).
6289
6290 @item / *
6291 @kindex / * (Summary)
6292 @findex gnus-summary-limit-include-cached
6293 Include all cached articles in the limit
6294 (@code{gnus-summary-limit-include-cached}).
6295
6296 @item / d
6297 @kindex / d (Summary)
6298 @findex gnus-summary-limit-exclude-dormant
6299 Exclude all dormant articles from the limit
6300 (@code{gnus-summary-limit-exclude-dormant}).
6301
6302 @item / M
6303 @kindex / M (Summary)
6304 @findex gnus-summary-limit-exclude-marks
6305 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6306
6307 @item / T
6308 @kindex / T (Summary)
6309 @findex gnus-summary-limit-include-thread
6310 Include all the articles in the current thread in the limit.
6311
6312 @item / c
6313 @kindex / c (Summary)
6314 @findex gnus-summary-limit-exclude-childless-dormant
6315 Exclude all dormant articles that have no children from the limit@*
6316 (@code{gnus-summary-limit-exclude-childless-dormant}).
6317
6318 @item / C
6319 @kindex / C (Summary)
6320 @findex gnus-summary-limit-mark-excluded-as-read
6321 Mark all excluded unread articles as read
6322 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6323 also mark excluded ticked and dormant articles as read.
6324
6325 @item / N
6326 @kindex / N (Summary)
6327 @findex gnus-summary-insert-new-articles
6328 Insert all new articles in the summary buffer.  It scans for new emails
6329 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6330
6331 @item / o
6332 @kindex / o (Summary)
6333 @findex gnus-summary-insert-old-articles
6334 Insert all old articles in the summary buffer.  If given a numbered
6335 prefix, fetch this number of articles.
6336
6337 @end table
6338
6339
6340 @node Threading
6341 @section Threading
6342 @cindex threading
6343 @cindex article threading
6344
6345 Gnus threads articles by default.  @dfn{To thread} is to put responses
6346 to articles directly after the articles they respond to---in a
6347 hierarchical fashion.
6348
6349 Threading is done by looking at the @code{References} headers of the
6350 articles.  In a perfect world, this would be enough to build pretty
6351 trees, but unfortunately, the @code{References} header is often broken
6352 or simply missing.  Weird news propagation exacerbates the problem,
6353 so one has to employ other heuristics to get pleasing results.  A
6354 plethora of approaches exists, as detailed in horrible detail in
6355 @ref{Customizing Threading}.
6356
6357 First, a quick overview of the concepts:
6358
6359 @table @dfn
6360 @item root
6361 The top-most article in a thread; the first article in the thread.
6362
6363 @item thread
6364 A tree-like article structure.
6365
6366 @item sub-thread
6367 A small(er) section of this tree-like structure.
6368
6369 @item loose threads
6370 Threads often lose their roots due to article expiry, or due to the root
6371 already having been read in a previous session, and not displayed in the
6372 summary buffer.  We then typically have many sub-threads that really
6373 belong to one thread, but are without connecting roots.  These are
6374 called loose threads.
6375
6376 @item thread gathering
6377 An attempt to gather loose threads into bigger threads.
6378
6379 @item sparse threads
6380 A thread where the missing articles have been ``guessed'' at, and are
6381 displayed as empty lines in the summary buffer.
6382
6383 @end table
6384
6385
6386 @menu
6387 * Customizing Threading::       Variables you can change to affect the threading.
6388 * Thread Commands::             Thread based commands in the summary buffer.
6389 @end menu
6390
6391
6392 @node Customizing Threading
6393 @subsection Customizing Threading
6394 @cindex customizing threading
6395
6396 @menu
6397 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6398 * Filling In Threads::          Making the threads displayed look fuller.
6399 * More Threading::              Even more variables for fiddling with threads.
6400 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6401 @end menu
6402
6403
6404 @node Loose Threads
6405 @subsubsection Loose Threads
6406 @cindex <
6407 @cindex >
6408 @cindex loose threads
6409
6410 @table @code
6411 @item gnus-summary-make-false-root
6412 @vindex gnus-summary-make-false-root
6413 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6414 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6415 Yup.)  Loose subtrees occur when the real root has expired, or you've
6416 read or killed the root in a previous session.
6417
6418 When there is no real root of a thread, gnus will have to fudge
6419 something.  This variable says what fudging method gnus should use.
6420 There are four possible values:
6421
6422 @iftex
6423 @iflatex
6424 \gnusfigure{The Summary Buffer}{390}{
6425 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6426 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6427 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6428 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6429 }
6430 @end iflatex
6431 @end iftex
6432
6433 @cindex adopting articles
6434
6435 @table @code
6436
6437 @item adopt
6438 Gnus will make the first of the orphaned articles the parent.  This
6439 parent will adopt all the other articles.  The adopted articles will be
6440 marked as such by pointy brackets (@samp{<>}) instead of the standard
6441 square brackets (@samp{[]}).  This is the default method.
6442
6443 @item dummy
6444 @vindex gnus-summary-dummy-line-format
6445 @vindex gnus-summary-make-false-root-always
6446 Gnus will create a dummy summary line that will pretend to be the
6447 parent.  This dummy line does not correspond to any real article, so
6448 selecting it will just select the first real article after the dummy
6449 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6450 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6451 which is the subject of the article.  @xref{Formatting Variables}.
6452 If you want all threads to have a dummy root, even the non-gathered
6453 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6454
6455 @item empty
6456 Gnus won't actually make any article the parent, but simply leave the
6457 subject field of all orphans except the first empty.  (Actually, it will
6458 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6459 Buffer Format}).)
6460
6461 @item none
6462 Don't make any article parent at all.  Just gather the threads and
6463 display them after one another.
6464
6465 @item nil
6466 Don't gather loose threads.
6467 @end table
6468
6469 @item gnus-summary-gather-subject-limit
6470 @vindex gnus-summary-gather-subject-limit
6471 Loose threads are gathered by comparing subjects of articles.  If this
6472 variable is @code{nil}, gnus requires an exact match between the
6473 subjects of the loose threads before gathering them into one big
6474 super-thread.  This might be too strict a requirement, what with the
6475 presence of stupid newsreaders that chop off long subject lines.  If
6476 you think so, set this variable to, say, 20 to require that only the
6477 first 20 characters of the subjects have to match.  If you set this
6478 variable to a really low number, you'll find that gnus will gather
6479 everything in sight into one thread, which isn't very helpful.
6480
6481 @cindex fuzzy article gathering
6482 If you set this variable to the special value @code{fuzzy}, gnus will
6483 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6484 Matching}).
6485
6486 @item gnus-simplify-subject-fuzzy-regexp
6487 @vindex gnus-simplify-subject-fuzzy-regexp
6488 This can either be a regular expression or list of regular expressions
6489 that match strings that will be removed from subjects if fuzzy subject
6490 simplification is used.
6491
6492 @item gnus-simplify-ignored-prefixes
6493 @vindex gnus-simplify-ignored-prefixes
6494 If you set @code{gnus-summary-gather-subject-limit} to something as low
6495 as 10, you might consider setting this variable to something sensible:
6496
6497 @c Written by Michael Ernst <mernst@cs.rice.edu>
6498 @lisp
6499 (setq gnus-simplify-ignored-prefixes
6500       (concat
6501        "\\`\\[?\\("
6502        (mapconcat
6503         'identity
6504         '("looking"
6505           "wanted" "followup" "summary\\( of\\)?"
6506           "help" "query" "problem" "question"
6507           "answer" "reference" "announce"
6508           "How can I" "How to" "Comparison of"
6509           ;; ...
6510           )
6511         "\\|")
6512        "\\)\\s *\\("
6513        (mapconcat 'identity
6514                   '("for" "for reference" "with" "about")
6515                   "\\|")
6516        "\\)?\\]?:?[ \t]*"))
6517 @end lisp
6518
6519 All words that match this regexp will be removed before comparing two
6520 subjects.
6521
6522 @item gnus-simplify-subject-functions
6523 @vindex gnus-simplify-subject-functions
6524 If non-@code{nil}, this variable overrides
6525 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6526 list of functions to apply to the @code{Subject} string iteratively to
6527 arrive at the simplified version of the string.
6528
6529 Useful functions to put in this list include:
6530
6531 @table @code
6532 @item gnus-simplify-subject-re
6533 @findex gnus-simplify-subject-re
6534 Strip the leading @samp{Re:}.
6535
6536 @item gnus-simplify-subject-fuzzy
6537 @findex gnus-simplify-subject-fuzzy
6538 Simplify fuzzily.
6539
6540 @item gnus-simplify-whitespace
6541 @findex gnus-simplify-whitespace
6542 Remove excessive whitespace.
6543
6544 @item gnus-simplify-all-whitespace
6545 @findex gnus-simplify-all-whitespace
6546 Remove all whitespace.
6547 @end table
6548
6549 You may also write your own functions, of course.
6550
6551
6552 @item gnus-summary-gather-exclude-subject
6553 @vindex gnus-summary-gather-exclude-subject
6554 Since loose thread gathering is done on subjects only, that might lead
6555 to many false hits, especially with certain common subjects like
6556 @samp{} and @samp{(none)}.  To make the situation slightly better,
6557 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6558 what subjects should be excluded from the gathering process.@*
6559 The default is @samp{^ *$\\|^(none)$}.
6560
6561 @item gnus-summary-thread-gathering-function
6562 @vindex gnus-summary-thread-gathering-function
6563 Gnus gathers threads by looking at @code{Subject} headers.  This means
6564 that totally unrelated articles may end up in the same ``thread'', which
6565 is confusing.  An alternate approach is to look at all the
6566 @code{Message-ID}s in all the @code{References} headers to find matches.
6567 This will ensure that no gathered threads ever include unrelated
6568 articles, but it also means that people who have posted with broken
6569 newsreaders won't be gathered properly.  The choice is yours---plague or
6570 cholera:
6571
6572 @table @code
6573 @item gnus-gather-threads-by-subject
6574 @findex gnus-gather-threads-by-subject
6575 This function is the default gathering function and looks at
6576 @code{Subject}s exclusively.
6577
6578 @item gnus-gather-threads-by-references
6579 @findex gnus-gather-threads-by-references
6580 This function looks at @code{References} headers exclusively.
6581 @end table
6582
6583 If you want to test gathering by @code{References}, you could say
6584 something like:
6585
6586 @lisp
6587 (setq gnus-summary-thread-gathering-function
6588       'gnus-gather-threads-by-references)
6589 @end lisp
6590
6591 @end table
6592
6593
6594 @node Filling In Threads
6595 @subsubsection Filling In Threads
6596
6597 @table @code
6598 @item gnus-fetch-old-headers
6599 @vindex gnus-fetch-old-headers
6600 If non-@code{nil}, gnus will attempt to build old threads by fetching
6601 more old headers---headers to articles marked as read.  If you
6602 would like to display as few summary lines as possible, but still
6603 connect as many loose threads as possible, you should set this variable
6604 to @code{some} or a number.  If you set it to a number, no more than
6605 that number of extra old headers will be fetched.  In either case,
6606 fetching old headers only works if the back end you are using carries
6607 overview files---this would normally be @code{nntp}, @code{nnspool},
6608 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6609 the thread has been expired by the server, there's not much Gnus can do
6610 about that.
6611
6612 This variable can also be set to @code{invisible}.  This won't have any
6613 visible effects, but is useful if you use the @kbd{A T} command a lot
6614 (@pxref{Finding the Parent}).
6615
6616 @item gnus-fetch-old-ephemeral-headers
6617 @vindex gnus-fetch-old-ephemeral-headers
6618 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6619 newsgroups.
6620
6621 @item gnus-build-sparse-threads
6622 @vindex gnus-build-sparse-threads
6623 Fetching old headers can be slow.  A low-rent similar effect can be
6624 gotten by setting this variable to @code{some}.  Gnus will then look at
6625 the complete @code{References} headers of all articles and try to string
6626 together articles that belong in the same thread.  This will leave
6627 @dfn{gaps} in the threading display where gnus guesses that an article
6628 is missing from the thread.  (These gaps appear like normal summary
6629 lines.  If you select a gap, gnus will try to fetch the article in
6630 question.)  If this variable is @code{t}, gnus will display all these
6631 ``gaps'' without regard for whether they are useful for completing the
6632 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6633 off sparse leaf nodes that don't lead anywhere.  This variable is
6634 @code{nil} by default.
6635
6636 @item gnus-read-all-available-headers
6637 @vindex gnus-read-all-available-headers
6638 This is a rather obscure variable that few will find useful.  It's
6639 intended for those non-news newsgroups where the back end has to fetch
6640 quite a lot to present the summary buffer, and where it's impossible to
6641 go back to parents of articles.  This is mostly the case in the
6642 web-based groups, like the @code{nnultimate} groups.
6643
6644 If you don't use those, then it's safe to leave this as the default
6645 @code{nil}.  If you want to use this variable, it should be a regexp
6646 that matches the group name, or @code{t} for all groups.
6647
6648 @end table
6649
6650
6651 @node More Threading
6652 @subsubsection More Threading
6653
6654 @table @code
6655 @item gnus-show-threads
6656 @vindex gnus-show-threads
6657 If this variable is @code{nil}, no threading will be done, and all of
6658 the rest of the variables here will have no effect.  Turning threading
6659 off will speed group selection up a bit, but it is sure to make reading
6660 slower and more awkward.
6661
6662 @item gnus-thread-hide-subtree
6663 @vindex gnus-thread-hide-subtree
6664 If non-@code{nil}, all threads will be hidden when the summary buffer is
6665 generated.
6666
6667 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6668 Available predicates are @code{gnus-article-unread-p} and
6669 @code{gnus-article-unseen-p}.
6670
6671 Here's an example:
6672
6673 @lisp
6674 (setq gnus-thread-hide-subtree
6675       '(or gnus-article-unread-p
6676            gnus-article-unseen-p))
6677 @end lisp
6678
6679 (It's a pretty nonsensical example, since all unseen articles are also
6680 unread, but you get my drift.)
6681
6682
6683 @item gnus-thread-expunge-below
6684 @vindex gnus-thread-expunge-below
6685 All threads that have a total score (as defined by
6686 @code{gnus-thread-score-function}) less than this number will be
6687 expunged.  This variable is @code{nil} by default, which means that no
6688 threads are expunged.
6689
6690 @item gnus-thread-hide-killed
6691 @vindex gnus-thread-hide-killed
6692 if you kill a thread and this variable is non-@code{nil}, the subtree
6693 will be hidden.
6694
6695 @item gnus-thread-ignore-subject
6696 @vindex gnus-thread-ignore-subject
6697 Sometimes somebody changes the subject in the middle of a thread.  If
6698 this variable is non-@code{nil}, which is the default, the subject
6699 change is ignored.  If it is @code{nil}, a change in the subject will
6700 result in a new thread.
6701
6702 @item gnus-thread-indent-level
6703 @vindex gnus-thread-indent-level
6704 This is a number that says how much each sub-thread should be indented.
6705 The default is 4.
6706
6707 @item gnus-sort-gathered-threads-function
6708 @vindex gnus-sort-gathered-threads-function
6709 Sometimes, particularly with mailing lists, the order in which mails
6710 arrive locally is not necessarily the same as the order in which they
6711 arrived on the mailing list.  Consequently, when sorting sub-threads
6712 using the default @code{gnus-thread-sort-by-number}, responses can end
6713 up appearing before the article to which they are responding to.
6714 Setting this variable to an alternate value
6715 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6716 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6717 more logical sub-thread ordering in such instances.
6718
6719 @end table
6720
6721
6722 @node Low-Level Threading
6723 @subsubsection Low-Level Threading
6724
6725 @table @code
6726
6727 @item gnus-parse-headers-hook
6728 @vindex gnus-parse-headers-hook
6729 Hook run before parsing any headers.  The default value is
6730 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6731 @code{default-mime-charset} in summary buffer based on variable
6732 @code{gnus-newsgroup-default-charset-alist}.
6733
6734 @item gnus-alter-header-function
6735 @vindex gnus-alter-header-function
6736 If non-@code{nil}, this function will be called to allow alteration of
6737 article header structures.  The function is called with one parameter,
6738 the article header vector, which it may alter in any way.  For instance,
6739 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6740 in systematic ways (by adding prefixes and such), you can use this
6741 variable to un-scramble the @code{Message-ID}s so that they are more
6742 meaningful.  Here's one example:
6743
6744 @lisp
6745 (setq gnus-alter-header-function 'my-alter-message-id)
6746
6747 (defun my-alter-message-id (header)
6748   (let ((id (mail-header-id header)))
6749     (when (string-match
6750            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6751       (mail-header-set-id
6752        (concat (match-string 1 id) "@@" (match-string 2 id))
6753        header))))
6754 @end lisp
6755
6756 @end table
6757
6758
6759 @node Thread Commands
6760 @subsection Thread Commands
6761 @cindex thread commands
6762
6763 @table @kbd
6764
6765 @item T k
6766 @itemx C-M-k
6767 @kindex T k (Summary)
6768 @kindex C-M-k (Summary)
6769 @findex gnus-summary-kill-thread
6770 Mark all articles in the current (sub-)thread as read
6771 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6772 remove all marks instead.  If the prefix argument is negative, tick
6773 articles instead.
6774
6775 @item T l
6776 @itemx C-M-l
6777 @kindex T l (Summary)
6778 @kindex C-M-l (Summary)
6779 @findex gnus-summary-lower-thread
6780 Lower the score of the current (sub-)thread
6781 (@code{gnus-summary-lower-thread}).
6782
6783 @item T i
6784 @kindex T i (Summary)
6785 @findex gnus-summary-raise-thread
6786 Increase the score of the current (sub-)thread
6787 (@code{gnus-summary-raise-thread}).
6788
6789 @item T #
6790 @kindex T # (Summary)
6791 @findex gnus-uu-mark-thread
6792 Set the process mark on the current (sub-)thread
6793 (@code{gnus-uu-mark-thread}).
6794
6795 @item T M-#
6796 @kindex T M-# (Summary)
6797 @findex gnus-uu-unmark-thread
6798 Remove the process mark from the current (sub-)thread
6799 (@code{gnus-uu-unmark-thread}).
6800
6801 @item T T
6802 @kindex T T (Summary)
6803 @findex gnus-summary-toggle-threads
6804 Toggle threading (@code{gnus-summary-toggle-threads}).
6805
6806 @item T s
6807 @kindex T s (Summary)
6808 @findex gnus-summary-show-thread
6809 Expose the (sub-)thread hidden under the current article, if any@*
6810 (@code{gnus-summary-show-thread}).
6811
6812 @item T h
6813 @kindex T h (Summary)
6814 @findex gnus-summary-hide-thread
6815 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6816
6817 @item T S
6818 @kindex T S (Summary)
6819 @findex gnus-summary-show-all-threads
6820 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6821
6822 @item T H
6823 @kindex T H (Summary)
6824 @findex gnus-summary-hide-all-threads
6825 Hide all threads (@code{gnus-summary-hide-all-threads}).
6826
6827 @item T t
6828 @kindex T t (Summary)
6829 @findex gnus-summary-rethread-current
6830 Re-thread the current article's thread
6831 (@code{gnus-summary-rethread-current}).  This works even when the
6832 summary buffer is otherwise unthreaded.
6833
6834 @item T ^
6835 @kindex T ^ (Summary)
6836 @findex gnus-summary-reparent-thread
6837 Make the current article the child of the marked (or previous) article
6838 (@code{gnus-summary-reparent-thread}).
6839
6840 @end table
6841
6842 The following commands are thread movement commands.  They all
6843 understand the numeric prefix.
6844
6845 @table @kbd
6846
6847 @item T n
6848 @kindex T n (Summary)
6849 @itemx C-M-f
6850 @kindex C-M-n (Summary)
6851 @itemx M-down
6852 @kindex M-down (Summary)
6853 @findex gnus-summary-next-thread
6854 Go to the next thread (@code{gnus-summary-next-thread}).
6855
6856 @item T p
6857 @kindex T p (Summary)
6858 @itemx C-M-b
6859 @kindex C-M-p (Summary)
6860 @itemx M-up
6861 @kindex M-up (Summary)
6862 @findex gnus-summary-prev-thread
6863 Go to the previous thread (@code{gnus-summary-prev-thread}).
6864
6865 @item T d
6866 @kindex T d (Summary)
6867 @findex gnus-summary-down-thread
6868 Descend the thread (@code{gnus-summary-down-thread}).
6869
6870 @item T u
6871 @kindex T u (Summary)
6872 @findex gnus-summary-up-thread
6873 Ascend the thread (@code{gnus-summary-up-thread}).
6874
6875 @item T o
6876 @kindex T o (Summary)
6877 @findex gnus-summary-top-thread
6878 Go to the top of the thread (@code{gnus-summary-top-thread}).
6879 @end table
6880
6881 @vindex gnus-thread-operation-ignore-subject
6882 If you ignore subject while threading, you'll naturally end up with
6883 threads that have several different subjects in them.  If you then issue
6884 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6885 wish to kill the entire thread, but just those parts of the thread that
6886 have the same subject as the current article.  If you like this idea,
6887 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6888 is non-@code{nil} (which it is by default), subjects will be ignored
6889 when doing thread commands.  If this variable is @code{nil}, articles in
6890 the same thread with different subjects will not be included in the
6891 operation in question.  If this variable is @code{fuzzy}, only articles
6892 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6893 Matching}).
6894
6895
6896 @node Sorting the Summary Buffer
6897 @section Sorting the Summary Buffer
6898
6899 @findex gnus-thread-sort-by-total-score
6900 @findex gnus-thread-sort-by-date
6901 @findex gnus-thread-sort-by-score
6902 @findex gnus-thread-sort-by-subject
6903 @findex gnus-thread-sort-by-author
6904 @findex gnus-thread-sort-by-number
6905 @findex gnus-thread-sort-by-random
6906 @vindex gnus-thread-sort-functions
6907 @findex gnus-thread-sort-by-most-recent-thread
6908 If you are using a threaded summary display, you can sort the threads by
6909 setting @code{gnus-thread-sort-functions}, which can be either a single
6910 function, a list of functions, or a list containing functions and
6911 @code{(not some-function)} elements.
6912
6913 By default, sorting is done on article numbers.  Ready-made sorting
6914 predicate functions include @code{gnus-thread-sort-by-number},
6915 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6916 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6917 @code{gnus-thread-sort-by-most-recent-number},
6918 @code{gnus-thread-sort-by-most-recent-date},
6919 @code{gnus-thread-sort-by-random} and
6920 @code{gnus-thread-sort-by-total-score}.
6921
6922 Each function takes two threads and returns non-@code{nil} if the first
6923 thread should be sorted before the other.  Note that sorting really is
6924 normally done by looking only at the roots of each thread.
6925
6926 If you use more than one function, the primary sort key should be the
6927 last function in the list.  You should probably always include
6928 @code{gnus-thread-sort-by-number} in the list of sorting
6929 functions---preferably first.  This will ensure that threads that are
6930 equal with respect to the other sort criteria will be displayed in
6931 ascending article order.
6932
6933 If you would like to sort by reverse score, then by subject, and finally
6934 by number, you could do something like:
6935
6936 @lisp
6937 (setq gnus-thread-sort-functions
6938       '(gnus-thread-sort-by-number
6939         gnus-thread-sort-by-subject
6940         (not gnus-thread-sort-by-total-score)))
6941 @end lisp
6942
6943 The threads that have highest score will be displayed first in the
6944 summary buffer.  When threads have the same score, they will be sorted
6945 alphabetically.  The threads that have the same score and the same
6946 subject will be sorted by number, which is (normally) the sequence in
6947 which the articles arrived.
6948
6949 If you want to sort by score and then reverse arrival order, you could
6950 say something like:
6951
6952 @lisp
6953 (setq gnus-thread-sort-functions
6954       '((lambda (t1 t2)
6955           (not (gnus-thread-sort-by-number t1 t2)))
6956         gnus-thread-sort-by-score))
6957 @end lisp
6958
6959 @vindex gnus-thread-score-function
6960 The function in the @code{gnus-thread-score-function} variable (default
6961 @code{+}) is used for calculating the total score of a thread.  Useful
6962 functions might be @code{max}, @code{min}, or squared means, or whatever
6963 tickles your fancy.
6964
6965 @findex gnus-article-sort-functions
6966 @findex gnus-article-sort-by-date
6967 @findex gnus-article-sort-by-score
6968 @findex gnus-article-sort-by-subject
6969 @findex gnus-article-sort-by-author
6970 @findex gnus-article-sort-by-random
6971 @findex gnus-article-sort-by-number
6972 If you are using an unthreaded display for some strange reason or
6973 other, you have to fiddle with the @code{gnus-article-sort-functions}
6974 variable.  It is very similar to the
6975 @code{gnus-thread-sort-functions}, except that it uses slightly
6976 different functions for article comparison.  Available sorting
6977 predicate functions are @code{gnus-article-sort-by-number},
6978 @code{gnus-article-sort-by-author},
6979 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6980 @code{gnus-article-sort-by-random}, and
6981 @code{gnus-article-sort-by-score}.
6982
6983 If you want to sort an unthreaded summary display by subject, you could
6984 say something like:
6985
6986 @lisp
6987 (setq gnus-article-sort-functions
6988       '(gnus-article-sort-by-number
6989         gnus-article-sort-by-subject))
6990 @end lisp
6991
6992
6993
6994 @node Asynchronous Fetching
6995 @section Asynchronous Article Fetching
6996 @cindex asynchronous article fetching
6997 @cindex article pre-fetch
6998 @cindex pre-fetch
6999
7000 If you read your news from an @acronym{NNTP} server that's far away, the
7001 network latencies may make reading articles a chore.  You have to wait
7002 for a while after pressing @kbd{n} to go to the next article before the
7003 article appears.  Why can't gnus just go ahead and fetch the article
7004 while you are reading the previous one?  Why not, indeed.
7005
7006 First, some caveats.  There are some pitfalls to using asynchronous
7007 article fetching, especially the way gnus does it.
7008
7009 Let's say you are reading article 1, which is short, and article 2 is
7010 quite long, and you are not interested in reading that.  Gnus does not
7011 know this, so it goes ahead and fetches article 2.  You decide to read
7012 article 3, but since gnus is in the process of fetching article 2, the
7013 connection is blocked.
7014
7015 To avoid these situations, gnus will open two (count 'em two)
7016 connections to the server.  Some people may think this isn't a very nice
7017 thing to do, but I don't see any real alternatives.  Setting up that
7018 extra connection takes some time, so gnus startup will be slower.
7019
7020 Gnus will fetch more articles than you will read.  This will mean that
7021 the link between your machine and the @acronym{NNTP} server will become more
7022 loaded than if you didn't use article pre-fetch.  The server itself will
7023 also become more loaded---both with the extra article requests, and the
7024 extra connection.
7025
7026 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7027 you really want to.
7028
7029 @vindex gnus-asynchronous
7030 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7031 happen automatically.
7032
7033 @vindex gnus-use-article-prefetch
7034 You can control how many articles are to be pre-fetched by setting
7035 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7036 that when you read an article in the group, the back end will pre-fetch
7037 the next 30 articles.  If this variable is @code{t}, the back end will
7038 pre-fetch all the articles it can without bound.  If it is
7039 @code{nil}, no pre-fetching will be done.
7040
7041 @vindex gnus-async-prefetch-article-p
7042 @findex gnus-async-read-p
7043 There are probably some articles that you don't want to pre-fetch---read
7044 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7045 variable controls whether an article is to be pre-fetched.  This
7046 function should return non-@code{nil} when the article in question is
7047 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7048 returns @code{nil} on read articles.  The function is called with an
7049 article data structure as the only parameter.
7050
7051 If, for instance, you wish to pre-fetch only unread articles shorter
7052 than 100 lines, you could say something like:
7053
7054 @lisp
7055 (defun my-async-short-unread-p (data)
7056   "Return non-nil for short, unread articles."
7057   (and (gnus-data-unread-p data)
7058        (< (mail-header-lines (gnus-data-header data))
7059           100)))
7060
7061 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7062 @end lisp
7063
7064 These functions will be called many, many times, so they should
7065 preferably be short and sweet to avoid slowing down gnus too much.
7066 It's probably a good idea to byte-compile things like this.
7067
7068 @vindex gnus-prefetched-article-deletion-strategy
7069 Articles have to be removed from the asynch buffer sooner or later.  The
7070 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7071 articles.  This is a list that may contain the following elements:
7072
7073 @table @code
7074 @item read
7075 Remove articles when they are read.
7076
7077 @item exit
7078 Remove articles when exiting the group.
7079 @end table
7080
7081 The default value is @code{(read exit)}.
7082
7083 @c @vindex gnus-use-header-prefetch
7084 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7085 @c from the next group.
7086
7087
7088 @node Article Caching
7089 @section Article Caching
7090 @cindex article caching
7091 @cindex caching
7092
7093 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7094 consider turning article caching on.  Each article will then be stored
7095 locally under your home directory.  As you may surmise, this could
7096 potentially use @emph{huge} amounts of disk space, as well as eat up all
7097 your inodes so fast it will make your head swim.  In vodka.
7098
7099 Used carefully, though, it could be just an easier way to save articles.
7100
7101 @vindex gnus-use-long-file-name
7102 @vindex gnus-cache-directory
7103 @vindex gnus-use-cache
7104 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7105 all articles ticked or marked as dormant will then be copied
7106 over to your local cache (@code{gnus-cache-directory}).  Whether this
7107 cache is flat or hierarchical is controlled by the
7108 @code{gnus-use-long-file-name} variable, as usual.
7109
7110 When re-selecting a ticked or dormant article, it will be fetched from the
7111 cache instead of from the server.  As articles in your cache will never
7112 expire, this might serve as a method of saving articles while still
7113 keeping them where they belong.  Just mark all articles you want to save
7114 as dormant, and don't worry.
7115
7116 When an article is marked as read, is it removed from the cache.
7117
7118 @vindex gnus-cache-remove-articles
7119 @vindex gnus-cache-enter-articles
7120 The entering/removal of articles from the cache is controlled by the
7121 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7122 variables.  Both are lists of symbols.  The first is @code{(ticked
7123 dormant)} by default, meaning that ticked and dormant articles will be
7124 put in the cache.  The latter is @code{(read)} by default, meaning that
7125 articles marked as read are removed from the cache.  Possibly
7126 symbols in these two lists are @code{ticked}, @code{dormant},
7127 @code{unread} and @code{read}.
7128
7129 @findex gnus-jog-cache
7130 So where does the massive article-fetching and storing come into the
7131 picture?  The @code{gnus-jog-cache} command will go through all
7132 subscribed newsgroups, request all unread articles, score them, and
7133 store them in the cache.  You should only ever, ever ever ever, use this
7134 command if 1) your connection to the @acronym{NNTP} server is really, really,
7135 really slow and 2) you have a really, really, really huge disk.
7136 Seriously.  One way to cut down on the number of articles downloaded is
7137 to score unwanted articles down and have them marked as read.  They will
7138 not then be downloaded by this command.
7139
7140 @vindex gnus-uncacheable-groups
7141 @vindex gnus-cacheable-groups
7142 It is likely that you do not want caching on all groups.  For instance,
7143 if your @code{nnml} mail is located under your home directory, it makes no
7144 sense to cache it somewhere else under your home directory.  Unless you
7145 feel that it's neat to use twice as much space.
7146
7147 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7148 regexp of groups to cache, @samp{^nntp} for instance, or set the
7149 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7150 Both variables are @code{nil} by default.  If a group matches both
7151 variables, the group is not cached.
7152
7153 @findex gnus-cache-generate-nov-databases
7154 @findex gnus-cache-generate-active
7155 @vindex gnus-cache-active-file
7156 The cache stores information on what articles it contains in its active
7157 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7158 of the cache) becomes all messed up for some reason or other, gnus
7159 offers two functions that will try to set things right.  @kbd{M-x
7160 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7161 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7162 file.
7163
7164 @findex gnus-cache-move-cache
7165 @code{gnus-cache-move-cache} will move your whole
7166 @code{gnus-cache-directory} to some other location.  You get asked to
7167 where, isn't that cool?
7168
7169 @node Persistent Articles
7170 @section Persistent Articles
7171 @cindex persistent articles
7172
7173 Closely related to article caching, we have @dfn{persistent articles}.
7174 In fact, it's just a different way of looking at caching, and much more
7175 useful in my opinion.
7176
7177 Say you're reading a newsgroup, and you happen on to some valuable gem
7178 that you want to keep and treasure forever.  You'd normally just save it
7179 (using one of the many saving commands) in some file.  The problem with
7180 that is that it's just, well, yucky.  Ideally you'd prefer just having
7181 the article remain in the group where you found it forever; untouched by
7182 the expiry going on at the news server.
7183
7184 This is what a @dfn{persistent article} is---an article that just won't
7185 be deleted.  It's implemented using the normal cache functions, but
7186 you use two explicit commands for managing persistent articles:
7187
7188 @table @kbd
7189
7190 @item *
7191 @kindex * (Summary)
7192 @findex gnus-cache-enter-article
7193 Make the current article persistent (@code{gnus-cache-enter-article}).
7194
7195 @item M-*
7196 @kindex M-* (Summary)
7197 @findex gnus-cache-remove-article
7198 Remove the current article from the persistent articles
7199 (@code{gnus-cache-remove-article}).  This will normally delete the
7200 article.
7201 @end table
7202
7203 Both these commands understand the process/prefix convention.
7204
7205 To avoid having all ticked articles (and stuff) entered into the cache,
7206 you should set @code{gnus-use-cache} to @code{passive} if you're just
7207 interested in persistent articles:
7208
7209 @lisp
7210 (setq gnus-use-cache 'passive)
7211 @end lisp
7212
7213
7214 @node Article Backlog
7215 @section Article Backlog
7216 @cindex backlog
7217 @cindex article backlog
7218
7219 If you have a slow connection, but the idea of using caching seems
7220 unappealing to you (and it is, really), you can help the situation some
7221 by switching on the @dfn{backlog}.  This is where gnus will buffer
7222 already read articles so that it doesn't have to re-fetch articles
7223 you've already read.  This only helps if you are in the habit of
7224 re-selecting articles you've recently read, of course.  If you never do
7225 that, turning the backlog on will slow gnus down a little bit, and
7226 increase memory usage some.
7227
7228 @vindex gnus-keep-backlog
7229 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7230 at most @var{n} old articles in a buffer for later re-fetching.  If this
7231 variable is non-@code{nil} and is not a number, gnus will store
7232 @emph{all} read articles, which means that your Emacs will grow without
7233 bound before exploding and taking your machine down with you.  I put
7234 that in there just to keep y'all on your toes.
7235
7236 The default value is 20.
7237
7238
7239 @node Saving Articles
7240 @section Saving Articles
7241 @cindex saving articles
7242
7243 Gnus can save articles in a number of ways.  Below is the documentation
7244 for saving articles in a fairly straight-forward fashion (i.e., little
7245 processing of the article is done before it is saved).  For a different
7246 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7247 (@pxref{Decoding Articles}).
7248
7249 For the commands listed here, the target is a file.  If you want to
7250 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7251 command (@pxref{Mail Group Commands}).
7252
7253 @vindex gnus-save-all-headers
7254 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7255 unwanted headers before saving the article.
7256
7257 @vindex gnus-saved-headers
7258 If the preceding variable is @code{nil}, all headers that match the
7259 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7260 deleted before saving.
7261
7262 @table @kbd
7263
7264 @item O o
7265 @itemx o
7266 @kindex O o (Summary)
7267 @kindex o (Summary)
7268 @findex gnus-summary-save-article
7269 @c @icon{gnus-summary-save-article}
7270 Save the current article using the default article saver
7271 (@code{gnus-summary-save-article}).
7272
7273 @item O m
7274 @kindex O m (Summary)
7275 @findex gnus-summary-save-article-mail
7276 Save the current article in mail format
7277 (@code{gnus-summary-save-article-mail}).
7278
7279 @item O r
7280 @kindex O r (Summary)
7281 @findex gnus-summary-save-article-rmail
7282 Save the current article in Rmail format
7283 (@code{gnus-summary-save-article-rmail}).
7284
7285 @item O f
7286 @kindex O f (Summary)
7287 @findex gnus-summary-save-article-file
7288 @c @icon{gnus-summary-save-article-file}
7289 Save the current article in plain file format
7290 (@code{gnus-summary-save-article-file}).
7291
7292 @item O F
7293 @kindex O F (Summary)
7294 @findex gnus-summary-write-article-file
7295 Write the current article in plain file format, overwriting any previous
7296 file contents (@code{gnus-summary-write-article-file}).
7297
7298 @item O b
7299 @kindex O b (Summary)
7300 @findex gnus-summary-save-article-body-file
7301 Save the current article body in plain file format
7302 (@code{gnus-summary-save-article-body-file}).
7303
7304 @item O h
7305 @kindex O h (Summary)
7306 @findex gnus-summary-save-article-folder
7307 Save the current article in mh folder format
7308 (@code{gnus-summary-save-article-folder}).
7309
7310 @item O v
7311 @kindex O v (Summary)
7312 @findex gnus-summary-save-article-vm
7313 Save the current article in a VM folder
7314 (@code{gnus-summary-save-article-vm}).
7315
7316 @item O p
7317 @itemx |
7318 @kindex O p (Summary)
7319 @kindex | (Summary)
7320 @findex gnus-summary-pipe-output
7321 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7322 the current article to a process (@code{gnus-summary-pipe-output}).
7323 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7324 complete headers in the piped output.
7325
7326 @item O P
7327 @kindex O P (Summary)
7328 @findex gnus-summary-muttprint
7329 @vindex gnus-summary-muttprint-program
7330 Save the current article into muttprint.  That is, print it using the
7331 external program @uref{http://muttprint.sourceforge.net/,
7332 Muttprint}.  The program name and options to use is controlled by the
7333 variable @code{gnus-summary-muttprint-program}.
7334 (@code{gnus-summary-muttprint}).
7335
7336 @end table
7337
7338 @vindex gnus-prompt-before-saving
7339 All these commands use the process/prefix convention
7340 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7341 functions, you might get tired of being prompted for files to save each
7342 and every article in.  The prompting action is controlled by
7343 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7344 default, giving you that excessive prompting action you know and
7345 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7346 just once for each series of articles you save.  If you like to really
7347 have Gnus do all your thinking for you, you can even set this variable
7348 to @code{nil}, which means that you will never be prompted for files to
7349 save articles in.  Gnus will simply save all the articles in the default
7350 files.
7351
7352
7353 @vindex gnus-default-article-saver
7354 You can customize the @code{gnus-default-article-saver} variable to make
7355 gnus do what you want it to.  You can use any of the six ready-made
7356 functions below, or you can create your own.
7357
7358 @table @code
7359
7360 @item gnus-summary-save-in-rmail
7361 @findex gnus-summary-save-in-rmail
7362 @vindex gnus-rmail-save-name
7363 @findex gnus-plain-save-name
7364 This is the default format, @dfn{Babyl}.  Uses the function in the
7365 @code{gnus-rmail-save-name} variable to get a file name to save the
7366 article in.  The default is @code{gnus-plain-save-name}.
7367
7368 @item gnus-summary-save-in-mail
7369 @findex gnus-summary-save-in-mail
7370 @vindex gnus-mail-save-name
7371 Save in a Unix mail (mbox) file.  Uses the function in the
7372 @code{gnus-mail-save-name} variable to get a file name to save the
7373 article in.  The default is @code{gnus-plain-save-name}.
7374
7375 @item gnus-summary-save-in-file
7376 @findex gnus-summary-save-in-file
7377 @vindex gnus-file-save-name
7378 @findex gnus-numeric-save-name
7379 Append the article straight to an ordinary file.  Uses the function in
7380 the @code{gnus-file-save-name} variable to get a file name to save the
7381 article in.  The default is @code{gnus-numeric-save-name}.
7382
7383 @item gnus-summary-write-to-file
7384 @findex gnus-summary-write-to-file
7385 Write the article straight to an ordinary file.  The file is
7386 overwritten if it exists.  Uses the function in the
7387 @code{gnus-file-save-name} variable to get a file name to save the
7388 article in.  The default is @code{gnus-numeric-save-name}.
7389
7390 @item gnus-summary-save-body-in-file
7391 @findex gnus-summary-save-body-in-file
7392 Append the article body to an ordinary file.  Uses the function in the
7393 @code{gnus-file-save-name} variable to get a file name to save the
7394 article in.  The default is @code{gnus-numeric-save-name}.
7395
7396 @item gnus-summary-save-in-folder
7397 @findex gnus-summary-save-in-folder
7398 @findex gnus-folder-save-name
7399 @findex gnus-Folder-save-name
7400 @vindex gnus-folder-save-name
7401 @cindex rcvstore
7402 @cindex MH folders
7403 Save the article to an MH folder using @code{rcvstore} from the MH
7404 library.  Uses the function in the @code{gnus-folder-save-name} variable
7405 to get a file name to save the article in.  The default is
7406 @code{gnus-folder-save-name}, but you can also use
7407 @code{gnus-Folder-save-name}, which creates capitalized names.
7408
7409 @item gnus-summary-save-in-vm
7410 @findex gnus-summary-save-in-vm
7411 Save the article in a VM folder.  You have to have the VM mail
7412 reader to use this setting.
7413 @end table
7414
7415 @vindex gnus-article-save-directory
7416 All of these functions, except for the last one, will save the article
7417 in the @code{gnus-article-save-directory}, which is initialized from the
7418 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7419 default.
7420
7421 As you can see above, the functions use different functions to find a
7422 suitable name of a file to save the article in.  Below is a list of
7423 available functions that generate names:
7424
7425 @table @code
7426
7427 @item gnus-Numeric-save-name
7428 @findex gnus-Numeric-save-name
7429 File names like @file{~/News/Alt.andrea-dworkin/45}.
7430
7431 @item gnus-numeric-save-name
7432 @findex gnus-numeric-save-name
7433 File names like @file{~/News/alt.andrea-dworkin/45}.
7434
7435 @item gnus-Plain-save-name
7436 @findex gnus-Plain-save-name
7437 File names like @file{~/News/Alt.andrea-dworkin}.
7438
7439 @item gnus-plain-save-name
7440 @findex gnus-plain-save-name
7441 File names like @file{~/News/alt.andrea-dworkin}.
7442
7443 @item gnus-sender-save-name
7444 @findex gnus-sender-save-name
7445 File names like @file{~/News/larsi}.
7446 @end table
7447
7448 @vindex gnus-split-methods
7449 You can have gnus suggest where to save articles by plonking a regexp into
7450 the @code{gnus-split-methods} alist.  For instance, if you would like to
7451 save articles related to gnus in the file @file{gnus-stuff}, and articles
7452 related to VM in @file{vm-stuff}, you could set this variable to something
7453 like:
7454
7455 @lisp
7456 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7457  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7458  (my-choosing-function "../other-dir/my-stuff")
7459  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7460 @end lisp
7461
7462 We see that this is a list where each element is a list that has two
7463 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7464 a string (in which case it is used as a regexp to match on the article
7465 head); it can be a symbol (which will be called as a function with the
7466 group name as a parameter); or it can be a list (which will be
7467 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7468 the @dfn{file} will be used as a default prompt.  In addition, the
7469 result of the operation itself will be used if the function or form
7470 called returns a string or a list of strings.
7471
7472 You basically end up with a list of file names that might be used when
7473 saving the current article.  (All ``matches'' will be used.)  You will
7474 then be prompted for what you really want to use as a name, with file
7475 name completion over the results from applying this variable.
7476
7477 This variable is @code{((gnus-article-archive-name))} by default, which
7478 means that gnus will look at the articles it saves for an
7479 @code{Archive-name} line and use that as a suggestion for the file
7480 name.
7481
7482 Here's an example function to clean up file names somewhat.  If you have
7483 lots of mail groups called things like
7484 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7485 these group names before creating the file name to save to.  The
7486 following will do just that:
7487
7488 @lisp
7489 (defun my-save-name (group)
7490   (when (string-match "^nnml:mail." group)
7491     (substring group (match-end 0))))
7492
7493 (setq gnus-split-methods
7494       '((gnus-article-archive-name)
7495         (my-save-name)))
7496 @end lisp
7497
7498
7499 @vindex gnus-use-long-file-name
7500 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7501 @code{nil}, all the preceding functions will replace all periods
7502 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7503 the functions will generate hierarchies of directories instead of having
7504 all the files in the top level directory
7505 (@file{~/News/alt/andrea-dworkin} instead of
7506 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7507 on most systems.  However, for historical reasons, this is @code{nil} on
7508 Xenix and usg-unix-v machines by default.
7509
7510 This function also affects kill and score file names.  If this variable
7511 is a list, and the list contains the element @code{not-score}, long file
7512 names will not be used for score files, if it contains the element
7513 @code{not-save}, long file names will not be used for saving, and if it
7514 contains the element @code{not-kill}, long file names will not be used
7515 for kill files.
7516
7517 If you'd like to save articles in a hierarchy that looks something like
7518 a spool, you could
7519
7520 @lisp
7521 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7522 (setq gnus-default-article-saver
7523       'gnus-summary-save-in-file)          ; @r{no encoding}
7524 @end lisp
7525
7526 Then just save with @kbd{o}.  You'd then read this hierarchy with
7527 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7528 the top level directory as the argument (@file{~/News/}).  Then just walk
7529 around to the groups/directories with @code{nneething}.
7530
7531
7532 @node Decoding Articles
7533 @section Decoding Articles
7534 @cindex decoding articles
7535
7536 Sometime users post articles (or series of articles) that have been
7537 encoded in some way or other.  Gnus can decode them for you.
7538
7539 @menu
7540 * Uuencoded Articles::          Uudecode articles.
7541 * Shell Archives::              Unshar articles.
7542 * PostScript Files::            Split PostScript.
7543 * Other Files::                 Plain save and binhex.
7544 * Decoding Variables::          Variables for a happy decoding.
7545 * Viewing Files::               You want to look at the result of the decoding?
7546 @end menu
7547
7548 @cindex series
7549 @cindex article series
7550 All these functions use the process/prefix convention
7551 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7552 the extension that a ``single article'' means ``a single series''.  Gnus
7553 can find out by itself what articles belong to a series, decode all the
7554 articles and unpack/view/save the resulting file(s).
7555
7556 Gnus guesses what articles are in the series according to the following
7557 simplish rule: The subjects must be (nearly) identical, except for the
7558 last two numbers of the line.  (Spaces are largely ignored, however.)
7559
7560 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7561 will find all the articles that match the regexp @samp{^cat.gif
7562 ([0-9]+/[0-9]+).*$}.
7563
7564 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7565 series}, will not be properly recognized by any of the automatic viewing
7566 commands, and you have to mark the articles manually with @kbd{#}.
7567
7568
7569 @node Uuencoded Articles
7570 @subsection Uuencoded Articles
7571 @cindex uudecode
7572 @cindex uuencoded articles
7573
7574 @table @kbd
7575
7576 @item X u
7577 @kindex X u (Summary)
7578 @findex gnus-uu-decode-uu
7579 @c @icon{gnus-uu-decode-uu}
7580 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7581
7582 @item X U
7583 @kindex X U (Summary)
7584 @findex gnus-uu-decode-uu-and-save
7585 Uudecodes and saves the current series
7586 (@code{gnus-uu-decode-uu-and-save}).
7587
7588 @item X v u
7589 @kindex X v u (Summary)
7590 @findex gnus-uu-decode-uu-view
7591 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7592
7593 @item X v U
7594 @kindex X v U (Summary)
7595 @findex gnus-uu-decode-uu-and-save-view
7596 Uudecodes, views and saves the current series
7597 (@code{gnus-uu-decode-uu-and-save-view}).
7598
7599 @end table
7600
7601 Remember that these all react to the presence of articles marked with
7602 the process mark.  If, for instance, you'd like to decode and save an
7603 entire newsgroup, you'd typically do @kbd{M P a}
7604 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7605 (@code{gnus-uu-decode-uu-and-save}).
7606
7607 All this is very much different from how @code{gnus-uu} worked with
7608 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7609 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7610 articles in some way (@pxref{Setting Process Marks}) and then press
7611 @kbd{X u}.
7612
7613 @vindex gnus-uu-notify-files
7614 Note: When trying to decode articles that have names matching
7615 @code{gnus-uu-notify-files}, which is hard-coded to
7616 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7617 automatically post an article on @samp{comp.unix.wizards} saying that
7618 you have just viewed the file in question.  This feature can't be turned
7619 off.
7620
7621
7622 @node Shell Archives
7623 @subsection Shell Archives
7624 @cindex unshar
7625 @cindex shell archives
7626 @cindex shared articles
7627
7628 Shell archives (``shar files'') used to be a popular way to distribute
7629 sources, but it isn't used all that much today.  In any case, we have
7630 some commands to deal with these:
7631
7632 @table @kbd
7633
7634 @item X s
7635 @kindex X s (Summary)
7636 @findex gnus-uu-decode-unshar
7637 Unshars the current series (@code{gnus-uu-decode-unshar}).
7638
7639 @item X S
7640 @kindex X S (Summary)
7641 @findex gnus-uu-decode-unshar-and-save
7642 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7643
7644 @item X v s
7645 @kindex X v s (Summary)
7646 @findex gnus-uu-decode-unshar-view
7647 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7648
7649 @item X v S
7650 @kindex X v S (Summary)
7651 @findex gnus-uu-decode-unshar-and-save-view
7652 Unshars, views and saves the current series
7653 (@code{gnus-uu-decode-unshar-and-save-view}).
7654 @end table
7655
7656
7657 @node PostScript Files
7658 @subsection PostScript Files
7659 @cindex PostScript
7660
7661 @table @kbd
7662
7663 @item X p
7664 @kindex X p (Summary)
7665 @findex gnus-uu-decode-postscript
7666 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7667
7668 @item X P
7669 @kindex X P (Summary)
7670 @findex gnus-uu-decode-postscript-and-save
7671 Unpack and save the current PostScript series
7672 (@code{gnus-uu-decode-postscript-and-save}).
7673
7674 @item X v p
7675 @kindex X v p (Summary)
7676 @findex gnus-uu-decode-postscript-view
7677 View the current PostScript series
7678 (@code{gnus-uu-decode-postscript-view}).
7679
7680 @item X v P
7681 @kindex X v P (Summary)
7682 @findex gnus-uu-decode-postscript-and-save-view
7683 View and save the current PostScript series
7684 (@code{gnus-uu-decode-postscript-and-save-view}).
7685 @end table
7686
7687
7688 @node Other Files
7689 @subsection Other Files
7690
7691 @table @kbd
7692 @item X o
7693 @kindex X o (Summary)
7694 @findex gnus-uu-decode-save
7695 Save the current series
7696 (@code{gnus-uu-decode-save}).
7697
7698 @item X b
7699 @kindex X b (Summary)
7700 @findex gnus-uu-decode-binhex
7701 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7702 doesn't really work yet.
7703 @end table
7704
7705
7706 @node Decoding Variables
7707 @subsection Decoding Variables
7708
7709 Adjective, not verb.
7710
7711 @menu
7712 * Rule Variables::              Variables that say how a file is to be viewed.
7713 * Other Decode Variables::      Other decode variables.
7714 * Uuencoding and Posting::      Variables for customizing uuencoding.
7715 @end menu
7716
7717
7718 @node Rule Variables
7719 @subsubsection Rule Variables
7720 @cindex rule variables
7721
7722 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7723 variables are of the form
7724
7725 @lisp
7726       (list '(regexp1 command2)
7727             '(regexp2 command2)
7728             ...)
7729 @end lisp
7730
7731 @table @code
7732
7733 @item gnus-uu-user-view-rules
7734 @vindex gnus-uu-user-view-rules
7735 @cindex sox
7736 This variable is consulted first when viewing files.  If you wish to use,
7737 for instance, @code{sox} to convert an @file{.au} sound file, you could
7738 say something like:
7739 @lisp
7740 (setq gnus-uu-user-view-rules
7741       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7742 @end lisp
7743
7744 @item gnus-uu-user-view-rules-end
7745 @vindex gnus-uu-user-view-rules-end
7746 This variable is consulted if gnus couldn't make any matches from the
7747 user and default view rules.
7748
7749 @item gnus-uu-user-archive-rules
7750 @vindex gnus-uu-user-archive-rules
7751 This variable can be used to say what commands should be used to unpack
7752 archives.
7753 @end table
7754
7755
7756 @node Other Decode Variables
7757 @subsubsection Other Decode Variables
7758
7759 @table @code
7760 @vindex gnus-uu-grabbed-file-functions
7761
7762 @item gnus-uu-grabbed-file-functions
7763 All functions in this list will be called right after each file has been
7764 successfully decoded---so that you can move or view files right away,
7765 and don't have to wait for all files to be decoded before you can do
7766 anything.  Ready-made functions you can put in this list are:
7767
7768 @table @code
7769
7770 @item gnus-uu-grab-view
7771 @findex gnus-uu-grab-view
7772 View the file.
7773
7774 @item gnus-uu-grab-move
7775 @findex gnus-uu-grab-move
7776 Move the file (if you're using a saving function.)
7777 @end table
7778
7779 @item gnus-uu-be-dangerous
7780 @vindex gnus-uu-be-dangerous
7781 Specifies what to do if unusual situations arise during decoding.  If
7782 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7783 that didn't work, and overwrite existing files.  Otherwise, ask each
7784 time.
7785
7786 @item gnus-uu-ignore-files-by-name
7787 @vindex gnus-uu-ignore-files-by-name
7788 Files with name matching this regular expression won't be viewed.
7789
7790 @item gnus-uu-ignore-files-by-type
7791 @vindex gnus-uu-ignore-files-by-type
7792 Files with a @acronym{MIME} type matching this variable won't be viewed.
7793 Note that Gnus tries to guess what type the file is based on the name.
7794 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7795 kludgey.
7796
7797 @item gnus-uu-tmp-dir
7798 @vindex gnus-uu-tmp-dir
7799 Where @code{gnus-uu} does its work.
7800
7801 @item gnus-uu-do-not-unpack-archives
7802 @vindex gnus-uu-do-not-unpack-archives
7803 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7804 looking for files to display.
7805
7806 @item gnus-uu-view-and-save
7807 @vindex gnus-uu-view-and-save
7808 Non-@code{nil} means that the user will always be asked to save a file
7809 after viewing it.
7810
7811 @item gnus-uu-ignore-default-view-rules
7812 @vindex gnus-uu-ignore-default-view-rules
7813 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7814 rules.
7815
7816 @item gnus-uu-ignore-default-archive-rules
7817 @vindex gnus-uu-ignore-default-archive-rules
7818 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7819 unpacking commands.
7820
7821 @item gnus-uu-kill-carriage-return
7822 @vindex gnus-uu-kill-carriage-return
7823 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7824 from articles.
7825
7826 @item gnus-uu-unmark-articles-not-decoded
7827 @vindex gnus-uu-unmark-articles-not-decoded
7828 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7829 decoded articles as unread.
7830
7831 @item gnus-uu-correct-stripped-uucode
7832 @vindex gnus-uu-correct-stripped-uucode
7833 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7834 uuencoded files that have had trailing spaces deleted.
7835
7836 @item gnus-uu-pre-uudecode-hook
7837 @vindex gnus-uu-pre-uudecode-hook
7838 Hook run before sending a message to @code{uudecode}.
7839
7840 @item gnus-uu-view-with-metamail
7841 @vindex gnus-uu-view-with-metamail
7842 @cindex metamail
7843 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7844 commands defined by the rule variables and just fudge a @acronym{MIME}
7845 content type based on the file name.  The result will be fed to
7846 @code{metamail} for viewing.
7847
7848 @item gnus-uu-save-in-digest
7849 @vindex gnus-uu-save-in-digest
7850 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7851 decoding, will save in digests.  If this variable is @code{nil},
7852 @code{gnus-uu} will just save everything in a file without any
7853 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7854 to specify any meaningful volume and issue numbers were found, so I
7855 simply dropped them.
7856
7857 @end table
7858
7859
7860 @node Uuencoding and Posting
7861 @subsubsection Uuencoding and Posting
7862
7863 @table @code
7864
7865 @item gnus-uu-post-include-before-composing
7866 @vindex gnus-uu-post-include-before-composing
7867 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7868 before you compose the article.  If this variable is @code{t}, you can
7869 either include an encoded file with @kbd{C-c C-i} or have one included
7870 for you when you post the article.
7871
7872 @item gnus-uu-post-length
7873 @vindex gnus-uu-post-length
7874 Maximum length of an article.  The encoded file will be split into how
7875 many articles it takes to post the entire file.
7876
7877 @item gnus-uu-post-threaded
7878 @vindex gnus-uu-post-threaded
7879 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7880 thread.  This may not be smart, as no other decoder I have seen is able
7881 to follow threads when collecting uuencoded articles.  (Well, I have
7882 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7883 think that counts@dots{}) Default is @code{nil}.
7884
7885 @item gnus-uu-post-separate-description
7886 @vindex gnus-uu-post-separate-description
7887 Non-@code{nil} means that the description will be posted in a separate
7888 article.  The first article will typically be numbered (0/x).  If this
7889 variable is @code{nil}, the description the user enters will be included
7890 at the beginning of the first article, which will be numbered (1/x).
7891 Default is @code{t}.
7892
7893 @end table
7894
7895
7896 @node Viewing Files
7897 @subsection Viewing Files
7898 @cindex viewing files
7899 @cindex pseudo-articles
7900
7901 After decoding, if the file is some sort of archive, gnus will attempt
7902 to unpack the archive and see if any of the files in the archive can be
7903 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7904 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7905 uncompress and de-tar the main file, and then view the two pictures.
7906 This unpacking process is recursive, so if the archive contains archives
7907 of archives, it'll all be unpacked.
7908
7909 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7910 extracted file into the summary buffer.  If you go to these
7911 ``articles'', you will be prompted for a command to run (usually Gnus
7912 will make a suggestion), and then the command will be run.
7913
7914 @vindex gnus-view-pseudo-asynchronously
7915 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7916 until the viewing is done before proceeding.
7917
7918 @vindex gnus-view-pseudos
7919 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7920 the pseudo-articles into the summary buffer, but view them
7921 immediately.  If this variable is @code{not-confirm}, the user won't even
7922 be asked for a confirmation before viewing is done.
7923
7924 @vindex gnus-view-pseudos-separately
7925 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7926 pseudo-article will be created for each file to be viewed.  If
7927 @code{nil}, all files that use the same viewing command will be given as
7928 a list of parameters to that command.
7929
7930 @vindex gnus-insert-pseudo-articles
7931 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7932 pseudo-articles when decoding.  It is @code{t} by default.
7933
7934 So; there you are, reading your @emph{pseudo-articles} in your
7935 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7936 Why isn't anything real anymore? How did we get here?
7937
7938
7939 @node Article Treatment
7940 @section Article Treatment
7941
7942 Reading through this huge manual, you may have quite forgotten that the
7943 object of newsreaders is to actually, like, read what people have
7944 written.  Reading articles.  Unfortunately, people are quite bad at
7945 writing, so there are tons of functions and variables to make reading
7946 these articles easier.
7947
7948 @menu
7949 * Article Highlighting::        You want to make the article look like fruit salad.
7950 * Article Fontisizing::         Making emphasized text look nice.
7951 * Article Hiding::              You also want to make certain info go away.
7952 * Article Washing::             Lots of way-neat functions to make life better.
7953 * Article Header::              Doing various header transformations.
7954 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7955 * Article Button Levels::       Controlling appearance of buttons.
7956 * Article Date::                Grumble, UT!
7957 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7958 * Article Signature::           What is a signature?
7959 * Article Miscellanea::         Various other stuff.
7960 @end menu
7961
7962
7963 @node Article Highlighting
7964 @subsection Article Highlighting
7965 @cindex highlighting
7966
7967 Not only do you want your article buffer to look like fruit salad, but
7968 you want it to look like technicolor fruit salad.
7969
7970 @table @kbd
7971
7972 @item W H a
7973 @kindex W H a (Summary)
7974 @findex gnus-article-highlight
7975 @findex gnus-article-maybe-highlight
7976 Do much highlighting of the current article
7977 (@code{gnus-article-highlight}).  This function highlights header, cited
7978 text, the signature, and adds buttons to the body and the head.
7979
7980 @item W H h
7981 @kindex W H h (Summary)
7982 @findex gnus-article-highlight-headers
7983 @vindex gnus-header-face-alist
7984 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7985 highlighting will be done according to the @code{gnus-header-face-alist}
7986 variable, which is a list where each element has the form
7987 @code{(@var{regexp} @var{name} @var{content})}.
7988 @var{regexp} is a regular expression for matching the
7989 header, @var{name} is the face used for highlighting the header name
7990 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7991 the header value.  The first match made will be used.  Note that
7992 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7993
7994 @item W H c
7995 @kindex W H c (Summary)
7996 @findex gnus-article-highlight-citation
7997 Highlight cited text (@code{gnus-article-highlight-citation}).
7998
7999 Some variables to customize the citation highlights:
8000
8001 @table @code
8002 @vindex gnus-cite-parse-max-size
8003
8004 @item gnus-cite-parse-max-size
8005 If the article size if bigger than this variable (which is 25000 by
8006 default), no citation highlighting will be performed.
8007
8008 @item gnus-cite-max-prefix
8009 @vindex gnus-cite-max-prefix
8010 Maximum possible length for a citation prefix (default 20).
8011
8012 @item gnus-cite-face-list
8013 @vindex gnus-cite-face-list
8014 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8015 When there are citations from multiple articles in the same message,
8016 gnus will try to give each citation from each article its own face.
8017 This should make it easier to see who wrote what.
8018
8019 @item gnus-supercite-regexp
8020 @vindex gnus-supercite-regexp
8021 Regexp matching normal Supercite attribution lines.
8022
8023 @item gnus-supercite-secondary-regexp
8024 @vindex gnus-supercite-secondary-regexp
8025 Regexp matching mangled Supercite attribution lines.
8026
8027 @item gnus-cite-minimum-match-count
8028 @vindex gnus-cite-minimum-match-count
8029 Minimum number of identical prefixes we have to see before we believe
8030 that it's a citation.
8031
8032 @item gnus-cite-attribution-prefix
8033 @vindex gnus-cite-attribution-prefix
8034 Regexp matching the beginning of an attribution line.
8035
8036 @item gnus-cite-attribution-suffix
8037 @vindex gnus-cite-attribution-suffix
8038 Regexp matching the end of an attribution line.
8039
8040 @item gnus-cite-attribution-face
8041 @vindex gnus-cite-attribution-face
8042 Face used for attribution lines.  It is merged with the face for the
8043 cited text belonging to the attribution.
8044
8045 @end table
8046
8047
8048 @item W H s
8049 @kindex W H s (Summary)
8050 @vindex gnus-signature-separator
8051 @vindex gnus-signature-face
8052 @findex gnus-article-highlight-signature
8053 Highlight the signature (@code{gnus-article-highlight-signature}).
8054 Everything after @code{gnus-signature-separator} (@pxref{Article
8055 Signature}) in an article will be considered a signature and will be
8056 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8057 default.
8058
8059 @end table
8060
8061 @xref{Customizing Articles}, for how to highlight articles automatically.
8062
8063
8064 @node Article Fontisizing
8065 @subsection Article Fontisizing
8066 @cindex emphasis
8067 @cindex article emphasis
8068
8069 @findex gnus-article-emphasize
8070 @kindex W e (Summary)
8071 People commonly add emphasis to words in news articles by writing things
8072 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8073 this look nicer by running the article through the @kbd{W e}
8074 (@code{gnus-article-emphasize}) command.
8075
8076 @vindex gnus-emphasis-alist
8077 How the emphasis is computed is controlled by the
8078 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8079 element is a regular expression to be matched.  The second is a number
8080 that says what regular expression grouping is used to find the entire
8081 emphasized word.  The third is a number that says what regexp grouping
8082 should be displayed and highlighted.  (The text between these two
8083 groupings will be hidden.)  The fourth is the face used for
8084 highlighting.
8085
8086 @lisp
8087 (setq gnus-emphasis-alist
8088       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8089         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8090 @end lisp
8091
8092 @cindex slash
8093 @cindex asterisk
8094 @cindex underline
8095 @cindex /
8096 @cindex *
8097
8098 @vindex gnus-emphasis-underline
8099 @vindex gnus-emphasis-bold
8100 @vindex gnus-emphasis-italic
8101 @vindex gnus-emphasis-underline-bold
8102 @vindex gnus-emphasis-underline-italic
8103 @vindex gnus-emphasis-bold-italic
8104 @vindex gnus-emphasis-underline-bold-italic
8105 By default, there are seven rules, and they use the following faces:
8106 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8107 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8108 @code{gnus-emphasis-underline-italic},
8109 @code{gnus-emphasis-underline-bold}, and
8110 @code{gnus-emphasis-underline-bold-italic}.
8111
8112 If you want to change these faces, you can either use @kbd{M-x
8113 customize}, or you can use @code{copy-face}.  For instance, if you want
8114 to make @code{gnus-emphasis-italic} use a red face instead, you could
8115 say something like:
8116
8117 @lisp
8118 (copy-face 'red 'gnus-emphasis-italic)
8119 @end lisp
8120
8121 @vindex gnus-group-highlight-words-alist
8122
8123 If you want to highlight arbitrary words, you can use the
8124 @code{gnus-group-highlight-words-alist} variable, which uses the same
8125 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8126 parameter (@pxref{Group Parameters}) can also be used.
8127
8128 @xref{Customizing Articles}, for how to fontize articles automatically.
8129
8130
8131 @node Article Hiding
8132 @subsection Article Hiding
8133 @cindex article hiding
8134
8135 Or rather, hiding certain things in each article.  There usually is much
8136 too much cruft in most articles.
8137
8138 @table @kbd
8139
8140 @item W W a
8141 @kindex W W a (Summary)
8142 @findex gnus-article-hide
8143 Do quite a lot of hiding on the article buffer
8144 (@kbd{gnus-article-hide}).  In particular, this function will hide
8145 headers, @acronym{PGP}, cited text and the signature.
8146
8147 @item W W h
8148 @kindex W W h (Summary)
8149 @findex gnus-article-hide-headers
8150 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8151 Headers}.
8152
8153 @item W W b
8154 @kindex W W b (Summary)
8155 @findex gnus-article-hide-boring-headers
8156 Hide headers that aren't particularly interesting
8157 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8158
8159 @item W W s
8160 @kindex W W s (Summary)
8161 @findex gnus-article-hide-signature
8162 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8163 Signature}.
8164
8165 @item W W l
8166 @kindex W W l (Summary)
8167 @findex gnus-article-hide-list-identifiers
8168 @vindex gnus-list-identifiers
8169 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8170 are strings some mailing list servers add to the beginning of all
8171 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8172 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8173 may not contain @code{\\(..\\)}.
8174
8175 @table @code
8176
8177 @item gnus-list-identifiers
8178 @vindex gnus-list-identifiers
8179 A regular expression that matches list identifiers to be removed from
8180 subject.  This can also be a list of regular expressions.
8181
8182 @end table
8183
8184 @item W W P
8185 @kindex W W P (Summary)
8186 @findex gnus-article-hide-pem
8187 Hide @acronym{PEM} (privacy enhanced messages) cruft
8188 (@code{gnus-article-hide-pem}).
8189
8190 @item W W B
8191 @kindex W W B (Summary)
8192 @findex gnus-article-strip-banner
8193 @vindex gnus-article-banner-alist
8194 @vindex gnus-article-address-banner-alist
8195 @cindex banner
8196 @cindex OneList
8197 @cindex stripping advertisements
8198 @cindex advertisements
8199 Strip the banner specified by the @code{banner} group parameter
8200 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8201 annoying banners and/or signatures that some mailing lists and moderated
8202 groups adds to all the messages.  The way to use this function is to add
8203 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8204 group you want banners stripped from.  The parameter either be a string,
8205 which will be interpreted as a regular expression matching text to be
8206 removed, or the symbol @code{signature}, meaning that the (last)
8207 signature should be removed, or other symbol, meaning that the
8208 corresponding regular expression in @code{gnus-article-banner-alist} is
8209 used.
8210
8211 Regardless of a group, you can hide things like advertisements only when
8212 the sender of an article has a certain mail address specified in
8213 @code{gnus-article-address-banner-alist}.
8214
8215 @table @code
8216
8217 @item gnus-article-address-banner-alist
8218 @vindex gnus-article-address-banner-alist
8219 Alist of mail addresses and banners.  Each element has the form
8220 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8221 matching a mail address in the From header, @var{banner} is one of a
8222 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8223 a regexp and @code{nil}.  If @var{address} matches author's mail
8224 address, it will remove things like advertisements.  For example, if a
8225 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8226 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8227 sends, you can use the following element to remove them:
8228
8229 @lisp
8230 ("@@yoo-hoo\\.co\\.jp\\'" .
8231  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8232 @end lisp
8233
8234 @end table
8235
8236 @item W W c
8237 @kindex W W c (Summary)
8238 @findex gnus-article-hide-citation
8239 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8240 customizing the hiding:
8241
8242 @table @code
8243
8244 @item gnus-cited-opened-text-button-line-format
8245 @itemx gnus-cited-closed-text-button-line-format
8246 @vindex gnus-cited-closed-text-button-line-format
8247 @vindex gnus-cited-opened-text-button-line-format
8248 Gnus adds buttons to show where the cited text has been hidden, and to
8249 allow toggle hiding the text.  The format of the variable is specified
8250 by these format-like variable (@pxref{Formatting Variables}).  These
8251 specs are valid:
8252
8253 @table @samp
8254 @item b
8255 Starting point of the hidden text.
8256 @item e
8257 Ending point of the hidden text.
8258 @item l
8259 Number of characters in the hidden region.
8260 @item n
8261 Number of lines of hidden text.
8262 @end table
8263
8264 @item gnus-cited-lines-visible
8265 @vindex gnus-cited-lines-visible
8266 The number of lines at the beginning of the cited text to leave
8267 shown.  This can also be a cons cell with the number of lines at the top
8268 and bottom of the text, respectively, to remain visible.
8269
8270 @end table
8271
8272 @item W W C-c
8273 @kindex W W C-c (Summary)
8274 @findex gnus-article-hide-citation-maybe
8275
8276 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8277 following two variables:
8278
8279 @table @code
8280 @item gnus-cite-hide-percentage
8281 @vindex gnus-cite-hide-percentage
8282 If the cited text is of a bigger percentage than this variable (default
8283 50), hide the cited text.
8284
8285 @item gnus-cite-hide-absolute
8286 @vindex gnus-cite-hide-absolute
8287 The cited text must have at least this length (default 10) before it
8288 is hidden.
8289 @end table
8290
8291 @item W W C
8292 @kindex W W C (Summary)
8293 @findex gnus-article-hide-citation-in-followups
8294 Hide cited text in articles that aren't roots
8295 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8296 useful as an interactive command, but might be a handy function to stick
8297 have happen automatically (@pxref{Customizing Articles}).
8298
8299 @end table
8300
8301 All these ``hiding'' commands are toggles, but if you give a negative
8302 prefix to these commands, they will show what they have previously
8303 hidden.  If you give a positive prefix, they will always hide.
8304
8305 Also @pxref{Article Highlighting} for further variables for
8306 citation customization.
8307
8308 @xref{Customizing Articles}, for how to hide article elements
8309 automatically.
8310
8311
8312 @node Article Washing
8313 @subsection Article Washing
8314 @cindex washing
8315 @cindex article washing
8316
8317 We call this ``article washing'' for a really good reason.  Namely, the
8318 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8319
8320 @dfn{Washing} is defined by us as ``changing something from something to
8321 something else'', but normally results in something looking better.
8322 Cleaner, perhaps.
8323
8324 @xref{Customizing Articles}, if you want to change how Gnus displays
8325 articles by default.
8326
8327 @table @kbd
8328
8329 @item C-u g
8330 This is not really washing, it's sort of the opposite of washing.  If
8331 you type this, you see the article exactly as it exists on disk or on
8332 the server.
8333
8334 @item g
8335 Force redisplaying of the current article
8336 (@code{gnus-summary-show-article}).  This is also not really washing.
8337 If you type this, you see the article without any previously applied
8338 interactive Washing functions but with all default treatments
8339 (@pxref{Customizing Articles}).
8340
8341 @item W l
8342 @kindex W l (Summary)
8343 @findex gnus-summary-stop-page-breaking
8344 Remove page breaks from the current article
8345 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8346 delimiters.
8347
8348 @item W r
8349 @kindex W r (Summary)
8350 @findex gnus-summary-caesar-message
8351 @c @icon{gnus-summary-caesar-message}
8352 Do a Caesar rotate (rot13) on the article buffer
8353 (@code{gnus-summary-caesar-message}).
8354 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8355 (Typically offensive jokes and such.)
8356
8357 It's commonly called ``rot13'' because each letter is rotated 13
8358 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8359 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8360 is rumored to have employed this form of, uh, somewhat weak encryption.
8361
8362 @item W m
8363 @kindex W m (Summary)
8364 @findex gnus-summary-morse-message
8365 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8366
8367 @item W t
8368 @item t
8369 @kindex W t (Summary)
8370 @kindex t (Summary)
8371 @findex gnus-summary-toggle-header
8372 Toggle whether to display all headers in the article buffer
8373 (@code{gnus-summary-toggle-header}).
8374
8375 @item W v
8376 @kindex W v (Summary)
8377 @findex gnus-summary-verbose-headers
8378 Toggle whether to display all headers in the article buffer permanently
8379 (@code{gnus-summary-verbose-headers}).
8380
8381 @item W m
8382 @kindex W m (Summary)
8383 @findex gnus-summary-toggle-mime
8384 Toggle whether to run the article through @acronym{MIME} before
8385 displaying (@code{gnus-summary-toggle-mime}).
8386
8387 @item W o
8388 @kindex W o (Summary)
8389 @findex gnus-article-treat-overstrike
8390 Treat overstrike (@code{gnus-article-treat-overstrike}).
8391
8392 @item W d
8393 @kindex W d (Summary)
8394 @findex gnus-article-treat-dumbquotes
8395 @vindex gnus-article-dumbquotes-map
8396 @cindex Smartquotes
8397 @cindex M****s*** sm*rtq**t*s
8398 @cindex Latin 1
8399 Treat M****s*** sm*rtq**t*s according to
8400 @code{gnus-article-dumbquotes-map}
8401 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8402 whether a character is a sm*rtq**t* or not, so it should only be used
8403 interactively.
8404
8405 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8406 an attempt to provide more quoting characters.  If you see something
8407 like @code{\222} or @code{\264} where you're expecting some kind of
8408 apostrophe or quotation mark, then try this wash.
8409
8410 @item W Y f
8411 @kindex W Y f (Summary)
8412 @findex gnus-article-outlook-deuglify-article
8413 @cindex Outlook Express
8414 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8415 unwrap lines, repair attribution and rearrange citation.
8416 (@code{gnus-article-outlook-deuglify-article}).
8417
8418 @item W Y u
8419 @kindex W Y u (Summary)
8420 @findex gnus-article-outlook-unwrap-lines
8421 @vindex gnus-outlook-deuglify-unwrap-min
8422 @vindex gnus-outlook-deuglify-unwrap-max
8423 Unwrap lines that appear to be wrapped citation lines.  You can control
8424 what lines will be unwrapped by frobbing
8425 @code{gnus-outlook-deuglify-unwrap-min} and
8426 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8427 maximum length of an unwrapped citation line.
8428 (@code{gnus-article-outlook-unwrap-lines}).
8429
8430 @item W Y a
8431 @kindex W Y a (Summary)
8432 @findex gnus-article-outlook-repair-attribution
8433 Repair a broken attribution line.@*
8434 (@code{gnus-article-outlook-repair-attribution}).
8435
8436 @item W Y c
8437 @kindex W Y c (Summary)
8438 @findex gnus-article-outlook-rearrange-citation
8439 Repair broken citations by rearranging the text.
8440 (@code{gnus-article-outlook-rearrange-citation}).
8441
8442 @item W w
8443 @kindex W w (Summary)
8444 @findex gnus-article-fill-cited-article
8445 Do word wrap (@code{gnus-article-fill-cited-article}).
8446
8447 You can give the command a numerical prefix to specify the width to use
8448 when filling.
8449
8450 @item W Q
8451 @kindex W Q (Summary)
8452 @findex gnus-article-fill-long-lines
8453 Fill long lines (@code{gnus-article-fill-long-lines}).
8454
8455 @item W C
8456 @kindex W C (Summary)
8457 @findex gnus-article-capitalize-sentences
8458 Capitalize the first word in each sentence
8459 (@code{gnus-article-capitalize-sentences}).
8460
8461 @item W c
8462 @kindex W c (Summary)
8463 @findex gnus-article-remove-cr
8464 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8465 (this takes care of DOS line endings), and then translate any remaining
8466 CRs into LF (this takes care of Mac line endings)
8467 (@code{gnus-article-remove-cr}).
8468
8469 @kindex W q (Summary)
8470 @findex gnus-article-de-quoted-unreadable
8471 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8472 Quoted-Printable is one common @acronym{MIME} encoding employed when
8473 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8474 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8475 doesn't look very readable to me.  Note that this is usually done
8476 automatically by Gnus if the message in question has a
8477 @code{Content-Transfer-Encoding} header that says that this encoding
8478 has been done.  If a prefix is given, a charset will be asked for.
8479
8480 @item W 6
8481 @kindex W 6 (Summary)
8482 @findex gnus-article-de-base64-unreadable
8483 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8484 one common @acronym{MIME} encoding employed when sending
8485 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8486 usually done automatically by Gnus if the message in question has a
8487 @code{Content-Transfer-Encoding} header that says that this encoding
8488 has been done.  If a prefix is given, a charset will be asked for.
8489
8490 @item W Z
8491 @kindex W Z (Summary)
8492 @findex gnus-article-decode-HZ
8493 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8494 common encoding employed when sending Chinese articles.  It typically
8495 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8496
8497 @item W u
8498 @kindex W u (Summary)
8499 @findex gnus-article-unsplit-urls
8500 Remove newlines from within URLs.  Some mailers insert newlines into
8501 outgoing email messages to keep lines short.  This reformatting can
8502 split long URLs onto multiple lines.  Repair those URLs by removing
8503 the newlines (@code{gnus-article-unsplit-urls}).
8504
8505 @item W h
8506 @kindex W h (Summary)
8507 @findex gnus-article-wash-html
8508 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8509 usually done automatically by Gnus if the message in question has a
8510 @code{Content-Type} header that says that the message is @acronym{HTML}.
8511
8512 If a prefix is given, a charset will be asked for.
8513
8514 @vindex gnus-article-wash-function
8515 The default is to use the function specified by
8516 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8517 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8518 @acronym{HTML}, but this is controlled by the
8519 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8520 can use include:
8521
8522 @table @code
8523 @item w3
8524 Use Emacs/w3.
8525
8526 @item w3m
8527 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8528
8529 @item links
8530 Use @uref{http://links.sf.net/, Links}.
8531
8532 @item lynx
8533 Use @uref{http://lynx.isc.org/, Lynx}.
8534
8535 @item html2text
8536 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8537
8538 @end table
8539
8540 @item W b
8541 @kindex W b (Summary)
8542 @findex gnus-article-add-buttons
8543 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8544 @xref{Article Buttons}.
8545
8546 @item W B
8547 @kindex W B (Summary)
8548 @findex gnus-article-add-buttons-to-head
8549 Add clickable buttons to the article headers
8550 (@code{gnus-article-add-buttons-to-head}).
8551
8552 @item W p
8553 @kindex W p (Summary)
8554 @findex gnus-article-verify-x-pgp-sig
8555 Verify a signed control message
8556 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8557 @code{newgroup} and @code{checkgroups} are usually signed by the
8558 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8559 the maintainer to your keyring to verify the
8560 message.@footnote{@acronym{PGP} keys for many hierarchies are
8561 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8562
8563 @item W s
8564 @kindex W s (Summary)
8565 @findex gnus-summary-force-verify-and-decrypt
8566 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8567 @acronym{S/MIME}) message
8568 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8569
8570 @item W a
8571 @kindex W a (Summary)
8572 @findex gnus-article-strip-headers-in-body
8573 Strip headers like the @code{X-No-Archive} header from the beginning of
8574 article bodies (@code{gnus-article-strip-headers-in-body}).
8575
8576 @item W E l
8577 @kindex W E l (Summary)
8578 @findex gnus-article-strip-leading-blank-lines
8579 Remove all blank lines from the beginning of the article
8580 (@code{gnus-article-strip-leading-blank-lines}).
8581
8582 @item W E m
8583 @kindex W E m (Summary)
8584 @findex gnus-article-strip-multiple-blank-lines
8585 Replace all blank lines with empty lines and then all multiple empty
8586 lines with a single empty line.
8587 (@code{gnus-article-strip-multiple-blank-lines}).
8588
8589 @item W E t
8590 @kindex W E t (Summary)
8591 @findex gnus-article-remove-trailing-blank-lines
8592 Remove all blank lines at the end of the article
8593 (@code{gnus-article-remove-trailing-blank-lines}).
8594
8595 @item W E a
8596 @kindex W E a (Summary)
8597 @findex gnus-article-strip-blank-lines
8598 Do all the three commands above
8599 (@code{gnus-article-strip-blank-lines}).
8600
8601 @item W E A
8602 @kindex W E A (Summary)
8603 @findex gnus-article-strip-all-blank-lines
8604 Remove all blank lines
8605 (@code{gnus-article-strip-all-blank-lines}).
8606
8607 @item W E s
8608 @kindex W E s (Summary)
8609 @findex gnus-article-strip-leading-space
8610 Remove all white space from the beginning of all lines of the article
8611 body (@code{gnus-article-strip-leading-space}).
8612
8613 @item W E e
8614 @kindex W E e (Summary)
8615 @findex gnus-article-strip-trailing-space
8616 Remove all white space from the end of all lines of the article
8617 body (@code{gnus-article-strip-trailing-space}).
8618
8619 @end table
8620
8621 @xref{Customizing Articles}, for how to wash articles automatically.
8622
8623
8624 @node Article Header
8625 @subsection Article Header
8626
8627 These commands perform various transformations of article header.
8628
8629 @table @kbd
8630
8631 @item W G u
8632 @kindex W G u (Summary)
8633 @findex gnus-article-treat-unfold-headers
8634 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8635
8636 @item W G n
8637 @kindex W G n (Summary)
8638 @findex gnus-article-treat-fold-newsgroups
8639 Fold the @code{Newsgroups} and @code{Followup-To} headers
8640 (@code{gnus-article-treat-fold-newsgroups}).
8641
8642 @item W G f
8643 @kindex W G f (Summary)
8644 @findex gnus-article-treat-fold-headers
8645 Fold all the message headers
8646 (@code{gnus-article-treat-fold-headers}).
8647
8648 @item W E w
8649 @kindex W E w
8650 @findex gnus-article-remove-leading-whitespace
8651 Remove excessive whitespace from all headers
8652 (@code{gnus-article-remove-leading-whitespace}).
8653
8654 @end table
8655
8656
8657 @node Article Buttons
8658 @subsection Article Buttons
8659 @cindex buttons
8660
8661 People often include references to other stuff in articles, and it would
8662 be nice if Gnus could just fetch whatever it is that people talk about
8663 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8664 button on these references.
8665
8666 @vindex gnus-button-man-handler
8667 Gnus adds @dfn{buttons} to certain standard references by default:
8668 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8669 Emacs or Gnus related references.  This is controlled by two variables,
8670 one that handles article bodies and one that handles article heads:
8671
8672 @table @code
8673
8674 @item gnus-button-alist
8675 @vindex gnus-button-alist
8676 This is an alist where each entry has this form:
8677
8678 @lisp
8679 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8680 @end lisp
8681
8682 @table @var
8683
8684 @item regexp
8685 All text that match this regular expression (case insensitive) will be
8686 considered an external reference.  Here's a typical regexp that matches
8687 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8688 variable containing a regexp, useful variables to use include
8689 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8690
8691 @item button-par
8692 Gnus has to know which parts of the matches is to be highlighted.  This
8693 is a number that says what sub-expression of the regexp is to be
8694 highlighted.  If you want it all highlighted, you use 0 here.
8695
8696 @item use-p
8697 This form will be @code{eval}ed, and if the result is non-@code{nil},
8698 this is considered a match.  This is useful if you want extra sifting to
8699 avoid false matches.  Often variables named
8700 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8701 Levels}, but any other form may be used too.
8702
8703 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8704
8705 @item function
8706 This function will be called when you click on this button.
8707
8708 @item data-par
8709 As with @var{button-par}, this is a sub-expression number, but this one
8710 says which part of the match is to be sent as data to @var{function}.
8711
8712 @end table
8713
8714 So the full entry for buttonizing URLs is then
8715
8716 @lisp
8717 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8718 @end lisp
8719
8720 @item gnus-header-button-alist
8721 @vindex gnus-header-button-alist
8722 This is just like the other alist, except that it is applied to the
8723 article head only, and that each entry has an additional element that is
8724 used to say what headers to apply the buttonize coding to:
8725
8726 @lisp
8727 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8728 @end lisp
8729
8730 @var{header} is a regular expression.
8731 @end table
8732
8733 @subsubsection Related variables and functions
8734
8735 @table @code
8736 @item gnus-button-@var{*}-level
8737 @xref{Article Button Levels}.
8738
8739 @c Stuff related to gnus-button-browse-level
8740
8741 @item gnus-button-url-regexp
8742 @vindex gnus-button-url-regexp
8743 A regular expression that matches embedded URLs.  It is used in the
8744 default values of the variables above.
8745
8746 @c Stuff related to gnus-button-man-level
8747
8748 @item gnus-button-man-handler
8749 @vindex gnus-button-man-handler
8750 The function to use for displaying man pages.  It must take at least one
8751 argument with a string naming the man page.
8752
8753 @c Stuff related to gnus-button-message-level
8754
8755 @item gnus-button-mid-or-mail-regexp
8756 @vindex gnus-button-mid-or-mail-regexp
8757 Regular expression that matches a message ID or a mail address.
8758
8759 @item gnus-button-prefer-mid-or-mail
8760 @vindex gnus-button-prefer-mid-or-mail
8761 This variable determines what to do when the button on a string as
8762 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8763 message ID or a mail address.  If it is one of the symbols @code{mid} or
8764 @code{mail}, Gnus will always assume that the string is a message ID or
8765 a mail address, respectively.  If this variable is set to the symbol
8766 @code{ask}, always query the user what do do.  If it is a function, this
8767 function will be called with the string as its only argument.  The
8768 function must return @code{mid}, @code{mail}, @code{invalid} or
8769 @code{ask}.  The default value is the function
8770 @code{gnus-button-mid-or-mail-heuristic}.
8771
8772 @item gnus-button-mid-or-mail-heuristic
8773 @findex gnus-button-mid-or-mail-heuristic
8774 Function that guesses whether its argument is a message ID or a mail
8775 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8776 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8777 string is invalid.
8778
8779 @item gnus-button-mid-or-mail-heuristic-alist
8780 @vindex gnus-button-mid-or-mail-heuristic-alist
8781 An alist of @code{(RATE . REGEXP)} pairs used by the function
8782 @code{gnus-button-mid-or-mail-heuristic}.
8783
8784 @c Stuff related to gnus-button-tex-level
8785
8786 @item gnus-button-ctan-handler
8787 @findex gnus-button-ctan-handler
8788 The function to use for displaying CTAN links.  It must take one
8789 argument, the string naming the URL.
8790
8791 @item gnus-ctan-url
8792 @vindex gnus-ctan-url
8793 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8794 by @code{gnus-button-ctan-handler}.
8795
8796 @c Misc stuff
8797
8798 @item gnus-article-button-face
8799 @vindex gnus-article-button-face
8800 Face used on buttons.
8801
8802 @item gnus-article-mouse-face
8803 @vindex gnus-article-mouse-face
8804 Face used when the mouse cursor is over a button.
8805
8806 @end table
8807
8808 @xref{Customizing Articles}, for how to buttonize articles automatically.
8809
8810
8811 @node Article Button Levels
8812 @subsection Article button levels
8813 @cindex button levels
8814 The higher the value of the variables @code{gnus-button-@var{*}-level},
8815 the more buttons will appear.  If the level is zero, no corresponding
8816 buttons are displayed.  With the default value (which is 5) you should
8817 already see quite a lot of buttons.  With higher levels, you will see
8818 more buttons, but you may also get more false positives.  To avoid them,
8819 you can set the variables @code{gnus-button-@var{*}-level} local to
8820 specific groups (@pxref{Group Parameters}).  Here's an example for the
8821 variable @code{gnus-parameters}:
8822
8823 @lisp
8824 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8825 (setq gnus-parameters
8826       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8827         ("\\<unix\\>"               (gnus-button-man-level 10))
8828         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8829 @end lisp
8830
8831 @table @code
8832
8833 @item gnus-button-browse-level
8834 @vindex gnus-button-browse-level
8835 Controls the display of references to message IDs, mail addresses and
8836 news URLs.  Related variables and functions include
8837 @code{gnus-button-url-regexp}, @code{browse-url}, and
8838 @code{browse-url-browser-function}.
8839
8840 @item gnus-button-emacs-level
8841 @vindex gnus-button-emacs-level
8842 Controls the display of Emacs or Gnus references.  Related functions are
8843 @code{gnus-button-handle-custom},
8844 @code{gnus-button-handle-describe-function},
8845 @code{gnus-button-handle-describe-variable},
8846 @code{gnus-button-handle-symbol},
8847 @code{gnus-button-handle-describe-key},
8848 @code{gnus-button-handle-apropos},
8849 @code{gnus-button-handle-apropos-command},
8850 @code{gnus-button-handle-apropos-variable},
8851 @code{gnus-button-handle-apropos-documentation}, and
8852 @code{gnus-button-handle-library}.
8853
8854 @item gnus-button-man-level
8855 @vindex gnus-button-man-level
8856 Controls the display of references to (Unix) man pages.
8857 See @code{gnus-button-man-handler}.
8858
8859 @item gnus-button-message-level
8860 @vindex gnus-button-message-level
8861 Controls the display of message IDs, mail addresses and news URLs.
8862 Related variables and functions include
8863 @code{gnus-button-mid-or-mail-regexp},
8864 @code{gnus-button-prefer-mid-or-mail},
8865 @code{gnus-button-mid-or-mail-heuristic}, and
8866 @code{gnus-button-mid-or-mail-heuristic-alist}.
8867
8868 @item gnus-button-tex-level
8869 @vindex gnus-button-tex-level
8870 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8871 URLs.  See the variables @code{gnus-ctan-url},
8872 @code{gnus-button-ctan-handler},
8873 @code{gnus-button-ctan-directory-regexp}, and
8874 @code{gnus-button-handle-ctan-bogus-regexp}.
8875
8876 @end table
8877
8878
8879 @node Article Date
8880 @subsection Article Date
8881
8882 The date is most likely generated in some obscure timezone you've never
8883 heard of, so it's quite nice to be able to find out what the time was
8884 when the article was sent.
8885
8886 @table @kbd
8887
8888 @item W T u
8889 @kindex W T u (Summary)
8890 @findex gnus-article-date-ut
8891 Display the date in UT (aka. GMT, aka ZULU)
8892 (@code{gnus-article-date-ut}).
8893
8894 @item W T i
8895 @kindex W T i (Summary)
8896 @findex gnus-article-date-iso8601
8897 @cindex ISO 8601
8898 Display the date in international format, aka. ISO 8601
8899 (@code{gnus-article-date-iso8601}).
8900
8901 @item W T l
8902 @kindex W T l (Summary)
8903 @findex gnus-article-date-local
8904 Display the date in the local timezone (@code{gnus-article-date-local}).
8905
8906 @item W T p
8907 @kindex W T p (Summary)
8908 @findex gnus-article-date-english
8909 Display the date in a format that's easily pronounceable in English
8910 (@code{gnus-article-date-english}).
8911
8912 @item W T s
8913 @kindex W T s (Summary)
8914 @vindex gnus-article-time-format
8915 @findex gnus-article-date-user
8916 @findex format-time-string
8917 Display the date using a user-defined format
8918 (@code{gnus-article-date-user}).  The format is specified by the
8919 @code{gnus-article-time-format} variable, and is a string that's passed
8920 to @code{format-time-string}.  See the documentation of that variable
8921 for a list of possible format specs.
8922
8923 @item W T e
8924 @kindex W T e (Summary)
8925 @findex gnus-article-date-lapsed
8926 @findex gnus-start-date-timer
8927 @findex gnus-stop-date-timer
8928 Say how much time has elapsed between the article was posted and now
8929 (@code{gnus-article-date-lapsed}).  It looks something like:
8930
8931 @example
8932 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8933 @end example
8934
8935 @vindex gnus-article-date-lapsed-new-header
8936 The value of @code{gnus-article-date-lapsed-new-header} determines
8937 whether this header will just be added below the old Date one, or will
8938 replace it.
8939
8940 An advantage of using Gnus to read mail is that it converts simple bugs
8941 into wonderful absurdities.
8942
8943 If you want to have this line updated continually, you can put
8944
8945 @lisp
8946 (gnus-start-date-timer)
8947 @end lisp
8948
8949 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8950 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8951 command.
8952
8953 @item W T o
8954 @kindex W T o (Summary)
8955 @findex gnus-article-date-original
8956 Display the original date (@code{gnus-article-date-original}).  This can
8957 be useful if you normally use some other conversion function and are
8958 worried that it might be doing something totally wrong.  Say, claiming
8959 that the article was posted in 1854.  Although something like that is
8960 @emph{totally} impossible.  Don't you trust me? *titter*
8961
8962 @end table
8963
8964 @xref{Customizing Articles}, for how to display the date in your
8965 preferred format automatically.
8966
8967
8968 @node Article Display
8969 @subsection Article Display
8970 @cindex picons
8971 @cindex x-face
8972 @cindex smileys
8973
8974 These commands add various frivolous display gimmicks to the article
8975 buffer in Emacs versions that support them.
8976
8977 @code{X-Face} headers are small black-and-white images supplied by the
8978 message headers (@pxref{X-Face}).
8979
8980 @code{Face} headers are small colored images supplied by the message
8981 headers (@pxref{Face}).
8982
8983 Smileys are those little @samp{:-)} symbols that people like to litter
8984 their messages with (@pxref{Smileys}).
8985
8986 Picons, on the other hand, reside on your own system, and Gnus will
8987 try to match the headers to what you have (@pxref{Picons}).
8988
8989 All these functions are toggles---if the elements already exist,
8990 they'll be removed.
8991
8992 @table @kbd
8993 @item W D x
8994 @kindex W D x (Summary)
8995 @findex gnus-article-display-x-face
8996 Display an @code{X-Face} in the @code{From} header.
8997 (@code{gnus-article-display-x-face}).
8998
8999 @item W D d
9000 @kindex W D d (Summary)
9001 @findex gnus-article-display-face
9002 Display a @code{Face} in the @code{From} header.
9003 (@code{gnus-article-display-face}).
9004
9005 @item W D s
9006 @kindex W D s (Summary)
9007 @findex gnus-treat-smiley
9008 Display smileys (@code{gnus-treat-smiley}).
9009
9010 @item W D f
9011 @kindex W D f (Summary)
9012 @findex gnus-treat-from-picon
9013 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9014
9015 @item W D m
9016 @kindex W D m (Summary)
9017 @findex gnus-treat-mail-picon
9018 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9019 (@code{gnus-treat-mail-picon}).
9020
9021 @item W D n
9022 @kindex W D n (Summary)
9023 @findex gnus-treat-newsgroups-picon
9024 Piconify all news headers (i. e., @code{Newsgroups} and
9025 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9026
9027 @item W D D
9028 @kindex W D D (Summary)
9029 @findex gnus-article-remove-images
9030 Remove all images from the article buffer
9031 (@code{gnus-article-remove-images}).
9032
9033 @end table
9034
9035
9036
9037 @node Article Signature
9038 @subsection Article Signature
9039 @cindex signatures
9040 @cindex article signature
9041
9042 @vindex gnus-signature-separator
9043 Each article is divided into two parts---the head and the body.  The
9044 body can be divided into a signature part and a text part.  The variable
9045 that says what is to be considered a signature is
9046 @code{gnus-signature-separator}.  This is normally the standard
9047 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9048 non-standard signature separators, so this variable can also be a list
9049 of regular expressions to be tested, one by one.  (Searches are done
9050 from the end of the body towards the beginning.)  One likely value is:
9051
9052 @lisp
9053 (setq gnus-signature-separator
9054       '("^-- $"         ; @r{The standard}
9055         "^-- *$"        ; @r{A common mangling}
9056         "^-------*$"    ; @r{Many people just use a looong}
9057                         ; @r{line of dashes.  Shame!}
9058         "^ *--------*$" ; @r{Double-shame!}
9059         "^________*$"   ; @r{Underscores are also popular}
9060         "^========*$")) ; @r{Pervert!}
9061 @end lisp
9062
9063 The more permissive you are, the more likely it is that you'll get false
9064 positives.
9065
9066 @vindex gnus-signature-limit
9067 @code{gnus-signature-limit} provides a limit to what is considered a
9068 signature when displaying articles.
9069
9070 @enumerate
9071 @item
9072 If it is an integer, no signature may be longer (in characters) than
9073 that integer.
9074 @item
9075 If it is a floating point number, no signature may be longer (in lines)
9076 than that number.
9077 @item
9078 If it is a function, the function will be called without any parameters,
9079 and if it returns @code{nil}, there is no signature in the buffer.
9080 @item
9081 If it is a string, it will be used as a regexp.  If it matches, the text
9082 in question is not a signature.
9083 @end enumerate
9084
9085 This variable can also be a list where the elements may be of the types
9086 listed above.  Here's an example:
9087
9088 @lisp
9089 (setq gnus-signature-limit
9090       '(200.0 "^---*Forwarded article"))
9091 @end lisp
9092
9093 This means that if there are more than 200 lines after the signature
9094 separator, or the text after the signature separator is matched by
9095 the regular expression @samp{^---*Forwarded article}, then it isn't a
9096 signature after all.
9097
9098
9099 @node Article Miscellanea
9100 @subsection Article Miscellanea
9101
9102 @table @kbd
9103 @item A t
9104 @kindex A t (Summary)
9105 @findex gnus-article-babel
9106 Translate the article from one language to another
9107 (@code{gnus-article-babel}).
9108
9109 @end table
9110
9111
9112 @node MIME Commands
9113 @section MIME Commands
9114 @cindex MIME decoding
9115 @cindex attachments
9116 @cindex viewing attachments
9117
9118 The following commands all understand the numerical prefix.  For
9119 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9120
9121 @table @kbd
9122 @item b
9123 @itemx K v
9124 @kindex b (Summary)
9125 @kindex K v (Summary)
9126 View the @acronym{MIME} part.
9127
9128 @item K o
9129 @kindex K o (Summary)
9130 Save the @acronym{MIME} part.
9131
9132 @item K c
9133 @kindex K c (Summary)
9134 Copy the @acronym{MIME} part.
9135
9136 @item K e
9137 @kindex K e (Summary)
9138 View the @acronym{MIME} part externally.
9139
9140 @item K i
9141 @kindex K i (Summary)
9142 View the @acronym{MIME} part internally.
9143
9144 @item K |
9145 @kindex K | (Summary)
9146 Pipe the @acronym{MIME} part to an external command.
9147 @end table
9148
9149 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9150 the same manner:
9151
9152 @table @kbd
9153 @item K b
9154 @kindex K b (Summary)
9155 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9156 mostly useful if you wish to save (or perform other actions) on inlined
9157 parts.
9158
9159 @item K m
9160 @kindex K m (Summary)
9161 @findex gnus-summary-repair-multipart
9162 Some multipart messages are transmitted with missing or faulty headers.
9163 This command will attempt to ``repair'' these messages so that they can
9164 be viewed in a more pleasant manner
9165 (@code{gnus-summary-repair-multipart}).
9166
9167 @item X m
9168 @kindex X m (Summary)
9169 @findex gnus-summary-save-parts
9170 Save all parts matching a @acronym{MIME} type to a directory
9171 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9172 convention (@pxref{Process/Prefix}).
9173
9174 @item M-t
9175 @kindex M-t (Summary)
9176 @findex gnus-summary-toggle-display-buttonized
9177 Toggle the buttonized display of the article buffer
9178 (@code{gnus-summary-toggle-display-buttonized}).
9179
9180 @item W M w
9181 @kindex W M w (Summary)
9182 @findex gnus-article-decode-mime-words
9183 Decode RFC 2047-encoded words in the article headers
9184 (@code{gnus-article-decode-mime-words}).
9185
9186 @item W M c
9187 @kindex W M c (Summary)
9188 @findex gnus-article-decode-charset
9189 Decode encoded article bodies as well as charsets
9190 (@code{gnus-article-decode-charset}).
9191
9192 This command looks in the @code{Content-Type} header to determine the
9193 charset.  If there is no such header in the article, you can give it a
9194 prefix, which will prompt for the charset to decode as.  In regional
9195 groups where people post using some common encoding (but do not
9196 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9197 parameter to the required charset (@pxref{Group Parameters}).
9198
9199 @item W M v
9200 @kindex W M v (Summary)
9201 @findex gnus-mime-view-all-parts
9202 View all the @acronym{MIME} parts in the current article
9203 (@code{gnus-mime-view-all-parts}).
9204
9205 @end table
9206
9207 Relevant variables:
9208
9209 @table @code
9210 @item gnus-ignored-mime-types
9211 @vindex gnus-ignored-mime-types
9212 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9213 this list will be completely ignored by Gnus.  The default value is
9214 @code{nil}.
9215
9216 To have all Vcards be ignored, you'd say something like this:
9217
9218 @lisp
9219 (setq gnus-ignored-mime-types
9220       '("text/x-vcard"))
9221 @end lisp
9222
9223 @item gnus-article-loose-mime
9224 @vindex gnus-article-loose-mime
9225 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9226 before interpreting the message as a @acronym{MIME} message.  This helps
9227 when reading messages from certain broken mail user agents.  The
9228 default is @code{nil}.
9229
9230 @item gnus-article-emulate-mime
9231 @vindex gnus-article-emulate-mime
9232 There are other, non-@acronym{MIME} encoding methods used.  The most common
9233 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9234 this variable is non-@code{nil}, Gnus will look in message bodies to
9235 see if it finds these encodings, and if so, it'll run them through the
9236 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9237
9238 @item gnus-unbuttonized-mime-types
9239 @vindex gnus-unbuttonized-mime-types
9240 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9241 this list won't have @acronym{MIME} buttons inserted unless they aren't
9242 displayed or this variable is overridden by
9243 @code{gnus-buttonized-mime-types}.  The default value is
9244 @code{(".*/.*")}.  This variable is only used when
9245 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9246
9247 @item gnus-buttonized-mime-types
9248 @vindex gnus-buttonized-mime-types
9249 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9250 this list will have @acronym{MIME} buttons inserted unless they aren't
9251 displayed.  This variable overrides
9252 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9253 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9254 is @code{nil}.
9255
9256 To see e.g. security buttons but no other buttons, you could set this
9257 variable to @code{("multipart/signed")} and leave
9258 @code{gnus-unbuttonized-mime-types} at the default value.
9259
9260 @item gnus-inhibit-mime-unbuttonizing
9261 @vindex gnus-inhibit-mime-unbuttonizing
9262 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9263 default value is @code{nil}.
9264
9265 @item gnus-article-mime-part-function
9266 @vindex gnus-article-mime-part-function
9267 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9268 handle as the parameter.  The function is meant to be used to allow
9269 users to gather information from the article (e. g., add Vcard info to
9270 the bbdb database) or to do actions based on parts (e. g., automatically
9271 save all jpegs into some directory).
9272
9273 Here's an example function the does the latter:
9274
9275 @lisp
9276 (defun my-save-all-jpeg-parts (handle)
9277   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9278     (with-temp-buffer
9279       (insert (mm-get-part handle))
9280       (write-region (point-min) (point-max)
9281                     (read-file-name "Save jpeg to: ")))))
9282 (setq gnus-article-mime-part-function
9283       'my-save-all-jpeg-parts)
9284 @end lisp
9285
9286 @vindex gnus-mime-multipart-functions
9287 @item gnus-mime-multipart-functions
9288 Alist of @acronym{MIME} multipart types and functions to handle them.
9289
9290 @vindex mm-file-name-rewrite-functions
9291 @item mm-file-name-rewrite-functions
9292 List of functions used for rewriting file names of @acronym{MIME} parts.
9293 Each function takes a file name as input and returns a file name.
9294
9295 Ready-made functions include@*
9296 @code{mm-file-name-delete-whitespace},
9297 @code{mm-file-name-trim-whitespace},
9298 @code{mm-file-name-collapse-whitespace}, and
9299 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9300 the variable @code{mm-file-name-replace-whitespace} to replace each
9301 whitespace character in a file name with that string; default value
9302 is @code{"_"} (a single underscore).
9303 @findex mm-file-name-delete-whitespace
9304 @findex mm-file-name-trim-whitespace
9305 @findex mm-file-name-collapse-whitespace
9306 @findex mm-file-name-replace-whitespace
9307 @vindex mm-file-name-replace-whitespace
9308
9309 The standard functions @code{capitalize}, @code{downcase},
9310 @code{upcase}, and @code{upcase-initials} may be useful, too.
9311
9312 Everybody knows that whitespace characters in file names are evil,
9313 except those who don't know.  If you receive lots of attachments from
9314 such unenlightened users, you can make live easier by adding
9315
9316 @lisp
9317 (setq mm-file-name-rewrite-functions
9318       '(mm-file-name-trim-whitespace
9319         mm-file-name-collapse-whitespace
9320         mm-file-name-replace-whitespace))
9321 @end lisp
9322
9323 @noindent
9324 to your @file{~/.gnus.el} file.
9325
9326 @end table
9327
9328
9329 @node Charsets
9330 @section Charsets
9331 @cindex charsets
9332
9333 People use different charsets, and we have @acronym{MIME} to let us know what
9334 charsets they use.  Or rather, we wish we had.  Many people use
9335 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9336 just send out messages without saying what character sets they use.  To
9337 help a bit with this, some local news hierarchies have policies that say
9338 what character set is the default.  For instance, the @samp{fj}
9339 hierarchy uses @code{iso-2022-jp-2}.
9340
9341 @vindex gnus-group-charset-alist
9342 This knowledge is encoded in the @code{gnus-group-charset-alist}
9343 variable, which is an alist of regexps (use the first item to match full
9344 group names) and default charsets to be used when reading these groups.
9345
9346 @vindex gnus-newsgroup-ignored-charsets
9347 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9348 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9349 even if they really are in @code{koi-8}.  To help here, the
9350 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9351 charsets that are listed here will be ignored.  The variable can be
9352 set on a group-by-group basis using the group parameters (@pxref{Group
9353 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9354 which includes values some agents insist on having in there.
9355
9356 @vindex gnus-group-posting-charset-alist
9357 When posting, @code{gnus-group-posting-charset-alist} is used to
9358 determine which charsets should not be encoded using the @acronym{MIME}
9359 encodings.  For instance, some hierarchies discourage using
9360 quoted-printable header encoding.
9361
9362 This variable is an alist of regexps and permitted unencoded charsets
9363 for posting.  Each element of the alist has the form @code{(}@var{test
9364 header body-list}@code{)}, where:
9365
9366 @table @var
9367 @item test
9368 is either a regular expression matching the newsgroup header or a
9369 variable to query,
9370 @item header
9371 is the charset which may be left unencoded in the header (@code{nil}
9372 means encode all charsets),
9373 @item body-list
9374 is a list of charsets which may be encoded using 8bit content-transfer
9375 encoding in the body, or one of the special values @code{nil} (always
9376 encode using quoted-printable) or @code{t} (always use 8bit).
9377 @end table
9378
9379 @cindex Russian
9380 @cindex koi8-r
9381 @cindex koi8-u
9382 @cindex iso-8859-5
9383 @cindex coding system aliases
9384 @cindex preferred charset
9385
9386 Other charset tricks that may be useful, although not Gnus-specific:
9387
9388 If there are several @acronym{MIME} charsets that encode the same Emacs
9389 charset, you can choose what charset to use by saying the following:
9390
9391 @lisp
9392 (put-charset-property 'cyrillic-iso8859-5
9393                       'preferred-coding-system 'koi8-r)
9394 @end lisp
9395
9396 This means that Russian will be encoded using @code{koi8-r} instead of
9397 the default @code{iso-8859-5} @acronym{MIME} charset.
9398
9399 If you want to read messages in @code{koi8-u}, you can cheat and say
9400
9401 @lisp
9402 (define-coding-system-alias 'koi8-u 'koi8-r)
9403 @end lisp
9404
9405 This will almost do the right thing.
9406
9407 And finally, to read charsets like @code{windows-1251}, you can say
9408 something like
9409
9410 @lisp
9411 (codepage-setup 1251)
9412 (define-coding-system-alias 'windows-1251 'cp1251)
9413 @end lisp
9414
9415
9416 @node Article Commands
9417 @section Article Commands
9418
9419 @table @kbd
9420
9421 @item A P
9422 @cindex PostScript
9423 @cindex printing
9424 @kindex A P (Summary)
9425 @vindex gnus-ps-print-hook
9426 @findex gnus-summary-print-article
9427 Generate and print a PostScript image of the article buffer
9428 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9429 be run just before printing the buffer.  An alternative way to print
9430 article is to use Muttprint (@pxref{Saving Articles}).
9431
9432 @end table
9433
9434
9435 @node Summary Sorting
9436 @section Summary Sorting
9437 @cindex summary sorting
9438
9439 You can have the summary buffer sorted in various ways, even though I
9440 can't really see why you'd want that.
9441
9442 @table @kbd
9443
9444 @item C-c C-s C-n
9445 @kindex C-c C-s C-n (Summary)
9446 @findex gnus-summary-sort-by-number
9447 Sort by article number (@code{gnus-summary-sort-by-number}).
9448
9449 @item C-c C-s C-a
9450 @kindex C-c C-s C-a (Summary)
9451 @findex gnus-summary-sort-by-author
9452 Sort by author (@code{gnus-summary-sort-by-author}).
9453
9454 @item C-c C-s C-s
9455 @kindex C-c C-s C-s (Summary)
9456 @findex gnus-summary-sort-by-subject
9457 Sort by subject (@code{gnus-summary-sort-by-subject}).
9458
9459 @item C-c C-s C-d
9460 @kindex C-c C-s C-d (Summary)
9461 @findex gnus-summary-sort-by-date
9462 Sort by date (@code{gnus-summary-sort-by-date}).
9463
9464 @item C-c C-s C-l
9465 @kindex C-c C-s C-l (Summary)
9466 @findex gnus-summary-sort-by-lines
9467 Sort by lines (@code{gnus-summary-sort-by-lines}).
9468
9469 @item C-c C-s C-c
9470 @kindex C-c C-s C-c (Summary)
9471 @findex gnus-summary-sort-by-chars
9472 Sort by article length (@code{gnus-summary-sort-by-chars}).
9473
9474 @item C-c C-s C-i
9475 @kindex C-c C-s C-i (Summary)
9476 @findex gnus-summary-sort-by-score
9477 Sort by score (@code{gnus-summary-sort-by-score}).
9478
9479 @item C-c C-s C-r
9480 @kindex C-c C-s C-r (Summary)
9481 @findex gnus-summary-sort-by-random
9482 Randomize (@code{gnus-summary-sort-by-random}).
9483
9484 @item C-c C-s C-o
9485 @kindex C-c C-s C-o (Summary)
9486 @findex gnus-summary-sort-by-original
9487 Sort using the default sorting method
9488 (@code{gnus-summary-sort-by-original}).
9489 @end table
9490
9491 These functions will work both when you use threading and when you don't
9492 use threading.  In the latter case, all summary lines will be sorted,
9493 line by line.  In the former case, sorting will be done on a
9494 root-by-root basis, which might not be what you were looking for.  To
9495 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9496 Commands}).
9497
9498
9499 @node Finding the Parent
9500 @section Finding the Parent
9501 @cindex parent articles
9502 @cindex referring articles
9503
9504 @table @kbd
9505 @item ^
9506 @kindex ^ (Summary)
9507 @findex gnus-summary-refer-parent-article
9508 If you'd like to read the parent of the current article, and it is not
9509 displayed in the summary buffer, you might still be able to.  That is,
9510 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9511 and the @code{References} in the current article are not mangled, you
9512 can just press @kbd{^} or @kbd{A r}
9513 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9514 you'll get the parent.  If the parent is already displayed in the
9515 summary buffer, point will just move to this article.
9516
9517 If given a positive numerical prefix, fetch that many articles back into
9518 the ancestry.  If given a negative numerical prefix, fetch just that
9519 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9520 grandparent and the grandgrandparent of the current article.  If you say
9521 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9522 article.
9523
9524 @item A R (Summary)
9525 @findex gnus-summary-refer-references
9526 @kindex A R (Summary)
9527 Fetch all articles mentioned in the @code{References} header of the
9528 article (@code{gnus-summary-refer-references}).
9529
9530 @item A T (Summary)
9531 @findex gnus-summary-refer-thread
9532 @kindex A T (Summary)
9533 Display the full thread where the current article appears
9534 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9535 headers in the current group to work, so it usually takes a while.  If
9536 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9537 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9538 visible effects normally, but it'll make this command work a whole lot
9539 faster.  Of course, it'll make group entry somewhat slow.
9540
9541 @vindex gnus-refer-thread-limit
9542 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9543 articles before the first displayed in the current group) headers to
9544 fetch when doing this command.  The default is 200.  If @code{t}, all
9545 the available headers will be fetched.  This variable can be overridden
9546 by giving the @kbd{A T} command a numerical prefix.
9547
9548 @item M-^ (Summary)
9549 @findex gnus-summary-refer-article
9550 @kindex M-^ (Summary)
9551 @cindex Message-ID
9552 @cindex fetching by Message-ID
9553 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9554 matter what group it belongs to.  @kbd{M-^}
9555 (@code{gnus-summary-refer-article}) will ask you for a
9556 @code{Message-ID}, which is one of those long, hard-to-read thingies
9557 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9558 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9559 @end table
9560
9561 The current select method will be used when fetching by
9562 @code{Message-ID} from non-news select method, but you can override this
9563 by giving this command a prefix.
9564
9565 @vindex gnus-refer-article-method
9566 If the group you are reading is located on a back end that does not
9567 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9568 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9569 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9570 updating the spool you are reading from, but that's not really
9571 necessary.
9572
9573 It can also be a list of select methods, as well as the special symbol
9574 @code{current}, which means to use the current select method.  If it
9575 is a list, Gnus will try all the methods in the list until it finds a
9576 match.
9577
9578 Here's an example setting that will first try the current method, and
9579 then ask Google if that fails:
9580
9581 @lisp
9582 (setq gnus-refer-article-method
9583       '(current
9584         (nnweb "google" (nnweb-type google))))
9585 @end lisp
9586
9587 Most of the mail back ends support fetching by @code{Message-ID}, but
9588 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9589 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9590 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9591 only able to locate articles that have been posted to the current group.
9592 (Anything else would be too time consuming.)  @code{nnmh} does not
9593 support this at all.
9594
9595
9596 @node Alternative Approaches
9597 @section Alternative Approaches
9598
9599 Different people like to read news using different methods.  This being
9600 gnus, we offer a small selection of minor modes for the summary buffers.
9601
9602 @menu
9603 * Pick and Read::               First mark articles and then read them.
9604 * Binary Groups::               Auto-decode all articles.
9605 @end menu
9606
9607
9608 @node Pick and Read
9609 @subsection Pick and Read
9610 @cindex pick and read
9611
9612 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9613 a two-phased reading interface.  The user first marks in a summary
9614 buffer the articles she wants to read.  Then she starts reading the
9615 articles with just an article buffer displayed.
9616
9617 @findex gnus-pick-mode
9618 @kindex M-x gnus-pick-mode
9619 Gnus provides a summary buffer minor mode that allows
9620 this---@code{gnus-pick-mode}.  This basically means that a few process
9621 mark commands become one-keystroke commands to allow easy marking, and
9622 it provides one additional command for switching to the summary buffer.
9623
9624 Here are the available keystrokes when using pick mode:
9625
9626 @table @kbd
9627 @item .
9628 @kindex . (Pick)
9629 @findex gnus-pick-article-or-thread
9630 Pick the article or thread on the current line
9631 (@code{gnus-pick-article-or-thread}).  If the variable
9632 @code{gnus-thread-hide-subtree} is true, then this key selects the
9633 entire thread when used at the first article of the thread.  Otherwise,
9634 it selects just the article.  If given a numerical prefix, go to that
9635 thread or article and pick it.  (The line number is normally displayed
9636 at the beginning of the summary pick lines.)
9637
9638 @item SPACE
9639 @kindex SPACE (Pick)
9640 @findex gnus-pick-next-page
9641 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9642 at the end of the buffer, start reading the picked articles.
9643
9644 @item u
9645 @kindex u (Pick)
9646 @findex gnus-pick-unmark-article-or-thread.
9647 Unpick the thread or article
9648 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9649 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9650 thread if used at the first article of the thread.  Otherwise it unpicks
9651 just the article.  You can give this key a numerical prefix to unpick
9652 the thread or article at that line.
9653
9654 @item RET
9655 @kindex RET (Pick)
9656 @findex gnus-pick-start-reading
9657 @vindex gnus-pick-display-summary
9658 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9659 given a prefix, mark all unpicked articles as read first.  If
9660 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9661 will still be visible when you are reading.
9662
9663 @end table
9664
9665 All the normal summary mode commands are still available in the
9666 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9667 which is mapped to the same function
9668 @code{gnus-summary-tick-article-forward}.
9669
9670 If this sounds like a good idea to you, you could say:
9671
9672 @lisp
9673 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9674 @end lisp
9675
9676 @vindex gnus-pick-mode-hook
9677 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9678
9679 @vindex gnus-mark-unpicked-articles-as-read
9680 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9681 all unpicked articles as read.  The default is @code{nil}.
9682
9683 @vindex gnus-summary-pick-line-format
9684 The summary line format in pick mode is slightly different from the
9685 standard format.  At the beginning of each line the line number is
9686 displayed.  The pick mode line format is controlled by the
9687 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9688 Variables}).  It accepts the same format specs that
9689 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9690
9691
9692 @node Binary Groups
9693 @subsection Binary Groups
9694 @cindex binary groups
9695
9696 @findex gnus-binary-mode
9697 @kindex M-x gnus-binary-mode
9698 If you spend much time in binary groups, you may grow tired of hitting
9699 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9700 is a minor mode for summary buffers that makes all ordinary Gnus article
9701 selection functions uudecode series of articles and display the result
9702 instead of just displaying the articles the normal way.
9703
9704 @kindex g (Binary)
9705 @findex gnus-binary-show-article
9706 The only way, in fact, to see the actual articles is the @kbd{g}
9707 command, when you have turned on this mode
9708 (@code{gnus-binary-show-article}).
9709
9710 @vindex gnus-binary-mode-hook
9711 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9712
9713
9714 @node Tree Display
9715 @section Tree Display
9716 @cindex trees
9717
9718 @vindex gnus-use-trees
9719 If you don't like the normal gnus summary display, you might try setting
9720 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9721 additional @dfn{tree buffer}.  You can execute all summary mode commands
9722 in the tree buffer.
9723
9724 There are a few variables to customize the tree display, of course:
9725
9726 @table @code
9727 @item gnus-tree-mode-hook
9728 @vindex gnus-tree-mode-hook
9729 A hook called in all tree mode buffers.
9730
9731 @item gnus-tree-mode-line-format
9732 @vindex gnus-tree-mode-line-format
9733 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9734 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9735 of valid specs, @pxref{Summary Buffer Mode Line}.
9736
9737 @item gnus-selected-tree-face
9738 @vindex gnus-selected-tree-face
9739 Face used for highlighting the selected article in the tree buffer.  The
9740 default is @code{modeline}.
9741
9742 @item gnus-tree-line-format
9743 @vindex gnus-tree-line-format
9744 A format string for the tree nodes.  The name is a bit of a misnomer,
9745 though---it doesn't define a line, but just the node.  The default value
9746 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9747 the name of the poster.  It is vital that all nodes are of the same
9748 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9749
9750 Valid specs are:
9751
9752 @table @samp
9753 @item n
9754 The name of the poster.
9755 @item f
9756 The @code{From} header.
9757 @item N
9758 The number of the article.
9759 @item [
9760 The opening bracket.
9761 @item ]
9762 The closing bracket.
9763 @item s
9764 The subject.
9765 @end table
9766
9767 @xref{Formatting Variables}.
9768
9769 Variables related to the display are:
9770
9771 @table @code
9772 @item gnus-tree-brackets
9773 @vindex gnus-tree-brackets
9774 This is used for differentiating between ``real'' articles and
9775 ``sparse'' articles.  The format is
9776 @example
9777 ((@var{real-open} . @var{real-close})
9778  (@var{sparse-open} . @var{sparse-close})
9779  (@var{dummy-open} . @var{dummy-close}))
9780 @end example
9781 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9782
9783 @item gnus-tree-parent-child-edges
9784 @vindex gnus-tree-parent-child-edges
9785 This is a list that contains the characters used for connecting parent
9786 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9787
9788 @end table
9789
9790 @item gnus-tree-minimize-window
9791 @vindex gnus-tree-minimize-window
9792 If this variable is non-@code{nil}, gnus will try to keep the tree
9793 buffer as small as possible to allow more room for the other gnus
9794 windows.  If this variable is a number, the tree buffer will never be
9795 higher than that number.  The default is @code{t}.  Note that if you
9796 have several windows displayed side-by-side in a frame and the tree
9797 buffer is one of these, minimizing the tree window will also resize all
9798 other windows displayed next to it.
9799
9800 You may also wish to add the following hook to keep the window minimized
9801 at all times:
9802
9803 @lisp
9804 (add-hook 'gnus-configure-windows-hook
9805           'gnus-tree-perhaps-minimize)
9806 @end lisp
9807
9808 @item gnus-generate-tree-function
9809 @vindex gnus-generate-tree-function
9810 @findex gnus-generate-horizontal-tree
9811 @findex gnus-generate-vertical-tree
9812 The function that actually generates the thread tree.  Two predefined
9813 functions are available: @code{gnus-generate-horizontal-tree} and
9814 @code{gnus-generate-vertical-tree} (which is the default).
9815
9816 @end table
9817
9818 Here's an example from a horizontal tree buffer:
9819
9820 @example
9821 @{***@}-(***)-[odd]-[Gun]
9822      |      \[Jan]
9823      |      \[odd]-[Eri]
9824      |      \(***)-[Eri]
9825      |            \[odd]-[Paa]
9826      \[Bjo]
9827      \[Gun]
9828      \[Gun]-[Jor]
9829 @end example
9830
9831 Here's the same thread displayed in a vertical tree buffer:
9832
9833 @example
9834 @group
9835 @{***@}
9836   |--------------------------\-----\-----\
9837 (***)                         [Bjo] [Gun] [Gun]
9838   |--\-----\-----\                          |
9839 [odd] [Jan] [odd] (***)                   [Jor]
9840   |           |     |--\
9841 [Gun]       [Eri] [Eri] [odd]
9842                           |
9843                         [Paa]
9844 @end group
9845 @end example
9846
9847 If you're using horizontal trees, it might be nice to display the trees
9848 side-by-side with the summary buffer.  You could add something like the
9849 following to your @file{~/.gnus.el} file:
9850
9851 @lisp
9852 (setq gnus-use-trees t
9853       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9854       gnus-tree-minimize-window nil)
9855 (gnus-add-configuration
9856  '(article
9857    (vertical 1.0
9858              (horizontal 0.25
9859                          (summary 0.75 point)
9860                          (tree 1.0))
9861              (article 1.0))))
9862 @end lisp
9863
9864 @xref{Window Layout}.
9865
9866
9867 @node Mail Group Commands
9868 @section Mail Group Commands
9869 @cindex mail group commands
9870
9871 Some commands only make sense in mail groups.  If these commands are
9872 invalid in the current group, they will raise a hell and let you know.
9873
9874 All these commands (except the expiry and edit commands) use the
9875 process/prefix convention (@pxref{Process/Prefix}).
9876
9877 @table @kbd
9878
9879 @item B e
9880 @kindex B e (Summary)
9881 @findex gnus-summary-expire-articles
9882 Run all expirable articles in the current group through the expiry
9883 process (@code{gnus-summary-expire-articles}).  That is, delete all
9884 expirable articles in the group that have been around for a while.
9885 (@pxref{Expiring Mail}).
9886
9887 @item B C-M-e
9888 @kindex B C-M-e (Summary)
9889 @findex gnus-summary-expire-articles-now
9890 Delete all the expirable articles in the group
9891 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9892 articles eligible for expiry in the current group will
9893 disappear forever into that big @file{/dev/null} in the sky.
9894
9895 @item B DEL
9896 @kindex B DEL (Summary)
9897 @findex gnus-summary-delete-article
9898 @c @icon{gnus-summary-mail-delete}
9899 Delete the mail article.  This is ``delete'' as in ``delete it from your
9900 disk forever and ever, never to return again.'' Use with caution.
9901 (@code{gnus-summary-delete-article}).
9902
9903 @item B m
9904 @kindex B m (Summary)
9905 @cindex move mail
9906 @findex gnus-summary-move-article
9907 @vindex gnus-preserve-marks
9908 Move the article from one mail group to another
9909 (@code{gnus-summary-move-article}).  Marks will be preserved if
9910 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9911
9912 @item B c
9913 @kindex B c (Summary)
9914 @cindex copy mail
9915 @findex gnus-summary-copy-article
9916 @c @icon{gnus-summary-mail-copy}
9917 Copy the article from one group (mail group or not) to a mail group
9918 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9919 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9920
9921 @item B B
9922 @kindex B B (Summary)
9923 @cindex crosspost mail
9924 @findex gnus-summary-crosspost-article
9925 Crosspost the current article to some other group
9926 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9927 the article in the other group, and the Xref headers of the article will
9928 be properly updated.
9929
9930 @item B i
9931 @kindex B i (Summary)
9932 @findex gnus-summary-import-article
9933 Import an arbitrary file into the current mail newsgroup
9934 (@code{gnus-summary-import-article}).  You will be prompted for a file
9935 name, a @code{From} header and a @code{Subject} header.
9936
9937 @item B I
9938 @kindex B I (Summary)
9939 @findex gnus-summary-create-article
9940 Create an empty article in the current mail newsgroups
9941 (@code{gnus-summary-create-article}).  You will be prompted for a
9942 @code{From} header and a @code{Subject} header.
9943
9944 @item B r
9945 @kindex B r (Summary)
9946 @findex gnus-summary-respool-article
9947 @vindex gnus-summary-respool-default-method
9948 Respool the mail article (@code{gnus-summary-respool-article}).
9949 @code{gnus-summary-respool-default-method} will be used as the default
9950 select method when respooling.  This variable is @code{nil} by default,
9951 which means that the current group select method will be used instead.
9952 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9953 (which is the default).
9954
9955 @item B w
9956 @itemx e
9957 @kindex B w (Summary)
9958 @kindex e (Summary)
9959 @findex gnus-summary-edit-article
9960 @kindex C-c C-c (Article)
9961 @findex gnus-summary-edit-article-done
9962 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9963 editing and make the changes permanent, type @kbd{C-c C-c}
9964 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9965 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9966
9967 @item B q
9968 @kindex B q (Summary)
9969 @findex gnus-summary-respool-query
9970 If you want to re-spool an article, you might be curious as to what group
9971 the article will end up in before you do the re-spooling.  This command
9972 will tell you (@code{gnus-summary-respool-query}).
9973
9974 @item B t
9975 @kindex B t (Summary)
9976 @findex gnus-summary-respool-trace
9977 Similarly, this command will display all fancy splitting patterns used
9978 when respooling, if any (@code{gnus-summary-respool-trace}).
9979
9980 @item B p
9981 @kindex B p (Summary)
9982 @findex gnus-summary-article-posted-p
9983 Some people have a tendency to send you ``courtesy'' copies when they
9984 follow up to articles you have posted.  These usually have a
9985 @code{Newsgroups} header in them, but not always.  This command
9986 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9987 article from your news server (or rather, from
9988 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9989 report back whether it found the article or not.  Even if it says that
9990 it didn't find the article, it may have been posted anyway---mail
9991 propagation is much faster than news propagation, and the news copy may
9992 just not have arrived yet.
9993
9994 @item K E
9995 @kindex K E (Summary)
9996 @findex gnus-article-encrypt-body
9997 @vindex gnus-article-encrypt-protocol
9998 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9999 The body is encrypted with the encryption protocol specified by the
10000 variable @code{gnus-article-encrypt-protocol}.
10001
10002 @end table
10003
10004 @vindex gnus-move-split-methods
10005 @cindex moving articles
10006 If you move (or copy) articles regularly, you might wish to have gnus
10007 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10008 variable that uses the same syntax as @code{gnus-split-methods}
10009 (@pxref{Saving Articles}).  You may customize that variable to create
10010 suggestions you find reasonable.  (Note that
10011 @code{gnus-move-split-methods} uses group names where
10012 @code{gnus-split-methods} uses file names.)
10013
10014 @lisp
10015 (setq gnus-move-split-methods
10016       '(("^From:.*Lars Magne" "nnml:junk")
10017         ("^Subject:.*gnus" "nnfolder:important")
10018         (".*" "nnml:misc")))
10019 @end lisp
10020
10021
10022 @node Various Summary Stuff
10023 @section Various Summary Stuff
10024
10025 @menu
10026 * Summary Group Information::   Information oriented commands.
10027 * Searching for Articles::      Multiple article commands.
10028 * Summary Generation Commands::
10029 * Really Various Summary Commands::  Those pesky non-conformant commands.
10030 @end menu
10031
10032 @table @code
10033 @vindex gnus-summary-display-while-building
10034 @item gnus-summary-display-while-building
10035 If non-@code{nil}, show and update the summary buffer as it's being
10036 built.  If @code{t}, update the buffer after every line is inserted.
10037 If the value is an integer, @var{n}, update the display every @var{n}
10038 lines.  The default is @code{nil}.
10039
10040 @vindex gnus-summary-display-arrow
10041 @item gnus-summary-display-arrow
10042 If non-@code{nil}, display an arrow in the fringe to indicate the
10043 current article.
10044
10045 @vindex gnus-summary-mode-hook
10046 @item gnus-summary-mode-hook
10047 This hook is called when creating a summary mode buffer.
10048
10049 @vindex gnus-summary-generate-hook
10050 @item gnus-summary-generate-hook
10051 This is called as the last thing before doing the threading and the
10052 generation of the summary buffer.  It's quite convenient for customizing
10053 the threading variables based on what data the newsgroup has.  This hook
10054 is called from the summary buffer after most summary buffer variables
10055 have been set.
10056
10057 @vindex gnus-summary-prepare-hook
10058 @item gnus-summary-prepare-hook
10059 It is called after the summary buffer has been generated.  You might use
10060 it to, for instance, highlight lines or modify the look of the buffer in
10061 some other ungodly manner.  I don't care.
10062
10063 @vindex gnus-summary-prepared-hook
10064 @item gnus-summary-prepared-hook
10065 A hook called as the very last thing after the summary buffer has been
10066 generated.
10067
10068 @vindex gnus-summary-ignore-duplicates
10069 @item gnus-summary-ignore-duplicates
10070 When gnus discovers two articles that have the same @code{Message-ID},
10071 it has to do something drastic.  No articles are allowed to have the
10072 same @code{Message-ID}, but this may happen when reading mail from some
10073 sources.  Gnus allows you to customize what happens with this variable.
10074 If it is @code{nil} (which is the default), gnus will rename the
10075 @code{Message-ID} (for display purposes only) and display the article as
10076 any other article.  If this variable is @code{t}, it won't display the
10077 article---it'll be as if it never existed.
10078
10079 @vindex gnus-alter-articles-to-read-function
10080 @item gnus-alter-articles-to-read-function
10081 This function, which takes two parameters (the group name and the list
10082 of articles to be selected), is called to allow the user to alter the
10083 list of articles to be selected.
10084
10085 For instance, the following function adds the list of cached articles to
10086 the list in one particular group:
10087
10088 @lisp
10089 (defun my-add-cached-articles (group articles)
10090   (if (string= group "some.group")
10091       (append gnus-newsgroup-cached articles)
10092     articles))
10093 @end lisp
10094
10095 @vindex gnus-newsgroup-variables
10096 @item gnus-newsgroup-variables
10097 A list of newsgroup (summary buffer) local variables, or cons of
10098 variables and their default values (when the default values are not
10099 @code{nil}), that should be made global while the summary buffer is
10100 active.  These variables can be used to set variables in the group
10101 parameters while still allowing them to affect operations done in
10102 other buffers.  For example:
10103
10104 @lisp
10105 (setq gnus-newsgroup-variables
10106       '(message-use-followup-to
10107         (gnus-visible-headers .
10108  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10109 @end lisp
10110
10111 @end table
10112
10113
10114 @node Summary Group Information
10115 @subsection Summary Group Information
10116
10117 @table @kbd
10118
10119 @item H f
10120 @kindex H f (Summary)
10121 @findex gnus-summary-fetch-faq
10122 @vindex gnus-group-faq-directory
10123 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10124 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10125 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10126 is usually a directory on a remote machine.  This variable can also be
10127 a list of directories.  In that case, giving a prefix to this command
10128 will allow you to choose between the various sites.  @code{ange-ftp}
10129 or @code{efs} will probably be used for fetching the file.
10130
10131 @item H d
10132 @kindex H d (Summary)
10133 @findex gnus-summary-describe-group
10134 Give a brief description of the current group
10135 (@code{gnus-summary-describe-group}).  If given a prefix, force
10136 rereading the description from the server.
10137
10138 @item H h
10139 @kindex H h (Summary)
10140 @findex gnus-summary-describe-briefly
10141 Give an extremely brief description of the most important summary
10142 keystrokes (@code{gnus-summary-describe-briefly}).
10143
10144 @item H i
10145 @kindex H i (Summary)
10146 @findex gnus-info-find-node
10147 Go to the gnus info node (@code{gnus-info-find-node}).
10148 @end table
10149
10150
10151 @node Searching for Articles
10152 @subsection Searching for Articles
10153
10154 @table @kbd
10155
10156 @item M-s
10157 @kindex M-s (Summary)
10158 @findex gnus-summary-search-article-forward
10159 Search through all subsequent (raw) articles for a regexp
10160 (@code{gnus-summary-search-article-forward}).
10161
10162 @item M-r
10163 @kindex M-r (Summary)
10164 @findex gnus-summary-search-article-backward
10165 Search through all previous (raw) articles for a regexp
10166 (@code{gnus-summary-search-article-backward}).
10167
10168 @item &
10169 @kindex & (Summary)
10170 @findex gnus-summary-execute-command
10171 This command will prompt you for a header, a regular expression to match
10172 on this field, and a command to be executed if the match is made
10173 (@code{gnus-summary-execute-command}).  If the header is an empty
10174 string, the match is done on the entire article.  If given a prefix,
10175 search backward instead.
10176
10177 For instance, @kbd{& RET some.*string #} will put the process mark on
10178 all articles that have heads or bodies that match @samp{some.*string}.
10179
10180 @item M-&
10181 @kindex M-& (Summary)
10182 @findex gnus-summary-universal-argument
10183 Perform any operation on all articles that have been marked with
10184 the process mark (@code{gnus-summary-universal-argument}).
10185 @end table
10186
10187 @node Summary Generation Commands
10188 @subsection Summary Generation Commands
10189
10190 @table @kbd
10191
10192 @item Y g
10193 @kindex Y g (Summary)
10194 @findex gnus-summary-prepare
10195 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10196
10197 @item Y c
10198 @kindex Y c (Summary)
10199 @findex gnus-summary-insert-cached-articles
10200 Pull all cached articles (for the current group) into the summary buffer
10201 (@code{gnus-summary-insert-cached-articles}).
10202
10203 @item Y d
10204 @kindex Y d (Summary)
10205 @findex gnus-summary-insert-dormant-articles
10206 Pull all dormant articles (for the current group) into the summary buffer
10207 (@code{gnus-summary-insert-dormant-articles}).
10208
10209 @end table
10210
10211
10212 @node Really Various Summary Commands
10213 @subsection Really Various Summary Commands
10214
10215 @table @kbd
10216
10217 @item A D
10218 @itemx C-d
10219 @kindex C-d (Summary)
10220 @kindex A D (Summary)
10221 @findex gnus-summary-enter-digest-group
10222 If the current article is a collection of other articles (for instance,
10223 a digest), you might use this command to enter a group based on the that
10224 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10225 guess what article type is currently displayed unless you give a prefix
10226 to this command, which forces a ``digest'' interpretation.  Basically,
10227 whenever you see a message that is a collection of other messages of
10228 some format, you @kbd{C-d} and read these messages in a more convenient
10229 fashion.
10230
10231 @item C-M-d
10232 @kindex C-M-d (Summary)
10233 @findex gnus-summary-read-document
10234 This command is very similar to the one above, but lets you gather
10235 several documents into one biiig group
10236 (@code{gnus-summary-read-document}).  It does this by opening several
10237 @code{nndoc} groups for each document, and then opening an
10238 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10239 command understands the process/prefix convention
10240 (@pxref{Process/Prefix}).
10241
10242 @item C-t
10243 @kindex C-t (Summary)
10244 @findex gnus-summary-toggle-truncation
10245 Toggle truncation of summary lines
10246 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10247 line centering function in the summary buffer, so it's not a good idea
10248 to have truncation switched off while reading articles.
10249
10250 @item =
10251 @kindex = (Summary)
10252 @findex gnus-summary-expand-window
10253 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10254 If given a prefix, force an @code{article} window configuration.
10255
10256 @item C-M-e
10257 @kindex C-M-e (Summary)
10258 @findex gnus-summary-edit-parameters
10259 Edit the group parameters (@pxref{Group Parameters}) of the current
10260 group (@code{gnus-summary-edit-parameters}).
10261
10262 @item C-M-a
10263 @kindex C-M-a (Summary)
10264 @findex gnus-summary-customize-parameters
10265 Customize the group parameters (@pxref{Group Parameters}) of the current
10266 group (@code{gnus-summary-customize-parameters}).
10267
10268 @end table
10269
10270
10271 @node Exiting the Summary Buffer
10272 @section Exiting the Summary Buffer
10273 @cindex summary exit
10274 @cindex exiting groups
10275
10276 Exiting from the summary buffer will normally update all info on the
10277 group and return you to the group buffer.
10278
10279 @table @kbd
10280
10281 @item Z Z
10282 @itemx q
10283 @kindex Z Z (Summary)
10284 @kindex q (Summary)
10285 @findex gnus-summary-exit
10286 @vindex gnus-summary-exit-hook
10287 @vindex gnus-summary-prepare-exit-hook
10288 @vindex gnus-group-no-more-groups-hook
10289 @c @icon{gnus-summary-exit}
10290 Exit the current group and update all information on the group
10291 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10292 called before doing much of the exiting, which calls
10293 @code{gnus-summary-expire-articles} by default.
10294 @code{gnus-summary-exit-hook} is called after finishing the exit
10295 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10296 group mode having no more (unread) groups.
10297
10298 @item Z E
10299 @itemx Q
10300 @kindex Z E (Summary)
10301 @kindex Q (Summary)
10302 @findex gnus-summary-exit-no-update
10303 Exit the current group without updating any information on the group
10304 (@code{gnus-summary-exit-no-update}).
10305
10306 @item Z c
10307 @itemx c
10308 @kindex Z c (Summary)
10309 @kindex c (Summary)
10310 @findex gnus-summary-catchup-and-exit
10311 @c @icon{gnus-summary-catchup-and-exit}
10312 Mark all unticked articles in the group as read and then exit
10313 (@code{gnus-summary-catchup-and-exit}).
10314
10315 @item Z C
10316 @kindex Z C (Summary)
10317 @findex gnus-summary-catchup-all-and-exit
10318 Mark all articles, even the ticked ones, as read and then exit
10319 (@code{gnus-summary-catchup-all-and-exit}).
10320
10321 @item Z n
10322 @kindex Z n (Summary)
10323 @findex gnus-summary-catchup-and-goto-next-group
10324 Mark all articles as read and go to the next group
10325 (@code{gnus-summary-catchup-and-goto-next-group}).
10326
10327 @item Z R
10328 @kindex Z R (Summary)
10329 @findex gnus-summary-reselect-current-group
10330 Exit this group, and then enter it again
10331 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10332 all articles, both read and unread.
10333
10334 @item Z G
10335 @itemx M-g
10336 @kindex Z G (Summary)
10337 @kindex M-g (Summary)
10338 @findex gnus-summary-rescan-group
10339 @c @icon{gnus-summary-mail-get}
10340 Exit the group, check for new articles in the group, and select the
10341 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10342 articles, both read and unread.
10343
10344 @item Z N
10345 @kindex Z N (Summary)
10346 @findex gnus-summary-next-group
10347 Exit the group and go to the next group
10348 (@code{gnus-summary-next-group}).
10349
10350 @item Z P
10351 @kindex Z P (Summary)
10352 @findex gnus-summary-prev-group
10353 Exit the group and go to the previous group
10354 (@code{gnus-summary-prev-group}).
10355
10356 @item Z s
10357 @kindex Z s (Summary)
10358 @findex gnus-summary-save-newsrc
10359 Save the current number of read/marked articles in the dribble buffer
10360 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10361 given a prefix, also save the @file{.newsrc} file(s).  Using this
10362 command will make exit without updating (the @kbd{Q} command) worthless.
10363 @end table
10364
10365 @vindex gnus-exit-group-hook
10366 @code{gnus-exit-group-hook} is called when you exit the current group
10367 with an ``updating'' exit.  For instance @kbd{Q}
10368 (@code{gnus-summary-exit-no-update}) does not call this hook.
10369
10370 @findex gnus-summary-wake-up-the-dead
10371 @findex gnus-dead-summary-mode
10372 @vindex gnus-kill-summary-on-exit
10373 If you're in the habit of exiting groups, and then changing your mind
10374 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10375 If you do that, gnus won't kill the summary buffer when you exit it.
10376 (Quelle surprise!)  Instead it will change the name of the buffer to
10377 something like @samp{*Dead Summary ... *} and install a minor mode
10378 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10379 buffer, you'll find that all keys are mapped to a function called
10380 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10381 summary buffer will result in a live, normal summary buffer.
10382
10383 There will never be more than one dead summary buffer at any one time.
10384
10385 @vindex gnus-use-cross-reference
10386 The data on the current group will be updated (which articles you have
10387 read, which articles you have replied to, etc.) when you exit the
10388 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10389 @code{t} (which is the default), articles that are cross-referenced to
10390 this group and are marked as read, will also be marked as read in the
10391 other subscribed groups they were cross-posted to.  If this variable is
10392 neither @code{nil} nor @code{t}, the article will be marked as read in
10393 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10394
10395
10396 @node Crosspost Handling
10397 @section Crosspost Handling
10398
10399 @cindex velveeta
10400 @cindex spamming
10401 Marking cross-posted articles as read ensures that you'll never have to
10402 read the same article more than once.  Unless, of course, somebody has
10403 posted it to several groups separately.  Posting the same article to
10404 several groups (not cross-posting) is called @dfn{spamming}, and you are
10405 by law required to send nasty-grams to anyone who perpetrates such a
10406 heinous crime.  You may want to try NoCeM handling to filter out spam
10407 (@pxref{NoCeM}).
10408
10409 Remember: Cross-posting is kinda ok, but posting the same article
10410 separately to several groups is not.  Massive cross-posting (aka.
10411 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10412 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10413 excessive crossposting (@pxref{Summary Mail Commands}).
10414
10415 @cindex cross-posting
10416 @cindex Xref
10417 @cindex @acronym{NOV}
10418 One thing that may cause Gnus to not do the cross-posting thing
10419 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10420 (which is very nice, because it speeds things up considerably) which
10421 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10422 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10423 even with @sc{xover} by registering the @code{Xref} lines of all
10424 articles you actually read, but if you kill the articles, or just mark
10425 them as read without reading them, Gnus will not get a chance to snoop
10426 the @code{Xref} lines out of these articles, and will be unable to use
10427 the cross reference mechanism.
10428
10429 @cindex LIST overview.fmt
10430 @cindex overview.fmt
10431 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10432 in its overview files, try @samp{telnet your.nntp.server nntp},
10433 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10434 overview.fmt}.  This may not work, but if it does, and the last line you
10435 get does not read @samp{Xref:full}, then you should shout and whine at
10436 your news admin until she includes the @code{Xref} header in the
10437 overview files.
10438
10439 @vindex gnus-nov-is-evil
10440 If you want Gnus to get the @code{Xref}s right all the time, you have to
10441 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10442 considerably.
10443
10444 C'est la vie.
10445
10446 For an alternative approach, @pxref{Duplicate Suppression}.
10447
10448
10449 @node Duplicate Suppression
10450 @section Duplicate Suppression
10451
10452 By default, gnus tries to make sure that you don't have to read the same
10453 article more than once by utilizing the crossposting mechanism
10454 (@pxref{Crosspost Handling}).  However, that simple and efficient
10455 approach may not work satisfactory for some users for various
10456 reasons.
10457
10458 @enumerate
10459 @item
10460 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10461 is evil and not very common.
10462
10463 @item
10464 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10465 @file{.overview} data bases.  This is evil and all too common, alas.
10466
10467 @item
10468 You may be reading the same group (or several related groups) from
10469 different @acronym{NNTP} servers.
10470
10471 @item
10472 You may be getting mail that duplicates articles posted to groups.
10473 @end enumerate
10474
10475 I'm sure there are other situations where @code{Xref} handling fails as
10476 well, but these four are the most common situations.
10477
10478 If, and only if, @code{Xref} handling fails for you, then you may
10479 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10480 will remember the @code{Message-ID}s of all articles you have read or
10481 otherwise marked as read, and then, as if by magic, mark them as read
10482 all subsequent times you see them---in @emph{all} groups.  Using this
10483 mechanism is quite likely to be somewhat inefficient, but not overly
10484 so.  It's certainly preferable to reading the same articles more than
10485 once.
10486
10487 Duplicate suppression is not a very subtle instrument.  It's more like a
10488 sledge hammer than anything else.  It works in a very simple
10489 fashion---if you have marked an article as read, it adds this Message-ID
10490 to a cache.  The next time it sees this Message-ID, it will mark the
10491 article as read with the @samp{M} mark.  It doesn't care what group it
10492 saw the article in.
10493
10494 @table @code
10495 @item gnus-suppress-duplicates
10496 @vindex gnus-suppress-duplicates
10497 If non-@code{nil}, suppress duplicates.
10498
10499 @item gnus-save-duplicate-list
10500 @vindex gnus-save-duplicate-list
10501 If non-@code{nil}, save the list of duplicates to a file.  This will
10502 make startup and shutdown take longer, so the default is @code{nil}.
10503 However, this means that only duplicate articles read in a single gnus
10504 session are suppressed.
10505
10506 @item gnus-duplicate-list-length
10507 @vindex gnus-duplicate-list-length
10508 This variable says how many @code{Message-ID}s to keep in the duplicate
10509 suppression list.  The default is 10000.
10510
10511 @item gnus-duplicate-file
10512 @vindex gnus-duplicate-file
10513 The name of the file to store the duplicate suppression list in.  The
10514 default is @file{~/News/suppression}.
10515 @end table
10516
10517 If you have a tendency to stop and start gnus often, setting
10518 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10519 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10520 the other hand, saving the list makes startup and shutdown much slower,
10521 so that means that if you stop and start gnus often, you should set
10522 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10523 to you to figure out, I think.
10524
10525 @node Security
10526 @section Security
10527
10528 Gnus is able to verify signed messages or decrypt encrypted messages.
10529 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10530 and @acronym{S/MIME}, however you need some external programs to get
10531 things to work:
10532
10533 @enumerate
10534 @item
10535 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10536 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10537 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10538 Manual}), but Mailcrypt and gpg.el are also supported.
10539
10540 @item
10541 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10542 or newer is recommended.
10543
10544 @end enumerate
10545
10546 More information on how to set things up can be found in the message
10547 manual (@pxref{Security, ,Security, message, Message Manual}).
10548
10549 @table @code
10550 @item mm-verify-option
10551 @vindex mm-verify-option
10552 Option of verifying signed parts.  @code{never}, not verify;
10553 @code{always}, always verify; @code{known}, only verify known
10554 protocols.  Otherwise, ask user.
10555
10556 @item mm-decrypt-option
10557 @vindex mm-decrypt-option
10558 Option of decrypting encrypted parts.  @code{never}, no decryption;
10559 @code{always}, always decrypt; @code{known}, only decrypt known
10560 protocols.  Otherwise, ask user.
10561
10562 @item mml1991-use
10563 @vindex mml1991-use
10564 Symbol indicating elisp interface to OpenPGP implementation for
10565 @acronym{PGP} messages.  The default is @code{pgg}, but
10566 @code{mailcrypt} and @code{gpg} are also supported although
10567 deprecated.
10568
10569 @item mml2015-use
10570 @vindex mml2015-use
10571 Symbol indicating elisp interface to OpenPGP implementation for
10572 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10573 @code{mailcrypt} and @code{gpg} are also supported although
10574 deprecated.
10575
10576 @end table
10577
10578 @cindex snarfing keys
10579 @cindex importing PGP keys
10580 @cindex PGP key ring import
10581 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10582 key ring) is not supported explicitly through a menu item or command,
10583 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10584 allowing you to specify whatever action you think is appropriate
10585 through the usual @acronym{MIME} infrastructure.  You can use a
10586 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10587 Emacs MIME Manual}) such as the following to import keys using GNU
10588 Privacy Guard when you click on the @acronym{MIME} button
10589 (@pxref{Using MIME}).
10590
10591 @example
10592 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10593 @end example
10594 @noindent
10595 This happens to also be the default action defined in
10596 @code{mailcap-mime-data}.
10597
10598 @node Mailing List
10599 @section Mailing List
10600 @cindex mailing list
10601 @cindex RFC 2396
10602
10603 @kindex A M (summary)
10604 @findex gnus-mailing-list-insinuate
10605 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10606 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10607 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10608 summary buffer.
10609
10610 That enables the following commands to the summary buffer:
10611
10612 @table @kbd
10613
10614 @item C-c C-n h
10615 @kindex C-c C-n h (Summary)
10616 @findex gnus-mailing-list-help
10617 Send a message to fetch mailing list help, if List-Help field exists.
10618
10619 @item C-c C-n s
10620 @kindex C-c C-n s (Summary)
10621 @findex gnus-mailing-list-subscribe
10622 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10623
10624 @item C-c C-n u
10625 @kindex C-c C-n u (Summary)
10626 @findex gnus-mailing-list-unsubscribe
10627 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10628 field exists.
10629
10630 @item C-c C-n p
10631 @kindex C-c C-n p (Summary)
10632 @findex gnus-mailing-list-post
10633 Post to the mailing list, if List-Post field exists.
10634
10635 @item C-c C-n o
10636 @kindex C-c C-n o (Summary)
10637 @findex gnus-mailing-list-owner
10638 Send a message to the mailing list owner, if List-Owner field exists.
10639
10640 @item C-c C-n a
10641 @kindex C-c C-n a (Summary)
10642 @findex gnus-mailing-list-owner
10643 Browse the mailing list archive, if List-Archive field exists.
10644
10645 @end table
10646
10647
10648 @node Article Buffer
10649 @chapter Article Buffer
10650 @cindex article buffer
10651
10652 The articles are displayed in the article buffer, of which there is only
10653 one.  All the summary buffers share the same article buffer unless you
10654 tell gnus otherwise.
10655
10656 @menu
10657 * Hiding Headers::              Deciding what headers should be displayed.
10658 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10659 * Customizing Articles::        Tailoring the look of the articles.
10660 * Article Keymap::              Keystrokes available in the article buffer.
10661 * Misc Article::                Other stuff.
10662 @end menu
10663
10664
10665 @node Hiding Headers
10666 @section Hiding Headers
10667 @cindex hiding headers
10668 @cindex deleting headers
10669
10670 The top section of each article is the @dfn{head}.  (The rest is the
10671 @dfn{body}, but you may have guessed that already.)
10672
10673 @vindex gnus-show-all-headers
10674 There is a lot of useful information in the head: the name of the person
10675 who wrote the article, the date it was written and the subject of the
10676 article.  That's well and nice, but there's also lots of information
10677 most people do not want to see---what systems the article has passed
10678 through before reaching you, the @code{Message-ID}, the
10679 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10680 of some of those lines.  If you want to keep all those lines in the
10681 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10682
10683 Gnus provides you with two variables for sifting headers:
10684
10685 @table @code
10686
10687 @item gnus-visible-headers
10688 @vindex gnus-visible-headers
10689 If this variable is non-@code{nil}, it should be a regular expression
10690 that says what headers you wish to keep in the article buffer.  All
10691 headers that do not match this variable will be hidden.
10692
10693 For instance, if you only want to see the name of the person who wrote
10694 the article and the subject, you'd say:
10695
10696 @lisp
10697 (setq gnus-visible-headers "^From:\\|^Subject:")
10698 @end lisp
10699
10700 This variable can also be a list of regexps to match headers to
10701 remain visible.
10702
10703 @item gnus-ignored-headers
10704 @vindex gnus-ignored-headers
10705 This variable is the reverse of @code{gnus-visible-headers}.  If this
10706 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10707 should be a regular expression that matches all lines that you want to
10708 hide.  All lines that do not match this variable will remain visible.
10709
10710 For instance, if you just want to get rid of the @code{References} field
10711 and the @code{Xref} field, you might say:
10712
10713 @lisp
10714 (setq gnus-ignored-headers "^References:\\|^Xref:")
10715 @end lisp
10716
10717 This variable can also be a list of regexps to match headers to
10718 be removed.
10719
10720 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10721 variable will have no effect.
10722
10723 @end table
10724
10725 @vindex gnus-sorted-header-list
10726 Gnus can also sort the headers for you.  (It does this by default.)  You
10727 can control the sorting by setting the @code{gnus-sorted-header-list}
10728 variable.  It is a list of regular expressions that says in what order
10729 the headers are to be displayed.
10730
10731 For instance, if you want the name of the author of the article first,
10732 and then the subject, you might say something like:
10733
10734 @lisp
10735 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10736 @end lisp
10737
10738 Any headers that are to remain visible, but are not listed in this
10739 variable, will be displayed in random order after all the headers listed in this variable.
10740
10741 @findex gnus-article-hide-boring-headers
10742 @vindex gnus-boring-article-headers
10743 You can hide further boring headers by setting
10744 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10745 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10746 list, but this list doesn't actually contain header names.  Instead is
10747 lists various @dfn{boring conditions} that Gnus can check and remove
10748 from sight.
10749
10750 These conditions are:
10751 @table @code
10752 @item empty
10753 Remove all empty headers.
10754 @item followup-to
10755 Remove the @code{Followup-To} header if it is identical to the
10756 @code{Newsgroups} header.
10757 @item reply-to
10758 Remove the @code{Reply-To} header if it lists the same address as the
10759 @code{From} header, or if the @code{broken-reply-to} group parameter is
10760 set.
10761 @item newsgroups
10762 Remove the @code{Newsgroups} header if it only contains the current group
10763 name.
10764 @item to-address
10765 Remove the @code{To} header if it only contains the address identical to
10766 the current group's @code{to-address} parameter.
10767 @item to-list
10768 Remove the @code{To} header if it only contains the address identical to
10769 the current group's @code{to-list} parameter.
10770 @item cc-list
10771 Remove the @code{CC} header if it only contains the address identical to
10772 the current group's @code{to-list} parameter.
10773 @item date
10774 Remove the @code{Date} header if the article is less than three days
10775 old.
10776 @item long-to
10777 Remove the @code{To} header if it is very long.
10778 @item many-to
10779 Remove all @code{To} headers if there are more than one.
10780 @end table
10781
10782 To include these three elements, you could say something like:
10783
10784 @lisp
10785 (setq gnus-boring-article-headers
10786       '(empty followup-to reply-to))
10787 @end lisp
10788
10789 This is also the default value for this variable.
10790
10791
10792 @node Using MIME
10793 @section Using MIME
10794 @cindex @acronym{MIME}
10795
10796 Mime is a standard for waving your hands through the air, aimlessly,
10797 while people stand around yawning.
10798
10799 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10800 while all newsreaders die of fear.
10801
10802 @acronym{MIME} may specify what character set the article uses, the encoding
10803 of the characters, and it also makes it possible to embed pictures and
10804 other naughty stuff in innocent-looking articles.
10805
10806 @vindex gnus-show-mime
10807 @vindex gnus-article-display-method-for-mime
10808 @findex gnus-article-display-mime-message
10809 gnus handles @acronym{MIME} by pushing the articles through
10810 @code{gnus-article-display-method-for-mime}, which is
10811 @code{gnus-article-display-mime-message} by default.  This function
10812 calls the @acronym{SEMI} MIME-View program to actually do the work.  For
10813 more information on @acronym{SEMI} MIME-View, see its manual page
10814 (however it is not existed yet, sorry).
10815
10816 Set @code{gnus-show-mime} to @code{t} if you want to use
10817 @acronym{MIME} all the time.  If you have @code{gnus-show-mime} set,
10818 then you'll see some unfortunate display glitches in the article buffer.
10819 These can't be avoided.
10820
10821 In GNUS or Gnus, it might be best to just use the toggling functions
10822 from the summary buffer to avoid getting nasty surprises. (For instance,
10823 you enter the group @samp{alt.sing-a-long} and, before you know it,
10824 @acronym{MIME} has decoded the sound file in the article and some
10825 horrible sing-a-long song comes screaming out your speakers, and you
10826 can't find the volume button, because there isn't one, and people are
10827 starting to look at you, and you try to stop the program, but you can't,
10828 and you can't find the program to control the volume, and everybody else
10829 in the room suddenly decides to look at you disdainfully, and you'll
10830 feel rather stupid.)
10831
10832 Any similarity to real events and people is purely coincidental.  Ahem.
10833
10834 To avoid such kind of situation, gnus stops to use
10835 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10836 non-@code{nil} every-time, then you can push button in the article
10837 buffer when there are nobody else.
10838
10839 Also @pxref{MIME Commands}.
10840
10841
10842 @node Customizing Articles
10843 @section Customizing Articles
10844 @cindex article customization
10845
10846 A slew of functions for customizing how the articles are to look like
10847 exist.  You can call these functions interactively
10848 (@pxref{Article Washing}), or you can have them
10849 called automatically when you select the articles.
10850
10851 To have them called automatically, you should set the corresponding
10852 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10853 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10854 be set, but first we discuss the values these variables can have.
10855
10856 Note: Some values, while valid, make little sense.  Check the list below
10857 for sensible values.
10858
10859 @enumerate
10860 @item
10861 @code{nil}: Don't do this treatment.
10862
10863 @item
10864 @code{t}: Do this treatment on all body parts.
10865
10866 @item
10867 @code{head}: Do the treatment on the headers.
10868
10869 @item
10870 @code{last}: Do this treatment on the last part.
10871
10872 @item
10873 An integer: Do this treatment on all body parts that have a length less
10874 than this number.
10875
10876 @item
10877 A list of strings: Do this treatment on all body parts that are in
10878 articles that are read in groups that have names that match one of the
10879 regexps in the list.
10880
10881 @item
10882 A list where the first element is not a string:
10883
10884 The list is evaluated recursively.  The first element of the list is a
10885 predicate.  The following predicates are recognized: @code{or},
10886 @code{and}, @code{not} and @code{typep}.  Here's an example:
10887
10888 @lisp
10889 (or last
10890     (typep "text/x-vcard"))
10891 @end lisp
10892
10893 @item
10894 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10895 non-nil.
10896
10897 @end enumerate
10898
10899 You may have noticed that the word @dfn{part} is used here.  This refers
10900 to the fact that some messages are @acronym{MIME} multipart articles that may
10901 be divided into several parts.  Articles that are not multiparts are
10902 considered to contain just a single part.
10903
10904 @vindex gnus-article-treat-types
10905 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10906 want to, but by default, only @samp{text/plain} parts are given the
10907 treatment.  This is controlled by the @code{gnus-article-treat-types}
10908 variable, which is a list of regular expressions that are matched to the
10909 type of the part.  This variable is ignored if the value of the
10910 controlling variable is a predicate list, as described above.
10911
10912 The following treatment options are available.  The easiest way to
10913 customize this is to examine the @code{gnus-article-treat} customization
10914 group.  Values in parenthesis are suggested sensible values.  Others are
10915 possible but those listed are probably sufficient for most people.
10916
10917 @table @code
10918 @item gnus-treat-buttonize (t, integer)
10919 @item gnus-treat-buttonize-head (head)
10920
10921 @xref{Article Buttons}.
10922
10923 @item gnus-treat-capitalize-sentences (t, integer)
10924 @item gnus-treat-overstrike (t, integer)
10925 @item gnus-treat-strip-cr (t, integer)
10926 @item gnus-treat-strip-headers-in-body (t, integer)
10927 @item gnus-treat-strip-leading-blank-lines (t, integer)
10928 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10929 @item gnus-treat-strip-pem (t, last, integer)
10930 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10931 @item gnus-treat-unsplit-urls (t, integer)
10932 @item gnus-treat-wash-html (t, integer)
10933 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10934
10935 @xref{Article Washing}.
10936
10937 @item gnus-treat-date-english (head)
10938 @item gnus-treat-date-iso8601 (head)
10939 @item gnus-treat-date-lapsed (head)
10940 @item gnus-treat-date-local (head)
10941 @item gnus-treat-date-original (head)
10942 @item gnus-treat-date-user-defined (head)
10943 @item gnus-treat-date-ut (head)
10944
10945 @xref{Article Date}.
10946
10947 @item gnus-treat-from-picon (head)
10948 @item gnus-treat-mail-picon (head)
10949 @item gnus-treat-newsgroups-picon (head)
10950
10951 @xref{Picons}.
10952
10953 @item gnus-treat-display-smileys (t, integer)
10954
10955 @item gnus-treat-body-boundary (head)
10956
10957 @vindex gnus-body-boundary-delimiter
10958 Adds a delimiter between header and body, the string used as delimiter
10959 is controlled by @code{gnus-body-boundary-delimiter}.
10960
10961 @xref{Smileys}.
10962
10963 @item gnus-treat-display-xface (head)
10964
10965 @xref{X-Face}.
10966
10967 @item gnus-treat-display-face (head)
10968
10969 @xref{Face}.
10970
10971 @item gnus-treat-emphasize (t, head, integer)
10972 @item gnus-treat-fill-article (t, integer)
10973 @item gnus-treat-fill-long-lines (t, integer)
10974 @item gnus-treat-hide-boring-headers (head)
10975 @item gnus-treat-hide-citation (t, integer)
10976 @item gnus-treat-hide-citation-maybe (t, integer)
10977 @item gnus-treat-hide-headers (head)
10978 @item gnus-treat-hide-signature (t, last)
10979 @item gnus-treat-strip-banner (t, last)
10980 @item gnus-treat-strip-list-identifiers (head)
10981
10982 @xref{Article Hiding}.
10983
10984 @item gnus-treat-highlight-citation (t, integer)
10985 @item gnus-treat-highlight-headers (head)
10986 @item gnus-treat-highlight-signature (t, last, integer)
10987
10988 @xref{Article Highlighting}.
10989
10990 @item gnus-treat-play-sounds
10991 @item gnus-treat-translate
10992 @item gnus-treat-x-pgp-sig (head)
10993
10994 @item gnus-treat-unfold-headers (head)
10995 @item gnus-treat-fold-headers (head)
10996 @item gnus-treat-fold-newsgroups (head)
10997 @item gnus-treat-leading-whitespace (head)
10998
10999 @xref{Article Header}.
11000
11001
11002 @end table
11003
11004 @vindex gnus-part-display-hook
11005 You can, of course, write your own functions to be called from
11006 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11007 part, and you can do anything you like, pretty much.  There is no
11008 information that you have to keep in the buffer---you can change
11009 everything.
11010
11011
11012 @node Article Keymap
11013 @section Article Keymap
11014
11015 Most of the keystrokes in the summary buffer can also be used in the
11016 article buffer.  They should behave as if you typed them in the summary
11017 buffer, which means that you don't actually have to have a summary
11018 buffer displayed while reading.  You can do it all from the article
11019 buffer.
11020
11021 A few additional keystrokes are available:
11022
11023 @table @kbd
11024
11025 @item SPACE
11026 @kindex SPACE (Article)
11027 @findex gnus-article-next-page
11028 Scroll forwards one page (@code{gnus-article-next-page}).
11029 This is exactly the same as @kbd{h SPACE h}.
11030
11031 @item DEL
11032 @kindex DEL (Article)
11033 @findex gnus-article-prev-page
11034 Scroll backwards one page (@code{gnus-article-prev-page}).
11035 This is exactly the same as @kbd{h DEL h}.
11036
11037 @item C-c ^
11038 @kindex C-c ^ (Article)
11039 @findex gnus-article-refer-article
11040 If point is in the neighborhood of a @code{Message-ID} and you press
11041 @kbd{C-c ^}, Gnus will try to get that article from the server
11042 (@code{gnus-article-refer-article}).
11043
11044 @item C-c C-m
11045 @kindex C-c C-m (Article)
11046 @findex gnus-article-mail
11047 Send a reply to the address near point (@code{gnus-article-mail}).  If
11048 given a prefix, include the mail.
11049
11050 @item s
11051 @kindex s (Article)
11052 @findex gnus-article-show-summary
11053 Reconfigure the buffers so that the summary buffer becomes visible
11054 (@code{gnus-article-show-summary}).
11055
11056 @item ?
11057 @kindex ? (Article)
11058 @findex gnus-article-describe-briefly
11059 Give a very brief description of the available keystrokes
11060 (@code{gnus-article-describe-briefly}).
11061
11062 @item TAB
11063 @kindex TAB (Article)
11064 @findex gnus-article-next-button
11065 Go to the next button, if any (@code{gnus-article-next-button}).  This
11066 only makes sense if you have buttonizing turned on.
11067
11068 @item M-TAB
11069 @kindex M-TAB (Article)
11070 @findex gnus-article-prev-button
11071 Go to the previous button, if any (@code{gnus-article-prev-button}).
11072
11073 @item R
11074 @kindex R (Article)
11075 @findex gnus-article-reply-with-original
11076 Send a reply to the current article and yank the current article
11077 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11078 wide reply.  If the region is active, only yank the text in the
11079 region.
11080
11081 @item F
11082 @kindex F (Article)
11083 @findex gnus-article-followup-with-original
11084 Send a followup to the current article and yank the current article
11085 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11086 a wide reply.  If the region is active, only yank the text in the
11087 region.
11088
11089
11090 @end table
11091
11092
11093 @node Misc Article
11094 @section Misc Article
11095
11096 @table @code
11097
11098 @item gnus-single-article-buffer
11099 @vindex gnus-single-article-buffer
11100 If non-@code{nil}, use the same article buffer for all the groups.
11101 (This is the default.)  If @code{nil}, each group will have its own
11102 article buffer.
11103
11104 @vindex gnus-article-decode-hook
11105 @item gnus-article-decode-hook
11106 @cindex @acronym{MIME}
11107 Hook used to decode @acronym{MIME} articles.  The default value is
11108 @code{(article-decode-charset article-decode-encoded-words)}
11109
11110 @vindex gnus-article-prepare-hook
11111 @item gnus-article-prepare-hook
11112 This hook is called right after the article has been inserted into the
11113 article buffer.  It is mainly intended for functions that do something
11114 depending on the contents; it should probably not be used for changing
11115 the contents of the article buffer.
11116
11117 @item gnus-article-mode-hook
11118 @vindex gnus-article-mode-hook
11119 Hook called in article mode buffers.
11120
11121 @item gnus-article-mode-syntax-table
11122 @vindex gnus-article-mode-syntax-table
11123 Syntax table used in article buffers.  It is initialized from
11124 @code{text-mode-syntax-table}.
11125
11126 @vindex gnus-article-over-scroll
11127 @item gnus-article-over-scroll
11128 If non-@code{nil}, allow scrolling the article buffer even when there
11129 no more new text to scroll in.  The default is @code{nil}.
11130
11131 @vindex gnus-article-mode-line-format
11132 @item gnus-article-mode-line-format
11133 This variable is a format string along the same lines as
11134 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11135 accepts the same format specifications as that variable, with two
11136 extensions:
11137
11138 @table @samp
11139
11140 @item w
11141 The @dfn{wash status} of the article.  This is a short string with one
11142 character for each possible article wash operation that may have been
11143 performed.  The characters and their meaning:
11144
11145 @table @samp
11146
11147 @item c
11148 Displayed when cited text may be hidden in the article buffer.
11149
11150 @item h
11151 Displayed when headers are hidden in the article buffer.
11152
11153 @item p
11154 Displayed when article is digitally signed or encrypted, and Gnus has
11155 hidden the security headers.  (N.B. does not tell anything about
11156 security status, i.e. good or bad signature.)
11157
11158 @item s
11159 Displayed when the signature has been hidden in the Article buffer.
11160
11161 @item o
11162 Displayed when Gnus has treated overstrike characters in the article buffer.
11163
11164 @item e
11165 Displayed when Gnus has treated emphasised strings in the article buffer.
11166
11167 @end table
11168
11169 @item m
11170 The number of @acronym{MIME} parts in the article.
11171
11172 @end table
11173
11174 @vindex gnus-break-pages
11175
11176 @item gnus-break-pages
11177 Controls whether @dfn{page breaking} is to take place.  If this variable
11178 is non-@code{nil}, the articles will be divided into pages whenever a
11179 page delimiter appears in the article.  If this variable is @code{nil},
11180 paging will not be done.
11181
11182 @item gnus-page-delimiter
11183 @vindex gnus-page-delimiter
11184 This is the delimiter mentioned above.  By default, it is @samp{^L}
11185 (formfeed).
11186
11187 @cindex IDNA
11188 @cindex internationalized domain names
11189 @vindex gnus-use-idna
11190 @item gnus-use-idna
11191 This variable controls whether Gnus performs IDNA decoding of
11192 internationalized domain names inside @samp{From}, @samp{To} and
11193 @samp{Cc} headers.  This requires
11194 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11195 variable is only enabled if you have installed it.
11196
11197 @end table
11198
11199
11200 @node Composing Messages
11201 @chapter Composing Messages
11202 @cindex composing messages
11203 @cindex messages
11204 @cindex mail
11205 @cindex sending mail
11206 @cindex reply
11207 @cindex followup
11208 @cindex post
11209 @cindex using gpg
11210 @cindex using s/mime
11211 @cindex using smime
11212
11213 @kindex C-c C-c (Post)
11214 All commands for posting and mailing will put you in a message buffer
11215 where you can edit the article all you like, before you send the
11216 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11217 Message Manual}.  Where the message will be posted/mailed to depends
11218 on your setup (@pxref{Posting Server}).
11219
11220 @menu
11221 * Mail::                        Mailing and replying.
11222 * Posting Server::              What server should you post and mail via?
11223 * Mail and Post::               Mailing and posting at the same time.
11224 * Archived Messages::           Where Gnus stores the messages you've sent.
11225 * Posting Styles::              An easier way to specify who you are.
11226 * Drafts::                      Postponing messages and rejected messages.
11227 * Rejected Articles::           What happens if the server doesn't like your article?
11228 * Signing and encrypting::      How to compose secure messages.
11229 @end menu
11230
11231 Also @pxref{Canceling and Superseding} for information on how to
11232 remove articles you shouldn't have posted.
11233
11234
11235 @node Mail
11236 @section Mail
11237
11238 Variables for customizing outgoing mail:
11239
11240 @table @code
11241 @item gnus-uu-digest-headers
11242 @vindex gnus-uu-digest-headers
11243 List of regexps to match headers included in digested messages.  The
11244 headers will be included in the sequence they are matched.  If
11245 @code{nil} include all headers.
11246
11247 @item gnus-add-to-list
11248 @vindex gnus-add-to-list
11249 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11250 that have none when you do a @kbd{a}.
11251
11252 @item gnus-confirm-mail-reply-to-news
11253 @vindex gnus-confirm-mail-reply-to-news
11254 This can also be a function receiving the group name as the only
11255 parameter which should return non-@code{nil} if a confirmation is
11256 needed, or a regular expression matching group names, where
11257 confirmation is should be asked for.
11258
11259 If you find yourself never wanting to reply to mail, but occasionally
11260 press R anyway, this variable might be for you.
11261
11262 @item gnus-confirm-treat-mail-like-news
11263 @vindex gnus-confirm-treat-mail-like-news
11264 If non-@code{nil}, Gnus also requests confirmation according to
11265 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11266 useful for treating mailing lists like newsgroups.
11267
11268 @end table
11269
11270
11271 @node Posting Server
11272 @section Posting Server
11273
11274 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11275 (extremely intelligent, of course) article, where does it go?
11276
11277 Thank you for asking.  I hate you.
11278
11279 It can be quite complicated.
11280
11281 @vindex gnus-post-method
11282 When posting news, Message usually invokes @code{message-send-news}
11283 (@pxref{News Variables, , News Variables, message, Message Manual}).
11284 Normally, Gnus will post using the same select method as you're
11285 reading from (which might be convenient if you're reading lots of
11286 groups from different private servers).  However.  If the server
11287 you're reading from doesn't allow posting, just reading, you probably
11288 want to use some other server to post your (extremely intelligent and
11289 fabulously interesting) articles.  You can then set the
11290 @code{gnus-post-method} to some other method:
11291
11292 @lisp
11293 (setq gnus-post-method '(nnspool ""))
11294 @end lisp
11295
11296 Now, if you've done this, and then this server rejects your article, or
11297 this server is down, what do you do then?  To override this variable you
11298 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11299 the ``current'' server, to get back the default behavior, for posting.
11300
11301 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11302 gnus will prompt you for what method to use for posting.
11303
11304 You can also set @code{gnus-post-method} to a list of select methods.
11305 If that's the case, gnus will always prompt you for what method to use
11306 for posting.
11307
11308 Finally, if you want to always post using the native select method,
11309 you can set this variable to @code{native}.
11310
11311 When sending mail, Message invokes @code{message-send-mail-function}.
11312 The default function, @code{message-send-mail-with-sendmail}, pipes
11313 your article to the @code{sendmail} binary for further queuing and
11314 sending.  When your local system is not configured for sending mail
11315 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11316 server, you can set @code{message-send-mail-function} to
11317 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11318 package correctly.  An example:
11319
11320 @lisp
11321 (setq message-send-mail-function 'smtpmail-send-it
11322       smtpmail-default-smtp-server "YOUR SMTP HOST")
11323 ;; The following variable needs to be set because of the FLIM version of
11324 ;; smtpmail.el.  Which smtpmail.el is used depends on the `load-path'.
11325 (setq smtp-default-smtp-server "YOUR SMTP HOST")
11326 @end lisp
11327
11328 To the thing similar to this, there is
11329 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11330 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11331 documentation for the function @code{mail-source-touch-pop}.
11332
11333 Other possible choices for @code{message-send-mail-function} includes
11334 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11335 and @code{feedmail-send-it}.
11336
11337 @node Mail and Post
11338 @section Mail and Post
11339
11340 Here's a list of variables relevant to both mailing and
11341 posting:
11342
11343 @table @code
11344 @item gnus-mailing-list-groups
11345 @findex gnus-mailing-list-groups
11346 @cindex mailing lists
11347
11348 If your news server offers groups that are really mailing lists
11349 gatewayed to the @acronym{NNTP} server, you can read those groups without
11350 problems, but you can't post/followup to them without some difficulty.
11351 One solution is to add a @code{to-address} to the group parameters
11352 (@pxref{Group Parameters}).  An easier thing to do is set the
11353 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11354 really are mailing lists.  Then, at least, followups to the mailing
11355 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11356 still a pain, though.
11357
11358 @item gnus-user-agent
11359 @vindex gnus-user-agent
11360 @cindex User-Agent
11361
11362 This variable controls which information should be exposed in the
11363 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11364 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11365 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11366 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11367 system type) or a custom string.  If you set it to a string, be sure to
11368 use a valid format, see RFC 2616.
11369
11370 @end table
11371
11372 You may want to do spell-checking on messages that you send out.  Or, if
11373 you don't want to spell-check by hand, you could add automatic
11374 spell-checking via the @code{ispell} package:
11375
11376 @cindex ispell
11377 @findex ispell-message
11378 @lisp
11379 (add-hook 'message-send-hook 'ispell-message)
11380 @end lisp
11381
11382 If you want to change the @code{ispell} dictionary based on what group
11383 you're in, you could say something like the following:
11384
11385 @lisp
11386 (add-hook 'gnus-select-group-hook
11387           (lambda ()
11388             (cond
11389              ((string-match
11390                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11391               (ispell-change-dictionary "deutsch"))
11392              (t
11393               (ispell-change-dictionary "english")))))
11394 @end lisp
11395
11396 Modify to suit your needs.
11397
11398
11399 @node Archived Messages
11400 @section Archived Messages
11401 @cindex archived messages
11402 @cindex sent messages
11403
11404 Gnus provides a few different methods for storing the mail and news you
11405 send.  The default method is to use the @dfn{archive virtual server} to
11406 store the messages.  If you want to disable this completely, the
11407 @code{gnus-message-archive-group} variable should be @code{nil}, which
11408 is the default.
11409
11410 For archiving interesting messages in a group you read, see the
11411 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11412 Group Commands}).
11413
11414 @vindex gnus-message-archive-method
11415 @code{gnus-message-archive-method} says what virtual server gnus is to
11416 use to store sent messages.  The default is:
11417
11418 @lisp
11419 (nnfolder "archive"
11420           (nnfolder-directory   "~/Mail/archive")
11421           (nnfolder-active-file "~/Mail/archive/active")
11422           (nnfolder-get-new-mail nil)
11423           (nnfolder-inhibit-expiry t))
11424 @end lisp
11425
11426 You can, however, use any mail select method (@code{nnml},
11427 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11428 for doing this sort of thing, though.  If you don't like the default
11429 directory chosen, you could say something like:
11430
11431 @lisp
11432 (setq gnus-message-archive-method
11433       '(nnfolder "archive"
11434                  (nnfolder-inhibit-expiry t)
11435                  (nnfolder-active-file "~/News/sent-mail/active")
11436                  (nnfolder-directory "~/News/sent-mail/")))
11437 @end lisp
11438
11439 @vindex gnus-message-archive-group
11440 @cindex Gcc
11441 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11442 to one or more group(s) on that server.  Which group to use is
11443 determined by the @code{gnus-message-archive-group} variable.
11444
11445 This variable can be used to do the following:
11446
11447 @itemize @bullet
11448 @item
11449 a string
11450 Messages will be saved in that group.
11451
11452 Note that you can include a select method in the group name, then the
11453 message will not be stored in the select method given by
11454 @code{gnus-message-archive-method}, but in the select method specified
11455 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11456 has the default value shown above.  Then setting
11457 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11458 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11459 value @code{"nnml:foo"}, then outgoing messages will be stored in
11460 @samp{nnml:foo}.
11461 @item
11462 a list of strings
11463 Messages will be saved in all those groups.
11464 @item
11465 an alist of regexps, functions and forms
11466 When a key ``matches'', the result is used.
11467 @item
11468 @code{nil}
11469 No message archiving will take place.  This is the default.
11470 @end itemize
11471
11472 Let's illustrate:
11473
11474 Just saving to a single group called @samp{MisK}:
11475 @lisp
11476 (setq gnus-message-archive-group "MisK")
11477 @end lisp
11478
11479 Saving to two groups, @samp{MisK} and @samp{safe}:
11480 @lisp
11481 (setq gnus-message-archive-group '("MisK" "safe"))
11482 @end lisp
11483
11484 Save to different groups based on what group you are in:
11485 @lisp
11486 (setq gnus-message-archive-group
11487       '(("^alt" "sent-to-alt")
11488         ("mail" "sent-to-mail")
11489         (".*" "sent-to-misc")))
11490 @end lisp
11491
11492 More complex stuff:
11493 @lisp
11494 (setq gnus-message-archive-group
11495       '((if (message-news-p)
11496             "misc-news"
11497           "misc-mail")))
11498 @end lisp
11499
11500 How about storing all news messages in one file, but storing all mail
11501 messages in one file per month:
11502
11503 @lisp
11504 (setq gnus-message-archive-group
11505       '((if (message-news-p)
11506             "misc-news"
11507           (concat "mail." (format-time-string "%Y-%m")))))
11508 @end lisp
11509
11510 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11511 @c use a different value for @code{gnus-message-archive-group} there.)
11512
11513 Now, when you send a message off, it will be stored in the appropriate
11514 group.  (If you want to disable storing for just one particular message,
11515 you can just remove the @code{Gcc} header that has been inserted.)  The
11516 archive group will appear in the group buffer the next time you start
11517 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11518 enter it and read the articles in it just like you'd read any other
11519 group.  If the group gets really big and annoying, you can simply rename
11520 if (using @kbd{G r} in the group buffer) to something
11521 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11522 continue to be stored in the old (now empty) group.
11523
11524 That's the default method of archiving sent messages.  Gnus offers a
11525 different way for the people who don't like the default method.  In that
11526 case you should set @code{gnus-message-archive-group} to @code{nil};
11527 this will disable archiving.
11528
11529 @table @code
11530 @item gnus-outgoing-message-group
11531 @vindex gnus-outgoing-message-group
11532 All outgoing messages will be put in this group.  If you want to store
11533 all your outgoing mail and articles in the group @samp{nnml:archive},
11534 you set this variable to that value.  This variable can also be a list of
11535 group names.
11536
11537 If you want to have greater control over what group to put each
11538 message in, you can set this variable to a function that checks the
11539 current newsgroup name and then returns a suitable group name (or list
11540 of names).
11541
11542 This variable can be used instead of @code{gnus-message-archive-group},
11543 but the latter is the preferred method.
11544
11545 @item gnus-gcc-mark-as-read
11546 @vindex gnus-gcc-mark-as-read
11547 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11548
11549 @item gnus-gcc-externalize-attachments
11550 @vindex gnus-gcc-externalize-attachments
11551 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11552 and matches the Gcc group name, attach files as external parts; if it is
11553 @code{all}, attach local files as external parts; if it is other
11554 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11555 changed in the future.
11556
11557 @end table
11558
11559
11560 @node Posting Styles
11561 @section Posting Styles
11562 @cindex posting styles
11563 @cindex styles
11564
11565 All them variables, they make my head swim.
11566
11567 So what if you want a different @code{Organization} and signature based
11568 on what groups you post to?  And you post both from your home machine
11569 and your work machine, and you want different @code{From} lines, and so
11570 on?
11571
11572 @vindex gnus-posting-styles
11573 One way to do stuff like that is to write clever hooks that change the
11574 variables you need to have changed.  That's a bit boring, so somebody
11575 came up with the bright idea of letting the user specify these things in
11576 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11577 variable:
11578
11579 @lisp
11580 ((".*"
11581   (signature "Peace and happiness")
11582   (organization "What me?"))
11583  ("^comp"
11584   (signature "Death to everybody"))
11585  ("comp.emacs.i-love-it"
11586   (organization "Emacs is it")))
11587 @end lisp
11588
11589 As you might surmise from this example, this alist consists of several
11590 @dfn{styles}.  Each style will be applicable if the first element
11591 ``matches'', in some form or other.  The entire alist will be iterated
11592 over, from the beginning towards the end, and each match will be
11593 applied, which means that attributes in later styles that match override
11594 the same attributes in earlier matching styles.  So
11595 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11596 signature and the @samp{What me?} @code{Organization} header.
11597
11598 The first element in each style is called the @code{match}.  If it's a
11599 string, then Gnus will try to regexp match it against the group name.
11600 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11601 will look in the original article for a header whose name is
11602 @var{match} and compare that @var{regexp}.  @var{match} and
11603 @var{regexp} are strings.  (There original article is the one you are
11604 replying or following up to.  If you are not composing a reply or a
11605 followup, then there is nothing to match against.)  If the
11606 @code{match} is a function symbol, that function will be called with
11607 no arguments.  If it's a variable symbol, then the variable will be
11608 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11609 any case, if this returns a non-@code{nil} value, then the style is
11610 said to @dfn{match}.
11611
11612 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11613 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11614 attribute name can be one of @code{signature}, @code{signature-file},
11615 @code{x-face-file}, @code{address} (overriding
11616 @code{user-mail-address}), @code{name} (overriding
11617 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11618 be a string or a symbol.  In that case, this will be used as a header
11619 name, and the value will be inserted in the headers of the article; if
11620 the value is @code{nil}, the header name will be removed.  If the
11621 attribute name is @code{eval}, the form is evaluated, and the result
11622 is thrown away.
11623
11624 The attribute value can be a string (used verbatim), a function with
11625 zero arguments (the return value will be used), a variable (its value
11626 will be used) or a list (it will be @code{eval}ed and the return value
11627 will be used).  The functions and sexps are called/@code{eval}ed in the
11628 message buffer that is being set up.  The headers of the current article
11629 are available through the @code{message-reply-headers} variable, which
11630 is a vector of the following headers: number subject from date id
11631 references chars lines xref extra.
11632
11633 @vindex message-reply-headers
11634
11635 If you wish to check whether the message you are about to compose is
11636 meant to be a news article or a mail message, you can check the values
11637 of the @code{message-news-p} and @code{message-mail-p} functions.
11638
11639 @findex message-mail-p
11640 @findex message-news-p
11641
11642 So here's a new example:
11643
11644 @lisp
11645 (setq gnus-posting-styles
11646       '((".*"
11647          (signature-file "~/.signature")
11648          (name "User Name")
11649          ("X-Home-Page" (getenv "WWW_HOME"))
11650          (organization "People's Front Against MWM"))
11651         ("^rec.humor"
11652          (signature my-funny-signature-randomizer))
11653         ((equal (system-name) "gnarly")  ;; @r{A form}
11654          (signature my-quote-randomizer))
11655         (message-news-p        ;; @r{A function symbol}
11656          (signature my-news-signature))
11657         (window-system         ;; @r{A value symbol}
11658          ("X-Window-System" (format "%s" window-system)))
11659         ;; @r{If I'm replying to Larsi, set the Organization header.}
11660         ((header "from" "larsi.*org")
11661          (Organization "Somewhere, Inc."))
11662         ((posting-from-work-p) ;; @r{A user defined function}
11663          (signature-file "~/.work-signature")
11664          (address "user@@bar.foo")
11665          (body "You are fired.\n\nSincerely, your boss.")
11666          (organization "Important Work, Inc"))
11667         ("nnml:.*"
11668          (From (save-excursion
11669                  (set-buffer gnus-article-buffer)
11670                  (message-fetch-field "to"))))
11671         ("^nn.+:"
11672          (signature-file "~/.mail-signature"))))
11673 @end lisp
11674
11675 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11676 @code{From} address in all your outgoing replies, which might be handy
11677 if you fill many roles.
11678
11679 Setting the @code{gnus-named-posting-styles} variable will make
11680 posting-styles allow to have distinctive names.  You can specify an
11681 arbitrary posting-style when article posting with @kbd{S P} in the
11682 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11683 the names to styles.  Once a posting-style is added to the alist, we can
11684 import it from @code{gnus-posting-styles}.  If an attribute whose name
11685 is @code{import} is found, Gnus will look for the attribute value in
11686 @code{gnus-named-posting-styles} and expand it in place.
11687
11688 Here's an example:
11689
11690 @lisp
11691 (setq gnus-named-posting-styles
11692       '(("Default"
11693          (signature-file "~/.signature")
11694          (name "User Name")
11695          ("X-Home-Page" (getenv "WWW_HOME"))
11696          (organization "People's Front Against MWM"))
11697         ("Emacs"
11698          (import "Default")
11699          (organization "The Church of Emacs"))))
11700 @end lisp
11701
11702 The posting-style named "Emacs" will inherit all the attributes from
11703 "Default" except @code{organization}.
11704
11705
11706 @node Drafts
11707 @section Drafts
11708 @cindex drafts
11709
11710 If you are writing a message (mail or news) and suddenly remember that
11711 you have a steak in the oven (or some pesto in the food processor, you
11712 craaazy vegetarians), you'll probably wish there was a method to save
11713 the message you are writing so that you can continue editing it some
11714 other day, and send it when you feel its finished.
11715
11716 Well, don't worry about it.  Whenever you start composing a message of
11717 some sort using the gnus mail and post commands, the buffer you get will
11718 automatically associate to an article in a special @dfn{draft} group.
11719 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11720 article will be saved there.  (Auto-save files also go to the draft
11721 group.)
11722
11723 @cindex nndraft
11724 @vindex nndraft-directory
11725 The draft group is a special group (which is implemented as an
11726 @code{nndraft} group, if you absolutely have to know) called
11727 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11728 @code{nndraft} is to store its files.  What makes this group special is
11729 that you can't tick any articles in it or mark any articles as
11730 read---all articles in the group are permanently unread.
11731
11732 If the group doesn't exist, it will be created and you'll be subscribed
11733 to it.  The only way to make it disappear from the Group buffer is to
11734 unsubscribe it.  The special properties of the draft group comes from
11735 a group property (@pxref{Group Parameters}), and if lost the group
11736 behaves like any other group.  This means the commands below will not
11737 be available.  To restore the special properties of the group, the
11738 simplest way is to kill the group, using @kbd{C-k}, and restart
11739 Gnus.  The group is automatically created again with the
11740 correct parameters.  The content of the group is not lost.
11741
11742 @c @findex gnus-dissociate-buffer-from-draft
11743 @c @kindex C-c M-d (Mail)
11744 @c @kindex C-c M-d (Post)
11745 @c @findex gnus-associate-buffer-with-draft
11746 @c @kindex C-c C-d (Mail)
11747 @c @kindex C-c C-d (Post)
11748 @c If you're writing some super-secret message that you later want to
11749 @c encode with PGP before sending, you may wish to turn the auto-saving
11750 @c (and association with the draft group) off.  You never know who might be
11751 @c interested in reading all your extremely valuable and terribly horrible
11752 @c and interesting secrets.  The @kbd{C-c M-d}
11753 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11754 @c If you change your mind and want to turn the auto-saving back on again,
11755 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11756 @c
11757 @c @vindex gnus-use-draft
11758 @c To leave association with the draft group off by default, set
11759 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11760
11761 @findex gnus-draft-edit-message
11762 @kindex D e (Draft)
11763 When you want to continue editing the article, you simply enter the
11764 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11765 that.  You will be placed in a buffer where you left off.
11766
11767 Rejected articles will also be put in this draft group (@pxref{Rejected
11768 Articles}).
11769
11770 @findex gnus-draft-send-all-messages
11771 @kindex D s (Draft)
11772 @findex gnus-draft-send-message
11773 @kindex D S (Draft)
11774 If you have lots of rejected messages you want to post (or mail) without
11775 doing further editing, you can use the @kbd{D s} command
11776 (@code{gnus-draft-send-message}).  This command understands the
11777 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11778 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11779 in the buffer.
11780
11781 @findex gnus-draft-toggle-sending
11782 @kindex D t (Draft)
11783 If you have some messages that you wish not to send, you can use the
11784 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11785 as unsendable.  This is a toggling command.
11786
11787
11788 @node Rejected Articles
11789 @section Rejected Articles
11790 @cindex rejected articles
11791
11792 Sometimes a news server will reject an article.  Perhaps the server
11793 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11794 @emph{there be demons}.  Perhaps you have included too much cited text.
11795 Perhaps the disk is full.  Perhaps the server is down.
11796
11797 These situations are, of course, totally beyond the control of gnus.
11798 (Gnus, of course, loves the way you look, always feels great, has angels
11799 fluttering around inside of it, doesn't care about how much cited text
11800 you include, never runs full and never goes down.)  So gnus saves these
11801 articles until some later time when the server feels better.
11802
11803 The rejected articles will automatically be put in a special draft group
11804 (@pxref{Drafts}).  When the server comes back up again, you'd then
11805 typically enter that group and send all the articles off.
11806
11807 @node Signing and encrypting
11808 @section Signing and encrypting
11809 @cindex using gpg
11810 @cindex using s/mime
11811 @cindex using smime
11812
11813 Gnus can digitally sign and encrypt your messages, using vanilla
11814 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11815 decoding such messages, see the @code{mm-verify-option} and
11816 @code{mm-decrypt-option} options (@pxref{Security}).
11817
11818 @vindex gnus-message-replysign
11819 @vindex gnus-message-replyencrypt
11820 @vindex gnus-message-replysignencrypted
11821 Often, you would like to sign replies to people who send you signed
11822 messages.  Even more often, you might want to encrypt messages which
11823 are in reply to encrypted messages.  Gnus offers
11824 @code{gnus-message-replysign} to enable the former, and
11825 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11826 @code{gnus-message-replysignencrypted} (on by default) will sign
11827 automatically encrypted messages.
11828
11829 Instructing MML to perform security operations on a @acronym{MIME} part is
11830 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11831 C-m c} key map for encryption, as follows.
11832
11833 @table @kbd
11834
11835 @item C-c C-m s s
11836 @kindex C-c C-m s s
11837 @findex mml-secure-message-sign-smime
11838
11839 Digitally sign current message using @acronym{S/MIME}.
11840
11841 @item C-c C-m s o
11842 @kindex C-c C-m s o
11843 @findex mml-secure-message-sign-pgp
11844
11845 Digitally sign current message using @acronym{PGP}.
11846
11847 @item C-c C-m s p
11848 @kindex C-c C-m s p
11849 @findex mml-secure-message-sign-pgp
11850
11851 Digitally sign current message using @acronym{PGP/MIME}.
11852
11853 @item C-c C-m c s
11854 @kindex C-c C-m c s
11855 @findex mml-secure-message-encrypt-smime
11856
11857 Digitally encrypt current message using @acronym{S/MIME}.
11858
11859 @item C-c C-m c o
11860 @kindex C-c C-m c o
11861 @findex mml-secure-message-encrypt-pgp
11862
11863 Digitally encrypt current message using @acronym{PGP}.
11864
11865 @item C-c C-m c p
11866 @kindex C-c C-m c p
11867 @findex mml-secure-message-encrypt-pgpmime
11868
11869 Digitally encrypt current message using @acronym{PGP/MIME}.
11870
11871 @item C-c C-m C-n
11872 @kindex C-c C-m C-n
11873 @findex mml-unsecure-message
11874 Remove security related MML tags from message.
11875
11876 @end table
11877
11878 @xref{Security, ,Security, message, Message Manual}, for more information.
11879
11880 @node Select Methods
11881 @chapter Select Methods
11882 @cindex foreign groups
11883 @cindex select methods
11884
11885 A @dfn{foreign group} is a group not read by the usual (or
11886 default) means.  It could be, for instance, a group from a different
11887 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11888 personal mail group.
11889
11890 A foreign group (or any group, really) is specified by a @dfn{name} and
11891 a @dfn{select method}.  To take the latter first, a select method is a
11892 list where the first element says what back end to use (e.g. @code{nntp},
11893 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11894 name}.  There may be additional elements in the select method, where the
11895 value may have special meaning for the back end in question.
11896
11897 One could say that a select method defines a @dfn{virtual server}---so
11898 we do just that (@pxref{Server Buffer}).
11899
11900 The @dfn{name} of the group is the name the back end will recognize the
11901 group as.
11902
11903 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11904 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11905 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11906 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11907 back end just knows this group as @samp{soc.motss}.
11908
11909 The different methods all have their peculiarities, of course.
11910
11911 @menu
11912 * Server Buffer::               Making and editing virtual servers.
11913 * Getting News::                Reading USENET news with Gnus.
11914 * Getting Mail::                Reading your personal mail with Gnus.
11915 * Browsing the Web::            Getting messages from a plethora of Web sources.
11916 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11917 * Other Sources::               Reading directories, files, SOUP packets.
11918 * Combined Groups::             Combining groups into one group.
11919 * Gnus Unplugged::              Reading news and mail offline.
11920 @end menu
11921
11922
11923 @node Server Buffer
11924 @section Server Buffer
11925
11926 Traditionally, a @dfn{server} is a machine or a piece of software that
11927 one connects to, and then requests information from.  Gnus does not
11928 connect directly to any real servers, but does all transactions through
11929 one back end or other.  But that's just putting one layer more between
11930 the actual media and Gnus, so we might just as well say that each
11931 back end represents a virtual server.
11932
11933 For instance, the @code{nntp} back end may be used to connect to several
11934 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11935 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11936 use, and what parameters to set by specifying a @dfn{select method}.
11937
11938 These select method specifications can sometimes become quite
11939 complicated---say, for instance, that you want to read from the
11940 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11941 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11942 Anyway, if you had to specify that for each group that used this
11943 server, that would be too much work, so Gnus offers a way of naming
11944 select methods, which is what you do in the server buffer.
11945
11946 To enter the server buffer, use the @kbd{^}
11947 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11948
11949 @menu
11950 * Server Buffer Format::        You can customize the look of this buffer.
11951 * Server Commands::             Commands to manipulate servers.
11952 * Example Methods::             Examples server specifications.
11953 * Creating a Virtual Server::   An example session.
11954 * Server Variables::            Which variables to set.
11955 * Servers and Methods::         You can use server names as select methods.
11956 * Unavailable Servers::         Some servers you try to contact may be down.
11957 @end menu
11958
11959 @vindex gnus-server-mode-hook
11960 @code{gnus-server-mode-hook} is run when creating the server buffer.
11961
11962
11963 @node Server Buffer Format
11964 @subsection Server Buffer Format
11965 @cindex server buffer format
11966
11967 @vindex gnus-server-line-format
11968 You can change the look of the server buffer lines by changing the
11969 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11970 variable, with some simple extensions:
11971
11972 @table @samp
11973
11974 @item h
11975 How the news is fetched---the back end name.
11976
11977 @item n
11978 The name of this server.
11979
11980 @item w
11981 Where the news is to be fetched from---the address.
11982
11983 @item s
11984 The opened/closed/denied status of the server.
11985 @end table
11986
11987 @vindex gnus-server-mode-line-format
11988 The mode line can also be customized by using the
11989 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11990 Formatting}).  The following specs are understood:
11991
11992 @table @samp
11993 @item S
11994 Server name.
11995
11996 @item M
11997 Server method.
11998 @end table
11999
12000 Also @pxref{Formatting Variables}.
12001
12002
12003 @node Server Commands
12004 @subsection Server Commands
12005 @cindex server commands
12006
12007 @table @kbd
12008
12009 @item a
12010 @kindex a (Server)
12011 @findex gnus-server-add-server
12012 Add a new server (@code{gnus-server-add-server}).
12013
12014 @item e
12015 @kindex e (Server)
12016 @findex gnus-server-edit-server
12017 Edit a server (@code{gnus-server-edit-server}).
12018
12019 @item SPACE
12020 @kindex SPACE (Server)
12021 @findex gnus-server-read-server
12022 Browse the current server (@code{gnus-server-read-server}).
12023
12024 @item q
12025 @kindex q (Server)
12026 @findex gnus-server-exit
12027 Return to the group buffer (@code{gnus-server-exit}).
12028
12029 @item k
12030 @kindex k (Server)
12031 @findex gnus-server-kill-server
12032 Kill the current server (@code{gnus-server-kill-server}).
12033
12034 @item y
12035 @kindex y (Server)
12036 @findex gnus-server-yank-server
12037 Yank the previously killed server (@code{gnus-server-yank-server}).
12038
12039 @item c
12040 @kindex c (Server)
12041 @findex gnus-server-copy-server
12042 Copy the current server (@code{gnus-server-copy-server}).
12043
12044 @item l
12045 @kindex l (Server)
12046 @findex gnus-server-list-servers
12047 List all servers (@code{gnus-server-list-servers}).
12048
12049 @item s
12050 @kindex s (Server)
12051 @findex gnus-server-scan-server
12052 Request that the server scan its sources for new articles
12053 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12054 servers.
12055
12056 @item g
12057 @kindex g (Server)
12058 @findex gnus-server-regenerate-server
12059 Request that the server regenerate all its data structures
12060 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12061 a mail back end that has gotten out of sync.
12062
12063 @end table
12064
12065
12066 @node Example Methods
12067 @subsection Example Methods
12068
12069 Most select methods are pretty simple and self-explanatory:
12070
12071 @lisp
12072 (nntp "news.funet.fi")
12073 @end lisp
12074
12075 Reading directly from the spool is even simpler:
12076
12077 @lisp
12078 (nnspool "")
12079 @end lisp
12080
12081 As you can see, the first element in a select method is the name of the
12082 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12083 will.
12084
12085 After these two elements, there may be an arbitrary number of
12086 @code{(@var{variable} @var{form})} pairs.
12087
12088 To go back to the first example---imagine that you want to read from
12089 port 15 on that machine.  This is what the select method should
12090 look like then:
12091
12092 @lisp
12093 (nntp "news.funet.fi" (nntp-port-number 15))
12094 @end lisp
12095
12096 You should read the documentation to each back end to find out what
12097 variables are relevant, but here's an @code{nnmh} example:
12098
12099 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12100 you have two structures that you wish to access: One is your private
12101 mail spool, and the other is a public one.  Here's the possible spec for
12102 your private mail:
12103
12104 @lisp
12105 (nnmh "private" (nnmh-directory "~/private/mail/"))
12106 @end lisp
12107
12108 (This server is then called @samp{private}, but you may have guessed
12109 that.)
12110
12111 Here's the method for a public spool:
12112
12113 @lisp
12114 (nnmh "public"
12115       (nnmh-directory "/usr/information/spool/")
12116       (nnmh-get-new-mail nil))
12117 @end lisp
12118
12119 @cindex proxy
12120 @cindex firewall
12121
12122 If you are behind a firewall and only have access to the @acronym{NNTP}
12123 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12124 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12125 Doing this can be rather fiddly, but your virtual server definition
12126 should probably look something like this:
12127
12128 @lisp
12129 (nntp "firewall"
12130       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12131       (nntp-via-address "the.firewall.machine")
12132       (nntp-address "the.real.nntp.host")
12133       (nntp-end-of-line "\n"))
12134 @end lisp
12135
12136 If you want to use the wonderful @code{ssh} program to provide a
12137 compressed connection over the modem line, you could add the following
12138 configuration to the example above:
12139
12140 @lisp
12141       (nntp-via-rlogin-command "ssh")
12142 @end lisp
12143
12144 See also @code{nntp-via-rlogin-command-switches}.
12145
12146 If you're behind a firewall, but have direct access to the outside world
12147 through a wrapper command like "runsocks", you could open a socksified
12148 telnet connection to the news server as follows:
12149
12150 @lisp
12151 (nntp "outside"
12152       (nntp-pre-command "runsocks")
12153       (nntp-open-connection-function nntp-open-via-telnet)
12154       (nntp-address "the.news.server")
12155       (nntp-end-of-line "\n"))
12156 @end lisp
12157
12158 This means that you have to have set up @code{ssh-agent} correctly to
12159 provide automatic authorization, of course.  And to get a compressed
12160 connection, you have to have the @samp{Compression} option in the
12161 @code{ssh} @file{config} file.
12162
12163
12164 @node Creating a Virtual Server
12165 @subsection Creating a Virtual Server
12166
12167 If you're saving lots of articles in the cache by using persistent
12168 articles, you may want to create a virtual server to read the cache.
12169
12170 First you need to add a new server.  The @kbd{a} command does that.  It
12171 would probably be best to use @code{nnspool} to read the cache.  You
12172 could also use @code{nnml} or @code{nnmh}, though.
12173
12174 Type @kbd{a nnspool RET cache RET}.
12175
12176 You should now have a brand new @code{nnspool} virtual server called
12177 @samp{cache}.  You now need to edit it to have the right definitions.
12178 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12179 will contain the following:
12180
12181 @lisp
12182 (nnspool "cache")
12183 @end lisp
12184
12185 Change that to:
12186
12187 @lisp
12188 (nnspool "cache"
12189          (nnspool-spool-directory "~/News/cache/")
12190          (nnspool-nov-directory "~/News/cache/")
12191          (nnspool-active-file "~/News/cache/active"))
12192 @end lisp
12193
12194 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12195 @kbd{RET} over this virtual server, you should be entered into a browse
12196 buffer, and you should be able to enter any of the groups displayed.
12197
12198
12199 @node Server Variables
12200 @subsection Server Variables
12201 @cindex server variables
12202 @cindex server parameters
12203
12204 One sticky point when defining variables (both on back ends and in Emacs
12205 in general) is that some variables are typically initialized from other
12206 variables when the definition of the variables is being loaded.  If you
12207 change the ``base'' variable after the variables have been loaded, you
12208 won't change the ``derived'' variables.
12209
12210 This typically affects directory and file variables.  For instance,
12211 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12212 directory variables are initialized from that variable, so
12213 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12214 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12215 @code{nnml-directory}---you have to explicitly set all the file
12216 variables to be what you want them to be.  For a complete list of
12217 variables for each back end, see each back end's section later in this
12218 manual, but here's an example @code{nnml} definition:
12219
12220 @lisp
12221 (nnml "public"
12222       (nnml-directory "~/my-mail/")
12223       (nnml-active-file "~/my-mail/active")
12224       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12225 @end lisp
12226
12227 Server variables are often called @dfn{server parameters}.
12228
12229 @node Servers and Methods
12230 @subsection Servers and Methods
12231
12232 Wherever you would normally use a select method
12233 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12234 when browsing a foreign server) you can use a virtual server name
12235 instead.  This could potentially save lots of typing.  And it's nice all
12236 over.
12237
12238
12239 @node Unavailable Servers
12240 @subsection Unavailable Servers
12241
12242 If a server seems to be unreachable, Gnus will mark that server as
12243 @code{denied}.  That means that any subsequent attempt to make contact
12244 with that server will just be ignored.  ``It can't be opened,'' Gnus
12245 will tell you, without making the least effort to see whether that is
12246 actually the case or not.
12247
12248 That might seem quite naughty, but it does make sense most of the time.
12249 Let's say you have 10 groups subscribed to on server
12250 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12251 away from you and the machine is quite slow, so it takes 1 minute just
12252 to find out that it refuses connection to you today.  If Gnus were to
12253 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12254 attempt to do that.  Once it has gotten a single ``connection refused'',
12255 it will regard that server as ``down''.
12256
12257 So, what happens if the machine was only feeling unwell temporarily?
12258 How do you test to see whether the machine has come up again?
12259
12260 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12261 with the following commands:
12262
12263 @table @kbd
12264
12265 @item O
12266 @kindex O (Server)
12267 @findex gnus-server-open-server
12268 Try to establish connection to the server on the current line
12269 (@code{gnus-server-open-server}).
12270
12271 @item C
12272 @kindex C (Server)
12273 @findex gnus-server-close-server
12274 Close the connection (if any) to the server
12275 (@code{gnus-server-close-server}).
12276
12277 @item D
12278 @kindex D (Server)
12279 @findex gnus-server-deny-server
12280 Mark the current server as unreachable
12281 (@code{gnus-server-deny-server}).
12282
12283 @item M-o
12284 @kindex M-o (Server)
12285 @findex gnus-server-open-all-servers
12286 Open the connections to all servers in the buffer
12287 (@code{gnus-server-open-all-servers}).
12288
12289 @item M-c
12290 @kindex M-c (Server)
12291 @findex gnus-server-close-all-servers
12292 Close the connections to all servers in the buffer
12293 (@code{gnus-server-close-all-servers}).
12294
12295 @item R
12296 @kindex R (Server)
12297 @findex gnus-server-remove-denials
12298 Remove all marks to whether Gnus was denied connection from any servers
12299 (@code{gnus-server-remove-denials}).
12300
12301 @item L
12302 @kindex L (Server)
12303 @findex gnus-server-offline-server
12304 Set server status to offline (@code{gnus-server-offline-server}).
12305
12306 @end table
12307
12308
12309 @node Getting News
12310 @section Getting News
12311 @cindex reading news
12312 @cindex news back ends
12313
12314 A newsreader is normally used for reading news.  Gnus currently provides
12315 only two methods of getting news---it can read from an @acronym{NNTP} server,
12316 or it can read from a local spool.
12317
12318 @menu
12319 * NNTP::                        Reading news from an @acronym{NNTP} server.
12320 * News Spool::                  Reading news from the local spool.
12321 @end menu
12322
12323
12324 @node NNTP
12325 @subsection NNTP
12326 @cindex nntp
12327
12328 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12329 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12330 server as the, uhm, address.
12331
12332 If the @acronym{NNTP} server is located at a non-standard port, setting the
12333 third element of the select method to this port number should allow you
12334 to connect to the right port.  You'll have to edit the group info for
12335 that (@pxref{Foreign Groups}).
12336
12337 The name of the foreign group can be the same as a native group.  In
12338 fact, you can subscribe to the same group from as many different servers
12339 you feel like.  There will be no name collisions.
12340
12341 The following variables can be used to create a virtual @code{nntp}
12342 server:
12343
12344 @table @code
12345
12346 @item nntp-server-opened-hook
12347 @vindex nntp-server-opened-hook
12348 @cindex @sc{mode reader}
12349 @cindex authinfo
12350 @cindex authentification
12351 @cindex nntp authentification
12352 @findex nntp-send-authinfo
12353 @findex nntp-send-mode-reader
12354 is run after a connection has been made.  It can be used to send
12355 commands to the @acronym{NNTP} server after it has been contacted.  By
12356 default it sends the command @code{MODE READER} to the server with the
12357 @code{nntp-send-mode-reader} function.  This function should always be
12358 present in this hook.
12359
12360 @item nntp-authinfo-function
12361 @vindex nntp-authinfo-function
12362 @findex nntp-send-authinfo
12363 @vindex nntp-authinfo-file
12364 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12365 server.  The default function is @code{nntp-send-authinfo}, which looks
12366 through your @file{~/.authinfo} (or whatever you've set the
12367 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12368 are found, it will prompt you for a login name and a password.  The
12369 format of the @file{~/.authinfo} file is (almost) the same as the
12370 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12371 manual page, but here are the salient facts:
12372
12373 @enumerate
12374 @item
12375 The file contains one or more line, each of which define one server.
12376
12377 @item
12378 Each line may contain an arbitrary number of token/value pairs.
12379
12380 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12381 @samp{default}.  In addition Gnus introduces two new tokens, not present
12382 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12383 @samp{force}.  (This is the only way the @file{.authinfo} file format
12384 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12385 indicate what port on the server the credentials apply to and
12386 @samp{force} is explained below.
12387
12388 @end enumerate
12389
12390 Here's an example file:
12391
12392 @example
12393 machine news.uio.no login larsi password geheimnis
12394 machine nntp.ifi.uio.no login larsi force yes
12395 @end example
12396
12397 The token/value pairs may appear in any order; @samp{machine} doesn't
12398 have to be first, for instance.
12399
12400 In this example, both login name and password have been supplied for the
12401 former server, while the latter has only the login name listed, and the
12402 user will be prompted for the password.  The latter also has the
12403 @samp{force} tag, which means that the authinfo will be sent to the
12404 @var{nntp} server upon connection; the default (i.e., when there is not
12405 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12406 until the @var{nntp} server asks for it.
12407
12408 You can also add @samp{default} lines that will apply to all servers
12409 that don't have matching @samp{machine} lines.
12410
12411 @example
12412 default force yes
12413 @end example
12414
12415 This will force sending @samp{AUTHINFO} commands to all servers not
12416 previously mentioned.
12417
12418 Remember to not leave the @file{~/.authinfo} file world-readable.
12419
12420 @item nntp-server-action-alist
12421 @vindex nntp-server-action-alist
12422 This is a list of regexps to match on server types and actions to be
12423 taken when matches are made.  For instance, if you want Gnus to beep
12424 every time you connect to innd, you could say something like:
12425
12426 @lisp
12427 (setq nntp-server-action-alist
12428       '(("innd" (ding))))
12429 @end lisp
12430
12431 You probably don't want to do that, though.
12432
12433 The default value is
12434
12435 @lisp
12436 '(("nntpd 1\\.5\\.11t"
12437    (remove-hook 'nntp-server-opened-hook
12438                 'nntp-send-mode-reader)))
12439 @end lisp
12440
12441 This ensures that Gnus doesn't send the @code{MODE READER} command to
12442 nntpd 1.5.11t, since that command chokes that server, I've been told.
12443
12444 @item nntp-maximum-request
12445 @vindex nntp-maximum-request
12446 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12447 will collect headers by sending a series of @code{head} commands.  To
12448 speed things up, the back end sends lots of these commands without
12449 waiting for reply, and then reads all the replies.  This is controlled
12450 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12451 your network is buggy, you should set this to 1.
12452
12453 @item nntp-connection-timeout
12454 @vindex nntp-connection-timeout
12455 If you have lots of foreign @code{nntp} groups that you connect to
12456 regularly, you're sure to have problems with @acronym{NNTP} servers not
12457 responding properly, or being too loaded to reply within reasonable
12458 time.  This is can lead to awkward problems, which can be helped
12459 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12460 that says how many seconds the @code{nntp} back end should wait for a
12461 connection before giving up.  If it is @code{nil}, which is the default,
12462 no timeouts are done.
12463
12464 @c @item nntp-command-timeout
12465 @c @vindex nntp-command-timeout
12466 @c @cindex PPP connections
12467 @c @cindex dynamic IP addresses
12468 @c If you're running Gnus on a machine that has a dynamically assigned
12469 @c address, Gnus may become confused.  If the address of your machine
12470 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12471 @c waiting forever for replies from the server.  To help with this
12472 @c unfortunate problem, you can set this command to a number.  Gnus will
12473 @c then, if it sits waiting for a reply from the server longer than that
12474 @c number of seconds, shut down the connection, start a new one, and resend
12475 @c the command.  This should hopefully be transparent to the user.  A
12476 @c likely number is 30 seconds.
12477 @c
12478 @c @item nntp-retry-on-break
12479 @c @vindex nntp-retry-on-break
12480 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12481 @c hangs.  This will have much the same effect as the command timeout
12482 @c described above.
12483
12484 @item nntp-server-hook
12485 @vindex nntp-server-hook
12486 This hook is run as the last step when connecting to an @acronym{NNTP}
12487 server.
12488
12489 @item nntp-buggy-select
12490 @vindex nntp-buggy-select
12491 Set this to non-@code{nil} if your select routine is buggy.
12492
12493 @item nntp-nov-is-evil
12494 @vindex nntp-nov-is-evil
12495 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12496 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12497 can be used.
12498
12499 @item nntp-xover-commands
12500 @vindex nntp-xover-commands
12501 @cindex @acronym{NOV}
12502 @cindex XOVER
12503 List of strings used as commands to fetch @acronym{NOV} lines from a
12504 server.  The default value of this variable is @code{("XOVER"
12505 "XOVERVIEW")}.
12506
12507 @item nntp-nov-gap
12508 @vindex nntp-nov-gap
12509 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12510 the server.  The server responds with one huge list of lines.  However,
12511 if you have read articles 2-5000 in the group, and only want to read
12512 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12513 lines that you will not need.  This variable says how
12514 big a gap between two consecutive articles is allowed to be before the
12515 @code{XOVER} request is split into several request.  Note that if your
12516 network is fast, setting this variable to a really small number means
12517 that fetching will probably be slower.  If this variable is @code{nil},
12518 @code{nntp} will never split requests.  The default is 5.
12519
12520 @item nntp-prepare-server-hook
12521 @vindex nntp-prepare-server-hook
12522 A hook run before attempting to connect to an @acronym{NNTP} server.
12523
12524 @item nntp-warn-about-losing-connection
12525 @vindex nntp-warn-about-losing-connection
12526 If this variable is non-@code{nil}, some noise will be made when a
12527 server closes connection.
12528
12529 @item nntp-record-commands
12530 @vindex nntp-record-commands
12531 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12532 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12533 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12534 that doesn't seem to work.
12535
12536 @item nntp-open-connection-function
12537 @vindex nntp-open-connection-function
12538 It is possible to customize how the connection to the nntp server will
12539 be opened.  If you specify an @code{nntp-open-connection-function}
12540 parameter, Gnus will use that function to establish the connection.
12541 Five pre-made functions are supplied.  These functions can be grouped in
12542 two categories: direct connection functions (three pre-made), and
12543 indirect ones (two pre-made).
12544
12545 @item nntp-prepare-post-hook
12546 @vindex nntp-prepare-post-hook
12547 A hook run just before posting an article.  If there is no
12548 @code{Message-ID} header in the article and the news server provides the
12549 recommended ID, it will be added to the article before running this
12550 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12551 inhibit Gnus to add a @code{Message-ID} header, you could say:
12552
12553 @lisp
12554 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12555 @end lisp
12556
12557 Note that not all servers support the recommended ID.  This works for
12558 INN versions 2.3.0 and later, for instance.
12559
12560 @item nntp-read-timeout
12561 @vindex nntp-read-timeout
12562 How long nntp should wait between checking for the end of output.
12563 Shorter values mean quicker response, but is more CPU intensive.  The
12564 default is 0.1 seconds.  If you have a slow line to the server (and
12565 don't like to see Emacs eat your available CPU power), you might set
12566 this to, say, 1.
12567
12568 @item nntp-list-options
12569 @vindex nntp-list-options
12570 List of newsgroup name used for a option of the LIST command to restrict
12571 the listing output to only the specified newsgroups.  Each newsgroup name
12572 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12573 etc.  Fortunately, if the server can accept such a option, it will
12574 probably make gnus run faster.  You may use it as a server variable as
12575 follows:
12576
12577 @lisp
12578 (setq gnus-select-method
12579       '(nntp "news.somewhere.edu"
12580              (nntp-list-options ("fj.*" "japan.*"))))
12581 @end lisp
12582
12583 @item nntp-options-subscribe
12584 @vindex nntp-options-subscribe
12585 Regexp matching the newsgroup names which will be subscribed
12586 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12587 It may be effective as well as @code{nntp-list-options} even though the
12588 server could not accept a shell-style wildcard as a option of the LIST
12589 command.  You may use it as a server variable as follows:
12590
12591 @lisp
12592 (setq gnus-select-method
12593       '(nntp "news.somewhere.edu"
12594              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12595 @end lisp
12596
12597 @item nntp-options-not-subscribe
12598 @vindex nntp-options-not-subscribe
12599 Regexp matching the newsgroup names which will not be subscribed
12600 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12601 It may be effective as well as @code{nntp-list-options} even though the
12602 server could not accept a shell-style wildcard as a option of the LIST
12603 command.  You may use it as a server variable as follows:
12604
12605 @lisp
12606 (setq gnus-select-method
12607       '(nntp "news.somewhere.edu"
12608              (nntp-options-not-subscribe "\\.binaries\\.")))
12609 @end lisp
12610 @end table
12611
12612 @menu
12613 * Direct Functions::            Connecting directly to the server.
12614 * Indirect Functions::          Connecting indirectly to the server.
12615 * Common Variables::            Understood by several connection functions.
12616 @end menu
12617
12618
12619 @node Direct Functions
12620 @subsubsection Direct Functions
12621 @cindex direct connection functions
12622
12623 These functions are called direct because they open a direct connection
12624 between your machine and the @acronym{NNTP} server.  The behavior of these
12625 functions is also affected by commonly understood variables
12626 (@pxref{Common Variables}).
12627
12628 @table @code
12629 @findex nntp-open-network-stream
12630 @item nntp-open-network-stream
12631 This is the default, and simply connects to some port or other on the
12632 remote system.
12633
12634 @findex nntp-open-tls-stream
12635 @item nntp-open-tls-stream
12636 Opens a connection to a server over a @dfn{secure} channel.  To use
12637 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12638 installed.  You then define a server as follows:
12639
12640 @lisp
12641 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12642 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12643 ;;
12644 (nntp "snews.bar.com"
12645       (nntp-open-connection-function nntp-open-tls-stream)
12646       (nntp-port-number )
12647       (nntp-address "snews.bar.com"))
12648 @end lisp
12649
12650 @findex nntp-open-ssl-stream
12651 @item nntp-open-ssl-stream
12652 Opens a connection to a server over a @dfn{secure} channel.  To use
12653 this you must have @uref{http://www.openssl.org, OpenSSL} or
12654 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12655 then define a server as follows:
12656
12657 @lisp
12658 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12659 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12660 ;;
12661 (nntp "snews.bar.com"
12662       (nntp-open-connection-function nntp-open-ssl-stream)
12663       (nntp-port-number 563)
12664       (nntp-address "snews.bar.com"))
12665 @end lisp
12666
12667 @findex nntp-open-telnet-stream
12668 @item nntp-open-telnet-stream
12669 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12670 it.  You might wonder why this function exists, since we have the
12671 default @code{nntp-open-network-stream} which would do the job.  (One
12672 of) the reason(s) is that if you are behind a firewall but have direct
12673 connections to the outside world thanks to a command wrapper like
12674 @code{runsocks}, you can use it like this:
12675
12676 @lisp
12677 (nntp "socksified"
12678       (nntp-pre-command "runsocks")
12679       (nntp-open-connection-function nntp-open-telnet-stream)
12680       (nntp-address "the.news.server"))
12681 @end lisp
12682
12683 With the default method, you would need to wrap your whole Emacs
12684 session, which is not a good idea.
12685 @end table
12686
12687
12688 @node Indirect Functions
12689 @subsubsection Indirect Functions
12690 @cindex indirect connection functions
12691
12692 These functions are called indirect because they connect to an
12693 intermediate host before actually connecting to the @acronym{NNTP} server.
12694 All of these functions and related variables are also said to belong to
12695 the ``via'' family of connection: they're all prefixed with ``via'' to make
12696 things cleaner.  The behavior of these functions is also affected by
12697 commonly understood variables (@pxref{Common Variables}).
12698
12699 @table @code
12700 @item nntp-open-via-rlogin-and-telnet
12701 @findex nntp-open-via-rlogin-and-telnet
12702 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12703 to the real @acronym{NNTP} server from there.  This is useful for instance if
12704 you need to connect to a firewall machine first.
12705
12706 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12707
12708 @table @code
12709 @item nntp-via-rlogin-command
12710 @vindex nntp-via-rlogin-command
12711 Command used to log in on the intermediate host.  The default is
12712 @samp{rsh}, but @samp{ssh} is a popular alternative.
12713
12714 @item nntp-via-rlogin-command-switches
12715 @vindex nntp-via-rlogin-command-switches
12716 List of strings to be used as the switches to
12717 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12718 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12719 @samp{("-C")} in order to compress all data connections, otherwise set
12720 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12721 the telnet command requires a pseudo-tty allocation on an intermediate
12722 host.
12723 @end table
12724
12725 @item nntp-open-via-telnet-and-telnet
12726 @findex nntp-open-via-telnet-and-telnet
12727 Does essentially the same, but uses @samp{telnet} instead of
12728 @samp{rlogin} to connect to the intermediate host.
12729
12730 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12731
12732 @table @code
12733 @item nntp-via-telnet-command
12734 @vindex nntp-via-telnet-command
12735 Command used to @code{telnet} the intermediate host.  The default is
12736 @samp{telnet}.
12737
12738 @item nntp-via-telnet-switches
12739 @vindex nntp-via-telnet-switches
12740 List of strings to be used as the switches to the
12741 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12742
12743 @item nntp-via-user-password
12744 @vindex nntp-via-user-password
12745 Password to use when logging in on the intermediate host.
12746
12747 @item nntp-via-envuser
12748 @vindex nntp-via-envuser
12749 If non-@code{nil}, the intermediate @code{telnet} session (client and
12750 server both) will support the @code{ENVIRON} option and not prompt for
12751 login name.  This works for Solaris @code{telnet}, for instance.
12752
12753 @item nntp-via-shell-prompt
12754 @vindex nntp-via-shell-prompt
12755 Regexp matching the shell prompt on the intermediate host.  The default
12756 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12757
12758 @end table
12759
12760 @end table
12761
12762
12763 Here are some additional variables that are understood by all the above
12764 functions:
12765
12766 @table @code
12767
12768 @item nntp-via-user-name
12769 @vindex nntp-via-user-name
12770 User name to use when connecting to the intermediate host.
12771
12772 @item nntp-via-address
12773 @vindex nntp-via-address
12774 Address of the intermediate host to connect to.
12775
12776 @end table
12777
12778
12779 @node Common Variables
12780 @subsubsection Common Variables
12781
12782 The following variables affect the behavior of all, or several of the
12783 pre-made connection functions.  When not specified, all functions are
12784 affected.
12785
12786 @table @code
12787
12788 @item nntp-pre-command
12789 @vindex nntp-pre-command
12790 A command wrapper to use when connecting through a non native
12791 connection function (all except @code{nntp-open-network-stream},
12792 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12793 where you would put a @samp{SOCKS} wrapper for instance.
12794
12795 @item nntp-address
12796 @vindex nntp-address
12797 The address of the @acronym{NNTP} server.
12798
12799 @item nntp-port-number
12800 @vindex nntp-port-number
12801 Port number to connect to the @acronym{NNTP} server.  The default is
12802 @samp{nntp}.  If you use @acronym{NNTP} over
12803 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
12804 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12805 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12806 not work with named ports.
12807
12808 @item nntp-end-of-line
12809 @vindex nntp-end-of-line
12810 String to use as end-of-line marker when talking to the @acronym{NNTP}
12811 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12812 using a non native connection function.
12813
12814 @item nntp-telnet-command
12815 @vindex nntp-telnet-command
12816 Command to use when connecting to the @acronym{NNTP} server through
12817 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12818 just for the real @acronym{NNTP} server.  The default is
12819 @samp{telnet}.
12820
12821 @item nntp-telnet-switches
12822 @vindex nntp-telnet-switches
12823 A list of switches to pass to @code{nntp-telnet-command}.  The default
12824 is @samp{("-8")}.
12825
12826 @end table
12827
12828
12829 @node News Spool
12830 @subsection News Spool
12831 @cindex nnspool
12832 @cindex news spool
12833
12834 Subscribing to a foreign group from the local spool is extremely easy,
12835 and might be useful, for instance, to speed up reading groups that
12836 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12837 instance.
12838
12839 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12840 anything else) as the address.
12841
12842 If you have access to a local spool, you should probably use that as the
12843 native select method (@pxref{Finding the News}).  It is normally faster
12844 than using an @code{nntp} select method, but might not be.  It depends.
12845 You just have to try to find out what's best at your site.
12846
12847 @table @code
12848
12849 @item nnspool-inews-program
12850 @vindex nnspool-inews-program
12851 Program used to post an article.
12852
12853 @item nnspool-inews-switches
12854 @vindex nnspool-inews-switches
12855 Parameters given to the inews program when posting an article.
12856
12857 @item nnspool-spool-directory
12858 @vindex nnspool-spool-directory
12859 Where @code{nnspool} looks for the articles.  This is normally
12860 @file{/usr/spool/news/}.
12861
12862 @item nnspool-nov-directory
12863 @vindex nnspool-nov-directory
12864 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12865 @file{/usr/spool/news/over.view/}.
12866
12867 @item nnspool-lib-dir
12868 @vindex nnspool-lib-dir
12869 Where the news lib dir is (@file{/usr/lib/news/} by default).
12870
12871 @item nnspool-active-file
12872 @vindex nnspool-active-file
12873 The name of the active file.
12874
12875 @item nnspool-newsgroups-file
12876 @vindex nnspool-newsgroups-file
12877 The name of the group descriptions file.
12878
12879 @item nnspool-history-file
12880 @vindex nnspool-history-file
12881 The name of the news history file.
12882
12883 @item nnspool-active-times-file
12884 @vindex nnspool-active-times-file
12885 The name of the active date file.
12886
12887 @item nnspool-nov-is-evil
12888 @vindex nnspool-nov-is-evil
12889 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12890 that it finds.
12891
12892 @item nnspool-sift-nov-with-sed
12893 @vindex nnspool-sift-nov-with-sed
12894 @cindex sed
12895 If non-@code{nil}, which is the default, use @code{sed} to get the
12896 relevant portion from the overview file.  If @code{nil},
12897 @code{nnspool} will load the entire file into a buffer and process it
12898 there.
12899
12900 @end table
12901
12902
12903 @node Getting Mail
12904 @section Getting Mail
12905 @cindex reading mail
12906 @cindex mail
12907
12908 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12909 course.
12910
12911 @menu
12912 * Mail in a Newsreader::        Important introductory notes.
12913 * Getting Started Reading Mail::  A simple cookbook example.
12914 * Splitting Mail::              How to create mail groups.
12915 * Mail Sources::                How to tell Gnus where to get mail from.
12916 * Mail Back End Variables::     Variables for customizing mail handling.
12917 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12918 * Group Mail Splitting::        Use group customize to drive mail splitting.
12919 * Incorporating Old Mail::      What about the old mail you have?
12920 * Expiring Mail::               Getting rid of unwanted mail.
12921 * Washing Mail::                Removing cruft from the mail you get.
12922 * Duplicates::                  Dealing with duplicated mail.
12923 * Not Reading Mail::            Using mail back ends for reading other files.
12924 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12925 @end menu
12926
12927
12928 @node Mail in a Newsreader
12929 @subsection Mail in a Newsreader
12930
12931 If you are used to traditional mail readers, but have decided to switch
12932 to reading mail with Gnus, you may find yourself experiencing something
12933 of a culture shock.
12934
12935 Gnus does not behave like traditional mail readers.  If you want to make
12936 it behave that way, you can, but it's an uphill battle.
12937
12938 Gnus, by default, handles all its groups using the same approach.  This
12939 approach is very newsreaderly---you enter a group, see the new/unread
12940 messages, and when you read the messages, they get marked as read, and
12941 you don't see them any more.  (Unless you explicitly ask for them.)
12942
12943 In particular, you do not do anything explicitly to delete messages.
12944
12945 Does this mean that all the messages that have been marked as read are
12946 deleted?  How awful!
12947
12948 But, no, it means that old messages are @dfn{expired} according to some
12949 scheme or other.  For news messages, the expire process is controlled by
12950 the news administrator; for mail, the expire process is controlled by
12951 you.  The expire process for mail is covered in depth in @ref{Expiring
12952 Mail}.
12953
12954 What many Gnus users find, after using it a while for both news and
12955 mail, is that the transport mechanism has very little to do with how
12956 they want to treat a message.
12957
12958 Many people subscribe to several mailing lists.  These are transported
12959 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12960 answering, or even reading these messages very carefully.  We may not
12961 need to save them because if we should need to read one again, they are
12962 archived somewhere else.
12963
12964 Some people have local news groups which have only a handful of readers.
12965 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12966 to read and answer a large fraction of the messages very carefully in
12967 order to do our work.  And there may not be an archive, so we may need
12968 to save the interesting messages the same way we would personal mail.
12969
12970 The important distinction turns out to be not the transport mechanism,
12971 but other factors such as how interested we are in the subject matter,
12972 or how easy it is to retrieve the message if we need to read it again.
12973
12974 Gnus provides many options for sorting mail into ``groups'' which behave
12975 like newsgroups, and for treating each group (whether mail or news)
12976 differently.
12977
12978 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12979 that Gnus should grow up and be a male, er, mail reader.  It is possible
12980 to whip Gnus into a more mailreaderly being, but, as said before, it's
12981 not easy.  People who prefer proper mail readers should try @sc{vm}
12982 instead, which is an excellent, and proper, mail reader.
12983
12984 I don't mean to scare anybody off, but I want to make it clear that you
12985 may be required to learn a new way of thinking about messages.  After
12986 you've been subjected to The Gnus Way, you will come to love it.  I can
12987 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12988 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12989 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12990 You Do.)
12991
12992
12993 @node Getting Started Reading Mail
12994 @subsection Getting Started Reading Mail
12995
12996 It's quite easy to use Gnus to read your new mail.  You just plonk the
12997 mail back end of your choice into @code{gnus-secondary-select-methods},
12998 and things will happen automatically.
12999
13000 For instance, if you want to use @code{nnml} (which is a ``one file per
13001 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13002
13003 @lisp
13004 (setq gnus-secondary-select-methods '((nnml "")))
13005 @end lisp
13006
13007 Now, the next time you start Gnus, this back end will be queried for new
13008 articles, and it will move all the messages in your spool file to its
13009 directory, which is @file{~/Mail/} by default.  The new group that will
13010 be created (@samp{mail.misc}) will be subscribed, and you can read it
13011 like any other group.
13012
13013 You will probably want to split the mail into several groups, though:
13014
13015 @lisp
13016 (setq nnmail-split-methods
13017       '(("junk" "^From:.*Lars Ingebrigtsen")
13018         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13019         ("other" "")))
13020 @end lisp
13021
13022 This will result in three new @code{nnml} mail groups being created:
13023 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13024 mail that doesn't fit into the first two groups will be placed in the
13025 last group.
13026
13027 This should be sufficient for reading mail with Gnus.  You might want to
13028 give the other sections in this part of the manual a perusal, though.
13029 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13030
13031
13032 @node Splitting Mail
13033 @subsection Splitting Mail
13034 @cindex splitting mail
13035 @cindex mail splitting
13036 @cindex mail filtering (splitting)
13037
13038 @vindex nnmail-split-methods
13039 The @code{nnmail-split-methods} variable says how the incoming mail is
13040 to be split into groups.
13041
13042 @lisp
13043 (setq nnmail-split-methods
13044   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13045     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13046     ("mail.other" "")))
13047 @end lisp
13048
13049 This variable is a list of lists, where the first element of each of
13050 these lists is the name of the mail group (they do not have to be called
13051 something beginning with @samp{mail}, by the way), and the second
13052 element is a regular expression used on the header of each mail to
13053 determine if it belongs in this mail group.  The first string may
13054 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13055 insert sub-expressions from the matched text.  For instance:
13056
13057 @lisp
13058 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13059 @end lisp
13060
13061 The second element can also be a function.  In that case, it will be
13062 called narrowed to the headers with the first element of the rule as the
13063 argument.  It should return a non-@code{nil} value if it thinks that the
13064 mail belongs in that group.
13065
13066 The last of these groups should always be a general one, and the regular
13067 expression should @emph{always} be @samp{*} so that it matches any mails
13068 that haven't been matched by any of the other regexps.  (These rules are
13069 processed from the beginning of the alist toward the end.  The first
13070 rule to make a match will ``win'', unless you have crossposting enabled.
13071 In that case, all matching rules will ``win''.)
13072
13073 If you like to tinker with this yourself, you can set this variable to a
13074 function of your choice.  This function will be called without any
13075 arguments in a buffer narrowed to the headers of an incoming mail
13076 message.  The function should return a list of group names that it
13077 thinks should carry this mail message.
13078
13079 Note that the mail back ends are free to maul the poor, innocent,
13080 incoming headers all they want to.  They all add @code{Lines} headers;
13081 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13082 @code{From<SPACE>} line to something else.
13083
13084 @vindex nnmail-crosspost
13085 The mail back ends all support cross-posting.  If several regexps match,
13086 the mail will be ``cross-posted'' to all those groups.
13087 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13088 that no articles are crossposted to the general (@samp{*}) group.
13089
13090 @vindex nnmail-crosspost-link-function
13091 @cindex crosspost
13092 @cindex links
13093 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13094 the crossposted articles.  However, not all file systems support hard
13095 links.  If that's the case for you, set
13096 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13097 variable is @code{add-name-to-file} by default.)
13098
13099 @kindex M-x nnmail-split-history
13100 @findex nnmail-split-history
13101 If you wish to see where the previous mail split put the messages, you
13102 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13103 where re-spooling messages would put the messages, you can use
13104 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13105 Group Commands}).
13106
13107 @vindex nnmail-split-header-length-limit
13108 Header lines longer than the value of
13109 @code{nnmail-split-header-length-limit} are excluded from the split
13110 function.
13111
13112 @vindex nnmail-mail-splitting-charset
13113 @vindex nnmail-mail-splitting-decodes
13114 By default the splitting codes @acronym{MIME} decodes headers so you
13115 can match on non-@acronym{ASCII} strings.  The
13116 @code{nnmail-mail-splitting-charset} variable specifies the default
13117 charset for decoding.  The behaviour can be turned off completely by
13118 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13119 useful if you want to match articles based on the raw header data.
13120
13121 @vindex nnmail-resplit-incoming
13122 By default, splitting is performed on all incoming messages.  If you
13123 specify a @code{directory} entry for the variable @code{mail-sources}
13124 (@pxref{Mail Source Specifiers}), however, then splitting does
13125 @emph{not} happen by default.  You can set the variable
13126 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13127 splitting happen even in this case.  (This variable has no effect on
13128 other kinds of entries.)
13129
13130 Gnus gives you all the opportunity you could possibly want for shooting
13131 yourself in the foot.  Let's say you create a group that will contain
13132 all the mail you get from your boss.  And then you accidentally
13133 unsubscribe from the group.  Gnus will still put all the mail from your
13134 boss in the unsubscribed group, and so, when your boss mails you ``Have
13135 that report ready by Monday or you're fired!'', you'll never see it and,
13136 come Tuesday, you'll still believe that you're gainfully employed while
13137 you really should be out collecting empty bottles to save up for next
13138 month's rent money.
13139
13140
13141 @node Mail Sources
13142 @subsection Mail Sources
13143
13144 Mail can be gotten from many different sources---the mail spool, from
13145 a @acronym{POP} mail server, from a procmail directory, or from a
13146 maildir, for instance.
13147
13148 @menu
13149 * Mail Source Specifiers::      How to specify what a mail source is.
13150 * Mail Source Customization::   Some variables that influence things.
13151 * Fetching Mail::               Using the mail source specifiers.
13152 @end menu
13153
13154
13155 @node Mail Source Specifiers
13156 @subsubsection Mail Source Specifiers
13157 @cindex POP
13158 @cindex mail server
13159 @cindex procmail
13160 @cindex mail spool
13161 @cindex mail source
13162
13163 You tell Gnus how to fetch mail by setting @code{mail-sources}
13164 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13165
13166 Here's an example:
13167
13168 @lisp
13169 (pop :server "pop3.mailserver.com" :user "myname")
13170 @end lisp
13171
13172 As can be observed, a mail source specifier is a list where the first
13173 element is a @dfn{mail source type}, followed by an arbitrary number of
13174 @dfn{keywords}.  Keywords that are not explicitly specified are given
13175 default values.
13176
13177 The following mail source types are available:
13178
13179 @table @code
13180 @item file
13181 Get mail from a single file; typically from the mail spool.
13182
13183 Keywords:
13184
13185 @table @code
13186 @item :path
13187 The file name.  Defaults to the value of the @env{MAIL}
13188 environment variable or the value of @code{rmail-spool-directory}
13189 (usually something like @file{/usr/mail/spool/user-name}).
13190
13191 @item :prescript
13192 @itemx :postscript
13193 Script run before/after fetching mail.
13194 @end table
13195
13196 An example file mail source:
13197
13198 @lisp
13199 (file :path "/usr/spool/mail/user-name")
13200 @end lisp
13201
13202 Or using the default file name:
13203
13204 @lisp
13205 (file)
13206 @end lisp
13207
13208 If the mail spool file is not located on the local machine, it's best
13209 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13210 You can not use ange-ftp file names here---it has no way to lock the
13211 mail spool while moving the mail.
13212
13213 If it's impossible to set up a proper server, you can use ssh instead.
13214
13215 @lisp
13216 (setq mail-sources
13217       '((file :prescript "ssh host bin/getmail >%t")))
13218 @end lisp
13219
13220 The @samp{getmail} script would look something like the following:
13221
13222 @example
13223 #!/bin/sh
13224 #  getmail - move mail from spool to stdout
13225 #  flu@@iki.fi
13226
13227 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13228 TMP=$HOME/Mail/tmp
13229 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13230 @end example
13231
13232 Alter this script to fit find the @samp{movemail} you want to use.
13233
13234
13235 @item directory
13236 @vindex nnmail-scan-directory-mail-source-once
13237 Get mail from several files in a directory.  This is typically used
13238 when you have procmail split the incoming mail into several files.
13239 That is, there is a one-to-one correspondence between files in that
13240 directory and groups, so that mail from the file @file{foo.bar.spool}
13241 will be put in the group @code{foo.bar}.  (You can change the suffix
13242 to be used instead of @code{.spool}.)  Setting
13243 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13244 Gnus to scan the mail source only once.  This is particularly useful
13245 if you want to scan mail groups at a specified level.
13246
13247 @vindex nnmail-resplit-incoming
13248 There is also the variable @code{nnmail-resplit-incoming}, if you set
13249 that to a non-@code{nil} value, then the normal splitting process is
13250 applied to all the files from the directory, @ref{Splitting Mail}.
13251
13252 Keywords:
13253
13254 @table @code
13255 @item :path
13256 The name of the directory where the files are.  There is no default
13257 value.
13258
13259 @item :suffix
13260 Only files ending with this suffix are used.  The default is
13261 @samp{.spool}.
13262
13263 @item :predicate
13264 Only files that have this predicate return non-@code{nil} are returned.
13265 The default is @code{identity}.  This is used as an additional
13266 filter---only files that have the right suffix @emph{and} satisfy this
13267 predicate are considered.
13268
13269 @item :prescript
13270 @itemx :postscript
13271 Script run before/after fetching mail.
13272
13273 @end table
13274
13275 An example directory mail source:
13276
13277 @lisp
13278 (directory :path "/home/user-name/procmail-dir/"
13279            :suffix ".prcml")
13280 @end lisp
13281
13282 @item pop
13283 Get mail from a @acronym{POP} server.
13284
13285 Keywords:
13286
13287 @table @code
13288 @item :server
13289 The name of the @acronym{POP} server.  The default is taken from the
13290 @env{MAILHOST} environment variable.
13291
13292 @item :port
13293 The port number of the @acronym{POP} server.  This can be a number (eg,
13294 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13295 string, it should be a service name as listed in @file{/etc/services} on
13296 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13297 need to specify it as @samp{"pop-3"} instead.
13298
13299 @item :user
13300 The user name to give to the @acronym{POP} server.  The default is the login
13301 name.
13302
13303 @item :password
13304 The password to give to the @acronym{POP} server.  If not specified,
13305 the user is prompted.
13306
13307 @item :program
13308 The program to use to fetch mail from the @acronym{POP} server.  This
13309 should be a @code{format}-like string.  Here's an example:
13310
13311 @example
13312 fetchmail %u@@%s -P %p %t
13313 @end example
13314
13315 The valid format specifier characters are:
13316
13317 @table @samp
13318 @item t
13319 The name of the file the mail is to be moved to.  This must always be
13320 included in this string.
13321
13322 @item s
13323 The name of the server.
13324
13325 @item P
13326 The port number of the server.
13327
13328 @item u
13329 The user name to use.
13330
13331 @item p
13332 The password to use.
13333 @end table
13334
13335 The values used for these specs are taken from the values you give the
13336 corresponding keywords.
13337
13338 @item :prescript
13339 A script to be run before fetching the mail.  The syntax is the same as
13340 the @code{:program} keyword.  This can also be a function to be run.
13341
13342 @item :postscript
13343 A script to be run after fetching the mail.  The syntax is the same as
13344 the @code{:program} keyword.  This can also be a function to be run.
13345
13346 @item :function
13347 The function to use to fetch mail from the @acronym{POP} server.  The
13348 function is called with one parameter---the name of the file where the
13349 mail should be moved to.
13350
13351 @item :authentication
13352 This can be either the symbol @code{password} or the symbol @code{apop}
13353 and says what authentication scheme to use.  The default is
13354 @code{password}.
13355
13356 @item :connection
13357 What stream to use for connecting to the server, this can be the symbol
13358 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
13359 and use insecure connections.  Note that for SSL/TLS, you need external
13360 programs and libraries:
13361
13362 @itemize @bullet
13363 @item
13364 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
13365 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
13366 library @samp{ssl.el}.
13367 @item
13368 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
13369 Requires the external library @samp{starttls.el} and program
13370 @samp{starttls}.
13371 @end itemize
13372
13373 @item :leave
13374 Non-@code{nil} if mail is to be left on the server and UIDL used for
13375 message retrieval.  The default is @code{nil}.
13376
13377 @end table
13378
13379 If the @code{:program} and @code{:function} keywords aren't specified,
13380 @code{pop3-movemail} will be used.
13381
13382 Here are some examples.  Fetch from the default @acronym{POP} server,
13383 using the default user name, and default fetcher:
13384
13385 @lisp
13386 (pop)
13387 @end lisp
13388
13389 Fetch from a named server with a named user and password:
13390
13391 @lisp
13392 (pop :server "my.pop.server"
13393      :user "user-name" :password "secret")
13394 @end lisp
13395
13396 Use @samp{movemail} to move the mail:
13397
13398 @lisp
13399 (pop :program "movemail po:%u %t %p")
13400 @end lisp
13401
13402 @item maildir
13403 Get mail from a maildir.  This is a type of mailbox that is supported by
13404 at least qmail and postfix, where each file in a special directory
13405 contains exactly one mail.
13406
13407 Keywords:
13408
13409 @table @code
13410 @item :path
13411 The name of the directory where the mails are stored.  The default is
13412 taken from the @env{MAILDIR} environment variable or
13413 @file{~/Maildir/}.
13414 @item :subdirs
13415 The subdirectories of the Maildir.  The default is
13416 @samp{("new" "cur")}.
13417
13418 @c If you sometimes look at your mail through a pop3 daemon before fetching
13419 @c them with Gnus, you may also have to fetch your mails from the
13420 @c @code{cur} directory inside the maildir, like in the first example
13421 @c below.
13422
13423 You can also get mails from remote hosts (because maildirs don't suffer
13424 from locking problems).
13425
13426 @end table
13427
13428 Two example maildir mail sources:
13429
13430 @lisp
13431 (maildir :path "/home/user-name/Maildir/"
13432          :subdirs ("cur" "new"))
13433 @end lisp
13434
13435 @lisp
13436 (maildir :path "/user@@remotehost.org:~/Maildir/"
13437          :subdirs ("new"))
13438 @end lisp
13439
13440 @item imap
13441 Get mail from a @acronym{IMAP} server.  If you don't want to use
13442 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13443 with nnimap), for some reason or other, Gnus let you treat it similar
13444 to a @acronym{POP} server and fetches articles from a given
13445 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13446
13447 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13448 may need external programs and libraries, @xref{IMAP}.
13449
13450 Keywords:
13451
13452 @table @code
13453 @item :server
13454 The name of the @acronym{IMAP} server.  The default is taken from the
13455 @env{MAILHOST} environment variable.
13456
13457 @item :port
13458 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13459 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13460
13461 @item :user
13462 The user name to give to the @acronym{IMAP} server.  The default is the login
13463 name.
13464
13465 @item :password
13466 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13467 prompted.
13468
13469 @item :stream
13470 What stream to use for connecting to the server, this is one of the
13471 symbols in @code{imap-stream-alist}.  Right now, this means
13472 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13473 @samp{ssl}, @samp{shell} or the default @samp{network}.
13474
13475 @item :authentication
13476 Which authenticator to use for authenticating to the server, this is
13477 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13478 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13479 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13480
13481 @item :program
13482 When using the `shell' :stream, the contents of this variable is
13483 mapped into the @code{imap-shell-program} variable.  This should be a
13484 @code{format}-like string (or list of strings).  Here's an example:
13485
13486 @example
13487 ssh %s imapd
13488 @end example
13489
13490 The valid format specifier characters are:
13491
13492 @table @samp
13493 @item s
13494 The name of the server.
13495
13496 @item l
13497 User name from @code{imap-default-user}.
13498
13499 @item p
13500 The port number of the server.
13501 @end table
13502
13503 The values used for these specs are taken from the values you give the
13504 corresponding keywords.
13505
13506 @item :mailbox
13507 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13508 which normally is the mailbox which receive incoming mail.
13509
13510 @item :predicate
13511 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13512 UNDELETED}, is probably the best choice for most people, but if you
13513 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13514 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13515 Then all articles in the mailbox is fetched, no matter what.  For a
13516 complete list of predicates, see RFC 2060 section 6.4.4.
13517
13518 @item :fetchflag
13519 How to flag fetched articles on the server, the default @samp{\Deleted}
13520 will mark them as deleted, an alternative would be @samp{\Seen} which
13521 would simply mark them as read.  These are the two most likely choices,
13522 but more flags are defined in RFC 2060 section 2.3.2.
13523
13524 @item :dontexpunge
13525 If non-@code{nil}, don't remove all articles marked as deleted in the
13526 mailbox after finishing the fetch.
13527
13528 @end table
13529
13530 An example @acronym{IMAP} mail source:
13531
13532 @lisp
13533 (imap :server "mail.mycorp.com"
13534       :stream kerberos4
13535       :fetchflag "\\Seen")
13536 @end lisp
13537
13538 @item webmail
13539 Get mail from a webmail server, such as @uref{www.hotmail.com},
13540 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13541 @uref{mail.yahoo.com}.
13542
13543 NOTE: Webmail largely depends cookies.  A "one-line-cookie" patch is
13544 required for url "4.0pre.46".
13545
13546 WARNING: Mails may be lost.  NO WARRANTY.
13547
13548 Keywords:
13549
13550 @table @code
13551 @item :subtype
13552 The type of the webmail server.  The default is @code{hotmail}.  The
13553 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13554
13555 @item :user
13556 The user name to give to the webmail server.  The default is the login
13557 name.
13558
13559 @item :password
13560 The password to give to the webmail server.  If not specified, the user is
13561 prompted.
13562
13563 @item :dontexpunge
13564 If non-@code{nil}, only fetch unread articles and don't move them to
13565 trash folder after finishing the fetch.
13566
13567 @end table
13568
13569 An example webmail source:
13570
13571 @lisp
13572 (webmail :subtype 'hotmail
13573          :user "user-name"
13574          :password "secret")
13575 @end lisp
13576 @end table
13577
13578 @table @dfn
13579 @item Common Keywords
13580 Common keywords can be used in any type of mail source.
13581
13582 Keywords:
13583
13584 @table @code
13585 @item :plugged
13586 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13587 use directory source to get mail, you can specify it as in this
13588 example:
13589
13590 @lisp
13591 (setq mail-sources
13592       '((directory :path "/home/pavel/.Spool/"
13593                    :suffix ""
13594                    :plugged t)))
13595 @end lisp
13596
13597 Gnus will then fetch your mail even when you are unplugged.  This is
13598 useful when you use local mail and news.
13599
13600 @end table
13601 @end table
13602
13603 @subsubsection Function Interface
13604
13605 Some of the above keywords specify a Lisp function to be executed.
13606 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13607 the value of the keyword while the function is executing.  For example,
13608 consider the following mail-source setting:
13609
13610 @lisp
13611 (setq mail-sources '((pop :user "jrl"
13612                           :server "pophost" :function fetchfunc)))
13613 @end lisp
13614
13615 While the function @code{fetchfunc} is executing, the symbol @code{user}
13616 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13617 @code{"pophost"}.  The symbols @code{port}, @code{password},
13618 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13619 and @code{authentication} are also bound (to their default values).
13620
13621 See above for a list of keywords for each type of mail source.
13622
13623
13624 @node Mail Source Customization
13625 @subsubsection Mail Source Customization
13626
13627 The following is a list of variables that influence how the mail is
13628 fetched.  You would normally not need to set or change any of these
13629 variables.
13630
13631 @table @code
13632 @item mail-source-crash-box
13633 @vindex mail-source-crash-box
13634 File where mail will be stored while processing it.  The default is@*
13635 @file{~/.emacs-mail-crash-box}.
13636
13637 @item mail-source-delete-incoming
13638 @vindex mail-source-delete-incoming
13639 If non-@code{nil}, delete incoming files after handling them.  If
13640 @code{t}, delete the files immediately, if @code{nil}, never delete any
13641 files.  If a positive number, delete files older than number of days
13642 (This will only happen, when receiving new mail).  You may also set
13643 @code{mail-source-delete-incoming} to @code{nil} and call
13644 @code{mail-source-delete-old-incoming} from a hook or interactively.
13645
13646 @item mail-source-delete-old-incoming-confirm
13647 @vindex mail-source-delete-old-incoming-confirm
13648 If non-@code{nil}, ask for for confirmation before deleting old incoming
13649 files.  This variable only applies when
13650 @code{mail-source-delete-incoming} is a positive number.
13651
13652 @item mail-source-ignore-errors
13653 @vindex mail-source-ignore-errors
13654 If non-@code{nil}, ignore errors when reading mail from a mail source.
13655
13656 @item mail-source-directory
13657 @vindex mail-source-directory
13658 Directory where files (if any) will be stored.  The default is
13659 @file{~/Mail/}.  At present, the only thing this is used for is to say
13660 where the incoming files will be stored if the previous variable is
13661 @code{nil}.
13662
13663 @item mail-source-incoming-file-prefix
13664 @vindex mail-source-incoming-file-prefix
13665 Prefix for file name for storing incoming mail.  The default is
13666 @file{Incoming}, in which case files will end up with names like
13667 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13668 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13669
13670 @item mail-source-default-file-modes
13671 @vindex mail-source-default-file-modes
13672 All new mail files will get this file mode.  The default is 384.
13673
13674 @item mail-source-movemail-program
13675 @vindex mail-source-movemail-program
13676 If non-@code{nil}, name of program for fetching new mail.  If
13677 @code{nil}, @code{movemail} in @var{exec-directory}.
13678
13679 @end table
13680
13681
13682 @node Fetching Mail
13683 @subsubsection Fetching Mail
13684
13685 @vindex mail-sources
13686 @vindex nnmail-spool-file
13687 The way to actually tell Gnus where to get new mail from is to set
13688 @code{mail-sources} to a list of mail source specifiers
13689 (@pxref{Mail Source Specifiers}).
13690
13691 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13692 @code{nil}, the mail back ends will never attempt to fetch mail by
13693 themselves.
13694
13695 If you want to fetch mail both from your local spool as well as a
13696 @acronym{POP} mail server, you'd say something like:
13697
13698 @lisp
13699 (setq mail-sources
13700       '((file)
13701         (pop :server "pop3.mail.server"
13702              :password "secret")))
13703 @end lisp
13704
13705 Or, if you don't want to use any of the keyword defaults:
13706
13707 @lisp
13708 (setq mail-sources
13709       '((file :path "/var/spool/mail/user-name")
13710         (pop :server "pop3.mail.server"
13711              :user "user-name"
13712              :port "pop3"
13713              :password "secret")))
13714 @end lisp
13715
13716
13717 When you use a mail back end, Gnus will slurp all your mail from your
13718 inbox and plonk it down in your home directory.  Gnus doesn't move any
13719 mail if you're not using a mail back end---you have to do a lot of magic
13720 invocations first.  At the time when you have finished drawing the
13721 pentagram, lightened the candles, and sacrificed the goat, you really
13722 shouldn't be too surprised when Gnus moves your mail.
13723
13724
13725
13726 @node Mail Back End Variables
13727 @subsection Mail Back End Variables
13728
13729 These variables are (for the most part) pertinent to all the various
13730 mail back ends.
13731
13732 @table @code
13733 @vindex nnmail-read-incoming-hook
13734 @item nnmail-read-incoming-hook
13735 The mail back ends all call this hook after reading new mail.  You can
13736 use this hook to notify any mail watch programs, if you want to.
13737
13738 @vindex nnmail-split-hook
13739 @item nnmail-split-hook
13740 @findex gnus-article-decode-encoded-words
13741 @cindex RFC 1522 decoding
13742 @cindex RFC 2047 decoding
13743 Hook run in the buffer where the mail headers of each message is kept
13744 just before the splitting based on these headers is done.  The hook is
13745 free to modify the buffer contents in any way it sees fit---the buffer
13746 is discarded after the splitting has been done, and no changes performed
13747 in the buffer will show up in any files.
13748 @code{gnus-article-decode-encoded-words} is one likely function to add
13749 to this hook.
13750
13751 @vindex nnmail-pre-get-new-mail-hook
13752 @vindex nnmail-post-get-new-mail-hook
13753 @item nnmail-pre-get-new-mail-hook
13754 @itemx nnmail-post-get-new-mail-hook
13755 These are two useful hooks executed when treating new incoming
13756 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13757 starting to handle the new mail) and
13758 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13759 is done).  Here's and example of using these two hooks to change the
13760 default file modes the new mail files get:
13761
13762 @lisp
13763 (add-hook 'nnmail-pre-get-new-mail-hook
13764           (lambda () (set-default-file-modes 511)))
13765
13766 (add-hook 'nnmail-post-get-new-mail-hook
13767           (lambda () (set-default-file-modes 551)))
13768 @end lisp
13769
13770 @item nnmail-use-long-file-names
13771 @vindex nnmail-use-long-file-names
13772 If non-@code{nil}, the mail back ends will use long file and directory
13773 names.  Groups like @samp{mail.misc} will end up in directories
13774 (assuming use of @code{nnml} back end) or files (assuming use of
13775 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13776 the same group will end up in @file{mail/misc}.
13777
13778 @item nnmail-delete-file-function
13779 @vindex nnmail-delete-file-function
13780 @findex delete-file
13781 Function called to delete files.  It is @code{delete-file} by default.
13782
13783 @item nnmail-cache-accepted-message-ids
13784 @vindex nnmail-cache-accepted-message-ids
13785 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13786 the back end (via @code{Gcc}, for instance) into the mail duplication
13787 discovery cache.  The default is @code{nil}.
13788
13789 @item nnmail-cache-ignore-groups
13790 @vindex nnmail-cache-ignore-groups
13791 This can be a regular expression or a list of regular expressions.
13792 Group names that match any of the regular expressions will never be
13793 recorded in the @code{Message-ID} cache.
13794
13795 This can be useful, for example, when using Fancy Splitting
13796 (@pxref{Fancy Mail Splitting}) together with the function
13797 @code{nnmail-split-fancy-with-parent}.
13798
13799 @end table
13800
13801
13802 @node Fancy Mail Splitting
13803 @subsection Fancy Mail Splitting
13804 @cindex mail splitting
13805 @cindex fancy mail splitting
13806
13807 @vindex nnmail-split-fancy
13808 @findex nnmail-split-fancy
13809 If the rather simple, standard method for specifying how to split mail
13810 doesn't allow you to do what you want, you can set
13811 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13812 play with the @code{nnmail-split-fancy} variable.
13813
13814 Let's look at an example value of this variable first:
13815
13816 @lisp
13817 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13818 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13819 ;; @r{from real errors.}
13820 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13821                    "mail.misc"))
13822    ;; @r{Non-error messages are crossposted to all relevant}
13823    ;; @r{groups, but we don't crosspost between the group for the}
13824    ;; @r{(ding) list and the group for other (ding) related mail.}
13825    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13826          ("subject" "ding" "ding.misc"))
13827       ;; @r{Other mailing lists@dots{}}
13828       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13829       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13830       ;; @r{Both lists below have the same suffix, so prevent}
13831       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13832       ;; @r{the bugs- list, but allow cross-posting when the}
13833       ;; @r{message was really cross-posted.}
13834       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13835       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13836       ;; @r{People@dots{}}
13837       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13838    ;; @r{Unmatched mail goes to the catch all group.}
13839    "misc.misc")
13840 @end lisp
13841
13842 This variable has the format of a @dfn{split}.  A split is a (possibly)
13843 recursive structure where each split may contain other splits.  Here are
13844 the five possible split syntaxes:
13845
13846 @enumerate
13847
13848 @item
13849 @samp{group}: If the split is a string, that will be taken as a group
13850 name.  Normal regexp match expansion will be done.  See below for
13851 examples.
13852
13853 @item
13854 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13855 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13856 first element of which is a string, then store the message as
13857 specified by @var{split}, if header @var{field} (a regexp) contains
13858 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13859 matches some string after @var{field} and before the end of the
13860 matched @var{value}, the @var{split} is ignored.  If none of the
13861 @var{restrict} clauses match, @var{split} is processed.
13862
13863 @item
13864 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13865 element is @code{|} (vertical bar), then process each @var{split} until
13866 one of them matches.  A @var{split} is said to match if it will cause
13867 the mail message to be stored in one or more groups.
13868
13869 @item
13870 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13871 element is @code{&}, then process all @var{split}s in the list.
13872
13873 @item
13874 @code{junk}: If the split is the symbol @code{junk}, then don't save
13875 (i.e., delete) this message.  Use with extreme caution.
13876
13877 @item
13878 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13879 a list, and the first element is @code{:}, then the second element will
13880 be called as a function with @var{args} given as arguments.  The
13881 function should return a @var{split}.
13882
13883 @cindex body split
13884 For instance, the following function could be used to split based on the
13885 body of the messages:
13886
13887 @lisp
13888 (defun split-on-body ()
13889   (save-excursion
13890     (set-buffer " *nnmail incoming*")
13891     (goto-char (point-min))
13892     (when (re-search-forward "Some.*string" nil t)
13893       "string.group")))
13894 @end lisp
13895
13896 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13897 when the @code{:} function is run.
13898
13899 @item
13900 @code{(! @var{func} @var{split})}: If the split is a list, and the
13901 first element is @code{!}, then @var{split} will be processed, and
13902 @var{func} will be called as a function with the result of @var{split}
13903 as argument.  @var{func} should return a split.
13904
13905 @item
13906 @code{nil}: If the split is @code{nil}, it is ignored.
13907
13908 @end enumerate
13909
13910 In these splits, @var{field} must match a complete field name.
13911 @var{value} must match a complete word according to the fundamental mode
13912 syntax table.  You can use @code{.*} in the regexps to match partial
13913 field names or words.  In other words, all @var{value}'s are wrapped in
13914 @samp{\<} and @samp{\>} pairs.
13915
13916 @vindex nnmail-split-abbrev-alist
13917 @var{field} and @var{value} can also be Lisp symbols, in that case
13918 they are expanded as specified by the variable
13919 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
13920 where the @code{car} of a cell contains the key, and the @code{cdr}
13921 contains the associated value.  Predefined entries in
13922 @code{nnmail-split-abbrev-alist} include:
13923
13924 @table @code
13925 @item from
13926 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
13927 @item to
13928 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
13929 @samp{Resent-To} and @samp{Resent-Cc} fields.
13930 @item any
13931 Is the union of the @code{from} and @code{to} entries.
13932 @end table
13933
13934 @vindex nnmail-split-fancy-syntax-table
13935 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13936 when all this splitting is performed.
13937
13938 If you want to have Gnus create groups dynamically based on some
13939 information in the headers (i.e., do @code{replace-match}-like
13940 substitutions in the group names), you can say things like:
13941
13942 @example
13943 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13944 @end example
13945
13946 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13947 will be filed in @samp{mail.debian.foo}.
13948
13949 If the string contains the element @samp{\&}, then the previously
13950 matched string will be substituted.  Similarly, the elements @samp{\\1}
13951 up to @samp{\\9} will be substituted with the text matched by the
13952 groupings 1 through 9.
13953
13954 @findex nnmail-split-fancy-with-parent
13955 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13956 split followups into the same groups their parents are in.  Sometimes
13957 you can't make splitting rules for all your mail.  For example, your
13958 boss might send you personal mail regarding different projects you are
13959 working on, and as you can't tell your boss to put a distinguishing
13960 string into the subject line, you have to resort to manually moving the
13961 messages into the right group.  With this function, you only have to do
13962 it once per thread.
13963
13964 To use this feature, you have to set @code{nnmail-treat-duplicates}
13965 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13966 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13967 using the colon feature, like so:
13968 @lisp
13969 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13970       nnmail-cache-accepted-message-ids t
13971       nnmail-split-fancy
13972       '(| (: nnmail-split-fancy-with-parent)
13973           ;; @r{other splits go here}
13974         ))
13975 @end lisp
13976
13977 This feature works as follows: when @code{nnmail-treat-duplicates} is
13978 non-@code{nil}, Gnus records the message id of every message it sees
13979 in the file specified by the variable
13980 @code{nnmail-message-id-cache-file}, together with the group it is in
13981 (the group is omitted for non-mail messages).  When mail splitting is
13982 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13983 at the References (and In-Reply-To) header of each message to split
13984 and searches the file specified by @code{nnmail-message-id-cache-file}
13985 for the message ids.  When it has found a parent, it returns the
13986 corresponding group name unless the group name matches the regexp
13987 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13988 recommended that you set @code{nnmail-message-id-cache-length} to a
13989 somewhat higher number than the default so that the message ids are
13990 still in the cache.  (A value of 5000 appears to create a file some
13991 300 kBytes in size.)
13992 @vindex nnmail-cache-accepted-message-ids
13993 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13994 also records the message ids of moved articles, so that the followup
13995 messages goes into the new group.
13996
13997 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13998 want certain groups to be recorded in the cache.  For example, if all
13999 outgoing messages are written to an ``outgoing'' group, you could set
14000 @code{nnmail-cache-ignore-groups} to match that group name.
14001 Otherwise, answers to all your messages would end up in the
14002 ``outgoing'' group.
14003
14004
14005 @node Group Mail Splitting
14006 @subsection Group Mail Splitting
14007 @cindex mail splitting
14008 @cindex group mail splitting
14009
14010 @findex gnus-group-split
14011 If you subscribe to dozens of mailing lists but you don't want to
14012 maintain mail splitting rules manually, group mail splitting is for you.
14013 You just have to set @var{to-list} and/or @var{to-address} in group
14014 parameters or group customization and set @code{nnmail-split-methods} to
14015 @code{gnus-group-split}.  This splitting function will scan all groups
14016 for those parameters and split mail accordingly, i.e., messages posted
14017 from or to the addresses specified in the parameters @var{to-list} or
14018 @var{to-address} of a mail group will be stored in that group.
14019
14020 Sometimes, mailing lists have multiple addresses, and you may want mail
14021 splitting to recognize them all: just set the @var{extra-aliases} group
14022 parameter to the list of additional addresses and it's done.  If you'd
14023 rather use a regular expression, set @var{split-regexp}.
14024
14025 All these parameters in a group will be used to create an
14026 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14027 the @var{value} is a single regular expression that matches
14028 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
14029 matches of @var{split-regexp}, and the @var{split} is the name of the
14030 group.  @var{restrict}s are also supported: just set the
14031 @var{split-exclude} parameter to a list of regular expressions.
14032
14033 If you can't get the right split to be generated using all these
14034 parameters, or you just need something fancier, you can set the
14035 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
14036 this case, all other aforementioned parameters will be ignored by
14037 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
14038 @code{nil}, in which case the group will be ignored by
14039 @code{gnus-group-split}.
14040
14041 @vindex gnus-group-split-default-catch-all-group
14042 @code{gnus-group-split} will do cross-posting on all groups that match,
14043 by defining a single @code{&} fancy split containing one split for each
14044 group.  If a message doesn't match any split, it will be stored in the
14045 group named in @code{gnus-group-split-default-catch-all-group}, unless
14046 some group has @var{split-spec} set to @code{catch-all}, in which case
14047 that group is used as the catch-all group.  Even though this variable is
14048 often used just to name a group, it may also be set to an arbitrarily
14049 complex fancy split (after all, a group name is a fancy split), and this
14050 may be useful to split mail that doesn't go to any mailing list to
14051 personal mail folders.  Note that this fancy split is added as the last
14052 element of a @code{|} split list that also contains a @code{&} split
14053 with the rules extracted from group parameters.
14054
14055 It's time for an example.  Assume the following group parameters have
14056 been defined:
14057
14058 @example
14059 nnml:mail.bar:
14060 ((to-address . "bar@@femail.com")
14061  (split-regexp . ".*@@femail\\.com"))
14062 nnml:mail.foo:
14063 ((to-list . "foo@@nowhere.gov")
14064  (extra-aliases "foo@@localhost" "foo-redist@@home")
14065  (split-exclude "bugs-foo" "rambling-foo")
14066  (admin-address . "foo-request@@nowhere.gov"))
14067 nnml:mail.others:
14068 ((split-spec . catch-all))
14069 @end example
14070
14071 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14072 behave as if @code{nnmail-split-fancy} had been selected and variable
14073 @code{nnmail-split-fancy} had been set as follows:
14074
14075 @lisp
14076 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14077       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14078            - "bugs-foo" - "rambling-foo" "mail.foo"))
14079    "mail.others")
14080 @end lisp
14081
14082 @findex gnus-group-split-fancy
14083 If you'd rather not use group splitting for all your mail groups, you
14084 may use it for only some of them, by using @code{nnmail-split-fancy}
14085 splits like this:
14086
14087 @lisp
14088 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14089 @end lisp
14090
14091 @var{groups} may be a regular expression or a list of group names whose
14092 parameters will be scanned to generate the output split.
14093 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14094 single @code{|} split will be output.  @var{catch-all} is the fall back
14095 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14096 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14097 empty string in any selected group, no catch-all split will be issued.
14098 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14099 this group will override the value of the @var{catch-all} argument.
14100
14101 @findex gnus-group-split-setup
14102 Unfortunately, scanning all groups and their parameters can be quite
14103 slow, especially considering that it has to be done for every message.
14104 But don't despair!  The function @code{gnus-group-split-setup} can be
14105 used to enable @code{gnus-group-split} in a much more efficient way.  It
14106 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14107 @code{nnmail-split-fancy} to the split produced by
14108 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14109 scanned once, no matter how many messages are split.
14110
14111 @findex gnus-group-split-update
14112 However, if you change group parameters, you'd have to update
14113 @code{nnmail-split-fancy} manually.  You can do it by running
14114 @code{gnus-group-split-update}.  If you'd rather have it updated
14115 automatically, just tell @code{gnus-group-split-setup} to do it for
14116 you.  For example, add to your @file{~/.gnus.el}:
14117
14118 @lisp
14119 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14120 @end lisp
14121
14122 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14123 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14124 have to worry about updating @code{nnmail-split-fancy} again.  If you
14125 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14126 @code{gnus-group-split-default-catch-all-group} will be set to its
14127 value.
14128
14129 @vindex gnus-group-split-updated-hook
14130 Because you may want to change @code{nnmail-split-fancy} after it is set
14131 by @code{gnus-group-split-update}, this function will run
14132 @code{gnus-group-split-updated-hook} just before finishing.
14133
14134 @node Incorporating Old Mail
14135 @subsection Incorporating Old Mail
14136 @cindex incorporating old mail
14137 @cindex import old mail
14138
14139 Most people have lots of old mail stored in various file formats.  If
14140 you have set up Gnus to read mail using one of the spiffy Gnus mail
14141 back ends, you'll probably wish to have that old mail incorporated into
14142 your mail groups.
14143
14144 Doing so can be quite easy.
14145
14146 To take an example: You're reading mail using @code{nnml}
14147 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14148 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14149 file filled with important, but old, mail.  You want to move it into
14150 your @code{nnml} groups.
14151
14152 Here's how:
14153
14154 @enumerate
14155 @item
14156 Go to the group buffer.
14157
14158 @item
14159 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14160 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14161
14162 @item
14163 Type @kbd{SPACE} to enter the newly created group.
14164
14165 @item
14166 Type @kbd{M P b} to process-mark all articles in this group's buffer
14167 (@pxref{Setting Process Marks}).
14168
14169 @item
14170 Type @kbd{B r} to respool all the process-marked articles, and answer
14171 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14172 @end enumerate
14173
14174 All the mail messages in the mbox file will now also be spread out over
14175 all your @code{nnml} groups.  Try entering them and check whether things
14176 have gone without a glitch.  If things look ok, you may consider
14177 deleting the mbox file, but I wouldn't do that unless I was absolutely
14178 sure that all the mail has ended up where it should be.
14179
14180 Respooling is also a handy thing to do if you're switching from one mail
14181 back end to another.  Just respool all the mail in the old mail groups
14182 using the new mail back end.
14183
14184
14185 @node Expiring Mail
14186 @subsection Expiring Mail
14187 @cindex article expiry
14188
14189 Traditional mail readers have a tendency to remove mail articles when
14190 you mark them as read, in some way.  Gnus takes a fundamentally
14191 different approach to mail reading.
14192
14193 Gnus basically considers mail just to be news that has been received in
14194 a rather peculiar manner.  It does not think that it has the power to
14195 actually change the mail, or delete any mail messages.  If you enter a
14196 mail group, and mark articles as ``read'', or kill them in some other
14197 fashion, the mail articles will still exist on the system.  I repeat:
14198 Gnus will not delete your old, read mail.  Unless you ask it to, of
14199 course.
14200
14201 To make Gnus get rid of your unwanted mail, you have to mark the
14202 articles as @dfn{expirable}.  (With the default key bindings, this means
14203 that you have to type @kbd{E}.)  This does not mean that the articles
14204 will disappear right away, however.  In general, a mail article will be
14205 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14206 more than one week old.  If you do not mark an article as expirable, it
14207 will remain on your system until hell freezes over.  This bears
14208 repeating one more time, with some spurious capitalizations: IF you do
14209 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14210
14211 You do not have to mark articles as expirable by hand.  Gnus provides
14212 two features, called ``auto-expire'' and ``total-expire'', that can help you
14213 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14214 for you when you select an article.  And ``total-expire'' means that Gnus
14215 considers all articles as expirable that are read.  So, in addition to
14216 the articles marked @samp{E}, also the articles marked @samp{r},
14217 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14218 expirable.
14219
14220 When should either auto-expire or total-expire be used?  Most people
14221 who are subscribed to mailing lists split each list into its own group
14222 and then turn on auto-expire or total-expire for those groups.
14223 (@xref{Splitting Mail}, for more information on splitting each list
14224 into its own group.)
14225
14226 Which one is better, auto-expire or total-expire?  It's not easy to
14227 answer.  Generally speaking, auto-expire is probably faster.  Another
14228 advantage of auto-expire is that you get more marks to work with: for
14229 the articles that are supposed to stick around, you can still choose
14230 between tick and dormant and read marks.  But with total-expire, you
14231 only have dormant and ticked to choose from.  The advantage of
14232 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14233 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14234 scoring.
14235
14236 @vindex gnus-auto-expirable-newsgroups
14237 Groups that match the regular expression
14238 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14239 read marked as expirable automatically.  All articles marked as
14240 expirable have an @samp{E} in the first column in the summary buffer.
14241
14242 By default, if you have auto expiry switched on, Gnus will mark all the
14243 articles you read as expirable, no matter if they were read or unread
14244 before.  To avoid having articles marked as read marked as expirable
14245 automatically, you can put something like the following in your
14246 @file{~/.gnus.el} file:
14247
14248 @vindex gnus-mark-article-hook
14249 @lisp
14250 (remove-hook 'gnus-mark-article-hook
14251              'gnus-summary-mark-read-and-unread-as-read)
14252 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14253 @end lisp
14254
14255 Note that making a group auto-expirable doesn't mean that all read
14256 articles are expired---only the articles marked as expirable
14257 will be expired.  Also note that using the @kbd{d} command won't make
14258 articles expirable---only semi-automatic marking of articles as read will
14259 mark the articles as expirable in auto-expirable groups.
14260
14261 Let's say you subscribe to a couple of mailing lists, and you want the
14262 articles you have read to disappear after a while:
14263
14264 @lisp
14265 (setq gnus-auto-expirable-newsgroups
14266       "mail.nonsense-list\\|mail.nice-list")
14267 @end lisp
14268
14269 Another way to have auto-expiry happen is to have the element
14270 @code{auto-expire} in the group parameters of the group.
14271
14272 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14273 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14274 don't really mix very well.
14275
14276 @vindex nnmail-expiry-wait
14277 The @code{nnmail-expiry-wait} variable supplies the default time an
14278 expirable article has to live.  Gnus starts counting days from when the
14279 message @emph{arrived}, not from when it was sent.  The default is seven
14280 days.
14281
14282 Gnus also supplies a function that lets you fine-tune how long articles
14283 are to live, based on what group they are in.  Let's say you want to
14284 have one month expiry period in the @samp{mail.private} group, a one day
14285 expiry period in the @samp{mail.junk} group, and a six day expiry period
14286 everywhere else:
14287
14288 @vindex nnmail-expiry-wait-function
14289 @lisp
14290 (setq nnmail-expiry-wait-function
14291       (lambda (group)
14292        (cond ((string= group "mail.private")
14293                31)
14294              ((string= group "mail.junk")
14295                1)
14296              ((string= group "important")
14297                'never)
14298              (t
14299                6))))
14300 @end lisp
14301
14302 The group names this function is fed are ``unadorned'' group
14303 names---no @samp{nnml:} prefixes and the like.
14304
14305 The @code{nnmail-expiry-wait} variable and
14306 @code{nnmail-expiry-wait-function} function can either be a number (not
14307 necessarily an integer) or one of the symbols @code{immediate} or
14308 @code{never}.
14309
14310 You can also use the @code{expiry-wait} group parameter to selectively
14311 change the expiry period (@pxref{Group Parameters}).
14312
14313 @vindex nnmail-expiry-target
14314 The normal action taken when expiring articles is to delete them.
14315 However, in some circumstances it might make more sense to move them
14316 to other groups instead of deleting them.  The variable
14317 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14318 parameter) controls this.  The variable supplies a default value for
14319 all groups, which can be overridden for specific groups by the group
14320 parameter.  default value is @code{delete}, but this can also be a
14321 string (which should be the name of the group the message should be
14322 moved to), or a function (which will be called in a buffer narrowed to
14323 the message in question, and with the name of the group being moved
14324 from as its parameter) which should return a target---either a group
14325 name or @code{delete}.
14326
14327 Here's an example for specifying a group name:
14328 @lisp
14329 (setq nnmail-expiry-target "nnml:expired")
14330 @end lisp
14331
14332 @findex nnmail-fancy-expiry-target
14333 @vindex nnmail-fancy-expiry-targets
14334 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14335 expire mail to groups according to the variable
14336 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14337
14338 @lisp
14339  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14340        nnmail-fancy-expiry-targets
14341        '((to-from "boss" "nnfolder:Work")
14342          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14343          ("from" ".*" "nnfolder:Archive-%Y")))
14344 @end lisp
14345
14346 With this setup, any mail that has @code{IMPORTANT} in its Subject
14347 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14348 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14349 From or To header contains the string @code{boss}, it will get expired
14350 to @code{nnfolder:Work}.  All other mail will get expired to
14351 @code{nnfolder:Archive-YYYY}.
14352
14353 @vindex nnmail-keep-last-article
14354 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14355 expire the final article in a mail newsgroup.  This is to make life
14356 easier for procmail users.
14357
14358 @vindex gnus-total-expirable-newsgroups
14359 By the way: That line up there, about Gnus never expiring non-expirable
14360 articles, is a lie.  If you put @code{total-expire} in the group
14361 parameters, articles will not be marked as expirable, but all read
14362 articles will be put through the expiry process.  Use with extreme
14363 caution.  Even more dangerous is the
14364 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14365 this regexp will have all read articles put through the expiry process,
14366 which means that @emph{all} old mail articles in the groups in question
14367 will be deleted after a while.  Use with extreme caution, and don't come
14368 crying to me when you discover that the regexp you used matched the
14369 wrong group and all your important mail has disappeared.  Be a
14370 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14371 with!  So there!
14372
14373 Most people make most of their mail groups total-expirable, though.
14374
14375 @vindex gnus-inhibit-user-auto-expire
14376 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14377 commands will not mark an article as expirable, even if the group has
14378 auto-expire turned on.
14379
14380
14381 @node Washing Mail
14382 @subsection Washing Mail
14383 @cindex mail washing
14384 @cindex list server brain damage
14385 @cindex incoming mail treatment
14386
14387 Mailers and list servers are notorious for doing all sorts of really,
14388 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14389 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14390 end of all lines passing through our server, so let's do that!!!!1!''
14391 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14392 considered to be self-evident were not discussed.  So.  Here we are.
14393
14394 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14395 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14396 be shocked and dismayed by this, but I haven't got the energy.  It is to
14397 laugh.
14398
14399 Gnus provides a plethora of functions for washing articles while
14400 displaying them, but it might be nicer to do the filtering before
14401 storing the mail to disk.  For that purpose, we have three hooks and
14402 various functions that can be put in these hooks.
14403
14404 @table @code
14405 @item nnmail-prepare-incoming-hook
14406 @vindex nnmail-prepare-incoming-hook
14407 This hook is called before doing anything with the mail and is meant for
14408 grand, sweeping gestures.  It is called in a buffer that contains all
14409 the new, incoming mail.  Functions to be used include:
14410
14411 @table @code
14412 @item nnheader-ms-strip-cr
14413 @findex nnheader-ms-strip-cr
14414 Remove trailing carriage returns from each line.  This is default on
14415 Emacs running on MS machines.
14416
14417 @end table
14418
14419 @item nnmail-prepare-incoming-header-hook
14420 @vindex nnmail-prepare-incoming-header-hook
14421 This hook is called narrowed to each header.  It can be used when
14422 cleaning up the headers.  Functions that can be used include:
14423
14424 @table @code
14425 @item nnmail-remove-leading-whitespace
14426 @findex nnmail-remove-leading-whitespace
14427 Clear leading white space that ``helpful'' listservs have added to the
14428 headers to make them look nice.  Aaah.
14429
14430 (Note that this function works on both the header on the body of all
14431 messages, so it is a potentially dangerous function to use (if a body
14432 of a message contains something that looks like a header line).  So
14433 rather than fix the bug, it is of course the right solution to make it
14434 into a feature by documenting it.)
14435
14436 @item nnmail-remove-list-identifiers
14437 @findex nnmail-remove-list-identifiers
14438 Some list servers add an identifier---for example, @samp{(idm)}---to the
14439 beginning of all @code{Subject} headers.  I'm sure that's nice for
14440 people who use stone age mail readers.  This function will remove
14441 strings that match the @code{nnmail-list-identifiers} regexp, which can
14442 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14443 @code{\\(..\\)}.
14444
14445 For instance, if you want to remove the @samp{(idm)} and the
14446 @samp{nagnagnag} identifiers:
14447
14448 @lisp
14449 (setq nnmail-list-identifiers
14450       '("(idm)" "nagnagnag"))
14451 @end lisp
14452
14453 This can also be done non-destructively with
14454 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14455
14456 @item nnmail-remove-tabs
14457 @findex nnmail-remove-tabs
14458 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14459
14460 @item nnmail-fix-eudora-headers
14461 @findex nnmail-fix-eudora-headers
14462 @cindex Eudora
14463 Eudora produces broken @code{References} headers, but OK
14464 @code{In-Reply-To} headers.  This function will get rid of the
14465 @code{References} headers.
14466
14467 @end table
14468
14469 @item nnmail-prepare-incoming-message-hook
14470 @vindex nnmail-prepare-incoming-message-hook
14471 This hook is called narrowed to each message.  Functions to be used
14472 include:
14473
14474 @table @code
14475 @item article-de-quoted-unreadable
14476 @findex article-de-quoted-unreadable
14477 Decode Quoted Readable encoding.
14478
14479 @end table
14480 @end table
14481
14482
14483 @node Duplicates
14484 @subsection Duplicates
14485
14486 @vindex nnmail-treat-duplicates
14487 @vindex nnmail-message-id-cache-length
14488 @vindex nnmail-message-id-cache-file
14489 @cindex duplicate mails
14490 If you are a member of a couple of mailing lists, you will sometimes
14491 receive two copies of the same mail.  This can be quite annoying, so
14492 @code{nnmail} checks for and treats any duplicates it might find.  To do
14493 this, it keeps a cache of old @code{Message-ID}s---
14494 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14495 default.  The approximate maximum number of @code{Message-ID}s stored
14496 there is controlled by the @code{nnmail-message-id-cache-length}
14497 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14498 stored.) If all this sounds scary to you, you can set
14499 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14500 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14501 will insert a warning into the head of the mail saying that it thinks
14502 that this is a duplicate of a different message.
14503
14504 This variable can also be a function.  If that's the case, the function
14505 will be called from a buffer narrowed to the message in question with
14506 the @code{Message-ID} as a parameter.  The function must return either
14507 @code{nil}, @code{warn}, or @code{delete}.
14508
14509 You can turn this feature off completely by setting the variable to
14510 @code{nil}.
14511
14512 If you want all the duplicate mails to be put into a special
14513 @dfn{duplicates} group, you could do that using the normal mail split
14514 methods:
14515
14516 @lisp
14517 (setq nnmail-split-fancy
14518       '(| ;; @r{Messages duplicates go to a separate group.}
14519         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14520         ;; @r{Message from daemons, postmaster, and the like to another.}
14521         (any mail "mail.misc")
14522         ;; @r{Other rules.}
14523         [...] ))
14524 @end lisp
14525 @noindent
14526 Or something like:
14527 @lisp
14528 (setq nnmail-split-methods
14529       '(("duplicates" "^Gnus-Warning:.*duplicate")
14530         ;; @r{Other rules.}
14531         [...]))
14532 @end lisp
14533
14534 Here's a neat feature: If you know that the recipient reads her mail
14535 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14536 @code{delete}, you can send her as many insults as you like, just by
14537 using a @code{Message-ID} of a mail that you know that she's already
14538 received.  Think of all the fun!  She'll never see any of it!  Whee!
14539
14540
14541 @node Not Reading Mail
14542 @subsection Not Reading Mail
14543
14544 If you start using any of the mail back ends, they have the annoying
14545 habit of assuming that you want to read mail with them.  This might not
14546 be unreasonable, but it might not be what you want.
14547
14548 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14549 @code{nil}, none of the back ends will ever attempt to read incoming
14550 mail, which should help.
14551
14552 @vindex nnbabyl-get-new-mail
14553 @vindex nnmbox-get-new-mail
14554 @vindex nnml-get-new-mail
14555 @vindex nnmh-get-new-mail
14556 @vindex nnfolder-get-new-mail
14557 This might be too much, if, for instance, you are reading mail quite
14558 happily with @code{nnml} and just want to peek at some old Rmail
14559 file you have stashed away with @code{nnbabyl}.  All back ends have
14560 variables called back-end-@code{get-new-mail}.  If you want to disable
14561 the @code{nnbabyl} mail reading, you edit the virtual server for the
14562 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14563
14564 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14565 narrowed to the article to be saved before saving it when reading
14566 incoming mail.
14567
14568
14569 @node Choosing a Mail Back End
14570 @subsection Choosing a Mail Back End
14571
14572 Gnus will read the mail spool when you activate a mail group.  The mail
14573 file is first copied to your home directory.  What happens after that
14574 depends on what format you want to store your mail in.
14575
14576 There are six different mail back ends in the standard Gnus, and more
14577 back ends are available separately.  The mail back end most people use
14578 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14579 Spool}).
14580
14581 @menu
14582 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14583 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14584 * Mail Spool::                  Store your mail in a private spool?
14585 * MH Spool::                    An mhspool-like back end.
14586 * Maildir::                     Another one-file-per-message format.
14587 * Mail Folders::                Having one file for each group.
14588 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14589 @end menu
14590
14591
14592 @node Unix Mail Box
14593 @subsubsection Unix Mail Box
14594 @cindex nnmbox
14595 @cindex unix mail box
14596
14597 @vindex nnmbox-active-file
14598 @vindex nnmbox-mbox-file
14599 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14600 mail.  @code{nnmbox} will add extra headers to each mail article to say
14601 which group it belongs in.
14602
14603 Virtual server settings:
14604
14605 @table @code
14606 @item nnmbox-mbox-file
14607 @vindex nnmbox-mbox-file
14608 The name of the mail box in the user's home directory.  Default is
14609 @file{~/mbox}.
14610
14611 @item nnmbox-active-file
14612 @vindex nnmbox-active-file
14613 The name of the active file for the mail box.  Default is
14614 @file{~/.mbox-active}.
14615
14616 @item nnmbox-get-new-mail
14617 @vindex nnmbox-get-new-mail
14618 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14619 into groups.  Default is @code{t}.
14620 @end table
14621
14622
14623 @node Rmail Babyl
14624 @subsubsection Rmail Babyl
14625 @cindex nnbabyl
14626 @cindex Rmail mbox
14627
14628 @vindex nnbabyl-active-file
14629 @vindex nnbabyl-mbox-file
14630 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14631 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14632 mail article to say which group it belongs in.
14633
14634 Virtual server settings:
14635
14636 @table @code
14637 @item nnbabyl-mbox-file
14638 @vindex nnbabyl-mbox-file
14639 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14640
14641 @item nnbabyl-active-file
14642 @vindex nnbabyl-active-file
14643 The name of the active file for the rmail box.  The default is
14644 @file{~/.rmail-active}
14645
14646 @item nnbabyl-get-new-mail
14647 @vindex nnbabyl-get-new-mail
14648 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14649 @code{t}
14650 @end table
14651
14652
14653 @node Mail Spool
14654 @subsubsection Mail Spool
14655 @cindex nnml
14656 @cindex mail @acronym{NOV} spool
14657
14658 The @dfn{nnml} spool mail format isn't compatible with any other known
14659 format.  It should be used with some caution.
14660
14661 @vindex nnml-directory
14662 If you use this back end, Gnus will split all incoming mail into files,
14663 one file for each mail, and put the articles into the corresponding
14664 directories under the directory specified by the @code{nnml-directory}
14665 variable.  The default value is @file{~/Mail/}.
14666
14667 You do not have to create any directories beforehand; Gnus will take
14668 care of all that.
14669
14670 If you have a strict limit as to how many files you are allowed to store
14671 in your account, you should not use this back end.  As each mail gets its
14672 own file, you might very well occupy thousands of inodes within a few
14673 weeks.  If this is no problem for you, and it isn't a problem for you
14674 having your friendly systems administrator walking around, madly,
14675 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14676 know that this is probably the fastest format to use.  You do not have
14677 to trudge through a big mbox file just to read your new mail.
14678
14679 @code{nnml} is probably the slowest back end when it comes to article
14680 splitting.  It has to create lots of files, and it also generates
14681 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14682 fastest back end when it comes to reading mail.
14683
14684 @cindex self contained nnml servers
14685 @cindex marks
14686 When the marks file is used (which it is by default), @code{nnml}
14687 servers have the property that you may backup them using @code{tar} or
14688 similar, and later be able to restore them into Gnus (by adding the
14689 proper @code{nnml} server) and have all your marks be preserved.  Marks
14690 for a group is usually stored in the @code{.marks} file (but see
14691 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14692 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14693 to restore the group (after restoring the backup into the nnml
14694 directory).
14695
14696 If for some reason you believe your @file{.marks} files are screwed
14697 up, you can just delete them all.  Gnus will then correctly regenerate
14698 them next time it starts.
14699
14700 Virtual server settings:
14701
14702 @table @code
14703 @item nnml-directory
14704 @vindex nnml-directory
14705 All @code{nnml} directories will be placed under this directory.  The
14706 default is the value of @code{message-directory} (whose default value
14707 is @file{~/Mail}).
14708
14709 @item nnml-active-file
14710 @vindex nnml-active-file
14711 The active file for the @code{nnml} server.  The default is
14712 @file{~/Mail/active}.
14713
14714 @item nnml-newsgroups-file
14715 @vindex nnml-newsgroups-file
14716 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14717 Format}.  The default is @file{~/Mail/newsgroups}.
14718
14719 @item nnml-get-new-mail
14720 @vindex nnml-get-new-mail
14721 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14722 @code{t}.
14723
14724 @item nnml-nov-is-evil
14725 @vindex nnml-nov-is-evil
14726 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14727 default is @code{nil}.
14728
14729 @item nnml-nov-file-name
14730 @vindex nnml-nov-file-name
14731 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14732
14733 @item nnml-prepare-save-mail-hook
14734 @vindex nnml-prepare-save-mail-hook
14735 Hook run narrowed to an article before saving.
14736
14737 @item nnml-marks-is-evil
14738 @vindex nnml-marks-is-evil
14739 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14740 default is @code{nil}.
14741
14742 @item nnml-marks-file-name
14743 @vindex nnml-marks-file-name
14744 The name of the @dfn{marks} files.  The default is @file{.marks}.
14745
14746 @item nnml-use-compressed-files
14747 @vindex nnml-use-compressed-files
14748 If non-@code{nil}, @code{nnml} will allow using compressed message
14749 files.
14750
14751 @end table
14752
14753 @findex nnml-generate-nov-databases
14754 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14755 you can do a complete update by typing @kbd{M-x
14756 nnml-generate-nov-databases}.  This command will trawl through the
14757 entire @code{nnml} hierarchy, looking at each and every article, so it
14758 might take a while to complete.  A better interface to this
14759 functionality can be found in the server buffer (@pxref{Server
14760 Commands}).
14761
14762
14763 @node MH Spool
14764 @subsubsection MH Spool
14765 @cindex nnmh
14766 @cindex mh-e mail spool
14767
14768 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14769 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14770 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14771 but it also makes it easier to write procmail scripts for.
14772
14773 Virtual server settings:
14774
14775 @table @code
14776 @item nnmh-directory
14777 @vindex nnmh-directory
14778 All @code{nnmh} directories will be located under this directory.  The
14779 default is the value of @code{message-directory} (whose default is
14780 @file{~/Mail})
14781
14782 @item nnmh-get-new-mail
14783 @vindex nnmh-get-new-mail
14784 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14785 @code{t}.
14786
14787 @item nnmh-be-safe
14788 @vindex nnmh-be-safe
14789 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14790 sure that the articles in the folder are actually what Gnus thinks they
14791 are.  It will check date stamps and stat everything in sight, so
14792 setting this to @code{t} will mean a serious slow-down.  If you never
14793 use anything but Gnus to read the @code{nnmh} articles, you do not have
14794 to set this variable to @code{t}.  The default is @code{nil}.
14795 @end table
14796
14797
14798 @node Maildir
14799 @subsubsection Maildir
14800 @cindex nnmaildir
14801 @cindex maildir
14802
14803 @code{nnmaildir} stores mail in the maildir format, with each maildir
14804 corresponding to a group in Gnus.  This format is documented here:
14805 @uref{http://cr.yp.to/proto/maildir.html} and here:
14806 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14807 stores extra information in the @file{.nnmaildir/} directory within a
14808 maildir.
14809
14810 Maildir format was designed to allow concurrent deliveries and
14811 reading, without needing locks.  With other back ends, you would have
14812 your mail delivered to a spool of some kind, and then you would
14813 configure Gnus to split mail from that spool into your groups.  You
14814 can still do that with nnmaildir, but the more common configuration is
14815 to have your mail delivered directly to the maildirs that appear as
14816 group in Gnus.
14817
14818 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14819 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14820 data in the filesystem.
14821
14822 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14823 can copy a whole maildir from one Gnus setup to another, and you will
14824 keep your marks.
14825
14826 Virtual server settings:
14827
14828 @table @code
14829 @item directory
14830 For each of your nnmaildir servers (it's very unlikely that you'd need
14831 more than one), you need to create a directory and populate it with
14832 maildirs or symlinks to maildirs (and nothing else; do not choose a
14833 directory already used for other purposes).  Each maildir will be
14834 represented in Gnus as a newsgroup on that server; the filename of the
14835 symlink will be the name of the group.  Any filenames in the directory
14836 starting with @samp{.} are ignored.  The directory is scanned when you
14837 first start Gnus, and each time you type @kbd{g} in the group buffer;
14838 if any maildirs have been removed or added, nnmaildir notices at these
14839 times.
14840
14841 The value of the @code{directory} parameter should be a Lisp form
14842 which is processed by @code{eval} and @code{expand-file-name} to get
14843 the path of the directory for this server.  The form is @code{eval}ed
14844 only when the server is opened; the resulting string is used until the
14845 server is closed.  (If you don't know about forms and @code{eval},
14846 don't worry---a simple string will work.)  This parameter is not
14847 optional; you must specify it.  I don't recommend using
14848 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14849 use that directory by default for various things, and may get confused
14850 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14851
14852 @item target-prefix
14853 This should be a Lisp form which is processed by @code{eval} and
14854 @code{expand-file-name}.  The form is @code{eval}ed only when the
14855 server is opened; the resulting string is used until the server is
14856 closed.
14857
14858 When you create a group on an nnmaildir server, the maildir is created
14859 with @code{target-prefix} prepended to its name, and a symlink
14860 pointing to that maildir is created, named with the plain group name.
14861 So if @code{directory} is @code{"~/.nnmaildir"} and
14862 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14863 the group @code{foo}, nnmaildir will create
14864 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14865 @file{~/.nnmaildir/foo} as a symlink pointing to
14866 @file{../maildirs/foo}.
14867
14868 You can set @code{target-prefix} to a string without any slashes to
14869 create both maildirs and symlinks in the same @code{directory}; in
14870 this case, any maildirs found in @code{directory} whose names start
14871 with @code{target-prefix} will not be listed as groups (but the
14872 symlinks pointing to them will be).
14873
14874 As a special case, if @code{target-prefix} is @code{""} (the default),
14875 then when you create a group, the maildir will be created in
14876 @code{directory} without a corresponding symlink.  Beware that you
14877 cannot use @code{gnus-group-delete-group} on such groups without the
14878 @code{force} argument.
14879
14880 @item directory-files
14881 This should be a function with the same interface as
14882 @code{directory-files} (such as @code{directory-files} itself).  It is
14883 used to scan the server's @code{directory} for maildirs.  This
14884 parameter is optional; the default is
14885 @code{nnheader-directory-files-safe} if
14886 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14887 @code{directory-files} otherwise.
14888 (@code{nnheader-directory-files-is-safe} is checked only once when the
14889 server is opened; if you want to check it each time the directory is
14890 scanned, you'll have to provide your own function that does that.)
14891
14892 @item get-new-mail
14893 If non-@code{nil}, then after scanning for new mail in the group
14894 maildirs themselves as usual, this server will also incorporate mail
14895 the conventional Gnus way, from @code{mail-sources} according to
14896 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14897 value is @code{nil}.
14898
14899 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14900 an nnmaildir group.  The results might happen to be useful, but that
14901 would be by chance, not by design, and the results might be different
14902 in the future.  If your split rules create new groups, remember to
14903 supply a @code{create-directory} server parameter.
14904 @end table
14905
14906 @subsubsection Group parameters
14907
14908 nnmaildir uses several group parameters.  It's safe to ignore all
14909 this; the default behavior for nnmaildir is the same as the default
14910 behavior for other mail back ends: articles are deleted after one week,
14911 etc.  Except for the expiry parameters, all this functionality is
14912 unique to nnmaildir, so you can ignore it if you're just trying to
14913 duplicate the behavior you already have with another back end.
14914
14915 If the value of any of these parameters is a vector, the first element
14916 is evaluated as a Lisp form and the result is used, rather than the
14917 original value.  If the value is not a vector, the value itself is
14918 evaluated as a Lisp form.  (This is why these parameters use names
14919 different from those of other, similar parameters supported by other
14920 back ends: they have different, though similar, meanings.)  (For
14921 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14922 @code{eval} business again; for other values, remember to use an extra
14923 quote and wrap the value in a vector when appropriate.)
14924
14925 @table @code
14926 @item expire-age
14927 An integer specifying the minimum age, in seconds, of an article before
14928 it will be expired, or the symbol @code{never} to specify that
14929 articles should never be expired.  If this parameter is not set,
14930 nnmaildir falls back to the usual
14931 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14932 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14933 wanted a value of 3 days, you could use something like @code{[(* 3 24
14934 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14935 article's age is measured starting from the article file's
14936 modification time.  Normally, this is the same as the article's
14937 delivery time, but editing an article makes it younger.  Moving an
14938 article (other than via expiry) may also make an article younger.
14939
14940 @item expire-group
14941 If this is set to a string such as a full Gnus group name, like
14942 @example
14943 "backend+server.address.string:group.name"
14944 @end example
14945 and if it is not the name of the same group that the parameter belongs
14946 to, then articles will be moved to the specified group during expiry
14947 before being deleted.  @emph{If this is set to an nnmaildir group, the
14948 article will be just as old in the destination group as it was in the
14949 source group.}  So be careful with @code{expire-age} in the
14950 destination group.  If this is set to the name of the same group that
14951 the parameter belongs to, then the article is not expired at all.  If
14952 you use the vector form, the first element is evaluated once for each
14953 article.  So that form can refer to
14954 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14955 article.  @emph{If this parameter is not set, nnmaildir does not fall
14956 back to the @code{expiry-target} group parameter or the
14957 @code{nnmail-expiry-target} variable.}
14958
14959 @item read-only
14960 If this is set to @code{t}, nnmaildir will treat the articles in this
14961 maildir as read-only.  This means: articles are not renamed from
14962 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14963 not @file{cur/}; articles are never deleted; articles cannot be
14964 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14965 directory of another maildir---e.g., a system-wide mailbox containing
14966 a mailing list of common interest.  Everything in the maildir outside
14967 @file{new/} is @emph{not} treated as read-only, so for a shared
14968 mailbox, you do still need to set up your own maildir (or have write
14969 permission to the shared mailbox); your maildir just won't contain
14970 extra copies of the articles.
14971
14972 @item directory-files
14973 A function with the same interface as @code{directory-files}.  It is
14974 used to scan the directories in the maildir corresponding to this
14975 group to find articles.  The default is the function specified by the
14976 server's @code{directory-files} parameter.
14977
14978 @item distrust-Lines:
14979 If non-@code{nil}, nnmaildir will always count the lines of an
14980 article, rather than use the @code{Lines:} header field.  If
14981 @code{nil}, the header field will be used if present.
14982
14983 @item always-marks
14984 A list of mark symbols, such as
14985 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14986 article marks, nnmaildir will say that all articles have these
14987 marks, regardless of whether the marks stored in the filesystem
14988 say so.  This is a proof-of-concept feature that will probably be
14989 removed eventually; it ought to be done in Gnus proper, or
14990 abandoned if it's not worthwhile.
14991
14992 @item never-marks
14993 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14994 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14995 articles have these marks, regardless of whether the marks stored in
14996 the filesystem say so.  @code{never-marks} overrides
14997 @code{always-marks}.  This is a proof-of-concept feature that will
14998 probably be removed eventually; it ought to be done in Gnus proper, or
14999 abandoned if it's not worthwhile.
15000
15001 @item nov-cache-size
15002 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
15003 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
15004 articles in each group.  (This is probably not worthwhile, and will
15005 probably be removed in the future.)  This parameter's value is noticed
15006 only the first time a group is seen after the server is opened---i.e.,
15007 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
15008 until the server is closed and reopened.  The default is an estimate
15009 of the number of articles that would be displayed in the summary
15010 buffer: a count of articles that are either marked with @code{tick} or
15011 not marked with @code{read}, plus a little extra.
15012 @end table
15013
15014 @subsubsection Article identification
15015 Articles are stored in the @file{cur/} subdirectory of each maildir.
15016 Each article file is named like @code{uniq:info}, where @code{uniq}
15017 contains no colons.  nnmaildir ignores, but preserves, the
15018 @code{:info} part.  (Other maildir readers typically use this part of
15019 the filename to store marks.)  The @code{uniq} part uniquely
15020 identifies the article, and is used in various places in the
15021 @file{.nnmaildir/} subdirectory of the maildir to store information
15022 about the corresponding article.  The full pathname of an article is
15023 available in the variable @code{nnmaildir-article-file-name} after you
15024 request the article in the summary buffer.
15025
15026 @subsubsection NOV data
15027 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15028 generate lines in the summary buffer) stored in
15029 @code{.nnmaildir/nov/uniq}.  There is no
15030 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15031 need for it---an article's @acronym{NOV} data is updated automatically when the
15032 article or @code{nnmail-extra-headers} has changed.)  You can force
15033 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15034 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15035 cause nnmaildir to assign a new article number for this article, which
15036 may cause trouble with @code{seen} marks, the Agent, and the cache.
15037
15038 @subsubsection Article marks
15039 An article identified by @code{uniq} is considered to have the mark
15040 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15041 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15042 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15043 to store a new set of marks, nnmaildir creates and deletes the
15044 corresponding files as needed.  (Actually, rather than create a new
15045 file for each mark, it just creates hard links to
15046 @file{.nnmaildir/markfile}, to save inodes.)
15047
15048 You can invent new marks by creating a new directory in
15049 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15050 your server, untar it later, and keep your marks.  You can add and
15051 remove marks yourself by creating and deleting mark files.  If you do
15052 this while Gnus is running and your nnmaildir server is open, it's
15053 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15054 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15055 group buffer afterwards.  Otherwise, Gnus might not pick up the
15056 changes, and might undo them.
15057
15058
15059 @node Mail Folders
15060 @subsubsection Mail Folders
15061 @cindex nnfolder
15062 @cindex mbox folders
15063 @cindex mail folders
15064
15065 @code{nnfolder} is a back end for storing each mail group in a separate
15066 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15067 will add extra headers to keep track of article numbers and arrival
15068 dates.
15069
15070 @cindex self contained nnfolder servers
15071 @cindex marks
15072 When the marks file is used (which it is by default), @code{nnfolder}
15073 servers have the property that you may backup them using @code{tar} or
15074 similar, and later be able to restore them into Gnus (by adding the
15075 proper @code{nnfolder} server) and have all your marks be preserved.
15076 Marks for a group is usually stored in a file named as the mbox file
15077 with @code{.mrk} concatenated to it (but see
15078 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15079 Individual @code{nnfolder} groups are also possible to backup, use
15080 @kbd{G m} to restore the group (after restoring the backup into the
15081 @code{nnfolder} directory).
15082
15083 Virtual server settings:
15084
15085 @table @code
15086 @item nnfolder-directory
15087 @vindex nnfolder-directory
15088 All the @code{nnfolder} mail boxes will be stored under this directory.
15089 The default is the value of @code{message-directory} (whose default is
15090 @file{~/Mail})
15091
15092 @item nnfolder-active-file
15093 @vindex nnfolder-active-file
15094 The name of the active file.  The default is @file{~/Mail/active}.
15095
15096 @item nnfolder-newsgroups-file
15097 @vindex nnfolder-newsgroups-file
15098 The name of the group descriptions file.  @xref{Newsgroups File
15099 Format}.  The default is @file{~/Mail/newsgroups}
15100
15101 @item nnfolder-get-new-mail
15102 @vindex nnfolder-get-new-mail
15103 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15104 is @code{t}
15105
15106 @item nnfolder-save-buffer-hook
15107 @vindex nnfolder-save-buffer-hook
15108 @cindex backup files
15109 Hook run before saving the folders.  Note that Emacs does the normal
15110 backup renaming of files even with the @code{nnfolder} buffers.  If you
15111 wish to switch this off, you could say something like the following in
15112 your @file{.emacs} file:
15113
15114 @lisp
15115 (defun turn-off-backup ()
15116   (set (make-local-variable 'backup-inhibited) t))
15117
15118 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15119 @end lisp
15120
15121 @item nnfolder-delete-mail-hook
15122 @vindex nnfolder-delete-mail-hook
15123 Hook run in a buffer narrowed to the message that is to be deleted.
15124 This function can be used to copy the message to somewhere else, or to
15125 extract some information from it before removing it.
15126
15127 @item nnfolder-nov-is-evil
15128 @vindex nnfolder-nov-is-evil
15129 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15130 default is @code{nil}.
15131
15132 @item nnfolder-nov-file-suffix
15133 @vindex nnfolder-nov-file-suffix
15134 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15135
15136 @item nnfolder-nov-directory
15137 @vindex nnfolder-nov-directory
15138 The directory where the @acronym{NOV} files should be stored.  If
15139 @code{nil}, @code{nnfolder-directory} is used.
15140
15141 @item nnfolder-marks-is-evil
15142 @vindex nnfolder-marks-is-evil
15143 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15144 default is @code{nil}.
15145
15146 @item nnfolder-marks-file-suffix
15147 @vindex nnfolder-marks-file-suffix
15148 The extension for @sc{marks} files.  The default is @file{.mrk}.
15149
15150 @item nnfolder-marks-directory
15151 @vindex nnfolder-marks-directory
15152 The directory where the @sc{marks} files should be stored.  If
15153 @code{nil}, @code{nnfolder-directory} is used.
15154
15155 @end table
15156
15157
15158 @findex nnfolder-generate-active-file
15159 @kindex M-x nnfolder-generate-active-file
15160 If you have lots of @code{nnfolder}-like files you'd like to read with
15161 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15162 command to make @code{nnfolder} aware of all likely files in
15163 @code{nnfolder-directory}.  This only works if you use long file names,
15164 though.
15165
15166 @node Comparing Mail Back Ends
15167 @subsubsection Comparing Mail Back Ends
15168
15169 First, just for terminology, the @dfn{back end} is the common word for a
15170 low-level access method---a transport, if you will, by which something
15171 is acquired.  The sense is that one's mail has to come from somewhere,
15172 and so selection of a suitable back end is required in order to get that
15173 mail within spitting distance of Gnus.
15174
15175 The same concept exists for Usenet itself: Though access to articles is
15176 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15177 in the world got at Usenet by running a reader on the machine where the
15178 articles lay (the machine which today we call an @acronym{NNTP} server), and
15179 access was by the reader stepping into the articles' directory spool
15180 area directly.  One can still select between either the @code{nntp} or
15181 @code{nnspool} back ends, to select between these methods, if one happens
15182 actually to live on the server (or can see its spool directly, anyway,
15183 via NFS).
15184
15185 The goal in selecting a mail back end is to pick one which
15186 simultaneously represents a suitable way of dealing with the original
15187 format plus leaving mail in a form that is convenient to use in the
15188 future.  Here are some high and low points on each:
15189
15190 @table @code
15191 @item nnmbox
15192
15193 UNIX systems have historically had a single, very common, and well-
15194 defined format.  All messages arrive in a single @dfn{spool file}, and
15195 they are delineated by a line whose regular expression matches
15196 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15197 to make it clear in this instance that this is not the RFC-specified
15198 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15199 historically from the Unix environment, it is simplest if one does not
15200 mess a great deal with the original mailbox format, so if one chooses
15201 this back end, Gnus' primary activity in getting mail from the real spool
15202 area to Gnus' preferred directory is simply to copy it, with no
15203 (appreciable) format change in the process.  It is the ``dumbest'' way
15204 to move mail into availability in the Gnus environment.  This makes it
15205 fast to move into place, but slow to parse, when Gnus has to look at
15206 what's where.
15207
15208 @item nnbabyl
15209
15210 Once upon a time, there was the DEC-10 and DEC-20, running operating
15211 systems called TOPS and related things, and the usual (only?) mail
15212 reading environment was a thing called Babyl.  I don't know what format
15213 was used for mail landing on the system, but Babyl had its own internal
15214 format to which mail was converted, primarily involving creating a
15215 spool-file-like entity with a scheme for inserting Babyl-specific
15216 headers and status bits above the top of each message in the file.
15217 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15218 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15219 to understand the mail files folks already had in existence.  Gnus (and
15220 VM, for that matter) continue to support this format because it's
15221 perceived as having some good qualities in those mailer-specific
15222 headers/status bits stuff.  Rmail itself still exists as well, of
15223 course, and is still maintained by Stallman.
15224
15225 Both of the above forms leave your mail in a single file on your
15226 file system, and they must parse that entire file each time you take a
15227 look at your mail.
15228
15229 @item nnml
15230
15231 @code{nnml} is the back end which smells the most as though you were
15232 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15233 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15234 lo these years ago.)  One's mail is taken from the original spool file,
15235 and is then cut up into individual message files, 1:1.  It maintains a
15236 Usenet-style active file (analogous to what one finds in an INN- or
15237 CNews-based news system in (for instance) @file{/var/lib/news/active},
15238 or what is returned via the @samp{NNTP LIST} verb) and also creates
15239 @dfn{overview} files for efficient group entry, as has been defined for
15240 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15241 due to the creation of lots of files, updates to the @code{nnml} active
15242 file, and additions to overview files on a per-message basis, but it is
15243 extremely fast on access because of what amounts to the indexing support
15244 provided by the active file and overviews.
15245
15246 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15247 resource which defines available places in the file system to put new
15248 files.  Sysadmins take a dim view of heavy inode occupation within
15249 tight, shared file systems.  But if you live on a personal machine where
15250 the file system is your own and space is not at a premium, @code{nnml}
15251 wins big.
15252
15253 It is also problematic using this back end if you are living in a
15254 FAT16-based Windows world, since much space will be wasted on all these
15255 tiny files.
15256
15257 @item nnmh
15258
15259 The Rand MH mail-reading system has been around UNIX systems for a very
15260 long time; it operates by splitting one's spool file of messages into
15261 individual files, but with little or no indexing support---@code{nnmh}
15262 is considered to be semantically equivalent to ``@code{nnml} without
15263 active file or overviews''.  This is arguably the worst choice, because
15264 one gets the slowness of individual file creation married to the
15265 slowness of access parsing when learning what's new in one's groups.
15266
15267 @item nnfolder
15268
15269 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15270 method described above) on a per-group basis.  That is, @code{nnmbox}
15271 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15272 little bit of optimization to this so that each of one's mail groups has
15273 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15274 can be parsed separately, and still provides the simple Unix mail box
15275 format requiring minimal effort in moving the mail around.  In addition,
15276 it maintains an ``active'' file making it much faster for Gnus to figure
15277 out how many messages there are in each separate group.
15278
15279 If you have groups that are expected to have a massive amount of
15280 messages, @code{nnfolder} is not the best choice, but if you receive
15281 only a moderate amount of mail, @code{nnfolder} is probably the most
15282 friendly mail back end all over.
15283
15284 @item nnmaildir
15285
15286 For configuring expiry and other things, @code{nnmaildir} uses
15287 incompatible group parameters, slightly different from those of other
15288 mail back ends.
15289
15290 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15291 differences.  Each message is stored in a separate file, but the
15292 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15293 also stores the equivalent of @code{nnml}'s overview files in one file
15294 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15295 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15296 you down or takes up very much space, consider switching to
15297 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15298 file system.
15299
15300 Since maildirs don't require locking for delivery, the maildirs you use
15301 as groups can also be the maildirs your mail is directly delivered to.
15302 This means you can skip Gnus' mail splitting if your mail is already
15303 organized into different mailboxes during delivery.  A @code{directory}
15304 entry in @code{mail-sources} would have a similar effect, but would
15305 require one set of mailboxes for spooling deliveries (in mbox format,
15306 thus damaging message bodies), and another set to be used as groups (in
15307 whatever format you like).  A maildir has a built-in spool, in the
15308 @code{new/} subdirectory.  Beware that currently, mail moved from
15309 @code{new/} to @code{cur/} instead of via mail splitting will not
15310 undergo treatment such as duplicate checking.
15311
15312 @code{nnmaildir} stores article marks for a given group in the
15313 corresponding maildir, in a way designed so that it's easy to manipulate
15314 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15315 else, and still have your marks.  @code{nnml} also stores marks, but
15316 it's not as easy to work with them from outside Gnus as with
15317 @code{nnmaildir}.
15318
15319 @code{nnmaildir} uses a significant amount of memory to speed things up.
15320 (It keeps in memory some of the things that @code{nnml} stores in files
15321 and that @code{nnmh} repeatedly parses out of message files.)  If this
15322 is a problem for you, you can set the @code{nov-cache-size} group
15323 parameter to something small (0 would probably not work, but 1 probably
15324 would) to make it use less memory.  This caching will probably be
15325 removed in the future.
15326
15327 Startup is likely to be slower with @code{nnmaildir} than with other
15328 back ends.  Everything else is likely to be faster, depending in part
15329 on your file system.
15330
15331 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15332 to write an @code{nnmaildir}-derived back end.
15333
15334 @end table
15335
15336
15337 @node Browsing the Web
15338 @section Browsing the Web
15339 @cindex web
15340 @cindex browsing the web
15341 @cindex www
15342 @cindex http
15343
15344 Web-based discussion forums are getting more and more popular.  On many
15345 subjects, the web-based forums have become the most important forums,
15346 eclipsing the importance of mailing lists and news groups.  The reason
15347 is easy to understand---they are friendly to new users; you just point
15348 and click, and there's the discussion.  With mailing lists, you have to
15349 go through a cumbersome subscription procedure, and most people don't
15350 even know what a news group is.
15351
15352 The problem with this scenario is that web browsers are not very good at
15353 being newsreaders.  They do not keep track of what articles you've read;
15354 they do not allow you to score on subjects you're interested in; they do
15355 not allow off-line browsing; they require you to click around and drive
15356 you mad in the end.
15357
15358 So---if web browsers suck at reading discussion forums, why not use Gnus
15359 to do it instead?
15360
15361 Gnus has been getting a bit of a collection of back ends for providing
15362 interfaces to these sources.
15363
15364 @menu
15365 * Archiving Mail::
15366 * Web Searches::                Creating groups from articles that match a string.
15367 * Slashdot::                    Reading the Slashdot comments.
15368 * Ultimate::                    The Ultimate Bulletin Board systems.
15369 * Web Archive::                 Reading mailing list archived on web.
15370 * RSS::                         Reading RDF site summary.
15371 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15372 @end menu
15373
15374 All the web sources require Emacs/w3 and the url library to work.
15375
15376 The main caveat with all these web sources is that they probably won't
15377 work for a very long time.  Gleaning information from the @acronym{HTML} data
15378 is guesswork at best, and when the layout is altered, the Gnus back end
15379 will fail.  If you have reasonably new versions of these back ends,
15380 though, you should be ok.
15381
15382 One thing all these Web methods have in common is that the Web sources
15383 are often down, unavailable or just plain too slow to be fun.  In those
15384 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15385 Unplugged}) handle downloading articles, and then you can read them at
15386 leisure from your local disk.  No more World Wide Wait for you.
15387
15388 @node Archiving Mail
15389 @subsection Archiving Mail
15390 @cindex archiving mail
15391 @cindex backup of mail
15392
15393 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15394 @code{nnmaildir}, now actually store the article marks with each group.
15395 For these servers, archiving and restoring a group while preserving
15396 marks is fairly simple.
15397
15398 (Preserving the group level and group parameters as well still
15399 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15400 though.)
15401
15402 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15403 server, take a recursive copy of the server directory.  There is no need
15404 to shut down Gnus, so archiving may be invoked by @code{cron} or
15405 similar.  You restore the data by restoring the directory tree, and
15406 adding a server definition pointing to that directory in Gnus.  The
15407 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15408 might interfere with overwriting data, so you may want to shut down Gnus
15409 before you restore the data.
15410
15411 It is also possible to archive individual @code{nnml},
15412 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15413 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15414 directory.  For @code{nnfolder} you need to copy both the base folder
15415 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15416 this example).  Restoring the group is done with @kbd{G m} from the Group
15417 buffer.  The last step makes Gnus notice the new directory.
15418 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15419 is unnecessary in that case.
15420
15421 @node Web Searches
15422 @subsection Web Searches
15423 @cindex nnweb
15424 @cindex Google
15425 @cindex dejanews
15426 @cindex gmane
15427 @cindex Usenet searches
15428 @cindex searching the Usenet
15429
15430 It's, like, too neat to search the Usenet for articles that match a
15431 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15432 those, like, Web browsers, and you, like, have to, rilly, like, look at
15433 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15434 searches without having to use a browser.
15435
15436 The @code{nnweb} back end allows an easy interface to the mighty search
15437 engine.  You create an @code{nnweb} group, enter a search pattern, and
15438 then enter the group and read the articles like you would any normal
15439 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15440 Groups}) will do this in an easy-to-use fashion.
15441
15442 @code{nnweb} groups don't really lend themselves to being solid
15443 groups---they have a very fleeting idea of article numbers.  In fact,
15444 each time you enter an @code{nnweb} group (not even changing the search
15445 pattern), you are likely to get the articles ordered in a different
15446 manner.  Not even using duplicate suppression (@pxref{Duplicate
15447 Suppression}) will help, since @code{nnweb} doesn't even know the
15448 @code{Message-ID} of the articles before reading them using some search
15449 engines (Google, for instance).  The only possible way to keep track
15450 of which articles you've read is by scoring on the @code{Date}
15451 header---mark all articles posted before the last date you read the
15452 group as read.
15453
15454 If the search engine changes its output substantially, @code{nnweb}
15455 won't be able to parse it and will fail.  One could hardly fault the Web
15456 providers if they were to do this---their @emph{raison d'être} is to
15457 make money off of advertisements, not to provide services to the
15458 community.  Since @code{nnweb} washes the ads off all the articles, one
15459 might think that the providers might be somewhat miffed.  We'll see.
15460
15461 You must have the @code{url} and @code{w3} package installed to be able
15462 to use @code{nnweb}.
15463
15464 Virtual server variables:
15465
15466 @table @code
15467 @item nnweb-type
15468 @vindex nnweb-type
15469 What search engine type is being used.  The currently supported types
15470 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15471 @code{dejanews} is an alias to @code{google}.
15472
15473 @item nnweb-search
15474 @vindex nnweb-search
15475 The search string to feed to the search engine.
15476
15477 @item nnweb-max-hits
15478 @vindex nnweb-max-hits
15479 Advisory maximum number of hits per search to display.  The default is
15480 999.
15481
15482 @item nnweb-type-definition
15483 @vindex nnweb-type-definition
15484 Type-to-definition alist.  This alist says what @code{nnweb} should do
15485 with the various search engine types.  The following elements must be
15486 present:
15487
15488 @table @code
15489 @item article
15490 Function to decode the article and provide something that Gnus
15491 understands.
15492
15493 @item map
15494 Function to create an article number to message header and URL alist.
15495
15496 @item search
15497 Function to send the search string to the search engine.
15498
15499 @item address
15500 The address the aforementioned function should send the search string
15501 to.
15502
15503 @item id
15504 Format string URL to fetch an article by @code{Message-ID}.
15505 @end table
15506
15507 @end table
15508
15509
15510 @node Slashdot
15511 @subsection Slashdot
15512 @cindex Slashdot
15513 @cindex nnslashdot
15514
15515 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15516 lively discussion following the news articles.  @code{nnslashdot} will
15517 let you read this forum in a convenient manner.
15518
15519 The easiest way to read this source is to put something like the
15520 following in your @file{~/.gnus.el} file:
15521
15522 @lisp
15523 (setq gnus-secondary-select-methods
15524       '((nnslashdot "")))
15525 @end lisp
15526
15527 This will make Gnus query the @code{nnslashdot} back end for new comments
15528 and groups.  The @kbd{F} command will subscribe each new news article as
15529 a new Gnus group, and you can read the comments by entering these
15530 groups.  (Note that the default subscription method is to subscribe new
15531 groups as zombies.  Other methods are available (@pxref{Subscription
15532 Methods}).
15533
15534 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15535 command is the most handy tool (@pxref{Foreign Groups}).
15536
15537 When following up to @code{nnslashdot} comments (or posting new
15538 comments), some light @acronym{HTML}izations will be performed.  In
15539 particular, text quoted with @samp{> } will be quoted with
15540 @code{blockquote} instead, and signatures will have @code{br} added to
15541 the end of each line.  Other than that, you can just write @acronym{HTML}
15542 directly into the message buffer.  Note that Slashdot filters out some
15543 @acronym{HTML} forms.
15544
15545 The following variables can be altered to change its behavior:
15546
15547 @table @code
15548 @item nnslashdot-threaded
15549 Whether @code{nnslashdot} should display threaded groups or not.  The
15550 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15551 has to retrieve absolutely all comments in a group upon entry.  If a
15552 threaded display is not required, @code{nnslashdot} will only retrieve
15553 the comments that are actually wanted by the user.  Threading is nicer,
15554 but much, much slower than unthreaded.
15555
15556 @item nnslashdot-login-name
15557 @vindex nnslashdot-login-name
15558 The login name to use when posting.
15559
15560 @item nnslashdot-password
15561 @vindex nnslashdot-password
15562 The password to use when posting.
15563
15564 @item nnslashdot-directory
15565 @vindex nnslashdot-directory
15566 Where @code{nnslashdot} will store its files.  The default is
15567 @file{~/News/slashdot/}.
15568
15569 @item nnslashdot-active-url
15570 @vindex nnslashdot-active-url
15571 The @sc{url} format string that will be used to fetch the information on
15572 news articles and comments.  The default is@*
15573 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15574
15575 @item nnslashdot-comments-url
15576 @vindex nnslashdot-comments-url
15577 The @sc{url} format string that will be used to fetch comments.  The
15578 default is
15579 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15580
15581 @item nnslashdot-article-url
15582 @vindex nnslashdot-article-url
15583 The @sc{url} format string that will be used to fetch the news article.  The
15584 default is
15585 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15586
15587 @item nnslashdot-threshold
15588 @vindex nnslashdot-threshold
15589 The score threshold.  The default is -1.
15590
15591 @item nnslashdot-group-number
15592 @vindex nnslashdot-group-number
15593 The number of old groups, in addition to the ten latest, to keep
15594 updated.  The default is 0.
15595
15596 @end table
15597
15598
15599
15600 @node Ultimate
15601 @subsection Ultimate
15602 @cindex nnultimate
15603 @cindex Ultimate Bulletin Board
15604
15605 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15606 probably the most popular Web bulletin board system used.  It has a
15607 quite regular and nice interface, and it's possible to get the
15608 information Gnus needs to keep groups updated.
15609
15610 The easiest way to get started with @code{nnultimate} is to say
15611 something like the following in the group buffer:  @kbd{B nnultimate RET
15612 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15613 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15614 you're interested in; there's quite a list of them on the Ultimate web
15615 site.)  Then subscribe to the groups you're interested in from the
15616 server buffer, and read them from the group buffer.
15617
15618 The following @code{nnultimate} variables can be altered:
15619
15620 @table @code
15621 @item nnultimate-directory
15622 @vindex nnultimate-directory
15623 The directory where @code{nnultimate} stores its files.  The default is@*
15624 @file{~/News/ultimate/}.
15625 @end table
15626
15627
15628 @node Web Archive
15629 @subsection Web Archive
15630 @cindex nnwarchive
15631 @cindex Web Archive
15632
15633 Some mailing lists only have archives on Web servers, such as
15634 @uref{http://www.egroups.com/} and
15635 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15636 interface, and it's possible to get the information Gnus needs to keep
15637 groups updated.
15638
15639 @findex gnus-group-make-warchive-group
15640 The easiest way to get started with @code{nnwarchive} is to say
15641 something like the following in the group buffer: @kbd{M-x
15642 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15643 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15644 @var{an_egroup} with the mailing list you subscribed, the
15645 @var{your@@email.address} with your email address.), or to browse the
15646 back end by @kbd{B nnwarchive RET mail-archive RET}.
15647
15648 The following @code{nnwarchive} variables can be altered:
15649
15650 @table @code
15651 @item nnwarchive-directory
15652 @vindex nnwarchive-directory
15653 The directory where @code{nnwarchive} stores its files.  The default is@*
15654 @file{~/News/warchive/}.
15655
15656 @item nnwarchive-login
15657 @vindex nnwarchive-login
15658 The account name on the web server.
15659
15660 @item nnwarchive-passwd
15661 @vindex nnwarchive-passwd
15662 The password for your account on the web server.
15663 @end table
15664
15665 @node RSS
15666 @subsection RSS
15667 @cindex nnrss
15668 @cindex RSS
15669
15670 Some sites have RDF site summary (RSS)
15671 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15672 interface, and it's possible to get the information Gnus needs to keep
15673 groups updated.
15674
15675 The easiest way to get started with @code{nnrss} is to say something
15676 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15677 subscribe groups.
15678
15679 The following @code{nnrss} variables can be altered:
15680
15681 @table @code
15682 @item nnrss-directory
15683 @vindex nnrss-directory
15684 The directory where @code{nnrss} stores its files.  The default is
15685 @file{~/News/rss/}.
15686
15687 @end table
15688
15689 The following code may be helpful, if you want to show the description in
15690 the summary buffer.
15691
15692 @lisp
15693 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15694 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15695
15696 (defun gnus-user-format-function-X (header)
15697   (let ((descr
15698          (assq nnrss-description-field (mail-header-extra header))))
15699     (if descr (concat "\n\t" (cdr descr)) "")))
15700 @end lisp
15701
15702 The following code may be useful to open an nnrss url directly from the
15703 summary buffer.
15704 @lisp
15705 (require 'browse-url)
15706
15707 (defun browse-nnrss-url( arg )
15708   (interactive "p")
15709   (let ((url (assq nnrss-url-field
15710                    (mail-header-extra
15711                     (gnus-data-header
15712                      (assq (gnus-summary-article-number)
15713                            gnus-newsgroup-data))))))
15714     (if url
15715         (progn
15716           (browse-url (cdr url))
15717           (gnus-summary-mark-as-read-forward 1))
15718       (gnus-summary-scroll-up arg))))
15719
15720 (eval-after-load "gnus"
15721   #'(define-key gnus-summary-mode-map
15722       (kbd "<RET>") 'browse-nnrss-url))
15723 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15724 @end lisp
15725
15726 @node Customizing w3
15727 @subsection Customizing w3
15728 @cindex w3
15729 @cindex html
15730 @cindex url
15731 @cindex Netscape
15732
15733 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15734 pages.  Emacs/w3 is documented in its own manual, but there are some
15735 things that may be more relevant for Gnus users.
15736
15737 For instance, a common question is how to make Emacs/w3 follow links
15738 using the @code{browse-url} functions (which will call some external web
15739 browser like Netscape).  Here's one way:
15740
15741 @lisp
15742 (eval-after-load "w3"
15743   '(progn
15744     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15745     (defun w3-fetch (&optional url target)
15746       (interactive (list (w3-read-url-with-default)))
15747       (if (eq major-mode 'gnus-article-mode)
15748           (browse-url url)
15749         (w3-fetch-orig url target)))))
15750 @end lisp
15751
15752 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15753 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15754 follow the link.
15755
15756
15757 @node IMAP
15758 @section IMAP
15759 @cindex nnimap
15760 @cindex @acronym{IMAP}
15761
15762 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15763 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15764 server is much similar to connecting to a news server, you just
15765 specify the network address of the server.
15766
15767 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15768 everything that @acronym{POP} can, it can hence be viewed as a
15769 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15770 similar to @acronym{NNTP} being a news storage protocol---however,
15771 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15772 is more or less read-only whereas mail is read-write.
15773
15774 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15775 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15776 the @acronym{IMAP} server and store them on the local disk.  This is
15777 not the usage described in this section---@xref{Mail Sources}.
15778
15779 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15780 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15781 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15782 usage explained in this section.
15783
15784 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15785 servers might look something like the following.  (Note that for
15786 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15787 see below.)
15788
15789 @lisp
15790 (setq gnus-secondary-select-methods
15791       '((nnimap "simpleserver") ; @r{no special configuration}
15792         ; @r{perhaps a ssh port forwarded server:}
15793         (nnimap "dolk"
15794                 (nnimap-address "localhost")
15795                 (nnimap-server-port 1430))
15796         ; @r{a UW server running on localhost}
15797         (nnimap "barbar"
15798                 (nnimap-server-port 143)
15799                 (nnimap-address "localhost")
15800                 (nnimap-list-pattern ("INBOX" "mail/*")))
15801         ; @r{anonymous public cyrus server:}
15802         (nnimap "cyrus.andrew.cmu.edu"
15803                 (nnimap-authenticator anonymous)
15804                 (nnimap-list-pattern "archive.*")
15805                 (nnimap-stream network))
15806         ; @r{a ssl server on a non-standard port:}
15807         (nnimap "vic20"
15808                 (nnimap-address "vic20.somewhere.com")
15809                 (nnimap-server-port 9930)
15810                 (nnimap-stream ssl))))
15811 @end lisp
15812
15813 After defining the new server, you can subscribe to groups on the
15814 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15815 (@pxref{Subscription Commands}) or via the Server Buffer
15816 (@pxref{Server Buffer}).
15817
15818 The following variables can be used to create a virtual @code{nnimap}
15819 server:
15820
15821 @table @code
15822
15823 @item nnimap-address
15824 @vindex nnimap-address
15825
15826 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15827 server name if not specified.
15828
15829 @item nnimap-server-port
15830 @vindex nnimap-server-port
15831 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15832
15833 Note that this should be an integer, example server specification:
15834
15835 @lisp
15836 (nnimap "mail.server.com"
15837         (nnimap-server-port 4711))
15838 @end lisp
15839
15840 @item nnimap-list-pattern
15841 @vindex nnimap-list-pattern
15842 String or list of strings of mailboxes to limit available groups to.
15843 This is used when the server has very many mailboxes and you're only
15844 interested in a few---some servers export your home directory via
15845 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15846 @file{~/Mail/*} then.
15847
15848 The string can also be a cons of REFERENCE and the string as above, what
15849 REFERENCE is used for is server specific, but on the University of
15850 Washington server it's a directory that will be concatenated with the
15851 mailbox.
15852
15853 Example server specification:
15854
15855 @lisp
15856 (nnimap "mail.server.com"
15857         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15858                                ("~friend/Mail/" . "list/*"))))
15859 @end lisp
15860
15861 @item nnimap-stream
15862 @vindex nnimap-stream
15863 The type of stream used to connect to your server.  By default, nnimap
15864 will detect and automatically use all of the below, with the exception
15865 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
15866 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
15867 be automatically detected, but it's not widely deployed yet.)
15868
15869 Example server specification:
15870
15871 @lisp
15872 (nnimap "mail.server.com"
15873         (nnimap-stream ssl))
15874 @end lisp
15875
15876 Please note that the value of @code{nnimap-stream} is a symbol!
15877
15878 @itemize @bullet
15879 @item
15880 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
15881 @samp{gsasl} or @samp{imtest} program.
15882 @item
15883 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
15884 @item
15885 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15886 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15887 @samp{starttls}.
15888 @item
15889 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15890 @samp{gnutls-cli}).
15891 @item
15892 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15893 @samp{openssl}) or SSLeay (@samp{s_client}).
15894 @item
15895 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15896 @item
15897 @dfn{network:} Plain, TCP/IP network connection.
15898 @end itemize
15899
15900 @vindex imap-kerberos4-program
15901 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15902 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15903 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15904 to make @code{imap.el} use a pty instead of a pipe when communicating
15905 with @samp{imtest}.  You will then suffer from a line length
15906 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15907 indefinitely if you have many articles in a mailbox.  The variable
15908 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15909 program.
15910
15911 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15912 needed.  It is available from
15913 @uref{http://www.gnu.org/software/gnutls/}.
15914
15915 @vindex imap-gssapi-program
15916 This parameter specifies a list of command lines that invoke a GSSAPI
15917 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15918 sequentially until a connection is made, or the list has been
15919 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15920 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15921 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15922 tried.
15923
15924 @vindex imap-ssl-program
15925 For @acronym{SSL} connections, the OpenSSL program is available from
15926 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
15927 and nnimap support it too---although the most recent versions of
15928 SSLeay, 0.9.x, are known to have serious bugs making it
15929 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
15930 work.  The variable @code{imap-ssl-program} contain parameters to pass
15931 to OpenSSL/SSLeay.
15932
15933 @vindex imap-shell-program
15934 @vindex imap-shell-host
15935 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15936 @code{imap-shell-program} specify what program to call.
15937
15938 @item nnimap-authenticator
15939 @vindex nnimap-authenticator
15940
15941 The authenticator used to connect to the server.  By default, nnimap
15942 will use the most secure authenticator your server is capable of.
15943
15944 Example server specification:
15945
15946 @lisp
15947 (nnimap "mail.server.com"
15948         (nnimap-authenticator anonymous))
15949 @end lisp
15950
15951 Please note that the value of @code{nnimap-authenticator} is a symbol!
15952
15953 @itemize @bullet
15954 @item
15955 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
15956 external program @code{gsasl} or @code{imtest}.
15957 @item
15958 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
15959 @code{imtest}.
15960 @item
15961 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
15962 external library @code{digest-md5.el}.
15963 @item
15964 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15965 @item
15966 @dfn{login:} Plain-text username/password via LOGIN.
15967 @item
15968 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
15969 @end itemize
15970
15971 @item nnimap-expunge-on-close
15972 @cindex expunging
15973 @vindex nnimap-expunge-on-close
15974 Unlike Parmenides the @acronym{IMAP} designers have decided things that
15975 don't exist actually do exist.  More specifically, @acronym{IMAP} has
15976 this concept of marking articles @code{Deleted} which doesn't actually
15977 delete them, and this (marking them @code{Deleted}, that is) is what
15978 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
15979 similar).
15980
15981 Since the articles aren't really removed when we mark them with the
15982 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15983 running in circles yet?
15984
15985 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15986 when closing a mailbox but this is now configurable by this server
15987 variable.
15988
15989 The possible options are:
15990
15991 @table @code
15992
15993 @item always
15994 The default behavior, delete all articles marked as ``Deleted'' when
15995 closing a mailbox.
15996 @item never
15997 Never actually delete articles.  Currently there is no way of showing
15998 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
15999 may allow you to do this.  If you ever want to run the EXPUNGE command
16000 manually, @xref{Expunging mailboxes}.
16001 @item ask
16002 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16003 articles or not.
16004
16005 @end table
16006
16007 @item nnimap-importantize-dormant
16008 @vindex nnimap-importantize-dormant
16009
16010 If non-@code{nil} (the default), marks dormant articles as ticked (as
16011 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16012 naturally still (only) be marked as dormant.  This is to make dormant
16013 articles stand out, just like ticked articles, in other @acronym{IMAP}
16014 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16015 has only one.)
16016
16017 Probably the only reason for frobing this would be if you're trying
16018 enable per-user persistent dormant flags, using something like:
16019
16020 @lisp
16021 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16022         (format "gnus-dormant-%s" (user-login-name)))
16023 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16024         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16025 @end lisp
16026
16027 In this case, you would not want the per-user dormant flag showing up
16028 as ticked for other users.
16029
16030 @item nnimap-expunge-search-string
16031 @cindex expunging
16032 @vindex nnimap-expunge-search-string
16033
16034 This variable contain the @acronym{IMAP} search command sent to server when
16035 searching for articles eligible for expiring.  The default is
16036 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16037 UID set and the second @code{%s} is replaced by a date.
16038
16039 Probably the only useful value to change this to is
16040 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16041 messages instead of the internal article date.  See section 6.4.4 of
16042 RFC 2060 for more information on valid strings.
16043
16044 @item nnimap-authinfo-file
16045 @vindex nnimap-authinfo-file
16046
16047 A file containing credentials used to log in on servers.  The format is
16048 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16049 variable @code{nntp-authinfo-file} for exact syntax; also see
16050 @ref{NNTP}.
16051
16052 @item nnimap-need-unselect-to-notice-new-mail
16053 @vindex nnimap-need-unselect-to-notice-new-mail
16054
16055 Unselect mailboxes before looking for new mail in them.  Some servers
16056 seem to need this under some circumstances; it was reported that
16057 Courier 1.7.1 did.
16058
16059 @end table
16060
16061 @menu
16062 * Splitting in IMAP::           Splitting mail with nnimap.
16063 * Expiring in IMAP::            Expiring mail with nnimap.
16064 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16065 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16066 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16067 @end menu
16068
16069
16070
16071 @node Splitting in IMAP
16072 @subsection Splitting in IMAP
16073 @cindex splitting imap mail
16074
16075 Splitting is something Gnus users has loved and used for years, and now
16076 the rest of the world is catching up.  Yeah, dream on, not many
16077 @acronym{IMAP} server has server side splitting and those that have splitting
16078 seem to use some non-standard protocol.  This means that @acronym{IMAP}
16079 support for Gnus has to do its own splitting.
16080
16081 And it does.
16082
16083 Here are the variables of interest:
16084
16085 @table @code
16086
16087 @item nnimap-split-crosspost
16088 @cindex splitting, crosspost
16089 @cindex crosspost
16090 @vindex nnimap-split-crosspost
16091
16092 If non-@code{nil}, do crossposting if several split methods match the
16093 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16094 found will be used.
16095
16096 Nnmail equivalent: @code{nnmail-crosspost}.
16097
16098 @item nnimap-split-inbox
16099 @cindex splitting, inbox
16100 @cindex inbox
16101 @vindex nnimap-split-inbox
16102
16103 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16104 mailboxes to split from.  Defaults to @code{nil}, which means that
16105 splitting is disabled!
16106
16107 @lisp
16108 (setq nnimap-split-inbox
16109       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16110 @end lisp
16111
16112 No nnmail equivalent.
16113
16114 @item nnimap-split-rule
16115 @cindex splitting, rules
16116 @vindex nnimap-split-rule
16117
16118 New mail found in @code{nnimap-split-inbox} will be split according to
16119 this variable.
16120
16121 This variable contains a list of lists, where the first element in the
16122 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16123 matching the regexp in the second element in the sublist.  Got that?
16124 Neither did I, we need examples.
16125
16126 @lisp
16127 (setq nnimap-split-rule
16128       '(("INBOX.nnimap"
16129          "^Sender: owner-nnimap@@vic20.globalcom.se")
16130         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16131         ("INBOX.private" "")))
16132 @end lisp
16133
16134 This will put all articles from the nnimap mailing list into mailbox
16135 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16136 into INBOX.junk and everything else in INBOX.private.
16137
16138 The first string may contain @samp{\\1} forms, like the ones used by
16139 replace-match to insert sub-expressions from the matched text.  For
16140 instance:
16141
16142 @lisp
16143 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16144 @end lisp
16145
16146 The first element can also be the symbol @code{junk} to indicate that
16147 matching messages should simply be deleted.  Use with care.
16148
16149 The second element can also be a function.  In that case, it will be
16150 called with the first element of the rule as the argument, in a buffer
16151 containing the headers of the article.  It should return a
16152 non-@code{nil} value if it thinks that the mail belongs in that group.
16153
16154 Nnmail users might recollect that the last regexp had to be empty to
16155 match all articles (like in the example above).  This is not required in
16156 nnimap.  Articles not matching any of the regexps will not be moved out
16157 of your inbox.  (This might affect performance if you keep lots of
16158 unread articles in your inbox, since the splitting code would go over
16159 them every time you fetch new mail.)
16160
16161 These rules are processed from the beginning of the alist toward the
16162 end.  The first rule to make a match will ``win'', unless you have
16163 crossposting enabled.  In that case, all matching rules will ``win''.
16164
16165 This variable can also have a function as its value, the function will
16166 be called with the headers narrowed and should return a group where it
16167 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16168
16169 The splitting code tries to create mailboxes if it needs to.
16170
16171 To allow for different split rules on different virtual servers, and
16172 even different split rules in different inboxes on the same server,
16173 the syntax of this variable have been extended along the lines of:
16174
16175 @lisp
16176 (setq nnimap-split-rule
16177       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16178                                ("junk"    "From:.*Simon"))))
16179         ("my2server"    ("INBOX" nnimap-split-fancy))
16180         ("my[34]server" (".*" (("private" "To:.*Simon")
16181                                ("junk"    my-junk-func))))))
16182 @end lisp
16183
16184 The virtual server name is in fact a regexp, so that the same rules
16185 may apply to several servers.  In the example, the servers
16186 @code{my3server} and @code{my4server} both use the same rules.
16187 Similarly, the inbox string is also a regexp.  The actual splitting
16188 rules are as before, either a function, or a list with group/regexp or
16189 group/function elements.
16190
16191 Nnmail equivalent: @code{nnmail-split-methods}.
16192
16193 @item nnimap-split-predicate
16194 @cindex splitting
16195 @vindex nnimap-split-predicate
16196
16197 Mail matching this predicate in @code{nnimap-split-inbox} will be
16198 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16199
16200 This might be useful if you use another @acronym{IMAP} client to read mail in
16201 your inbox but would like Gnus to split all articles in the inbox
16202 regardless of readedness.  Then you might change this to
16203 @samp{UNDELETED}.
16204
16205 @item nnimap-split-fancy
16206 @cindex splitting, fancy
16207 @findex nnimap-split-fancy
16208 @vindex nnimap-split-fancy
16209
16210 It's possible to set @code{nnimap-split-rule} to
16211 @code{nnmail-split-fancy} if you want to use fancy
16212 splitting.  @xref{Fancy Mail Splitting}.
16213
16214 However, to be able to have different fancy split rules for nnmail and
16215 nnimap back ends you can set @code{nnimap-split-rule} to
16216 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16217 rule in @code{nnimap-split-fancy}.
16218
16219 Example:
16220
16221 @lisp
16222 (setq nnimap-split-rule 'nnimap-split-fancy
16223       nnimap-split-fancy ...)
16224 @end lisp
16225
16226 Nnmail equivalent: @code{nnmail-split-fancy}.
16227
16228 @item nnimap-split-download-body
16229 @findex nnimap-split-download-body
16230 @vindex nnimap-split-download-body
16231
16232 Set to non-@code{nil} to download entire articles during splitting.
16233 This is generally not required, and will slow things down
16234 considerably.  You may need it if you want to use an advanced
16235 splitting function that analyses the body to split the article.
16236
16237 @end table
16238
16239 @node Expiring in IMAP
16240 @subsection Expiring in IMAP
16241 @cindex expiring imap mail
16242
16243 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16244 end, it supports most features in regular expiring (@pxref{Expiring
16245 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16246 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16247 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16248 follows below are the variables used by the @code{nnimap} expiry
16249 process.
16250
16251 A note on how the expire mark is stored on the @acronym{IMAP} server is
16252 appropriate here as well.  The expire mark is translated into a
16253 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16254 message.  This means that likely only Gnus will understand and treat
16255 the @code{gnus-expire} mark properly, although other clients may allow
16256 you to view client specific flags on the message.  It also means that
16257 your server must support permanent storage of client specific flags on
16258 messages.  Most do, fortunately.
16259
16260 @table @code
16261
16262 @item nnmail-expiry-wait
16263 @item nnmail-expiry-wait-function
16264
16265 These variables are fully supported.  The expire value can be a
16266 number, the symbol @code{immediate} or @code{never}.
16267
16268 @item nnmail-expiry-target
16269
16270 This variable is supported, and internally implemented by calling the
16271 @code{nnmail} functions that handle this.  It contains an optimization
16272 that if the destination is a @acronym{IMAP} group on the same server, the
16273 article is copied instead of appended (that is, uploaded again).
16274
16275 @end table
16276
16277 @node Editing IMAP ACLs
16278 @subsection Editing IMAP ACLs
16279 @cindex editing imap acls
16280 @cindex Access Control Lists
16281 @cindex Editing @acronym{IMAP} ACLs
16282 @kindex G l
16283 @findex gnus-group-nnimap-edit-acl
16284
16285 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16286 limiting (or enabling) other users access to your mail boxes.  Not all
16287 @acronym{IMAP} servers support this, this function will give an error if it
16288 doesn't.
16289
16290 To edit an ACL for a mailbox, type @kbd{G l}
16291 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16292 editing window with detailed instructions.
16293
16294 Some possible uses:
16295
16296 @itemize @bullet
16297 @item
16298 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16299 on your mailing list mailboxes enables other users on the same server to
16300 follow the list without subscribing to it.
16301 @item
16302 At least with the Cyrus server, you are required to give the user
16303 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16304 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16305 INBOX.mailbox).
16306 @end itemize
16307
16308 @node Expunging mailboxes
16309 @subsection Expunging mailboxes
16310 @cindex expunging
16311
16312 @cindex expunge
16313 @cindex manual expunging
16314 @kindex G x
16315 @findex gnus-group-nnimap-expunge
16316
16317 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16318 you may want the option of expunging all deleted articles in a mailbox
16319 manually.  This is exactly what @kbd{G x} does.
16320
16321 Currently there is no way of showing deleted articles, you can just
16322 delete them.
16323
16324 @node A note on namespaces
16325 @subsection A note on namespaces
16326 @cindex IMAP namespace
16327 @cindex namespaces
16328
16329 The @acronym{IMAP} protocol has a concept called namespaces, described
16330 by the following text in the RFC:
16331
16332 @display
16333 5.1.2.  Mailbox Namespace Naming Convention
16334
16335    By convention, the first hierarchical element of any mailbox name
16336    which begins with "#" identifies the "namespace" of the remainder of
16337    the name.  This makes it possible to disambiguate between different
16338    types of mailbox stores, each of which have their own namespaces.
16339
16340       For example, implementations which offer access to USENET
16341       newsgroups MAY use the "#news" namespace to partition the USENET
16342       newsgroup namespace from that of other mailboxes.  Thus, the
16343       comp.mail.misc newsgroup would have an mailbox name of
16344       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16345       to a different object (e.g. a user's private mailbox).
16346 @end display
16347
16348 While there is nothing in this text that warrants concern for the
16349 @acronym{IMAP} implementation in Gnus, some servers use namespace
16350 prefixes in a way that does not work with how Gnus uses mailbox names.
16351
16352 Specifically, University of Washington's @acronym{IMAP} server uses
16353 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16354 in the @sc{create} and @sc{append} commands.  After the mailbox is
16355 created (or a messages is appended to a mailbox), it must be accessed
16356 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16357 not make it possible for the user to guarantee that user entered
16358 mailbox names will only be used with the CREATE and APPEND commands,
16359 you should simply not use the namespace prefixed mailbox names in
16360 Gnus.
16361
16362 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16363 for more information on how to use the prefixes.  They are a power
16364 tool and should be used only if you are sure what the effects are.
16365
16366 @node Other Sources
16367 @section Other Sources
16368
16369 Gnus can do more than just read news or mail.  The methods described
16370 below allow Gnus to view directories and files as if they were
16371 newsgroups.
16372
16373 @menu
16374 * Directory Groups::            You can read a directory as if it was a newsgroup.
16375 * Anything Groups::             Dired?  Who needs dired?
16376 * Document Groups::             Single files can be the basis of a group.
16377 * SOUP::                        Reading @sc{soup} packets ``offline''.
16378 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16379 @end menu
16380
16381
16382 @node Directory Groups
16383 @subsection Directory Groups
16384 @cindex nndir
16385 @cindex directory groups
16386
16387 If you have a directory that has lots of articles in separate files in
16388 it, you might treat it as a newsgroup.  The files have to have numerical
16389 names, of course.
16390
16391 This might be an opportune moment to mention @code{ange-ftp} (and its
16392 successor @code{efs}), that most wonderful of all wonderful Emacs
16393 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16394 back end to read directories.  Big deal.
16395
16396 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16397 enter the @code{ange-ftp} file name
16398 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16399 @code{ange-ftp} or @code{efs} will actually allow you to read this
16400 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16401
16402 @code{nndir} will use @acronym{NOV} files if they are present.
16403
16404 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16405 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16406 whatever you use @code{nndir} for, so you could switch to any of those
16407 methods if you feel the need to have a non-read-only @code{nndir}.
16408
16409
16410 @node Anything Groups
16411 @subsection Anything Groups
16412 @cindex nneething
16413
16414 From the @code{nndir} back end (which reads a single spool-like
16415 directory), it's just a hop and a skip to @code{nneething}, which
16416 pretends that any arbitrary directory is a newsgroup.  Strange, but
16417 true.
16418
16419 When @code{nneething} is presented with a directory, it will scan this
16420 directory and assign article numbers to each file.  When you enter such
16421 a group, @code{nneething} must create ``headers'' that Gnus can use.
16422 After all, Gnus is a newsreader, in case you're forgetting.
16423 @code{nneething} does this in a two-step process.  First, it snoops each
16424 file in question.  If the file looks like an article (i.e., the first
16425 few lines look like headers), it will use this as the head.  If this is
16426 just some arbitrary file without a head (e.g. a C source file),
16427 @code{nneething} will cobble up a header out of thin air.  It will use
16428 file ownership, name and date and do whatever it can with these
16429 elements.
16430
16431 All this should happen automatically for you, and you will be presented
16432 with something that looks very much like a newsgroup.  Totally like a
16433 newsgroup, to be precise.  If you select an article, it will be displayed
16434 in the article buffer, just as usual.
16435
16436 If you select a line that represents a directory, Gnus will pop you into
16437 a new summary buffer for this @code{nneething} group.  And so on.  You can
16438 traverse the entire disk this way, if you feel like, but remember that
16439 Gnus is not dired, really, and does not intend to be, either.
16440
16441 There are two overall modes to this action---ephemeral or solid.  When
16442 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16443 will not store information on what files you have read, and what files
16444 are new, and so on.  If you create a solid @code{nneething} group the
16445 normal way with @kbd{G m}, Gnus will store a mapping table between
16446 article numbers and file names, and you can treat this group like any
16447 other groups.  When you activate a solid @code{nneething} group, you will
16448 be told how many unread articles it contains, etc., etc.
16449
16450 Some variables:
16451
16452 @table @code
16453 @item nneething-map-file-directory
16454 @vindex nneething-map-file-directory
16455 All the mapping files for solid @code{nneething} groups will be stored
16456 in this directory, which defaults to @file{~/.nneething/}.
16457
16458 @item nneething-exclude-files
16459 @vindex nneething-exclude-files
16460 All files that match this regexp will be ignored.  Nice to use to exclude
16461 auto-save files and the like, which is what it does by default.
16462
16463 @item nneething-include-files
16464 @vindex nneething-include-files
16465 Regexp saying what files to include in the group.  If this variable is
16466 non-@code{nil}, only files matching this regexp will be included.
16467
16468 @item nneething-map-file
16469 @vindex nneething-map-file
16470 Name of the map files.
16471 @end table
16472
16473
16474 @node Document Groups
16475 @subsection Document Groups
16476 @cindex nndoc
16477 @cindex documentation group
16478 @cindex help group
16479
16480 @code{nndoc} is a cute little thing that will let you read a single file
16481 as a newsgroup.  Several files types are supported:
16482
16483 @table @code
16484 @cindex Babyl
16485 @cindex Rmail mbox
16486
16487 @item babyl
16488 The Babyl (Rmail) mail box.
16489 @cindex mbox
16490 @cindex Unix mbox
16491
16492 @item mbox
16493 The standard Unix mbox file.
16494
16495 @cindex MMDF mail box
16496 @item mmdf
16497 The MMDF mail box format.
16498
16499 @item news
16500 Several news articles appended into a file.
16501
16502 @item rnews
16503 @cindex rnews batch files
16504 The rnews batch transport format.
16505 @cindex forwarded messages
16506
16507 @item forward
16508 Forwarded articles.
16509
16510 @item nsmail
16511 Netscape mail boxes.
16512
16513 @item mime-parts
16514 @acronym{MIME} multipart messages.
16515
16516 @item standard-digest
16517 The standard (RFC 1153) digest format.
16518
16519 @item mime-digest
16520 A @acronym{MIME} digest of messages.
16521
16522 @item lanl-gov-announce
16523 Announcement messages from LANL Gov Announce.
16524
16525 @item rfc822-forward
16526 A message forwarded according to RFC822.
16527
16528 @item outlook
16529 The Outlook mail box.
16530
16531 @item oe-dbx
16532 The Outlook Express dbx mail box.
16533
16534 @item exim-bounce
16535 A bounce message from the Exim MTA.
16536
16537 @item forward
16538 A message forwarded according to informal rules.
16539
16540 @item rfc934
16541 An RFC934-forwarded message.
16542
16543 @item mailman
16544 A mailman digest.
16545
16546 @item clari-briefs
16547 A digest of Clarinet brief news items.
16548
16549 @item slack-digest
16550 Non-standard digest format---matches most things, but does it badly.
16551
16552 @item mail-in-mail
16553 The last resort.
16554 @end table
16555
16556 You can also use the special ``file type'' @code{guess}, which means
16557 that @code{nndoc} will try to guess what file type it is looking at.
16558 @code{digest} means that @code{nndoc} should guess what digest type the
16559 file is.
16560
16561 @code{nndoc} will not try to change the file or insert any extra headers into
16562 it---it will simply, like, let you use the file as the basis for a
16563 group.  And that's it.
16564
16565 If you have some old archived articles that you want to insert into your
16566 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16567 that.  Say you have an old @file{RMAIL} file with mail that you now want
16568 to split into your new @code{nnml} groups.  You look at that file using
16569 @code{nndoc} (using the @kbd{G f} command in the group buffer
16570 (@pxref{Foreign Groups})), set the process mark on all the articles in
16571 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16572 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16573 file is now also stored in lots of @code{nnml} directories, and you can
16574 delete that pesky @file{RMAIL} file.  If you have the guts!
16575
16576 Virtual server variables:
16577
16578 @table @code
16579 @item nndoc-article-type
16580 @vindex nndoc-article-type
16581 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16582 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16583 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16584 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16585 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16586
16587 @item nndoc-post-type
16588 @vindex nndoc-post-type
16589 This variable says whether Gnus is to consider the group a news group or
16590 a mail group.  There are two valid values:  @code{mail} (the default)
16591 and @code{news}.
16592 @end table
16593
16594 @menu
16595 * Document Server Internals::   How to add your own document types.
16596 @end menu
16597
16598
16599 @node Document Server Internals
16600 @subsubsection Document Server Internals
16601
16602 Adding new document types to be recognized by @code{nndoc} isn't
16603 difficult.  You just have to whip up a definition of what the document
16604 looks like, write a predicate function to recognize that document type,
16605 and then hook into @code{nndoc}.
16606
16607 First, here's an example document type definition:
16608
16609 @example
16610 (mmdf
16611  (article-begin .  "^\^A\^A\^A\^A\n")
16612  (body-end .  "^\^A\^A\^A\^A\n"))
16613 @end example
16614
16615 The definition is simply a unique @dfn{name} followed by a series of
16616 regexp pseudo-variable settings.  Below are the possible
16617 variables---don't be daunted by the number of variables; most document
16618 types can be defined with very few settings:
16619
16620 @table @code
16621 @item first-article
16622 If present, @code{nndoc} will skip past all text until it finds
16623 something that match this regexp.  All text before this will be
16624 totally ignored.
16625
16626 @item article-begin
16627 This setting has to be present in all document type definitions.  It
16628 says what the beginning of each article looks like.
16629
16630 @item head-begin-function
16631 If present, this should be a function that moves point to the head of
16632 the article.
16633
16634 @item nndoc-head-begin
16635 If present, this should be a regexp that matches the head of the
16636 article.
16637
16638 @item nndoc-head-end
16639 This should match the end of the head of the article.  It defaults to
16640 @samp{^$}---the empty line.
16641
16642 @item body-begin-function
16643 If present, this function should move point to the beginning of the body
16644 of the article.
16645
16646 @item body-begin
16647 This should match the beginning of the body of the article.  It defaults
16648 to @samp{^\n}.
16649
16650 @item body-end-function
16651 If present, this function should move point to the end of the body of
16652 the article.
16653
16654 @item body-end
16655 If present, this should match the end of the body of the article.
16656
16657 @item file-end
16658 If present, this should match the end of the file.  All text after this
16659 regexp will be totally ignored.
16660
16661 @end table
16662
16663 So, using these variables @code{nndoc} is able to dissect a document
16664 file into a series of articles, each with a head and a body.  However, a
16665 few more variables are needed since not all document types are all that
16666 news-like---variables needed to transform the head or the body into
16667 something that's palatable for Gnus:
16668
16669 @table @code
16670 @item prepare-body-function
16671 If present, this function will be called when requesting an article.  It
16672 will be called with point at the start of the body, and is useful if the
16673 document has encoded some parts of its contents.
16674
16675 @item article-transform-function
16676 If present, this function is called when requesting an article.  It's
16677 meant to be used for more wide-ranging transformation of both head and
16678 body of the article.
16679
16680 @item generate-head-function
16681 If present, this function is called to generate a head that Gnus can
16682 understand.  It is called with the article number as a parameter, and is
16683 expected to generate a nice head for the article in question.  It is
16684 called when requesting the headers of all articles.
16685
16686 @end table
16687
16688 Let's look at the most complicated example I can come up with---standard
16689 digests:
16690
16691 @example
16692 (standard-digest
16693  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16694  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16695  (prepare-body-function . nndoc-unquote-dashes)
16696  (body-end-function . nndoc-digest-body-end)
16697  (head-end . "^ ?$")
16698  (body-begin . "^ ?\n")
16699  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16700  (subtype digest guess))
16701 @end example
16702
16703 We see that all text before a 70-width line of dashes is ignored; all
16704 text after a line that starts with that @samp{^End of} is also ignored;
16705 each article begins with a 30-width line of dashes; the line separating
16706 the head from the body may contain a single space; and that the body is
16707 run through @code{nndoc-unquote-dashes} before being delivered.
16708
16709 To hook your own document definition into @code{nndoc}, use the
16710 @code{nndoc-add-type} function.  It takes two parameters---the first
16711 is the definition itself and the second (optional) parameter says
16712 where in the document type definition alist to put this definition.
16713 The alist is traversed sequentially, and
16714 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16715 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16716 @code{mmdf} type, and so on.  These type predicates should return
16717 @code{nil} if the document is not of the correct type; @code{t} if it
16718 is of the correct type; and a number if the document might be of the
16719 correct type.  A high number means high probability; a low number
16720 means low probability with @samp{0} being the lowest valid number.
16721
16722
16723 @node SOUP
16724 @subsection SOUP
16725 @cindex SOUP
16726 @cindex offline
16727
16728 In the PC world people often talk about ``offline'' newsreaders.  These
16729 are thingies that are combined reader/news transport monstrosities.
16730 With built-in modem programs.  Yecchh!
16731
16732 Of course, us Unix Weenie types of human beans use things like
16733 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16734 transport things like Ghod intended.  And then we just use normal
16735 newsreaders.
16736
16737 However, it can sometimes be convenient to do something that's a bit
16738 easier on the brain if you have a very slow modem, and you're not really
16739 that interested in doing things properly.
16740
16741 A file format called @sc{soup} has been developed for transporting news
16742 and mail from servers to home machines and back again.  It can be a bit
16743 fiddly.
16744
16745 First some terminology:
16746
16747 @table @dfn
16748
16749 @item server
16750 This is the machine that is connected to the outside world and where you
16751 get news and/or mail from.
16752
16753 @item home machine
16754 This is the machine that you want to do the actual reading and responding
16755 on.  It is typically not connected to the rest of the world in any way.
16756
16757 @item packet
16758 Something that contains messages and/or commands.  There are two kinds
16759 of packets:
16760
16761 @table @dfn
16762 @item message packets
16763 These are packets made at the server, and typically contain lots of
16764 messages for you to read.  These are called @file{SoupoutX.tgz} by
16765 default, where @var{x} is a number.
16766
16767 @item response packets
16768 These are packets made at the home machine, and typically contains
16769 replies that you've written.  These are called @file{SoupinX.tgz} by
16770 default, where @var{x} is a number.
16771
16772 @end table
16773
16774 @end table
16775
16776
16777 @enumerate
16778
16779 @item
16780 You log in on the server and create a @sc{soup} packet.  You can either
16781 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16782 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16783 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16784
16785 @item
16786 You transfer the packet home.  Rail, boat, car or modem will do fine.
16787
16788 @item
16789 You put the packet in your home directory.
16790
16791 @item
16792 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16793 the native or secondary server.
16794
16795 @item
16796 You read articles and mail and answer and followup to the things you
16797 want (@pxref{SOUP Replies}).
16798
16799 @item
16800 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16801 packet.
16802
16803 @item
16804 You transfer this packet to the server.
16805
16806 @item
16807 You use Gnus to mail this packet out with the @kbd{G s s} command.
16808
16809 @item
16810 You then repeat until you die.
16811
16812 @end enumerate
16813
16814 So you basically have a bipartite system---you use @code{nnsoup} for
16815 reading and Gnus for packing/sending these @sc{soup} packets.
16816
16817 @menu
16818 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16819 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16820 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16821 @end menu
16822
16823
16824 @node SOUP Commands
16825 @subsubsection SOUP Commands
16826
16827 These are commands for creating and manipulating @sc{soup} packets.
16828
16829 @table @kbd
16830 @item G s b
16831 @kindex G s b (Group)
16832 @findex gnus-group-brew-soup
16833 Pack all unread articles in the current group
16834 (@code{gnus-group-brew-soup}).  This command understands the
16835 process/prefix convention.
16836
16837 @item G s w
16838 @kindex G s w (Group)
16839 @findex gnus-soup-save-areas
16840 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16841
16842 @item G s s
16843 @kindex G s s (Group)
16844 @findex gnus-soup-send-replies
16845 Send all replies from the replies packet
16846 (@code{gnus-soup-send-replies}).
16847
16848 @item G s p
16849 @kindex G s p (Group)
16850 @findex gnus-soup-pack-packet
16851 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16852
16853 @item G s r
16854 @kindex G s r (Group)
16855 @findex nnsoup-pack-replies
16856 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16857
16858 @item O s
16859 @kindex O s (Summary)
16860 @findex gnus-soup-add-article
16861 This summary-mode command adds the current article to a @sc{soup} packet
16862 (@code{gnus-soup-add-article}).  It understands the process/prefix
16863 convention (@pxref{Process/Prefix}).
16864
16865 @end table
16866
16867
16868 There are a few variables to customize where Gnus will put all these
16869 thingies:
16870
16871 @table @code
16872
16873 @item gnus-soup-directory
16874 @vindex gnus-soup-directory
16875 Directory where Gnus will save intermediate files while composing
16876 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16877
16878 @item gnus-soup-replies-directory
16879 @vindex gnus-soup-replies-directory
16880 This is what Gnus will use as a temporary directory while sending our
16881 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16882
16883 @item gnus-soup-prefix-file
16884 @vindex gnus-soup-prefix-file
16885 Name of the file where Gnus stores the last used prefix.  The default is
16886 @samp{gnus-prefix}.
16887
16888 @item gnus-soup-packer
16889 @vindex gnus-soup-packer
16890 A format string command for packing a @sc{soup} packet.  The default is
16891 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16892
16893 @item gnus-soup-unpacker
16894 @vindex gnus-soup-unpacker
16895 Format string command for unpacking a @sc{soup} packet.  The default is
16896 @samp{gunzip -c %s | tar xvf -}.
16897
16898 @item gnus-soup-packet-directory
16899 @vindex gnus-soup-packet-directory
16900 Where Gnus will look for reply packets.  The default is @file{~/}.
16901
16902 @item gnus-soup-packet-regexp
16903 @vindex gnus-soup-packet-regexp
16904 Regular expression matching @sc{soup} reply packets in
16905 @code{gnus-soup-packet-directory}.
16906
16907 @end table
16908
16909
16910 @node SOUP Groups
16911 @subsubsection SOUP Groups
16912 @cindex nnsoup
16913
16914 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16915 read incoming packets, unpack them, and put them in a directory where
16916 you can read them at leisure.
16917
16918 These are the variables you can use to customize its behavior:
16919
16920 @table @code
16921
16922 @item nnsoup-tmp-directory
16923 @vindex nnsoup-tmp-directory
16924 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16925 directory.  (@file{/tmp/} by default.)
16926
16927 @item nnsoup-directory
16928 @vindex nnsoup-directory
16929 @code{nnsoup} then moves each message and index file to this directory.
16930 The default is @file{~/SOUP/}.
16931
16932 @item nnsoup-replies-directory
16933 @vindex nnsoup-replies-directory
16934 All replies will be stored in this directory before being packed into a
16935 reply packet.  The default is @file{~/SOUP/replies/}.
16936
16937 @item nnsoup-replies-format-type
16938 @vindex nnsoup-replies-format-type
16939 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16940 (rnews), and I don't think you should touch that variable.  I probably
16941 shouldn't even have documented it.  Drats!  Too late!
16942
16943 @item nnsoup-replies-index-type
16944 @vindex nnsoup-replies-index-type
16945 The index type of the replies packet.  The default is @samp{?n}, which
16946 means ``none''.  Don't fiddle with this one either!
16947
16948 @item nnsoup-active-file
16949 @vindex nnsoup-active-file
16950 Where @code{nnsoup} stores lots of information.  This is not an ``active
16951 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16952 this file or mess it up in any way, you're dead.  The default is
16953 @file{~/SOUP/active}.
16954
16955 @item nnsoup-packer
16956 @vindex nnsoup-packer
16957 Format string command for packing a reply @sc{soup} packet.  The default
16958 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16959
16960 @item nnsoup-unpacker
16961 @vindex nnsoup-unpacker
16962 Format string command for unpacking incoming @sc{soup} packets.  The
16963 default is @samp{gunzip -c %s | tar xvf -}.
16964
16965 @item nnsoup-packet-directory
16966 @vindex nnsoup-packet-directory
16967 Where @code{nnsoup} will look for incoming packets.  The default is
16968 @file{~/}.
16969
16970 @item nnsoup-packet-regexp
16971 @vindex nnsoup-packet-regexp
16972 Regular expression matching incoming @sc{soup} packets.  The default is
16973 @samp{Soupout}.
16974
16975 @item nnsoup-always-save
16976 @vindex nnsoup-always-save
16977 If non-@code{nil}, save the replies buffer after each posted message.
16978
16979 @end table
16980
16981
16982 @node SOUP Replies
16983 @subsubsection SOUP Replies
16984
16985 Just using @code{nnsoup} won't mean that your postings and mailings end
16986 up in @sc{soup} reply packets automagically.  You have to work a bit
16987 more for that to happen.
16988
16989 @findex nnsoup-set-variables
16990 The @code{nnsoup-set-variables} command will set the appropriate
16991 variables to ensure that all your followups and replies end up in the
16992 @sc{soup} system.
16993
16994 In specific, this is what it does:
16995
16996 @lisp
16997 (setq message-send-news-function 'nnsoup-request-post)
16998 (setq message-send-mail-function 'nnsoup-request-mail)
16999 @end lisp
17000
17001 And that's it, really.  If you only want news to go into the @sc{soup}
17002 system you just use the first line.  If you only want mail to be
17003 @sc{soup}ed you use the second.
17004
17005
17006 @node Mail-To-News Gateways
17007 @subsection Mail-To-News Gateways
17008 @cindex mail-to-news gateways
17009 @cindex gateways
17010
17011 If your local @code{nntp} server doesn't allow posting, for some reason
17012 or other, you can post using one of the numerous mail-to-news gateways.
17013 The @code{nngateway} back end provides the interface.
17014
17015 Note that you can't read anything from this back end---it can only be
17016 used to post with.
17017
17018 Server variables:
17019
17020 @table @code
17021 @item nngateway-address
17022 @vindex nngateway-address
17023 This is the address of the mail-to-news gateway.
17024
17025 @item nngateway-header-transformation
17026 @vindex nngateway-header-transformation
17027 News headers often have to be transformed in some odd way or other
17028 for the mail-to-news gateway to accept it.  This variable says what
17029 transformation should be called, and defaults to
17030 @code{nngateway-simple-header-transformation}.  The function is called
17031 narrowed to the headers to be transformed and with one parameter---the
17032 gateway address.
17033
17034 This default function just inserts a new @code{To} header based on the
17035 @code{Newsgroups} header and the gateway address.
17036 For instance, an article with this @code{Newsgroups} header:
17037
17038 @example
17039 Newsgroups: alt.religion.emacs
17040 @end example
17041
17042 will get this @code{To} header inserted:
17043
17044 @example
17045 To: alt-religion-emacs@@GATEWAY
17046 @end example
17047
17048 The following pre-defined functions exist:
17049
17050 @findex nngateway-simple-header-transformation
17051 @table @code
17052
17053 @item nngateway-simple-header-transformation
17054 Creates a @code{To} header that looks like
17055 @var{newsgroup}@@@code{nngateway-address}.
17056
17057 @findex nngateway-mail2news-header-transformation
17058
17059 @item nngateway-mail2news-header-transformation
17060 Creates a @code{To} header that looks like
17061 @code{nngateway-address}.
17062 @end table
17063
17064 @end table
17065
17066 Here's an example:
17067
17068 @lisp
17069 (setq gnus-post-method
17070       '(nngateway
17071         "mail2news@@replay.com"
17072         (nngateway-header-transformation
17073          nngateway-mail2news-header-transformation)))
17074 @end lisp
17075
17076 So, to use this, simply say something like:
17077
17078 @lisp
17079 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17080 @end lisp
17081
17082
17083
17084 @node Combined Groups
17085 @section Combined Groups
17086
17087 Gnus allows combining a mixture of all the other group types into bigger
17088 groups.
17089
17090 @menu
17091 * Virtual Groups::              Combining articles from many groups.
17092 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17093 @end menu
17094
17095
17096 @node Virtual Groups
17097 @subsection Virtual Groups
17098 @cindex nnvirtual
17099 @cindex virtual groups
17100 @cindex merging groups
17101
17102 An @dfn{nnvirtual group} is really nothing more than a collection of
17103 other groups.
17104
17105 For instance, if you are tired of reading many small groups, you can
17106 put them all in one big group, and then grow tired of reading one
17107 big, unwieldy group.  The joys of computing!
17108
17109 You specify @code{nnvirtual} as the method.  The address should be a
17110 regexp to match component groups.
17111
17112 All marks in the virtual group will stick to the articles in the
17113 component groups.  So if you tick an article in a virtual group, the
17114 article will also be ticked in the component group from whence it
17115 came.  (And vice versa---marks from the component groups will also be
17116 shown in the virtual group.).  To create an empty virtual group, run
17117 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17118 and edit the method regexp with @kbd{M-e}
17119 (@code{gnus-group-edit-group-method})
17120
17121 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17122 newsgroups into one, big, happy newsgroup:
17123
17124 @lisp
17125 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17126 @end lisp
17127
17128 The component groups can be native or foreign; everything should work
17129 smoothly, but if your computer explodes, it was probably my fault.
17130
17131 Collecting the same group from several servers might actually be a good
17132 idea if users have set the Distribution header to limit distribution.
17133 If you would like to read @samp{soc.motss} both from a server in Japan
17134 and a server in Norway, you could use the following as the group regexp:
17135
17136 @example
17137 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17138 @end example
17139
17140 (Remember, though, that if you're creating the group with @kbd{G m}, you
17141 shouldn't double the backslashes, and you should leave off the quote
17142 characters at the beginning and the end of the string.)
17143
17144 This should work kinda smoothly---all articles from both groups should
17145 end up in this one, and there should be no duplicates.  Threading (and
17146 the rest) will still work as usual, but there might be problems with the
17147 sequence of articles.  Sorting on date might be an option here
17148 (@pxref{Selecting a Group}).
17149
17150 One limitation, however---all groups included in a virtual
17151 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17152 zombie groups can't be component groups for @code{nnvirtual} groups.
17153
17154 @vindex nnvirtual-always-rescan
17155 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17156 @code{nnvirtual} will always scan groups for unread articles when
17157 entering a virtual group.  If this variable is @code{nil} (which is the
17158 default) and you read articles in a component group after the virtual
17159 group has been activated, the read articles from the component group
17160 will show up when you enter the virtual group.  You'll also see this
17161 effect if you have two virtual groups that have a component group in
17162 common.  If that's the case, you should set this variable to @code{t}.
17163 Or you can just tap @code{M-g} on the virtual group every time before
17164 you enter it---it'll have much the same effect.
17165
17166 @code{nnvirtual} can have both mail and news groups as component groups.
17167 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17168 has to ask the back end of the component group the article comes from
17169 whether it is a news or mail back end.  However, when you do a @kbd{^},
17170 there is typically no sure way for the component back end to know this,
17171 and in that case @code{nnvirtual} tells Gnus that the article came from a
17172 not-news back end.  (Just to be on the safe side.)
17173
17174 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17175 line from the article you respond to in these cases.
17176
17177 @code{nnvirtual} groups do not inherit anything but articles and marks
17178 from component groups---group parameters, for instance, are not
17179 inherited.
17180
17181
17182 @node Kibozed Groups
17183 @subsection Kibozed Groups
17184 @cindex nnkiboze
17185 @cindex kibozing
17186
17187 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17188 the news feed''.  @code{nnkiboze} is a back end that will do this for
17189 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17190 with useless requests!  Oh happiness!
17191
17192 @kindex G k (Group)
17193 To create a kibozed group, use the @kbd{G k} command in the group
17194 buffer.
17195
17196 The address field of the @code{nnkiboze} method is, as with
17197 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17198 @code{nnkiboze} group.  That's where most similarities between
17199 @code{nnkiboze} and @code{nnvirtual} end.
17200
17201 In addition to this regexp detailing component groups, an
17202 @code{nnkiboze} group must have a score file to say what articles are
17203 to be included in the group (@pxref{Scoring}).
17204
17205 @kindex M-x nnkiboze-generate-groups
17206 @findex nnkiboze-generate-groups
17207 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17208 @code{nnkiboze} groups you want to have.  This command will take time.
17209 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17210 headers from all the articles in all the component groups and run them
17211 through the scoring process to determine if there are any articles in
17212 the groups that are to be part of the @code{nnkiboze} groups.
17213
17214 Please limit the number of component groups by using restrictive
17215 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17216 @acronym{NNTP} site may throw you off and never let you back in again.
17217 Stranger things have happened.
17218
17219 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17220 and they can be foreign.  No restrictions.
17221
17222 @vindex nnkiboze-directory
17223 The generation of an @code{nnkiboze} group means writing two files in
17224 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17225 contains the @acronym{NOV} header lines for all the articles in the group,
17226 and the other is an additional @file{.newsrc} file to store information
17227 on what groups have been searched through to find component articles.
17228
17229 Articles marked as read in the @code{nnkiboze} group will have
17230 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17231
17232
17233 @node Gnus Unplugged
17234 @section Gnus Unplugged
17235 @cindex offline
17236 @cindex unplugged
17237 @cindex agent
17238 @cindex Gnus agent
17239 @cindex Gnus unplugged
17240
17241 In olden times (ca. February '88), people used to run their newsreaders
17242 on big machines with permanent connections to the net.  News transport
17243 was dealt with by news servers, and all the newsreaders had to do was to
17244 read news.  Believe it or not.
17245
17246 Nowadays most people read news and mail at home, and use some sort of
17247 modem to connect to the net.  To avoid running up huge phone bills, it
17248 would be nice to have a way to slurp down all the news and mail, hang up
17249 the phone, read for several hours, and then upload any responses you
17250 have to make.  And then you repeat the procedure.
17251
17252 Of course, you can use news servers for doing this as well.  I've used
17253 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17254 for some years, but doing that's a bore.  Moving the news server
17255 functionality up to the newsreader makes sense if you're the only person
17256 reading news on a machine.
17257
17258 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17259 fact, you don't even have to configure anything.
17260
17261 Of course, to use it as such, you have to learn a few new commands.
17262
17263 @menu
17264 * Agent Basics::                How it all is supposed to work.
17265 * Agent Categories::            How to tell the Gnus Agent what to download.
17266 * Agent Commands::              New commands for all the buffers.
17267 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17268 * Agent as Cache::              The Agent is a big cache too.
17269 * Agent Expiry::                How to make old articles go away.
17270 * Agent Regeneration::          How to recover from lost connections and other accidents.
17271 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17272 * Outgoing Messages::           What happens when you post/mail something?
17273 * Agent Variables::             Customizing is fun.
17274 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17275 * Batching Agents::             How to fetch news from a @code{cron} job.
17276 * Agent Caveats::               What you think it'll do and what it does.
17277 @end menu
17278
17279
17280 @node Agent Basics
17281 @subsection Agent Basics
17282
17283 First, let's get some terminology out of the way.
17284
17285 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17286 connection to the net (and notified the Agent that this is the case).
17287 When the connection to the net is up again (and Gnus knows this), the
17288 Agent is @dfn{plugged}.
17289
17290 The @dfn{local} machine is the one you're running on, and which isn't
17291 connected to the net continuously.
17292
17293 @dfn{Downloading} means fetching things from the net to your local
17294 machine.  @dfn{Uploading} is doing the opposite.
17295
17296 You know that Gnus gives you all the opportunity you'd ever want for
17297 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17298 is also customizable to a great extent, which means that the user has a
17299 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17300 you in your foot, but with Gnus, you have a choice!
17301
17302 Gnus is never really in plugged or unplugged state.  Rather, it applies
17303 that state to each server individually.  This means that some servers
17304 can be plugged while others can be unplugged.  Additionally, some
17305 servers can be ignored by the Agent altogether (which means that
17306 they're kinda like plugged always).
17307
17308 So when you unplug the Agent and then wonder why is Gnus opening a
17309 connection to the Net, the next step to do is to look whether all
17310 servers are agentized.  If there is an unagentized server, you found
17311 the culprit.
17312
17313 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17314 reachable.  When Gnus notices this, it asks you whether you want the
17315 server to be switched to offline state.  If you say yes, then the
17316 server will behave somewhat as if it was unplugged, except that Gnus
17317 will ask you whether you want to switch it back online again.
17318
17319 Let's take a typical Gnus session using the Agent.
17320
17321 @itemize @bullet
17322
17323 @item
17324 @findex gnus-unplugged
17325 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17326 Agent in a disconnected state.  You can read all the news that you have
17327 already fetched while in this mode.
17328
17329 @item
17330 You then decide to see whether any new news has arrived.  You connect
17331 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17332 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17333 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
17334 Source Specifiers}).
17335
17336 @item
17337 You can then read the new news immediately, or you can download the news
17338 onto your local machine.  If you want to do the latter, you press @kbd{g}
17339 to check if there are any new news and then @kbd{J
17340 s} to fetch all the eligible articles in all the groups.  (To let Gnus
17341 know which articles you want to download, @pxref{Agent Categories}.)
17342
17343 @item
17344 After fetching the articles, you press @kbd{J j} to make Gnus become
17345 unplugged again, and you shut down the PPP thing (or whatever).  And
17346 then you read the news offline.
17347
17348 @item
17349 And then you go to step 2.
17350 @end itemize
17351
17352 Here are some things you should do the first time (or so) that you use
17353 the Agent.
17354
17355 @itemize @bullet
17356
17357 @item
17358 Decide which servers should be covered by the Agent.  If you have a mail
17359 back end, it would probably be nonsensical to have it covered by the
17360 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17361 @kbd{J a} on the server (or servers) that you wish to have covered by the
17362 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17363 added servers you do not wish to have covered by the Agent.  By default,
17364 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17365 @code{gnus-secondary-select-methods} are agentized.
17366
17367 @item
17368 Decide on download policy.  It's fairly simple once you decide whether
17369 you are going to use agent categories, topic parameters, and/or group
17370 parameters to implement your policy.  If you're new to gnus, it
17371 is probably best to start with a category, @xref{Agent Categories}.
17372
17373 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17374 (@pxref{Agent Categories}) provide for setting a policy that applies
17375 to multiple groups.  Which you use is entirely up to you.  Topic
17376 parameters do override categories so, if you mix the two, you'll have
17377 to take that into account.  If you have a few groups that deviate from
17378 your policy, you can use group parameters (@pxref{Group Parameters}) to
17379 configure them.
17380
17381 @item
17382 Uhm@dots{} that's it.
17383 @end itemize
17384
17385
17386 @node Agent Categories
17387 @subsection Agent Categories
17388
17389 One of the main reasons to integrate the news transport layer into the
17390 newsreader is to allow greater control over what articles to download.
17391 There's not much point in downloading huge amounts of articles, just to
17392 find out that you're not interested in reading any of them.  It's better
17393 to be somewhat more conservative in choosing what to download, and then
17394 mark the articles for downloading manually if it should turn out that
17395 you're interested in the articles anyway.
17396
17397 One of the more effective methods for controlling what is to be
17398 downloaded is to create a @dfn{category} and then assign some (or all)
17399 groups to this category.  Groups that do not belong in any other
17400 category belong to the @code{default} category.  Gnus has its own
17401 buffer for creating and managing categories.
17402
17403 If you prefer, you can also use group parameters (@pxref{Group
17404 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17405 alternative approach to controlling the agent.  The only real
17406 difference is that categories are specific to the agent (so there is
17407 less to learn) while group and topic parameters include the kitchen
17408 sink.
17409
17410 Since you can set agent parameters in several different places we have
17411 a rule to decide which source to believe.  This rule specifies that
17412 the parameter sources are checked in the following order: group
17413 parameters, topic parameters, agent category, and finally customizable
17414 variables.  So you can mix all of these sources to produce a wide range
17415 of behavior, just don't blame me if you don't remember where you put
17416 your settings.
17417
17418 @menu
17419 * Category Syntax::             What a category looks like.
17420 * Category Buffer::             A buffer for maintaining categories.
17421 * Category Variables::          Customize'r'Us.
17422 @end menu
17423
17424
17425 @node Category Syntax
17426 @subsubsection Category Syntax
17427
17428 A category consists of a name, the list of groups belonging to the
17429 category, and a number of optional parameters that override the
17430 customizable variables.  The complete list of agent parameters are
17431 listed below.
17432
17433 @table @code
17434 @item gnus-agent-cat-name
17435 The name of the category.
17436
17437 @item gnus-agent-cat-groups
17438 The list of groups that are in this category.
17439
17440 @item gnus-agent-cat-predicate
17441 A predicate which (generally) gives a rough outline of which articles
17442 are eligible for downloading; and
17443
17444 @item gnus-agent-cat-score-file
17445 a score rule which (generally) gives you a finer granularity when
17446 deciding what articles to download.  (Note that this @dfn{download
17447 score} is not necessarily related to normal scores.)
17448
17449 @item gnus-agent-cat-enable-expiration
17450 a boolean indicating whether the agent should expire old articles in
17451 this group.  Most groups should be expired to conserve disk space.  In
17452 fact, its probably safe to say that the gnus.* hierarchy contains the
17453 only groups that should not be expired.
17454
17455 @item gnus-agent-cat-days-until-old
17456 an integer indicating the number of days that the agent should wait
17457 before deciding that a read article is safe to expire.
17458
17459 @item gnus-agent-cat-low-score
17460 an integer that overrides the value of @code{gnus-agent-low-score}.
17461
17462 @item gnus-agent-cat-high-score
17463 an integer that overrides the value of @code{gnus-agent-high-score}.
17464
17465 @item gnus-agent-cat-length-when-short
17466 an integer that overrides the value of
17467 @code{gnus-agent-short-article}.
17468
17469 @item gnus-agent-cat-length-when-long
17470 an integer that overrides the value of @code{gnus-agent-long-article}.
17471 @end table
17472
17473 The name of a category can not be changed once the category has been
17474 created.
17475
17476 Each category maintains a list of groups that are exclusive members of
17477 that category.  The exclusivity rule is automatically enforced, add a
17478 group to a new category and it is automatically removed from its old
17479 category.
17480
17481 A predicate in its simplest form can be a single predicate such as
17482 @code{true} or @code{false}.  These two will download every available
17483 article or nothing respectively.  In the case of these two special
17484 predicates an additional score rule is superfluous.
17485
17486 Predicates of @code{high} or @code{low} download articles in respect of
17487 their scores in relationship to @code{gnus-agent-high-score} and
17488 @code{gnus-agent-low-score} as described below.
17489
17490 To gain even finer control of what is to be regarded eligible for
17491 download a predicate can consist of a number of predicates with logical
17492 operators sprinkled in between.
17493
17494 Perhaps some examples are in order.
17495
17496 Here's a simple predicate.  (It's the default predicate, in fact, used
17497 for all groups that don't belong to any other category.)
17498
17499 @lisp
17500 short
17501 @end lisp
17502
17503 Quite simple, eh?  This predicate is true if and only if the article is
17504 short (for some value of ``short'').
17505
17506 Here's a more complex predicate:
17507
17508 @lisp
17509 (or high
17510     (and
17511      (not low)
17512      (not long)))
17513 @end lisp
17514
17515 This means that an article should be downloaded if it has a high score,
17516 or if the score is not low and the article is not long.  You get the
17517 drift.
17518
17519 The available logical operators are @code{or}, @code{and} and
17520 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17521 @samp{|}, @code{&} and @code{!} instead.)
17522
17523 The following predicates are pre-defined, but if none of these fit what
17524 you want to do, you can write your own.
17525
17526 When evaluating each of these predicates, the named constant will be
17527 bound to the value determined by calling
17528 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17529 example, gnus-agent-short-article will be bound to
17530 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17531 means that you can specify a predicate in your category then tune that
17532 predicate to individual groups.
17533
17534 @table @code
17535 @item short
17536 True iff the article is shorter than @code{gnus-agent-short-article}
17537 lines; default 100.
17538
17539 @item long
17540 True iff the article is longer than @code{gnus-agent-long-article}
17541 lines; default 200.
17542
17543 @item low
17544 True iff the article has a download score less than
17545 @code{gnus-agent-low-score}; default 0.
17546
17547 @item high
17548 True iff the article has a download score greater than
17549 @code{gnus-agent-high-score}; default 0.
17550
17551 @item spam
17552 True iff the Gnus Agent guesses that the article is spam.  The
17553 heuristics may change over time, but at present it just computes a
17554 checksum and sees whether articles match.
17555
17556 @item true
17557 Always true.
17558
17559 @item false
17560 Always false.
17561 @end table
17562
17563 If you want to create your own predicate function, here's what you have
17564 to know:  The functions are called with no parameters, but the
17565 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17566 useful values.
17567
17568 For example, you could decide that you don't want to download articles
17569 that were posted more than a certain number of days ago (e.g. posted
17570 more than @code{gnus-agent-expire-days} ago) you might write a function
17571 something along the lines of the following:
17572
17573 @lisp
17574 (defun my-article-old-p ()
17575   "Say whether an article is old."
17576   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17577      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17578 @end lisp
17579
17580 with the predicate then defined as:
17581
17582 @lisp
17583 (not my-article-old-p)
17584 @end lisp
17585
17586 or you could append your predicate to the predefined
17587 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17588 wherever.
17589
17590 @lisp
17591 (require 'gnus-agent)
17592 (setq  gnus-category-predicate-alist
17593   (append gnus-category-predicate-alist
17594          '((old . my-article-old-p))))
17595 @end lisp
17596
17597 and simply specify your predicate as:
17598
17599 @lisp
17600 (not old)
17601 @end lisp
17602
17603 If/when using something like the above, be aware that there are many
17604 misconfigured systems/mailers out there and so an article's date is not
17605 always a reliable indication of when it was posted.  Hell, some people
17606 just don't give a damn.
17607
17608 The above predicates apply to @emph{all} the groups which belong to the
17609 category.  However, if you wish to have a specific predicate for an
17610 individual group within a category, or you're just too lazy to set up a
17611 new category, you can enter a group's individual predicate in its group
17612 parameters like so:
17613
17614 @lisp
17615 (agent-predicate . short)
17616 @end lisp
17617
17618 This is the group/topic parameter equivalent of the agent category default.
17619 Note that when specifying a single word predicate like this, the
17620 @code{agent-predicate} specification must be in dotted pair notation.
17621
17622 The equivalent of the longer example from above would be:
17623
17624 @lisp
17625 (agent-predicate or high (and (not low) (not long)))
17626 @end lisp
17627
17628 The outer parenthesis required in the category specification are not
17629 entered here as, not being in dotted pair notation, the value of the
17630 predicate is assumed to be a list.
17631
17632
17633 Now, the syntax of the download score is the same as the syntax of
17634 normal score files, except that all elements that require actually
17635 seeing the article itself are verboten.  This means that only the
17636 following headers can be scored on: @code{Subject}, @code{From},
17637 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17638 @code{Lines}, and @code{Xref}.
17639
17640 As with predicates, the specification of the @code{download score rule}
17641 to use in respect of a group can be in either the category definition if
17642 it's to be applicable to all groups in therein, or a group's parameters
17643 if it's to be specific to that group.
17644
17645 In both of these places the @code{download score rule} can take one of
17646 three forms:
17647
17648 @enumerate
17649 @item
17650 Score rule
17651
17652 This has the same syntax as a normal gnus score file except only a
17653 subset of scoring keywords are available as mentioned above.
17654
17655 example:
17656
17657 @itemize @bullet
17658 @item
17659 Category specification
17660
17661 @lisp
17662 (("from"
17663        ("Lars Ingebrigtsen" 1000000 nil s))
17664 ("lines"
17665        (500 -100 nil <)))
17666 @end lisp
17667
17668 @item
17669 Group/Topic Parameter specification
17670
17671 @lisp
17672 (agent-score ("from"
17673                    ("Lars Ingebrigtsen" 1000000 nil s))
17674              ("lines"
17675                    (500 -100 nil <)))
17676 @end lisp
17677
17678 Again, note the omission of the outermost parenthesis here.
17679 @end itemize
17680
17681 @item
17682 Agent score file
17683
17684 These score files must @emph{only} contain the permitted scoring
17685 keywords stated above.
17686
17687 example:
17688
17689 @itemize @bullet
17690 @item
17691 Category specification
17692
17693 @lisp
17694 ("~/News/agent.SCORE")
17695 @end lisp
17696
17697 or perhaps
17698
17699 @lisp
17700 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17701 @end lisp
17702
17703 @item
17704 Group Parameter specification
17705
17706 @lisp
17707 (agent-score "~/News/agent.SCORE")
17708 @end lisp
17709
17710 Additional score files can be specified as above.  Need I say anything
17711 about parenthesis?
17712 @end itemize
17713
17714 @item
17715 Use @code{normal} score files
17716
17717 If you don't want to maintain two sets of scoring rules for a group, and
17718 your desired @code{downloading} criteria for a group are the same as your
17719 @code{reading} criteria then you can tell the agent to refer to your
17720 @code{normal} score files when deciding what to download.
17721
17722 These directives in either the category definition or a group's
17723 parameters will cause the agent to read in all the applicable score
17724 files for a group, @emph{filtering out} those sections that do not
17725 relate to one of the permitted subset of scoring keywords.
17726
17727 @itemize @bullet
17728 @item
17729 Category Specification
17730
17731 @lisp
17732 file
17733 @end lisp
17734
17735 @item
17736 Group Parameter specification
17737
17738 @lisp
17739 (agent-score . file)
17740 @end lisp
17741 @end itemize
17742 @end enumerate
17743
17744 @node Category Buffer
17745 @subsubsection Category Buffer
17746
17747 You'd normally do all category maintenance from the category buffer.
17748 When you enter it for the first time (with the @kbd{J c} command from
17749 the group buffer), you'll only see the @code{default} category.
17750
17751 The following commands are available in this buffer:
17752
17753 @table @kbd
17754 @item q
17755 @kindex q (Category)
17756 @findex gnus-category-exit
17757 Return to the group buffer (@code{gnus-category-exit}).
17758
17759 @item e
17760 @kindex e (Category)
17761 @findex gnus-category-customize-category
17762 Use a customization buffer to set all of the selected category's
17763 parameters at one time (@code{gnus-category-customize-category}).
17764
17765 @item k
17766 @kindex k (Category)
17767 @findex gnus-category-kill
17768 Kill the current category (@code{gnus-category-kill}).
17769
17770 @item c
17771 @kindex c (Category)
17772 @findex gnus-category-copy
17773 Copy the current category (@code{gnus-category-copy}).
17774
17775 @item a
17776 @kindex a (Category)
17777 @findex gnus-category-add
17778 Add a new category (@code{gnus-category-add}).
17779
17780 @item p
17781 @kindex p (Category)
17782 @findex gnus-category-edit-predicate
17783 Edit the predicate of the current category
17784 (@code{gnus-category-edit-predicate}).
17785
17786 @item g
17787 @kindex g (Category)
17788 @findex gnus-category-edit-groups
17789 Edit the list of groups belonging to the current category
17790 (@code{gnus-category-edit-groups}).
17791
17792 @item s
17793 @kindex s (Category)
17794 @findex gnus-category-edit-score
17795 Edit the download score rule of the current category
17796 (@code{gnus-category-edit-score}).
17797
17798 @item l
17799 @kindex l (Category)
17800 @findex gnus-category-list
17801 List all the categories (@code{gnus-category-list}).
17802 @end table
17803
17804
17805 @node Category Variables
17806 @subsubsection Category Variables
17807
17808 @table @code
17809 @item gnus-category-mode-hook
17810 @vindex gnus-category-mode-hook
17811 Hook run in category buffers.
17812
17813 @item gnus-category-line-format
17814 @vindex gnus-category-line-format
17815 Format of the lines in the category buffer (@pxref{Formatting
17816 Variables}).  Valid elements are:
17817
17818 @table @samp
17819 @item c
17820 The name of the category.
17821
17822 @item g
17823 The number of groups in the category.
17824 @end table
17825
17826 @item gnus-category-mode-line-format
17827 @vindex gnus-category-mode-line-format
17828 Format of the category mode line (@pxref{Mode Line Formatting}).
17829
17830 @item gnus-agent-short-article
17831 @vindex gnus-agent-short-article
17832 Articles that have fewer lines than this are short.  Default 100.
17833
17834 @item gnus-agent-long-article
17835 @vindex gnus-agent-long-article
17836 Articles that have more lines than this are long.  Default 200.
17837
17838 @item gnus-agent-low-score
17839 @vindex gnus-agent-low-score
17840 Articles that have a score lower than this have a low score.  Default
17841 0.
17842
17843 @item gnus-agent-high-score
17844 @vindex gnus-agent-high-score
17845 Articles that have a score higher than this have a high score.  Default
17846 0.
17847
17848 @item gnus-agent-expire-days
17849 @vindex gnus-agent-expire-days
17850 The number of days that a @samp{read} article must stay in the agent's
17851 local disk before becoming eligible for expiration (While the name is
17852 the same, this doesn't mean expiring the article on the server.  It
17853 just means deleting the local copy of the article).  What is also
17854 important to understand is that the counter starts with the time the
17855 article was written to the local disk and not the time the article was
17856 read.
17857 Default 7.
17858
17859 @item gnus-agent-enable-expiration
17860 @vindex gnus-agent-enable-expiration
17861 Determines whether articles in a group are, by default, expired or
17862 retained indefinitely.  The default is @code{ENABLE} which means that
17863 you'll have to disable expiration when desired.  On the other hand,
17864 you could set this to @code{DISABLE}.  In that case, you would then
17865 have to enable expiration in selected groups.
17866
17867 @end table
17868
17869
17870 @node Agent Commands
17871 @subsection Agent Commands
17872 @findex gnus-agent-toggle-plugged
17873 @kindex J j (Agent)
17874
17875 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17876 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17877 toggles the plugged/unplugged state of the Gnus Agent.
17878
17879
17880 @menu
17881 * Group Agent Commands::        Configure groups and fetch their contents.
17882 * Summary Agent Commands::      Manually select then fetch specific articles.
17883 * Server Agent Commands::       Select the servers that are supported by the agent.
17884 @end menu
17885
17886
17887
17888
17889 @node Group Agent Commands
17890 @subsubsection Group Agent Commands
17891
17892 @table @kbd
17893 @item J u
17894 @kindex J u (Agent Group)
17895 @findex gnus-agent-fetch-groups
17896 Fetch all eligible articles in the current group
17897 (@code{gnus-agent-fetch-groups}).
17898
17899 @item J c
17900 @kindex J c (Agent Group)
17901 @findex gnus-enter-category-buffer
17902 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17903
17904 @item J s
17905 @kindex J s (Agent Group)
17906 @findex gnus-agent-fetch-session
17907 Fetch all eligible articles in all groups
17908 (@code{gnus-agent-fetch-session}).
17909
17910 @item J S
17911 @kindex J S (Agent Group)
17912 @findex gnus-group-send-queue
17913 Send all sendable messages in the queue group
17914 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17915
17916 @item J a
17917 @kindex J a (Agent Group)
17918 @findex gnus-agent-add-group
17919 Add the current group to an Agent category
17920 (@code{gnus-agent-add-group}).  This command understands the
17921 process/prefix convention (@pxref{Process/Prefix}).
17922
17923 @item J r
17924 @kindex J r (Agent Group)
17925 @findex gnus-agent-remove-group
17926 Remove the current group from its category, if any
17927 (@code{gnus-agent-remove-group}).  This command understands the
17928 process/prefix convention (@pxref{Process/Prefix}).
17929
17930 @item J Y
17931 @kindex J Y (Agent Group)
17932 @findex gnus-agent-synchronize-flags
17933 Synchronize flags changed while unplugged with remote server, if any.
17934
17935
17936 @end table
17937
17938
17939 @node Summary Agent Commands
17940 @subsubsection Summary Agent Commands
17941
17942 @table @kbd
17943 @item J #
17944 @kindex J # (Agent Summary)
17945 @findex gnus-agent-mark-article
17946 Mark the article for downloading (@code{gnus-agent-mark-article}).
17947
17948 @item J M-#
17949 @kindex J M-# (Agent Summary)
17950 @findex gnus-agent-unmark-article
17951 Remove the downloading mark from the article
17952 (@code{gnus-agent-unmark-article}).
17953
17954 @cindex %
17955 @item @@
17956 @kindex @@ (Agent Summary)
17957 @findex gnus-agent-toggle-mark
17958 Toggle whether to download the article
17959 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17960 default.
17961
17962 @item J c
17963 @kindex J c (Agent Summary)
17964 @findex gnus-agent-catchup
17965 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17966
17967 @item J S
17968 @kindex J S (Agent Summary)
17969 @findex gnus-agent-fetch-group
17970 Download all eligible (@pxref{Agent Categories}) articles in this group.
17971 (@code{gnus-agent-fetch-group}).
17972
17973 @item J s
17974 @kindex J s (Agent Summary)
17975 @findex gnus-agent-fetch-series
17976 Download all processable articles in this group.
17977 (@code{gnus-agent-fetch-series}).
17978
17979 @item J u
17980 @kindex J u (Agent Summary)
17981 @findex gnus-agent-summary-fetch-group
17982 Download all downloadable articles in the current group
17983 (@code{gnus-agent-summary-fetch-group}).
17984
17985 @end table
17986
17987
17988 @node Server Agent Commands
17989 @subsubsection Server Agent Commands
17990
17991 @table @kbd
17992 @item J a
17993 @kindex J a (Agent Server)
17994 @findex gnus-agent-add-server
17995 Add the current server to the list of servers covered by the Gnus Agent
17996 (@code{gnus-agent-add-server}).
17997
17998 @item J r
17999 @kindex J r (Agent Server)
18000 @findex gnus-agent-remove-server
18001 Remove the current server from the list of servers covered by the Gnus
18002 Agent (@code{gnus-agent-remove-server}).
18003
18004 @end table
18005
18006
18007 @node Agent Visuals
18008 @subsection Agent Visuals
18009
18010 If you open a summary while unplugged and, Gnus knows from the group's
18011 active range that there are more articles than the headers currently
18012 stored in the Agent, you may see some articles whose subject looks
18013 something like @samp{[Undownloaded article #####]}.  These are
18014 placeholders for the missing headers.  Aside from setting a mark,
18015 there is not much that can be done with one of these placeholders.
18016 When Gnus finally gets a chance to fetch the group's headers, the
18017 placeholders will automatically be replaced by the actual headers.
18018 You can configure the summary buffer's maneuvering to skip over the
18019 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18020
18021 While it may be obvious to all, the only headers and articles
18022 available while unplugged are those headers and articles that were
18023 fetched into the Agent while previously plugged.  To put it another
18024 way, "If you forget to fetch something while plugged, you might have a
18025 less than satisfying unplugged session".  For this reason, the Agent
18026 adds two visual effects to your summary buffer.  These effects display
18027 the download status of each article so that you always know which
18028 articles will be available when unplugged.
18029
18030 The first visual effect is the @samp{%O} spec.  If you customize
18031 @code{gnus-summary-line-format} to include this specifier, you will add
18032 a single character field that indicates an article's download status.
18033 Articles that have been fetched into either the Agent or the Cache,
18034 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18035 other articles will display @code{gnus-undownloaded-mark} (defaults to
18036 @samp{-}).  If you open a group that has not been agentized, a space
18037 (@samp{ }) will be displayed.
18038
18039 The second visual effect are the undownloaded faces.  The faces, there
18040 are three indicating the article's score (low, normal, high), seem to
18041 result in a love/hate response from many Gnus users.  The problem is
18042 that the face selection is controlled by a list of condition tests and
18043 face names (See @code{gnus-summary-highlight}).  Each condition is
18044 tested in the order in which it appears in the list so early
18045 conditions have precedence over later conditions.  All of this means
18046 that, if you tick an undownloaded article, the article will continue
18047 to be displayed in the undownloaded face rather than the ticked face.
18048
18049 If you use the Agent as a cache (to avoid downloading the same article
18050 each time you visit it or to minimize your connection time), the
18051 undownloaded face will probably seem like a good idea.  The reason
18052 being that you do all of our work (marking, reading, deleting) with
18053 downloaded articles so the normal faces always appear.
18054
18055 For occasional Agent users, the undownloaded faces may appear to be an
18056 absolutely horrible idea.  The issue being that, since most of their
18057 articles have not been fetched into the Agent, most of the normal
18058 faces will be obscured by the undownloaded faces.  If this is your
18059 situation, you have two choices available.  First, you can completely
18060 disable the undownload faces by customizing
18061 @code{gnus-summary-highlight} to delete the three cons-cells that
18062 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18063 you prefer to take a more fine-grained approach, you may set the
18064 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18065 parameter, like all other agent parameters, may be set on an Agent
18066 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18067 Parameters}), or an individual group (@pxref{Group Parameters}).
18068
18069 @node Agent as Cache
18070 @subsection Agent as Cache
18071
18072 When Gnus is plugged, it is not efficient to download headers or
18073 articles from the server again, if they are already stored in the
18074 Agent.  So, Gnus normally only downloads headers once, and stores them
18075 in the Agent.  These headers are later used when generating the summary
18076 buffer, regardless of whether you are plugged or unplugged.  Articles
18077 are not cached in the Agent by default though (that would potentially
18078 consume lots of disk space), but if you have already downloaded an
18079 article into the Agent, Gnus will not download the article from the
18080 server again but use the locally stored copy instead.
18081
18082 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18083 @pxref{Agent Variables}) to always download headers and articles while
18084 plugged.  Gnus will almost certainly be slower, but it will be kept
18085 synchronized with the server.  That last point probably won't make any
18086 sense if you are using a nntp or nnimap back end.
18087
18088 @node Agent Expiry
18089 @subsection Agent Expiry
18090
18091 @vindex gnus-agent-expire-days
18092 @findex gnus-agent-expire
18093 @kindex M-x gnus-agent-expire
18094 @kindex M-x gnus-agent-expire-group
18095 @findex gnus-agent-expire-group
18096 @cindex agent expiry
18097 @cindex Gnus agent expiry
18098 @cindex expiry
18099
18100 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18101 least it doesn't handle it like other back ends.  Instead, there are
18102 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18103 commands that will expire all read articles that are older than
18104 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18105 that you're running out of space.  Neither are particularly fast or
18106 efficient, and it's not a particularly good idea to interrupt them (with
18107 @kbd{C-g} or anything else) once you've started one of them.
18108
18109 Note that other functions, e.g. @code{gnus-request-expire-articles},
18110 might run @code{gnus-agent-expire} for you to keep the agent
18111 synchronized with the group.
18112
18113 The agent parameter @code{agent-enable-expiration} may be used to
18114 prevent expiration in selected groups.
18115
18116 @vindex gnus-agent-expire-all
18117 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18118 expiration commands will expire all articles---unread, read, ticked
18119 and dormant.  If @code{nil} (which is the default), only read articles
18120 are eligible for expiry, and unread, ticked and dormant articles will
18121 be kept indefinitely.
18122
18123 If you find that some articles eligible for expiry are never expired,
18124 perhaps some Gnus Agent files are corrupted.  There's are special
18125 commands, @code{gnus-agent-regenerate} and
18126 @code{gnus-agent-regenerate-group}, to fix possible problems.
18127
18128 @node Agent Regeneration
18129 @subsection Agent Regeneration
18130
18131 @cindex agent regeneration
18132 @cindex Gnus agent regeneration
18133 @cindex regeneration
18134
18135 The local data structures used by @code{nnagent} may become corrupted
18136 due to certain exceptional conditions.  When this happens,
18137 @code{nnagent} functionality may degrade or even fail.  The solution
18138 to this problem is to repair the local data structures by removing all
18139 internal inconsistencies.
18140
18141 For example, if your connection to your server is lost while
18142 downloaded articles into the agent, the local data structures will not
18143 know about articles successfully downloaded prior to the connection
18144 failure.  Running @code{gnus-agent-regenerate} or
18145 @code{gnus-agent-regenerate-group} will update the data structures
18146 such that you don't need to download these articles a second time.
18147
18148 @findex gnus-agent-regenerate
18149 @kindex M-x gnus-agent-regenerate
18150 The command @code{gnus-agent-regenerate} will perform
18151 @code{gnus-agent-regenerate-group} on every agentized group.  While
18152 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18153 recommended that you first close all summary buffers.
18154
18155 @findex gnus-agent-regenerate-group
18156 @kindex M-x gnus-agent-regenerate-group
18157 The command @code{gnus-agent-regenerate-group} uses the local copies
18158 of individual articles to repair the local @acronym{NOV}(header) database.  It
18159 then updates the internal data structures that document which articles
18160 are stored locally.  An optional argument will mark articles in the
18161 agent as unread.
18162
18163 @node Agent and IMAP
18164 @subsection Agent and IMAP
18165
18166 The Agent works with any Gnus back end, including nnimap.  However,
18167 since there are some conceptual differences between @acronym{NNTP} and
18168 @acronym{IMAP}, this section (should) provide you with some information to
18169 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18170
18171 The first thing to keep in mind is that all flags (read, ticked, etc)
18172 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18173 case for nntp.  Thus Gnus need to remember flag changes when
18174 disconnected, and synchronize these flags when you plug back in.
18175
18176 Gnus keeps track of flag changes when reading nnimap groups under the
18177 Agent.  When you plug back in, Gnus will check if you have any changed
18178 any flags and ask if you wish to synchronize these with the server.
18179 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18180
18181 @vindex gnus-agent-synchronize-flags
18182 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18183 never automatically synchronize flags.  If it is @code{ask}, which is
18184 the default, the Agent will check if you made any changes and if so
18185 ask if you wish to synchronize these when you re-connect.  If it has
18186 any other value, all flags will be synchronized automatically.
18187
18188 If you do not wish to synchronize flags automatically when you
18189 re-connect, you can do it manually with the
18190 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18191 in the group buffer.
18192
18193 Some things are currently not implemented in the Agent that you'd might
18194 expect from a disconnected @acronym{IMAP} client, including:
18195
18196 @itemize @bullet
18197
18198 @item
18199 Copying/moving articles into nnimap groups when unplugged.
18200
18201 @item
18202 Creating/deleting nnimap groups when unplugged.
18203
18204 @end itemize
18205
18206 Technical note: the synchronization algorithm does not work by ``pushing''
18207 all local flags to the server, but rather incrementally update the
18208 server view of flags by changing only those flags that were changed by
18209 the user.  Thus, if you set one flag on an article, quit the group and
18210 re-select the group and remove the flag; the flag will be set and
18211 removed from the server when you ``synchronize''.  The queued flag
18212 operations can be found in the per-server @code{flags} file in the Agent
18213 directory.  It's emptied when you synchronize flags.
18214
18215
18216 @node Outgoing Messages
18217 @subsection Outgoing Messages
18218
18219 When Gnus is unplugged, all outgoing messages (both mail and news) are
18220 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18221 them there after posting, and edit them at will.
18222
18223 When Gnus is plugged again, you can send the messages either from the
18224 draft group with the special commands available there, or you can use
18225 the @kbd{J S} command in the group buffer to send all the sendable
18226 messages in the draft group.
18227
18228
18229
18230 @node Agent Variables
18231 @subsection Agent Variables
18232
18233 @table @code
18234 @item gnus-agent-directory
18235 @vindex gnus-agent-directory
18236 Where the Gnus Agent will store its files.  The default is
18237 @file{~/News/agent/}.
18238
18239 @item gnus-agent-handle-level
18240 @vindex gnus-agent-handle-level
18241 Groups on levels (@pxref{Group Levels}) higher than this variable will
18242 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18243 which means that only subscribed group will be considered by the Agent
18244 by default.
18245
18246 @item gnus-agent-plugged-hook
18247 @vindex gnus-agent-plugged-hook
18248 Hook run when connecting to the network.
18249
18250 @item gnus-agent-unplugged-hook
18251 @vindex gnus-agent-unplugged-hook
18252 Hook run when disconnecting from the network.
18253
18254 @item gnus-agent-fetched-hook
18255 @vindex gnus-agent-fetched-hook
18256 Hook run when finished fetching articles.
18257
18258 @item gnus-agent-cache
18259 @vindex gnus-agent-cache
18260 Variable to control whether use the locally stored @acronym{NOV} and
18261 articles when plugged, e.g. essentially using the Agent as a cache.
18262 The default is non-@code{nil}, which means to use the Agent as a cache.
18263
18264 @item gnus-agent-go-online
18265 @vindex gnus-agent-go-online
18266 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18267 automatically switch offline servers into online status.  If it is
18268 @code{ask}, the default, the Agent will ask if you wish to switch
18269 offline servers into online status when you re-connect.  If it has any
18270 other value, all offline servers will be automatically switched into
18271 online status.
18272
18273 @item gnus-agent-mark-unread-after-downloaded
18274 @vindex gnus-agent-mark-unread-after-downloaded
18275 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18276 mark articles as unread after downloading.  This is usually a safe
18277 thing to do as the newly downloaded article has obviously not been
18278 read.  The default is t.
18279
18280 @item gnus-agent-consider-all-articles
18281 @vindex gnus-agent-consider-all-articles
18282 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18283 agent will fetch all missing headers.  When @code{nil}, the agent will
18284 fetch only new headers.  The default is @code{nil}.
18285
18286 @item gnus-agent-max-fetch-size
18287 @vindex gnus-agent-max-fetch-size
18288 The agent fetches articles into a temporary buffer prior to parsing
18289 them into individual files.  To avoid exceeding the max. buffer size,
18290 the agent alternates between fetching and parsing until all articles
18291 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18292 limit to control how often the cycling occurs.  A large value improves
18293 performance.  A small value minimizes the time lost should the
18294 connection be lost while fetching (You may need to run
18295 @code{gnus-agent-regenerate-group} to update the group's state.
18296 However, all articles parsed prior to loosing the connection will be
18297 available while unplugged).  The default is 10M so it is unusual to
18298 see any cycling.
18299
18300 @item gnus-server-unopen-status
18301 @vindex gnus-server-unopen-status
18302 Perhaps not an Agent variable, but closely related to the Agent, this
18303 variable says what will happen if Gnus cannot open a server.  If the
18304 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18305 whether to deny the server or whether to unplug the agent.  If the
18306 Agent is disabled, Gnus always simply deny the server.  Other choices
18307 for this variable include @code{denied} and @code{offline} the latter
18308 is only valid if the Agent is used.
18309
18310 @item gnus-auto-goto-ignores
18311 @vindex gnus-auto-goto-ignores
18312 Another variable that isn't an Agent variable, yet so closely related
18313 that most will look for it here, this variable tells the summary
18314 buffer how to maneuver around undownloaded (only headers stored in the
18315 agent) and unfetched (neither article nor headers stored) articles.
18316
18317 The legal values are @code{nil} (maneuver to any article),
18318 @code{undownloaded} (maneuvering while unplugged ignores articles that
18319 have not been fetched), @code{always-undownloaded} (maneuvering always
18320 ignores articles that have not been fetched), @code{unfetched}
18321 (maneuvering ignores articles whose headers have not been fetched).
18322
18323 @end table
18324
18325
18326 @node Example Setup
18327 @subsection Example Setup
18328
18329 If you don't want to read this manual, and you have a fairly standard
18330 setup, you may be able to use something like the following as your
18331 @file{~/.gnus.el} file to get started.
18332
18333 @lisp
18334 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18335 ;;; @r{from your ISP's server.}
18336 (setq gnus-select-method '(nntp "news.your-isp.com"))
18337
18338 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18339 ;;; @r{your ISP's @acronym{POP} server.}
18340 (setq mail-sources '((pop :server "pop.your-isp.com")))
18341
18342 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18343 (setq gnus-secondary-select-methods '((nnml "")))
18344
18345 ;;; @r{Make Gnus into an offline newsreader.}
18346 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18347 ;;; (setq gnus-agent t) ; @r{Now the default.}
18348 @end lisp
18349
18350 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18351 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18352 gnus}.
18353
18354 If this is the first time you've run Gnus, you will be subscribed
18355 automatically to a few default newsgroups.  You'll probably want to
18356 subscribe to more groups, and to do that, you have to query the
18357 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18358 command.  This usually takes quite a while, but you only have to do it
18359 once.
18360
18361 After reading and parsing a while, you'll be presented with a list of
18362 groups.  Subscribe to the ones you want to read with the @kbd{u}
18363 command.  @kbd{l} to make all the killed groups disappear after you've
18364 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18365 back all the killed groups.)
18366
18367 You can now read the groups at once, or you can download the articles
18368 with the @kbd{J s} command.  And then read the rest of this manual to
18369 find out which of the other gazillion things you want to customize.
18370
18371
18372 @node Batching Agents
18373 @subsection Batching Agents
18374 @findex gnus-agent-batch
18375
18376 Having the Gnus Agent fetch articles (and post whatever messages you've
18377 written) is quite easy once you've gotten things set up properly.  The
18378 following shell script will do everything that is necessary:
18379
18380 You can run a complete batch command from the command line with the
18381 following incantation:
18382
18383 @example
18384 #!/bin/sh
18385 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18386 @end example
18387
18388
18389 @node Agent Caveats
18390 @subsection Agent Caveats
18391
18392 The Gnus Agent doesn't seem to work like most other offline
18393 newsreaders.  Here are some common questions that some imaginary people
18394 may ask:
18395
18396 @table @dfn
18397 @item If I read an article while plugged, do they get entered into the Agent?
18398
18399 @strong{No}.  If you want this behaviour, add
18400 @code{gnus-agent-fetch-selected-article} to
18401 @code{gnus-select-article-hook}.
18402
18403 @item If I read an article while plugged, and the article already exists in
18404 the Agent, will it get downloaded once more?
18405
18406 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18407
18408 @end table
18409
18410 In short, when Gnus is unplugged, it only looks into the locally stored
18411 articles; when it's plugged, it talks to your ISP and may also use the
18412 locally stored articles.
18413
18414
18415 @node Scoring
18416 @chapter Scoring
18417 @cindex scoring
18418
18419 Other people use @dfn{kill files}, but we here at Gnus Towers like
18420 scoring better than killing, so we'd rather switch than fight.  They do
18421 something completely different as well, so sit up straight and pay
18422 attention!
18423
18424 @vindex gnus-summary-mark-below
18425 All articles have a default score (@code{gnus-summary-default-score}),
18426 which is 0 by default.  This score may be raised or lowered either
18427 interactively or by score files.  Articles that have a score lower than
18428 @code{gnus-summary-mark-below} are marked as read.
18429
18430 Gnus will read any @dfn{score files} that apply to the current group
18431 before generating the summary buffer.
18432
18433 There are several commands in the summary buffer that insert score
18434 entries based on the current article.  You can, for instance, ask Gnus to
18435 lower or increase the score of all articles with a certain subject.
18436
18437 There are two sorts of scoring entries: Permanent and temporary.
18438 Temporary score entries are self-expiring entries.  Any entries that are
18439 temporary and have not been used for, say, a week, will be removed
18440 silently to help keep the sizes of the score files down.
18441
18442 @menu
18443 * Summary Score Commands::      Adding score entries for the current group.
18444 * Group Score Commands::        General score commands.
18445 * Score Variables::             Customize your scoring.  (My, what terminology).
18446 * Score File Format::           What a score file may contain.
18447 * Score File Editing::          You can edit score files by hand as well.
18448 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18449 * Home Score File::             How to say where new score entries are to go.
18450 * Followups To Yourself::       Having Gnus notice when people answer you.
18451 * Scoring On Other Headers::    Scoring on non-standard headers.
18452 * Scoring Tips::                How to score effectively.
18453 * Reverse Scoring::             That problem child of old is not problem.
18454 * Global Score Files::          Earth-spanning, ear-splitting score files.
18455 * Kill Files::                  They are still here, but they can be ignored.
18456 * Converting Kill Files::       Translating kill files to score files.
18457 * GroupLens::                   Getting predictions on what you like to read.
18458 * Advanced Scoring::            Using logical expressions to build score rules.
18459 * Score Decays::                It can be useful to let scores wither away.
18460 @end menu
18461
18462
18463 @node Summary Score Commands
18464 @section Summary Score Commands
18465 @cindex score commands
18466
18467 The score commands that alter score entries do not actually modify real
18468 score files.  That would be too inefficient.  Gnus maintains a cache of
18469 previously loaded score files, one of which is considered the
18470 @dfn{current score file alist}.  The score commands simply insert
18471 entries into this list, and upon group exit, this list is saved.
18472
18473 The current score file is by default the group's local score file, even
18474 if no such score file actually exists.  To insert score commands into
18475 some other score file (e.g. @file{all.SCORE}), you must first make this
18476 score file the current one.
18477
18478 General score commands that don't actually change the score file:
18479
18480 @table @kbd
18481
18482 @item V s
18483 @kindex V s (Summary)
18484 @findex gnus-summary-set-score
18485 Set the score of the current article (@code{gnus-summary-set-score}).
18486
18487 @item V S
18488 @kindex V S (Summary)
18489 @findex gnus-summary-current-score
18490 Display the score of the current article
18491 (@code{gnus-summary-current-score}).
18492
18493 @item V t
18494 @kindex V t (Summary)
18495 @findex gnus-score-find-trace
18496 Display all score rules that have been used on the current article
18497 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18498 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18499 When point is on a string within the match element, @kbd{e} will try to
18500 bring you to this string in the score file.
18501
18502 @item V w
18503 @kindex V w (Summary)
18504 @findex gnus-score-find-favourite-words
18505 List words used in scoring (@code{gnus-score-find-favourite-words}).
18506
18507 @item V R
18508 @kindex V R (Summary)
18509 @findex gnus-summary-rescore
18510 Run the current summary through the scoring process
18511 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18512 around with your score files behind Gnus' back and want to see the
18513 effect you're having.
18514
18515 @item V c
18516 @kindex V c (Summary)
18517 @findex gnus-score-change-score-file
18518 Make a different score file the current
18519 (@code{gnus-score-change-score-file}).
18520
18521 @item V e
18522 @kindex V e (Summary)
18523 @findex gnus-score-edit-current-scores
18524 Edit the current score file (@code{gnus-score-edit-current-scores}).
18525 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18526 File Editing}).
18527
18528 @item V f
18529 @kindex V f (Summary)
18530 @findex gnus-score-edit-file
18531 Edit a score file and make this score file the current one
18532 (@code{gnus-score-edit-file}).
18533
18534 @item V F
18535 @kindex V F (Summary)
18536 @findex gnus-score-flush-cache
18537 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18538 after editing score files.
18539
18540 @item V C
18541 @kindex V C (Summary)
18542 @findex gnus-score-customize
18543 Customize a score file in a visually pleasing manner
18544 (@code{gnus-score-customize}).
18545
18546 @end table
18547
18548 The rest of these commands modify the local score file.
18549
18550 @table @kbd
18551
18552 @item V m
18553 @kindex V m (Summary)
18554 @findex gnus-score-set-mark-below
18555 Prompt for a score, and mark all articles with a score below this as
18556 read (@code{gnus-score-set-mark-below}).
18557
18558 @item V x
18559 @kindex V x (Summary)
18560 @findex gnus-score-set-expunge-below
18561 Prompt for a score, and add a score rule to the current score file to
18562 expunge all articles below this score
18563 (@code{gnus-score-set-expunge-below}).
18564 @end table
18565
18566 The keystrokes for actually making score entries follow a very regular
18567 pattern, so there's no need to list all the commands.  (Hundreds of
18568 them.)
18569
18570 @findex gnus-summary-increase-score
18571 @findex gnus-summary-lower-score
18572
18573 @enumerate
18574 @item
18575 The first key is either @kbd{I} (upper case i) for increasing the score
18576 or @kbd{L} for lowering the score.
18577 @item
18578 The second key says what header you want to score on.  The following
18579 keys are available:
18580 @table @kbd
18581
18582 @item a
18583 Score on the author name.
18584
18585 @item s
18586 Score on the subject line.
18587
18588 @item x
18589 Score on the @code{Xref} line---i.e., the cross-posting line.
18590
18591 @item r
18592 Score on the @code{References} line.
18593
18594 @item d
18595 Score on the date.
18596
18597 @item l
18598 Score on the number of lines.
18599
18600 @item i
18601 Score on the @code{Message-ID} header.
18602
18603 @item e
18604 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18605 if your @acronym{NNTP} server tracks additional header data in overviews.
18606
18607 @item f
18608 Score on followups---this matches the author name, and adds scores to
18609 the followups to this author.  (Using this key leads to the creation of
18610 @file{ADAPT} files.)
18611
18612 @item b
18613 Score on the body.
18614
18615 @item h
18616 Score on the head.
18617
18618 @item t
18619 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18620 files.)
18621
18622 @end table
18623
18624 @item
18625 The third key is the match type.  Which match types are valid depends on
18626 what headers you are scoring on.
18627
18628 @table @code
18629
18630 @item strings
18631
18632 @table @kbd
18633
18634 @item e
18635 Exact matching.
18636
18637 @item s
18638 Substring matching.
18639
18640 @item f
18641 Fuzzy matching (@pxref{Fuzzy Matching}).
18642
18643 @item r
18644 Regexp matching
18645 @end table
18646
18647 @item date
18648 @table @kbd
18649
18650 @item b
18651 Before date.
18652
18653 @item a
18654 After date.
18655
18656 @item n
18657 This date.
18658 @end table
18659
18660 @item number
18661 @table @kbd
18662
18663 @item <
18664 Less than number.
18665
18666 @item =
18667 Equal to number.
18668
18669 @item >
18670 Greater than number.
18671 @end table
18672 @end table
18673
18674 @item
18675 The fourth and usually final key says whether this is a temporary (i.e.,
18676 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18677 or whether it is to be done immediately, without adding to the score
18678 file.
18679 @table @kbd
18680
18681 @item t
18682 Temporary score entry.
18683
18684 @item p
18685 Permanent score entry.
18686
18687 @item i
18688 Immediately scoring.
18689 @end table
18690
18691 @item
18692 If you are scoring on `e' (extra) headers, you will then be prompted for
18693 the header name on which you wish to score.  This must be a header named
18694 in gnus-extra-headers, and @samp{TAB} completion is available.
18695
18696 @end enumerate
18697
18698 So, let's say you want to increase the score on the current author with
18699 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18700 score based on the subject line, using substring matching, and make a
18701 temporary score entry: @kbd{L s s t}.  Pretty easy.
18702
18703 To make things a bit more complicated, there are shortcuts.  If you use
18704 a capital letter on either the second or third keys, Gnus will use
18705 defaults for the remaining one or two keystrokes.  The defaults are
18706 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18707 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18708
18709 These functions take both the numerical prefix and the symbolic prefix
18710 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18711 (or increase) the score of the article.  A symbolic prefix of @code{a}
18712 says to use the @file{all.SCORE} file for the command instead of the
18713 current score file.
18714
18715 @vindex gnus-score-mimic-keymap
18716 The @code{gnus-score-mimic-keymap} says whether these commands will
18717 pretend they are keymaps or not.
18718
18719
18720 @node Group Score Commands
18721 @section Group Score Commands
18722 @cindex group score commands
18723
18724 There aren't many of these as yet, I'm afraid.
18725
18726 @table @kbd
18727
18728 @item W f
18729 @kindex W f (Group)
18730 @findex gnus-score-flush-cache
18731 Gnus maintains a cache of score alists to avoid having to reload them
18732 all the time.  This command will flush the cache
18733 (@code{gnus-score-flush-cache}).
18734
18735 @end table
18736
18737 You can do scoring from the command line by saying something like:
18738
18739 @findex gnus-batch-score
18740 @cindex batch scoring
18741 @example
18742 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18743 @end example
18744
18745
18746 @node Score Variables
18747 @section Score Variables
18748 @cindex score variables
18749
18750 @table @code
18751
18752 @item gnus-use-scoring
18753 @vindex gnus-use-scoring
18754 If @code{nil}, Gnus will not check for score files, and will not, in
18755 general, do any score-related work.  This is @code{t} by default.
18756
18757 @item gnus-kill-killed
18758 @vindex gnus-kill-killed
18759 If this variable is @code{nil}, Gnus will never apply score files to
18760 articles that have already been through the kill process.  While this
18761 may save you lots of time, it also means that if you apply a kill file
18762 to a group, and then change the kill file and want to run it over you
18763 group again to kill more articles, it won't work.  You have to set this
18764 variable to @code{t} to do that.  (It is @code{t} by default.)
18765
18766 @item gnus-kill-files-directory
18767 @vindex gnus-kill-files-directory
18768 All kill and score files will be stored in this directory, which is
18769 initialized from the @env{SAVEDIR} environment variable by default.
18770 This is @file{~/News/} by default.
18771
18772 @item gnus-score-file-suffix
18773 @vindex gnus-score-file-suffix
18774 Suffix to add to the group name to arrive at the score file name
18775 (@file{SCORE} by default.)
18776
18777 @item gnus-score-uncacheable-files
18778 @vindex gnus-score-uncacheable-files
18779 @cindex score cache
18780 All score files are normally cached to avoid excessive re-loading of
18781 score files.  However, if this might make your Emacs grow big and
18782 bloated, so this regexp can be used to weed out score files unlikely
18783 to be needed again.  It would be a bad idea to deny caching of
18784 @file{all.SCORE}, while it might be a good idea to not cache
18785 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18786 variable is @samp{ADAPT$} by default, so no adaptive score files will
18787 be cached.
18788
18789 @item gnus-save-score
18790 @vindex gnus-save-score
18791 If you have really complicated score files, and do lots of batch
18792 scoring, then you might set this variable to @code{t}.  This will make
18793 Gnus save the scores into the @file{.newsrc.eld} file.
18794
18795 If you do not set this to @code{t}, then manual scores (like those set
18796 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18797 across group visits.
18798
18799 @item gnus-score-interactive-default-score
18800 @vindex gnus-score-interactive-default-score
18801 Score used by all the interactive raise/lower commands to raise/lower
18802 score with.  Default is 1000, which may seem excessive, but this is to
18803 ensure that the adaptive scoring scheme gets enough room to play with.
18804 We don't want the small changes from the adaptive scoring to overwrite
18805 manually entered data.
18806
18807 @item gnus-summary-default-score
18808 @vindex gnus-summary-default-score
18809 Default score of an article, which is 0 by default.
18810
18811 @item gnus-summary-expunge-below
18812 @vindex gnus-summary-expunge-below
18813 Don't display the summary lines of articles that have scores lower than
18814 this variable.  This is @code{nil} by default, which means that no
18815 articles will be hidden.  This variable is local to the summary buffers,
18816 and has to be set from @code{gnus-summary-mode-hook}.
18817
18818 @item gnus-score-over-mark
18819 @vindex gnus-score-over-mark
18820 Mark (in the third column) used for articles with a score over the
18821 default.  Default is @samp{+}.
18822
18823 @item gnus-score-below-mark
18824 @vindex gnus-score-below-mark
18825 Mark (in the third column) used for articles with a score below the
18826 default.  Default is @samp{-}.
18827
18828 @item gnus-score-find-score-files-function
18829 @vindex gnus-score-find-score-files-function
18830 Function used to find score files for the current group.  This function
18831 is called with the name of the group as the argument.
18832
18833 Predefined functions available are:
18834 @table @code
18835
18836 @item gnus-score-find-single
18837 @findex gnus-score-find-single
18838 Only apply the group's own score file.
18839
18840 @item gnus-score-find-bnews
18841 @findex gnus-score-find-bnews
18842 Apply all score files that match, using bnews syntax.  This is the
18843 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18844 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18845 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18846 @samp{all} in the score file names are translated into @samp{.*}, and
18847 then a regexp match is done.
18848
18849 This means that if you have some score entries that you want to apply to
18850 all groups, then you put those entries in the @file{all.SCORE} file.
18851
18852 The score files are applied in a semi-random order, although Gnus will
18853 try to apply the more general score files before the more specific score
18854 files.  It does this by looking at the number of elements in the score
18855 file names---discarding the @samp{all} elements.
18856
18857 @item gnus-score-find-hierarchical
18858 @findex gnus-score-find-hierarchical
18859 Apply all score files from all the parent groups.  This means that you
18860 can't have score files like @file{all.SCORE}, but you can have
18861 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18862 server.
18863
18864 @end table
18865 This variable can also be a list of functions.  In that case, all
18866 these functions will be called with the group name as argument, and
18867 all the returned lists of score files will be applied.  These
18868 functions can also return lists of lists of score alists directly.  In
18869 that case, the functions that return these non-file score alists
18870 should probably be placed before the ``real'' score file functions, to
18871 ensure that the last score file returned is the local score file.
18872 Phu.
18873
18874 For example, to do hierarchical scoring but use a non-server-specific
18875 overall score file, you could use the value
18876 @example
18877 (list (lambda (group) ("all.SCORE"))
18878       'gnus-score-find-hierarchical)
18879 @end example
18880
18881 @item gnus-score-expiry-days
18882 @vindex gnus-score-expiry-days
18883 This variable says how many days should pass before an unused score file
18884 entry is expired.  If this variable is @code{nil}, no score file entries
18885 are expired.  It's 7 by default.
18886
18887 @item gnus-update-score-entry-dates
18888 @vindex gnus-update-score-entry-dates
18889 If this variable is non-@code{nil}, temporary score entries that have
18890 been triggered (matched) will have their dates updated.  (This is how Gnus
18891 controls expiry---all non-matched-entries will become too old while
18892 matched entries will stay fresh and young.)  However, if you set this
18893 variable to @code{nil}, even matched entries will grow old and will
18894 have to face that oh-so grim reaper.
18895
18896 @item gnus-score-after-write-file-function
18897 @vindex gnus-score-after-write-file-function
18898 Function called with the name of the score file just written.
18899
18900 @item gnus-score-thread-simplify
18901 @vindex gnus-score-thread-simplify
18902 If this variable is non-@code{nil}, article subjects will be
18903 simplified for subject scoring purposes in the same manner as with
18904 threading---according to the current value of
18905 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18906 @code{substring} or @code{exact} matching, the match will also be
18907 simplified in this manner.
18908
18909 @end table
18910
18911
18912 @node Score File Format
18913 @section Score File Format
18914 @cindex score file format
18915
18916 A score file is an @code{emacs-lisp} file that normally contains just a
18917 single form.  Casual users are not expected to edit these files;
18918 everything can be changed from the summary buffer.
18919
18920 Anyway, if you'd like to dig into it yourself, here's an example:
18921
18922 @lisp
18923 (("from"
18924   ("Lars Ingebrigtsen" -10000)
18925   ("Per Abrahamsen")
18926   ("larsi\\|lmi" -50000 nil R))
18927  ("subject"
18928   ("Ding is Badd" nil 728373))
18929  ("xref"
18930   ("alt.politics" -1000 728372 s))
18931  ("lines"
18932   (2 -100 nil <))
18933  (mark 0)
18934  (expunge -1000)
18935  (mark-and-expunge -10)
18936  (read-only nil)
18937  (orphan -10)
18938  (adapt t)
18939  (files "/hom/larsi/News/gnu.SCORE")
18940  (exclude-files "all.SCORE")
18941  (local (gnus-newsgroup-auto-expire t)
18942         (gnus-summary-make-false-root empty))
18943  (eval (ding)))
18944 @end lisp
18945
18946 This example demonstrates most score file elements.  @xref{Advanced
18947 Scoring}, for a different approach.
18948
18949 Even though this looks much like Lisp code, nothing here is actually
18950 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18951 has to be valid syntactically, if not semantically.
18952
18953 Six keys are supported by this alist:
18954
18955 @table @code
18956
18957 @item STRING
18958 If the key is a string, it is the name of the header to perform the
18959 match on.  Scoring can only be performed on these eight headers:
18960 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18961 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18962 these headers, there are three strings to tell Gnus to fetch the entire
18963 article and do the match on larger parts of the article: @code{Body}
18964 will perform the match on the body of the article, @code{Head} will
18965 perform the match on the head of the article, and @code{All} will
18966 perform the match on the entire article.  Note that using any of these
18967 last three keys will slow down group entry @emph{considerably}.  The
18968 final ``header'' you can score on is @code{Followup}.  These score
18969 entries will result in new score entries being added for all follow-ups
18970 to articles that matches these score entries.
18971
18972 Following this key is an arbitrary number of score entries, where each
18973 score entry has one to four elements.
18974 @enumerate
18975
18976 @item
18977 The first element is the @dfn{match element}.  On most headers this will
18978 be a string, but on the Lines and Chars headers, this must be an
18979 integer.
18980
18981 @item
18982 If the second element is present, it should be a number---the @dfn{score
18983 element}.  This number should be an integer in the neginf to posinf
18984 interval.  This number is added to the score of the article if the match
18985 is successful.  If this element is not present, the
18986 @code{gnus-score-interactive-default-score} number will be used
18987 instead.  This is 1000 by default.
18988
18989 @item
18990 If the third element is present, it should be a number---the @dfn{date
18991 element}.  This date says when the last time this score entry matched,
18992 which provides a mechanism for expiring the score entries.  It this
18993 element is not present, the score entry is permanent.  The date is
18994 represented by the number of days since December 31, 1 BCE.
18995
18996 @item
18997 If the fourth element is present, it should be a symbol---the @dfn{type
18998 element}.  This element specifies what function should be used to see
18999 whether this score entry matches the article.  What match types that can
19000 be used depends on what header you wish to perform the match on.
19001 @table @dfn
19002
19003 @item From, Subject, References, Xref, Message-ID
19004 For most header types, there are the @code{r} and @code{R} (regexp), as
19005 well as @code{s} and @code{S} (substring) types, and @code{e} and
19006 @code{E} (exact match), and @code{w} (word match) types.  If this
19007 element is not present, Gnus will assume that substring matching should
19008 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19009 that the matches will be done in a case-sensitive manner.  All these
19010 one-letter types are really just abbreviations for the @code{regexp},
19011 @code{string}, @code{exact}, and @code{word} types, which you can use
19012 instead, if you feel like.
19013
19014 @item Extra
19015 Just as for the standard string overview headers, if you are using
19016 gnus-extra-headers, you can score on these headers' values.  In this
19017 case, there is a 5th element in the score entry, being the name of the
19018 header to be scored.  The following entry is useful in your
19019 @file{all.SCORE} file in case of spam attacks from a single origin host,
19020 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
19021
19022 @lisp
19023 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
19024 @end lisp
19025
19026 @item Lines, Chars
19027 These two headers use different match types: @code{<}, @code{>},
19028 @code{=}, @code{>=} and @code{<=}.
19029
19030 These predicates are true if
19031
19032 @example
19033 (PREDICATE HEADER MATCH)
19034 @end example
19035
19036 evaluates to non-@code{nil}.  For instance, the advanced match
19037 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19038 following form:
19039
19040 @lisp
19041 (< header-value 4)
19042 @end lisp
19043
19044 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19045 the match, we get the score added if the article has less than 4 lines.
19046 (It's easy to get confused and think it's the other way around.  But
19047 it's not.  I think.)
19048
19049 When matching on @code{Lines}, be careful because some back ends (like
19050 @code{nndir}) do not generate @code{Lines} header, so every article ends
19051 up being marked as having 0 lines.  This can lead to strange results if
19052 you happen to lower score of the articles with few lines.
19053
19054 @item Date
19055 For the Date header we have three kinda silly match types:
19056 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19057 ever being useful, but, like, it would feel kinda silly not to provide
19058 this function.  Just in case.  You never know.  Better safe than sorry.
19059 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19060 sex on a first date.  (I have been told that at least one person, and I
19061 quote, ``found this function indispensable'', however.)
19062
19063 @cindex ISO8601
19064 @cindex date
19065 A more useful match type is @code{regexp}.  With it, you can match the
19066 date string using a regular expression.  The date is normalized to
19067 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19068 you want to match all articles that have been posted on April 1st in
19069 every year, you could use @samp{....0401.........} as a match string,
19070 for instance.  (Note that the date is kept in its original time zone, so
19071 this will match articles that were posted when it was April 1st where
19072 the article was posted from.  Time zones are such wholesome fun for the
19073 whole family, eh?)
19074
19075 @item Head, Body, All
19076 These three match keys use the same match types as the @code{From} (etc)
19077 header uses.
19078
19079 @item Followup
19080 This match key is somewhat special, in that it will match the
19081 @code{From} header, and affect the score of not only the matching
19082 articles, but also all followups to the matching articles.  This allows
19083 you e.g. increase the score of followups to your own articles, or
19084 decrease the score of followups to the articles of some known
19085 trouble-maker.  Uses the same match types as the @code{From} header
19086 uses.  (Using this match key will lead to creation of @file{ADAPT}
19087 files.)
19088
19089 @item Thread
19090 This match key works along the same lines as the @code{Followup} match
19091 key.  If you say that you want to score on a (sub-)thread started by an
19092 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19093 match.  This will add a new @samp{thread} match for each article that
19094 has @var{x} in its @code{References} header.  (These new @samp{thread}
19095 matches will use the @code{Message-ID}s of these matching articles.)
19096 This will ensure that you can raise/lower the score of an entire thread,
19097 even though some articles in the thread may not have complete
19098 @code{References} headers.  Note that using this may lead to
19099 undeterministic scores of the articles in the thread.  (Using this match
19100 key will lead to creation of @file{ADAPT} files.)
19101 @end table
19102 @end enumerate
19103
19104 @cindex score file atoms
19105 @item mark
19106 The value of this entry should be a number.  Any articles with a score
19107 lower than this number will be marked as read.
19108
19109 @item expunge
19110 The value of this entry should be a number.  Any articles with a score
19111 lower than this number will be removed from the summary buffer.
19112
19113 @item mark-and-expunge
19114 The value of this entry should be a number.  Any articles with a score
19115 lower than this number will be marked as read and removed from the
19116 summary buffer.
19117
19118 @item thread-mark-and-expunge
19119 The value of this entry should be a number.  All articles that belong to
19120 a thread that has a total score below this number will be marked as read
19121 and removed from the summary buffer.  @code{gnus-thread-score-function}
19122 says how to compute the total score for a thread.
19123
19124 @item files
19125 The value of this entry should be any number of file names.  These files
19126 are assumed to be score files as well, and will be loaded the same way
19127 this one was.
19128
19129 @item exclude-files
19130 The clue of this entry should be any number of files.  These files will
19131 not be loaded, even though they would normally be so, for some reason or
19132 other.
19133
19134 @item eval
19135 The value of this entry will be @code{eval}el.  This element will be
19136 ignored when handling global score files.
19137
19138 @item read-only
19139 Read-only score files will not be updated or saved.  Global score files
19140 should feature this atom (@pxref{Global Score Files}).  (Note:
19141 @dfn{Global} here really means @dfn{global}; not your personal
19142 apply-to-all-groups score files.)
19143
19144 @item orphan
19145 The value of this entry should be a number.  Articles that do not have
19146 parents will get this number added to their scores.  Imagine you follow
19147 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19148 will only follow a few of the threads, also want to see any new threads.
19149
19150 You can do this with the following two score file entries:
19151
19152 @example
19153         (orphan -500)
19154         (mark-and-expunge -100)
19155 @end example
19156
19157 When you enter the group the first time, you will only see the new
19158 threads.  You then raise the score of the threads that you find
19159 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19160 rest.  Next time you enter the group, you will see new articles in the
19161 interesting threads, plus any new threads.
19162
19163 I.e.---the orphan score atom is for high-volume groups where a few
19164 interesting threads which can't be found automatically by ordinary
19165 scoring rules exist.
19166
19167 @item adapt
19168 This entry controls the adaptive scoring.  If it is @code{t}, the
19169 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19170 adaptive scoring will be performed on this group.  If it is a list, this
19171 list will be used as the adaptive scoring rules.  If it isn't present,
19172 or is something other than @code{t} or @code{ignore}, the default
19173 adaptive scoring rules will be used.  If you want to use adaptive
19174 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19175 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19176 not want adaptive scoring.  If you only want adaptive scoring in a few
19177 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19178 insert @code{(adapt t)} in the score files of the groups where you want
19179 it.
19180
19181 @item adapt-file
19182 All adaptive score entries will go to the file named by this entry.  It
19183 will also be applied when entering the group.  This atom might be handy
19184 if you want to adapt on several groups at once, using the same adaptive
19185 file for a number of groups.
19186
19187 @item local
19188 @cindex local variables
19189 The value of this entry should be a list of @code{(@var{var}
19190 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19191 current summary buffer, and set to the value specified.  This is a
19192 convenient, if somewhat strange, way of setting variables in some
19193 groups if you don't like hooks much.  Note that the @var{value} won't
19194 be evaluated.
19195 @end table
19196
19197
19198 @node Score File Editing
19199 @section Score File Editing
19200
19201 You normally enter all scoring commands from the summary buffer, but you
19202 might feel the urge to edit them by hand as well, so we've supplied you
19203 with a mode for that.
19204
19205 It's simply a slightly customized @code{emacs-lisp} mode, with these
19206 additional commands:
19207
19208 @table @kbd
19209
19210 @item C-c C-c
19211 @kindex C-c C-c (Score)
19212 @findex gnus-score-edit-done
19213 Save the changes you have made and return to the summary buffer
19214 (@code{gnus-score-edit-done}).
19215
19216 @item C-c C-d
19217 @kindex C-c C-d (Score)
19218 @findex gnus-score-edit-insert-date
19219 Insert the current date in numerical format
19220 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19221 you were wondering.
19222
19223 @item C-c C-p
19224 @kindex C-c C-p (Score)
19225 @findex gnus-score-pretty-print
19226 The adaptive score files are saved in an unformatted fashion.  If you
19227 intend to read one of these files, you want to @dfn{pretty print} it
19228 first.  This command (@code{gnus-score-pretty-print}) does that for
19229 you.
19230
19231 @end table
19232
19233 Type @kbd{M-x gnus-score-mode} to use this mode.
19234
19235 @vindex gnus-score-mode-hook
19236 @code{gnus-score-menu-hook} is run in score mode buffers.
19237
19238 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19239 e} to begin editing score files.
19240
19241
19242 @node Adaptive Scoring
19243 @section Adaptive Scoring
19244 @cindex adaptive scoring
19245
19246 If all this scoring is getting you down, Gnus has a way of making it all
19247 happen automatically---as if by magic.  Or rather, as if by artificial
19248 stupidity, to be precise.
19249
19250 @vindex gnus-use-adaptive-scoring
19251 When you read an article, or mark an article as read, or kill an
19252 article, you leave marks behind.  On exit from the group, Gnus can sniff
19253 these marks and add score elements depending on what marks it finds.
19254 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19255 @code{t} or @code{(line)}.  If you want score adaptively on separate
19256 words appearing in the subjects, you should set this variable to
19257 @code{(word)}.  If you want to use both adaptive methods, set this
19258 variable to @code{(word line)}.
19259
19260 @vindex gnus-default-adaptive-score-alist
19261 To give you complete control over the scoring process, you can customize
19262 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19263 might look something like this:
19264
19265 @lisp
19266 (setq gnus-default-adaptive-score-alist
19267   '((gnus-unread-mark)
19268     (gnus-ticked-mark (from 4))
19269     (gnus-dormant-mark (from 5))
19270     (gnus-del-mark (from -4) (subject -1))
19271     (gnus-read-mark (from 4) (subject 2))
19272     (gnus-expirable-mark (from -1) (subject -1))
19273     (gnus-killed-mark (from -1) (subject -3))
19274     (gnus-kill-file-mark)
19275     (gnus-ancient-mark)
19276     (gnus-low-score-mark)
19277     (gnus-catchup-mark (from -1) (subject -1))))
19278 @end lisp
19279
19280 As you see, each element in this alist has a mark as a key (either a
19281 variable name or a ``real'' mark---a character).  Following this key is
19282 a arbitrary number of header/score pairs.  If there are no header/score
19283 pairs following the key, no adaptive scoring will be done on articles
19284 that have that key as the article mark.  For instance, articles with
19285 @code{gnus-unread-mark} in the example above will not get adaptive score
19286 entries.
19287
19288 Each article can have only one mark, so just a single of these rules
19289 will be applied to each article.
19290
19291 To take @code{gnus-del-mark} as an example---this alist says that all
19292 articles that have that mark (i.e., are marked with @samp{e}) will have a
19293 score entry added to lower based on the @code{From} header by -4, and
19294 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19295
19296 If you have marked 10 articles with the same subject with
19297 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19298 That means that that subject will get a score of ten times -1, which
19299 should be, unless I'm much mistaken, -10.
19300
19301 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19302 the read articles will be marked with the @samp{E} mark.  This'll
19303 probably make adaptive scoring slightly impossible, so auto-expiring and
19304 adaptive scoring doesn't really mix very well.
19305
19306 The headers you can score on are @code{from}, @code{subject},
19307 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19308 @code{chars} and @code{date}.  In addition, you can score on
19309 @code{followup}, which will create an adaptive score entry that matches
19310 on the @code{References} header using the @code{Message-ID} of the
19311 current article, thereby matching the following thread.
19312
19313 If you use this scheme, you should set the score file atom @code{mark}
19314 to something small---like -300, perhaps, to avoid having small random
19315 changes result in articles getting marked as read.
19316
19317 After using adaptive scoring for a week or so, Gnus should start to
19318 become properly trained and enhance the authors you like best, and kill
19319 the authors you like least, without you having to say so explicitly.
19320
19321 You can control what groups the adaptive scoring is to be performed on
19322 by using the score files (@pxref{Score File Format}).  This will also
19323 let you use different rules in different groups.
19324
19325 @vindex gnus-adaptive-file-suffix
19326 The adaptive score entries will be put into a file where the name is the
19327 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19328 is @file{ADAPT}.
19329
19330 @vindex gnus-score-exact-adapt-limit
19331 When doing adaptive scoring, substring or fuzzy matching would probably
19332 give you the best results in most cases.  However, if the header one
19333 matches is short, the possibility for false positives is great, so if
19334 the length of the match is less than
19335 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19336 this variable is @code{nil}, exact matching will always be used to avoid
19337 this problem.
19338
19339 @vindex gnus-default-adaptive-word-score-alist
19340 As mentioned above, you can adapt either on individual words or entire
19341 headers.  If you adapt on words, the
19342 @code{gnus-default-adaptive-word-score-alist} variable says what score
19343 each instance of a word should add given a mark.
19344
19345 @lisp
19346 (setq gnus-default-adaptive-word-score-alist
19347       `((,gnus-read-mark . 30)
19348         (,gnus-catchup-mark . -10)
19349         (,gnus-killed-mark . -20)
19350         (,gnus-del-mark . -15)))
19351 @end lisp
19352
19353 This is the default value.  If you have adaption on words enabled, every
19354 word that appears in subjects of articles marked with
19355 @code{gnus-read-mark} will result in a score rule that increase the
19356 score with 30 points.
19357
19358 @vindex gnus-default-ignored-adaptive-words
19359 @vindex gnus-ignored-adaptive-words
19360 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19361 will be ignored.  If you wish to add more words to be ignored, use the
19362 @code{gnus-ignored-adaptive-words} list instead.
19363
19364 @vindex gnus-adaptive-word-length-limit
19365 Some may feel that short words shouldn't count when doing adaptive
19366 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19367 an integer.  Words shorter than this number will be ignored.  This
19368 variable defaults to @code{nil}.
19369
19370 @vindex gnus-adaptive-word-syntax-table
19371 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19372 syntax table in effect.  It is similar to the standard syntax table, but
19373 it considers numbers to be non-word-constituent characters.
19374
19375 @vindex gnus-adaptive-word-minimum
19376 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19377 word scoring process will never bring down the score of an article to
19378 below this number.  The default is @code{nil}.
19379
19380 @vindex gnus-adaptive-word-no-group-words
19381 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19382 won't adaptively word score any of the words in the group name.  Useful
19383 for groups like @samp{comp.editors.emacs}, where most of the subject
19384 lines contain the word @samp{emacs}.
19385
19386 After using this scheme for a while, it might be nice to write a
19387 @code{gnus-psychoanalyze-user} command to go through the rules and see
19388 what words you like and what words you don't like.  Or perhaps not.
19389
19390 Note that the adaptive word scoring thing is highly experimental and is
19391 likely to change in the future.  Initial impressions seem to indicate
19392 that it's totally useless as it stands.  Some more work (involving more
19393 rigorous statistical methods) will have to be done to make this useful.
19394
19395
19396 @node Home Score File
19397 @section Home Score File
19398
19399 The score file where new score file entries will go is called the
19400 @dfn{home score file}.  This is normally (and by default) the score file
19401 for the group itself.  For instance, the home score file for
19402 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19403
19404 However, this may not be what you want.  It is often convenient to share
19405 a common home score file among many groups---all @samp{emacs} groups
19406 could perhaps use the same home score file.
19407
19408 @vindex gnus-home-score-file
19409 The variable that controls this is @code{gnus-home-score-file}.  It can
19410 be:
19411
19412 @enumerate
19413 @item
19414 A string.  Then this file will be used as the home score file for all
19415 groups.
19416
19417 @item
19418 A function.  The result of this function will be used as the home score
19419 file.  The function will be called with the name of the group as the
19420 parameter.
19421
19422 @item
19423 A list.  The elements in this list can be:
19424
19425 @enumerate
19426 @item
19427 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19428 group name, the @var{file-name} will be used as the home score file.
19429
19430 @item
19431 A function.  If the function returns non-@code{nil}, the result will
19432 be used as the home score file.
19433
19434 @item
19435 A string.  Use the string as the home score file.
19436 @end enumerate
19437
19438 The list will be traversed from the beginning towards the end looking
19439 for matches.
19440
19441 @end enumerate
19442
19443 So, if you want to use just a single score file, you could say:
19444
19445 @lisp
19446 (setq gnus-home-score-file
19447       "my-total-score-file.SCORE")
19448 @end lisp
19449
19450 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19451 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19452
19453 @findex gnus-hierarchial-home-score-file
19454 @lisp
19455 (setq gnus-home-score-file
19456       'gnus-hierarchial-home-score-file)
19457 @end lisp
19458
19459 This is a ready-made function provided for your convenience.
19460 Other functions include
19461
19462 @table @code
19463 @item gnus-current-home-score-file
19464 @findex gnus-current-home-score-file
19465 Return the ``current'' regular score file.  This will make scoring
19466 commands add entry to the ``innermost'' matching score file.
19467
19468 @end table
19469
19470 If you want to have one score file for the @samp{emacs} groups and
19471 another for the @samp{comp} groups, while letting all other groups use
19472 their own home score files:
19473
19474 @lisp
19475 (setq gnus-home-score-file
19476       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19477       '(("\\.emacs" "emacs.SCORE")
19478         ;; @r{All the comp groups in one score file}
19479         ("^comp" "comp.SCORE")))
19480 @end lisp
19481
19482 @vindex gnus-home-adapt-file
19483 @code{gnus-home-adapt-file} works exactly the same way as
19484 @code{gnus-home-score-file}, but says what the home adaptive score file
19485 is instead.  All new adaptive file entries will go into the file
19486 specified by this variable, and the same syntax is allowed.
19487
19488 In addition to using @code{gnus-home-score-file} and
19489 @code{gnus-home-adapt-file}, you can also use group parameters
19490 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19491 Parameters}) to achieve much the same.  Group and topic parameters take
19492 precedence over this variable.
19493
19494
19495 @node Followups To Yourself
19496 @section Followups To Yourself
19497
19498 Gnus offers two commands for picking out the @code{Message-ID} header in
19499 the current buffer.  Gnus will then add a score rule that scores using
19500 this @code{Message-ID} on the @code{References} header of other
19501 articles.  This will, in effect, increase the score of all articles that
19502 respond to the article in the current buffer.  Quite useful if you want
19503 to easily note when people answer what you've said.
19504
19505 @table @code
19506
19507 @item gnus-score-followup-article
19508 @findex gnus-score-followup-article
19509 This will add a score to articles that directly follow up your own
19510 article.
19511
19512 @item gnus-score-followup-thread
19513 @findex gnus-score-followup-thread
19514 This will add a score to all articles that appear in a thread ``below''
19515 your own article.
19516 @end table
19517
19518 @vindex message-sent-hook
19519 These two functions are both primarily meant to be used in hooks like
19520 @code{message-sent-hook}, like this:
19521 @lisp
19522 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19523 @end lisp
19524
19525
19526 If you look closely at your own @code{Message-ID}, you'll notice that
19527 the first two or three characters are always the same.  Here's two of
19528 mine:
19529
19530 @example
19531 <x6u3u47icf.fsf@@eyesore.no>
19532 <x6sp9o7ibw.fsf@@eyesore.no>
19533 @end example
19534
19535 So ``my'' ident on this machine is @samp{x6}.  This can be
19536 exploited---the following rule will raise the score on all followups to
19537 myself:
19538
19539 @lisp
19540 ("references"
19541  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19542   1000 nil r))
19543 @end lisp
19544
19545 Whether it's the first two or first three characters that are ``yours''
19546 is system-dependent.
19547
19548
19549 @node Scoring On Other Headers
19550 @section Scoring On Other Headers
19551 @cindex scoring on other headers
19552
19553 Gnus is quite fast when scoring the ``traditional''
19554 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19555 other headers requires writing a @code{head} scoring rule, which means
19556 that Gnus has to request every single article from the back end to find
19557 matches.  This takes a long time in big groups.
19558
19559 Now, there's not much you can do about this for news groups, but for
19560 mail groups, you have greater control.  In @ref{To From Newsgroups},
19561 it's explained in greater detail what this mechanism does, but here's
19562 a cookbook example for @code{nnml} on how to allow scoring on the
19563 @samp{To} and @samp{Cc} headers.
19564
19565 Put the following in your @file{~/.gnus.el} file.
19566
19567 @lisp
19568 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19569       nnmail-extra-headers gnus-extra-headers)
19570 @end lisp
19571
19572 Restart Gnus and rebuild your @code{nnml} overview files with the
19573 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19574 time if you have much mail.
19575
19576 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19577 so: @kbd{I e s p To RET <your name> RET}.
19578
19579 See?  Simple.
19580
19581
19582 @node Scoring Tips
19583 @section Scoring Tips
19584 @cindex scoring tips
19585
19586 @table @dfn
19587
19588 @item Crossposts
19589 @cindex crossposts
19590 @cindex scoring crossposts
19591 If you want to lower the score of crossposts, the line to match on is
19592 the @code{Xref} header.
19593 @lisp
19594 ("xref" (" talk.politics.misc:" -1000))
19595 @end lisp
19596
19597 @item Multiple crossposts
19598 If you want to lower the score of articles that have been crossposted to
19599 more than, say, 3 groups:
19600 @lisp
19601 ("xref"
19602   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19603    -1000 nil r))
19604 @end lisp
19605
19606 @item Matching on the body
19607 This is generally not a very good idea---it takes a very long time.
19608 Gnus actually has to fetch each individual article from the server.  But
19609 you might want to anyway, I guess.  Even though there are three match
19610 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19611 and stick with it in each score file.  If you use any two, each article
19612 will be fetched @emph{twice}.  If you want to match a bit on the
19613 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19614 the matches.
19615
19616 @item Marking as read
19617 You will probably want to mark articles that have scores below a certain
19618 number as read.  This is most easily achieved by putting the following
19619 in your @file{all.SCORE} file:
19620 @lisp
19621 ((mark -100))
19622 @end lisp
19623 You may also consider doing something similar with @code{expunge}.
19624
19625 @item Negated character classes
19626 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19627 That will match newlines, which might lead to, well, The Unknown.  Say
19628 @code{[^abcd\n]*} instead.
19629 @end table
19630
19631
19632 @node Reverse Scoring
19633 @section Reverse Scoring
19634 @cindex reverse scoring
19635
19636 If you want to keep just articles that have @samp{Sex with Emacs} in the
19637 subject header, and expunge all other articles, you could put something
19638 like this in your score file:
19639
19640 @lisp
19641 (("subject"
19642   ("Sex with Emacs" 2))
19643  (mark 1)
19644  (expunge 1))
19645 @end lisp
19646
19647 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19648 rest as read, and expunge them to boot.
19649
19650
19651 @node Global Score Files
19652 @section Global Score Files
19653 @cindex global score files
19654
19655 Sure, other newsreaders have ``global kill files''.  These are usually
19656 nothing more than a single kill file that applies to all groups, stored
19657 in the user's home directory.  Bah!  Puny, weak newsreaders!
19658
19659 What I'm talking about here are Global Score Files.  Score files from
19660 all over the world, from users everywhere, uniting all nations in one
19661 big, happy score file union!  Ange-score!  New and untested!
19662
19663 @vindex gnus-global-score-files
19664 All you have to do to use other people's score files is to set the
19665 @code{gnus-global-score-files} variable.  One entry for each score file,
19666 or each score file directory.  Gnus will decide by itself what score
19667 files are applicable to which group.
19668
19669 To use the score file
19670 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19671 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19672 say this:
19673
19674 @lisp
19675 (setq gnus-global-score-files
19676       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19677         "/ftp@@ftp.some-where:/pub/score/"))
19678 @end lisp
19679
19680 @findex gnus-score-search-global-directories
19681 @noindent
19682 Simple, eh?  Directory names must end with a @samp{/}.  These
19683 directories are typically scanned only once during each Gnus session.
19684 If you feel the need to manually re-scan the remote directories, you can
19685 use the @code{gnus-score-search-global-directories} command.
19686
19687 Note that, at present, using this option will slow down group entry
19688 somewhat.  (That is---a lot.)
19689
19690 If you want to start maintaining score files for other people to use,
19691 just put your score file up for anonymous ftp and announce it to the
19692 world.  Become a retro-moderator!  Participate in the retro-moderator
19693 wars sure to ensue, where retro-moderators battle it out for the
19694 sympathy of the people, luring them to use their score files on false
19695 premises!  Yay!  The net is saved!
19696
19697 Here are some tips for the would-be retro-moderator, off the top of my
19698 head:
19699
19700 @itemize @bullet
19701
19702 @item
19703 Articles heavily crossposted are probably junk.
19704 @item
19705 To lower a single inappropriate article, lower by @code{Message-ID}.
19706 @item
19707 Particularly brilliant authors can be raised on a permanent basis.
19708 @item
19709 Authors that repeatedly post off-charter for the group can safely be
19710 lowered out of existence.
19711 @item
19712 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19713 articles completely.
19714
19715 @item
19716 Use expiring score entries to keep the size of the file down.  You
19717 should probably have a long expiry period, though, as some sites keep
19718 old articles for a long time.
19719 @end itemize
19720
19721 @dots{} I wonder whether other newsreaders will support global score files
19722 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19723 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19724 holding our breath yet?
19725
19726
19727 @node Kill Files
19728 @section Kill Files
19729 @cindex kill files
19730
19731 Gnus still supports those pesky old kill files.  In fact, the kill file
19732 entries can now be expiring, which is something I wrote before Daniel
19733 Quinlan thought of doing score files, so I've left the code in there.
19734
19735 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19736 than score processing, so it might be a good idea to rewrite your kill
19737 files into score files.
19738
19739 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19740 forms into this file, which means that you can use kill files as some
19741 sort of primitive hook function to be run on group entry, even though
19742 that isn't a very good idea.
19743
19744 Normal kill files look like this:
19745
19746 @lisp
19747 (gnus-kill "From" "Lars Ingebrigtsen")
19748 (gnus-kill "Subject" "ding")
19749 (gnus-expunge "X")
19750 @end lisp
19751
19752 This will mark every article written by me as read, and remove the
19753 marked articles from the summary buffer.  Very useful, you'll agree.
19754
19755 Other programs use a totally different kill file syntax.  If Gnus
19756 encounters what looks like a @code{rn} kill file, it will take a stab at
19757 interpreting it.
19758
19759 Two summary functions for editing a @sc{gnus} kill file:
19760
19761 @table @kbd
19762
19763 @item M-k
19764 @kindex M-k (Summary)
19765 @findex gnus-summary-edit-local-kill
19766 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19767
19768 @item M-K
19769 @kindex M-K (Summary)
19770 @findex gnus-summary-edit-global-kill
19771 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19772 @end table
19773
19774 Two group mode functions for editing the kill files:
19775
19776 @table @kbd
19777
19778 @item M-k
19779 @kindex M-k (Group)
19780 @findex gnus-group-edit-local-kill
19781 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19782
19783 @item M-K
19784 @kindex M-K (Group)
19785 @findex gnus-group-edit-global-kill
19786 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19787 @end table
19788
19789 Kill file variables:
19790
19791 @table @code
19792 @item gnus-kill-file-name
19793 @vindex gnus-kill-file-name
19794 A kill file for the group @samp{soc.motss} is normally called
19795 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19796 this file name is detailed by the @code{gnus-kill-file-name} variable.
19797 The ``global'' kill file (not in the score file sense of ``global'', of
19798 course) is just called @file{KILL}.
19799
19800 @vindex gnus-kill-save-kill-file
19801 @item gnus-kill-save-kill-file
19802 If this variable is non-@code{nil}, Gnus will save the
19803 kill file after processing, which is necessary if you use expiring
19804 kills.
19805
19806 @item gnus-apply-kill-hook
19807 @vindex gnus-apply-kill-hook
19808 @findex gnus-apply-kill-file-unless-scored
19809 @findex gnus-apply-kill-file
19810 A hook called to apply kill files to a group.  It is
19811 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19812 kill file if you have a score file for the same group, you can set this
19813 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19814 kill files to be processed, you should set this variable to @code{nil}.
19815
19816 @item gnus-kill-file-mode-hook
19817 @vindex gnus-kill-file-mode-hook
19818 A hook called in kill-file mode buffers.
19819
19820 @end table
19821
19822
19823 @node Converting Kill Files
19824 @section Converting Kill Files
19825 @cindex kill files
19826 @cindex converting kill files
19827
19828 If you have loads of old kill files, you may want to convert them into
19829 score files.  If they are ``regular'', you can use
19830 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19831 by hand.
19832
19833 The kill to score conversion package isn't included in Gnus by default.
19834 You can fetch it from
19835 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19836
19837 If your old kill files are very complex---if they contain more
19838 non-@code{gnus-kill} forms than not, you'll have to convert them by
19839 hand.  Or just let them be as they are.  Gnus will still use them as
19840 before.
19841
19842
19843 @node GroupLens
19844 @section GroupLens
19845 @cindex GroupLens
19846
19847 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19848 collaborative filtering system that helps you work together with other
19849 people to find the quality news articles out of the huge volume of
19850 news articles generated every day.
19851
19852 To accomplish this the GroupLens system combines your opinions about
19853 articles you have already read with the opinions of others who have done
19854 likewise and gives you a personalized prediction for each unread news
19855 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19856 rate articles, and finds other people that rate articles the same way.
19857 Once it has found some people you agree with it tells you, in the form
19858 of a prediction, what they thought of the article.  You can use this
19859 prediction to help you decide whether or not you want to read the
19860 article.
19861
19862 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19863 so this section is mostly of historical interest.
19864
19865 @menu
19866 * Using GroupLens::             How to make Gnus use GroupLens.
19867 * Rating Articles::             Letting GroupLens know how you rate articles.
19868 * Displaying Predictions::      Displaying predictions given by GroupLens.
19869 * GroupLens Variables::         Customizing GroupLens.
19870 @end menu
19871
19872
19873 @node Using GroupLens
19874 @subsection Using GroupLens
19875
19876 To use GroupLens you must register a pseudonym with your local
19877 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19878 Bureau (BBB)} is the only better bit in town at the moment.
19879
19880 Once you have registered you'll need to set a couple of variables.
19881
19882 @table @code
19883
19884 @item gnus-use-grouplens
19885 @vindex gnus-use-grouplens
19886 Setting this variable to a non-@code{nil} value will make Gnus hook into
19887 all the relevant GroupLens functions.
19888
19889 @item grouplens-pseudonym
19890 @vindex grouplens-pseudonym
19891 This variable should be set to the pseudonym you got when registering
19892 with the Better Bit Bureau.
19893
19894 @item grouplens-newsgroups
19895 @vindex grouplens-newsgroups
19896 A list of groups that you want to get GroupLens predictions for.
19897
19898 @end table
19899
19900 That's the minimum of what you need to get up and running with GroupLens.
19901 Once you've registered, GroupLens will start giving you scores for
19902 articles based on the average of what other people think.  But, to get
19903 the real benefit of GroupLens you need to start rating articles
19904 yourself.  Then the scores GroupLens gives you will be personalized for
19905 you, based on how the people you usually agree with have already rated.
19906
19907
19908 @node Rating Articles
19909 @subsection Rating Articles
19910
19911 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19912 Where 1 means something like this article is a waste of bandwidth and 5
19913 means that the article was really good.  The basic question to ask
19914 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19915 like this one?''
19916
19917 There are four ways to enter a rating for an article in GroupLens.
19918
19919 @table @kbd
19920
19921 @item r
19922 @kindex r (GroupLens)
19923 @findex bbb-summary-rate-article
19924 This function will prompt you for a rating on a scale of one to five.
19925
19926 @item k
19927 @kindex k (GroupLens)
19928 @findex grouplens-score-thread
19929 This function will prompt you for a rating, and rate all the articles in
19930 the thread.  This is really useful for some of those long running giant
19931 threads in rec.humor.
19932
19933 @end table
19934
19935 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19936 the score of the article you're reading.
19937
19938 @table @kbd
19939
19940 @item 1-5 n
19941 @kindex n (GroupLens)
19942 @findex grouplens-next-unread-article
19943 Rate the article and go to the next unread article.
19944
19945 @item 1-5 ,
19946 @kindex , (GroupLens)
19947 @findex grouplens-best-unread-article
19948 Rate the article and go to the next unread article with the highest score.
19949
19950 @end table
19951
19952 If you want to give the current article a score of 4 and then go to the
19953 next article, just type @kbd{4 n}.
19954
19955
19956 @node Displaying Predictions
19957 @subsection Displaying Predictions
19958
19959 GroupLens makes a prediction for you about how much you will like a
19960 news article.  The predictions from GroupLens are on a scale from 1 to
19961 5, where 1 is the worst and 5 is the best.  You can use the predictions
19962 from GroupLens in one of three ways controlled by the variable
19963 @code{gnus-grouplens-override-scoring}.
19964
19965 @vindex gnus-grouplens-override-scoring
19966 There are three ways to display predictions in grouplens.  You may
19967 choose to have the GroupLens scores contribute to, or override the
19968 regular gnus scoring mechanism.  override is the default; however, some
19969 people prefer to see the Gnus scores plus the grouplens scores.  To get
19970 the separate scoring behavior you need to set
19971 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19972 GroupLens predictions combined with the grouplens scores set it to
19973 @code{'override} and to combine the scores set
19974 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19975 the combine option you will also want to set the values for
19976 @code{grouplens-prediction-offset} and
19977 @code{grouplens-score-scale-factor}.
19978
19979 @vindex grouplens-prediction-display
19980 In either case, GroupLens gives you a few choices for how you would like
19981 to see your predictions displayed.  The display of predictions is
19982 controlled by the @code{grouplens-prediction-display} variable.
19983
19984 The following are valid values for that variable.
19985
19986 @table @code
19987 @item prediction-spot
19988 The higher the prediction, the further to the right an @samp{*} is
19989 displayed.
19990
19991 @item confidence-interval
19992 A numeric confidence interval.
19993
19994 @item prediction-bar
19995 The higher the prediction, the longer the bar.
19996
19997 @item confidence-bar
19998 Numerical confidence.
19999
20000 @item confidence-spot
20001 The spot gets bigger with more confidence.
20002
20003 @item prediction-num
20004 Plain-old numeric value.
20005
20006 @item confidence-plus-minus
20007 Prediction +/- confidence.
20008
20009 @end table
20010
20011
20012 @node GroupLens Variables
20013 @subsection GroupLens Variables
20014
20015 @table @code
20016
20017 @item gnus-summary-grouplens-line-format
20018 The summary line format used in GroupLens-enhanced summary buffers.  It
20019 accepts the same specs as the normal summary line format (@pxref{Summary
20020 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20021 %s\n}.
20022
20023 @item grouplens-bbb-host
20024 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20025 default.
20026
20027 @item grouplens-bbb-port
20028 Port of the host running the bbbd server.  The default is 9000.
20029
20030 @item grouplens-score-offset
20031 Offset the prediction by this value.  In other words, subtract the
20032 prediction value by this number to arrive at the effective score.  The
20033 default is 0.
20034
20035 @item grouplens-score-scale-factor
20036 This variable allows the user to magnify the effect of GroupLens scores.
20037 The scale factor is applied after the offset.  The default is 1.
20038
20039 @end table
20040
20041
20042 @node Advanced Scoring
20043 @section Advanced Scoring
20044
20045 Scoring on Subjects and From headers is nice enough, but what if you're
20046 really interested in what a person has to say only when she's talking
20047 about a particular subject?  Or what if you really don't want to
20048 read what person A has to say when she's following up to person B, but
20049 want to read what she says when she's following up to person C?
20050
20051 By using advanced scoring rules you may create arbitrarily complex
20052 scoring patterns.
20053
20054 @menu
20055 * Advanced Scoring Syntax::     A definition.
20056 * Advanced Scoring Examples::   What they look like.
20057 * Advanced Scoring Tips::       Getting the most out of it.
20058 @end menu
20059
20060
20061 @node Advanced Scoring Syntax
20062 @subsection Advanced Scoring Syntax
20063
20064 Ordinary scoring rules have a string as the first element in the rule.
20065 Advanced scoring rules have a list as the first element.  The second
20066 element is the score to be applied if the first element evaluated to a
20067 non-@code{nil} value.
20068
20069 These lists may consist of three logical operators, one redirection
20070 operator, and various match operators.
20071
20072 Logical operators:
20073
20074 @table @code
20075 @item &
20076 @itemx and
20077 This logical operator will evaluate each of its arguments until it finds
20078 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20079 evaluate to @code{true} values, then this operator will return
20080 @code{true}.
20081
20082 @item |
20083 @itemx or
20084 This logical operator will evaluate each of its arguments until it finds
20085 one that evaluates to @code{true}.  If no arguments are @code{true},
20086 then this operator will return @code{false}.
20087
20088 @item !
20089 @itemx not
20090 @itemx Â¬
20091 This logical operator only takes a single argument.  It returns the
20092 logical negation of the value of its argument.
20093
20094 @end table
20095
20096 There is an @dfn{indirection operator} that will make its arguments
20097 apply to the ancestors of the current article being scored.  For
20098 instance, @code{1-} will make score rules apply to the parent of the
20099 current article.  @code{2-} will make score rules apply to the
20100 grandparent of the current article.  Alternatively, you can write
20101 @code{^^}, where the number of @code{^}s (carets) says how far back into
20102 the ancestry you want to go.
20103
20104 Finally, we have the match operators.  These are the ones that do the
20105 real work.  Match operators are header name strings followed by a match
20106 and a match type.  A typical match operator looks like @samp{("from"
20107 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20108 simple scoring, and the match types are also the same.
20109
20110
20111 @node Advanced Scoring Examples
20112 @subsection Advanced Scoring Examples
20113
20114 Please note that the following examples are score file rules.  To
20115 make a complete score file from them, surround them with another pair
20116 of parentheses.
20117
20118 Let's say you want to increase the score of articles written by Lars
20119 when he's talking about Gnus:
20120
20121 @example
20122 @group
20123 ((&
20124   ("from" "Lars Ingebrigtsen")
20125   ("subject" "Gnus"))
20126  1000)
20127 @end group
20128 @end example
20129
20130 Quite simple, huh?
20131
20132 When he writes long articles, he sometimes has something nice to say:
20133
20134 @example
20135 ((&
20136   ("from" "Lars Ingebrigtsen")
20137   (|
20138    ("subject" "Gnus")
20139    ("lines" 100 >)))
20140  1000)
20141 @end example
20142
20143 However, when he responds to things written by Reig Eigil Logge, you
20144 really don't want to read what he's written:
20145
20146 @example
20147 ((&
20148   ("from" "Lars Ingebrigtsen")
20149   (1- ("from" "Reig Eigir Logge")))
20150  -100000)
20151 @end example
20152
20153 Everybody that follows up Redmondo when he writes about disappearing
20154 socks should have their scores raised, but only when they talk about
20155 white socks.  However, when Lars talks about socks, it's usually not
20156 very interesting:
20157
20158 @example
20159 ((&
20160   (1-
20161    (&
20162     ("from" "redmondo@@.*no" r)
20163     ("body" "disappearing.*socks" t)))
20164   (! ("from" "Lars Ingebrigtsen"))
20165   ("body" "white.*socks"))
20166  1000)
20167 @end example
20168
20169 The possibilities are endless.
20170
20171
20172 @node Advanced Scoring Tips
20173 @subsection Advanced Scoring Tips
20174
20175 The @code{&} and @code{|} logical operators do short-circuit logic.
20176 That is, they stop processing their arguments when it's clear what the
20177 result of the operation will be.  For instance, if one of the arguments
20178 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20179 the rest of the arguments.  This means that you should put slow matches
20180 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20181 @samp{subject}) first.
20182
20183 The indirection arguments (@code{1-} and so on) will make their
20184 arguments work on previous generations of the thread.  If you say
20185 something like:
20186
20187 @example
20188 ...
20189 (1-
20190  (1-
20191   ("from" "lars")))
20192 ...
20193 @end example
20194
20195 Then that means "score on the from header of the grandparent of the
20196 current article".  An indirection is quite fast, but it's better to say:
20197
20198 @example
20199 (1-
20200  (&
20201   ("from" "Lars")
20202   ("subject" "Gnus")))
20203 @end example
20204
20205 than it is to say:
20206
20207 @example
20208 (&
20209  (1- ("from" "Lars"))
20210  (1- ("subject" "Gnus")))
20211 @end example
20212
20213
20214 @node Score Decays
20215 @section Score Decays
20216 @cindex score decays
20217 @cindex decays
20218
20219 You may find that your scores have a tendency to grow without
20220 bounds, especially if you're using adaptive scoring.  If scores get too
20221 big, they lose all meaning---they simply max out and it's difficult to
20222 use them in any sensible way.
20223
20224 @vindex gnus-decay-scores
20225 @findex gnus-decay-score
20226 @vindex gnus-decay-score-function
20227 Gnus provides a mechanism for decaying scores to help with this problem.
20228 When score files are loaded and @code{gnus-decay-scores} is
20229 non-@code{nil}, Gnus will run the score files through the decaying
20230 mechanism thereby lowering the scores of all non-permanent score rules.
20231 The decay itself if performed by the @code{gnus-decay-score-function}
20232 function, which is @code{gnus-decay-score} by default.  Here's the
20233 definition of that function:
20234
20235 @lisp
20236 (defun gnus-decay-score (score)
20237   "Decay SCORE.
20238 This is done according to `gnus-score-decay-constant'
20239 and `gnus-score-decay-scale'."
20240   (floor
20241    (- score
20242       (* (if (< score 0) 1 -1)
20243          (min (abs score)
20244               (max gnus-score-decay-constant
20245                    (* (abs score)
20246                       gnus-score-decay-scale)))))))
20247 @end lisp
20248
20249 @vindex gnus-score-decay-scale
20250 @vindex gnus-score-decay-constant
20251 @code{gnus-score-decay-constant} is 3 by default and
20252 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20253
20254 @enumerate
20255 @item
20256 Scores between -3 and 3 will be set to 0 when this function is called.
20257
20258 @item
20259 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20260
20261 @item
20262 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20263 score.
20264 @end enumerate
20265
20266 If you don't like this decay function, write your own.  It is called
20267 with the score to be decayed as its only parameter, and it should return
20268 the new score, which should be an integer.
20269
20270 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20271 four days, Gnus will decay the scores four times, for instance.
20272
20273 @iftex
20274 @iflatex
20275 @chapter Message
20276 @include message.texi
20277 @chapter Emacs MIME
20278 @include emacs-mime.texi
20279 @chapter Sieve
20280 @include sieve.texi
20281 @c @chapter PGG
20282 @c @include pgg.texi
20283 @end iflatex
20284 @end iftex
20285
20286 @node Various
20287 @chapter Various
20288
20289 @menu
20290 * Process/Prefix::              A convention used by many treatment commands.
20291 * Interactive::                 Making Gnus ask you many questions.
20292 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20293 * Formatting Variables::        You can specify what buffers should look like.
20294 * Window Layout::               Configuring the Gnus buffer windows.
20295 * Faces and Fonts::             How to change how faces look.
20296 * Compilation::                 How to speed Gnus up.
20297 * Mode Lines::                  Displaying information in the mode lines.
20298 * Highlighting and Menus::      Making buffers look all nice and cozy.
20299 * Buttons::                     Get tendinitis in ten easy steps!
20300 * Daemons::                     Gnus can do things behind your back.
20301 * NoCeM::                       How to avoid spam and other fatty foods.
20302 * Undo::                        Some actions can be undone.
20303 * Predicate Specifiers::        Specifying predicates.
20304 * Moderation::                  What to do if you're a moderator.
20305 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20306 * Fuzzy Matching::              What's the big fuzz?
20307 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20308 * Various Various::             Things that are really various.
20309 @end menu
20310
20311
20312 @node Process/Prefix
20313 @section Process/Prefix
20314 @cindex process/prefix convention
20315
20316 Many functions, among them functions for moving, decoding and saving
20317 articles, use what is known as the @dfn{Process/Prefix convention}.
20318
20319 This is a method for figuring out what articles the user wants the
20320 command to be performed on.
20321
20322 It goes like this:
20323
20324 If the numeric prefix is N, perform the operation on the next N
20325 articles, starting with the current one.  If the numeric prefix is
20326 negative, perform the operation on the previous N articles, starting
20327 with the current one.
20328
20329 @vindex transient-mark-mode
20330 If @code{transient-mark-mode} in non-@code{nil} and the region is
20331 active, all articles in the region will be worked upon.
20332
20333 If there is no numeric prefix, but some articles are marked with the
20334 process mark, perform the operation on the articles marked with
20335 the process mark.
20336
20337 If there is neither a numeric prefix nor any articles marked with the
20338 process mark, just perform the operation on the current article.
20339
20340 Quite simple, really, but it needs to be made clear so that surprises
20341 are avoided.
20342
20343 Commands that react to the process mark will push the current list of
20344 process marked articles onto a stack and will then clear all process
20345 marked articles.  You can restore the previous configuration with the
20346 @kbd{M P y} command (@pxref{Setting Process Marks}).
20347
20348 @vindex gnus-summary-goto-unread
20349 One thing that seems to shock & horrify lots of people is that, for
20350 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20351 Since each @kbd{d} (which marks the current article as read) by default
20352 goes to the next unread article after marking, this means that @kbd{3 d}
20353 will mark the next three unread articles as read, no matter what the
20354 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20355 @code{nil} for a more straightforward action.
20356
20357 Many commands do not use the process/prefix convention.  All commands
20358 that do explicitly say so in this manual.  To apply the process/prefix
20359 convention to commands that do not use it, you can use the @kbd{M-&}
20360 command.  For instance, to mark all the articles in the group as
20361 expirable, you could say @kbd{M P b M-& E}.
20362
20363
20364 @node Interactive
20365 @section Interactive
20366 @cindex interaction
20367
20368 @table @code
20369
20370 @item gnus-novice-user
20371 @vindex gnus-novice-user
20372 If this variable is non-@code{nil}, you are either a newcomer to the
20373 World of Usenet, or you are very cautious, which is a nice thing to be,
20374 really.  You will be given questions of the type ``Are you sure you want
20375 to do this?'' before doing anything dangerous.  This is @code{t} by
20376 default.
20377
20378 @item gnus-expert-user
20379 @vindex gnus-expert-user
20380 If this variable is non-@code{nil}, you will seldom be asked any
20381 questions by Gnus.  It will simply assume you know what you're doing, no
20382 matter how strange.
20383
20384 @item gnus-interactive-catchup
20385 @vindex gnus-interactive-catchup
20386 Require confirmation before catching up a group if non-@code{nil}.  It
20387 is @code{t} by default.
20388
20389 @item gnus-interactive-exit
20390 @vindex gnus-interactive-exit
20391 Require confirmation before exiting Gnus.  This variable is @code{t} by
20392 default.
20393 @end table
20394
20395
20396 @node Symbolic Prefixes
20397 @section Symbolic Prefixes
20398 @cindex symbolic prefixes
20399
20400 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20401 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20402 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20403 rule of 900 to the current article.
20404
20405 This is all nice and well, but what if you want to give a command some
20406 additional information?  Well, what most commands do is interpret the
20407 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20408 doesn't want a backup file to be created when saving the current buffer,
20409 for instance.  But what if you want to save without making a backup
20410 file, and you want Emacs to flash lights and play a nice tune at the
20411 same time?  You can't, and you're probably perfectly happy that way.
20412
20413 @kindex M-i (Summary)
20414 @findex gnus-symbolic-argument
20415 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20416 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20417 character typed in is the value.  You can stack as many @kbd{M-i}
20418 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20419 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20420 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20421 @code{b}''.  You get the drift.
20422
20423 Typing in symbolic prefixes to commands that don't accept them doesn't
20424 hurt, but it doesn't do any good either.  Currently not many Gnus
20425 functions make use of the symbolic prefix.
20426
20427 If you're interested in how Gnus implements this, @pxref{Extended
20428 Interactive}.
20429
20430
20431 @node Formatting Variables
20432 @section Formatting Variables
20433 @cindex formatting variables
20434
20435 Throughout this manual you've probably noticed lots of variables called
20436 things like @code{gnus-group-line-format} and
20437 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20438 output lines in the various buffers.  There's quite a lot of them.
20439 Fortunately, they all use the same syntax, so there's not that much to
20440 be annoyed by.
20441
20442 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20443 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20444 lots of percentages everywhere.
20445
20446 @menu
20447 * Formatting Basics::           A formatting variable is basically a format string.
20448 * Mode Line Formatting::        Some rules about mode line formatting variables.
20449 * Advanced Formatting::         Modifying output in various ways.
20450 * User-Defined Specs::          Having Gnus call your own functions.
20451 * Formatting Fonts::            Making the formatting look colorful and nice.
20452 * Positioning Point::           Moving point to a position after an operation.
20453 * Tabulation::                  Tabulating your output.
20454 * Wide Characters::             Dealing with wide characters.
20455 @end menu
20456
20457 Currently Gnus uses the following formatting variables:
20458 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20459 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20460 @code{gnus-group-mode-line-format},
20461 @code{gnus-summary-mode-line-format},
20462 @code{gnus-article-mode-line-format},
20463 @code{gnus-server-mode-line-format}, and
20464 @code{gnus-summary-pick-line-format}.
20465
20466 All these format variables can also be arbitrary elisp forms.  In that
20467 case, they will be @code{eval}ed to insert the required lines.
20468
20469 @kindex M-x gnus-update-format
20470 @findex gnus-update-format
20471 Gnus includes a command to help you while creating your own format
20472 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20473 update the spec in question and pop you to a buffer where you can
20474 examine the resulting Lisp code to be run to generate the line.
20475
20476
20477
20478 @node Formatting Basics
20479 @subsection Formatting Basics
20480
20481 Each @samp{%} element will be replaced by some string or other when the
20482 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20483 spec, and pad with spaces to get a 5-character field''.
20484
20485 As with normal C and Emacs Lisp formatting strings, the numerical
20486 modifier between the @samp{%} and the formatting type character will
20487 @dfn{pad} the output so that it is always at least that long.
20488 @samp{%5y} will make the field always (at least) five characters wide by
20489 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20490 the right instead.
20491
20492 You may also wish to limit the length of the field to protect against
20493 particularly wide values.  For that you can say @samp{%4,6y}, which
20494 means that the field will never be more than 6 characters wide and never
20495 less than 4 characters wide.
20496
20497 Also Gnus supports some extended format specifications, such as
20498 @samp{%&user-date;}.
20499
20500
20501 @node Mode Line Formatting
20502 @subsection Mode Line Formatting
20503
20504 Mode line formatting variables (e.g.,
20505 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20506 buffer line oriented formatting variables (@pxref{Formatting Basics})
20507 with the following two differences:
20508
20509 @enumerate
20510
20511 @item
20512 There must be no newline (@samp{\n}) at the end.
20513
20514 @item
20515 The special @samp{%%b} spec can be used to display the buffer name.
20516 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20517 @samp{%} to allow it to pass through the formatting machinery unmangled,
20518 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20519 display interprets to mean ``show the buffer name''.  For a full list of
20520 mode line specs Emacs understands, see the documentation of the
20521 @code{mode-line-format} variable.
20522
20523 @end enumerate
20524
20525
20526 @node Advanced Formatting
20527 @subsection Advanced Formatting
20528
20529 It is frequently useful to post-process the fields in some way.
20530 Padding, limiting, cutting off parts and suppressing certain values can
20531 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20532 look like @samp{%~(cut 3)~(ignore "0")y}.
20533
20534 These are the valid modifiers:
20535
20536 @table @code
20537 @item pad
20538 @itemx pad-left
20539 Pad the field to the left with spaces until it reaches the required
20540 length.
20541
20542 @item pad-right
20543 Pad the field to the right with spaces until it reaches the required
20544 length.
20545
20546 @item max
20547 @itemx max-left
20548 Cut off characters from the left until it reaches the specified length.
20549
20550 @item max-right
20551 Cut off characters from the right until it reaches the specified
20552 length.
20553
20554 @item cut
20555 @itemx cut-left
20556 Cut off the specified number of characters from the left.
20557
20558 @item cut-right
20559 Cut off the specified number of characters from the right.
20560
20561 @item ignore
20562 Return an empty string if the field is equal to the specified value.
20563
20564 @item form
20565 Use the specified form as the field value when the @samp{@@} spec is
20566 used.
20567
20568 Here's an example:
20569
20570 @lisp
20571 "~(form (current-time-string))@@"
20572 @end lisp
20573
20574 @end table
20575
20576 Let's take an example.  The @samp{%o} spec in the summary mode lines
20577 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20578 This is quite a mouthful, so we want to shave off the century number and
20579 the time, leaving us with a six-character date.  That would be
20580 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20581 maxing, and we need the padding to ensure that the date is never less
20582 than 6 characters to make it look nice in columns.)
20583
20584 Ignoring is done first; then cutting; then maxing; and then as the very
20585 last operation, padding.
20586
20587 @vindex gnus-compile-user-specs
20588 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
20589 default) with your strong personality, and use a lots of these advanced
20590 thingies, you'll find that Gnus gets quite slow.  This can be helped
20591 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
20592 the look of your lines.
20593 @xref{Compilation}.
20594
20595
20596 @node User-Defined Specs
20597 @subsection User-Defined Specs
20598
20599 All the specs allow for inserting user defined specifiers---@samp{u}.
20600 The next character in the format string should be a letter.  Gnus
20601 will call the function @code{gnus-user-format-function-}@samp{X}, where
20602 @samp{X} is the letter following @samp{%u}.  The function will be passed
20603 a single parameter---what the parameter means depends on what buffer
20604 it's being called from.  The function should return a string, which will
20605 be inserted into the buffer just like information from any other
20606 specifier.  This function may also be called with dummy values, so it
20607 should protect against that.
20608
20609 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20610 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20611
20612 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20613 much the same without defining new functions.  Here's an example:
20614 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20615 given here will be evaluated to yield the current line number, and then
20616 inserted.
20617
20618
20619 @node Formatting Fonts
20620 @subsection Formatting Fonts
20621
20622 There are specs for highlighting, and these are shared by all the format
20623 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20624 the special @code{mouse-face} property set, which means that it will be
20625 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20626 over it.
20627
20628 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20629 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20630 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20631 and so on.  Create as many faces as you wish.  The same goes for the
20632 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20633 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20634
20635 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20636 special @code{balloon-help} property set to
20637 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20638 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20639 variables should be either strings or symbols naming functions that
20640 return a string.  When the mouse passes over text with this property
20641 set, a balloon window will appear and display the string.  Please
20642 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20643 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20644 XEmacs) for more information on this.  (For technical reasons, the
20645 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20646 paragraph.)
20647
20648 Here's an alternative recipe for the group buffer:
20649
20650 @lisp
20651 ;; @r{Create three face types.}
20652 (setq gnus-face-1 'bold)
20653 (setq gnus-face-3 'italic)
20654
20655 ;; @r{We want the article count to be in}
20656 ;; @r{a bold and green face.  So we create}
20657 ;; @r{a new face called @code{my-green-bold}.}
20658 (copy-face 'bold 'my-green-bold)
20659 ;; @r{Set the color.}
20660 (set-face-foreground 'my-green-bold "ForestGreen")
20661 (setq gnus-face-2 'my-green-bold)
20662
20663 ;; @r{Set the new & fancy format.}
20664 (setq gnus-group-line-format
20665       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20666 @end lisp
20667
20668 I'm sure you'll be able to use this scheme to create totally unreadable
20669 and extremely vulgar displays.  Have fun!
20670
20671 Note that the @samp{%(} specs (and friends) do not make any sense on the
20672 mode-line variables.
20673
20674 @node Positioning Point
20675 @subsection Positioning Point
20676
20677 Gnus usually moves point to a pre-defined place on each line in most
20678 buffers.  By default, point move to the first colon character on the
20679 line.  You can customize this behaviour in three different ways.
20680
20681 You can move the colon character to somewhere else on the line.
20682
20683 @findex gnus-goto-colon
20684 You can redefine the function that moves the point to the colon.  The
20685 function is called @code{gnus-goto-colon}.
20686
20687 But perhaps the most convenient way to deal with this, if you don't want
20688 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20689 put a @samp{%*} somewhere in your format line definition, Gnus will
20690 place point there.
20691
20692
20693 @node Tabulation
20694 @subsection Tabulation
20695
20696 You can usually line up your displays by padding and cutting your
20697 strings.  However, when combining various strings of different size, it
20698 can often be more convenient to just output the strings, and then worry
20699 about lining up the following text afterwards.
20700
20701 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20702 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20703
20704 @samp{%50=} will insert space characters to pad the line up to column
20705 50.  If the text is already past column 50, nothing will be inserted.
20706 This is the soft tabulator.
20707
20708 @samp{%-50=} will insert space characters to pad the line up to column
20709 50.  If the text is already past column 50, the excess text past column
20710 50 will be removed.  This is the hard tabulator.
20711
20712
20713 @node Wide Characters
20714 @subsection Wide Characters
20715
20716 Fixed width fonts in most countries have characters of the same width.
20717 Some countries, however, use Latin characters mixed with wider
20718 characters---most notable East Asian countries.
20719
20720 The problem is that when formatting, Gnus assumes that if a string is 10
20721 characters wide, it'll be 10 Latin characters wide on the screen.  In
20722 these countries, that's not true.
20723
20724 @vindex gnus-use-correct-string-widths
20725 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20726 @code{t}.  This makes buffer generation slower, but the results will be
20727 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20728 for Emacs.
20729
20730
20731 @node Window Layout
20732 @section Window Layout
20733 @cindex window layout
20734
20735 No, there's nothing here about X, so be quiet.
20736
20737 @vindex gnus-use-full-window
20738 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20739 other windows and occupy the entire Emacs screen by itself.  It is
20740 @code{t} by default.
20741
20742 Setting this variable to @code{nil} kinda works, but there are
20743 glitches.  Use at your own peril.
20744
20745 @vindex gnus-buffer-configuration
20746 @code{gnus-buffer-configuration} describes how much space each Gnus
20747 buffer should be given.  Here's an excerpt of this variable:
20748
20749 @lisp
20750 ((group (vertical 1.0 (group 1.0 point)
20751                       (if gnus-carpal (group-carpal 4))))
20752  (article (vertical 1.0 (summary 0.25 point)
20753                         (article 1.0))))
20754 @end lisp
20755
20756 This is an alist.  The @dfn{key} is a symbol that names some action or
20757 other.  For instance, when displaying the group buffer, the window
20758 configuration function will use @code{group} as the key.  A full list of
20759 possible names is listed below.
20760
20761 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20762 should occupy.  To take the @code{article} split as an example -
20763
20764 @lisp
20765 (article (vertical 1.0 (summary 0.25 point)
20766                        (article 1.0)))
20767 @end lisp
20768
20769 This @dfn{split} says that the summary buffer should occupy 25% of upper
20770 half of the screen, and that it is placed over the article buffer.  As
20771 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20772 reaching for that calculator there).  However, the special number
20773 @code{1.0} is used to signal that this buffer should soak up all the
20774 rest of the space available after the rest of the buffers have taken
20775 whatever they need.  There should be only one buffer with the @code{1.0}
20776 size spec per split.
20777
20778 Point will be put in the buffer that has the optional third element
20779 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20780 split where the tag @code{frame-focus} is a member (i.e. is the third or
20781 fourth element in the list, depending on whether the @code{point} tag is
20782 present) gets focus.
20783
20784 Here's a more complicated example:
20785
20786 @lisp
20787 (article (vertical 1.0 (group 4)
20788                        (summary 0.25 point)
20789                        (if gnus-carpal (summary-carpal 4))
20790                        (article 1.0)))
20791 @end lisp
20792
20793 If the size spec is an integer instead of a floating point number,
20794 then that number will be used to say how many lines a buffer should
20795 occupy, not a percentage.
20796
20797 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20798 precise---if the @code{car} of the split is a function or a subr), this
20799 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20800 be used as a split.  This means that there will be three buffers if
20801 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20802 is non-@code{nil}.
20803
20804 Not complicated enough for you?  Well, try this on for size:
20805
20806 @lisp
20807 (article (horizontal 1.0
20808              (vertical 0.5
20809                  (group 1.0)
20810                  (gnus-carpal 4))
20811              (vertical 1.0
20812                  (summary 0.25 point)
20813                  (summary-carpal 4)
20814                  (article 1.0))))
20815 @end lisp
20816
20817 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20818 @code{horizontal} thingie?
20819
20820 If the first element in one of the split is @code{horizontal}, Gnus will
20821 split the window horizontally, giving you two windows side-by-side.
20822 Inside each of these strips you may carry on all you like in the normal
20823 fashion.  The number following @code{horizontal} says what percentage of
20824 the screen is to be given to this strip.
20825
20826 For each split, there @emph{must} be one element that has the 100% tag.
20827 The splitting is never accurate, and this buffer will eat any leftover
20828 lines from the splits.
20829
20830 To be slightly more formal, here's a definition of what a valid split
20831 may look like:
20832
20833 @example
20834 @group
20835 split      = frame | horizontal | vertical | buffer | form
20836 frame      = "(frame " size *split ")"
20837 horizontal = "(horizontal " size *split ")"
20838 vertical   = "(vertical " size *split ")"
20839 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20840 size       = number | frame-params
20841 buf-name   = group | article | summary ...
20842 @end group
20843 @end example
20844
20845 The limitations are that the @code{frame} split can only appear as the
20846 top-level split.  @var{form} should be an Emacs Lisp form that should
20847 return a valid split.  We see that each split is fully recursive, and
20848 may contain any number of @code{vertical} and @code{horizontal} splits.
20849
20850 @vindex gnus-window-min-width
20851 @vindex gnus-window-min-height
20852 @cindex window height
20853 @cindex window width
20854 Finding the right sizes can be a bit complicated.  No window may be less
20855 than @code{gnus-window-min-height} (default 1) characters high, and all
20856 windows must be at least @code{gnus-window-min-width} (default 1)
20857 characters wide.  Gnus will try to enforce this before applying the
20858 splits.  If you want to use the normal Emacs window width/height limit,
20859 you can just set these two variables to @code{nil}.
20860
20861 If you're not familiar with Emacs terminology, @code{horizontal} and
20862 @code{vertical} splits may work the opposite way of what you'd expect.
20863 Windows inside a @code{horizontal} split are shown side-by-side, and
20864 windows within a @code{vertical} split are shown above each other.
20865
20866 @findex gnus-configure-frame
20867 If you want to experiment with window placement, a good tip is to call
20868 @code{gnus-configure-frame} directly with a split.  This is the function
20869 that does all the real work when splitting buffers.  Below is a pretty
20870 nonsensical configuration with 5 windows; two for the group buffer and
20871 three for the article buffer.  (I said it was nonsensical.)  If you
20872 @code{eval} the statement below, you can get an idea of how that would
20873 look straight away, without going through the normal Gnus channels.
20874 Play with it until you're satisfied, and then use
20875 @code{gnus-add-configuration} to add your new creation to the buffer
20876 configuration list.
20877
20878 @lisp
20879 (gnus-configure-frame
20880  '(horizontal 1.0
20881     (vertical 10
20882       (group 1.0)
20883       (article 0.3 point))
20884     (vertical 1.0
20885       (article 1.0)
20886       (horizontal 4
20887         (group 1.0)
20888         (article 10)))))
20889 @end lisp
20890
20891 You might want to have several frames as well.  No prob---just use the
20892 @code{frame} split:
20893
20894 @lisp
20895 (gnus-configure-frame
20896  '(frame 1.0
20897          (vertical 1.0
20898                    (summary 0.25 point frame-focus)
20899                    (article 1.0))
20900          (vertical ((height . 5) (width . 15)
20901                     (user-position . t)
20902                     (left . -1) (top . 1))
20903                    (picon 1.0))))
20904
20905 @end lisp
20906
20907 This split will result in the familiar summary/article window
20908 configuration in the first (or ``main'') frame, while a small additional
20909 frame will be created where picons will be shown.  As you can see,
20910 instead of the normal @code{1.0} top-level spec, each additional split
20911 should have a frame parameter alist as the size spec.
20912 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20913 Reference Manual}.  Under XEmacs, a frame property list will be
20914 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20915 is such a plist.
20916 The list of all possible keys for @code{gnus-buffer-configuration} can
20917 be found in its default value.
20918
20919 Note that the @code{message} key is used for both
20920 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20921 it is desirable to distinguish between the two, something like this
20922 might be used:
20923
20924 @lisp
20925 (message (horizontal 1.0
20926                      (vertical 1.0 (message 1.0 point))
20927                      (vertical 0.24
20928                                (if (buffer-live-p gnus-summary-buffer)
20929                                    '(summary 0.5))
20930                                (group 1.0))))
20931 @end lisp
20932
20933 One common desire for a multiple frame split is to have a separate frame
20934 for composing mail and news while leaving the original frame intact.  To
20935 accomplish that, something like the following can be done:
20936
20937 @lisp
20938 (message
20939   (frame 1.0
20940          (if (not (buffer-live-p gnus-summary-buffer))
20941              (car (cdr (assoc 'group gnus-buffer-configuration)))
20942            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20943          (vertical ((user-position . t) (top . 1) (left . 1)
20944                     (name . "Message"))
20945                    (message 1.0 point))))
20946 @end lisp
20947
20948 @findex gnus-add-configuration
20949 Since the @code{gnus-buffer-configuration} variable is so long and
20950 complicated, there's a function you can use to ease changing the config
20951 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20952 you want to change the @code{article} setting, you could say:
20953
20954 @lisp
20955 (gnus-add-configuration
20956  '(article (vertical 1.0
20957                (group 4)
20958                (summary .25 point)
20959                (article 1.0))))
20960 @end lisp
20961
20962 You'd typically stick these @code{gnus-add-configuration} calls in your
20963 @file{~/.gnus.el} file or in some startup hook---they should be run after
20964 Gnus has been loaded.
20965
20966 @vindex gnus-always-force-window-configuration
20967 If all windows mentioned in the configuration are already visible, Gnus
20968 won't change the window configuration.  If you always want to force the
20969 ``right'' window configuration, you can set
20970 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20971
20972 If you're using tree displays (@pxref{Tree Display}), and the tree
20973 window is displayed vertically next to another window, you may also want
20974 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20975 windows resized.
20976
20977 @subsection Example Window Configurations
20978
20979 @itemize @bullet
20980 @item
20981 Narrow left hand side occupied by group buffer.  Right hand side split
20982 between summary buffer (top one-sixth) and article buffer (bottom).
20983
20984 @ifinfo
20985 @example
20986 +---+---------+
20987 | G | Summary |
20988 | r +---------+
20989 | o |         |
20990 | u | Article |
20991 | p |         |
20992 +---+---------+
20993 @end example
20994 @end ifinfo
20995
20996 @lisp
20997 (gnus-add-configuration
20998  '(article
20999    (horizontal 1.0
21000                (vertical 25 (group 1.0))
21001                (vertical 1.0
21002                          (summary 0.16 point)
21003                          (article 1.0)))))
21004
21005 (gnus-add-configuration
21006  '(summary
21007    (horizontal 1.0
21008                (vertical 25 (group 1.0))
21009                (vertical 1.0 (summary 1.0 point)))))
21010 @end lisp
21011
21012 @end itemize
21013
21014
21015 @node Faces and Fonts
21016 @section Faces and Fonts
21017 @cindex faces
21018 @cindex fonts
21019 @cindex colors
21020
21021 Fiddling with fonts and faces used to be very difficult, but these days
21022 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21023 the face you want to alter, and alter it via the standard Customize
21024 interface.
21025
21026
21027 @node Compilation
21028 @section Compilation
21029 @cindex compilation
21030 @cindex byte-compilation
21031
21032 @findex gnus-compile
21033
21034 Remember all those line format specification variables?
21035 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21036 on.  By default, T-gnus will use the byte-compiled codes of these
21037 variables and we can keep a slow-down to a minimum.  However, if you set
21038 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
21039 unfortunately, changing them will mean a quite significant slow-down.
21040 (The default values of these variables have byte-compiled functions
21041 associated with them, while the user-generated versions do not, of
21042 course.)
21043
21044 To help with this, you can run @kbd{M-x gnus-compile} after you've
21045 fiddled around with the variables and feel that you're (kind of)
21046 satisfied.  This will result in the new specs being byte-compiled, and
21047 you'll get top speed again.  Note that T-gnus will not save these
21048 compiled specs in the @file{.newsrc.eld} file.
21049
21050 @table @code
21051 @item gnus-compile-user-specs
21052 @vindex gnus-compile-user-specs
21053 If it is non-nil, the user-defined format specs will be byte-compiled
21054 automatically.  The default value of this variable is @code{t}.  It has
21055 an effect on the values of @code{gnus-*-line-format-spec}.
21056 @end table
21057
21058
21059 @node Mode Lines
21060 @section Mode Lines
21061 @cindex mode lines
21062
21063 @vindex gnus-updated-mode-lines
21064 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21065 lines updated.  It is a list of symbols.  Supported symbols include
21066 @code{group}, @code{article}, @code{summary}, @code{server},
21067 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21068 Gnus will keep that mode line updated with information that may be
21069 pertinent.  If this variable is @code{nil}, screen refresh may be
21070 quicker.
21071
21072 @cindex display-time
21073
21074 @vindex gnus-mode-non-string-length
21075 By default, Gnus displays information on the current article in the mode
21076 lines of the summary and article buffers.  The information Gnus wishes
21077 to display (e.g. the subject of the article) is often longer than the
21078 mode lines, and therefore have to be cut off at some point.  The
21079 @code{gnus-mode-non-string-length} variable says how long the other
21080 elements on the line is (i.e., the non-info part).  If you put
21081 additional elements on the mode line (e.g. a clock), you should modify
21082 this variable:
21083
21084 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21085 @lisp
21086 (add-hook 'display-time-hook
21087           (lambda () (setq gnus-mode-non-string-length
21088                            (+ 21
21089                               (if line-number-mode 5 0)
21090                               (if column-number-mode 4 0)
21091                               (length display-time-string)))))
21092 @end lisp
21093
21094 If this variable is @code{nil} (which is the default), the mode line
21095 strings won't be chopped off, and they won't be padded either.  Note
21096 that the default is unlikely to be desirable, as even the percentage
21097 complete in the buffer may be crowded off the mode line; the user should
21098 configure this variable appropriately for her configuration.
21099
21100
21101 @node Highlighting and Menus
21102 @section Highlighting and Menus
21103 @cindex visual
21104 @cindex highlighting
21105 @cindex menus
21106
21107 @vindex gnus-visual
21108 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21109 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21110 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21111 file.
21112
21113 This variable can be a list of visual properties that are enabled.  The
21114 following elements are valid, and are all included by default:
21115
21116 @table @code
21117 @item group-highlight
21118 Do highlights in the group buffer.
21119 @item summary-highlight
21120 Do highlights in the summary buffer.
21121 @item article-highlight
21122 Do highlights in the article buffer.
21123 @item highlight
21124 Turn on highlighting in all buffers.
21125 @item group-menu
21126 Create menus in the group buffer.
21127 @item summary-menu
21128 Create menus in the summary buffers.
21129 @item article-menu
21130 Create menus in the article buffer.
21131 @item browse-menu
21132 Create menus in the browse buffer.
21133 @item server-menu
21134 Create menus in the server buffer.
21135 @item score-menu
21136 Create menus in the score buffers.
21137 @item menu
21138 Create menus in all buffers.
21139 @end table
21140
21141 So if you only want highlighting in the article buffer and menus in all
21142 buffers, you could say something like:
21143
21144 @lisp
21145 (setq gnus-visual '(article-highlight menu))
21146 @end lisp
21147
21148 If you want highlighting only and no menus whatsoever, you'd say:
21149
21150 @lisp
21151 (setq gnus-visual '(highlight))
21152 @end lisp
21153
21154 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21155 in all Gnus buffers.
21156
21157 Other general variables that influence the look of all buffers include:
21158
21159 @table @code
21160 @item gnus-mouse-face
21161 @vindex gnus-mouse-face
21162 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21163 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21164
21165 @end table
21166
21167 There are hooks associated with the creation of all the different menus:
21168
21169 @table @code
21170
21171 @item gnus-article-menu-hook
21172 @vindex gnus-article-menu-hook
21173 Hook called after creating the article mode menu.
21174
21175 @item gnus-group-menu-hook
21176 @vindex gnus-group-menu-hook
21177 Hook called after creating the group mode menu.
21178
21179 @item gnus-summary-menu-hook
21180 @vindex gnus-summary-menu-hook
21181 Hook called after creating the summary mode menu.
21182
21183 @item gnus-server-menu-hook
21184 @vindex gnus-server-menu-hook
21185 Hook called after creating the server mode menu.
21186
21187 @item gnus-browse-menu-hook
21188 @vindex gnus-browse-menu-hook
21189 Hook called after creating the browse mode menu.
21190
21191 @item gnus-score-menu-hook
21192 @vindex gnus-score-menu-hook
21193 Hook called after creating the score mode menu.
21194
21195 @end table
21196
21197
21198 @node Buttons
21199 @section Buttons
21200 @cindex buttons
21201 @cindex mouse
21202 @cindex click
21203
21204 Those new-fangled @dfn{mouse} contraptions is very popular with the
21205 young, hep kids who don't want to learn the proper way to do things
21206 these days.  Why, I remember way back in the summer of '89, when I was
21207 using Emacs on a Tops 20 system.  Three hundred users on one single
21208 machine, and every user was running Simula compilers.  Bah!
21209
21210 Right.
21211
21212 @vindex gnus-carpal
21213 Well, you can make Gnus display bufferfuls of buttons you can click to
21214 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21215 really.  Tell the chiropractor I sent you.
21216
21217
21218 @table @code
21219
21220 @item gnus-carpal-mode-hook
21221 @vindex gnus-carpal-mode-hook
21222 Hook run in all carpal mode buffers.
21223
21224 @item gnus-carpal-button-face
21225 @vindex gnus-carpal-button-face
21226 Face used on buttons.
21227
21228 @item gnus-carpal-header-face
21229 @vindex gnus-carpal-header-face
21230 Face used on carpal buffer headers.
21231
21232 @item gnus-carpal-group-buffer-buttons
21233 @vindex gnus-carpal-group-buffer-buttons
21234 Buttons in the group buffer.
21235
21236 @item gnus-carpal-summary-buffer-buttons
21237 @vindex gnus-carpal-summary-buffer-buttons
21238 Buttons in the summary buffer.
21239
21240 @item gnus-carpal-server-buffer-buttons
21241 @vindex gnus-carpal-server-buffer-buttons
21242 Buttons in the server buffer.
21243
21244 @item gnus-carpal-browse-buffer-buttons
21245 @vindex gnus-carpal-browse-buffer-buttons
21246 Buttons in the browse buffer.
21247 @end table
21248
21249 All the @code{buttons} variables are lists.  The elements in these list
21250 are either cons cells where the @code{car} contains a text to be displayed and
21251 the @code{cdr} contains a function symbol, or a simple string.
21252
21253
21254 @node Daemons
21255 @section Daemons
21256 @cindex demons
21257 @cindex daemons
21258
21259 Gnus, being larger than any program ever written (allegedly), does lots
21260 of strange stuff that you may wish to have done while you're not
21261 present.  For instance, you may want it to check for new mail once in a
21262 while.  Or you may want it to close down all connections to all servers
21263 when you leave Emacs idle.  And stuff like that.
21264
21265 Gnus will let you do stuff like that by defining various
21266 @dfn{handlers}.  Each handler consists of three elements:  A
21267 @var{function}, a @var{time}, and an @var{idle} parameter.
21268
21269 Here's an example of a handler that closes connections when Emacs has
21270 been idle for thirty minutes:
21271
21272 @lisp
21273 (gnus-demon-close-connections nil 30)
21274 @end lisp
21275
21276 Here's a handler that scans for @acronym{PGP} headers every hour when
21277 Emacs is idle:
21278
21279 @lisp
21280 (gnus-demon-scan-pgp 60 t)
21281 @end lisp
21282
21283 This @var{time} parameter and that @var{idle} parameter work together
21284 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21285 @code{nil}, then the function will be called every @var{time} minutes.
21286
21287 If @var{idle} is @code{t}, then the function will be called after
21288 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21289 the function will never be called.  But once Emacs goes idle, the
21290 function will be called every @var{time} minutes.
21291
21292 If @var{idle} is a number and @var{time} is a number, the function will
21293 be called every @var{time} minutes only when Emacs has been idle for
21294 @var{idle} minutes.
21295
21296 If @var{idle} is a number and @var{time} is @code{nil}, the function
21297 will be called once every time Emacs has been idle for @var{idle}
21298 minutes.
21299
21300 And if @var{time} is a string, it should look like @samp{07:31}, and
21301 the function will then be called once every day somewhere near that
21302 time.  Modified by the @var{idle} parameter, of course.
21303
21304 @vindex gnus-demon-timestep
21305 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21306 seconds.  This is 60 by default.  If you change that variable,
21307 all the timings in the handlers will be affected.)
21308
21309 So, if you want to add a handler, you could put something like this in
21310 your @file{~/.gnus.el} file:
21311
21312 @findex gnus-demon-add-handler
21313 @lisp
21314 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21315 @end lisp
21316
21317 @findex gnus-demon-add-nocem
21318 @findex gnus-demon-add-scanmail
21319 @findex gnus-demon-add-rescan
21320 @findex gnus-demon-add-scan-timestamps
21321 @findex gnus-demon-add-disconnection
21322 Some ready-made functions to do this have been created:
21323 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21324 @code{gnus-demon-add-nntp-close-connection},
21325 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21326 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21327 @file{~/.gnus.el} if you want those abilities.
21328
21329 @findex gnus-demon-init
21330 @findex gnus-demon-cancel
21331 @vindex gnus-demon-handlers
21332 If you add handlers to @code{gnus-demon-handlers} directly, you should
21333 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21334 daemons, you can use the @code{gnus-demon-cancel} function.
21335
21336 Note that adding daemons can be pretty naughty if you over do it.  Adding
21337 functions that scan all news and mail from all servers every two seconds
21338 is a sure-fire way of getting booted off any respectable system.  So
21339 behave.
21340
21341
21342 @node NoCeM
21343 @section NoCeM
21344 @cindex nocem
21345 @cindex spam
21346
21347 @dfn{Spamming} is posting the same article lots and lots of times.
21348 Spamming is bad.  Spamming is evil.
21349
21350 Spamming is usually canceled within a day or so by various anti-spamming
21351 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21352 NoCeM is pronounced ``no see-'em'', and means what the name
21353 implies---these are messages that make the offending articles, like, go
21354 away.
21355
21356 What use are these NoCeM messages if the articles are canceled anyway?
21357 Some sites do not honor cancel messages and some sites just honor cancels
21358 from a select few people.  Then you may wish to make use of the NoCeM
21359 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21360
21361 Gnus can read and parse the messages in this group automatically, and
21362 this will make spam disappear.
21363
21364 There are some variables to customize, of course:
21365
21366 @table @code
21367 @item gnus-use-nocem
21368 @vindex gnus-use-nocem
21369 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21370 by default.
21371
21372 @item gnus-nocem-groups
21373 @vindex gnus-nocem-groups
21374 Gnus will look for NoCeM messages in the groups in this list.  The
21375 default is
21376 @lisp
21377 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21378  "alt.nocem.misc" "news.admin.net-abuse.announce")
21379 @end lisp
21380
21381 @item gnus-nocem-issuers
21382 @vindex gnus-nocem-issuers
21383 There are many people issuing NoCeM messages.  This list says what
21384 people you want to listen to.  The default is
21385 @lisp
21386 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21387  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21388 @end lisp
21389 fine, upstanding citizens all of them.
21390
21391 Known despammers that you can put in this list are listed at@*
21392 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21393
21394 You do not have to heed NoCeM messages from all these people---just the
21395 ones you want to listen to.  You also don't have to accept all NoCeM
21396 messages from the people you like.  Each NoCeM message has a @dfn{type}
21397 header that gives the message a (more or less, usually less) rigorous
21398 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21399 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21400 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21401 Each condition is either a string (which is a regexp that matches types
21402 you want to use) or a list on the form @code{(not @var{string})}, where
21403 @var{string} is a regexp that matches types you don't want to use.
21404
21405 For instance, if you want all NoCeM messages from Chris Lewis except his
21406 @samp{troll} messages, you'd say:
21407
21408 @lisp
21409 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21410 @end lisp
21411
21412 On the other hand, if you just want nothing but his @samp{spam} and
21413 @samp{spew} messages, you'd say:
21414
21415 @lisp
21416 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21417 @end lisp
21418
21419 The specs are applied left-to-right.
21420
21421
21422 @item gnus-nocem-verifyer
21423 @vindex gnus-nocem-verifyer
21424 @findex mc-verify
21425 This should be a function for verifying that the NoCeM issuer is who she
21426 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21427 function.  If this is too slow and you don't care for verification
21428 (which may be dangerous), you can set this variable to @code{nil}.
21429
21430 If you want signed NoCeM messages to be verified and unsigned messages
21431 not to be verified (but used anyway), you could do something like:
21432
21433 @lisp
21434 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21435
21436 (defun my-gnus-mc-verify ()
21437   (not (eq 'forged
21438            (ignore-errors
21439              (if (mc-verify)
21440                  t
21441                'forged)))))
21442 @end lisp
21443
21444 This might be dangerous, though.
21445
21446 @item gnus-nocem-directory
21447 @vindex gnus-nocem-directory
21448 This is where Gnus will store its NoCeM cache files.  The default is@*
21449 @file{~/News/NoCeM/}.
21450
21451 @item gnus-nocem-expiry-wait
21452 @vindex gnus-nocem-expiry-wait
21453 The number of days before removing old NoCeM entries from the cache.
21454 The default is 15.  If you make it shorter Gnus will be faster, but you
21455 might then see old spam.
21456
21457 @item gnus-nocem-check-from
21458 @vindex gnus-nocem-check-from
21459 Non-@code{nil} means check for valid issuers in message bodies.
21460 Otherwise don't bother fetching articles unless their author matches a
21461 valid issuer; that is much faster if you are selective about the
21462 issuers.
21463
21464 @item gnus-nocem-check-article-limit
21465 @vindex gnus-nocem-check-article-limit
21466 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21467 group.  NoCeM groups can be huge and very slow to process.
21468
21469 @end table
21470
21471 Using NoCeM could potentially be a memory hog.  If you have many living
21472 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21473 big.  If this is a problem, you should kill off all (or most) of your
21474 unsubscribed groups (@pxref{Subscription Commands}).
21475
21476
21477 @node Undo
21478 @section Undo
21479 @cindex undo
21480
21481 It is very useful to be able to undo actions one has done.  In normal
21482 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21483 In Gnus buffers, however, it isn't that simple.
21484
21485 The things Gnus displays in its buffer is of no value whatsoever to
21486 Gnus---it's all just data designed to look nice to the user.
21487 Killing a group in the group buffer with @kbd{C-k} makes the line
21488 disappear, but that's just a side-effect of the real action---the
21489 removal of the group in question from the internal Gnus structures.
21490 Undoing something like that can't be done by the normal Emacs
21491 @code{undo} function.
21492
21493 Gnus tries to remedy this somewhat by keeping track of what the user
21494 does and coming up with actions that would reverse the actions the user
21495 takes.  When the user then presses the @code{undo} key, Gnus will run
21496 the code to reverse the previous action, or the previous actions.
21497 However, not all actions are easily reversible, so Gnus currently offers
21498 a few key functions to be undoable.  These include killing groups,
21499 yanking groups, and changing the list of read articles of groups.
21500 That's it, really.  More functions may be added in the future, but each
21501 added function means an increase in data to be stored, so Gnus will
21502 never be totally undoable.
21503
21504 @findex gnus-undo-mode
21505 @vindex gnus-use-undo
21506 @findex gnus-undo
21507 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21508 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21509 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21510 command, which should feel kinda like the normal Emacs @code{undo}
21511 command.
21512
21513
21514 @node Predicate Specifiers
21515 @section Predicate Specifiers
21516 @cindex predicate specifiers
21517
21518 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21519 form that allows flexible specification of predicates without having
21520 to type all that much.
21521
21522 These specifiers are lists consisting of functions, symbols and lists.
21523
21524 Here's an example:
21525
21526 @lisp
21527 (or gnus-article-unseen-p
21528     gnus-article-unread-p)
21529 @end lisp
21530
21531 The available symbols are @code{or}, @code{and} and @code{not}.  The
21532 functions all take one parameter.
21533
21534 @findex gnus-make-predicate
21535 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21536 to create a function that can be called.  This input parameter to this
21537 function will be passed along to all the functions in the predicate
21538 specifier.
21539
21540
21541 @node Moderation
21542 @section Moderation
21543 @cindex moderation
21544
21545 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21546 It is not included in the standard Gnus package.  Write a mail to
21547 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21548 get a copy.
21549
21550 The moderation package is implemented as a minor mode for summary
21551 buffers.  Put
21552
21553 @lisp
21554 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21555 @end lisp
21556
21557 in your @file{~/.gnus.el} file.
21558
21559 If you are the moderator of @samp{rec.zoofle}, this is how it's
21560 supposed to work:
21561
21562 @enumerate
21563 @item
21564 You split your incoming mail by matching on
21565 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21566 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21567
21568 @item
21569 You enter that group once in a while and post articles using the @kbd{e}
21570 (edit-and-post) or @kbd{s} (just send unedited) commands.
21571
21572 @item
21573 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21574 articles that weren't approved by you, you can cancel them with the
21575 @kbd{c} command.
21576 @end enumerate
21577
21578 To use moderation mode in these two groups, say:
21579
21580 @lisp
21581 (setq gnus-moderated-list
21582       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21583 @end lisp
21584
21585
21586 @node Image Enhancements
21587 @section Image Enhancements
21588
21589 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21590 support images yet.}, is able to display pictures and stuff, so Gnus has
21591 taken advantage of that.
21592
21593 @menu
21594 * X-Face::                      Display a funky, teensy black-and-white image.
21595 * Face::                        Display a funkier, teensier colored image.
21596 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21597 * Picons::                      How to display pictures of what you're reading.
21598 * XVarious::                    Other XEmacsy Gnusey variables.
21599 @end menu
21600
21601
21602 @node X-Face
21603 @subsection X-Face
21604 @cindex x-face
21605
21606 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21607 depth) image that's supposed to represent the author of the message.
21608 It seems to be supported by an ever-growing number of mail and news
21609 readers.
21610
21611 @cindex x-face
21612 @findex gnus-article-display-x-face
21613 @vindex gnus-article-x-face-command
21614 @vindex gnus-article-x-face-too-ugly
21615 @iftex
21616 @iflatex
21617 \include{xface}
21618 @end iflatex
21619 @end iftex
21620 @c @anchor{X-Face}
21621
21622 Decoding an @code{X-Face} header either requires an Emacs that has
21623 @samp{compface} support (which most XEmacs versions has), or that you
21624 have @samp{compface} installed on your system.  If either is true,
21625 Gnus will default to displaying @code{X-Face} headers.
21626
21627 The variable that controls this is the
21628 @code{gnus-article-x-face-command} variable.  If this variable is a
21629 string, this string will be executed in a sub-shell.  If it is a
21630 function, this function will be called with the face as the argument.
21631 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21632 the @code{From} header, the face will not be shown.
21633
21634 The default action under Emacs 20 is to fork off the @code{display}
21635 program@footnote{@code{display} is from the ImageMagick package.  For
21636 the @code{uncompface} and @code{icontopbm} programs look for a package
21637 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21638 view the face.
21639
21640 Under XEmacs or Emacs 21+ with suitable image support, the default
21641 action is to display the face before the @code{From} header.  (It's
21642 nicer if XEmacs has been compiled with @code{X-Face} support---that
21643 will make display somewhat faster.  If there's no native @code{X-Face}
21644 support, Gnus will try to convert the @code{X-Face} header using
21645 external programs from the @code{pbmplus} package and
21646 friends.@footnote{On a GNU/Linux system look for packages with names
21647 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21648
21649 (Note: @code{x-face} is used in the variable/function names, not
21650 @code{xface}).
21651
21652 Gnus provides a few convenience functions and variables to allow
21653 easier insertion of X-Face headers in outgoing messages.
21654
21655 @findex gnus-random-x-face
21656 @vindex gnus-convert-pbm-to-x-face-command
21657 @vindex gnus-x-face-directory
21658 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21659 @code{gnus-x-face-directory} and picks one at random, and then
21660 converts it to the X-Face format by using the
21661 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21662 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21663 header data as a string.
21664
21665 @findex gnus-insert-random-x-face-header
21666 @code{gnus-insert-random-x-face-header} calls
21667 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21668 randomly generated data.
21669
21670 @findex gnus-x-face-from-file
21671 @vindex gnus-convert-image-to-x-face-command
21672 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21673 converts the file to X-Face format by using the
21674 @code{gnus-convert-image-to-x-face-command} shell command.
21675
21676 Here's how you would typically use the first function.  Put something
21677 like the following in your @file{~/.gnus.el} file:
21678
21679 @lisp
21680 (setq message-required-news-headers
21681       (nconc message-required-news-headers
21682              (list '(X-Face . gnus-random-x-face))))
21683 @end lisp
21684
21685 Using the last function would be something like this:
21686
21687 @lisp
21688 (setq message-required-news-headers
21689       (nconc message-required-news-headers
21690              (list '(X-Face . (lambda ()
21691                                 (gnus-x-face-from-file
21692                                  "~/My-face.gif"))))))
21693 @end lisp
21694
21695
21696 @node Face
21697 @subsection Face
21698 @cindex face
21699
21700 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21701
21702 @code{Face} headers are essentially a funkier version of @code{X-Face}
21703 ones. They describe a 48x48 pixel colored image that's supposed to
21704 represent the author of the message.
21705
21706 @cindex face
21707 @findex gnus-article-display-face
21708 The contents of a @code{Face} header must be a base64 encoded PNG image.
21709 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21710 specifications.
21711
21712 Gnus provides a few convenience functions and variables to allow
21713 easier insertion of Face headers in outgoing messages.
21714
21715 @findex gnus-convert-png-to-face
21716 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21717 726 bytes long, and converts it to a face.
21718
21719 @findex gnus-face-from-file
21720 @vindex gnus-convert-image-to-face-command
21721 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21722 converts the file to Face format by using the
21723 @code{gnus-convert-image-to-face-command} shell command.
21724
21725 Here's how you would typically use this function. Put something like the
21726 following in your @file{~/.gnus.el} file:
21727
21728 @lisp
21729 (setq message-required-news-headers
21730       (nconc message-required-news-headers
21731              (list '(Face . (lambda ()
21732                               (gnus-face-from-file "~/face.jpg"))))))
21733 @end lisp
21734
21735
21736 @node Smileys
21737 @subsection Smileys
21738 @cindex smileys
21739
21740 @iftex
21741 @iflatex
21742 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21743 \input{smiley}
21744 @end iflatex
21745 @end iftex
21746
21747 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21748 currently the only package that uses Smiley, it is documented here.
21749
21750 In short---to use Smiley in Gnus, put the following in your
21751 @file{~/.gnus.el} file:
21752
21753 @lisp
21754 (setq gnus-treat-display-smileys t)
21755 @end lisp
21756
21757 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21758 the like---to pictures and displays those instead of the text smiley
21759 faces.  The conversion is controlled by a list of regexps that matches
21760 text and maps that to file names.
21761
21762 @vindex smiley-regexp-alist
21763 The alist used is specified by the @code{smiley-regexp-alist}
21764 variable.  The first item in each element is the regexp to be matched;
21765 the second element is the regexp match group that is to be replaced by
21766 the picture; and the third element is the name of the file to be
21767 displayed.
21768
21769 The following variables customize where Smiley will look for these
21770 files:
21771
21772 @table @code
21773
21774 @item smiley-data-directory
21775 @vindex smiley-data-directory
21776 Where Smiley will look for smiley faces files.
21777
21778 @item gnus-smiley-file-types
21779 @vindex gnus-smiley-file-types
21780 List of suffixes on smiley file names to try.
21781
21782 @end table
21783
21784
21785 @node Picons
21786 @subsection Picons
21787
21788 @iftex
21789 @iflatex
21790 \include{picons}
21791 @end iflatex
21792 @end iftex
21793
21794 So@dots{}  You want to slow down your news reader even more!  This is a
21795 good way to do so.  It's also a great way to impress people staring
21796 over your shoulder as you read news.
21797
21798 What are Picons?  To quote directly from the Picons Web site:
21799
21800 @iftex
21801 @iflatex
21802 \margindex{}
21803 @end iflatex
21804 @end iftex
21805
21806 @quotation
21807 @dfn{Picons} is short for ``personal icons''.  They're small,
21808 constrained images used to represent users and domains on the net,
21809 organized into databases so that the appropriate image for a given
21810 e-mail address can be found.  Besides users and domains, there are picon
21811 databases for Usenet newsgroups and weather forecasts.  The picons are
21812 in either monochrome @code{XBM} format or color @code{XPM} and
21813 @code{GIF} formats.
21814 @end quotation
21815
21816 @vindex gnus-picon-databases
21817 For instructions on obtaining and installing the picons databases,
21818 point your Web browser at
21819 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21820
21821 If you are using Debian GNU/Linux, saying @samp{apt-get install
21822 picons.*} will install the picons where Gnus can find them.
21823
21824 To enable displaying picons, simply make sure that
21825 @code{gnus-picon-databases} points to the directory containing the
21826 Picons databases.
21827
21828 The following variables offer control over where things are located.
21829
21830 @table @code
21831
21832 @item gnus-picon-databases
21833 @vindex gnus-picon-databases
21834 The location of the picons database.  This is a list of directories
21835 containing the @file{news}, @file{domains}, @file{users} (and so on)
21836 subdirectories.  Defaults to @code{("/usr/lib/picon"
21837 "/usr/local/faces")}.
21838
21839 @item gnus-picon-news-directories
21840 @vindex gnus-picon-news-directories
21841 List of subdirectories to search in @code{gnus-picon-databases} for
21842 newsgroups faces.  @code{("news")} is the default.
21843
21844 @item gnus-picon-user-directories
21845 @vindex gnus-picon-user-directories
21846 List of subdirectories to search in @code{gnus-picon-databases} for user
21847 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21848
21849 @item gnus-picon-domain-directories
21850 @vindex gnus-picon-domain-directories
21851 List of subdirectories to search in @code{gnus-picon-databases} for
21852 domain name faces.  Defaults to @code{("domains")}.  Some people may
21853 want to add @samp{"unknown"} to this list.
21854
21855 @item gnus-picon-file-types
21856 @vindex gnus-picon-file-types
21857 Ordered list of suffixes on picon file names to try.  Defaults to
21858 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21859
21860 @end table
21861
21862
21863 @node XVarious
21864 @subsection Various XEmacs Variables
21865
21866 @table @code
21867 @item gnus-xmas-glyph-directory
21868 @vindex gnus-xmas-glyph-directory
21869 This is where Gnus will look for pictures.  Gnus will normally
21870 auto-detect this directory, but you may set it manually if you have an
21871 unusual directory structure.
21872
21873 @item gnus-xmas-logo-color-alist
21874 @vindex gnus-xmas-logo-color-alist
21875 This is an alist where the key is a type symbol and the values are the
21876 foreground and background color of the splash page glyph.
21877
21878 @item gnus-xmas-logo-color-style
21879 @vindex gnus-xmas-logo-color-style
21880 This is the key used to look up the color in the alist described above.
21881 Valid values include @code{flame}, @code{pine}, @code{moss},
21882 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21883 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21884
21885 @item gnus-xmas-modeline-glyph
21886 @vindex gnus-xmas-modeline-glyph
21887 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21888 default.
21889
21890 @end table
21891
21892 @subsubsection Toolbar
21893
21894 @table @code
21895
21896 @item gnus-use-toolbar
21897 @vindex gnus-use-toolbar
21898 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21899 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21900 @code{right-toolbar}, or @code{left-toolbar}.
21901
21902 @item gnus-group-toolbar
21903 @vindex gnus-group-toolbar
21904 The toolbar in the group buffer.
21905
21906 @item gnus-summary-toolbar
21907 @vindex gnus-summary-toolbar
21908 The toolbar in the summary buffer.
21909
21910 @item gnus-summary-mail-toolbar
21911 @vindex gnus-summary-mail-toolbar
21912 The toolbar in the summary buffer of mail groups.
21913
21914 @end table
21915
21916 @iftex
21917 @iflatex
21918 \margindex{}
21919 @end iflatex
21920 @end iftex
21921
21922
21923 @node Fuzzy Matching
21924 @section Fuzzy Matching
21925 @cindex fuzzy matching
21926
21927 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21928 things like scoring, thread gathering and thread comparison.
21929
21930 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21931 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21932 means, and the implementation has changed over time.
21933
21934 Basically, it tries to remove all noise from lines before comparing.
21935 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21936 out of the strings before comparing the results.  This often leads to
21937 adequate results---even when faced with strings generated by text
21938 manglers masquerading as newsreaders.
21939
21940
21941 @node Thwarting Email Spam
21942 @section Thwarting Email Spam
21943 @cindex email spam
21944 @cindex spam
21945 @cindex UCE
21946 @cindex unsolicited commercial email
21947
21948 In these last days of the Usenet, commercial vultures are hanging about
21949 and grepping through news like crazy to find email addresses they can
21950 foist off their scams and products to.  As a reaction to this, many
21951 people have started putting nonsense addresses into their @code{From}
21952 lines.  I think this is counterproductive---it makes it difficult for
21953 people to send you legitimate mail in response to things you write, as
21954 well as making it difficult to see who wrote what.  This rewriting may
21955 perhaps be a bigger menace than the unsolicited commercial email itself
21956 in the end.
21957
21958 The biggest problem I have with email spam is that it comes in under
21959 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21960 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21961 mail group, only to find two pyramid schemes, seven advertisements
21962 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21963 and one mail asking me to repent and find some god.
21964
21965 This is annoying.  Here's what you can do about it.
21966
21967 @menu
21968 * The problem of spam::         Some background, and some solutions
21969 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21970 * SpamAssassin::                How to use external anti-spam tools.
21971 * Hashcash::                    Reduce spam by burning CPU time.
21972 * Filtering Spam Using The Spam ELisp Package::
21973 * Filtering Spam Using Statistics with spam-stat::
21974 @end menu
21975
21976 @node The problem of spam
21977 @subsection The problem of spam
21978 @cindex email spam
21979 @cindex spam filtering approaches
21980 @cindex filtering approaches, spam
21981 @cindex UCE
21982 @cindex unsolicited commercial email
21983
21984 First, some background on spam.
21985
21986 If you have access to e-mail, you are familiar with spam (technically
21987 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21988 because e-mail delivery is very cheap compared to paper mail, so only
21989 a very small percentage of people need to respond to an UCE to make it
21990 worthwhile to the advertiser.  Ironically, one of the most common
21991 spams is the one offering a database of e-mail addresses for further
21992 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21993 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21994
21995 Spam comes from a wide variety of sources.  It is simply impossible to
21996 dispose of all spam without discarding useful messages.  A good
21997 example is the TMDA system, which requires senders
21998 unknown to you to confirm themselves as legitimate senders before
21999 their e-mail can reach you.  Without getting into the technical side
22000 of TMDA, a downside is clearly that e-mail from legitimate sources may
22001 be discarded if those sources can't or won't confirm themselves
22002 through the TMDA system.  Another problem with TMDA is that it
22003 requires its users to have a basic understanding of e-mail delivery
22004 and processing.
22005
22006 The simplest approach to filtering spam is filtering.  If you get 200
22007 spam messages per day from @samp{random-address@@vmadmin.com}, you
22008 block @samp{vmadmin.com}.  If you get 200 messages about
22009 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22010 message.  This, unfortunately, is a great way to discard legitimate
22011 e-mail.  For instance, the very informative and useful RISKS digest
22012 has been blocked by overzealous mail filters because it
22013 @strong{contained} words that were common in spam messages.
22014 Nevertheless, in isolated cases, with great care, direct filtering of
22015 mail can be useful.
22016
22017 Another approach to filtering e-mail is the distributed spam
22018 processing, for instance DCC implements such a system.  In essence,
22019 @var{N} systems around the world agree that a machine @var{X} in
22020 China, Ghana, or California is sending out spam e-mail, and these
22021 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22022 a database.  The criteria for spam detection vary---it may be the
22023 number of messages sent, the content of the messages, and so on.  When
22024 a user of the distributed processing system wants to find out if a
22025 message is spam, he consults one of those @var{N} systems.
22026
22027 Distributed spam processing works very well against spammers that send
22028 a large number of messages at once, but it requires the user to set up
22029 fairly complicated checks.  There are commercial and free distributed
22030 spam processing systems.  Distributed spam processing has its risks as
22031 well.  For instance legitimate e-mail senders have been accused of
22032 sending spam, and their web sites have been shut down for some time
22033 because of the incident.
22034
22035 The statistical approach to spam filtering is also popular.  It is
22036 based on a statistical analysis of previous spam messages.  Usually
22037 the analysis is a simple word frequency count, with perhaps pairs of
22038 words or 3-word combinations thrown into the mix.  Statistical
22039 analysis of spam works very well in most of the cases, but it can
22040 classify legitimate e-mail as spam in some cases.  It takes time to
22041 run the analysis, the full message must be analyzed, and the user has
22042 to store the database of spam analyses.
22043
22044 @node Anti-Spam Basics
22045 @subsection Anti-Spam Basics
22046 @cindex email spam
22047 @cindex spam
22048 @cindex UCE
22049 @cindex unsolicited commercial email
22050
22051 One way of dealing with spam is having Gnus split out all spam into a
22052 @samp{spam} mail group (@pxref{Splitting Mail}).
22053
22054 First, pick one (1) valid mail address that you can be reached at, and
22055 put it in your @code{From} header of all your news articles.  (I've
22056 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22057 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22058 sysadmin whether your sendmail installation accepts keywords in the local
22059 part of the mail address.)
22060
22061 @lisp
22062 (setq message-default-news-headers
22063       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22064 @end lisp
22065
22066 Then put the following split rule in @code{nnmail-split-fancy}
22067 (@pxref{Fancy Mail Splitting}):
22068
22069 @lisp
22070 (
22071  ...
22072  (to "larsi@@trym.ifi.uio.no"
22073       (| ("subject" "re:.*" "misc")
22074          ("references" ".*@@.*" "misc")
22075          "spam"))
22076  ...
22077 )
22078 @end lisp
22079
22080 This says that all mail to this address is suspect, but if it has a
22081 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22082 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22083 (This idea probably comes from Tim Pierce.)
22084
22085 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22086 and do not include your email address explicitly in the @code{To}
22087 header.  Why they do this is unknown---perhaps it's to thwart this
22088 thwarting scheme?  In any case, this is trivial to deal with---you just
22089 put anything not addressed to you in the @samp{spam} group by ending
22090 your fancy split rule in this way:
22091
22092 @lisp
22093 (
22094  ...
22095  (to "larsi" "misc")
22096  "spam")
22097 @end lisp
22098
22099 In my experience, this will sort virtually everything into the right
22100 group.  You still have to check the @samp{spam} group from time to time to
22101 check for legitimate mail, though.  If you feel like being a good net
22102 citizen, you can even send off complaints to the proper authorities on
22103 each unsolicited commercial email---at your leisure.
22104
22105 This works for me.  It allows people an easy way to contact me (they can
22106 just press @kbd{r} in the usual way), and I'm not bothered at all with
22107 spam.  It's a win-win situation.  Forging @code{From} headers to point
22108 to non-existent domains is yucky, in my opinion.
22109
22110
22111
22112 @node SpamAssassin
22113 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22114 @cindex SpamAssassin
22115 @cindex Vipul's Razor
22116 @cindex DCC
22117
22118 The days where the hints in the previous section was sufficient in
22119 avoiding spam are coming to an end.  There are many tools out there
22120 that claim to reduce the amount of spam you get.  This section could
22121 easily become outdated fast, as new products replace old, but
22122 fortunately most of these tools seem to have similar interfaces.  Even
22123 though this section will use SpamAssassin as an example, it should be
22124 easy to adapt it to most other tools.
22125
22126 If the tool you are using is not installed on the mail server, you
22127 need to invoke it yourself.  Ideas on how to use the
22128 @code{:postscript} mail source parameter (@pxref{Mail Source
22129 Specifiers}) follow.
22130
22131 @lisp
22132 (setq mail-sources
22133       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22134         (pop :user "jrl"
22135              :server "pophost"
22136              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22137 @end lisp
22138
22139 Once you manage to process your incoming spool somehow, thus making
22140 the mail contain e.g.@: a header indicating it is spam, you are ready to
22141 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22142
22143 @lisp
22144 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22145                              ...))
22146 @end lisp
22147
22148 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22149
22150 @lisp
22151 (setq nnmail-split-methods 'nnmail-split-fancy
22152       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22153                              ...))
22154 @end lisp
22155
22156 Some people might not like the idea of piping the mail through various
22157 programs using a @code{:prescript} (if some program is buggy, you
22158 might lose all mail).  If you are one of them, another solution is to
22159 call the external tools during splitting.  Example fancy split method:
22160
22161 @lisp
22162 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22163                              ...))
22164 (defun kevin-spamassassin ()
22165   (save-excursion
22166     (let ((buf (or (get-buffer " *nnmail incoming*")
22167                    (get-buffer " *nnml move*"))))
22168       (if (not buf)
22169           (progn (message "Oops, cannot find message buffer") nil)
22170         (set-buffer buf)
22171         (if (eq 1 (call-process-region (point-min) (point-max)
22172                                        "spamc" nil nil nil "-c"))
22173             "spam")))))
22174 @end lisp
22175
22176 That is about it.  As some spam is likely to get through anyway, you
22177 might want to have a nifty function to call when you happen to read
22178 spam.  And here is the nifty function:
22179
22180 @lisp
22181  (defun my-gnus-raze-spam ()
22182   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22183   (interactive)
22184   (gnus-summary-show-raw-article)
22185   (gnus-summary-save-in-pipe "razor-report -f -d")
22186   (gnus-summary-mark-as-expirable 1))
22187 @end lisp
22188
22189 @node Hashcash
22190 @subsection Hashcash
22191 @cindex hashcash
22192
22193 A novel technique to fight spam is to require senders to do something
22194 costly for each message they send.  This has the obvious drawback that
22195 you cannot rely on everyone in the world using this technique,
22196 since it is not part of the Internet standards, but it may be useful
22197 in smaller communities.
22198
22199 While the tools in the previous section work well in practice, they
22200 work only because the tools are constantly maintained and updated as
22201 new form of spam appears.  This means that a small percentage of spam
22202 will always get through.  It also means that somewhere, someone needs
22203 to read lots of spam to update these tools.  Hashcash avoids that, but
22204 instead requires that everyone you communicate with supports the
22205 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22206 The approaches have their own advantages and disadvantages, but as
22207 often in the real world, a combination of them is stronger than either
22208 one of them separately.
22209
22210 @cindex X-Hashcash
22211 The ``something costly'' is to burn CPU time, more specifically to
22212 compute a hash collision up to a certain number of bits.  The
22213 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22214 header.  For more details, and for the external application
22215 @code{hashcash} you need to install to use this feature, see
22216 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22217 information can be found at @uref{http://www.camram.org/}.
22218
22219 If you wish to call hashcash for each message you send, say something
22220 like:
22221
22222 @lisp
22223 (require 'hashcash)
22224 (add-hook 'message-send-hook 'mail-add-payment)
22225 @end lisp
22226
22227 The @file{hashcash.el} library can be found in the Gnus development
22228 contrib directory or at
22229 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22230
22231 You will need to set up some additional variables as well:
22232
22233 @table @code
22234
22235 @item hashcash-default-payment
22236 @vindex hashcash-default-payment
22237 This variable indicates the default number of bits the hash collision
22238 should consist of.  By default this is 0, meaning nothing will be
22239 done.  Suggested useful values include 17 to 29.
22240
22241 @item hashcash-payment-alist
22242 @vindex hashcash-payment-alist
22243 Some receivers may require you to spend burn more CPU time than the
22244 default.  This variable contains a list of @samp{(@var{addr}
22245 @var{amount})} cells, where @var{addr} is the receiver (email address
22246 or newsgroup) and @var{amount} is the number of bits in the collision
22247 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22248 @var{amount})} cells, where the @var{string} is the string to use
22249 (normally the email address or newsgroup name is used).
22250
22251 @item hashcash
22252 @vindex hashcash
22253 Where the @code{hashcash} binary is installed.
22254
22255 @end table
22256
22257 Currently there is no built in functionality in Gnus to verify
22258 hashcash cookies, it is expected that this is performed by your hand
22259 customized mail filtering scripts.  Improvements in this area would be
22260 a useful contribution, however.
22261
22262 @node Filtering Spam Using The Spam ELisp Package
22263 @subsection Filtering Spam Using The Spam ELisp Package
22264 @cindex spam filtering
22265 @cindex spam
22266
22267 The idea behind @file{spam.el} is to have a control center for spam detection
22268 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22269 filters incoming mail, and it analyzes mail known to be spam or ham.
22270 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22271 non-spam messages.
22272
22273 So, what happens when you load @file{spam.el}?  First of all, you get
22274 the following keyboard commands:
22275
22276 @table @kbd
22277
22278 @item M-d
22279 @itemx M s x
22280 @itemx S x
22281 @kindex M-d
22282 @kindex S x
22283 @kindex M s x
22284 @findex gnus-summary-mark-as-spam
22285 @code{gnus-summary-mark-as-spam}.
22286
22287 Mark current article as spam, showing it with the @samp{$} mark.
22288 Whenever you see a spam article, make sure to mark its summary line
22289 with @kbd{M-d} before leaving the group.  This is done automatically
22290 for unread articles in @emph{spam} groups.
22291
22292 @item M s t
22293 @itemx S t
22294 @kindex M s t
22295 @kindex S t
22296 @findex spam-bogofilter-score
22297 @code{spam-bogofilter-score}.
22298
22299 You must have Bogofilter installed for that command to work properly.
22300
22301 @xref{Bogofilter}.
22302
22303 @end table
22304
22305 Also, when you load @file{spam.el}, you will be able to customize its
22306 variables.  Try @code{customize-group} on the @samp{spam} variable
22307 group.
22308
22309 @vindex gnus-spam-process-newsgroups
22310 The concepts of ham processors and spam processors are very important.
22311 Ham processors and spam processors for a group can be set with the
22312 @code{spam-process} group parameter, or the
22313 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22314 mail known to be non-spam (@emph{ham}) and process it in some way so
22315 that later similar mail will also be considered non-spam.  Spam
22316 processors take mail known to be spam and process it so similar spam
22317 will be detected later.
22318
22319 @vindex gnus-spam-newsgroup-contents
22320 Gnus learns from the spam you get.  You have to collect your spam in
22321 one or more spam groups, and set or customize the variable
22322 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22323 groups to contain spam by setting their group parameter
22324 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22325 by customizing the corresponding variable
22326 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22327 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22328 also be used to declare groups as @emph{ham} groups if you set their
22329 classification to @code{gnus-group-spam-classification-ham}.  If
22330 groups are not classified by means of @code{spam-junk-mailgroups},
22331 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22332 considered @emph{unclassified}.  All groups are unclassified by
22333 default.
22334
22335 @vindex gnus-spam-mark
22336 @cindex $
22337 In spam groups, all messages are considered to be spam by default:
22338 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22339 group.  If you have seen a message, had it marked as spam, then
22340 unmarked it, it won't be marked as spam when you enter the group
22341 thereafter.  You can disable that behavior, so all unread messages
22342 will get the @samp{$} mark, if you set the
22343 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22344 remove the @samp{$} mark when you are in the group summary buffer for
22345 every message that is not spam after all.  To remove the @samp{$}
22346 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22347 declaring it read the non-spam way.  When you leave a group, all
22348 spam-marked (@samp{$}) articles are sent to a spam processor which
22349 will study them as spam samples.
22350
22351 Messages may also be deleted in various other ways, and unless
22352 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22353 and @samp{r} for default read or explicit delete, marks @samp{X} and
22354 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22355 low scores, are all considered to be associated with articles which
22356 are not spam.  This assumption might be false, in particular if you
22357 use kill files or score files as means for detecting genuine spam, you
22358 should then adjust the @code{ham-marks} group parameter.
22359
22360 @defvar ham-marks
22361 You can customize this group or topic parameter to be the list of
22362 marks you want to consider ham.  By default, the list contains the
22363 deleted, read, killed, kill-filed, and low-score marks.
22364 @end defvar
22365
22366 @defvar spam-marks
22367 You can customize this group or topic parameter to be the list of
22368 marks you want to consider spam.  By default, the list contains only
22369 the spam mark.
22370 @end defvar
22371
22372 When you leave @emph{any} group, regardless of its
22373 @code{spam-contents} classification, all spam-marked articles are sent
22374 to a spam processor, which will study these as spam samples.  If you
22375 explicit kill a lot, you might sometimes end up with articles marked
22376 @samp{K} which you never saw, and which might accidentally contain
22377 spam.  Best is to make sure that real spam is marked with @samp{$},
22378 and nothing else.
22379
22380 @vindex gnus-ham-process-destinations
22381 When you leave a @emph{spam} group, all spam-marked articles are
22382 marked as expired after processing with the spam processor.  This is
22383 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22384 @strong{ham} articles in a spam group will be moved to a location
22385 determined by either the @code{ham-process-destination} group
22386 parameter or a match in the @code{gnus-ham-process-destinations}
22387 variable, which is a list of regular expressions matched with group
22388 names (it's easiest to customize this variable with
22389 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22390 location is a group name.  If the @code{ham-process-destination}
22391 parameter is not set, ham articles are left in place.  If the
22392 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22393 set, the ham articles are marked as unread before being moved.
22394
22395 When you leave a @emph{ham} group, all ham-marked articles are sent to
22396 a ham processor, which will study these as non-spam samples.
22397
22398 @vindex gnus-spam-process-destinations
22399 When you leave a @emph{ham} or @emph{unclassified} group, all
22400 @strong{spam} articles are moved to a location determined by either
22401 the @code{spam-process-destination} group parameter or a match in the
22402 @code{gnus-spam-process-destinations} variable, which is a list of
22403 regular expressions matched with group names (it's easiest to
22404 customize this variable with @code{customize-variable
22405 gnus-spam-process-destinations}).  The ultimate location is a group
22406 name.  If the @code{spam-process-destination} parameter is not set,
22407 the spam articles are only expired.
22408
22409 To use the @file{spam.el} facilities for incoming mail filtering, you
22410 must add the following to your fancy split list
22411 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22412
22413 @example
22414 (: spam-split)
22415 @end example
22416
22417 Note that the fancy split may be called @code{nnmail-split-fancy} or
22418 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22419 nnimap back ends to retrieve your mail.
22420
22421 The @code{spam-split} function will process incoming mail and send the
22422 mail considered to be spam into the group name given by the variable
22423 @code{spam-split-group}.  By default that group name is @samp{spam},
22424 but you can customize @code{spam-split-group}.
22425
22426 You can also give @code{spam-split} a parameter,
22427 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22428
22429 Take these split rules (with @code{spam-use-regex-headers} and
22430 @code{spam-use-blackholes} set):
22431
22432 @example
22433  nnimap-split-fancy '(|
22434                       (any "ding" "ding")
22435                       (: spam-split)
22436                       ;; default mailbox
22437                       "mail")
22438 @end example
22439
22440 Now, the problem is that you want all ding messages to make it to the
22441 ding folder.  But that will let obvious spam (for example, spam
22442 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22443 when it's sent to the ding list.  On the other hand, some messages to
22444 the ding list are from a mail server in the blackhole list, so the
22445 invocation of @code{spam-split} can't be before the ding rule.
22446
22447 You can let SpamAssassin headers supercede ding rules, but all other
22448 @code{spam-split} rules (including a second invocation of the
22449 regex-headers check) will be after the ding rule:
22450
22451 @example
22452  nnimap-split-fancy '(|
22453                       (: spam-split 'spam-use-regex-headers)
22454                       (any "ding" "ding")
22455                       (: spam-split)
22456                       ;; default mailbox
22457                       "mail")
22458 @end example
22459
22460 Basically, this lets you invoke specific @code{spam-split} checks
22461 depending on your particular needs.  You don't have to throw all mail
22462 into all the spam tests.  Another reason why this is nice is that
22463 messages to mailing lists you have rules for don't have to have
22464 resource-intensive blackhole checks performed on them.  You could also
22465 specify different spam checks for your nnmail split vs. your nnimap
22466 split.  Go crazy.
22467
22468 You still have to have specific checks such as
22469 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22470 invoke @code{spam-split} with the check.  The reason is that when
22471 loading @file{spam.el}, some conditional loading is done depending on
22472 what @code{spam-use-xyz} variables you have set.
22473
22474 @emph{Note for IMAP users}
22475
22476 The boolean variable @code{nnimap-split-download-body} needs to be
22477 set, if you want to split based on the whole message instead of just
22478 the headers.  By default, the nnimap back end will only retrieve the
22479 message headers.  If you use @code{spam-check-bogofilter},
22480 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22481 can benefit from the full message body), you should set this variable.
22482 It is not set by default because it will slow @acronym{IMAP} down, and
22483 that is not an appropriate decision to make on behalf of the user.
22484
22485 @xref{Splitting in IMAP}.
22486
22487 @emph{TODO: Currently, spam.el only supports insertion of articles
22488 into a back end.  There is no way to tell spam.el that an article is no
22489 longer spam or ham.}
22490
22491 @emph{TODO: spam.el needs to provide a uniform way of training all the
22492 statistical databases.  Some have that functionality built-in, others
22493 don't.}
22494
22495 The following are the methods you can use to control the behavior of
22496 @code{spam-split} and their corresponding spam and ham processors:
22497
22498 @menu
22499 * Blacklists and Whitelists::
22500 * BBDB Whitelists::
22501 * Gmane Spam Reporting::
22502 * Anti-spam Hashcash Payments::
22503 * Blackholes::
22504 * Regular Expressions Header Matching::
22505 * Bogofilter::
22506 * ifile spam filtering::
22507 * spam-stat spam filtering::
22508 * SpamOracle::
22509 * Extending the spam elisp package::
22510 @end menu
22511
22512 @node Blacklists and Whitelists
22513 @subsubsection Blacklists and Whitelists
22514 @cindex spam filtering
22515 @cindex whitelists, spam filtering
22516 @cindex blacklists, spam filtering
22517 @cindex spam
22518
22519 @defvar spam-use-blacklist
22520
22521 Set this variable to @code{t} if you want to use blacklists when
22522 splitting incoming mail.  Messages whose senders are in the blacklist
22523 will be sent to the @code{spam-split-group}.  This is an explicit
22524 filter, meaning that it acts only on mail senders @emph{declared} to
22525 be spammers.
22526
22527 @end defvar
22528
22529 @defvar spam-use-whitelist
22530
22531 Set this variable to @code{t} if you want to use whitelists when
22532 splitting incoming mail.  Messages whose senders are not in the
22533 whitelist will be sent to the next spam-split rule.  This is an
22534 explicit filter, meaning that unless someone is in the whitelist, their
22535 messages are not assumed to be spam or ham.
22536
22537 @end defvar
22538
22539 @defvar spam-use-whitelist-exclusive
22540
22541 Set this variable to @code{t} if you want to use whitelists as an
22542 implicit filter, meaning that every message will be considered spam
22543 unless the sender is in the whitelist.  Use with care.
22544
22545 @end defvar
22546
22547 @defvar gnus-group-spam-exit-processor-blacklist
22548
22549 Add this symbol to a group's @code{spam-process} parameter by
22550 customizing the group parameters or the
22551 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22552 added to a group's @code{spam-process} parameter, the senders of
22553 spam-marked articles will be added to the blacklist.
22554
22555 @end defvar
22556
22557 @defvar gnus-group-ham-exit-processor-whitelist
22558
22559 Add this symbol to a group's @code{spam-process} parameter by
22560 customizing the group parameters or the
22561 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22562 added to a group's @code{spam-process} parameter, the senders of
22563 ham-marked articles in @emph{ham} groups will be added to the
22564 whitelist.  Note that this ham processor has no effect in @emph{spam}
22565 or @emph{unclassified} groups.
22566
22567 @end defvar
22568
22569 Blacklists are lists of regular expressions matching addresses you
22570 consider to be spam senders.  For instance, to block mail from any
22571 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22572 blacklist.  You start out with an empty blacklist.  Blacklist entries
22573 use the Emacs regular expression syntax.
22574
22575 Conversely, whitelists tell Gnus what addresses are considered
22576 legitimate.  All messages from whitelisted addresses are considered
22577 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22578 Emacs regular expression syntax.
22579
22580 The blacklist and whitelist file locations can be customized with the
22581 @code{spam-directory} variable (@file{~/News/spam} by default), or
22582 the @code{spam-whitelist} and @code{spam-blacklist} variables
22583 directly.  The whitelist and blacklist files will by default be in the
22584 @code{spam-directory} directory, named @file{whitelist} and
22585 @file{blacklist} respectively.
22586
22587 @node BBDB Whitelists
22588 @subsubsection BBDB Whitelists
22589 @cindex spam filtering
22590 @cindex BBDB whitelists, spam filtering
22591 @cindex BBDB, spam filtering
22592 @cindex spam
22593
22594 @defvar spam-use-BBDB
22595
22596 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22597 Whitelists}), but uses the BBDB as the source of whitelisted
22598 addresses, without regular expressions.  You must have the BBDB loaded
22599 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22600 not in the BBDB will be sent to the next spam-split rule.  This is an
22601 explicit filter, meaning that unless someone is in the BBDB, their
22602 messages are not assumed to be spam or ham.
22603
22604 @end defvar
22605
22606 @defvar spam-use-BBDB-exclusive
22607
22608 Set this variable to @code{t} if you want to use the BBDB as an
22609 implicit filter, meaning that every message will be considered spam
22610 unless the sender is in the BBDB.  Use with care.  Only sender
22611 addresses in the BBDB will be allowed through; all others will be
22612 classified as spammers.
22613
22614 @end defvar
22615
22616 @defvar gnus-group-ham-exit-processor-BBDB
22617
22618 Add this symbol to a group's @code{spam-process} parameter by
22619 customizing the group parameters or the
22620 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22621 added to a group's @code{spam-process} parameter, the senders of
22622 ham-marked articles in @emph{ham} groups will be added to the
22623 BBDB.  Note that this ham processor has no effect in @emph{spam}
22624 or @emph{unclassified} groups.
22625
22626 @end defvar
22627
22628 @node Gmane Spam Reporting
22629 @subsubsection Gmane Spam Reporting
22630 @cindex spam reporting
22631 @cindex Gmane, spam reporting
22632 @cindex Gmane, spam reporting
22633 @cindex spam
22634
22635 @defvar gnus-group-spam-exit-processor-report-gmane
22636
22637 Add this symbol to a group's @code{spam-process} parameter by
22638 customizing the group parameters or the
22639 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22640 added to a group's @code{spam-process} parameter, the spam-marked
22641 articles groups will be reported to the Gmane administrators.
22642
22643 @end defvar
22644
22645 @node Anti-spam Hashcash Payments
22646 @subsubsection Anti-spam Hashcash Payments
22647 @cindex spam filtering
22648 @cindex hashcash, spam filtering
22649 @cindex spam
22650
22651 @defvar spam-use-hashcash
22652
22653 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22654 Whitelists}), but uses hashcash tokens for whitelisting messages
22655 instead of the sender address.  You must have the @code{hashcash.el}
22656 package loaded for @code{spam-use-hashcash} to work properly.
22657 Messages without a hashcash payment token will be sent to the next
22658 spam-split rule.  This is an explicit filter, meaning that unless a
22659 hashcash token is found, the messages are not assumed to be spam or
22660 ham.
22661
22662 @end defvar
22663
22664 @node Blackholes
22665 @subsubsection Blackholes
22666 @cindex spam filtering
22667 @cindex blackholes, spam filtering
22668 @cindex spam
22669
22670 @defvar spam-use-blackholes
22671
22672 This option is disabled by default.  You can let Gnus consult the
22673 blackhole-type distributed spam processing systems (DCC, for instance)
22674 when you set this option.  The variable @code{spam-blackhole-servers}
22675 holds the list of blackhole servers Gnus will consult.  The current
22676 list is fairly comprehensive, but make sure to let us know if it
22677 contains outdated servers.
22678
22679 The blackhole check uses the @code{dig.el} package, but you can tell
22680 @file{spam.el} to use @code{dns.el} instead for better performance if
22681 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22682 this time to set @code{spam-use-dig} to @code{nil} despite the
22683 possible performance improvements, because some users may be unable to
22684 use it, but you can try it and see if it works for you.
22685
22686 @end defvar
22687
22688 @defvar spam-blackhole-servers
22689
22690 The list of servers to consult for blackhole checks.
22691
22692 @end defvar
22693
22694 @defvar spam-blackhole-good-server-regex
22695
22696 A regular expression for IPs that should not be checked against the
22697 blackhole server list.  When set to @code{nil}, it has no effect.
22698
22699 @end defvar
22700
22701 @defvar spam-use-dig
22702
22703 Use the @code{dig.el} package instead of the @code{dns.el} package.
22704 The default setting of @code{t} is recommended.
22705
22706 @end defvar
22707
22708 Blackhole checks are done only on incoming mail.  There is no spam or
22709 ham processor for blackholes.
22710
22711 @node Regular Expressions Header Matching
22712 @subsubsection Regular Expressions Header Matching
22713 @cindex spam filtering
22714 @cindex regular expressions header matching, spam filtering
22715 @cindex spam
22716
22717 @defvar spam-use-regex-headers
22718
22719 This option is disabled by default.  You can let Gnus check the
22720 message headers against lists of regular expressions when you set this
22721 option.  The variables @code{spam-regex-headers-spam} and
22722 @code{spam-regex-headers-ham} hold the list of regular expressions.
22723 Gnus will check against the message headers to determine if the
22724 message is spam or ham, respectively.
22725
22726 @end defvar
22727
22728 @defvar spam-regex-headers-spam
22729
22730 The list of regular expressions that, when matched in the headers of
22731 the message, positively identify it as spam.
22732
22733 @end defvar
22734
22735 @defvar spam-regex-headers-ham
22736
22737 The list of regular expressions that, when matched in the headers of
22738 the message, positively identify it as ham.
22739
22740 @end defvar
22741
22742 Regular expression header checks are done only on incoming mail.
22743 There is no specific spam or ham processor for regular expressions.
22744
22745 @node Bogofilter
22746 @subsubsection Bogofilter
22747 @cindex spam filtering
22748 @cindex bogofilter, spam filtering
22749 @cindex spam
22750
22751 @defvar spam-use-bogofilter
22752
22753 Set this variable if you want @code{spam-split} to use Eric Raymond's
22754 speedy Bogofilter.
22755
22756 With a minimum of care for associating the @samp{$} mark for spam
22757 articles only, Bogofilter training all gets fairly automatic.  You
22758 should do this until you get a few hundreds of articles in each
22759 category, spam or not.  The command @kbd{S t} in summary mode, either
22760 for debugging or for curiosity, shows the @emph{spamicity} score of
22761 the current article (between 0.0 and 1.0).
22762
22763 Bogofilter determines if a message is spam based on a specific
22764 threshold.  That threshold can be customized, consult the Bogofilter
22765 documentation.
22766
22767 If the @code{bogofilter} executable is not in your path, Bogofilter
22768 processing will be turned off.
22769
22770 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22771
22772 @end defvar
22773
22774 @defvar spam-use-bogofilter-headers
22775
22776 Set this variable if you want @code{spam-split} to use Eric Raymond's
22777 speedy Bogofilter, looking only at the message headers.  It works
22778 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22779 must be in the message already.  Normally you would do this with a
22780 procmail recipe or something similar; consult the Bogofilter
22781 installation documents for details.
22782
22783 You should not enable this if you use @code{spam-use-bogofilter}.
22784
22785 @end defvar
22786
22787 @defvar gnus-group-spam-exit-processor-bogofilter
22788 Add this symbol to a group's @code{spam-process} parameter by
22789 customizing the group parameters or the
22790 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22791 added to a group's @code{spam-process} parameter, spam-marked articles
22792 will be added to the Bogofilter spam database.
22793 @end defvar
22794
22795 @defvar gnus-group-ham-exit-processor-bogofilter
22796 Add this symbol to a group's @code{spam-process} parameter by
22797 customizing the group parameters or the
22798 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22799 added to a group's @code{spam-process} parameter, the ham-marked
22800 articles in @emph{ham} groups will be added to the Bogofilter database
22801 of non-spam messages.  Note that this ham processor has no effect in
22802 @emph{spam} or @emph{unclassified} groups.
22803 @end defvar
22804
22805 @defvar spam-bogofilter-database-directory
22806
22807 This is the directory where Bogofilter will store its databases.  It
22808 is not specified by default, so Bogofilter will use its own default
22809 database directory.
22810
22811 @end defvar
22812
22813 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22814 purpose.  A ham and a spam processor are provided, plus the
22815 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22816 variables to indicate to spam-split that Bogofilter should either be
22817 used, or has already been used on the article.  The 0.9.2.1 version of
22818 Bogofilter was used to test this functionality.
22819
22820 @node ifile spam filtering
22821 @subsubsection ifile spam filtering
22822 @cindex spam filtering
22823 @cindex ifile, spam filtering
22824 @cindex spam
22825
22826 @defvar spam-use-ifile
22827
22828 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22829 statistical analyzer similar to Bogofilter.
22830
22831 @end defvar
22832
22833 @defvar spam-ifile-all-categories
22834
22835 Enable this variable if you want @code{spam-use-ifile} to give you all
22836 the ifile categories, not just spam/non-spam.  If you use this, make
22837 sure you train ifile as described in its documentation.
22838
22839 @end defvar
22840
22841 @defvar spam-ifile-spam-category
22842
22843 This is the category of spam messages as far as ifile is concerned.
22844 The actual string used is irrelevant, but you probably want to leave
22845 the default value of @samp{spam}.
22846 @end defvar
22847
22848 @defvar spam-ifile-database-path
22849
22850 This is the filename for the ifile database.  It is not specified by
22851 default, so ifile will use its own default database name.
22852
22853 @end defvar
22854
22855 The ifile mail classifier is similar to Bogofilter in intent and
22856 purpose.  A ham and a spam processor are provided, plus the
22857 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22858 should be used.  The 1.2.1 version of ifile was used to test this
22859 functionality.
22860
22861 @node spam-stat spam filtering
22862 @subsubsection spam-stat spam filtering
22863 @cindex spam filtering
22864 @cindex spam-stat, spam filtering
22865 @cindex spam-stat
22866 @cindex spam
22867
22868 @xref{Filtering Spam Using Statistics with spam-stat}.
22869
22870 @defvar spam-use-stat
22871
22872 Enable this variable if you want @code{spam-split} to use
22873 spam-stat.el, an Emacs Lisp statistical analyzer.
22874
22875 @end defvar
22876
22877 @defvar gnus-group-spam-exit-processor-stat
22878 Add this symbol to a group's @code{spam-process} parameter by
22879 customizing the group parameters or the
22880 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22881 added to a group's @code{spam-process} parameter, the spam-marked
22882 articles will be added to the spam-stat database of spam messages.
22883 @end defvar
22884
22885 @defvar gnus-group-ham-exit-processor-stat
22886 Add this symbol to a group's @code{spam-process} parameter by
22887 customizing the group parameters or the
22888 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22889 added to a group's @code{spam-process} parameter, the ham-marked
22890 articles in @emph{ham} groups will be added to the spam-stat database
22891 of non-spam messages.  Note that this ham processor has no effect in
22892 @emph{spam} or @emph{unclassified} groups.
22893 @end defvar
22894
22895 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
22896 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
22897 which unlike ifile or Bogofilter does not require external programs.
22898 A spam and a ham processor, and the @code{spam-use-stat} variable for
22899 @code{spam-split} are provided.
22900
22901 @node SpamOracle
22902 @subsubsection Using SpamOracle with Gnus
22903 @cindex spam filtering
22904 @cindex SpamOracle
22905 @cindex spam
22906
22907 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
22908 statistical mail filtering tool written by Xavier Leroy and needs to be
22909 installed separately.
22910
22911 There are several ways to use SpamOracle with Gnus.  In all cases, your
22912 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
22913 then enter an @samp{X-Spam} header indicating whether it regards the
22914 mail as a spam mail or not.
22915
22916 One possibility is to run SpamOracle as a @code{:prescript} from the
22917 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
22918 the advantage that the user can see the @emph{X-Spam} headers.
22919
22920 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
22921 Using The Spam ELisp Package}) call SpamOracle.
22922
22923 @vindex spam-use-spamoracle
22924 To enable SpamOracle usage by @file{spam.el}, set the variable
22925 @code{spam-use-spamoracle} to @code{t} and configure the
22926 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
22927 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
22928 this example the @samp{INBOX} of an nnimap server is filtered using
22929 SpamOracle.  Mails recognized as spam mails will be moved to
22930 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
22931 in @samp{INBOX}:
22932
22933 @example
22934 (setq spam-use-spamoracle t
22935       spam-split-group "Junk"
22936       nnimap-split-inbox '("INBOX")
22937       nnimap-split-rule 'nnimap-split-fancy
22938       nnimap-split-fancy '(| (: spam-split) "INBOX"))
22939 @end example
22940
22941 @defvar spam-use-spamoracle
22942 Set to @code{t} if you want Gnus to enable spam filtering using
22943 SpamOracle.
22944 @end defvar
22945
22946 @defvar spam-spamoracle-binary
22947 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
22948 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
22949 can be customized.
22950 @end defvar
22951
22952 @defvar spam-spamoracle-database
22953 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
22954 store its analyses.  This is controlled by the variable
22955 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
22956 the default SpamOracle database will be used.  In case you want your
22957 database to live somewhere special, set
22958 @code{spam-spamoracle-database} to this path.
22959 @end defvar
22960
22961 SpamOracle employs a statistical algorithm to determine whether a
22962 message is spam or ham.  In order to get good results, meaning few
22963 false hits or misses, SpamOracle needs training.  SpamOracle learns the
22964 characteristics of your spam mails.  Using the @emph{add} mode
22965 (training mode) one has to feed good (ham) and spam mails to
22966 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
22967 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
22968 spam- and ham-processors, which is much more convenient.  For a
22969 detailed description of spam- and ham-processors, @xref{Filtering Spam
22970 Using The Spam ELisp Package}.
22971
22972 @defvar gnus-group-spam-exit-processor-spamoracle
22973 Add this symbol to a group's @code{spam-process} parameter by
22974 customizing the group parameter or the
22975 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
22976 to a group's @code{spam-process} parameter, spam-marked articles will be
22977 sent to SpamOracle as spam samples.
22978 @end defvar
22979
22980 @defvar gnus-group-ham-exit-processor-spamoracle
22981 Add this symbol to a group's @code{spam-process} parameter by
22982 customizing the group parameter or the
22983 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
22984 to a grup's @code{spam-process} parameter, the ham-marked articles in
22985 @emph{ham} groups will be sent to the SpamOracle as samples of ham
22986 messages.  Note that this ham processor has no effect in @emph{spam} or
22987 @emph{unclassified} groups.
22988 @end defvar
22989
22990 @emph{Example:} These are the Group Parameters of an group that has been
22991 classified as a ham group, meaning that it should only contain ham
22992 messages.
22993 @example
22994  ((spam-contents gnus-group-spam-classification-ham)
22995   (spam-process
22996    (gnus-group-spam-exit-processor-spamoracle)))
22997 @end example
22998 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
22999 installed.  If the group contains spam message (e.g. because SpamOracle
23000 has not had enough sample messages yet) and the user marks some
23001 messages as spam messages, these messages will be processed by
23002 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23003 the messages to SpamOracle as new samples for spam.
23004
23005 @node Extending the spam elisp package
23006 @subsubsection Extending the spam elisp package
23007 @cindex spam filtering
23008 @cindex spam elisp package, extending
23009 @cindex extending the spam elisp package
23010
23011 Say you want to add a new back end called blackbox.  For filtering
23012 incoming mail, provide the following:
23013
23014 @enumerate
23015
23016 @item
23017 code
23018
23019 @lisp
23020 (defvar spam-use-blackbox nil
23021   "True if blackbox should be used.")
23022 @end lisp
23023
23024 Add
23025 @example
23026     (spam-use-blackbox   . spam-check-blackbox)
23027 @end example
23028 to @code{spam-list-of-checks}.
23029
23030 @item
23031 functionality
23032
23033 Write the @code{spam-check-blackbox} function.  It should return
23034 @samp{nil} or @code{spam-split-group}.  See the existing
23035 @code{spam-check-*} functions for examples of what you can do.
23036
23037 Make sure to add @code{spam-use-blackbox} to
23038 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23039 mail analyzer that needs the full message body to operate.
23040
23041 @end enumerate
23042
23043 For processing spam and ham messages, provide the following:
23044
23045 @enumerate
23046
23047 @item
23048 code
23049
23050 Note you don't have to provide a spam or a ham processor.  Only
23051 provide them if Blackbox supports spam or ham processing.
23052
23053 @lisp
23054 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23055   "The Blackbox summary exit spam processor.
23056 Only applicable to spam groups.")
23057
23058 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23059   "The whitelist summary exit ham processor.
23060 Only applicable to non-spam (unclassified and ham) groups.")
23061
23062 @end lisp
23063
23064 @item
23065 functionality
23066
23067 @lisp
23068 (defun spam-blackbox-register-spam-routine ()
23069   (spam-generic-register-routine
23070    ;; @r{the spam function}
23071    (lambda (article)
23072      (let ((from (spam-fetch-field-from-fast article)))
23073        (when (stringp from)
23074            (blackbox-do-something-with-this-spammer from))))
23075    ;; @r{the ham function}
23076    nil))
23077
23078 (defun spam-blackbox-register-ham-routine ()
23079   (spam-generic-register-routine
23080    ;; @r{the spam function}
23081    nil
23082    ;; @r{the ham function}
23083    (lambda (article)
23084      (let ((from (spam-fetch-field-from-fast article)))
23085        (when (stringp from)
23086            (blackbox-do-something-with-this-ham-sender from))))))
23087 @end lisp
23088
23089 Write the @code{blackbox-do-something-with-this-ham-sender} and
23090 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23091 more complex code than fetching the message sender, but keep in mind
23092 that retrieving the whole message takes significantly longer than the
23093 sender through @code{spam-fetch-field-from-fast}, because the message
23094 senders are kept in memory by Gnus.
23095
23096 @end enumerate
23097
23098
23099 @node Filtering Spam Using Statistics with spam-stat
23100 @subsection Filtering Spam Using Statistics with spam-stat
23101 @cindex Paul Graham
23102 @cindex Graham, Paul
23103 @cindex naive Bayesian spam filtering
23104 @cindex Bayesian spam filtering, naive
23105 @cindex spam filtering, naive Bayesian
23106
23107 Paul Graham has written an excellent essay about spam filtering using
23108 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23109 Spam}.  In it he describes the inherent deficiency of rule-based
23110 filtering as used by SpamAssassin, for example: Somebody has to write
23111 the rules, and everybody else has to install these rules.  You are
23112 always late.  It would be much better, he argues, to filter mail based
23113 on whether it somehow resembles spam or non-spam.  One way to measure
23114 this is word distribution.  He then goes on to describe a solution
23115 that checks whether a new mail resembles any of your other spam mails
23116 or not.
23117
23118 The basic idea is this:  Create a two collections of your mail, one
23119 with spam, one with non-spam.  Count how often each word appears in
23120 either collection, weight this by the total number of mails in the
23121 collections, and store this information in a dictionary.  For every
23122 word in a new mail, determine its probability to belong to a spam or a
23123 non-spam mail.  Use the 15 most conspicuous words, compute the total
23124 probability of the mail being spam.  If this probability is higher
23125 than a certain threshold, the mail is considered to be spam.
23126
23127 Gnus supports this kind of filtering.  But it needs some setting up.
23128 First, you need two collections of your mail, one with spam, one with
23129 non-spam.  Then you need to create a dictionary using these two
23130 collections, and save it.  And last but not least, you need to use
23131 this dictionary in your fancy mail splitting rules.
23132
23133 @menu
23134 * Creating a spam-stat dictionary::
23135 * Splitting mail using spam-stat::
23136 * Low-level interface to the spam-stat dictionary::
23137 @end menu
23138
23139 @node Creating a spam-stat dictionary
23140 @subsubsection Creating a spam-stat dictionary
23141
23142 Before you can begin to filter spam based on statistics, you must
23143 create these statistics based on two mail collections, one with spam,
23144 one with non-spam.  These statistics are then stored in a dictionary
23145 for later use.  In order for these statistics to be meaningful, you
23146 need several hundred emails in both collections.
23147
23148 Gnus currently supports only the nnml back end for automated dictionary
23149 creation.  The nnml back end stores all mails in a directory, one file
23150 per mail.  Use the following:
23151
23152 @defun spam-stat-process-spam-directory
23153 Create spam statistics for every file in this directory.  Every file
23154 is treated as one spam mail.
23155 @end defun
23156
23157 @defun spam-stat-process-non-spam-directory
23158 Create non-spam statistics for every file in this directory.  Every
23159 file is treated as one non-spam mail.
23160 @end defun
23161
23162 Usually you would call @code{spam-stat-process-spam-directory} on a
23163 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23164 the the group @samp{nnml:mail.spam}), and you would call
23165 @code{spam-stat-process-non-spam-directory} on a directory such as
23166 @file{~/Mail/mail/misc} (this usually corresponds the the group
23167 @samp{nnml:mail.misc}).
23168
23169 When you are using @acronym{IMAP}, you won't have the mails available
23170 locally, so that will not work.  One solution is to use the Gnus Agent
23171 to cache the articles.  Then you can use directories such as
23172 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23173 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23174
23175 @defvar spam-stat
23176 This variable holds the hash-table with all the statistics---the
23177 dictionary we have been talking about.  For every word in either
23178 collection, this hash-table stores a vector describing how often the
23179 word appeared in spam and often it appeared in non-spam mails.
23180 @end defvar
23181
23182 If you want to regenerate the statistics from scratch, you need to
23183 reset the dictionary.
23184
23185 @defun spam-stat-reset
23186 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23187 @end defun
23188
23189 When you are done, you must save the dictionary.  The dictionary may
23190 be rather large.  If you will not update the dictionary incrementally
23191 (instead, you will recreate it once a month, for example), then you
23192 can reduce the size of the dictionary by deleting all words that did
23193 not appear often enough or that do not clearly belong to only spam or
23194 only non-spam mails.
23195
23196 @defun spam-stat-reduce-size
23197 Reduce the size of the dictionary.  Use this only if you do not want
23198 to update the dictionary incrementally.
23199 @end defun
23200
23201 @defun spam-stat-save
23202 Save the dictionary.
23203 @end defun
23204
23205 @defvar spam-stat-file
23206 The filename used to store the dictionary.  This defaults to
23207 @file{~/.spam-stat.el}.
23208 @end defvar
23209
23210 @node Splitting mail using spam-stat
23211 @subsubsection Splitting mail using spam-stat
23212
23213 In order to use @code{spam-stat} to split your mail, you need to add the
23214 following to your @file{~/.gnus.el} file:
23215
23216 @lisp
23217 (require 'spam-stat)
23218 (spam-stat-load)
23219 @end lisp
23220
23221 This will load the necessary Gnus code, and the dictionary you
23222 created.
23223
23224 Next, you need to adapt your fancy splitting rules:  You need to
23225 determine how to use @code{spam-stat}.  The following examples are for
23226 the nnml back end.  Using the nnimap back end works just as well.  Just
23227 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23228
23229 In the simplest case, you only have two groups, @samp{mail.misc} and
23230 @samp{mail.spam}.  The following expression says that mail is either
23231 spam or it should go into @samp{mail.misc}.  If it is spam, then
23232 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23233
23234 @lisp
23235 (setq nnmail-split-fancy
23236       `(| (: spam-stat-split-fancy)
23237           "mail.misc"))
23238 @end lisp
23239
23240 @defvar spam-stat-split-fancy-spam-group
23241 The group to use for spam.  Default is @samp{mail.spam}.
23242 @end defvar
23243
23244 If you also filter mail with specific subjects into other groups, use
23245 the following expression.  Only mails not matching the regular
23246 expression are considered potential spam.
23247
23248 @lisp
23249 (setq nnmail-split-fancy
23250       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23251           (: spam-stat-split-fancy)
23252           "mail.misc"))
23253 @end lisp
23254
23255 If you want to filter for spam first, then you must be careful when
23256 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23257 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23258 non-spam, therefore both should be in your collection of non-spam
23259 mails, when creating the dictionary!
23260
23261 @lisp
23262 (setq nnmail-split-fancy
23263       `(| (: spam-stat-split-fancy)
23264           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23265           "mail.misc"))
23266 @end lisp
23267
23268 You can combine this with traditional filtering.  Here, we move all
23269 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23270 @code{spam-stat-split-fancy} will never see them, the mails in
23271 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23272 nor in your collection of non-spam mails, when creating the
23273 dictionary!
23274
23275 @lisp
23276 (setq nnmail-split-fancy
23277       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23278           (: spam-stat-split-fancy)
23279           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23280           "mail.misc"))
23281 @end lisp
23282
23283
23284 @node Low-level interface to the spam-stat dictionary
23285 @subsubsection Low-level interface to the spam-stat dictionary
23286
23287 The main interface to using @code{spam-stat}, are the following functions:
23288
23289 @defun spam-stat-buffer-is-spam
23290 Called in a buffer, that buffer is considered to be a new spam mail.
23291 Use this for new mail that has not been processed before.
23292 @end defun
23293
23294 @defun spam-stat-buffer-is-no-spam
23295 Called in a buffer, that buffer is considered to be a new non-spam
23296 mail.  Use this for new mail that has not been processed before.
23297 @end defun
23298
23299 @defun spam-stat-buffer-change-to-spam
23300 Called in a buffer, that buffer is no longer considered to be normal
23301 mail but spam.  Use this to change the status of a mail that has
23302 already been processed as non-spam.
23303 @end defun
23304
23305 @defun spam-stat-buffer-change-to-non-spam
23306 Called in a buffer, that buffer is no longer considered to be spam but
23307 normal mail.  Use this to change the status of a mail that has already
23308 been processed as spam.
23309 @end defun
23310
23311 @defun spam-stat-save
23312 Save the hash table to the file.  The filename used is stored in the
23313 variable @code{spam-stat-file}.
23314 @end defun
23315
23316 @defun spam-stat-load
23317 Load the hash table from a file.  The filename used is stored in the
23318 variable @code{spam-stat-file}.
23319 @end defun
23320
23321 @defun spam-stat-score-word
23322 Return the spam score for a word.
23323 @end defun
23324
23325 @defun spam-stat-score-buffer
23326 Return the spam score for a buffer.
23327 @end defun
23328
23329 @defun spam-stat-split-fancy
23330 Use this function for fancy mail splitting.  Add the rule @samp{(:
23331 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23332 @end defun
23333
23334 Make sure you load the dictionary before using it.  This requires the
23335 following in your @file{~/.gnus.el} file:
23336
23337 @lisp
23338 (require 'spam-stat)
23339 (spam-stat-load)
23340 @end lisp
23341
23342 Typical test will involve calls to the following functions:
23343
23344 @smallexample
23345 Reset: (setq spam-stat (make-hash-table :test 'equal))
23346 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23347 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23348 Save table: (spam-stat-save)
23349 File size: (nth 7 (file-attributes spam-stat-file))
23350 Number of words: (hash-table-count spam-stat)
23351 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23352 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23353 Reduce table size: (spam-stat-reduce-size)
23354 Save table: (spam-stat-save)
23355 File size: (nth 7 (file-attributes spam-stat-file))
23356 Number of words: (hash-table-count spam-stat)
23357 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23358 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23359 @end smallexample
23360
23361 Here is how you would create your dictionary:
23362
23363 @smallexample
23364 Reset: (setq spam-stat (make-hash-table :test 'equal))
23365 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23366 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23367 Repeat for any other non-spam group you need...
23368 Reduce table size: (spam-stat-reduce-size)
23369 Save table: (spam-stat-save)
23370 @end smallexample
23371
23372 @node Various Various
23373 @section Various Various
23374 @cindex mode lines
23375 @cindex highlights
23376
23377 @table @code
23378
23379 @item gnus-home-directory
23380 @vindex gnus-home-directory
23381 All Gnus file and directory variables will be initialized from this
23382 variable, which defaults to @file{~/}.
23383
23384 @item gnus-directory
23385 @vindex gnus-directory
23386 Most Gnus storage file and directory variables will be initialized from
23387 this variable, which defaults to the @env{SAVEDIR} environment
23388 variable, or @file{~/News/} if that variable isn't set.
23389
23390 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
23391 This means that other directory variables that are initialized from this
23392 variable won't be set properly if you set this variable in
23393 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
23394
23395 @item gnus-default-directory
23396 @vindex gnus-default-directory
23397 Not related to the above variable at all---this variable says what the
23398 default directory of all Gnus buffers should be.  If you issue commands
23399 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23400 default directory.  If this variable is @code{nil} (which is the
23401 default), the default directory will be the default directory of the
23402 buffer you were in when you started Gnus.
23403
23404 @item gnus-verbose
23405 @vindex gnus-verbose
23406 This variable is an integer between zero and ten.  The higher the value,
23407 the more messages will be displayed.  If this variable is zero, Gnus
23408 will never flash any messages, if it is seven (which is the default),
23409 most important messages will be shown, and if it is ten, Gnus won't ever
23410 shut up, but will flash so many messages it will make your head swim.
23411
23412 @item gnus-verbose-backends
23413 @vindex gnus-verbose-backends
23414 This variable works the same way as @code{gnus-verbose}, but it applies
23415 to the Gnus back ends instead of Gnus proper.
23416
23417 @item nnheader-max-head-length
23418 @vindex nnheader-max-head-length
23419 When the back ends read straight heads of articles, they all try to read
23420 as little as possible.  This variable (default 4096) specifies
23421 the absolute max length the back ends will try to read before giving up
23422 on finding a separator line between the head and the body.  If this
23423 variable is @code{nil}, there is no upper read bound.  If it is
23424 @code{t}, the back ends won't try to read the articles piece by piece,
23425 but read the entire articles.  This makes sense with some versions of
23426 @code{ange-ftp} or @code{efs}.
23427
23428 @item nnheader-head-chop-length
23429 @vindex nnheader-head-chop-length
23430 This variable (default 2048) says how big a piece of each article to
23431 read when doing the operation described above.
23432
23433 @item nnheader-file-name-translation-alist
23434 @vindex nnheader-file-name-translation-alist
23435 @cindex file names
23436 @cindex invalid characters in file names
23437 @cindex characters in file names
23438 This is an alist that says how to translate characters in file names.
23439 For instance, if @samp{:} is invalid as a file character in file names
23440 on your system (you OS/2 user you), you could say something like:
23441
23442 @lisp
23443 @group
23444 (setq nnheader-file-name-translation-alist
23445       '((?: . ?_)))
23446 @end group
23447 @end lisp
23448
23449 In fact, this is the default value for this variable on OS/2 and MS
23450 Windows (phooey) systems.
23451
23452 @item gnus-hidden-properties
23453 @vindex gnus-hidden-properties
23454 This is a list of properties to use to hide ``invisible'' text.  It is
23455 @code{(invisible t intangible t)} by default on most systems, which
23456 makes invisible text invisible and intangible.
23457
23458 @item gnus-parse-headers-hook
23459 @vindex gnus-parse-headers-hook
23460 A hook called before parsing headers.  It can be used, for instance, to
23461 gather statistics on the headers fetched, or perhaps you'd like to prune
23462 some headers.  I don't see why you'd want that, though.
23463
23464 @item gnus-shell-command-separator
23465 @vindex gnus-shell-command-separator
23466 String used to separate two shell commands.  The default is @samp{;}.
23467
23468 @item gnus-invalid-group-regexp
23469 @vindex gnus-invalid-group-regexp
23470
23471 Regexp to match ``invalid'' group names when querying user for a group
23472 name.  The default value catches some @strong{really} invalid group
23473 names who could possibly mess up Gnus internally (like allowing
23474 @samp{:} in a group name, which is normally used to delimit method and
23475 group).
23476
23477 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23478
23479
23480 @end table
23481
23482 @node The End
23483 @chapter The End
23484
23485 Well, that's the manual---you can get on with your life now.  Keep in
23486 touch.  Say hello to your cats from me.
23487
23488 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23489
23490 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23491
23492 @quotation
23493 @strong{Te Deum}
23494
23495 @sp 1
23496 Not because of victories @*
23497 I sing,@*
23498 having none,@*
23499 but for the common sunshine,@*
23500 the breeze,@*
23501 the largess of the spring.
23502
23503 @sp 1
23504 Not for victory@*
23505 but for the day's work done@*
23506 as well as I was able;@*
23507 not for a seat upon the dais@*
23508 but at the common table.@*
23509 @end quotation
23510
23511
23512 @node Appendices
23513 @chapter Appendices
23514
23515 @menu
23516 * XEmacs::                      Requirements for installing under XEmacs.
23517 * History::                     How Gnus got where it is today.
23518 * On Writing Manuals::          Why this is not a beginner's guide.
23519 * Terminology::                 We use really difficult, like, words here.
23520 * Customization::               Tailoring Gnus to your needs.
23521 * Troubleshooting::             What you might try if things do not work.
23522 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23523 * Emacs for Heathens::          A short introduction to Emacsian terms.
23524 * Frequently Asked Questions::  The Gnus FAQ
23525 @end menu
23526
23527
23528 @node XEmacs
23529 @section XEmacs
23530 @cindex XEmacs
23531 @cindex installing under XEmacs
23532
23533 XEmacs is distributed as a collection of packages.  You should install
23534 whatever packages the Gnus XEmacs package requires.  The current
23535 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23536 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23537 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23538 @samp{misc-games} package is required for Morse decoding.
23539
23540
23541 @node History
23542 @section History
23543
23544 @cindex history
23545 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23546 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23547
23548 If you want to investigate the person responsible for this outrage,
23549 you can point your (feh!) web browser to
23550 @uref{http://quimby.gnus.org/}.  This is also the primary
23551 distribution point for the new and spiffy versions of Gnus, and is
23552 known as The Site That Destroys Newsrcs And Drives People Mad.
23553
23554 During the first extended alpha period of development, the new Gnus was
23555 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23556 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23557 (Besides, the ``Gnus'' in this abbreviation should probably be
23558 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23559 appropriate name, don't you think?)
23560
23561 In any case, after spending all that energy on coming up with a new and
23562 spunky name, we decided that the name was @emph{too} spunky, so we
23563 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23564 ``@sc{gnus}''.  New vs. old.
23565
23566 @menu
23567 * Gnus Versions::               What Gnus versions have been released.
23568 * Other Gnus Versions::         Other Gnus versions that also have been released.
23569 * Why?::                        What's the point of Gnus?
23570 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23571 * Conformity::                  Gnus tries to conform to all standards.
23572 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23573 * Gnus Development::            How Gnus is developed.
23574 * Contributors::                Oodles of people.
23575 * New Features::                Pointers to some of the new stuff in Gnus.
23576 @end menu
23577
23578
23579 @node Gnus Versions
23580 @subsection Gnus Versions
23581 @cindex ding Gnus
23582 @cindex September Gnus
23583 @cindex Red Gnus
23584 @cindex Quassia Gnus
23585 @cindex Pterodactyl Gnus
23586 @cindex Oort Gnus
23587 @cindex No Gnus
23588 @cindex Gnus versions
23589
23590 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23591 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23592 plus 15 Gnus 5.0 releases).
23593
23594 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23595 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23596
23597 On July 28th 1996 work on Red Gnus was begun, and it was released on
23598 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23599
23600 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23601 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23602
23603 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23604 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23605 1999.
23606
23607 On the 26th of October 2000, Oort Gnus was begun.
23608
23609 If you happen upon a version of Gnus that has a prefixed name --
23610 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23611 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23612 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23613 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23614 released version of Gnus and snuggle up to that instead.
23615
23616
23617 @node Other Gnus Versions
23618 @subsection Other Gnus Versions
23619 @cindex Semi-gnus
23620
23621 In addition to the versions of Gnus which have had their releases
23622 coordinated by Lars, one major development has been Semi-gnus from
23623 Japan.  It's based on a library called @acronym{SEMI}, which provides
23624 @acronym{MIME} capabilities.
23625
23626 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23627 Collectively, they are called ``Semi-gnus'', and different strains are
23628 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23629 @acronym{MIME} and multilingualization things, especially important for
23630 Japanese users.
23631
23632
23633 @node Why?
23634 @subsection Why?
23635
23636 What's the point of Gnus?
23637
23638 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23639 newsreader, that lets you do anything you can think of.  That was my
23640 original motivation, but while working on Gnus, it has become clear to
23641 me that this generation of newsreaders really belong in the stone age.
23642 Newsreaders haven't developed much since the infancy of the net.  If the
23643 volume continues to rise with the current rate of increase, all current
23644 newsreaders will be pretty much useless.  How do you deal with
23645 newsgroups that have thousands of new articles each day?  How do you
23646 keep track of millions of people who post?
23647
23648 Gnus offers no real solutions to these questions, but I would very much
23649 like to see Gnus being used as a testing ground for new methods of
23650 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23651 to separate the newsreader from the back ends, Gnus now offers a simple
23652 interface for anybody who wants to write new back ends for fetching mail
23653 and news from different sources.  I have added hooks for customizations
23654 everywhere I could imagine it being useful.  By doing so, I'm inviting
23655 every one of you to explore and invent.
23656
23657 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23658 @kbd{C-u 100 M-x all-hail-xemacs}.
23659
23660
23661 @node Compatibility
23662 @subsection Compatibility
23663
23664 @cindex compatibility
23665 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23666 bindings have been kept.  More key bindings have been added, of course,
23667 but only in one or two obscure cases have old bindings been changed.
23668
23669 Our motto is:
23670 @quotation
23671 @cartouche
23672 @center In a cloud bones of steel.
23673 @end cartouche
23674 @end quotation
23675
23676 All commands have kept their names.  Some internal functions have changed
23677 their names.
23678
23679 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23680 Articles}.
23681
23682 One major compatibility question is the presence of several summary
23683 buffers.  All variables relevant while reading a group are
23684 buffer-local to the summary buffer they belong in.  Although many
23685 important variables have their values copied into their global
23686 counterparts whenever a command is executed in the summary buffer, this
23687 change might lead to incorrect values being used unless you are careful.
23688
23689 All code that relies on knowledge of @sc{gnus} internals will probably
23690 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23691 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23692 maintains a hash table that points to the entries in this alist (which
23693 speeds up many functions), and changing the alist directly will lead to
23694 peculiar results.
23695
23696 @cindex hilit19
23697 @cindex highlighting
23698 Old hilit19 code does not work at all.  In fact, you should probably
23699 remove all hilit code from all Gnus hooks
23700 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23701 Gnus provides various integrated functions for highlighting.  These are
23702 faster and more accurate.  To make life easier for everybody, Gnus will
23703 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23704 Away!
23705
23706 Packages like @code{expire-kill} will no longer work.  As a matter of
23707 fact, you should probably remove all old @sc{gnus} packages (and other
23708 code) when you start using Gnus.  More likely than not, Gnus already
23709 does what you have written code to make @sc{gnus} do.  (Snicker.)
23710
23711 Even though old methods of doing things are still supported, only the
23712 new methods are documented in this manual.  If you detect a new method of
23713 doing something while reading this manual, that does not mean you have
23714 to stop doing it the old way.
23715
23716 Gnus understands all @sc{gnus} startup files.
23717
23718 @kindex M-x gnus-bug
23719 @findex gnus-bug
23720 @cindex reporting bugs
23721 @cindex bugs
23722 Overall, a casual user who hasn't written much code that depends on
23723 @sc{gnus} internals should suffer no problems.  If problems occur,
23724 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23725
23726 @vindex gnus-bug-create-help-buffer
23727 If you are in the habit of sending bug reports @emph{very} often, you
23728 may find the helpful help buffer annoying after a while.  If so, set
23729 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23730 up at you.
23731
23732
23733 @node Conformity
23734 @subsection Conformity
23735
23736 No rebels without a clue here, ma'am.  We conform to all standards known
23737 to (wo)man.  Except for those standards and/or conventions we disagree
23738 with, of course.
23739
23740 @table @strong
23741
23742 @item RFC (2)822
23743 @cindex RFC 822
23744 @cindex RFC 2822
23745 There are no known breaches of this standard.
23746
23747 @item RFC 1036
23748 @cindex RFC 1036
23749 There are no known breaches of this standard, either.
23750
23751 @item Son-of-RFC 1036
23752 @cindex Son-of-RFC 1036
23753 We do have some breaches to this one.
23754
23755 @table @emph
23756
23757 @item X-Newsreader
23758 @itemx User-Agent
23759 These are considered to be ``vanity headers'', while I consider them
23760 to be consumer information.  After seeing so many badly formatted
23761 articles coming from @code{tin} and @code{Netscape} I know not to use
23762 either of those for posting articles.  I would not have known that if
23763 it wasn't for the @code{X-Newsreader} header.
23764 @end table
23765
23766 @item USEFOR
23767 @cindex USEFOR
23768 USEFOR is an IETF working group writing a successor to RFC 1036, based
23769 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23770 various changes to the format of news articles.  The Gnus towers will
23771 look into implementing the changes when the draft is accepted as an RFC.
23772
23773 @item MIME - RFC 2045-2049 etc
23774 @cindex @acronym{MIME}
23775 All the various @acronym{MIME} RFCs are supported.
23776
23777 @item Disposition Notifications - RFC 2298
23778 Message Mode is able to request notifications from the receiver.
23779
23780 @item PGP - RFC 1991 and RFC 2440
23781 @cindex RFC 1991
23782 @cindex RFC 2440
23783 RFC 1991 is the original @acronym{PGP} message specification,
23784 published as an informational RFC.  RFC 2440 was the follow-up, now
23785 called Open PGP, and put on the Standards Track.  Both document a
23786 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23787 encoding (signing and encryption) and decoding (verification and
23788 decryption).
23789
23790 @item PGP/MIME - RFC 2015/3156
23791 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23792 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23793 Gnus supports both encoding and decoding.
23794
23795 @item S/MIME - RFC 2633
23796 RFC 2633 describes the @acronym{S/MIME} format.
23797
23798 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23799 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23800 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23801 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23802 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23803 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23804 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23805 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23806
23807 @end table
23808
23809 If you ever notice Gnus acting non-compliant with regards to the texts
23810 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23811 know.
23812
23813
23814 @node Emacsen
23815 @subsection Emacsen
23816 @cindex Emacsen
23817 @cindex XEmacs
23818 @cindex Mule
23819 @cindex Emacs
23820
23821 Gnus should work on :
23822
23823 @itemize @bullet
23824
23825 @item
23826 Emacs 20.3 and up.
23827
23828 @item
23829 XEmacs 21.1.1 and up.
23830
23831 @end itemize
23832
23833 This Gnus version will absolutely not work on any Emacsen older than
23834 that.  Not reliably, at least.  Older versions of Gnus may work on older
23835 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
23836 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
23837 See the file ``README'' in the T-gnus distribution for more details.
23838
23839 There are some vague differences between Gnus on the various
23840 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23841 other than that, things should look pretty much the same under all
23842 Emacsen.
23843
23844
23845 @node Gnus Development
23846 @subsection Gnus Development
23847
23848 Gnus is developed in a two-phased cycle.  The first phase involves much
23849 discussion on the @samp{ding@@gnus.org} mailing list, where people
23850 propose changes and new features, post patches and new back ends.  This
23851 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23852 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23853 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23854 unstable and should not be used by casual users.  Gnus alpha releases
23855 have names like ``Red Gnus'' and ``Quassia Gnus''.
23856
23857 After futzing around for 50-100 alpha releases, Gnus is declared
23858 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23859 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23860 supposed to be able to use these, and these are mostly discussed on the
23861 @samp{gnu.emacs.gnus} newsgroup.
23862
23863 @cindex Incoming*
23864 @vindex mail-source-delete-incoming
23865 Some variable defaults differ between alpha Gnusae and released Gnusae.
23866 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23867 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23868 lossage of mail if an alpha release hiccups while handling the mail.
23869
23870 The division of discussion between the ding mailing list and the Gnus
23871 newsgroup is not purely based on publicity concerns.  It's true that
23872 having people write about the horrible things that an alpha Gnus release
23873 can do (sometimes) in a public forum may scare people off, but more
23874 importantly, talking about new experimental features that have been
23875 introduced may confuse casual users.  New features are frequently
23876 introduced, fiddled with, and judged to be found wanting, and then
23877 either discarded or totally rewritten.  People reading the mailing list
23878 usually keep up with these rapid changes, while people on the newsgroup
23879 can't be assumed to do so.
23880
23881
23882
23883 @node Contributors
23884 @subsection Contributors
23885 @cindex contributors
23886
23887 The new Gnus version couldn't have been done without the help of all the
23888 people on the (ding) mailing list.  Every day for over a year I have
23889 gotten billions of nice bug reports from them, filling me with joy,
23890 every single one of them.  Smooches.  The people on the list have been
23891 tried beyond endurance, what with my ``oh, that's a neat idea <type
23892 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23893 work at all <type type>, yup, I'll ship that one off right away <ship
23894 off> no, wait, that absolutely does not work'' policy for releases.
23895 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23896 ``worser''? ``much worser''?  ``worsest''?)
23897
23898 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23899 wrong show.
23900
23901 @itemize @bullet
23902
23903 @item
23904 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23905
23906 @item
23907 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23908 nnwarchive and many, many other things connected with @acronym{MIME} and
23909 other types of en/decoding, as well as general bug fixing, new
23910 functionality and stuff.
23911
23912 @item
23913 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23914 well as numerous other things).
23915
23916 @item
23917 Luis Fernandes---design and graphics.
23918
23919 @item
23920 Joe Reiss---creator of the smiley faces.
23921
23922 @item
23923 Justin Sheehy---the @acronym{FAQ} maintainer.
23924
23925 @item
23926 Erik Naggum---help, ideas, support, code and stuff.
23927
23928 @item
23929 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23930 @dfn{picons} (@pxref{Picons}).
23931
23932 @item
23933 Kim-Minh Kaplan---further work on the picon code.
23934
23935 @item
23936 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23937 (@pxref{GroupLens}).
23938
23939 @item
23940 Sudish Joseph---innumerable bug fixes.
23941
23942 @item
23943 Ilja Weis---@file{gnus-topic.el}.
23944
23945 @item
23946 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23947
23948 @item
23949 Vladimir Alexiev---the refcard and reference booklets.
23950
23951 @item
23952 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23953 distribution by Felix Lee and JWZ.
23954
23955 @item
23956 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23957
23958 @item
23959 Peter Mutsaers---orphan article scoring code.
23960
23961 @item
23962 Ken Raeburn---POP mail support.
23963
23964 @item
23965 Hallvard B Furuseth---various bits and pieces, especially dealing with
23966 .newsrc files.
23967
23968 @item
23969 Brian Edmonds---@file{gnus-bbdb.el}.
23970
23971 @item
23972 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23973
23974 @item
23975 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
23976
23977 @item
23978 François Pinard---many, many interesting and thorough bug reports, as
23979 well as autoconf support.
23980
23981 @end itemize
23982
23983 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
23984 Borges, and Jost Krieger proof-reading parts of the manual.
23985
23986 The following people have contributed many patches and suggestions:
23987
23988 Christopher Davis,
23989 Andrew Eskilsson,
23990 Kai Grossjohann,
23991 Kevin Greiner,
23992 Jesper Harder,
23993 Paul Jarc,
23994 Simon Josefsson,
23995 David KÃ¥gedal,
23996 Richard Pieri,
23997 Fabrice Popineau,
23998 Daniel Quinlan,
23999 Michael Shields,
24000 Reiner Steib,
24001 Jason L. Tibbitts, III,
24002 Jack Vinson,
24003 Katsumi Yamaoka, @c Yamaoka
24004 and
24005 Teodor Zlatanov.
24006
24007 Also thanks to the following for patches and stuff:
24008
24009 Jari Aalto,
24010 Adrian Aichner,
24011 Vladimir Alexiev,
24012 Russ Allbery,
24013 Peter Arius,
24014 Matt Armstrong,
24015 Marc Auslander,
24016 Miles Bader,
24017 Alexei V. Barantsev,
24018 Frank Bennett,
24019 Robert Bihlmeyer,
24020 Chris Bone,
24021 Mark Borges,
24022 Mark Boyns,
24023 Lance A. Brown,
24024 Rob Browning,
24025 Kees de Bruin,
24026 Martin Buchholz,
24027 Joe Buehler,
24028 Kevin Buhr,
24029 Alastair Burt,
24030 Joao Cachopo,
24031 Zlatko Calusic,
24032 Massimo Campostrini,
24033 Castor,
24034 David Charlap,
24035 Dan Christensen,
24036 Kevin Christian,
24037 Jae-you Chung, @c ?
24038 James H. Cloos, Jr.,
24039 Laura Conrad,
24040 Michael R. Cook,
24041 Glenn Coombs,
24042 Andrew J. Cosgriff,
24043 Neil Crellin,
24044 Frank D. Cringle,
24045 Geoffrey T. Dairiki,
24046 Andre Deparade,
24047 Ulrik Dickow,
24048 Dave Disser,
24049 Rui-Tao Dong, @c ?
24050 Joev Dubach,
24051 Michael Welsh Duggan,
24052 Dave Edmondson,
24053 Paul Eggert,
24054 Mark W. Eichin,
24055 Karl Eichwalder,
24056 Enami Tsugutomo, @c Enami
24057 Michael Ernst,
24058 Luc Van Eycken,
24059 Sam Falkner,
24060 Nelson Jose dos Santos Ferreira,
24061 Sigbjorn Finne,
24062 Sven Fischer,
24063 Paul Fisher,
24064 Decklin Foster,
24065 Gary D. Foster,
24066 Paul Franklin,
24067 Guy Geens,
24068 Arne Georg Gleditsch,
24069 David S. Goldberg,
24070 Michelangelo Grigni,
24071 Dale Hagglund,
24072 D. Hall,
24073 Magnus Hammerin,
24074 Kenichi Handa, @c Handa
24075 Raja R. Harinath,
24076 Yoshiki Hayashi, @c Hayashi
24077 P. E. Jareth Hein,
24078 Hisashige Kenji, @c Hisashige
24079 Scott Hofmann,
24080 Marc Horowitz,
24081 Gunnar Horrigmo,
24082 Richard Hoskins,
24083 Brad Howes,
24084 Miguel de Icaza,
24085 François Felix Ingrand,
24086 Tatsuya Ichikawa, @c Ichikawa
24087 Ishikawa Ichiro, @c Ishikawa
24088 Lee Iverson,
24089 Iwamuro Motonori, @c Iwamuro
24090 Rajappa Iyer,
24091 Andreas Jaeger,
24092 Adam P. Jenkins,
24093 Randell Jesup,
24094 Fred Johansen,
24095 Gareth Jones,
24096 Greg Klanderman,
24097 Karl Kleinpaste,
24098 Michael Klingbeil,
24099 Peter Skov Knudsen,
24100 Shuhei Kobayashi, @c Kobayashi
24101 Petr Konecny,
24102 Koseki Yoshinori, @c Koseki
24103 Thor Kristoffersen,
24104 Jens Lautenbacher,
24105 Martin Larose,
24106 Seokchan Lee, @c Lee
24107 Joerg Lenneis,
24108 Carsten Leonhardt,
24109 James LewisMoss,
24110 Christian Limpach,
24111 Markus Linnala,
24112 Dave Love,
24113 Mike McEwan,
24114 Tonny Madsen,
24115 Shlomo Mahlab,
24116 Nat Makarevitch,
24117 Istvan Marko,
24118 David Martin,
24119 Jason R. Mastaler,
24120 Gordon Matzigkeit,
24121 Timo Metzemakers,
24122 Richard Mlynarik,
24123 Lantz Moore,
24124 Morioka Tomohiko, @c Morioka
24125 Erik Toubro Nielsen,
24126 Hrvoje Niksic,
24127 Andy Norman,
24128 Fred Oberhauser,
24129 C. R. Oldham,
24130 Alexandre Oliva,
24131 Ken Olstad,
24132 Masaharu Onishi, @c Onishi
24133 Hideki Ono, @c Ono
24134 Ettore Perazzoli,
24135 William Perry,
24136 Stephen Peters,
24137 Jens-Ulrik Holger Petersen,
24138 Ulrich Pfeifer,
24139 Matt Pharr,
24140 Andy Piper,
24141 John McClary Prevost,
24142 Bill Pringlemeir,
24143 Mike Pullen,
24144 Jim Radford,
24145 Colin Rafferty,
24146 Lasse Rasinen,
24147 Lars Balker Rasmussen,
24148 Joe Reiss,
24149 Renaud Rioboo,
24150 Roland B. Roberts,
24151 Bart Robinson,
24152 Christian von Roques,
24153 Markus Rost,
24154 Jason Rumney,
24155 Wolfgang Rupprecht,
24156 Jay Sachs,
24157 Dewey M. Sasser,
24158 Conrad Sauerwald,
24159 Loren Schall,
24160 Dan Schmidt,
24161 Ralph Schleicher,
24162 Philippe Schnoebelen,
24163 Andreas Schwab,
24164 Randal L. Schwartz,
24165 Danny Siu,
24166 Matt Simmons,
24167 Paul D. Smith,
24168 Jeff Sparkes,
24169 Toby Speight,
24170 Michael Sperber,
24171 Darren Stalder,
24172 Richard Stallman,
24173 Greg Stark,
24174 Sam Steingold,
24175 Paul Stevenson,
24176 Jonas Steverud,
24177 Paul Stodghill,
24178 Kiyokazu Suto, @c Suto
24179 Kurt Swanson,
24180 Samuel Tardieu,
24181 Teddy,
24182 Chuck Thompson,
24183 Tozawa Akihiko, @c Tozawa
24184 Philippe Troin,
24185 James Troup,
24186 Trung Tran-Duc,
24187 Jack Twilley,
24188 Aaron M. Ucko,
24189 Aki Vehtari,
24190 Didier Verna,
24191 Vladimir Volovich,
24192 Jan Vroonhof,
24193 Stefan Waldherr,
24194 Pete Ware,
24195 Barry A. Warsaw,
24196 Christoph Wedler,
24197 Joe Wells,
24198 Lee Willis,
24199 and
24200 Lloyd Zusman.
24201
24202
24203 For a full overview of what each person has done, the ChangeLogs
24204 included in the Gnus alpha distributions should give ample reading
24205 (550kB and counting).
24206
24207 Apologies to everybody that I've forgotten, of which there are many, I'm
24208 sure.
24209
24210 Gee, that's quite a list of people.  I guess that must mean that there
24211 actually are people who are using Gnus.  Who'd'a thunk it!
24212
24213
24214 @node New Features
24215 @subsection New Features
24216 @cindex new features
24217
24218 @menu
24219 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24220 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24221 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24222 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24223 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24224 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24225 @end menu
24226
24227 These lists are, of course, just @emph{short} overviews of the
24228 @emph{most} important new features.  No, really.  There are tons more.
24229 Yes, we have feeping creaturism in full effect.
24230
24231 @node ding Gnus
24232 @subsubsection (ding) Gnus
24233
24234 New features in Gnus 5.0/5.1:
24235
24236 @itemize @bullet
24237
24238 @item
24239 The look of all buffers can be changed by setting format-like variables
24240 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24241
24242 @item
24243 Local spool and several @acronym{NNTP} servers can be used at once
24244 (@pxref{Select Methods}).
24245
24246 @item
24247 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24248
24249 @item
24250 You can read a number of different mail formats (@pxref{Getting Mail}).
24251 All the mail back ends implement a convenient mail expiry scheme
24252 (@pxref{Expiring Mail}).
24253
24254 @item
24255 Gnus can use various strategies for gathering threads that have lost
24256 their roots (thereby gathering loose sub-threads into one thread) or it
24257 can go back and retrieve enough headers to build a complete thread
24258 (@pxref{Customizing Threading}).
24259
24260 @item
24261 Killed groups can be displayed in the group buffer, and you can read
24262 them as well (@pxref{Listing Groups}).
24263
24264 @item
24265 Gnus can do partial group updates---you do not have to retrieve the
24266 entire active file just to check for new articles in a few groups
24267 (@pxref{The Active File}).
24268
24269 @item
24270 Gnus implements a sliding scale of subscribedness to groups
24271 (@pxref{Group Levels}).
24272
24273 @item
24274 You can score articles according to any number of criteria
24275 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24276 articles for you (@pxref{Adaptive Scoring}).
24277
24278 @item
24279 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24280 manner, so it should be difficult to lose much data on what you have
24281 read if your machine should go down (@pxref{Auto Save}).
24282
24283 @item
24284 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24285 cluttering up the @file{.emacs} file.
24286
24287 @item
24288 You can set the process mark on both groups and articles and perform
24289 operations on all the marked items (@pxref{Process/Prefix}).
24290
24291 @item
24292 You can grep through a subset of groups and create a group from the
24293 results (@pxref{Kibozed Groups}).
24294
24295 @item
24296 You can list subsets of groups according to, well, anything
24297 (@pxref{Listing Groups}).
24298
24299 @item
24300 You can browse foreign servers and subscribe to groups from those
24301 servers (@pxref{Browse Foreign Server}).
24302
24303 @item
24304 Gnus can fetch articles, asynchronously, on a second connection to the
24305 server (@pxref{Asynchronous Fetching}).
24306
24307 @item
24308 You can cache articles locally (@pxref{Article Caching}).
24309
24310 @item
24311 The uudecode functions have been expanded and generalized
24312 (@pxref{Decoding Articles}).
24313
24314 @item
24315 You can still post uuencoded articles, which was a little-known feature
24316 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24317
24318 @item
24319 Fetching parents (and other articles) now actually works without
24320 glitches (@pxref{Finding the Parent}).
24321
24322 @item
24323 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24324
24325 @item
24326 Digests (and other files) can be used as the basis for groups
24327 (@pxref{Document Groups}).
24328
24329 @item
24330 Articles can be highlighted and customized (@pxref{Customizing
24331 Articles}).
24332
24333 @item
24334 URLs and other external references can be buttonized (@pxref{Article
24335 Buttons}).
24336
24337 @item
24338 You can do lots of strange stuff with the Gnus window & frame
24339 configuration (@pxref{Window Layout}).
24340
24341 @item
24342 You can click on buttons instead of using the keyboard
24343 (@pxref{Buttons}).
24344
24345 @end itemize
24346
24347
24348 @node September Gnus
24349 @subsubsection September Gnus
24350
24351 @iftex
24352 @iflatex
24353 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24354 @end iflatex
24355 @end iftex
24356
24357 New features in Gnus 5.2/5.3:
24358
24359 @itemize @bullet
24360
24361 @item
24362 A new message composition mode is used.  All old customization variables
24363 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24364 now obsolete.
24365
24366 @item
24367 Gnus is now able to generate @dfn{sparse} threads---threads where
24368 missing articles are represented by empty nodes (@pxref{Customizing
24369 Threading}).
24370
24371 @lisp
24372 (setq gnus-build-sparse-threads 'some)
24373 @end lisp
24374
24375 @item
24376 Outgoing articles are stored on a special archive server
24377 (@pxref{Archived Messages}).
24378
24379 @item
24380 Partial thread regeneration now happens when articles are
24381 referred.
24382
24383 @item
24384 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24385
24386 @item
24387 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24388
24389 @item
24390 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24391
24392 @lisp
24393 (setq gnus-use-trees t)
24394 @end lisp
24395
24396 @item
24397 An @code{nn}-like pick-and-read minor mode is available for the summary
24398 buffers (@pxref{Pick and Read}).
24399
24400 @lisp
24401 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24402 @end lisp
24403
24404 @item
24405 In binary groups you can use a special binary minor mode (@pxref{Binary
24406 Groups}).
24407
24408 @item
24409 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24410 Topics}).
24411
24412 @lisp
24413 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24414 @end lisp
24415
24416 @item
24417 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24418
24419 @item
24420 Groups can now have a score, and bubbling based on entry frequency
24421 is possible (@pxref{Group Score}).
24422
24423 @lisp
24424 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24425 @end lisp
24426
24427 @item
24428 Groups can be process-marked, and commands can be performed on
24429 groups of groups (@pxref{Marking Groups}).
24430
24431 @item
24432 Caching is possible in virtual groups.
24433
24434 @item
24435 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24436 news batches, ClariNet briefs collections, and just about everything
24437 else (@pxref{Document Groups}).
24438
24439 @item
24440 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24441 (@pxref{SOUP}).
24442
24443 @item
24444 The Gnus cache is much faster.
24445
24446 @item
24447 Groups can be sorted according to many criteria (@pxref{Sorting
24448 Groups}).
24449
24450 @item
24451 New group parameters have been introduced to set list-addresses and
24452 expiry times (@pxref{Group Parameters}).
24453
24454 @item
24455 All formatting specs allow specifying faces to be used
24456 (@pxref{Formatting Fonts}).
24457
24458 @item
24459 There are several more commands for setting/removing/acting on process
24460 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24461
24462 @item
24463 The summary buffer can be limited to show parts of the available
24464 articles based on a wide range of criteria.  These commands have been
24465 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24466
24467 @item
24468 Articles can be made persistent with the @kbd{*} command
24469 (@pxref{Persistent Articles}).
24470
24471 @item
24472 All functions for hiding article elements are now toggles.
24473
24474 @item
24475 Article headers can be buttonized (@pxref{Article Washing}).
24476
24477 @item
24478 All mail back ends support fetching articles by @code{Message-ID}.
24479
24480 @item
24481 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24482
24483 @item
24484 All summary mode commands are available directly from the article
24485 buffer (@pxref{Article Keymap}).
24486
24487 @item
24488 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24489 Layout}).
24490
24491 @item
24492 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24493 @iftex
24494 @iflatex
24495 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24496 @end iflatex
24497 @end iftex
24498
24499 @item
24500 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24501
24502 @lisp
24503 (setq gnus-use-nocem t)
24504 @end lisp
24505
24506 @item
24507 Groups can be made permanently visible (@pxref{Listing Groups}).
24508
24509 @lisp
24510 (setq gnus-permanently-visible-groups "^nnml:")
24511 @end lisp
24512
24513 @item
24514 Many new hooks have been introduced to make customizing easier.
24515
24516 @item
24517 Gnus respects the @code{Mail-Copies-To} header.
24518
24519 @item
24520 Threads can be gathered by looking at the @code{References} header
24521 (@pxref{Customizing Threading}).
24522
24523 @lisp
24524 (setq gnus-summary-thread-gathering-function
24525       'gnus-gather-threads-by-references)
24526 @end lisp
24527
24528 @item
24529 Read articles can be stored in a special backlog buffer to avoid
24530 refetching (@pxref{Article Backlog}).
24531
24532 @lisp
24533 (setq gnus-keep-backlog 50)
24534 @end lisp
24535
24536 @item
24537 A clean copy of the current article is always stored in a separate
24538 buffer to allow easier treatment.
24539
24540 @item
24541 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24542
24543 @item
24544 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24545 Articles}).
24546
24547 @lisp
24548 (setq gnus-prompt-before-saving t)
24549 @end lisp
24550
24551 @item
24552 @code{gnus-uu} can view decoded files asynchronously while fetching
24553 articles (@pxref{Other Decode Variables}).
24554
24555 @lisp
24556 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24557 @end lisp
24558
24559 @item
24560 Filling in the article buffer now works properly on cited text
24561 (@pxref{Article Washing}).
24562
24563 @item
24564 Hiding cited text adds buttons to toggle hiding, and how much
24565 cited text to hide is now customizable (@pxref{Article Hiding}).
24566
24567 @lisp
24568 (setq gnus-cited-lines-visible 2)
24569 @end lisp
24570
24571 @item
24572 Boring headers can be hidden (@pxref{Article Hiding}).
24573
24574 @item
24575 Default scoring values can now be set from the menu bar.
24576
24577 @item
24578 Further syntax checking of outgoing articles have been added.
24579
24580 @end itemize
24581
24582
24583 @node Red Gnus
24584 @subsubsection Red Gnus
24585
24586 New features in Gnus 5.4/5.5:
24587
24588 @iftex
24589 @iflatex
24590 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24591 @end iflatex
24592 @end iftex
24593
24594 @itemize @bullet
24595
24596 @item
24597 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24598
24599 @item
24600 Article prefetching functionality has been moved up into
24601 Gnus (@pxref{Asynchronous Fetching}).
24602
24603 @item
24604 Scoring can now be performed with logical operators like @code{and},
24605 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24606 Scoring}).
24607
24608 @item
24609 Article washing status can be displayed in the
24610 article mode line (@pxref{Misc Article}).
24611
24612 @item
24613 @file{gnus.el} has been split into many smaller files.
24614
24615 @item
24616 Suppression of duplicate articles based on Message-ID can be done
24617 (@pxref{Duplicate Suppression}).
24618
24619 @lisp
24620 (setq gnus-suppress-duplicates t)
24621 @end lisp
24622
24623 @item
24624 New variables for specifying what score and adapt files are to be
24625 considered home score and adapt files (@pxref{Home Score File}) have
24626 been added.
24627
24628 @item
24629 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24630 Server Internals}).
24631
24632 @item
24633 Groups can inherit group parameters from parent topics (@pxref{Topic
24634 Parameters}).
24635
24636 @item
24637 Article editing has been revamped and is now actually usable.
24638
24639 @item
24640 Signatures can be recognized in more intelligent fashions
24641 (@pxref{Article Signature}).
24642
24643 @item
24644 Summary pick mode has been made to look more @code{nn}-like.  Line
24645 numbers are displayed and the @kbd{.} command can be used to pick
24646 articles (@code{Pick and Read}).
24647
24648 @item
24649 Commands for moving the @file{.newsrc.eld} from one server to
24650 another have been added (@pxref{Changing Servers}).
24651
24652 @item
24653 There's a way now to specify that ``uninteresting'' fields be suppressed
24654 when generating lines in buffers (@pxref{Advanced Formatting}).
24655
24656 @item
24657 Several commands in the group buffer can be undone with @kbd{C-M-_}
24658 (@pxref{Undo}).
24659
24660 @item
24661 Scoring can be done on words using the new score type @code{w}
24662 (@pxref{Score File Format}).
24663
24664 @item
24665 Adaptive scoring can be done on a Subject word-by-word basis
24666 (@pxref{Adaptive Scoring}).
24667
24668 @lisp
24669 (setq gnus-use-adaptive-scoring '(word))
24670 @end lisp
24671
24672 @item
24673 Scores can be decayed (@pxref{Score Decays}).
24674
24675 @lisp
24676 (setq gnus-decay-scores t)
24677 @end lisp
24678
24679 @item
24680 Scoring can be performed using a regexp on the Date header.  The Date is
24681 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24682
24683 @item
24684 A new command has been added to remove all data on articles from
24685 the native server (@pxref{Changing Servers}).
24686
24687 @item
24688 A new command for reading collections of documents
24689 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24690 (@pxref{Really Various Summary Commands}).
24691
24692 @item
24693 Process mark sets can be pushed and popped (@pxref{Setting Process
24694 Marks}).
24695
24696 @item
24697 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24698 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24699
24700 @item
24701 A new back end for reading searches from Web search engines
24702 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24703 (@pxref{Web Searches}).
24704
24705 @item
24706 Groups inside topics can now be sorted using the standard sorting
24707 functions, and each topic can be sorted independently (@pxref{Topic
24708 Sorting}).
24709
24710 @item
24711 Subsets of the groups can be sorted independently (@code{Sorting
24712 Groups}).
24713
24714 @item
24715 Cached articles can be pulled into the groups (@pxref{Summary Generation
24716 Commands}).
24717 @iftex
24718 @iflatex
24719 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24720 @end iflatex
24721 @end iftex
24722
24723 @item
24724 Score files are now applied in a more reliable order (@pxref{Score
24725 Variables}).
24726
24727 @item
24728 Reports on where mail messages end up can be generated (@pxref{Splitting
24729 Mail}).
24730
24731 @item
24732 More hooks and functions have been added to remove junk from incoming
24733 mail before saving the mail (@pxref{Washing Mail}).
24734
24735 @item
24736 Emphasized text can be properly fontisized:
24737
24738 @end itemize
24739
24740
24741 @node Quassia Gnus
24742 @subsubsection Quassia Gnus
24743
24744 New features in Gnus 5.6:
24745
24746 @itemize @bullet
24747
24748 @item
24749 New functionality for using Gnus as an offline newsreader has been
24750 added.  A plethora of new commands and modes have been added.
24751 @xref{Gnus Unplugged}, for the full story.
24752
24753 @item
24754 The @code{nndraft} back end has returned, but works differently than
24755 before.  All Message buffers are now also articles in the @code{nndraft}
24756 group, which is created automatically.
24757
24758 @item
24759 @code{gnus-alter-header-function} can now be used to alter header
24760 values.
24761
24762 @item
24763 @code{gnus-summary-goto-article} now accept Message-ID's.
24764
24765 @item
24766 A new Message command for deleting text in the body of a message
24767 outside the region: @kbd{C-c C-v}.
24768
24769 @item
24770 You can now post to component group in @code{nnvirtual} groups with
24771 @kbd{C-u C-c C-c}.
24772
24773 @item
24774  @code{nntp-rlogin-program}---new variable to ease customization.
24775
24776 @item
24777 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24778 re-highlighting of the article buffer.
24779
24780 @item
24781  New element in @code{gnus-boring-article-headers}---@code{long-to}.
24782
24783 @item
24784 @kbd{M-i} symbolic prefix command.  See the section ``Symbolic
24785 Prefixes'' in the Gnus manual for details.
24786
24787 @item
24788 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24789 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24790
24791 @item
24792 @code{gnus-simplify-subject-functions} variable to allow greater
24793 control over simplification.
24794
24795 @item
24796 @kbd{A T}---new command for fetching the current thread.
24797
24798 @item
24799 @kbd{/ T}---new command for including the current thread in the
24800 limit.
24801
24802 @item
24803 @kbd{M-RET} is a new Message command for breaking cited text.
24804
24805 @item
24806 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24807
24808 @item
24809 The @code{custom-face-lookup} function has been removed.
24810 If you used this function in your initialization files, you must
24811 rewrite them to use @code{face-spec-set} instead.
24812
24813 @item
24814 Canceling now uses the current select method.  Symbolic prefix
24815 @kbd{a} forces normal posting method.
24816
24817 @item
24818 New command to translate M******** sm*rtq**t*s into proper
24819 text---@kbd{W d}.
24820
24821 @item
24822 For easier debugging of @code{nntp}, you can set
24823 @code{nntp-record-commands} to a non-@code{nil} value.
24824
24825 @item
24826 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24827 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24828
24829 @item
24830 A command for editing group parameters from the summary buffer
24831 has been added.
24832
24833 @item
24834 A history of where mails have been split is available.
24835
24836 @item
24837 A new article date command has been added---@code{article-date-iso8601}.
24838
24839 @item
24840 Subjects can be simplified when threading by setting
24841 @code{gnus-score-thread-simplify}.
24842
24843 @item
24844 A new function for citing in Message has been
24845 added---@code{message-cite-original-without-signature}.
24846
24847 @item
24848 @code{article-strip-all-blank-lines}---new article command.
24849
24850 @item
24851 A new Message command to kill to the end of the article has
24852 been added.
24853
24854 @item
24855 A minimum adaptive score can be specified by using the
24856 @code{gnus-adaptive-word-minimum} variable.
24857
24858 @item
24859 The ``lapsed date'' article header can be kept continually
24860 updated by the @code{gnus-start-date-timer} command.
24861
24862 @item
24863 Web listserv archives can be read with the @code{nnlistserv} back end.
24864
24865 @item
24866 Old dejanews archives can now be read by @code{nnweb}.
24867
24868 @end itemize
24869
24870 @node Pterodactyl Gnus
24871 @subsubsection Pterodactyl Gnus
24872
24873 New features in Gnus 5.8:
24874
24875 @itemize @bullet
24876
24877 @item
24878 The mail-fetching functions have changed.  See the manual for the
24879 many details.  In particular, all procmail fetching variables are gone.
24880
24881 If you used procmail like in
24882
24883 @lisp
24884 (setq nnmail-use-procmail t)
24885 (setq nnmail-spool-file 'procmail)
24886 (setq nnmail-procmail-directory "~/mail/incoming/")
24887 (setq nnmail-procmail-suffix "\\.in")
24888 @end lisp
24889
24890 this now has changed to
24891
24892 @lisp
24893 (setq mail-sources
24894       '((directory :path "~/mail/incoming/"
24895                    :suffix ".in")))
24896 @end lisp
24897
24898 @xref{Mail Source Specifiers}.
24899
24900 @item
24901 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24902 Gnus, and adds a slew of new commands.  See the manual for details.
24903
24904 @item
24905 Gnus has also been multilingualized.  This also affects too
24906 many parts of Gnus to summarize here, and adds many new variables.
24907
24908 @item
24909 @code{gnus-auto-select-first} can now be a function to be
24910 called to position point.
24911
24912 @item
24913 The user can now decide which extra headers should be included in
24914 summary buffers and @acronym{NOV} files.
24915
24916 @item
24917 @code{gnus-article-display-hook} has been removed.  Instead, a number
24918 of variables starting with @code{gnus-treat-} have been added.
24919
24920 @item
24921 The Gnus posting styles have been redone again and now works in a
24922 subtly different manner.
24923
24924 @item
24925 New web-based back ends have been added: @code{nnslashdot},
24926 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24927 again, to keep up with ever-changing layouts.
24928
24929 @item
24930 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24931
24932 @end itemize
24933
24934 @node Oort Gnus
24935 @subsubsection Oort Gnus
24936 @cindex Oort Gnus
24937
24938 New features in Gnus 5.10:
24939
24940 @itemize @bullet
24941
24942 @item
24943 The revised Gnus @acronym{FAQ} is included in the manual,
24944 @xref{Frequently Asked Questions}.
24945
24946 @item
24947 Upgrading from previous (stable) version if you have used Oort.
24948
24949 If you have tried Oort (the unstable Gnus branch leading to this
24950 release) but went back to a stable version, be careful when upgrading to
24951 this version.  In particular, you will probably want to remove all
24952 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24953 read from your @file{.newsrc.eld} instead of from the
24954 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24955 later entry for more information about marks.  Note that downgrading
24956 isn't save in general.
24957
24958 @item
24959 Article Buttons
24960
24961 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24962 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24963 variables @code{gnus-button-@var{*}-level} can be used to control the
24964 appearance of all article buttons.  @xref{Article Button Levels}.
24965
24966 @item
24967 Dired integration
24968
24969 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24970 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
24971 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24972 (@kbd{C-c P}).  It is enabled with
24973 @lisp
24974 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24975 @end lisp
24976
24977 @item
24978 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
24979
24980 @item
24981 Single-part yenc encoded attachments can be decoded.
24982
24983 @item
24984 Picons
24985
24986 The picons code has been reimplemented to work in GNU Emacs---some of
24987 the previous options have been removed or renamed.
24988
24989 Picons are small ``personal icons'' representing users, domain and
24990 newsgroups, which can be displayed in the Article buffer.
24991 @xref{Picons}.
24992
24993 @item
24994 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
24995 boundary line is drawn at the end of the headers.
24996
24997 @item
24998 Retrieval of charters and control messages
24999
25000 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25001 control messages (@kbd{H C}).
25002
25003 @item
25004 Delayed articles
25005
25006 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25007 buffer.  The messages are delivered at specified time.  This is useful
25008 for sending yourself reminders.  @xref{Delayed Articles}.
25009
25010 @item
25011 If @code{auto-compression-mode} is enabled, attachments are automatically
25012 decompressed when activated.
25013
25014 @item
25015 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25016 the nnml back end allows compressed message files.
25017
25018 @item
25019 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25020
25021 @item
25022 The Summary Buffer uses an arrow in the fringe to indicate the current
25023 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25024
25025 @item
25026 Warn about email replies to news
25027
25028 Do you often find yourself replying to news by email by mistake?  Then
25029 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25030 you.
25031
25032 @item
25033 If the new option @code{gnus-summary-display-while-building} is
25034 non-@code{nil}, the summary buffer is shown and updated as it's being
25035 built.
25036
25037 @item
25038 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25039 opposed to old but unread messages).
25040
25041 @item
25042 The new option @code{gnus-gcc-mark-as-read} automatically marks
25043 Gcc articles as read.
25044
25045 @item
25046 The nndoc back end now supports mailman digests and exim bounces.
25047
25048 @item
25049 Gnus supports RFC 2369 mailing list headers, and adds a number of
25050 related commands in mailing list groups.  @xref{Mailing List}.
25051
25052 @item
25053 The Date header can be displayed in a format that can be read aloud
25054 in English.  @xref{Article Date}.
25055
25056 @item
25057 The envelope sender address can be customized when using Sendmail.
25058 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25059
25060 @item
25061 diffs are automatically highlighted in groups matching
25062 @code{mm-uu-diff-groups-regexp}
25063
25064 @item
25065 @acronym{TLS} wrapper shipped with Gnus
25066
25067 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25068 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25069 @acronym{TLS}/@acronym{SSL} support via (external third party)
25070 @file{ssl.el} and OpenSSL still works.
25071
25072 @item
25073 New @file{make.bat} for compiling and installing Gnus under MS Windows
25074
25075 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25076 first argument to the batch-program should be the directory where
25077 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25078 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25079 the second parameter.
25080
25081 @file{make.bat} has been rewritten from scratch, it now features
25082 automatic recognition of XEmacs and GNU Emacs, generates
25083 @file{gnus-load.el}, checks if errors occur while compilation and
25084 generation of info files and reports them at the end of the build
25085 process.  It now uses @code{makeinfo} if it is available and falls
25086 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25087 install all files which are necessary to run Gnus and be generally a
25088 complete replacement for the @code{configure; make; make install}
25089 cycle used under Unix systems.
25090
25091 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25092 been removed.
25093
25094 @item
25095 Support for non-@acronym{ASCII} domain names
25096
25097 Message supports non-@acronym{ASCII} domain names in From:, To: and
25098 Cc: and will query you whether to perform encoding when you try to
25099 send a message.  The variable @code{message-use-idna} controls this.
25100 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25101 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25102 controls this.
25103
25104 @item
25105 Better handling of Microsoft citation styles
25106
25107 Gnus now tries to recognize the mangled header block that some Microsoft
25108 mailers use to indicate that the rest of the message is a citation, even
25109 though it is not quoted in any way.  The variable
25110 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25111 citations.
25112
25113 @item
25114 @code{gnus-article-skip-boring}
25115
25116 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25117 not scroll down to show you a page that contains only boring text,
25118 which by default means cited text and signature.  You can customize
25119 what is skippable using @code{gnus-article-boring-faces}.
25120
25121 This feature is especially useful if you read many articles that
25122 consist of a little new content at the top with a long, untrimmed
25123 message cited below.
25124
25125 @item
25126 The format spec @code{%C} for positioning point has changed to @code{%*}.
25127
25128 @item
25129 The new variable @code{gnus-parameters} can be used to set group parameters.
25130
25131 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25132 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25133 enjoy the powers of customize, and simplified backups since you set the
25134 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25135 variable maps regular expressions matching group names to group
25136 parameters, a'la:
25137 @lisp
25138 (setq gnus-parameters
25139       '(("mail\\..*"
25140          (gnus-show-threads nil)
25141          (gnus-use-scoring nil))
25142         ("^nnimap:\\(foo.bar\\)$"
25143          (to-group . "\\1"))))
25144 @end lisp
25145
25146 @item
25147 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25148
25149 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25150 disable it.
25151
25152 @item
25153 Gnus no longer generate the Sender: header automatically.
25154
25155 Earlier it was generated iff the user configurable email address was
25156 different from the Gnus guessed default user address.  As the guessing
25157 algorithm is rarely correct these days, and (more controversially) the
25158 only use of the Sender: header was to check if you are entitled to
25159 cancel/supersede news (which is now solved by Cancel Locks instead,
25160 see another entry), generation of the header has been disabled by
25161 default.  See the variables @code{message-required-headers},
25162 @code{message-required-news-headers}, and
25163 @code{message-required-mail-headers}.
25164
25165 @item
25166 Features from third party @file{message-utils.el} added to @file{message.el}.
25167
25168 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25169 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25170 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25171 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25172 appropriate headers and a note in the body for cross-postings and
25173 followups (see the variables @code{message-cross-post-@var{*}}).
25174
25175 @item
25176 References and X-Draft-Headers are no longer generated when you start
25177 composing messages and @code{message-generate-headers-first} is
25178 @code{nil}.
25179
25180 @item
25181 Improved anti-spam features.
25182
25183 Gnus is now able to take out spam from your mail and news streams
25184 using a wide variety of programs and filter rules.  Among the supported
25185 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25186 for easy use of external packages such as SpamAssassin and Hashcash
25187 are also new.  @xref{Thwarting Email Spam}.
25188
25189 @item
25190 Easy inclusion of X-Faces headers.
25191
25192 @item
25193 Face headers handling.
25194
25195 @item
25196 In the summary buffer, the new command @kbd{/ N} inserts new messages
25197 and @kbd{/ o} inserts old messages.
25198
25199 @item
25200 Gnus decodes morse encoded messages if you press @kbd{W m}.
25201
25202 @item
25203 Unread count correct in nnimap groups.
25204
25205 The estimated number of unread articles in the group buffer should now
25206 be correct for nnimap groups.  This is achieved by calling
25207 @code{nnimap-fixup-unread-after-getting-new-news} from the
25208 @code{gnus-setup-news-hook} (called on startup) and
25209 @code{gnus-after-getting-new-news-hook}. (called after getting new
25210 mail).  If you have modified those variables from the default, you may
25211 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25212 you were happy with the estimate and want to save some (minimal) time
25213 when getting new mail, remove the function.
25214
25215 @item
25216 Group Carbon Copy (GCC) quoting
25217
25218 To support groups that contains SPC and other weird characters, groups
25219 are quoted before they are placed in the Gcc: header.  This means
25220 variables such as @code{gnus-message-archive-group} should no longer
25221 contain quote characters to make groups containing SPC work.  Also, if
25222 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25223 into two groups) you must change it to return the list
25224 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25225 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25226 was incorrect earlier, it just didn't generate any problems since it
25227 was inserted directly.
25228
25229 @item
25230 @file{~/News/overview/} not used.
25231
25232 As a result of the following change, the @file{~/News/overview/}
25233 directory is not used any more.  You can safely delete the entire
25234 hierarchy.
25235
25236 @item
25237 @code{gnus-agent}
25238
25239 The Gnus Agent has seen a major updated and is now enabled by default,
25240 and all nntp and nnimap servers from @code{gnus-select-method} and
25241 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25242 only the server in @code{gnus-select-method} was agentized by the
25243 default, and the agent was disabled by default.  When the agent is
25244 enabled, headers are now also retrieved from the Agent cache instead
25245 of the back ends when possible.  Earlier this only happened in the
25246 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25247 @kbd{J r} in the server buffer.  Gnus will not download articles into
25248 the Agent cache, unless you instruct it to do so, though, by using
25249 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25250 behaviour of having the Agent disabled with @code{(setq gnus-agent
25251 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25252 is not needed any more.
25253
25254 @item
25255 @code{gnus-summary-line-format}
25256
25257 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25258 %s\n}.  Moreover @code{gnus-extra-headers},
25259 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25260 changed their default so that the users name will be replaced by the
25261 recipient's name or the group name posting to for @acronym{NNTP}
25262 groups.
25263
25264 @item
25265 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25266
25267 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25268 broken Outlook (Express) articles.
25269
25270 @item
25271 @code{(require 'gnus-load)}
25272
25273 If you use a stand-alone Gnus distribution, you'd better add
25274 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25275 lisp directory into load-path.
25276
25277 File @file{gnus-load.el} contains autoload commands, functions and variables,
25278 some of which may not be included in distributions of Emacsen.
25279
25280 @item
25281 @code{gnus-slave-unplugged}
25282
25283 A new command which starts Gnus offline in slave mode.
25284
25285 @item
25286 @code{message-insinuate-rmail}
25287
25288 Adding @code{(message-insinuate-rmail)} and @code{(setq
25289 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25290 compose, reply and forward messages in message-mode, where you can
25291 enjoy the power of @acronym{MML}.
25292
25293 @item
25294 @code{message-minibuffer-local-map}
25295
25296 The line below enables BBDB in resending a message:
25297 @lisp
25298 (define-key message-minibuffer-local-map [(tab)]
25299   'bbdb-complete-name)
25300 @end lisp
25301
25302 @item
25303 Externalizing and deleting of attachments.
25304
25305 If @code{gnus-gcc-externalize-attachments} or
25306 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25307 local files as external parts.
25308
25309 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25310 on @acronym{MIME} buttons) saves a part and replaces the part with an
25311 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25312 @acronym{MIME} buttons) removes a part.  It works only on back ends
25313 that support editing.
25314
25315 @item
25316 @code{gnus-default-charset}
25317
25318 The default value is determined from the
25319 @code{current-language-environment} variable, instead of
25320 @code{iso-8859-1}.  Also the @samp{.*} item in
25321 @code{gnus-group-charset-alist} is removed.
25322
25323 @item
25324 @code{gnus-posting-styles}
25325
25326 Add a new format of match like
25327 @lisp
25328 ((header "to" "larsi.*org")
25329  (Organization "Somewhere, Inc."))
25330 @end lisp
25331 The old format like the lines below is obsolete, but still accepted.
25332 @lisp
25333 (header "to" "larsi.*org"
25334         (Organization "Somewhere, Inc."))
25335 @end lisp
25336
25337 @item
25338 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25339
25340 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25341 added into these two variables.  If you customized those, perhaps you
25342 need add those two headers too.
25343
25344 @item
25345 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25346
25347 If one reads an article while plugged, and the article already exists
25348 in the Agent, it won't get downloaded once more.  @code{(setq
25349 gnus-agent-cache nil)} reverts to the old behavior.
25350
25351 @item
25352 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25353 composing messages, it is enabled by @code{use-hard-newlines}.
25354 Decoding format=flowed was present but not documented in earlier
25355 versions.
25356
25357 @item
25358 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25359
25360 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25361
25362 @item
25363 Gnus supports Maildir groups.
25364
25365 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25366
25367 @item
25368 Printing capabilities are enhanced.
25369
25370 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25371 Article buffers.  Also, each individual @acronym{MIME} part can be
25372 printed using @kbd{p} on the @acronym{MIME} button.
25373
25374 @item
25375 Message supports the Importance: (RFC 2156) header.
25376
25377 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25378 the valid values.
25379
25380 @item
25381 Gnus supports Cancel Locks in News.
25382
25383 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25384 used to determine if you wrote an article or not (for cancelling and
25385 superseding).  Gnus generates a random password string the first time
25386 you post a message, and saves it in your @file{~/.emacs} using the Custom
25387 system.  While the variable is called @code{canlock-password}, it is not
25388 security sensitive data.  Publishing your canlock string on the web
25389 will not allow anyone to be able to anything she could not already do.
25390 The behaviour can be changed by customizing @code{message-insert-canlock}.
25391
25392 @item
25393 Gnus supports server-side mail filtering using Sieve.
25394
25395 Sieve rules can be added as Group Parameters for groups, and the
25396 complete Sieve script is generated using @kbd{D g} from the Group
25397 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25398 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25399 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25400
25401 @item
25402 Extended format specs.
25403
25404 Format spec @samp{%&user-date;} is added into
25405 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25406 format specs are supported.  The extended format specs look like
25407 @samp{%u&foo;}, which invokes function
25408 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25409 escape character, old user defined format @samp{%u&} is no longer supported.
25410
25411 @item
25412 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25413
25414 It was aliased to @kbd{Y c}
25415 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25416 out other articles.
25417
25418 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25419
25420 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25421 s}, @kbd{/ a}, and @kbd{/ x}
25422 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25423 result will be to display all articles that do not match the expression.
25424
25425 @item
25426 Group names are treated as UTF-8 by default.
25427
25428 This is supposedly what USEFOR wanted to migrate to.  See
25429 @code{gnus-group-name-charset-group-alist} and
25430 @code{gnus-group-name-charset-method-alist} for customization.
25431
25432 @item
25433 The nnml and nnfolder back ends store marks for each groups.
25434
25435 This makes it possible to take backup of nnml/nnfolder servers/groups
25436 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25437 makes it possible to share articles and marks between users (without
25438 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25439 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25440 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25441 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25442 another machine, Gnus will automatically use the @file{.marks} or
25443 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25444 The new server variables @code{nnml-marks-is-evil} and
25445 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25446
25447 @item
25448 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25449 been renamed to ``Gnus''.
25450
25451 @item
25452 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25453 renamed to ``Attachments''.  Note that this menu also contains security
25454 related stuff, like signing and encryption (@pxref{Security, Security,,
25455 message, Message Manual}).
25456
25457 @item
25458 @code{gnus-group-charset-alist} and
25459 @code{gnus-group-ignored-charsets-alist}.
25460
25461 The regexps in these variables are compared with full group names
25462 instead of real group names in 5.8.  Users who customize these
25463 variables should change those regexps accordingly.  For example:
25464 @lisp
25465 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25466 @end lisp
25467
25468 @item
25469 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25470 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25471
25472 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25473 additional Lisp libraries.  This add several menu items to the
25474 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25475 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25476
25477 @item
25478 Gnus inlines external parts (message/external).
25479
25480 @item
25481 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25482 C-m}.
25483
25484 This change was made to avoid conflict with the standard binding of
25485 @code{back-to-indentation}, which is also useful in message mode.
25486 @end itemize
25487
25488 @iftex
25489
25490 @page
25491 @node The Manual
25492 @section The Manual
25493 @cindex colophon
25494 @cindex manual
25495
25496 This manual was generated from a TeXinfo file and then run through
25497 either @code{texi2dvi}
25498 @iflatex
25499 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25500 and then run through @code{latex} and @code{dvips}
25501 @end iflatex
25502 to get what you hold in your hands now.
25503
25504 The following conventions have been used:
25505
25506 @enumerate
25507
25508 @item
25509 This is a @samp{string}
25510
25511 @item
25512 This is a @kbd{keystroke}
25513
25514 @item
25515 This is a @file{file}
25516
25517 @item
25518 This is a @code{symbol}
25519
25520 @end enumerate
25521
25522 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25523 mean:
25524
25525 @lisp
25526 (setq flargnoze "yes")
25527 @end lisp
25528
25529 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25530
25531 @lisp
25532 (setq flumphel 'yes)
25533 @end lisp
25534
25535 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25536 ever get them confused.
25537
25538 @iflatex
25539 @c @head
25540 Of course, everything in this manual is of vital interest, so you should
25541 read it all.  Several times.  However, if you feel like skimming the
25542 manual, look for that gnu head you should see in the margin over
25543 there---it means that what's being discussed is of more importance than
25544 the rest of the stuff.  (On the other hand, if everything is infinitely
25545 important, how can anything be more important than that?  Just one more
25546 of the mysteries of this world, I guess.)
25547 @end iflatex
25548
25549 @end iftex
25550
25551
25552 @node On Writing Manuals
25553 @section On Writing Manuals
25554
25555 I guess most manuals are written after-the-fact; documenting a program
25556 that's already there.  This is not how this manual is written.  When
25557 implementing something, I write the manual entry for that something
25558 straight away.  I then see that it's difficult to explain the
25559 functionality, so I write how it's supposed to be, and then I change the
25560 implementation.  Writing the documentation and writing the code goes
25561 hand in hand.
25562
25563 This, of course, means that this manual has no, or little, flow.  It
25564 documents absolutely everything in Gnus, but often not where you're
25565 looking for it.  It is a reference manual, and not a guide to how to get
25566 started with Gnus.
25567
25568 That would be a totally different book, that should be written using the
25569 reference manual as source material.  It would look quite differently.
25570
25571
25572 @page
25573 @node Terminology
25574 @section Terminology
25575
25576 @cindex terminology
25577 @table @dfn
25578
25579 @item news
25580 @cindex news
25581 This is what you are supposed to use this thing for---reading news.
25582 News is generally fetched from a nearby @acronym{NNTP} server, and is
25583 generally publicly available to everybody.  If you post news, the entire
25584 world is likely to read just what you have written, and they'll all
25585 snigger mischievously.  Behind your back.
25586
25587 @item mail
25588 @cindex mail
25589 Everything that's delivered to you personally is mail.  Some news/mail
25590 readers (like Gnus) blur the distinction between mail and news, but
25591 there is a difference.  Mail is private.  News is public.  Mailing is
25592 not posting, and replying is not following up.
25593
25594 @item reply
25595 @cindex reply
25596 Send a mail to the person who has written what you are reading.
25597
25598 @item follow up
25599 @cindex follow up
25600 Post an article to the current newsgroup responding to the article you
25601 are reading.
25602
25603 @item back end
25604 @cindex back end
25605 Gnus considers mail and news to be mostly the same, really.  The only
25606 difference is how to access the actual articles.  News articles are
25607 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25608 messages could be read from a file on the local disk.  The internal
25609 architecture of Gnus thus comprises a ``front end'' and a number of
25610 ``back ends''.  Internally, when you enter a group (by hitting
25611 @key{RET}, say), you thereby invoke a function in the front end in
25612 Gnus.  The front end then ``talks'' to a back end and says things like
25613 ``Give me the list of articles in the foo group'' or ``Show me article
25614 number 4711''.
25615
25616 So a back end mainly defines either a protocol (the @code{nntp} back
25617 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25618 accesses mail via @acronym{IMAP}) or a file format and directory
25619 layout (the @code{nnspool} back end accesses news via the common
25620 ``spool directory'' format, the @code{nnml} back end access mail via a
25621 file format and directory layout that's quite similar).
25622
25623 Gnus does not handle the underlying media, so to speak---this is all
25624 done by the back ends.  A back end is a collection of functions to
25625 access the articles.
25626
25627 However, sometimes the term ``back end'' is also used where ``server''
25628 would have been more appropriate.  And then there is the term ``select
25629 method'' which can mean either.  The Gnus terminology can be quite
25630 confusing.
25631
25632 @item native
25633 @cindex native
25634 Gnus will always use one method (and back end) as the @dfn{native}, or
25635 default, way of getting news.
25636
25637 @item foreign
25638 @cindex foreign
25639 You can also have any number of foreign groups active at the same time.
25640 These are groups that use non-native non-secondary back ends for getting
25641 news.
25642
25643 @item secondary
25644 @cindex secondary
25645 Secondary back ends are somewhere half-way between being native and being
25646 foreign, but they mostly act like they are native.
25647
25648 @item article
25649 @cindex article
25650 A message that has been posted as news.
25651
25652 @item mail message
25653 @cindex mail message
25654 A message that has been mailed.
25655
25656 @item message
25657 @cindex message
25658 A mail message or news article
25659
25660 @item head
25661 @cindex head
25662 The top part of a message, where administrative information (etc.) is
25663 put.
25664
25665 @item body
25666 @cindex body
25667 The rest of an article.  Everything not in the head is in the
25668 body.
25669
25670 @item header
25671 @cindex header
25672 A line from the head of an article.
25673
25674 @item headers
25675 @cindex headers
25676 A collection of such lines, or a collection of heads.  Or even a
25677 collection of @acronym{NOV} lines.
25678
25679 @item @acronym{NOV}
25680 @cindex @acronym{NOV}
25681 When Gnus enters a group, it asks the back end for the headers of all
25682 unread articles in the group.  Most servers support the News OverView
25683 format, which is more compact and much faster to read and parse than the
25684 normal @sc{head} format.
25685
25686 @item level
25687 @cindex levels
25688 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25689 that have a lower level are ``more'' subscribed than the groups with a
25690 higher level.  In fact, groups on levels 1-5 are considered
25691 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25692 are @dfn{killed}.  Commands for listing groups and scanning for new
25693 articles will all use the numeric prefix as @dfn{working level}.
25694
25695 @item killed groups
25696 @cindex killed groups
25697 No information on killed groups is stored or updated, which makes killed
25698 groups much easier to handle than subscribed groups.
25699
25700 @item zombie groups
25701 @cindex zombie groups
25702 Just like killed groups, only slightly less dead.
25703
25704 @item active file
25705 @cindex active file
25706 The news server has to keep track of what articles it carries, and what
25707 groups exist.  All this information in stored in the active file, which
25708 is rather large, as you might surmise.
25709
25710 @item bogus groups
25711 @cindex bogus groups
25712 A group that exists in the @file{.newsrc} file, but isn't known to the
25713 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25714 This means that the group probably doesn't exist (any more).
25715
25716 @item activating
25717 @cindex activating groups
25718 The act of asking the server for info on a group and computing the
25719 number of unread articles is called @dfn{activating the group}.
25720 Un-activated groups are listed with @samp{*} in the group buffer.
25721
25722 @item server
25723 @cindex server
25724 A machine one can connect to and get news (or mail) from.
25725
25726 @item select method
25727 @cindex select method
25728 A structure that specifies the back end, the server and the virtual
25729 server settings.
25730
25731 @item virtual server
25732 @cindex virtual server
25733 A named select method.  Since a select method defines all there is to
25734 know about connecting to a (physical) server, taking the thing as a
25735 whole is a virtual server.
25736
25737 @item washing
25738 @cindex washing
25739 Taking a buffer and running it through a filter of some sort.  The
25740 result will (more often than not) be cleaner and more pleasing than the
25741 original.
25742
25743 @item ephemeral groups
25744 @cindex ephemeral groups
25745 @cindex temporary groups
25746 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25747 groups are groups that will have no data stored---when you exit the
25748 group, it'll disappear into the aether.
25749
25750 @item solid groups
25751 @cindex solid groups
25752 This is the opposite of ephemeral groups.  All groups listed in the
25753 group buffer are solid groups.
25754
25755 @item sparse articles
25756 @cindex sparse articles
25757 These are article placeholders shown in the summary buffer when
25758 @code{gnus-build-sparse-threads} has been switched on.
25759
25760 @item threading
25761 @cindex threading
25762 To put responses to articles directly after the articles they respond
25763 to---in a hierarchical fashion.
25764
25765 @item root
25766 @cindex root
25767 @cindex thread root
25768 The first article in a thread is the root.  It is the ancestor of all
25769 articles in the thread.
25770
25771 @item parent
25772 @cindex parent
25773 An article that has responses.
25774
25775 @item child
25776 @cindex child
25777 An article that responds to a different article---its parent.
25778
25779 @item digest
25780 @cindex digest
25781 A collection of messages in one file.  The most common digest format is
25782 specified by RFC 1153.
25783
25784 @item splitting
25785 @cindex splitting, terminolgy
25786 @cindex mail sorting
25787 @cindex mail filtering (splitting)
25788 The action of sorting your emails according to certain rules. Sometimes
25789 incorrectly called mail filtering.
25790
25791 @end table
25792
25793
25794 @page
25795 @node Customization
25796 @section Customization
25797 @cindex general customization
25798
25799 All variables are properly documented elsewhere in this manual.  This
25800 section is designed to give general pointers on how to customize Gnus
25801 for some quite common situations.
25802
25803 @menu
25804 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25805 * Slow Terminal Connection::    You run a remote Emacs.
25806 * Little Disk Space::           You feel that having large setup files is icky.
25807 * Slow Machine::                You feel like buying a faster machine.
25808 @end menu
25809
25810
25811 @node Slow/Expensive Connection
25812 @subsection Slow/Expensive NNTP Connection
25813
25814 If you run Emacs on a machine locally, and get your news from a machine
25815 over some very thin strings, you want to cut down on the amount of data
25816 Gnus has to get from the @acronym{NNTP} server.
25817
25818 @table @code
25819
25820 @item gnus-read-active-file
25821 Set this to @code{nil}, which will inhibit Gnus from requesting the
25822 entire active file from the server.  This file is often v.  large.  You
25823 also have to set @code{gnus-check-new-newsgroups} and
25824 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25825 doesn't suddenly decide to fetch the active file anyway.
25826
25827 @item gnus-nov-is-evil
25828 This one has to be @code{nil}.  If not, grabbing article headers from
25829 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25830 support @sc{xover}; Gnus will detect this by itself.
25831 @end table
25832
25833
25834 @node Slow Terminal Connection
25835 @subsection Slow Terminal Connection
25836
25837 Let's say you use your home computer for dialing up the system that runs
25838 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25839 possible) the amount of data sent over the wires.
25840
25841 @table @code
25842
25843 @item gnus-auto-center-summary
25844 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25845 buffer all the time.  If it is @code{vertical}, do only vertical
25846 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25847 horizontal and vertical recentering.
25848
25849 @item gnus-visible-headers
25850 Cut down on the headers included in the articles to the
25851 minimum.  You can, in fact, make do without them altogether---most of the
25852 useful data is in the summary buffer, anyway.  Set this variable to
25853 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25854
25855 Set this hook to all the available hiding commands:
25856 @lisp
25857 (setq gnus-treat-hide-headers 'head
25858       gnus-treat-hide-signature t
25859       gnus-treat-hide-citation t)
25860 @end lisp
25861
25862 @item gnus-use-full-window
25863 By setting this to @code{nil}, you can make all the windows smaller.
25864 While this doesn't really cut down much generally, it means that you
25865 have to see smaller portions of articles before deciding that you didn't
25866 want to read them anyway.
25867
25868 @item gnus-thread-hide-subtree
25869 If this is non-@code{nil}, all threads in the summary buffer will be
25870 hidden initially.
25871
25872
25873 @item gnus-updated-mode-lines
25874 If this is @code{nil}, Gnus will not put information in the buffer mode
25875 lines, which might save some time.
25876 @end table
25877
25878
25879 @node Little Disk Space
25880 @subsection Little Disk Space
25881 @cindex disk space
25882
25883 The startup files can get rather large, so you may want to cut their
25884 sizes a bit if you are running out of space.
25885
25886 @table @code
25887
25888 @item gnus-save-newsrc-file
25889 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25890 only save @file{.newsrc.eld}.  This means that you will not be able to
25891 use any other newsreaders than Gnus.  This variable is @code{t} by
25892 default.
25893
25894 @item gnus-read-newsrc-file
25895 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25896 only read @file{.newsrc.eld}.  This means that you will not be able to
25897 use any other newsreaders than Gnus.  This variable is @code{t} by
25898 default.
25899
25900 @item gnus-save-killed-list
25901 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25902 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25903 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25904 variable to @code{nil}.  This variable is @code{t} by default.
25905
25906 @end table
25907
25908
25909 @node Slow Machine
25910 @subsection Slow Machine
25911 @cindex slow machine
25912
25913 If you have a slow machine, or are just really impatient, there are a
25914 few things you can do to make Gnus run faster.
25915
25916 Set @code{gnus-check-new-newsgroups} and
25917 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25918
25919 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25920 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25921 summary buffer faster.
25922
25923
25924 @page
25925 @node Troubleshooting
25926 @section Troubleshooting
25927 @cindex troubleshooting
25928
25929 Gnus works @emph{so} well straight out of the box---I can't imagine any
25930 problems, really.
25931
25932 Ahem.
25933
25934 @enumerate
25935
25936 @item
25937 Make sure your computer is switched on.
25938
25939 @item
25940 Make sure that you really load the current Gnus version.  If you have
25941 been running @sc{gnus}, you need to exit Emacs and start it up again before
25942 Gnus will work.
25943
25944 @item
25945 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25946 like @samp{T-gnus 6.16.* (based on Gnus v5.10.*; for SEMI 1.1*, FLIM
25947 1.1*)} you have the right files loaded.  If, on the other hand, you get
25948 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
25949 @file{.el} files lying around.  Delete these.
25950
25951 @item
25952 Read the help group (@kbd{G h} in the group buffer) for a
25953 @acronym{FAQ} and a how-to.
25954
25955 @item
25956 @vindex max-lisp-eval-depth
25957 Gnus works on many recursive structures, and in some extreme (and very
25958 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25959 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25960 something like that.
25961 @end enumerate
25962
25963 If all else fails, report the problem as a bug.
25964
25965 @cindex bugs
25966 @cindex reporting bugs
25967
25968 @kindex M-x gnus-bug
25969 @findex gnus-bug
25970 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25971 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25972 me the backtrace.  I will fix bugs, but I can only fix them if you send
25973 me a precise description as to how to reproduce the bug.
25974
25975 You really can never be too detailed in a bug report.  Always use the
25976 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
25977 a 10Kb mail each time you use it, and even if you have sent me your
25978 environment 500 times before.  I don't care.  I want the full info each
25979 time.
25980
25981 It is also important to remember that I have no memory whatsoever.  If
25982 you send a bug report, and I send you a reply, and then you just send
25983 back ``No, it's not! Moron!'', I will have no idea what you are
25984 insulting me about.  Always over-explain everything.  It's much easier
25985 for all of us---if I don't have all the information I need, I will just
25986 mail you and ask for more info, and everything takes more time.
25987
25988 If the problem you're seeing is very visual, and you can't quite explain
25989 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
25990 it somewhere it can be reached, and include the URL of the picture in
25991 the bug report.
25992
25993 @cindex patches
25994 If you would like to contribute a patch to fix bugs or make
25995 improvements, please produce the patch using @samp{diff -u}.
25996
25997 @cindex edebug
25998 If you want to debug your problem further before reporting, possibly
25999 in order to solve the problem yourself and send a patch, you can use
26000 edebug.  Debugging Lisp code is documented in the Elisp manual
26001 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26002 Lisp Reference Manual}).  To get you started with edebug, consider if
26003 you discover some weird behaviour when pressing @kbd{c}, the first
26004 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26005 the documentation buffer that leads you to the function definition,
26006 then press @kbd{M-x edebug-defun RET} with point inside that function,
26007 return to Gnus and press @kbd{c} to invoke the code.  You will be
26008 placed in the lisp buffer and can single step using @kbd{SPC} and
26009 evaluate expressions using @kbd{M-:} or inspect variables using
26010 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26011 @kbd{c} or @kbd{g}.
26012
26013 @cindex elp
26014 @cindex profile
26015 @cindex slow
26016 Sometimes, a problem do not directly generate an elisp error but
26017 manifests itself by causing Gnus to be very slow.  In these cases, you
26018 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26019 slow, and then try to analyze the backtrace (repeating the procedure
26020 helps isolating the real problem areas).
26021
26022 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26023 (or should be) fully documented elsewhere, but to get you started
26024 there are a few steps that need to be followed.  First, instrument the
26025 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26026 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26027 RET message}.  Then perform the operation that is slow and press
26028 @kbd{M-x elp-results}.  You will then see which operations that takes
26029 time, and can debug them further.  If the entire operation takes much
26030 longer than the time spent in the slowest function in the profiler
26031 output, you probably profiled the wrong part of Gnus.  To reset
26032 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26033 elp-restore-all} is supposed to remove profiling, but given the
26034 complexities and dynamic code generation in Gnus, it might not always
26035 work perfectly.
26036
26037 @cindex gnu.emacs.gnus
26038 @cindex ding mailing list
26039 If you just need help, you are better off asking on
26040 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26041 @email{ding@@gnus.org, the ding mailing list}.  Write to
26042 @email{ding-request@@gnus.org} to subscribe.
26043
26044
26045 @page
26046 @node Gnus Reference Guide
26047 @section Gnus Reference Guide
26048
26049 It is my hope that other people will figure out smart stuff that Gnus
26050 can do, and that other people will write those smart things as well.  To
26051 facilitate that I thought it would be a good idea to describe the inner
26052 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26053 it.
26054
26055 You can never expect the internals of a program not to change, but I
26056 will be defining (in some details) the interface between Gnus and its
26057 back ends (this is written in stone), the format of the score files
26058 (ditto), data structures (some are less likely to change than others)
26059 and general methods of operation.
26060
26061 @menu
26062 * Gnus Utility Functions::      Common functions and variable to use.
26063 * Back End Interface::          How Gnus communicates with the servers.
26064 * Score File Syntax::           A BNF definition of the score file standard.
26065 * Headers::                     How Gnus stores headers internally.
26066 * Ranges::                      A handy format for storing mucho numbers.
26067 * Group Info::                  The group info format.
26068 * Extended Interactive::        Symbolic prefixes and stuff.
26069 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26070 * Various File Formats::        Formats of files that Gnus use.
26071 @end menu
26072
26073
26074 @node Gnus Utility Functions
26075 @subsection Gnus Utility Functions
26076 @cindex Gnus utility functions
26077 @cindex utility functions
26078 @cindex functions
26079 @cindex internal variables
26080
26081 When writing small functions to be run from hooks (and stuff), it's
26082 vital to have access to the Gnus internal functions and variables.
26083 Below is a list of the most common ones.
26084
26085 @table @code
26086
26087 @item gnus-newsgroup-name
26088 @vindex gnus-newsgroup-name
26089 This variable holds the name of the current newsgroup.
26090
26091 @item gnus-find-method-for-group
26092 @findex gnus-find-method-for-group
26093 A function that returns the select method for @var{group}.
26094
26095 @item gnus-group-real-name
26096 @findex gnus-group-real-name
26097 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26098 name.
26099
26100 @item gnus-group-prefixed-name
26101 @findex gnus-group-prefixed-name
26102 Takes an unprefixed group name and a select method, and returns the full
26103 (prefixed) Gnus group name.
26104
26105 @item gnus-get-info
26106 @findex gnus-get-info
26107 Returns the group info list for @var{group}.
26108
26109 @item gnus-group-unread
26110 @findex gnus-group-unread
26111 The number of unread articles in @var{group}, or @code{t} if that is
26112 unknown.
26113
26114 @item gnus-active
26115 @findex gnus-active
26116 The active entry for @var{group}.
26117
26118 @item gnus-set-active
26119 @findex gnus-set-active
26120 Set the active entry for @var{group}.
26121
26122 @item gnus-add-current-to-buffer-list
26123 @findex gnus-add-current-to-buffer-list
26124 Adds the current buffer to the list of buffers to be killed on Gnus
26125 exit.
26126
26127 @item gnus-continuum-version
26128 @findex gnus-continuum-version
26129 Takes a Gnus version string as a parameter and returns a floating point
26130 number.  Earlier versions will always get a lower number than later
26131 versions.
26132
26133 @item gnus-group-read-only-p
26134 @findex gnus-group-read-only-p
26135 Says whether @var{group} is read-only or not.
26136
26137 @item gnus-news-group-p
26138 @findex gnus-news-group-p
26139 Says whether @var{group} came from a news back end.
26140
26141 @item gnus-ephemeral-group-p
26142 @findex gnus-ephemeral-group-p
26143 Says whether @var{group} is ephemeral or not.
26144
26145 @item gnus-server-to-method
26146 @findex gnus-server-to-method
26147 Returns the select method corresponding to @var{server}.
26148
26149 @item gnus-server-equal
26150 @findex gnus-server-equal
26151 Says whether two virtual servers are equal.
26152
26153 @item gnus-group-native-p
26154 @findex gnus-group-native-p
26155 Says whether @var{group} is native or not.
26156
26157 @item gnus-group-secondary-p
26158 @findex gnus-group-secondary-p
26159 Says whether @var{group} is secondary or not.
26160
26161 @item gnus-group-foreign-p
26162 @findex gnus-group-foreign-p
26163 Says whether @var{group} is foreign or not.
26164
26165 @item gnus-group-find-parameter
26166 @findex gnus-group-find-parameter
26167 Returns the parameter list of @var{group}.  If given a second parameter,
26168 returns the value of that parameter for @var{group}.
26169
26170 @item gnus-group-set-parameter
26171 @findex gnus-group-set-parameter
26172 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26173
26174 @item gnus-narrow-to-body
26175 @findex gnus-narrow-to-body
26176 Narrows the current buffer to the body of the article.
26177
26178 @item gnus-check-backend-function
26179 @findex gnus-check-backend-function
26180 Takes two parameters, @var{function} and @var{group}.  If the back end
26181 @var{group} comes from supports @var{function}, return non-@code{nil}.
26182
26183 @lisp
26184 (gnus-check-backend-function "request-scan" "nnml:misc")
26185 @result{} t
26186 @end lisp
26187
26188 @item gnus-read-method
26189 @findex gnus-read-method
26190 Prompts the user for a select method.
26191
26192 @end table
26193
26194
26195 @node Back End Interface
26196 @subsection Back End Interface
26197
26198 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26199 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26200 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26201 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26202 examples of the latter we have @code{nntp-port-number} and
26203 @code{nnmbox-directory}.
26204
26205 When Gnus asks for information from a back end---say @code{nntp}---on
26206 something, it will normally include a virtual server name in the
26207 function parameters.  (If not, the back end should use the ``current''
26208 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26209 server as its only (optional) parameter.  If this virtual server hasn't
26210 been opened, the function should fail.
26211
26212 Note that a virtual server name has no relation to some physical server
26213 name.  Take this example:
26214
26215 @lisp
26216 (nntp "odd-one"
26217       (nntp-address "ifi.uio.no")
26218       (nntp-port-number 4324))
26219 @end lisp
26220
26221 Here the virtual server name is @samp{odd-one} while the name of
26222 the physical server is @samp{ifi.uio.no}.
26223
26224 The back ends should be able to switch between several virtual servers.
26225 The standard back ends implement this by keeping an alist of virtual
26226 server environments that they pull down/push up when needed.
26227
26228 There are two groups of interface functions: @dfn{required functions},
26229 which must be present, and @dfn{optional functions}, which Gnus will
26230 always check for presence before attempting to call 'em.
26231
26232 All these functions are expected to return data in the buffer
26233 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26234 unfortunately named, but we'll have to live with it.  When I talk about
26235 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26236 talk about @dfn{return value}, I talk about the function value returned by
26237 the function call.  Functions that fail should return @code{nil} as the
26238 return value.
26239
26240 Some back ends could be said to be @dfn{server-forming} back ends, and
26241 some might be said not to be.  The latter are back ends that generally
26242 only operate on one group at a time, and have no concept of ``server''
26243 ---they have a group, and they deliver info on that group and nothing
26244 more.
26245
26246 Gnus identifies each message by way of group name and article number.  A
26247 few remarks about these article numbers might be useful.  First of all,
26248 the numbers are positive integers.  Secondly, it is normally not
26249 possible for later articles to ``re-use'' older article numbers without
26250 confusing Gnus.  That is, if a group has ever contained a message
26251 numbered 42, then no other message may get that number, or Gnus will get
26252 mightily confused.@footnote{See the function
26253 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26254 Third, article numbers must be assigned in order of arrival in the
26255 group; this is not necessarily the same as the date of the message.
26256
26257 The previous paragraph already mentions all the ``hard'' restrictions that
26258 article numbers must fulfill.  But it seems that it might be useful to
26259 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26260 if there are holes in the article numbering sequence.  However, due to
26261 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26262 also useful for the article numbers to start at 1 to avoid running out
26263 of numbers as long as possible.
26264
26265 Note that by convention, back ends are named @code{nnsomething}, but
26266 Gnus also comes with some @code{nnnotbackends}, such as
26267 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26268
26269 In the examples and definitions I will refer to the imaginary back end
26270 @code{nnchoke}.
26271
26272 @cindex @code{nnchoke}
26273
26274 @menu
26275 * Required Back End Functions::  Functions that must be implemented.
26276 * Optional Back End Functions::  Functions that need not be implemented.
26277 * Error Messaging::             How to get messages and report errors.
26278 * Writing New Back Ends::       Extending old back ends.
26279 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26280 * Mail-like Back Ends::         Some tips on mail back ends.
26281 @end menu
26282
26283
26284 @node Required Back End Functions
26285 @subsubsection Required Back End Functions
26286
26287 @table @code
26288
26289 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26290
26291 @var{articles} is either a range of article numbers or a list of
26292 @code{Message-ID}s.  Current back ends do not fully support either---only
26293 sequences (lists) of article numbers, and most back ends do not support
26294 retrieval of @code{Message-ID}s.  But they should try for both.
26295
26296 The result data should either be HEADs or @acronym{NOV} lines, and the result
26297 value should either be @code{headers} or @code{nov} to reflect this.
26298 This might later be expanded to @code{various}, which will be a mixture
26299 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26300
26301 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26302 headers'', in some meaning of the word.  This is generally done by
26303 fetching (at most) @var{fetch-old} extra headers less than the smallest
26304 article number in @code{articles}, and filling the gaps as well.  The
26305 presence of this parameter can be ignored if the back end finds it
26306 cumbersome to follow the request.  If this is non-@code{nil} and not a
26307 number, do maximum fetches.
26308
26309 Here's an example HEAD:
26310
26311 @example
26312 221 1056 Article retrieved.
26313 Path: ifi.uio.no!sturles
26314 From: sturles@@ifi.uio.no (Sturle Sunde)
26315 Newsgroups: ifi.discussion
26316 Subject: Re: Something very droll
26317 Date: 27 Oct 1994 14:02:57 +0100
26318 Organization: Dept. of Informatics, University of Oslo, Norway
26319 Lines: 26
26320 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26321 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26322 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26323 .
26324 @end example
26325
26326 So a @code{headers} return value would imply that there's a number of
26327 these in the data buffer.
26328
26329 Here's a BNF definition of such a buffer:
26330
26331 @example
26332 headers        = *head
26333 head           = error / valid-head
26334 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26335 valid-head     = valid-message *header "." eol
26336 valid-message  = "221 " <number> " Article retrieved." eol
26337 header         = <text> eol
26338 @end example
26339
26340 @cindex BNF
26341 (The version of BNF used here is the one used in RFC822.)
26342
26343 If the return value is @code{nov}, the data buffer should contain
26344 @dfn{network overview database} lines.  These are basically fields
26345 separated by tabs.
26346
26347 @example
26348 nov-buffer = *nov-line
26349 nov-line   = field 7*8[ <TAB> field ] eol
26350 field      = <text except TAB>
26351 @end example
26352
26353 For a closer look at what should be in those fields,
26354 @pxref{Headers}.
26355
26356
26357 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26358
26359 @var{server} is here the virtual server name.  @var{definitions} is a
26360 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26361
26362 If the server can't be opened, no error should be signaled.  The back end
26363 may then choose to refuse further attempts at connecting to this
26364 server.  In fact, it should do so.
26365
26366 If the server is opened already, this function should return a
26367 non-@code{nil} value.  There should be no data returned.
26368
26369
26370 @item (nnchoke-close-server &optional SERVER)
26371
26372 Close connection to @var{server} and free all resources connected
26373 to it.  Return @code{nil} if the server couldn't be closed for some
26374 reason.
26375
26376 There should be no data returned.
26377
26378
26379 @item (nnchoke-request-close)
26380
26381 Close connection to all servers and free all resources that the back end
26382 have reserved.  All buffers that have been created by that back end
26383 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26384 function is generally only called when Gnus is shutting down.
26385
26386 There should be no data returned.
26387
26388
26389 @item (nnchoke-server-opened &optional SERVER)
26390
26391 If @var{server} is the current virtual server, and the connection to the
26392 physical server is alive, then this function should return a
26393 non-@code{nil} value.  This function should under no circumstances
26394 attempt to reconnect to a server we have lost connection to.
26395
26396 There should be no data returned.
26397
26398
26399 @item (nnchoke-status-message &optional SERVER)
26400
26401 This function should return the last error message from @var{server}.
26402
26403 There should be no data returned.
26404
26405
26406 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26407
26408 The result data from this function should be the article specified by
26409 @var{article}.  This might either be a @code{Message-ID} or a number.
26410 It is optional whether to implement retrieval by @code{Message-ID}, but
26411 it would be nice if that were possible.
26412
26413 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26414 in this buffer instead of the normal data buffer.  This is to make it
26415 possible to avoid copying large amounts of data from one buffer to
26416 another, while Gnus mainly requests articles to be inserted directly
26417 into its article buffer.
26418
26419 If it is at all possible, this function should return a cons cell where
26420 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26421 the article number.  This will enable Gnus to find out what the real
26422 group and article numbers are when fetching articles by
26423 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26424 on successful article retrieval.
26425
26426
26427 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26428
26429 Get data on @var{group}.  This function also has the side effect of
26430 making @var{group} the current group.
26431
26432 If @var{fast}, don't bother to return useful data, just make @var{group}
26433 the current group.
26434
26435 Here's an example of some result data and a definition of the same:
26436
26437 @example
26438 211 56 1000 1059 ifi.discussion
26439 @end example
26440
26441 The first number is the status, which should be 211.  Next is the
26442 total number of articles in the group, the lowest article number, the
26443 highest article number, and finally the group name.  Note that the total
26444 number of articles may be less than one might think while just
26445 considering the highest and lowest article numbers, but some articles
26446 may have been canceled.  Gnus just discards the total-number, so
26447 whether one should take the bother to generate it properly (if that is a
26448 problem) is left as an exercise to the reader.  If the group contains no
26449 articles, the lowest article number should be reported as 1 and the
26450 highest as 0.
26451
26452 @example
26453 group-status = [ error / info ] eol
26454 error        = [ "4" / "5" ] 2<number> " " <Error message>
26455 info         = "211 " 3* [ <number> " " ] <string>
26456 @end example
26457
26458
26459 @item (nnchoke-close-group GROUP &optional SERVER)
26460
26461 Close @var{group} and free any resources connected to it.  This will be
26462 a no-op on most back ends.
26463
26464 There should be no data returned.
26465
26466
26467 @item (nnchoke-request-list &optional SERVER)
26468
26469 Return a list of all groups available on @var{server}.  And that means
26470 @emph{all}.
26471
26472 Here's an example from a server that only carries two groups:
26473
26474 @example
26475 ifi.test 0000002200 0000002000 y
26476 ifi.discussion 3324 3300 n
26477 @end example
26478
26479 On each line we have a group name, then the highest article number in
26480 that group, the lowest article number, and finally a flag.  If the group
26481 contains no articles, the lowest article number should be reported as 1
26482 and the highest as 0.
26483
26484 @example
26485 active-file = *active-line
26486 active-line = name " " <number> " " <number> " " flags eol
26487 name        = <string>
26488 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26489 @end example
26490
26491 The flag says whether the group is read-only (@samp{n}), is moderated
26492 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26493 (@samp{=other-group}) or none of the above (@samp{y}).
26494
26495
26496 @item (nnchoke-request-post &optional SERVER)
26497
26498 This function should post the current buffer.  It might return whether
26499 the posting was successful or not, but that's not required.  If, for
26500 instance, the posting is done asynchronously, it has generally not been
26501 completed by the time this function concludes.  In that case, this
26502 function should set up some kind of sentinel to beep the user loud and
26503 clear if the posting could not be completed.
26504
26505 There should be no result data from this function.
26506
26507 @end table
26508
26509
26510 @node Optional Back End Functions
26511 @subsubsection Optional Back End Functions
26512
26513 @table @code
26514
26515 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26516
26517 @var{groups} is a list of groups, and this function should request data
26518 on all those groups.  How it does it is of no concern to Gnus, but it
26519 should attempt to do this in a speedy fashion.
26520
26521 The return value of this function can be either @code{active} or
26522 @code{group}, which says what the format of the result data is.  The
26523 former is in the same format as the data from
26524 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26525 in the same format as @code{nnchoke-request-group} gives.
26526
26527 @example
26528 group-buffer = *active-line / *group-status
26529 @end example
26530
26531
26532 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26533
26534 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26535 alterations.  This comes in handy if the back end really carries all
26536 the information (as is the case with virtual and imap groups).  This
26537 function should destructively alter the info to suit its needs, and
26538 should return a non-@code{nil} value.
26539
26540 There should be no result data from this function.
26541
26542
26543 @item (nnchoke-request-type GROUP &optional ARTICLE)
26544
26545 When the user issues commands for ``sending news'' (@kbd{F} in the
26546 summary buffer, for instance), Gnus has to know whether the article the
26547 user is following up on is news or mail.  This function should return
26548 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26549 is mail and @code{unknown} if the type can't be decided.  (The
26550 @var{article} parameter is necessary in @code{nnvirtual} groups which
26551 might very well combine mail groups and news groups.)  Both @var{group}
26552 and @var{article} may be @code{nil}.
26553
26554 There should be no result data from this function.
26555
26556
26557 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26558
26559 Set/remove/add marks on articles.  Normally Gnus handles the article
26560 marks (such as read, ticked, expired etc) internally, and store them in
26561 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26562 all information about the articles on the server, so Gnus need to
26563 propagate the mark information to the server.
26564
26565 @var{action} is a list of mark setting requests, having this format:
26566
26567 @example
26568 (RANGE ACTION MARK)
26569 @end example
26570
26571 @var{range} is a range of articles you wish to update marks on.
26572 @var{action} is @code{add} or @code{del}, used to add marks or remove
26573 marks (preserving all marks not mentioned).  @var{mark} is a list of
26574 marks; where each mark is a symbol.  Currently used marks are
26575 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26576 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26577 @code{forward} and @code{recent}, but your back end should, if
26578 possible, not limit itself to these.
26579
26580 Given contradictory actions, the last action in the list should be the
26581 effective one.  That is, if your action contains a request to add the
26582 @code{tick} mark on article 1 and, later in the list, a request to
26583 remove the mark on the same article, the mark should in fact be removed.
26584
26585 An example action list:
26586
26587 @example
26588 (((5 12 30) 'del '(tick))
26589  ((10 . 90) 'add '(read expire))
26590  ((92 94) 'del '(read)))
26591 @end example
26592
26593 The function should return a range of articles it wasn't able to set the
26594 mark on (currently not used for anything).
26595
26596 There should be no result data from this function.
26597
26598 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26599
26600 If the user tries to set a mark that the back end doesn't like, this
26601 function may change the mark.  Gnus will use whatever this function
26602 returns as the mark for @var{article} instead of the original
26603 @var{mark}.  If the back end doesn't care, it must return the original
26604 @var{mark}, and not @code{nil} or any other type of garbage.
26605
26606 The only use for this I can see is what @code{nnvirtual} does with
26607 it---if a component group is auto-expirable, marking an article as read
26608 in the virtual group should result in the article being marked as
26609 expirable.
26610
26611 There should be no result data from this function.
26612
26613
26614 @item (nnchoke-request-scan &optional GROUP SERVER)
26615
26616 This function may be called at any time (by Gnus or anything else) to
26617 request that the back end check for incoming articles, in one way or
26618 another.  A mail back end will typically read the spool file or query
26619 the @acronym{POP} server when this function is invoked.  The
26620 @var{group} doesn't have to be heeded---if the back end decides that
26621 it is too much work just scanning for a single group, it may do a
26622 total scan of all groups.  It would be nice, however, to keep things
26623 local if that's practical.
26624
26625 There should be no result data from this function.
26626
26627
26628 @item (nnchoke-request-group-description GROUP &optional SERVER)
26629
26630 The result data from this function should be a description of
26631 @var{group}.
26632
26633 @example
26634 description-line = name <TAB> description eol
26635 name             = <string>
26636 description      = <text>
26637 @end example
26638
26639 @item (nnchoke-request-list-newsgroups &optional SERVER)
26640
26641 The result data from this function should be the description of all
26642 groups available on the server.
26643
26644 @example
26645 description-buffer = *description-line
26646 @end example
26647
26648
26649 @item (nnchoke-request-newgroups DATE &optional SERVER)
26650
26651 The result data from this function should be all groups that were
26652 created after @samp{date}, which is in normal human-readable date format
26653 (i.e., the date format used in mail and news headers, and returned by
26654 the function @code{message-make-date} by default).  The data should be
26655 in the active buffer format.
26656
26657 It is okay for this function to return ``too many'' groups; some back ends
26658 might find it cheaper to return the full list of groups, rather than
26659 just the new groups.  But don't do this for back ends with many groups.
26660 Normally, if the user creates the groups herself, there won't be too
26661 many groups, so @code{nnml} and the like are probably safe.  But for
26662 back ends like @code{nntp}, where the groups have been created by the
26663 server, it is quite likely that there can be many groups.
26664
26665
26666 @item (nnchoke-request-create-group GROUP &optional SERVER)
26667
26668 This function should create an empty group with name @var{group}.
26669
26670 There should be no return data.
26671
26672
26673 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26674
26675 This function should run the expiry process on all articles in the
26676 @var{articles} range (which is currently a simple list of article
26677 numbers.)  It is left up to the back end to decide how old articles
26678 should be before they are removed by this function.  If @var{force} is
26679 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26680 they are.
26681
26682 This function should return a list of articles that it did not/was not
26683 able to delete.
26684
26685 There should be no result data returned.
26686
26687
26688 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26689
26690 This function should move @var{article} (which is a number) from
26691 @var{group} by calling @var{accept-form}.
26692
26693 This function should ready the article in question for moving by
26694 removing any header lines it has added to the article, and generally
26695 should ``tidy up'' the article.  Then it should @code{eval}
26696 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26697 will do the actual copying.  If this @code{eval} returns a
26698 non-@code{nil} value, the article should be removed.
26699
26700 If @var{last} is @code{nil}, that means that there is a high likelihood
26701 that there will be more requests issued shortly, so that allows some
26702 optimizations.
26703
26704 The function should return a cons where the @code{car} is the group name and
26705 the @code{cdr} is the article number that the article was entered as.
26706
26707 The group should exist before the back end is asked to accept the
26708 article for that group.
26709
26710 There should be no data returned.
26711
26712
26713 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26714
26715 This function takes the current buffer and inserts it into @var{group}.
26716 If @var{last} in @code{nil}, that means that there will be more calls to
26717 this function in short order.
26718
26719 The function should return a cons where the @code{car} is the group name and
26720 the @code{cdr} is the article number that the article was entered as.
26721
26722 There should be no data returned.
26723
26724
26725 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26726
26727 This function should remove @var{article} (which is a number) from
26728 @var{group} and insert @var{buffer} there instead.
26729
26730 There should be no data returned.
26731
26732
26733 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26734
26735 This function should delete @var{group}.  If @var{force}, it should
26736 really delete all the articles in the group, and then delete the group
26737 itself.  (If there is such a thing as ``the group itself''.)
26738
26739 There should be no data returned.
26740
26741
26742 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26743
26744 This function should rename @var{group} into @var{new-name}.  All
26745 articles in @var{group} should move to @var{new-name}.
26746
26747 There should be no data returned.
26748
26749 @end table
26750
26751
26752 @node Error Messaging
26753 @subsubsection Error Messaging
26754
26755 @findex nnheader-report
26756 @findex nnheader-get-report
26757 The back ends should use the function @code{nnheader-report} to report
26758 error conditions---they should not raise errors when they aren't able to
26759 perform a request.  The first argument to this function is the back end
26760 symbol, and the rest are interpreted as arguments to @code{format} if
26761 there are multiple of them, or just a string if there is one of them.
26762 This function must always returns @code{nil}.
26763
26764 @lisp
26765 (nnheader-report 'nnchoke "You did something totally bogus")
26766
26767 (nnheader-report 'nnchoke "Could not request group %s" group)
26768 @end lisp
26769
26770 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26771 @code{nil} back from a server, and this function returns the most
26772 recently reported message for the back end in question.  This function
26773 takes one argument---the server symbol.
26774
26775 Internally, these functions access @var{back-end}@code{-status-string},
26776 so the @code{nnchoke} back end will have its error message stored in
26777 @code{nnchoke-status-string}.
26778
26779
26780 @node Writing New Back Ends
26781 @subsubsection Writing New Back Ends
26782
26783 Many back ends are quite similar.  @code{nnml} is just like
26784 @code{nnspool}, but it allows you to edit the articles on the server.
26785 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26786 and it doesn't maintain overview databases.  @code{nndir} is just like
26787 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26788 editing articles.
26789
26790 It would make sense if it were possible to ``inherit'' functions from
26791 back ends when writing new back ends.  And, indeed, you can do that if you
26792 want to.  (You don't have to if you don't want to, of course.)
26793
26794 All the back ends declare their public variables and functions by using a
26795 package called @code{nnoo}.
26796
26797 To inherit functions from other back ends (and allow other back ends to
26798 inherit functions from the current back end), you should use the
26799 following macros:
26800
26801 @table @code
26802
26803 @item nnoo-declare
26804 This macro declares the first parameter to be a child of the subsequent
26805 parameters.  For instance:
26806
26807 @lisp
26808 (nnoo-declare nndir
26809   nnml nnmh)
26810 @end lisp
26811
26812 @code{nndir} has declared here that it intends to inherit functions from
26813 both @code{nnml} and @code{nnmh}.
26814
26815 @item defvoo
26816 This macro is equivalent to @code{defvar}, but registers the variable as
26817 a public server variable.  Most state-oriented variables should be
26818 declared with @code{defvoo} instead of @code{defvar}.
26819
26820 In addition to the normal @code{defvar} parameters, it takes a list of
26821 variables in the parent back ends to map the variable to when executing
26822 a function in those back ends.
26823
26824 @lisp
26825 (defvoo nndir-directory nil
26826   "Where nndir will look for groups."
26827   nnml-current-directory nnmh-current-directory)
26828 @end lisp
26829
26830 This means that @code{nnml-current-directory} will be set to
26831 @code{nndir-directory} when an @code{nnml} function is called on behalf
26832 of @code{nndir}.  (The same with @code{nnmh}.)
26833
26834 @item nnoo-define-basics
26835 This macro defines some common functions that almost all back ends should
26836 have.
26837
26838 @lisp
26839 (nnoo-define-basics nndir)
26840 @end lisp
26841
26842 @item deffoo
26843 This macro is just like @code{defun} and takes the same parameters.  In
26844 addition to doing the normal @code{defun} things, it registers the
26845 function as being public so that other back ends can inherit it.
26846
26847 @item nnoo-map-functions
26848 This macro allows mapping of functions from the current back end to
26849 functions from the parent back ends.
26850
26851 @lisp
26852 (nnoo-map-functions nndir
26853   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26854   (nnmh-request-article 0 nndir-current-group 0 0))
26855 @end lisp
26856
26857 This means that when @code{nndir-retrieve-headers} is called, the first,
26858 third, and fourth parameters will be passed on to
26859 @code{nnml-retrieve-headers}, while the second parameter is set to the
26860 value of @code{nndir-current-group}.
26861
26862 @item nnoo-import
26863 This macro allows importing functions from back ends.  It should be the
26864 last thing in the source file, since it will only define functions that
26865 haven't already been defined.
26866
26867 @lisp
26868 (nnoo-import nndir
26869   (nnmh
26870    nnmh-request-list
26871    nnmh-request-newgroups)
26872   (nnml))
26873 @end lisp
26874
26875 This means that calls to @code{nndir-request-list} should just be passed
26876 on to @code{nnmh-request-list}, while all public functions from
26877 @code{nnml} that haven't been defined in @code{nndir} yet should be
26878 defined now.
26879
26880 @end table
26881
26882 Below is a slightly shortened version of the @code{nndir} back end.
26883
26884 @lisp
26885 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26886 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26887
26888 ;;; @r{Code:}
26889
26890 (require 'nnheader)
26891 (require 'nnmh)
26892 (require 'nnml)
26893 (require 'nnoo)
26894 (eval-when-compile (require 'cl))
26895
26896 (nnoo-declare nndir
26897   nnml nnmh)
26898
26899 (defvoo nndir-directory nil
26900   "Where nndir will look for groups."
26901   nnml-current-directory nnmh-current-directory)
26902
26903 (defvoo nndir-nov-is-evil nil
26904   "*Non-nil means that nndir will never retrieve NOV headers."
26905   nnml-nov-is-evil)
26906
26907 (defvoo nndir-current-group ""
26908   nil
26909   nnml-current-group nnmh-current-group)
26910 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26911 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26912
26913 (defvoo nndir-status-string "" nil nnmh-status-string)
26914 (defconst nndir-version "nndir 1.0")
26915
26916 ;;; @r{Interface functions.}
26917
26918 (nnoo-define-basics nndir)
26919
26920 (deffoo nndir-open-server (server &optional defs)
26921   (setq nndir-directory
26922         (or (cadr (assq 'nndir-directory defs))
26923             server))
26924   (unless (assq 'nndir-directory defs)
26925     (push `(nndir-directory ,server) defs))
26926   (push `(nndir-current-group
26927           ,(file-name-nondirectory
26928             (directory-file-name nndir-directory)))
26929         defs)
26930   (push `(nndir-top-directory
26931           ,(file-name-directory (directory-file-name nndir-directory)))
26932         defs)
26933   (nnoo-change-server 'nndir server defs))
26934
26935 (nnoo-map-functions nndir
26936   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26937   (nnmh-request-article 0 nndir-current-group 0 0)
26938   (nnmh-request-group nndir-current-group 0 0)
26939   (nnmh-close-group nndir-current-group 0))
26940
26941 (nnoo-import nndir
26942   (nnmh
26943    nnmh-status-message
26944    nnmh-request-list
26945    nnmh-request-newgroups))
26946
26947 (provide 'nndir)
26948 @end lisp
26949
26950
26951 @node Hooking New Back Ends Into Gnus
26952 @subsubsection Hooking New Back Ends Into Gnus
26953
26954 @vindex gnus-valid-select-methods
26955 @findex gnus-declare-backend
26956 Having Gnus start using your new back end is rather easy---you just
26957 declare it with the @code{gnus-declare-backend} functions.  This will
26958 enter the back end into the @code{gnus-valid-select-methods} variable.
26959
26960 @code{gnus-declare-backend} takes two parameters---the back end name and
26961 an arbitrary number of @dfn{abilities}.
26962
26963 Here's an example:
26964
26965 @lisp
26966 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26967 @end lisp
26968
26969 The above line would then go in the @file{nnchoke.el} file.
26970
26971 The abilities can be:
26972
26973 @table @code
26974 @item mail
26975 This is a mailish back end---followups should (probably) go via mail.
26976 @item post
26977 This is a newsish back end---followups should (probably) go via news.
26978 @item post-mail
26979 This back end supports both mail and news.
26980 @item none
26981 This is neither a post nor mail back end---it's something completely
26982 different.
26983 @item respool
26984 It supports respooling---or rather, it is able to modify its source
26985 articles and groups.
26986 @item address
26987 The name of the server should be in the virtual server name.  This is
26988 true for almost all back ends.
26989 @item prompt-address
26990 The user should be prompted for an address when doing commands like
26991 @kbd{B} in the group buffer.  This is true for back ends like
26992 @code{nntp}, but not @code{nnmbox}, for instance.
26993 @end table
26994
26995
26996 @node Mail-like Back Ends
26997 @subsubsection Mail-like Back Ends
26998
26999 One of the things that separate the mail back ends from the rest of the
27000 back ends is the heavy dependence by most of the mail back ends on
27001 common functions in @file{nnmail.el}.  For instance, here's the
27002 definition of @code{nnml-request-scan}:
27003
27004 @lisp
27005 (deffoo nnml-request-scan (&optional group server)
27006   (setq nnml-article-file-alist nil)
27007   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27008 @end lisp
27009
27010 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27011 and @code{nnmail} takes care of all the moving and splitting of the
27012 mail.
27013
27014 This function takes four parameters.
27015
27016 @table @var
27017 @item method
27018 This should be a symbol to designate which back end is responsible for
27019 the call.
27020
27021 @item exit-function
27022 This function should be called after the splitting has been performed.
27023
27024 @item temp-directory
27025 Where the temporary files should be stored.
27026
27027 @item group
27028 This optional argument should be a group name if the splitting is to be
27029 performed for one group only.
27030 @end table
27031
27032 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27033 save each article.  @var{back-end}@code{-active-number} will be called to
27034 find the article number assigned to this article.
27035
27036 The function also uses the following variables:
27037 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27038 this back end); and @var{back-end}@code{-group-alist} and
27039 @var{back-end}@code{-active-file} to generate the new active file.
27040 @var{back-end}@code{-group-alist} should be a group-active alist, like
27041 this:
27042
27043 @example
27044 (("a-group" (1 . 10))
27045  ("some-group" (34 . 39)))
27046 @end example
27047
27048
27049 @node Score File Syntax
27050 @subsection Score File Syntax
27051
27052 Score files are meant to be easily parseable, but yet extremely
27053 mallable.  It was decided that something that had the same read syntax
27054 as an Emacs Lisp list would fit that spec.
27055
27056 Here's a typical score file:
27057
27058 @lisp
27059 (("summary"
27060   ("win95" -10000 nil s)
27061   ("Gnus"))
27062  ("from"
27063   ("Lars" -1000))
27064  (mark -100))
27065 @end lisp
27066
27067 BNF definition of a score file:
27068
27069 @example
27070 score-file      = "" / "(" *element ")"
27071 element         = rule / atom
27072 rule            = string-rule / number-rule / date-rule
27073 string-rule     = "(" quote string-header quote space *string-match ")"
27074 number-rule     = "(" quote number-header quote space *number-match ")"
27075 date-rule       = "(" quote date-header quote space *date-match ")"
27076 quote           = <ascii 34>
27077 string-header   = "subject" / "from" / "references" / "message-id" /
27078                   "xref" / "body" / "head" / "all" / "followup"
27079 number-header   = "lines" / "chars"
27080 date-header     = "date"
27081 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27082                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27083 score           = "nil" / <integer>
27084 date            = "nil" / <natural number>
27085 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27086                   "r" / "regex" / "R" / "Regex" /
27087                   "e" / "exact" / "E" / "Exact" /
27088                   "f" / "fuzzy" / "F" / "Fuzzy"
27089 number-match    = "(" <integer> [ "" / [ space score [ "" /
27090                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27091 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27092 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27093                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27094 date-match-t    = "nil" / "at" / "before" / "after"
27095 atom            = "(" [ required-atom / optional-atom ] ")"
27096 required-atom   = mark / expunge / mark-and-expunge / files /
27097                   exclude-files / read-only / touched
27098 optional-atom   = adapt / local / eval
27099 mark            = "mark" space nil-or-number
27100 nil-or-number   = "nil" / <integer>
27101 expunge         = "expunge" space nil-or-number
27102 mark-and-expunge = "mark-and-expunge" space nil-or-number
27103 files           = "files" *[ space <string> ]
27104 exclude-files   = "exclude-files" *[ space <string> ]
27105 read-only       = "read-only" [ space "nil" / space "t" ]
27106 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27107 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27108 local           = "local" *[ space "(" <string> space <form> ")" ]
27109 eval            = "eval" space <form>
27110 space           = *[ " " / <TAB> / <NEWLINE> ]
27111 @end example
27112
27113 Any unrecognized elements in a score file should be ignored, but not
27114 discarded.
27115
27116 As you can see, white space is needed, but the type and amount of white
27117 space is irrelevant.  This means that formatting of the score file is
27118 left up to the programmer---if it's simpler to just spew it all out on
27119 one looong line, then that's ok.
27120
27121 The meaning of the various atoms are explained elsewhere in this
27122 manual (@pxref{Score File Format}).
27123
27124
27125 @node Headers
27126 @subsection Headers
27127
27128 Internally Gnus uses a format for storing article headers that
27129 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27130 almost suspect that the author looked at the @acronym{NOV} specification and
27131 just shamelessly @emph{stole} the entire thing, and one would be right.
27132
27133 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27134 RFC 1036 to talk about lines in the head of an article (e.g.,
27135 @code{From}).  It is used by many people as a synonym for
27136 ``head''---``the header and the body''.  (That should be avoided, in my
27137 opinion.)  And Gnus uses a format internally that it calls ``header'',
27138 which is what I'm talking about here.  This is a 9-element vector,
27139 basically, with each header (ouch) having one slot.
27140
27141 These slots are, in order: @code{number}, @code{subject}, @code{from},
27142 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27143 @code{xref}, and @code{extra}.  There are macros for accessing and
27144 setting these slots---they all have predictable names beginning with
27145 @code{mail-header-} and @code{mail-header-set-}, respectively.
27146
27147 All these slots contain strings, except the @code{extra} slot, which
27148 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27149
27150
27151 @node Ranges
27152 @subsection Ranges
27153
27154 @sc{gnus} introduced a concept that I found so useful that I've started
27155 using it a lot and have elaborated on it greatly.
27156
27157 The question is simple: If you have a large amount of objects that are
27158 identified by numbers (say, articles, to take a @emph{wild} example)
27159 that you want to qualify as being ``included'', a normal sequence isn't
27160 very useful.  (A 200,000 length sequence is a bit long-winded.)
27161
27162 The solution is as simple as the question: You just collapse the
27163 sequence.
27164
27165 @example
27166 (1 2 3 4 5 6 10 11 12)
27167 @end example
27168
27169 is transformed into
27170
27171 @example
27172 ((1 . 6) (10 . 12))
27173 @end example
27174
27175 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27176 lonesome object, a @samp{13} is a valid element:
27177
27178 @example
27179 ((1 . 6) 7 (10 . 12))
27180 @end example
27181
27182 This means that comparing two ranges to find out whether they are equal
27183 is slightly tricky:
27184
27185 @example
27186 ((1 . 5) 7 8 (10 . 12))
27187 @end example
27188
27189 and
27190
27191 @example
27192 ((1 . 5) (7 . 8) (10 . 12))
27193 @end example
27194
27195 are equal.  In fact, any non-descending list is a range:
27196
27197 @example
27198 (1 2 3 4 5)
27199 @end example
27200
27201 is a perfectly valid range, although a pretty long-winded one.  This is
27202 also valid:
27203
27204 @example
27205 (1 . 5)
27206 @end example
27207
27208 and is equal to the previous range.
27209
27210 Here's a BNF definition of ranges.  Of course, one must remember the
27211 semantic requirement that the numbers are non-descending.  (Any number
27212 of repetition of the same number is allowed, but apt to disappear in
27213 range handling.)
27214
27215 @example
27216 range           = simple-range / normal-range
27217 simple-range    = "(" number " . " number ")"
27218 normal-range    = "(" start-contents ")"
27219 contents        = "" / simple-range *[ " " contents ] /
27220                   number *[ " " contents ]
27221 @end example
27222
27223 Gnus currently uses ranges to keep track of read articles and article
27224 marks.  I plan on implementing a number of range operators in C if The
27225 Powers That Be are willing to let me.  (I haven't asked yet, because I
27226 need to do some more thinking on what operators I need to make life
27227 totally range-based without ever having to convert back to normal
27228 sequences.)
27229
27230
27231 @node Group Info
27232 @subsection Group Info
27233
27234 Gnus stores all permanent info on groups in a @dfn{group info} list.
27235 This list is from three to six elements (or more) long and exhaustively
27236 describes the group.
27237
27238 Here are two example group infos; one is a very simple group while the
27239 second is a more complex one:
27240
27241 @example
27242 ("no.group" 5 ((1 . 54324)))
27243
27244 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27245                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27246                 (nnml "")
27247                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27248 @end example
27249
27250 The first element is the @dfn{group name}---as Gnus knows the group,
27251 anyway.  The second element is the @dfn{subscription level}, which
27252 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27253 cons cell where the @code{car} is the level and the @code{cdr} is the
27254 score.)  The third element is a list of ranges of read articles.  The
27255 fourth element is a list of lists of article marks of various kinds.
27256 The fifth element is the select method (or virtual server, if you like).
27257 The sixth element is a list of @dfn{group parameters}, which is what
27258 this section is about.
27259
27260 Any of the last three elements may be missing if they are not required.
27261 In fact, the vast majority of groups will normally only have the first
27262 three elements, which saves quite a lot of cons cells.
27263
27264 Here's a BNF definition of the group info format:
27265
27266 @example
27267 info          = "(" group space ralevel space read
27268                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27269                 space parameters ] ] ] ] ] ")"
27270 group         = quote <string> quote
27271 ralevel       = rank / level
27272 level         = <integer in the range of 1 to inf>
27273 rank          = "(" level "." score ")"
27274 score         = <integer in the range of 1 to inf>
27275 read          = range
27276 marks-lists   = nil / "(" *marks ")"
27277 marks         = "(" <string> range ")"
27278 method        = "(" <string> *elisp-forms ")"
27279 parameters    = "(" *elisp-forms ")"
27280 @end example
27281
27282 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27283 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27284 in pseudo-BNF.
27285
27286 If you have a Gnus info and want to access the elements, Gnus offers a
27287 series of macros for getting/setting these elements.
27288
27289 @table @code
27290 @item gnus-info-group
27291 @itemx gnus-info-set-group
27292 @findex gnus-info-group
27293 @findex gnus-info-set-group
27294 Get/set the group name.
27295
27296 @item gnus-info-rank
27297 @itemx gnus-info-set-rank
27298 @findex gnus-info-rank
27299 @findex gnus-info-set-rank
27300 Get/set the group rank (@pxref{Group Score}).
27301
27302 @item gnus-info-level
27303 @itemx gnus-info-set-level
27304 @findex gnus-info-level
27305 @findex gnus-info-set-level
27306 Get/set the group level.
27307
27308 @item gnus-info-score
27309 @itemx gnus-info-set-score
27310 @findex gnus-info-score
27311 @findex gnus-info-set-score
27312 Get/set the group score (@pxref{Group Score}).
27313
27314 @item gnus-info-read
27315 @itemx gnus-info-set-read
27316 @findex gnus-info-read
27317 @findex gnus-info-set-read
27318 Get/set the ranges of read articles.
27319
27320 @item gnus-info-marks
27321 @itemx gnus-info-set-marks
27322 @findex gnus-info-marks
27323 @findex gnus-info-set-marks
27324 Get/set the lists of ranges of marked articles.
27325
27326 @item gnus-info-method
27327 @itemx gnus-info-set-method
27328 @findex gnus-info-method
27329 @findex gnus-info-set-method
27330 Get/set the group select method.
27331
27332 @item gnus-info-params
27333 @itemx gnus-info-set-params
27334 @findex gnus-info-params
27335 @findex gnus-info-set-params
27336 Get/set the group parameters.
27337 @end table
27338
27339 All the getter functions take one parameter---the info list.  The setter
27340 functions take two parameters---the info list and the new value.
27341
27342 The last three elements in the group info aren't mandatory, so it may be
27343 necessary to extend the group info before setting the element.  If this
27344 is necessary, you can just pass on a non-@code{nil} third parameter to
27345 the three final setter functions to have this happen automatically.
27346
27347
27348 @node Extended Interactive
27349 @subsection Extended Interactive
27350 @cindex interactive
27351 @findex gnus-interactive
27352
27353 Gnus extends the standard Emacs @code{interactive} specification
27354 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27355 Prefixes}).  Here's an example of how this is used:
27356
27357 @lisp
27358 (defun gnus-summary-increase-score (&optional score symp)
27359   (interactive (gnus-interactive "P\ny"))
27360   ...
27361   )
27362 @end lisp
27363
27364 The best thing to do would have been to implement
27365 @code{gnus-interactive} as a macro which would have returned an
27366 @code{interactive} form, but this isn't possible since Emacs checks
27367 whether a function is interactive or not by simply doing an @code{assq}
27368 on the lambda form.  So, instead we have @code{gnus-interactive}
27369 function that takes a string and returns values that are usable to
27370 @code{interactive}.
27371
27372 This function accepts (almost) all normal @code{interactive} specs, but
27373 adds a few more.
27374
27375 @table @samp
27376 @item y
27377 @vindex gnus-current-prefix-symbol
27378 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27379 variable.
27380
27381 @item Y
27382 @vindex gnus-current-prefix-symbols
27383 A list of the current symbolic prefixes---the
27384 @code{gnus-current-prefix-symbol} variable.
27385
27386 @item A
27387 The current article number---the @code{gnus-summary-article-number}
27388 function.
27389
27390 @item H
27391 The current article header---the @code{gnus-summary-article-header}
27392 function.
27393
27394 @item g
27395 The current group name---the @code{gnus-group-group-name}
27396 function.
27397
27398 @end table
27399
27400
27401 @node Emacs/XEmacs Code
27402 @subsection Emacs/XEmacs Code
27403 @cindex XEmacs
27404 @cindex Emacsen
27405
27406 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27407 platforms must be the primary one.  I chose Emacs.  Not because I don't
27408 like XEmacs or Mule, but because it comes first alphabetically.
27409
27410 This means that Gnus will byte-compile under Emacs with nary a warning,
27411 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27412 As I use byte-compilation warnings to help me root out trivial errors in
27413 Gnus, that's very useful.
27414
27415 I've also consistently used Emacs function interfaces, but have used
27416 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27417 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27418 function.  I then define a function called @code{gnus-run-at-time} that
27419 takes the same parameters as the Emacs @code{run-at-time}.  When running
27420 Gnus under Emacs, the former function is just an alias for the latter.
27421 However, when running under XEmacs, the former is an alias for the
27422 following function:
27423
27424 @lisp
27425 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27426   (start-itimer
27427    "gnus-run-at-time"
27428    `(lambda ()
27429       (,function ,@@args))
27430    time repeat))
27431 @end lisp
27432
27433 This sort of thing has been done for bunches of functions.  Gnus does
27434 not redefine any native Emacs functions while running under XEmacs---it
27435 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27436 all over.
27437
27438 In the cases where the XEmacs function interface was obviously cleaner,
27439 I used it instead.  For example @code{gnus-region-active-p} is an alias
27440 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27441
27442 Of course, I could have chosen XEmacs as my native platform and done
27443 mapping functions the other way around.  But I didn't.  The performance
27444 hit these indirections impose on Gnus under XEmacs should be slight.
27445
27446
27447 @node Various File Formats
27448 @subsection Various File Formats
27449
27450 @menu
27451 * Active File Format::          Information on articles and groups available.
27452 * Newsgroups File Format::      Group descriptions.
27453 @end menu
27454
27455
27456 @node Active File Format
27457 @subsubsection Active File Format
27458
27459 The active file lists all groups available on the server in
27460 question.  It also lists the highest and lowest current article numbers
27461 in each group.
27462
27463 Here's an excerpt from a typical active file:
27464
27465 @example
27466 soc.motss 296030 293865 y
27467 alt.binaries.pictures.fractals 3922 3913 n
27468 comp.sources.unix 1605 1593 m
27469 comp.binaries.ibm.pc 5097 5089 y
27470 no.general 1000 900 y
27471 @end example
27472
27473 Here's a pseudo-BNF definition of this file:
27474
27475 @example
27476 active      = *group-line
27477 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27478 group       = <non-white-space string>
27479 spc         = " "
27480 high-number = <non-negative integer>
27481 low-number  = <positive integer>
27482 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27483 @end example
27484
27485 For a full description of this file, see the manual pages for
27486 @samp{innd}, in particular @samp{active(5)}.
27487
27488
27489 @node Newsgroups File Format
27490 @subsubsection Newsgroups File Format
27491
27492 The newsgroups file lists groups along with their descriptions.  Not all
27493 groups on the server have to be listed,  and not all groups in the file
27494 have to exist on the server.  The file is meant purely as information to
27495 the user.
27496
27497 The format is quite simple; a group name, a tab, and the description.
27498 Here's the definition:
27499
27500 @example
27501 newsgroups    = *line
27502 line          = group tab description <NEWLINE>
27503 group         = <non-white-space string>
27504 tab           = <TAB>
27505 description   = <string>
27506 @end example
27507
27508
27509 @page
27510 @node Emacs for Heathens
27511 @section Emacs for Heathens
27512
27513 Believe it or not, but some people who use Gnus haven't really used
27514 Emacs much before they embarked on their journey on the Gnus Love Boat.
27515 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27516 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27517 is a regexp that is used for matching on the group name'' are magical
27518 phrases with little or no meaning, then this appendix is for you.  If
27519 you are already familiar with Emacs, just ignore this and go fondle your
27520 cat instead.
27521
27522 @menu
27523 * Keystrokes::                  Entering text and executing commands.
27524 * Emacs Lisp::                  The built-in Emacs programming language.
27525 @end menu
27526
27527
27528 @node Keystrokes
27529 @subsection Keystrokes
27530
27531 @itemize @bullet
27532 @item
27533 Q: What is an experienced Emacs user?
27534
27535 @item
27536 A: A person who wishes that the terminal had pedals.
27537 @end itemize
27538
27539 Yes, when you use Emacs, you are apt to use the control key, the shift
27540 key and the meta key a lot.  This is very annoying to some people
27541 (notably @code{vi}le users), and the rest of us just love the hell out
27542 of it.  Just give up and submit.  Emacs really does stand for
27543 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27544 may have heard from other disreputable sources (like the Emacs author).
27545
27546 The shift keys are normally located near your pinky fingers, and are
27547 normally used to get capital letters and stuff.  You probably use it all
27548 the time.  The control key is normally marked ``CTRL'' or something like
27549 that.  The meta key is, funnily enough, never marked as such on any
27550 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27551 which is the meta key on this keyboard.  It's usually located somewhere
27552 to the left hand side of the keyboard, usually on the bottom row.
27553
27554 Now, us Emacs people don't say ``press the meta-control-m key'',
27555 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27556 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27557 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27558 down the control key, and hold it down while you press @kbd{k}''.
27559 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27560 the control key and then press @kbd{k}''.  Simple, ay?
27561
27562 This is somewhat complicated by the fact that not all keyboards have a
27563 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27564 means ``press escape, release escape, press @kbd{k}''.  That's much more
27565 work than if you have a meta key, so if that's the case, I respectfully
27566 suggest you get a real keyboard with a meta key.  You can't live without
27567 it.
27568
27569
27570
27571 @node Emacs Lisp
27572 @subsection Emacs Lisp
27573
27574 Emacs is the King of Editors because it's really a Lisp interpreter.
27575 Each and every key you tap runs some Emacs Lisp code snippet, and since
27576 Emacs Lisp is an interpreted language, that means that you can configure
27577 any key to run any arbitrary code.  You just, like, do it.
27578
27579 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27580 functions.  (These are byte-compiled for speed, but it's still
27581 interpreted.)  If you decide that you don't like the way Gnus does
27582 certain things, it's trivial to have it do something a different way.
27583 (Well, at least if you know how to write Lisp code.)  However, that's
27584 beyond the scope of this manual, so we are simply going to talk about
27585 some common constructs that you normally use in your @file{.emacs} file
27586 to customize Gnus.
27587
27588 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27589 write the following:
27590
27591 @lisp
27592 (setq gnus-florgbnize 4)
27593 @end lisp
27594
27595 This function (really ``special form'') @code{setq} is the one that can
27596 set a variable to some value.  This is really all you need to know.  Now
27597 you can go and fill your @file{.emacs} file with lots of these to change
27598 how Gnus works.
27599
27600 If you have put that thing in your @file{.emacs} file, it will be read
27601 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27602 start Emacs.  If you want to change the variable right away, simply say
27603 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27604 previous ``form'', which is a simple @code{setq} statement here.
27605
27606 Go ahead---just try it, if you're located at your Emacs.  After you
27607 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27608 is the return value of the form you @code{eval}ed.
27609
27610 Some pitfalls:
27611
27612 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27613 that means:
27614
27615 @lisp
27616 (setq gnus-read-active-file 'some)
27617 @end lisp
27618
27619 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27620 @samp{nntp.ifi.uio.no}'', that means:
27621
27622 @lisp
27623 (setq gnus-nntp-server "nntp.ifi.uio.no")
27624 @end lisp
27625
27626 So be careful not to mix up strings (the latter) with symbols (the
27627 former).  The manual is unambiguous, but it can be confusing.
27628
27629 @page
27630 @include gnus-faq.texi
27631
27632 @node Index
27633 @chapter Index
27634 @printindex cp
27635
27636 @node Key Index
27637 @chapter Key Index
27638 @printindex ky
27639
27640 @summarycontents
27641 @contents
27642 @bye
27643
27644 @iftex
27645 @iflatex
27646 \end{document}
27647 @end iflatex
27648 @end iftex
27649
27650 @c Local Variables:
27651 @c mode: texinfo
27652 @c coding: iso-8859-1
27653 @c End: