Synch to Gnus 200307141631.
[elisp/gnus.git-] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle T-gnus 6.16 Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{T-gnus v6.16}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
57 \newcommand{\gnusenv}[1]{\gnustt{#1}}
58 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
59 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
60 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
61 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
62 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
63 \newcommand{\gnusdfn}[1]{\textit{#1}}
64 \newcommand{\gnusi}[1]{\textit{#1}}
65 \newcommand{\gnusr}[1]{\textrm{#1}}
66 \newcommand{\gnusstrong}[1]{\textbf{#1}}
67 \newcommand{\gnusemph}[1]{\textit{#1}}
68 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
69 \newcommand{\gnussc}[1]{\textsc{#1}}
70 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
71 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
72 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
73 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
74 \newcommand{\gnusacronym}[1]{\textsc{#1}}
75 \newcommand{\gnusemail}[1]{\textit{#1}}
76
77 \newcommand{\gnusbullet}{{${\bullet}$}}
78 \newcommand{\gnusdollar}{\$}
79 \newcommand{\gnusampersand}{\&}
80 \newcommand{\gnuspercent}{\%}
81 \newcommand{\gnushash}{\#}
82 \newcommand{\gnushat}{\symbol{"5E}}
83 \newcommand{\gnusunderline}{\symbol{"5F}}
84 \newcommand{\gnusnot}{$\neg$}
85 \newcommand{\gnustilde}{\symbol{"7E}}
86 \newcommand{\gnusless}{{$<$}}
87 \newcommand{\gnusgreater}{{$>$}}
88 \newcommand{\gnusbraceleft}{{$>$}}
89 \newcommand{\gnusbraceright}{{$>$}}
90
91 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
92 \newcommand{\gnusinteresting}{
93 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
94 }
95
96 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
97
98 \newcommand{\gnuspagechapter}[1]{
99 {\mbox{}}
100 }
101
102 \newdimen{\gnusdimen}
103 \gnusdimen 0pt
104
105 \newcommand{\gnuschapter}[2]{
106 \gnuscleardoublepage
107 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
108 \chapter{#2}
109 \renewcommand{\gnussectionname}{}
110 \renewcommand{\gnuschaptername}{#2}
111 \thispagestyle{empty}
112 \hspace*{-2cm}
113 \begin{picture}(500,500)(0,0)
114 \put(480,350){\makebox(0,0)[tr]{#1}}
115 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
116 \end{picture}
117 \clearpage
118 }
119
120 \newcommand{\gnusfigure}[3]{
121 \begin{figure}
122 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
123 #3
124 \end{picture}
125 \caption{#1}
126 \end{figure}
127 }
128
129 \newcommand{\gnusicon}[1]{
130 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
131 }
132
133 \newcommand{\gnuspicon}[1]{
134 \margindex{\epsfig{figure=#1,width=2cm}}
135 }
136
137 \newcommand{\gnusxface}[2]{
138 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
139 }
140
141 \newcommand{\gnussmiley}[2]{
142 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
143 }
144
145 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
146
147 \newcommand{\gnussection}[1]{
148 \renewcommand{\gnussectionname}{#1}
149 \section{#1}
150 }
151
152 \newenvironment{codelist}%
153 {\begin{list}{}{
154 }
155 }{\end{list}}
156
157 \newenvironment{kbdlist}%
158 {\begin{list}{}{
159 \labelwidth=0cm
160 }
161 }{\end{list}}
162
163 \newenvironment{dfnlist}%
164 {\begin{list}{}{
165 }
166 }{\end{list}}
167
168 \newenvironment{stronglist}%
169 {\begin{list}{}{
170 }
171 }{\end{list}}
172
173 \newenvironment{samplist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{varlist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newenvironment{emphlist}%
184 {\begin{list}{}{
185 }
186 }{\end{list}}
187
188 \newlength\gnusheadtextwidth
189 \setlength{\gnusheadtextwidth}{\headtextwidth}
190 \addtolength{\gnusheadtextwidth}{1cm}
191
192 \newpagestyle{gnuspreamble}%
193 {
194 {
195 \ifodd\count0
196 {
197 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
198 }
199 \else
200 {
201 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
202 }
203 }
204 \fi
205 }
206 }
207 {
208 \ifodd\count0
209 \mbox{} \hfill
210 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
211 \else
212 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
213 \hfill \mbox{}
214 \fi
215 }
216
217 \newpagestyle{gnusindex}%
218 {
219 {
220 \ifodd\count0
221 {
222 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
223 }
224 \else
225 {
226 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
227 }
228 \fi
229 }
230 }
231 {
232 \ifodd\count0
233 \mbox{} \hfill
234 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
235 \else
236 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
237 \hfill \mbox{}
238 \fi
239 }
240
241 \newpagestyle{gnus}%
242 {
243 {
244 \ifodd\count0
245 {
246 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
247 }
248 \else
249 {
250 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
251 }
252 \fi
253 }
254 }
255 {
256 \ifodd\count0
257 \mbox{} \hfill
258 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
259 \else
260 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
261 \hfill \mbox{}
262 \fi
263 }
264
265 \pagenumbering{roman}
266 \pagestyle{gnuspreamble}
267
268 @end iflatex
269 @end iftex
270
271 @iftex
272 @iflatex
273 \begin{titlepage}
274 {
275
276 %\addtolength{\oddsidemargin}{-5cm}
277 %\addtolength{\evensidemargin}{-5cm}
278 \parindent=0cm
279 \addtolength{\textheight}{2cm}
280
281 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
282 \rule{15cm}{1mm}\\
283 \vfill
284 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
285 \vfill
286 \rule{15cm}{1mm}\\
287 \gnusauthor{by Lars Magne Ingebrigtsen}
288 \newpage
289 }
290
291 \mbox{}
292 \vfill
293
294 \thispagestyle{empty}
295
296 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
297 2002, 2003
298 Free Software Foundation, Inc.
299
300
301 Permission is granted to copy, distribute and/or modify this document
302 under the terms of the GNU Free Documentation License, Version 1.1 or
303 any later version published by the Free Software Foundation; with no
304 Invariant Sections, with the Front-Cover texts being ``A GNU
305 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
306 license is included in the section entitled ``GNU Free Documentation
307 License'' in the Emacs manual.
308
309 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
310 this GNU Manual, like GNU software.  Copies published by the Free
311 Software Foundation raise funds for GNU development.''
312
313 This document is part of a collection distributed under the GNU Free
314 Documentation License.  If you want to distribute this document
315 separately from the collection, you can do so by adding a copy of the
316 license to the document, as described in section 6 of the license.
317 \newpage
318 \end{titlepage}
319 @end iflatex
320 @end iftex
321
322 @ifnottex
323
324 This file documents gnus, the GNU Emacs newsreader.
325
326 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
327         Free Software Foundation, Inc.
328
329 Permission is granted to copy, distribute and/or modify this document
330 under the terms of the GNU Free Documentation License, Version 1.1 or
331 any later version published by the Free Software Foundation; with the
332 Invariant Sections being none, with the Front-Cover texts being ``A GNU
333 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
334 license is included in the section entitled ``GNU Free Documentation
335 License'' in the Emacs manual.
336
337 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
338 this GNU Manual, like GNU software.  Copies published by the Free
339 Software Foundation raise funds for GNU development.''
340
341 This document is part of a collection distributed under the GNU Free
342 Documentation License.  If you want to distribute this document
343 separately from the collection, you can do so by adding a copy of the
344 license to the document, as described in section 6 of the license.
345 @end ifnottex
346
347 @tex
348
349 @titlepage
350 @title T-gnus 6.16 Manual
351
352 @author by Lars Magne Ingebrigtsen
353 @page
354
355 @vskip 0pt plus 1filll
356 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
357 2002, 2003
358         Free Software Foundation, Inc.
359
360 Permission is granted to copy, distribute and/or modify this document
361 under the terms of the GNU Free Documentation License, Version 1.1 or
362 any later version published by the Free Software Foundation; with no
363 Invariant Sections, with the Front-Cover texts being ``A GNU
364 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
365 license is included in the section entitled ``GNU Free Documentation
366 License'' in the Emacs manual.
367
368 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
369 this GNU Manual, like GNU software.  Copies published by the Free
370 Software Foundation raise funds for GNU development.''
371
372 This document is part of a collection distributed under the GNU Free
373 Documentation License.  If you want to distribute this document
374 separately from the collection, you can do so by adding a copy of the
375 license to the document, as described in section 6 of the license.
376
377 @end titlepage
378 @page
379
380 @end tex
381
382
383 @node Top
384 @top The gnus Newsreader
385
386 @ifinfo
387
388 You can read news (and mail) from within Emacs by using T-gnus.  The news
389 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
390 spool or your mbox file.  All at the same time, if you want to push your
391 luck.
392
393 T-gnus provides @acronym{MIME} features based on @acronym{SEMI} API.  So
394 T-gnus supports your right to read strange messages including big images
395 or other various kinds of formats.  T-gnus also supports
396 internationalization/localization and multiscript features based on MULE
397 API.  So T-gnus does not discriminate various language communities.  Oh,
398 if you are a Klingon, please wait Unicode Next Generation.
399
400 This manual corresponds to T-gnus 6.16.
401
402 @end ifinfo
403
404 @iftex
405
406 @iflatex
407 \tableofcontents
408 \gnuscleardoublepage
409 @end iflatex
410
411 Gnus is the advanced, self-documenting, customizable, extensible
412 unreal-time newsreader for GNU Emacs.
413
414 Oops.  That sounds oddly familiar, so let's start over again to avoid
415 being accused of plagiarism:
416
417 Gnus is a message-reading laboratory.  It will let you look at just
418 about anything as if it were a newsgroup.  You can read mail with it,
419 you can browse directories with it, you can @code{ftp} with it---you
420 can even read news with it!
421
422 Gnus tries to empower people who read news the same way Emacs empowers
423 people who edit text.  Gnus sets no limits to what the user should be
424 allowed to do.  Users are encouraged to extend gnus to make it behave
425 like they want it to behave.  A program should not control people;
426 people should be empowered to do what they want by using (or abusing)
427 the program.
428
429 @end iftex
430
431 @menu
432 * Starting Up::                 Finding news can be a pain.
433 * Group Buffer::                Selecting, subscribing and killing groups.
434 * Summary Buffer::              Reading, saving and posting articles.
435 * Article Buffer::              Displaying and handling articles.
436 * Composing Messages::          Information on sending mail and news.
437 * Select Methods::              Gnus reads all messages from various select methods.
438 * Scoring::                     Assigning values to articles.
439 * Various::                     General purpose settings.
440 * The End::                     Farewell and goodbye.
441 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
442 * Index::                       Variable, function and concept index.
443 * Key Index::                   Key Index.
444
445 Other related manuals
446
447 * Message:(message).            Composing messages.
448 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
449 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
450 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
451
452 @detailmenu
453  --- The Detailed Node Listing ---
454
455 Starting Gnus
456
457 * Finding the News::            Choosing a method for getting news.
458 * The First Time::              What does Gnus do the first time you start it?
459 * The Server is Down::          How can I read my mail then?
460 * Slave Gnusae::                You can have more than one Gnus active at a time.
461 * Fetching a Group::            Starting Gnus just to read a group.
462 * New Groups::                  What is Gnus supposed to do with new groups?
463 * Changing Servers::            You may want to move from one server to another.
464 * Startup Files::               Those pesky startup files---@file{.newsrc}.
465 * Auto Save::                   Recovering from a crash.
466 * The Active File::             Reading the active file over a slow line Takes Time.
467 * Startup Variables::           Other variables you might change.
468
469 New Groups
470
471 * Checking New Groups::         Determining what groups are new.
472 * Subscription Methods::        What Gnus should do with new groups.
473 * Filtering New Groups::        Making Gnus ignore certain new groups.
474
475 Group Buffer
476
477 * Group Buffer Format::         Information listed and how you can change it.
478 * Group Maneuvering::           Commands for moving in the group buffer.
479 * Selecting a Group::           Actually reading news.
480 * Subscription Commands::       Unsubscribing, killing, subscribing.
481 * Group Data::                  Changing the info for a group.
482 * Group Levels::                Levels? What are those, then?
483 * Group Score::                 A mechanism for finding out what groups you like.
484 * Marking Groups::              You can mark groups for later processing.
485 * Foreign Groups::              Creating and editing groups.
486 * Group Parameters::            Each group may have different parameters set.
487 * Listing Groups::              Gnus can list various subsets of the groups.
488 * Sorting Groups::              Re-arrange the group order.
489 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
490 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
491 * Exiting Gnus::                Stop reading news and get some work done.
492 * Group Topics::                A folding group mode divided into topics.
493 * Misc Group Stuff::            Other stuff that you can to do.
494
495 Group Buffer Format
496
497 * Group Line Specification::    Deciding how the group buffer is to look.
498 * Group Mode Line Specification::  The group buffer mode line.
499 * Group Highlighting::          Having nice colors in the group buffer.
500
501 Group Topics
502
503 * Topic Commands::              Interactive E-Z commands.
504 * Topic Variables::             How to customize the topics the Lisp Way.
505 * Topic Sorting::               Sorting each topic individually.
506 * Topic Topology::              A map of the world.
507 * Topic Parameters::            Parameters that apply to all groups in a topic.
508
509 Misc Group Stuff
510
511 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
512 * Group Information::           Information and help on groups and Gnus.
513 * Group Timestamp::             Making Gnus keep track of when you last read a group.
514 * File Commands::               Reading and writing the Gnus files.
515 * Sieve Commands::              Managing Sieve scripts.
516
517 Summary Buffer
518
519 * Summary Buffer Format::       Deciding how the summary buffer is to look.
520 * Summary Maneuvering::         Moving around the summary buffer.
521 * Choosing Articles::           Reading articles.
522 * Paging the Article::          Scrolling the current article.
523 * Reply Followup and Post::     Posting articles.
524 * Delayed Articles::            Send articles at a later time.
525 * Marking Articles::            Marking articles as read, expirable, etc.
526 * Limiting::                    You can limit the summary buffer.
527 * Threading::                   How threads are made.
528 * Sorting the Summary Buffer::  How articles and threads are sorted.
529 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
530 * Article Caching::             You may store articles in a cache.
531 * Persistent Articles::         Making articles expiry-resistant.
532 * Article Backlog::             Having already read articles hang around.
533 * Saving Articles::             Ways of customizing article saving.
534 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
535 * Article Treatment::           The article buffer can be mangled at will.
536 * MIME Commands::               Doing MIMEy things with the articles.
537 * Charsets::                    Character set issues.
538 * Article Commands::            Doing various things with the article buffer.
539 * Summary Sorting::             Sorting the summary buffer in various ways.
540 * Finding the Parent::          No child support? Get the parent.
541 * Alternative Approaches::      Reading using non-default summaries.
542 * Tree Display::                A more visual display of threads.
543 * Mail Group Commands::         Some commands can only be used in mail groups.
544 * Various Summary Stuff::       What didn't fit anywhere else.
545 * Exiting the Summary Buffer::  Returning to the Group buffer,
546                                 or reselecting the current group.
547 * Crosspost Handling::          How crossposted articles are dealt with.
548 * Duplicate Suppression::       An alternative when crosspost handling fails.
549 * Security::                    Decrypt and Verify.
550 * Mailing List::                Mailing list minor mode.
551
552 Summary Buffer Format
553
554 * Summary Buffer Lines::        You can specify how summary lines should look.
555 * To From Newsgroups::          How to not display your own name.
556 * Summary Buffer Mode Line::    You can say how the mode line should look.
557 * Summary Highlighting::        Making the summary buffer all pretty and nice.
558
559 Choosing Articles
560
561 * Choosing Commands::           Commands for choosing articles.
562 * Choosing Variables::          Variables that influence these commands.
563
564 Reply, Followup and Post
565
566 * Summary Mail Commands::       Sending mail.
567 * Summary Post Commands::       Sending news.
568 * Summary Message Commands::    Other Message-related commands.
569 * Canceling and Superseding::
570
571 Marking Articles
572
573 * Unread Articles::             Marks for unread articles.
574 * Read Articles::               Marks for read articles.
575 * Other Marks::                 Marks that do not affect readedness.
576 * Setting Marks::
577 * Generic Marking Commands::
578 * Setting Process Marks::
579
580 Marking Articles
581
582 * Setting Marks::             How to set and remove marks.
583 * Generic Marking Commands::  How to customize the marking.
584 * Setting Process Marks::     How to mark articles for later processing.
585
586 Threading
587
588 * Customizing Threading::       Variables you can change to affect the threading.
589 * Thread Commands::             Thread based commands in the summary buffer.
590
591 Customizing Threading
592
593 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
594 * Filling In Threads::          Making the threads displayed look fuller.
595 * More Threading::              Even more variables for fiddling with threads.
596 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
597
598 Decoding Articles
599
600 * Uuencoded Articles::          Uudecode articles.
601 * Shell Archives::              Unshar articles.
602 * PostScript Files::            Split PostScript.
603 * Other Files::                 Plain save and binhex.
604 * Decoding Variables::          Variables for a happy decoding.
605 * Viewing Files::               You want to look at the result of the decoding?
606
607 Decoding Variables
608
609 * Rule Variables::              Variables that say how a file is to be viewed.
610 * Other Decode Variables::      Other decode variables.
611 * Uuencoding and Posting::      Variables for customizing uuencoding.
612
613 Article Treatment
614
615 * Article Highlighting::        You want to make the article look like fruit salad.
616 * Article Fontisizing::         Making emphasized text look nice.
617 * Article Hiding::              You also want to make certain info go away.
618 * Article Washing::             Lots of way-neat functions to make life better.
619 * Article Header::              Doing various header transformations.
620 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
621 * Article Button Levels::       Controlling appearance of buttons.
622 * Article Date::                Grumble, UT!
623 * Article Display::             Display various stuff---X-Face, Picons, Smileys
624 * Article Signature::           What is a signature?
625 * Article Miscellanea::         Various other stuff.
626
627 Alternative Approaches
628
629 * Pick and Read::               First mark articles and then read them.
630 * Binary Groups::               Auto-decode all articles.
631
632 Various Summary Stuff
633
634 * Summary Group Information::   Information oriented commands.
635 * Searching for Articles::      Multiple article commands.
636 * Summary Generation Commands::
637 * Really Various Summary Commands::  Those pesky non-conformant commands.
638
639 Article Buffer
640
641 * Hiding Headers::              Deciding what headers should be displayed.
642 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
643 * Customizing Articles::        Tailoring the look of the articles.
644 * Article Keymap::              Keystrokes available in the article buffer.
645 * Misc Article::                Other stuff.
646
647 Composing Messages
648
649 * Mail::                        Mailing and replying.
650 * Posting Server::              What server should you post and mail via?
651 * Mail and Post::               Mailing and posting at the same time.
652 * Archived Messages::           Where Gnus stores the messages you've sent.
653 * Posting Styles::              An easier way to specify who you are.
654 * Drafts::                      Postponing messages and rejected messages.
655 * Rejected Articles::           What happens if the server doesn't like your article?
656 * Signing and encrypting::      How to compose secure messages.
657
658 Select Methods
659
660 * Server Buffer::               Making and editing virtual servers.
661 * Getting News::                Reading USENET news with Gnus.
662 * Getting Mail::                Reading your personal mail with Gnus.
663 * Browsing the Web::            Getting messages from a plethora of Web sources.
664 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
665 * Other Sources::               Reading directories, files, SOUP packets.
666 * Combined Groups::             Combining groups into one group.
667 * Gnus Unplugged::              Reading news and mail offline.
668
669 Server Buffer
670
671 * Server Buffer Format::        You can customize the look of this buffer.
672 * Server Commands::             Commands to manipulate servers.
673 * Example Methods::             Examples server specifications.
674 * Creating a Virtual Server::   An example session.
675 * Server Variables::            Which variables to set.
676 * Servers and Methods::         You can use server names as select methods.
677 * Unavailable Servers::         Some servers you try to contact may be down.
678
679 Getting News
680
681 * NNTP::                        Reading news from an @acronym{NNTP} server.
682 * News Spool::                  Reading news from the local spool.
683
684 @acronym{NNTP}
685
686 * Direct Functions::            Connecting directly to the server.
687 * Indirect Functions::          Connecting indirectly to the server.
688 * Common Variables::            Understood by several connection functions.
689
690 Getting Mail
691
692 * Mail in a Newsreader::        Important introductory notes.
693 * Getting Started Reading Mail::  A simple cookbook example.
694 * Splitting Mail::              How to create mail groups.
695 * Mail Sources::                How to tell Gnus where to get mail from.
696 * Mail Back End Variables::     Variables for customizing mail handling.
697 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
698 * Group Mail Splitting::        Use group customize to drive mail splitting.
699 * Incorporating Old Mail::      What about the old mail you have?
700 * Expiring Mail::               Getting rid of unwanted mail.
701 * Washing Mail::                Removing cruft from the mail you get.
702 * Duplicates::                  Dealing with duplicated mail.
703 * Not Reading Mail::            Using mail back ends for reading other files.
704 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
705
706 Mail Sources
707
708 * Mail Source Specifiers::      How to specify what a mail source is.
709 * Mail Source Customization::   Some variables that influence things.
710 * Fetching Mail::               Using the mail source specifiers.
711
712 Choosing a Mail Back End
713
714 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
715 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
716 * Mail Spool::                  Store your mail in a private spool?
717 * MH Spool::                    An mhspool-like back end.
718 * Maildir::                     Another one-file-per-message format.
719 * Mail Folders::                Having one file for each group.
720 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
721
722 Browsing the Web
723
724 * Archiving Mail::
725 * Web Searches::                Creating groups from articles that match a string.
726 * Slashdot::                    Reading the Slashdot comments.
727 * Ultimate::                    The Ultimate Bulletin Board systems.
728 * Web Archive::                 Reading mailing list archived on web.
729 * RSS::                         Reading RDF site summary.
730 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
731
732 @acronym{IMAP}
733
734 * Splitting in IMAP::           Splitting mail with nnimap.
735 * Expiring in IMAP::            Expiring mail with nnimap.
736 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
737 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
738 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
739
740 Other Sources
741
742 * Directory Groups::            You can read a directory as if it was a newsgroup.
743 * Anything Groups::             Dired?  Who needs dired?
744 * Document Groups::             Single files can be the basis of a group.
745 * SOUP::                        Reading @sc{soup} packets ``offline''.
746 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
747
748 Document Groups
749
750 * Document Server Internals::   How to add your own document types.
751
752 SOUP
753
754 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
755 * SOUP Groups::                 A back end for reading @sc{soup} packets.
756 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
757
758 Combined Groups
759
760 * Virtual Groups::              Combining articles from many groups.
761 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
762
763 Gnus Unplugged
764
765 * Agent Basics::                How it all is supposed to work.
766 * Agent Categories::            How to tell the Gnus Agent what to download.
767 * Agent Commands::              New commands for all the buffers.
768 * Agent Visuals::               Ways that the agent may effect your summary buffer.
769 * Agent as Cache::              The Agent is a big cache too.
770 * Agent Expiry::                How to make old articles go away.
771 * Agent Regeneration::          How to recover from lost connections and other accidents.
772 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
773 * Outgoing Messages::           What happens when you post/mail something?
774 * Agent Variables::             Customizing is fun.
775 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
776 * Batching Agents::             How to fetch news from a @code{cron} job.
777 * Agent Caveats::               What you think it'll do and what it does.
778
779 Agent Categories
780
781 * Category Syntax::             What a category looks like.
782 * Category Buffer::             A buffer for maintaining categories.
783 * Category Variables::          Customize'r'Us.
784
785 Agent Commands
786
787 * Group Agent Commands::        Configure groups and fetch their contents.
788 * Summary Agent Commands::      Manually select then fetch specific articles.
789 * Server Agent Commands::       Select the servers that are supported by the agent.
790
791 Scoring
792
793 * Summary Score Commands::      Adding score entries for the current group.
794 * Group Score Commands::        General score commands.
795 * Score Variables::             Customize your scoring.  (My, what terminology).
796 * Score File Format::           What a score file may contain.
797 * Score File Editing::          You can edit score files by hand as well.
798 * Adaptive Scoring::            Big Sister Gnus knows what you read.
799 * Home Score File::             How to say where new score entries are to go.
800 * Followups To Yourself::       Having Gnus notice when people answer you.
801 * Scoring On Other Headers::    Scoring on non-standard headers.
802 * Scoring Tips::                How to score effectively.
803 * Reverse Scoring::             That problem child of old is not problem.
804 * Global Score Files::          Earth-spanning, ear-splitting score files.
805 * Kill Files::                  They are still here, but they can be ignored.
806 * Converting Kill Files::       Translating kill files to score files.
807 * GroupLens::                   Getting predictions on what you like to read.
808 * Advanced Scoring::            Using logical expressions to build score rules.
809 * Score Decays::                It can be useful to let scores wither away.
810
811 GroupLens
812
813 * Using GroupLens::             How to make Gnus use GroupLens.
814 * Rating Articles::             Letting GroupLens know how you rate articles.
815 * Displaying Predictions::      Displaying predictions given by GroupLens.
816 * GroupLens Variables::         Customizing GroupLens.
817
818 Advanced Scoring
819
820 * Advanced Scoring Syntax::     A definition.
821 * Advanced Scoring Examples::   What they look like.
822 * Advanced Scoring Tips::       Getting the most out of it.
823
824 Various
825
826 * Process/Prefix::              A convention used by many treatment commands.
827 * Interactive::                 Making Gnus ask you many questions.
828 * Symbolic Prefixes::           How to supply some Gnus functions with options.
829 * Formatting Variables::        You can specify what buffers should look like.
830 * Window Layout::               Configuring the Gnus buffer windows.
831 * Faces and Fonts::             How to change how faces look.
832 * Compilation::                 How to speed Gnus up.
833 * Mode Lines::                  Displaying information in the mode lines.
834 * Highlighting and Menus::      Making buffers look all nice and cozy.
835 * Buttons::                     Get tendinitis in ten easy steps!
836 * Daemons::                     Gnus can do things behind your back.
837 * NoCeM::                       How to avoid spam and other fatty foods.
838 * Undo::                        Some actions can be undone.
839 * Predicate Specifiers::        Specifying predicates.
840 * Moderation::                  What to do if you're a moderator.
841 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
842 * Fuzzy Matching::              What's the big fuzz?
843 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
844 * Various Various::             Things that are really various.
845
846 Formatting Variables
847
848 * Formatting Basics::           A formatting variable is basically a format string.
849 * Mode Line Formatting::        Some rules about mode line formatting variables.
850 * Advanced Formatting::         Modifying output in various ways.
851 * User-Defined Specs::          Having Gnus call your own functions.
852 * Formatting Fonts::            Making the formatting look colorful and nice.
853 * Positioning Point::           Moving point to a position after an operation.
854 * Tabulation::                  Tabulating your output.
855 * Wide Characters::             Dealing with wide characters.
856
857 Image Enhancements
858
859 * Picons::                      How to display pictures of what you're reading.
860 * Smileys::                     Show all those happy faces the way they were meant to be shown.
861 * X-Face::                      Display a funky, teensy black-and-white image.
862 * XVarious::                    Other XEmacsy Gnusey variables.
863
864 Thwarting Email Spam
865
866 * The problem of spam::         Some background, and some solutions
867 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
868 * SpamAssassin::                How to use external anti-spam tools.
869 * Hashcash::                    Reduce spam by burning CPU time.
870 * Filtering Spam Using The Spam ELisp Package::
871 * Filtering Spam Using Statistics with spam-stat::
872
873 Appendices
874
875 * XEmacs::                      Requirements for installing under XEmacs.
876 * History::                     How Gnus got where it is today.
877 * On Writing Manuals::          Why this is not a beginner's guide.
878 * Terminology::                 We use really difficult, like, words here.
879 * Customization::               Tailoring Gnus to your needs.
880 * Troubleshooting::             What you might try if things do not work.
881 * Gnus Reference Guide::        Rilly, rilly technical stuff.
882 * Emacs for Heathens::          A short introduction to Emacsian terms.
883 * Frequently Asked Questions::  The Gnus FAQ.
884
885 History
886
887 * Gnus Versions::               What Gnus versions have been released.
888 * Other Gnus Versions::         Other Gnus versions that also have been released.
889 * Why?::                        What's the point of Gnus?
890 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
891 * Conformity::                  Gnus tries to conform to all standards.
892 * Emacsen::                     Gnus can be run on a few modern Emacsen.
893 * Gnus Development::            How Gnus is developed.
894 * Contributors::                Oodles of people.
895 * New Features::                Pointers to some of the new stuff in Gnus.
896
897 New Features
898
899 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
900 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
901 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
902 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
903 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
904 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
905
906 Customization
907
908 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
909 * Slow Terminal Connection::    You run a remote Emacs.
910 * Little Disk Space::           You feel that having large setup files is icky.
911 * Slow Machine::                You feel like buying a faster machine.
912
913 Gnus Reference Guide
914
915 * Gnus Utility Functions::      Common functions and variable to use.
916 * Back End Interface::          How Gnus communicates with the servers.
917 * Score File Syntax::           A BNF definition of the score file standard.
918 * Headers::                     How Gnus stores headers internally.
919 * Ranges::                      A handy format for storing mucho numbers.
920 * Group Info::                  The group info format.
921 * Extended Interactive::        Symbolic prefixes and stuff.
922 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
923 * Various File Formats::        Formats of files that Gnus use.
924
925 Back End Interface
926
927 * Required Back End Functions::  Functions that must be implemented.
928 * Optional Back End Functions::  Functions that need not be implemented.
929 * Error Messaging::             How to get messages and report errors.
930 * Writing New Back Ends::       Extending old back ends.
931 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
932 * Mail-like Back Ends::         Some tips on mail back ends.
933
934 Various File Formats
935
936 * Active File Format::          Information on articles and groups available.
937 * Newsgroups File Format::      Group descriptions.
938
939 Emacs for Heathens
940
941 * Keystrokes::                  Entering text and executing commands.
942 * Emacs Lisp::                  The built-in Emacs programming language.
943
944 @end detailmenu
945 @end menu
946
947 @node Starting Up
948 @chapter Starting gnus
949 @cindex starting up
950
951 @kindex M-x gnus
952 @findex gnus
953 If your system administrator has set things up properly, starting gnus
954 and reading news is extremely easy---you just type @kbd{M-x gnus} in
955 your Emacs.
956
957 @findex gnus-other-frame
958 @kindex M-x gnus-other-frame
959 If you want to start gnus in a different frame, you can use the command
960 @kbd{M-x gnus-other-frame} instead.
961
962 If things do not go smoothly at startup, you have to twiddle some
963 variables in your @file{~/.gnus.el} file.  This file is similar to
964 @file{~/.emacs}, but is read when gnus starts.
965
966 If you puzzle at any terms used in this manual, please refer to the
967 terminology section (@pxref{Terminology}).
968
969 @menu
970 * Finding the News::            Choosing a method for getting news.
971 * The First Time::              What does Gnus do the first time you start it?
972 * The Server is Down::          How can I read my mail then?
973 * Slave Gnusae::                You can have more than one Gnus active at a time.
974 * Fetching a Group::            Starting Gnus just to read a group.
975 * New Groups::                  What is Gnus supposed to do with new groups?
976 * Changing Servers::            You may want to move from one server to another.
977 * Startup Files::               Those pesky startup files---@file{.newsrc}.
978 * Auto Save::                   Recovering from a crash.
979 * The Active File::             Reading the active file over a slow line Takes Time.
980 * Startup Variables::           Other variables you might change.
981 @end menu
982
983
984 @node Finding the News
985 @section Finding the News
986 @cindex finding news
987
988 @vindex gnus-select-method
989 @c @head
990 The @code{gnus-select-method} variable says where gnus should look for
991 news.  This variable should be a list where the first element says
992 @dfn{how} and the second element says @dfn{where}.  This method is your
993 native method.  All groups not fetched with this method are
994 foreign groups.
995
996 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
997 you want to get your daily dosage of news from, you'd say:
998
999 @lisp
1000 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1001 @end lisp
1002
1003 If you want to read directly from the local spool, say:
1004
1005 @lisp
1006 (setq gnus-select-method '(nnspool ""))
1007 @end lisp
1008
1009 If you can use a local spool, you probably should, as it will almost
1010 certainly be much faster.  But do not use the local spool if your
1011 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1012
1013 @vindex gnus-nntpserver-file
1014 @cindex NNTPSERVER
1015 @cindex @acronym{NNTP} server
1016 If this variable is not set, gnus will take a look at the
1017 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1018 gnus will see whether @code{gnus-nntpserver-file}
1019 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1020 If that fails as well, gnus will try to use the machine running Emacs
1021 as an @acronym{NNTP} server.  That's a long shot, though.
1022
1023 @vindex gnus-nntp-server
1024 If @code{gnus-nntp-server} is set, this variable will override
1025 @code{gnus-select-method}.  You should therefore set
1026 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1027
1028 @vindex gnus-secondary-servers
1029 @vindex gnus-nntp-server
1030 You can also make gnus prompt you interactively for the name of an
1031 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1032 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1033 in the @code{gnus-secondary-servers} list (if any).  You can also just
1034 type in the name of any server you feel like visiting.  (Note that this
1035 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1036 gnus} later in the same Emacs session, Gnus will contact the same
1037 server.)
1038
1039 @findex gnus-group-browse-foreign-server
1040 @kindex B (Group)
1041 However, if you use one @acronym{NNTP} server regularly and are just
1042 interested in a couple of groups from a different server, you would be
1043 better served by using the @kbd{B} command in the group buffer.  It will
1044 let you have a look at what groups are available, and you can subscribe
1045 to any of the groups you want to.  This also makes @file{.newsrc}
1046 maintenance much tidier.  @xref{Foreign Groups}.
1047
1048 @vindex gnus-secondary-select-methods
1049 @c @head
1050 A slightly different approach to foreign groups is to set the
1051 @code{gnus-secondary-select-methods} variable.  The select methods
1052 listed in this variable are in many ways just as native as the
1053 @code{gnus-select-method} server.  They will also be queried for active
1054 files during startup (if that's required), and new newsgroups that
1055 appear on these servers will be subscribed (or not) just as native
1056 groups are.
1057
1058 For instance, if you use the @code{nnmbox} back end to read your mail,
1059 you would typically set this variable to
1060
1061 @lisp
1062 (setq gnus-secondary-select-methods '((nnmbox "")))
1063 @end lisp
1064
1065
1066 @node The First Time
1067 @section The First Time
1068 @cindex first time usage
1069
1070 If no startup files exist, gnus will try to determine what groups should
1071 be subscribed by default.
1072
1073 @vindex gnus-default-subscribed-newsgroups
1074 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1075 will subscribe you to just those groups in that list, leaving the rest
1076 killed.  Your system administrator should have set this variable to
1077 something useful.
1078
1079 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1080 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1081 here as @dfn{whatever Lars thinks you should read}.)
1082
1083 You'll also be subscribed to the gnus documentation group, which should
1084 help you with most common problems.
1085
1086 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1087 use the normal functions for handling new groups, and not do anything
1088 special.
1089
1090
1091 @node The Server is Down
1092 @section The Server is Down
1093 @cindex server errors
1094
1095 If the default server is down, gnus will understandably have some
1096 problems starting.  However, if you have some mail groups in addition to
1097 the news groups, you may want to start gnus anyway.
1098
1099 Gnus, being the trusting sort of program, will ask whether to proceed
1100 without a native select method if that server can't be contacted.  This
1101 will happen whether the server doesn't actually exist (i.e., you have
1102 given the wrong address) or the server has just momentarily taken ill
1103 for some reason or other.  If you decide to continue and have no foreign
1104 groups, you'll find it difficult to actually do anything in the group
1105 buffer.  But, hey, that's your problem.  Blllrph!
1106
1107 @findex gnus-no-server
1108 @kindex M-x gnus-no-server
1109 @c @head
1110 If you know that the server is definitely down, or you just want to read
1111 your mail without bothering with the server at all, you can use the
1112 @code{gnus-no-server} command to start gnus.  That might come in handy
1113 if you're in a hurry as well.  This command will not attempt to contact
1114 your primary server---instead, it will just activate all groups on level
1115 1 and 2.  (You should preferably keep no native groups on those two
1116 levels.) Also @pxref{Group Levels}.
1117
1118
1119 @node Slave Gnusae
1120 @section Slave Gnusae
1121 @cindex slave
1122
1123 You might want to run more than one Emacs with more than one gnus at the
1124 same time.  If you are using different @file{.newsrc} files (e.g., if you
1125 are using the two different gnusae to read from two different servers),
1126 that is no problem whatsoever.  You just do it.
1127
1128 The problem appears when you want to run two Gnusae that use the same
1129 @file{.newsrc} file.
1130
1131 To work around that problem some, we here at the Think-Tank at the gnus
1132 Towers have come up with a new concept: @dfn{Masters} and
1133 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1134 taken out a copyright on those words.  If you wish to use those words in
1135 conjunction with each other, you have to send $1 per usage instance to
1136 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1137 Applications}) will be much more expensive, of course.)
1138
1139 @findex gnus-slave
1140 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1141 however you do it).  Each subsequent slave gnusae should be started with
1142 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1143 files, but instead save @dfn{slave files} that contain information only
1144 on what groups have been read in the slave session.  When a master gnus
1145 starts, it will read (and delete) these slave files, incorporating all
1146 information from them.  (The slave files will be read in the sequence
1147 they were created, so the latest changes will have precedence.)
1148
1149 Information from the slave files has, of course, precedence over the
1150 information in the normal (i.e., master) @file{.newsrc} file.
1151
1152 If the @file{.newsrc*} files have not been saved in the master when the
1153 slave starts, you may be prompted as to whether to read an auto-save
1154 file.  If you answer ``yes'', the unsaved changes to the master will be
1155 incorporated into the slave.  If you answer ``no'', the slave may see some
1156 messages as unread that have been read in the master.
1157
1158 @node Fetching a Group
1159 @section Fetching a Group
1160 @cindex fetching a group
1161
1162 @findex gnus-fetch-group
1163 It is sometimes convenient to be able to just say ``I want to read this
1164 group and I don't care whether gnus has been started or not''.  This is
1165 perhaps more useful for people who write code than for users, but the
1166 command @code{gnus-fetch-group} provides this functionality in any case.
1167 It takes the group name as a parameter.
1168
1169
1170 @node New Groups
1171 @section New Groups
1172 @cindex new groups
1173 @cindex subscription
1174
1175 @vindex gnus-check-new-newsgroups
1176 If you are satisfied that you really never want to see any new groups,
1177 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1178 also save you some time at startup.  Even if this variable is
1179 @code{nil}, you can always subscribe to the new groups just by pressing
1180 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1181 is @code{ask-server} by default.  If you set this variable to
1182 @code{always}, then Gnus will query the back ends for new groups even
1183 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1184
1185 @menu
1186 * Checking New Groups::         Determining what groups are new.
1187 * Subscription Methods::        What Gnus should do with new groups.
1188 * Filtering New Groups::        Making Gnus ignore certain new groups.
1189 @end menu
1190
1191
1192 @node Checking New Groups
1193 @subsection Checking New Groups
1194
1195 Gnus normally determines whether a group is new or not by comparing the
1196 list of groups from the active file(s) with the lists of subscribed and
1197 dead groups.  This isn't a particularly fast method.  If
1198 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1199 server for new groups since the last time.  This is both faster and
1200 cheaper.  This also means that you can get rid of the list of killed
1201 groups altogether, so you may set @code{gnus-save-killed-list} to
1202 @code{nil}, which will save time both at startup, at exit, and all over.
1203 Saves disk space, too.  Why isn't this the default, then?
1204 Unfortunately, not all servers support this command.
1205
1206 I bet I know what you're thinking now: How do I find out whether my
1207 server supports @code{ask-server}?  No?  Good, because I don't have a
1208 fail-safe answer.  I would suggest just setting this variable to
1209 @code{ask-server} and see whether any new groups appear within the next
1210 few days.  If any do, then it works.  If none do, then it doesn't
1211 work.  I could write a function to make gnus guess whether the server
1212 supports @code{ask-server}, but it would just be a guess.  So I won't.
1213 You could @code{telnet} to the server and say @code{HELP} and see
1214 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1215 it does, then it might work.  (But there are servers that lists
1216 @samp{NEWGROUPS} without supporting the function properly.)
1217
1218 This variable can also be a list of select methods.  If so, gnus will
1219 issue an @code{ask-server} command to each of the select methods, and
1220 subscribe them (or not) using the normal methods.  This might be handy
1221 if you are monitoring a few servers for new groups.  A side effect is
1222 that startup will take much longer, so you can meditate while waiting.
1223 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1224
1225
1226 @node Subscription Methods
1227 @subsection Subscription Methods
1228
1229 @vindex gnus-subscribe-newsgroup-method
1230 What gnus does when it encounters a new group is determined by the
1231 @code{gnus-subscribe-newsgroup-method} variable.
1232
1233 This variable should contain a function.  This function will be called
1234 with the name of the new group as the only parameter.
1235
1236 Some handy pre-fab functions are:
1237
1238 @table @code
1239
1240 @item gnus-subscribe-zombies
1241 @vindex gnus-subscribe-zombies
1242 Make all new groups zombies.  This is the default.  You can browse the
1243 zombies later (with @kbd{A z}) and either kill them all off properly
1244 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1245
1246 @item gnus-subscribe-randomly
1247 @vindex gnus-subscribe-randomly
1248 Subscribe all new groups in arbitrary order.  This really means that all
1249 new groups will be added at ``the top'' of the group buffer.
1250
1251 @item gnus-subscribe-alphabetically
1252 @vindex gnus-subscribe-alphabetically
1253 Subscribe all new groups in alphabetical order.
1254
1255 @item gnus-subscribe-hierarchically
1256 @vindex gnus-subscribe-hierarchically
1257 Subscribe all new groups hierarchically.  The difference between this
1258 function and @code{gnus-subscribe-alphabetically} is slight.
1259 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1260 alphabetical fashion, while this function will enter groups into its
1261 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1262 @samp{comp} hierarchy, this function will not mess that configuration
1263 up.  Or something like that.
1264
1265 @item gnus-subscribe-interactively
1266 @vindex gnus-subscribe-interactively
1267 Subscribe new groups interactively.  This means that gnus will ask
1268 you about @strong{all} new groups.  The groups you choose to subscribe
1269 to will be subscribed hierarchically.
1270
1271 @item gnus-subscribe-killed
1272 @vindex gnus-subscribe-killed
1273 Kill all new groups.
1274
1275 @item gnus-subscribe-topics
1276 @vindex gnus-subscribe-topics
1277 Put the groups into the topic that has a matching @code{subscribe} topic
1278 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1279 topic parameter that looks like
1280
1281 @example
1282 "nnslashdot"
1283 @end example
1284
1285 will mean that all groups that match that regex will be subscribed under
1286 that topic.
1287
1288 If no topics match the groups, the groups will be subscribed in the
1289 top-level topic.
1290
1291 @end table
1292
1293 @vindex gnus-subscribe-hierarchical-interactive
1294 A closely related variable is
1295 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1296 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1297 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1298 will ask you for each sub-hierarchy whether you want to descend the
1299 hierarchy or not.
1300
1301 One common mistake is to set the variable a few paragraphs above
1302 (@code{gnus-subscribe-newsgroup-method}) to
1303 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1304 will not work.  This is ga-ga.  So don't do it.
1305
1306
1307 @node Filtering New Groups
1308 @subsection Filtering New Groups
1309
1310 A nice and portable way to control which new newsgroups should be
1311 subscribed (or ignored) is to put an @dfn{options} line at the start of
1312 the @file{.newsrc} file.  Here's an example:
1313
1314 @example
1315 options -n !alt.all !rec.all sci.all
1316 @end example
1317
1318 @vindex gnus-subscribe-options-newsgroup-method
1319 This line obviously belongs to a serious-minded intellectual scientific
1320 person (or she may just be plain old boring), because it says that all
1321 groups that have names beginning with @samp{alt} and @samp{rec} should
1322 be ignored, and all groups with names beginning with @samp{sci} should
1323 be subscribed.  Gnus will not use the normal subscription method for
1324 subscribing these groups.
1325 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1326 variable defaults to @code{gnus-subscribe-alphabetically}.
1327
1328 @vindex gnus-options-not-subscribe
1329 @vindex gnus-options-subscribe
1330 If you don't want to mess with your @file{.newsrc} file, you can just
1331 set the two variables @code{gnus-options-subscribe} and
1332 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1333 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1334 and if the new group matches the former, it will be unconditionally
1335 subscribed, and if it matches the latter, it will be ignored.
1336
1337 @vindex gnus-auto-subscribed-groups
1338 Yet another variable that meddles here is
1339 @code{gnus-auto-subscribed-groups}.  It works exactly like
1340 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1341 thought it would be nice to have two of these.  This variable is more
1342 meant for setting some ground rules, while the other variable is used
1343 more for user fiddling.  By default this variable makes all new groups
1344 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1345 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1346 subscribed.  If you don't like that, just set this variable to
1347 @code{nil}.
1348
1349 New groups that match this regexp are subscribed using
1350 @code{gnus-subscribe-options-newsgroup-method}.
1351
1352
1353 @node Changing Servers
1354 @section Changing Servers
1355 @cindex changing servers
1356
1357 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1358 This happens very rarely, but perhaps you change jobs, or one server is
1359 very flaky and you want to use another.
1360
1361 Changing the server is pretty easy, right?  You just change
1362 @code{gnus-select-method} to point to the new server?
1363
1364 @emph{Wrong!}
1365
1366 Article numbers are not (in any way) kept synchronized between different
1367 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1368 you have read is by keeping track of article numbers.  So when you
1369 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1370 worthless.
1371
1372 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1373 file from one server to another.  They all have one thing in
1374 common---they take a looong time to run.  You don't want to use these
1375 functions more than absolutely necessary.
1376
1377 @kindex M-x gnus-change-server
1378 @findex gnus-change-server
1379 If you have access to both servers, Gnus can request the headers for all
1380 the articles you have read and compare @code{Message-ID}s and map the
1381 article numbers of the read articles and article marks.  The @kbd{M-x
1382 gnus-change-server} command will do this for all your native groups.  It
1383 will prompt for the method you want to move to.
1384
1385 @kindex M-x gnus-group-move-group-to-server
1386 @findex gnus-group-move-group-to-server
1387 You can also move individual groups with the @kbd{M-x
1388 gnus-group-move-group-to-server} command.  This is useful if you want to
1389 move a (foreign) group from one server to another.
1390
1391 @kindex M-x gnus-group-clear-data-on-native-groups
1392 @findex gnus-group-clear-data-on-native-groups
1393 If you don't have access to both the old and new server, all your marks
1394 and read ranges have become worthless.  You can use the @kbd{M-x
1395 gnus-group-clear-data-on-native-groups} command to clear out all data
1396 that you have on your native groups.  Use with caution.
1397
1398 @kindex M-x gnus-group-clear-data
1399 @findex gnus-group-clear-data
1400 Clear the data from the current group only---nix out marks and the
1401 list of read articles (@code{gnus-group-clear-data}).
1402
1403 After changing servers, you @strong{must} move the cache hierarchy away,
1404 since the cached articles will have wrong article numbers, which will
1405 affect which articles Gnus thinks are read.
1406 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1407 to have it done automatically; for @code{gnus-group-clear-data}, you
1408 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1409 cache for all groups).
1410
1411
1412 @node Startup Files
1413 @section Startup Files
1414 @cindex startup files
1415 @cindex .newsrc
1416 @cindex .newsrc.el
1417 @cindex .newsrc.eld
1418
1419 Now, you all know about the @file{.newsrc} file.  All subscription
1420 information is traditionally stored in this file.
1421
1422 Things got a bit more complicated with @sc{gnus}.  In addition to
1423 keeping the @file{.newsrc} file updated, it also used a file called
1424 @file{.newsrc.el} for storing all the information that didn't fit into
1425 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1426 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1427 files was the most recently saved, which enabled people to swap between
1428 @sc{gnus} and other newsreaders.
1429
1430 That was kinda silly, so Gnus went one better: In addition to the
1431 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1432 @file{.newsrc.eld}.  It will read whichever of these files that are most
1433 recent, but it will never write a @file{.newsrc.el} file.  You should
1434 never delete the @file{.newsrc.eld} file---it contains much information
1435 not stored in the @file{.newsrc} file.
1436
1437 @vindex gnus-save-newsrc-file
1438 @vindex gnus-read-newsrc-file
1439 You can turn off writing the @file{.newsrc} file by setting
1440 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1441 the file and save some space, as well as exiting from gnus faster.
1442 However, this will make it impossible to use other newsreaders than
1443 gnus.  But hey, who would want to, right?  Similarly, setting
1444 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1445 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1446 convenient if you have a tendency to use Netscape once in a while.
1447
1448 @vindex gnus-save-killed-list
1449 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1450 will not save the list of killed groups to the startup file.  This will
1451 save both time (when starting and quitting) and space (on disk).  It
1452 will also mean that Gnus has no record of what groups are new or old,
1453 so the automatic new groups subscription methods become meaningless.
1454 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1455 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1456 Groups}).  This variable can also be a regular expression.  If that's
1457 the case, remove all groups that do not match this regexp before
1458 saving.  This can be useful in certain obscure situations that involve
1459 several servers where not all servers support @code{ask-server}.
1460
1461 @vindex gnus-startup-file
1462 @vindex gnus-backup-startup-file
1463 @vindex version-control
1464 The @code{gnus-startup-file} variable says where the startup files are.
1465 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1466 file being whatever that one is, with a @samp{.eld} appended.
1467 If you want version control for this file, set
1468 @code{gnus-backup-startup-file}.  It respects the same values as the
1469 @code{version-control} variable.
1470
1471 @vindex gnus-save-newsrc-hook
1472 @vindex gnus-save-quick-newsrc-hook
1473 @vindex gnus-save-standard-newsrc-hook
1474 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1475 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1476 saving the @file{.newsrc.eld} file, and
1477 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1478 @file{.newsrc} file.  The latter two are commonly used to turn version
1479 control on or off.  Version control is on by default when saving the
1480 startup files.  If you want to turn backup creation off, say something like:
1481
1482 @lisp
1483 (defun turn-off-backup ()
1484   (set (make-local-variable 'backup-inhibited) t))
1485
1486 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1487 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1488 @end lisp
1489
1490 @vindex gnus-init-file
1491 @vindex gnus-site-init-file
1492 When gnus starts, it will read the @code{gnus-site-init-file}
1493 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1494 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1495 and can be used to avoid cluttering your @file{~/.emacs} and
1496 @file{site-init} files with gnus stuff.  Gnus will also check for files
1497 with the same names as these, but with @file{.elc} and @file{.el}
1498 suffixes.  In other words, if you have set @code{gnus-init-file} to
1499 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1500 and finally @file{~/.gnus} (in this order).
1501
1502
1503
1504 @node Auto Save
1505 @section Auto Save
1506 @cindex dribble file
1507 @cindex auto-save
1508
1509 Whenever you do something that changes the gnus data (reading articles,
1510 catching up, killing/subscribing groups), the change is added to a
1511 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1512 Emacs way.  If your Emacs should crash before you have saved the
1513 @file{.newsrc} files, all changes you have made can be recovered from
1514 this file.
1515
1516 If gnus detects this file at startup, it will ask the user whether to
1517 read it.  The auto save file is deleted whenever the real startup file is
1518 saved.
1519
1520 @vindex gnus-use-dribble-file
1521 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1522 maintain a dribble buffer.  The default is @code{t}.
1523
1524 @vindex gnus-dribble-directory
1525 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1526 this variable is @code{nil}, which it is by default, gnus will dribble
1527 into the directory where the @file{.newsrc} file is located.  (This is
1528 normally the user's home directory.)  The dribble file will get the same
1529 file permissions as the @file{.newsrc} file.
1530
1531 @vindex gnus-always-read-dribble-file
1532 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1533 read the dribble file on startup without querying the user.
1534
1535
1536 @node The Active File
1537 @section The Active File
1538 @cindex active file
1539 @cindex ignored groups
1540
1541 When gnus starts, or indeed whenever it tries to determine whether new
1542 articles have arrived, it reads the active file.  This is a very large
1543 file that lists all the active groups and articles on the server.
1544
1545 @vindex gnus-ignored-newsgroups
1546 Before examining the active file, gnus deletes all lines that match the
1547 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1548 any groups with bogus names, but you can use this variable to make gnus
1549 ignore hierarchies you aren't ever interested in.  However, this is not
1550 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1551 Groups} for an overview of other variables that can be used instead.
1552
1553 @c This variable is
1554 @c @code{nil} by default, and will slow down active file handling somewhat
1555 @c if you set it to anything else.
1556
1557 @vindex gnus-read-active-file
1558 @c @head
1559 The active file can be rather Huge, so if you have a slow network, you
1560 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1561 reading the active file.  This variable is @code{some} by default.
1562
1563 Gnus will try to make do by getting information just on the groups that
1564 you actually subscribe to.
1565
1566 Note that if you subscribe to lots and lots of groups, setting this
1567 variable to @code{nil} will probably make gnus slower, not faster.  At
1568 present, having this variable @code{nil} will slow gnus down
1569 considerably, unless you read news over a 2400 baud modem.
1570
1571 This variable can also have the value @code{some}.  Gnus will then
1572 attempt to read active info only on the subscribed groups.  On some
1573 servers this is quite fast (on sparkling, brand new INN servers that
1574 support the @code{LIST ACTIVE group} command), on others this isn't fast
1575 at all.  In any case, @code{some} should be faster than @code{nil}, and
1576 is certainly faster than @code{t} over slow lines.
1577
1578 Some news servers (old versions of Leafnode and old versions of INN, for
1579 instance) do not support the @code{LIST ACTIVE group}.  For these
1580 servers, @code{nil} is probably the most efficient value for this
1581 variable.
1582
1583 If this variable is @code{nil}, gnus will ask for group info in total
1584 lock-step, which isn't very fast.  If it is @code{some} and you use an
1585 @acronym{NNTP} server, gnus will pump out commands as fast as it can, and
1586 read all the replies in one swoop.  This will normally result in better
1587 performance, but if the server does not support the aforementioned
1588 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1589
1590 If you think that starting up Gnus takes too long, try all the three
1591 different values for this variable and see what works best for you.
1592
1593 In any case, if you use @code{some} or @code{nil}, you should definitely
1594 kill all groups that you aren't interested in to speed things up.
1595
1596 Note that this variable also affects active file retrieval from
1597 secondary select methods.
1598
1599
1600 @node Startup Variables
1601 @section Startup Variables
1602
1603 @table @code
1604
1605 @item gnus-load-hook
1606 @vindex gnus-load-hook
1607 A hook run while gnus is being loaded.  Note that this hook will
1608 normally be run just once in each Emacs session, no matter how many
1609 times you start gnus.
1610
1611 @item gnus-before-startup-hook
1612 @vindex gnus-before-startup-hook
1613 A hook run after starting up gnus successfully.
1614
1615 @item gnus-startup-hook
1616 @vindex gnus-startup-hook
1617 A hook run as the very last thing after starting up gnus
1618
1619 @item gnus-started-hook
1620 @vindex gnus-started-hook
1621 A hook that is run as the very last thing after starting up gnus
1622 successfully.
1623
1624 @item gnus-setup-news-hook
1625 @vindex gnus-setup-news-hook
1626 A hook that is run after reading the @file{.newsrc} file(s), but before
1627 generating the group buffer.
1628
1629 @item gnus-check-bogus-newsgroups
1630 @vindex gnus-check-bogus-newsgroups
1631 If non-@code{nil}, gnus will check for and delete all bogus groups at
1632 startup.  A @dfn{bogus group} is a group that you have in your
1633 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1634 bogus groups can take quite a while, so to save time and resources it's
1635 best to leave this option off, and do the checking for bogus groups once
1636 in a while from the group buffer instead (@pxref{Group Maintenance}).
1637
1638 @item gnus-inhibit-startup-message
1639 @vindex gnus-inhibit-startup-message
1640 If non-@code{nil}, the startup message won't be displayed.  That way,
1641 your boss might not notice as easily that you are reading news instead
1642 of doing your job.  Note that this variable is used before
1643 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1644
1645 @item gnus-no-groups-message
1646 @vindex gnus-no-groups-message
1647 Message displayed by gnus when no groups are available.
1648
1649 @item gnus-play-startup-jingle
1650 @vindex gnus-play-startup-jingle
1651 If non-@code{nil}, play the gnus jingle at startup.
1652
1653 @item gnus-startup-jingle
1654 @vindex gnus-startup-jingle
1655 Jingle to be played if the above variable is non-@code{nil}.  The
1656 default is @samp{Tuxedomoon.Jingle4.au}.
1657
1658 @end table
1659
1660
1661 @node Group Buffer
1662 @chapter Group Buffer
1663 @cindex group buffer
1664
1665 @c Alex Schroeder suggests to rearrange this as follows:
1666 @c
1667 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1668 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1669 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1670 @c   7. Group Score, 8. Group Buffer Format
1671 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1672 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1673 @c <kensanata> First, "Gnus considers groups... (default 9)."
1674 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1675 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1676 @c <kensanata> Then expand the next paragraph or add some more to it.
1677 @c    This short one sentence explains levels 1 and 2, therefore I understand
1678 @c    that I should keep important news at 3 and boring news at 4.
1679 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1680 @c    Maybe keep those that you don't want to read temporarily at 6,
1681 @c    those that you never want to read at 8, those that offend your
1682 @c    human rights at 9...
1683
1684
1685 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1686 is the first buffer shown when gnus starts, and will never be killed as
1687 long as gnus is active.
1688
1689 @iftex
1690 @iflatex
1691 \gnusfigure{The Group Buffer}{320}{
1692 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1693 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1694 \put(120,38){\vector(1,2){10}}
1695 \put(40,60){\makebox(0,0)[r]{Mode line}}
1696 \put(40,58){\vector(1,0){30}}
1697 \put(200,28){\makebox(0,0)[t]{Native select method}}
1698 \put(200,26){\vector(-1,2){15}}
1699 }
1700 @end iflatex
1701 @end iftex
1702
1703 @menu
1704 * Group Buffer Format::         Information listed and how you can change it.
1705 * Group Maneuvering::           Commands for moving in the group buffer.
1706 * Selecting a Group::           Actually reading news.
1707 * Subscription Commands::       Unsubscribing, killing, subscribing.
1708 * Group Data::                  Changing the info for a group.
1709 * Group Levels::                Levels? What are those, then?
1710 * Group Score::                 A mechanism for finding out what groups you like.
1711 * Marking Groups::              You can mark groups for later processing.
1712 * Foreign Groups::              Creating and editing groups.
1713 * Group Parameters::            Each group may have different parameters set.
1714 * Listing Groups::              Gnus can list various subsets of the groups.
1715 * Sorting Groups::              Re-arrange the group order.
1716 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1717 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1718 * Exiting Gnus::                Stop reading news and get some work done.
1719 * Group Topics::                A folding group mode divided into topics.
1720 * Misc Group Stuff::            Other stuff that you can to do.
1721 @end menu
1722
1723
1724 @node Group Buffer Format
1725 @section Group Buffer Format
1726
1727 @menu
1728 * Group Line Specification::    Deciding how the group buffer is to look.
1729 * Group Mode Line Specification::  The group buffer mode line.
1730 * Group Highlighting::          Having nice colors in the group buffer.
1731 @end menu
1732
1733
1734 @node Group Line Specification
1735 @subsection Group Line Specification
1736 @cindex group buffer format
1737
1738 The default format of the group buffer is nice and dull, but you can
1739 make it as exciting and ugly as you feel like.
1740
1741 Here's a couple of example group lines:
1742
1743 @example
1744      25: news.announce.newusers
1745  *    0: alt.fan.andrea-dworkin
1746 @end example
1747
1748 Quite simple, huh?
1749
1750 You can see that there are 25 unread articles in
1751 @samp{news.announce.newusers}.  There are no unread articles, but some
1752 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1753 asterisk at the beginning of the line?).
1754
1755 @vindex gnus-group-line-format
1756 You can change that format to whatever you want by fiddling with the
1757 @code{gnus-group-line-format} variable.  This variable works along the
1758 lines of a @code{format} specification, which is pretty much the same as
1759 a @code{printf} specifications, for those of you who use (feh!) C.
1760 @xref{Formatting Variables}.
1761
1762 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1763
1764 There should always be a colon on the line; the cursor always moves to
1765 the colon after performing an operation.  @xref{Positioning
1766 Point}.  Nothing else is required---not even the group name.  All
1767 displayed text is just window dressing, and is never examined by Gnus.
1768 Gnus stores all real information it needs using text properties.
1769
1770 (Note that if you make a really strange, wonderful, spreadsheet-like
1771 layout, everybody will believe you are hard at work with the accounting
1772 instead of wasting time reading news.)
1773
1774 Here's a list of all available format characters:
1775
1776 @table @samp
1777
1778 @item M
1779 An asterisk if the group only has marked articles.
1780
1781 @item S
1782 Whether the group is subscribed.
1783
1784 @item L
1785 Level of subscribedness.
1786
1787 @item N
1788 Number of unread articles.
1789
1790 @item I
1791 Number of dormant articles.
1792
1793 @item T
1794 Number of ticked articles.
1795
1796 @item R
1797 Number of read articles.
1798
1799 @item U
1800 Number of unseen articles.
1801
1802 @item t
1803 Estimated total number of articles.  (This is really @var{max-number}
1804 minus @var{min-number} plus 1.)
1805
1806 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1807 efficient access to @var{max-number} and @var{min-number} but getting
1808 the true unread message count is not possible efficiently.  For
1809 hysterical raisins, even the mail back ends, where the true number of
1810 unread messages might be available efficiently, use the same limited
1811 interface.  To remove this restriction from Gnus means that the back
1812 end interface has to be changed, which is not an easy job.  If you
1813 want to work on this, please contact the Gnus mailing list.
1814
1815 @item y
1816 Number of unread, unticked, non-dormant articles.
1817
1818 @item i
1819 Number of ticked and dormant articles.
1820
1821 @item g
1822 Full group name.
1823
1824 @item G
1825 Group name.
1826
1827 @item C
1828 Group comment (@pxref{Group Parameters}) or group name if there is no
1829 comment element in the group parameters.
1830
1831 @item D
1832 Newsgroup description.  You need to read the group descriptions
1833 before these will appear, and to do that, you either have to set
1834 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1835 command.
1836
1837 @item o
1838 @samp{m} if moderated.
1839
1840 @item O
1841 @samp{(m)} if moderated.
1842
1843 @item s
1844 Select method.
1845
1846 @item B
1847 If the summary buffer for the group is open or not.
1848
1849 @item n
1850 Select from where.
1851
1852 @item z
1853 A string that looks like @samp{<%s:%n>} if a foreign select method is
1854 used.
1855
1856 @item P
1857 Indentation based on the level of the topic (@pxref{Group Topics}).
1858
1859 @item c
1860 @vindex gnus-group-uncollapsed-levels
1861 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1862 variable says how many levels to leave at the end of the group name.
1863 The default is 1---this will mean that group names like
1864 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1865
1866 @item m
1867 @vindex gnus-new-mail-mark
1868 @cindex %
1869 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1870 the group lately.
1871
1872 @item p
1873 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1874
1875 @item d
1876 A string that says when you last read the group (@pxref{Group
1877 Timestamp}).
1878
1879 @item u
1880 User defined specifier.  The next character in the format string should
1881 be a letter.  Gnus will call the function
1882 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1883 following @samp{%u}.  The function will be passed a single dummy
1884 parameter as argument.  The function should return a string, which will
1885 be inserted into the buffer just like information from any other
1886 specifier.
1887 @end table
1888
1889 @cindex *
1890 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1891 if no info is available---for instance, if it is a non-activated foreign
1892 group, or a bogus native group.
1893
1894
1895 @node Group Mode Line Specification
1896 @subsection Group Mode Line Specification
1897 @cindex group mode line
1898
1899 @vindex gnus-group-mode-line-format
1900 The mode line can be changed by setting
1901 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1902 doesn't understand that many format specifiers:
1903
1904 @table @samp
1905 @item S
1906 The native news server.
1907 @item M
1908 The native select method.
1909 @end table
1910
1911
1912 @node Group Highlighting
1913 @subsection Group Highlighting
1914 @cindex highlighting
1915 @cindex group highlighting
1916
1917 @vindex gnus-group-highlight
1918 Highlighting in the group buffer is controlled by the
1919 @code{gnus-group-highlight} variable.  This is an alist with elements
1920 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1921 something non-@code{nil}, the @var{face} will be used on the line.
1922
1923 Here's an example value for this variable that might look nice if the
1924 background is dark:
1925
1926 @lisp
1927 (cond (window-system
1928        (setq custom-background-mode 'light)
1929        (defface my-group-face-1
1930          '((t (:foreground "Red" :bold t))) "First group face")
1931        (defface my-group-face-2
1932          '((t (:foreground "DarkSeaGreen4" :bold t)))
1933          "Second group face")
1934        (defface my-group-face-3
1935          '((t (:foreground "Green4" :bold t))) "Third group face")
1936        (defface my-group-face-4
1937          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1938        (defface my-group-face-5
1939          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1940
1941 (setq gnus-group-highlight
1942       '(((> unread 200) . my-group-face-1)
1943         ((and (< level 3) (zerop unread)) . my-group-face-2)
1944         ((< level 3) . my-group-face-3)
1945         ((zerop unread) . my-group-face-4)
1946         (t . my-group-face-5)))
1947 @end lisp
1948
1949 Also @pxref{Faces and Fonts}.
1950
1951 Variables that are dynamically bound when the forms are evaluated
1952 include:
1953
1954 @table @code
1955 @item group
1956 The group name.
1957 @item unread
1958 The number of unread articles in the group.
1959 @item method
1960 The select method.
1961 @item mailp
1962 Whether the group is a mail group.
1963 @item level
1964 The level of the group.
1965 @item score
1966 The score of the group.
1967 @item ticked
1968 The number of ticked articles in the group.
1969 @item total
1970 The total number of articles in the group.  Or rather,
1971 @var{max-number} minus @var{min-number} plus one.
1972 @item topic
1973 When using the topic minor mode, this variable is bound to the current
1974 topic being inserted.
1975 @end table
1976
1977 When the forms are @code{eval}ed, point is at the beginning of the line
1978 of the group in question, so you can use many of the normal gnus
1979 functions for snarfing info on the group.
1980
1981 @vindex gnus-group-update-hook
1982 @findex gnus-group-highlight-line
1983 @code{gnus-group-update-hook} is called when a group line is changed.
1984 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1985 calls @code{gnus-group-highlight-line} by default.
1986
1987
1988 @node Group Maneuvering
1989 @section Group Maneuvering
1990 @cindex group movement
1991
1992 All movement commands understand the numeric prefix and will behave as
1993 expected, hopefully.
1994
1995 @table @kbd
1996
1997 @item n
1998 @kindex n (Group)
1999 @findex gnus-group-next-unread-group
2000 Go to the next group that has unread articles
2001 (@code{gnus-group-next-unread-group}).
2002
2003 @item p
2004 @itemx DEL
2005 @kindex DEL (Group)
2006 @kindex p (Group)
2007 @findex gnus-group-prev-unread-group
2008 Go to the previous group that has unread articles
2009 (@code{gnus-group-prev-unread-group}).
2010
2011 @item N
2012 @kindex N (Group)
2013 @findex gnus-group-next-group
2014 Go to the next group (@code{gnus-group-next-group}).
2015
2016 @item P
2017 @kindex P (Group)
2018 @findex gnus-group-prev-group
2019 Go to the previous group (@code{gnus-group-prev-group}).
2020
2021 @item M-n
2022 @kindex M-n (Group)
2023 @findex gnus-group-next-unread-group-same-level
2024 Go to the next unread group on the same (or lower) level
2025 (@code{gnus-group-next-unread-group-same-level}).
2026
2027 @item M-p
2028 @kindex M-p (Group)
2029 @findex gnus-group-prev-unread-group-same-level
2030 Go to the previous unread group on the same (or lower) level
2031 (@code{gnus-group-prev-unread-group-same-level}).
2032 @end table
2033
2034 Three commands for jumping to groups:
2035
2036 @table @kbd
2037
2038 @item j
2039 @kindex j (Group)
2040 @findex gnus-group-jump-to-group
2041 Jump to a group (and make it visible if it isn't already)
2042 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2043 like living groups.
2044
2045 @item ,
2046 @kindex , (Group)
2047 @findex gnus-group-best-unread-group
2048 Jump to the unread group with the lowest level
2049 (@code{gnus-group-best-unread-group}).
2050
2051 @item .
2052 @kindex . (Group)
2053 @findex gnus-group-first-unread-group
2054 Jump to the first group with unread articles
2055 (@code{gnus-group-first-unread-group}).
2056 @end table
2057
2058 @vindex gnus-group-goto-unread
2059 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2060 commands will move to the next group, not the next unread group.  Even
2061 the commands that say they move to the next unread group.  The default
2062 is @code{t}.
2063
2064
2065 @node Selecting a Group
2066 @section Selecting a Group
2067 @cindex group selection
2068
2069 @table @kbd
2070
2071 @item SPACE
2072 @kindex SPACE (Group)
2073 @findex gnus-group-read-group
2074 Select the current group, switch to the summary buffer and display the
2075 first unread article (@code{gnus-group-read-group}).  If there are no
2076 unread articles in the group, or if you give a non-numerical prefix to
2077 this command, gnus will offer to fetch all the old articles in this
2078 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2079 determines the number of articles Gnus will fetch.  If @var{n} is
2080 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2081 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2082
2083 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2084 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2085 - 4 2 SPC} fetches the 42 oldest ones.
2086
2087 When you are in the group (in the Summary buffer), you can type
2088 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2089 ones.
2090
2091 @item RET
2092 @kindex RET (Group)
2093 @findex gnus-group-select-group
2094 Select the current group and switch to the summary buffer
2095 (@code{gnus-group-select-group}).  Takes the same arguments as
2096 @code{gnus-group-read-group}---the only difference is that this command
2097 does not display the first unread article automatically upon group
2098 entry.
2099
2100 @item M-RET
2101 @kindex M-RET (Group)
2102 @findex gnus-group-quick-select-group
2103 This does the same as the command above, but tries to do it with the
2104 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2105 scoring/killing will be performed, there will be no highlights and no
2106 expunging.  This might be useful if you're in a real hurry and have to
2107 enter some humongous group.  If you give a 0 prefix to this command
2108 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2109 which is useful if you want to toggle threading before generating the
2110 summary buffer (@pxref{Summary Generation Commands}).
2111
2112 @item M-SPACE
2113 @kindex M-SPACE (Group)
2114 @findex gnus-group-visible-select-group
2115 This is yet one more command that does the same as the @kbd{RET}
2116 command, but this one does it without expunging and hiding dormants
2117 (@code{gnus-group-visible-select-group}).
2118
2119 @item C-M-RET
2120 @kindex C-M-RET (Group)
2121 @findex gnus-group-select-group-ephemerally
2122 Finally, this command selects the current group ephemerally without
2123 doing any processing of its contents
2124 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2125 turned off.  Everything you do in the group after selecting it in this
2126 manner will have no permanent effects.
2127
2128 @end table
2129
2130 @vindex gnus-large-newsgroup
2131 The @code{gnus-large-newsgroup} variable says what Gnus should
2132 consider to be a big group.  If it is @code{nil}, no groups are
2133 considered big.  The default value is 200.  If the group has more
2134 (unread and/or ticked) articles than this, gnus will query the user
2135 before entering the group.  The user can then specify how many
2136 articles should be fetched from the server.  If the user specifies a
2137 negative number (@var{-n}), the @var{n} oldest articles will be
2138 fetched.  If it is positive, the @var{n} articles that have arrived
2139 most recently will be fetched.
2140
2141 @vindex gnus-large-ephemeral-newsgroup
2142 @code{gnus-large-ephemeral-newsgroup} is the same as
2143 @code{gnus-large-newsgroup}, but is only used for ephemeral
2144 newsgroups.
2145
2146 @vindex gnus-select-group-hook
2147 @vindex gnus-auto-select-first
2148 @vindex gnus-auto-select-subject
2149 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2150 automatically when entering a group with the @kbd{SPACE} command.
2151 Which article this is is controlled by the
2152 @code{gnus-auto-select-subject} variable.  Valid values for this
2153 variable is:
2154
2155 @table @code
2156
2157 @item unread
2158 Place point on the subject line of the first unread article.
2159
2160 @item first
2161 Place point on the subject line of the first article.
2162
2163 @item unseen
2164 Place point on the subject line of the first unseen article.
2165
2166 @item unseen-or-unread
2167 Place point on the subject line of the first unseen article, and if
2168 there is no such article, place point on the subject line of the first
2169 unread article.
2170
2171 @item best
2172 Place point on the subject line of the highest-scored unread article.
2173
2174 @end table
2175
2176 This variable can also be a function.  In that case, that function
2177 will be called to place point on a subject line.
2178
2179 If you want to prevent automatic selection in some group (say, in a
2180 binary group with Huge articles) you can set the
2181 @code{gnus-auto-select-first} variable to @code{nil} in
2182 @code{gnus-select-group-hook}, which is called when a group is
2183 selected.
2184
2185
2186 @node Subscription Commands
2187 @section Subscription Commands
2188 @cindex subscription
2189
2190 @table @kbd
2191
2192 @item S t
2193 @itemx u
2194 @kindex S t (Group)
2195 @kindex u (Group)
2196 @findex gnus-group-unsubscribe-current-group
2197 @c @icon{gnus-group-unsubscribe}
2198 Toggle subscription to the current group
2199 (@code{gnus-group-unsubscribe-current-group}).
2200
2201 @item S s
2202 @itemx U
2203 @kindex S s (Group)
2204 @kindex U (Group)
2205 @findex gnus-group-unsubscribe-group
2206 Prompt for a group to subscribe, and then subscribe it.  If it was
2207 subscribed already, unsubscribe it instead
2208 (@code{gnus-group-unsubscribe-group}).
2209
2210 @item S k
2211 @itemx C-k
2212 @kindex S k (Group)
2213 @kindex C-k (Group)
2214 @findex gnus-group-kill-group
2215 @c @icon{gnus-group-kill-group}
2216 Kill the current group (@code{gnus-group-kill-group}).
2217
2218 @item S y
2219 @itemx C-y
2220 @kindex S y (Group)
2221 @kindex C-y (Group)
2222 @findex gnus-group-yank-group
2223 Yank the last killed group (@code{gnus-group-yank-group}).
2224
2225 @item C-x C-t
2226 @kindex C-x C-t (Group)
2227 @findex gnus-group-transpose-groups
2228 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2229 really a subscription command, but you can use it instead of a
2230 kill-and-yank sequence sometimes.
2231
2232 @item S w
2233 @itemx C-w
2234 @kindex S w (Group)
2235 @kindex C-w (Group)
2236 @findex gnus-group-kill-region
2237 Kill all groups in the region (@code{gnus-group-kill-region}).
2238
2239 @item S z
2240 @kindex S z (Group)
2241 @findex gnus-group-kill-all-zombies
2242 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2243
2244 @item S C-k
2245 @kindex S C-k (Group)
2246 @findex gnus-group-kill-level
2247 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2248 These groups can't be yanked back after killing, so this command should
2249 be used with some caution.  The only time where this command comes in
2250 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2251 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2252 kill off all unsubscribed groups that do not have message numbers in the
2253 @file{.newsrc} file.
2254
2255 @end table
2256
2257 Also @pxref{Group Levels}.
2258
2259
2260 @node Group Data
2261 @section Group Data
2262
2263 @table @kbd
2264
2265 @item c
2266 @kindex c (Group)
2267 @findex gnus-group-catchup-current
2268 @vindex gnus-group-catchup-group-hook
2269 @c @icon{gnus-group-catchup-current}
2270 Mark all unticked articles in this group as read
2271 (@code{gnus-group-catchup-current}).
2272 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2273 the group buffer.
2274
2275 @item C
2276 @kindex C (Group)
2277 @findex gnus-group-catchup-current-all
2278 Mark all articles in this group, even the ticked ones, as read
2279 (@code{gnus-group-catchup-current-all}).
2280
2281 @item M-c
2282 @kindex M-c (Group)
2283 @findex gnus-group-clear-data
2284 Clear the data from the current group---nix out marks and the list of
2285 read articles (@code{gnus-group-clear-data}).
2286
2287 @item M-x gnus-group-clear-data-on-native-groups
2288 @kindex M-x gnus-group-clear-data-on-native-groups
2289 @findex gnus-group-clear-data-on-native-groups
2290 If you have switched from one @acronym{NNTP} server to another, all your marks
2291 and read ranges have become worthless.  You can use this command to
2292 clear out all data that you have on your native groups.  Use with
2293 caution.
2294
2295 @end table
2296
2297
2298 @node Group Levels
2299 @section Group Levels
2300 @cindex group level
2301 @cindex level
2302
2303 All groups have a level of @dfn{subscribedness}.  For instance, if a
2304 group is on level 2, it is more subscribed than a group on level 5.  You
2305 can ask gnus to just list groups on a given level or lower
2306 (@pxref{Listing Groups}), or to just check for new articles in groups on
2307 a given level or lower (@pxref{Scanning New Messages}).
2308
2309 Remember:  The higher the level of the group, the less important it is.
2310
2311 @table @kbd
2312
2313 @item S l
2314 @kindex S l (Group)
2315 @findex gnus-group-set-current-level
2316 Set the level of the current group.  If a numeric prefix is given, the
2317 next @var{n} groups will have their levels set.  The user will be
2318 prompted for a level.
2319 @end table
2320
2321 @vindex gnus-level-killed
2322 @vindex gnus-level-zombie
2323 @vindex gnus-level-unsubscribed
2324 @vindex gnus-level-subscribed
2325 Gnus considers groups from levels 1 to
2326 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2327 @code{gnus-level-subscribed} (exclusive) and
2328 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2329 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2330 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2331 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2332 same, but zombie and killed groups have no information on what articles
2333 you have read, etc, stored.  This distinction between dead and living
2334 groups isn't done because it is nice or clever, it is done purely for
2335 reasons of efficiency.
2336
2337 It is recommended that you keep all your mail groups (if any) on quite
2338 low levels (e.g. 1 or 2).
2339
2340 Maybe the following description of the default behavior of Gnus helps to
2341 understand what these levels are all about.  By default, Gnus shows you
2342 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2343 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2344 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2345 groups are hidden, in a way.
2346
2347 Zombie and killed groups are similar to unsubscribed groups in that they
2348 are hidden by default.  But they are different from subscribed and
2349 unsubscribed groups in that Gnus doesn't ask the news server for
2350 information (number of messages, number of unread messages) on zombie
2351 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2352 aren't interested in.  If most groups are killed, Gnus is faster.
2353
2354 Why does Gnus distinguish between zombie and killed groups?  Well, when
2355 a new group arrives on the server, Gnus by default makes it a zombie
2356 group.  This means that you are normally not bothered with new groups,
2357 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2358 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2359 list of killed groups.)
2360
2361 If you want to play with the level variables, you should show some care.
2362 Set them once, and don't touch them ever again.  Better yet, don't touch
2363 them at all unless you know exactly what you're doing.
2364
2365 @vindex gnus-level-default-unsubscribed
2366 @vindex gnus-level-default-subscribed
2367 Two closely related variables are @code{gnus-level-default-subscribed}
2368 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2369 which are the levels that new groups will be put on if they are
2370 (un)subscribed.  These two variables should, of course, be inside the
2371 relevant valid ranges.
2372
2373 @vindex gnus-keep-same-level
2374 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2375 will only move to groups of the same level (or lower).  In
2376 particular, going from the last article in one group to the next group
2377 will go to the next group of the same level (or lower).  This might be
2378 handy if you want to read the most important groups before you read the
2379 rest.
2380
2381 If this variable is @code{best}, Gnus will make the next newsgroup the
2382 one with the best level.
2383
2384 @vindex gnus-group-default-list-level
2385 All groups with a level less than or equal to
2386 @code{gnus-group-default-list-level} will be listed in the group buffer
2387 by default.
2388
2389 @vindex gnus-group-list-inactive-groups
2390 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2391 groups will be listed along with the unread groups.  This variable is
2392 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2393 listed.
2394
2395 @vindex gnus-group-use-permanent-levels
2396 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2397 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2398 use this level as the ``work'' level.
2399
2400 @vindex gnus-activate-level
2401 Gnus will normally just activate (i. e., query the server about) groups
2402 on level @code{gnus-activate-level} or less.  If you don't want to
2403 activate unsubscribed groups, for instance, you might set this variable
2404 to 5.  The default is 6.
2405
2406
2407 @node Group Score
2408 @section Group Score
2409 @cindex group score
2410 @cindex group rank
2411 @cindex rank
2412
2413 You would normally keep important groups on high levels, but that scheme
2414 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2415 group buffer according to how often you read groups, perhaps?  Within
2416 reason?
2417
2418 This is what @dfn{group score} is for.  You can have Gnus assign a score
2419 to each group through the mechanism described below.  You can then sort
2420 the group buffer based on this score.  Alternatively, you can sort on
2421 score and then level.  (Taken together, the level and the score is
2422 called the @dfn{rank} of the group.  A group that is on level 4 and has
2423 a score of 1 has a higher rank than a group on level 5 that has a score
2424 of 300.  (The level is the most significant part and the score is the
2425 least significant part.))
2426
2427 @findex gnus-summary-bubble-group
2428 If you want groups you read often to get higher scores than groups you
2429 read seldom you can add the @code{gnus-summary-bubble-group} function to
2430 the @code{gnus-summary-exit-hook} hook.  This will result (after
2431 sorting) in a bubbling sort of action.  If you want to see that in
2432 action after each summary exit, you can add
2433 @code{gnus-group-sort-groups-by-rank} or
2434 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2435 slow things down somewhat.
2436
2437
2438 @node Marking Groups
2439 @section Marking Groups
2440 @cindex marking groups
2441
2442 If you want to perform some command on several groups, and they appear
2443 subsequently in the group buffer, you would normally just give a
2444 numerical prefix to the command.  Most group commands will then do your
2445 bidding on those groups.
2446
2447 However, if the groups are not in sequential order, you can still
2448 perform a command on several groups.  You simply mark the groups first
2449 with the process mark and then execute the command.
2450
2451 @table @kbd
2452
2453 @item #
2454 @kindex # (Group)
2455 @itemx M m
2456 @kindex M m (Group)
2457 @findex gnus-group-mark-group
2458 Set the mark on the current group (@code{gnus-group-mark-group}).
2459
2460 @item M-#
2461 @kindex M-# (Group)
2462 @itemx M u
2463 @kindex M u (Group)
2464 @findex gnus-group-unmark-group
2465 Remove the mark from the current group
2466 (@code{gnus-group-unmark-group}).
2467
2468 @item M U
2469 @kindex M U (Group)
2470 @findex gnus-group-unmark-all-groups
2471 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2472
2473 @item M w
2474 @kindex M w (Group)
2475 @findex gnus-group-mark-region
2476 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2477
2478 @item M b
2479 @kindex M b (Group)
2480 @findex gnus-group-mark-buffer
2481 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2482
2483 @item M r
2484 @kindex M r (Group)
2485 @findex gnus-group-mark-regexp
2486 Mark all groups that match some regular expression
2487 (@code{gnus-group-mark-regexp}).
2488 @end table
2489
2490 Also @pxref{Process/Prefix}.
2491
2492 @findex gnus-group-universal-argument
2493 If you want to execute some command on all groups that have been marked
2494 with the process mark, you can use the @kbd{M-&}
2495 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2496 the command to be executed.
2497
2498
2499 @node Foreign Groups
2500 @section Foreign Groups
2501 @cindex foreign groups
2502
2503 Below are some group mode commands for making and editing general foreign
2504 groups, as well as commands to ease the creation of a few
2505 special-purpose groups.  All these commands insert the newly created
2506 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2507 consulted.
2508
2509 @table @kbd
2510
2511 @item G m
2512 @kindex G m (Group)
2513 @findex gnus-group-make-group
2514 @cindex making groups
2515 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2516 for a name, a method and possibly an @dfn{address}.  For an easier way
2517 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2518
2519 @item G r
2520 @kindex G r (Group)
2521 @findex gnus-group-rename-group
2522 @cindex renaming groups
2523 Rename the current group to something else
2524 (@code{gnus-group-rename-group}).  This is valid only on some
2525 groups---mail groups mostly.  This command might very well be quite slow
2526 on some back ends.
2527
2528 @item G c
2529 @kindex G c (Group)
2530 @cindex customizing
2531 @findex gnus-group-customize
2532 Customize the group parameters (@code{gnus-group-customize}).
2533
2534 @item G e
2535 @kindex G e (Group)
2536 @findex gnus-group-edit-group-method
2537 @cindex renaming groups
2538 Enter a buffer where you can edit the select method of the current
2539 group (@code{gnus-group-edit-group-method}).
2540
2541 @item G p
2542 @kindex G p (Group)
2543 @findex gnus-group-edit-group-parameters
2544 Enter a buffer where you can edit the group parameters
2545 (@code{gnus-group-edit-group-parameters}).
2546
2547 @item G E
2548 @kindex G E (Group)
2549 @findex gnus-group-edit-group
2550 Enter a buffer where you can edit the group info
2551 (@code{gnus-group-edit-group}).
2552
2553 @item G d
2554 @kindex G d (Group)
2555 @findex gnus-group-make-directory-group
2556 @cindex nndir
2557 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2558 for a directory name (@code{gnus-group-make-directory-group}).
2559
2560 @item G h
2561 @kindex G h (Group)
2562 @cindex help group
2563 @findex gnus-group-make-help-group
2564 Make the gnus help group (@code{gnus-group-make-help-group}).
2565
2566 @item G a
2567 @kindex G a (Group)
2568 @cindex (ding) archive
2569 @cindex archive group
2570 @findex gnus-group-make-archive-group
2571 @vindex gnus-group-archive-directory
2572 @vindex gnus-group-recent-archive-directory
2573 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2574 default a group pointing to the most recent articles will be created
2575 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2576 group will be created from @code{gnus-group-archive-directory}.
2577
2578 @item G k
2579 @kindex G k (Group)
2580 @findex gnus-group-make-kiboze-group
2581 @cindex nnkiboze
2582 Make a kiboze group.  You will be prompted for a name, for a regexp to
2583 match groups to be ``included'' in the kiboze group, and a series of
2584 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2585 @xref{Kibozed Groups}.
2586
2587 @item G D
2588 @kindex G D (Group)
2589 @findex gnus-group-enter-directory
2590 @cindex nneething
2591 Read an arbitrary directory as if it were a newsgroup with the
2592 @code{nneething} back end (@code{gnus-group-enter-directory}).
2593 @xref{Anything Groups}.
2594
2595 @item G f
2596 @kindex G f (Group)
2597 @findex gnus-group-make-doc-group
2598 @cindex ClariNet Briefs
2599 @cindex nndoc
2600 Make a group based on some file or other
2601 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2602 command, you will be prompted for a file name and a file type.
2603 Currently supported types are @code{mbox}, @code{babyl},
2604 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2605 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2606 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2607 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2608 you run this command without a prefix, Gnus will guess at the file
2609 type.  @xref{Document Groups}.
2610
2611 @item G u
2612 @kindex G u (Group)
2613 @vindex gnus-useful-groups
2614 @findex gnus-group-make-useful-group
2615 Create one of the groups mentioned in @code{gnus-useful-groups}
2616 (@code{gnus-group-make-useful-group}).
2617
2618 @item G w
2619 @kindex G w (Group)
2620 @findex gnus-group-make-web-group
2621 @cindex Google
2622 @cindex nnweb
2623 @cindex gmane
2624 Make an ephemeral group based on a web search
2625 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2626 command, make a solid group instead.  You will be prompted for the
2627 search engine type and the search string.  Valid search engine types
2628 include @code{google}, @code{dejanews}, and @code{gmane}.
2629 @xref{Web Searches}.
2630
2631 If you use the @code{google} search engine, you can limit the search
2632 to a particular group by using a match string like
2633 @samp{shaving group:alt.sysadmin.recovery}.
2634
2635 @item G DEL
2636 @kindex G DEL (Group)
2637 @findex gnus-group-delete-group
2638 This function will delete the current group
2639 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2640 actually delete all the articles in the group, and forcibly remove the
2641 group itself from the face of the Earth.  Use a prefix only if you are
2642 absolutely sure of what you are doing.  This command can't be used on
2643 read-only groups (like @code{nntp} group), though.
2644
2645 @item G V
2646 @kindex G V (Group)
2647 @findex gnus-group-make-empty-virtual
2648 Make a new, fresh, empty @code{nnvirtual} group
2649 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2650
2651 @item G v
2652 @kindex G v (Group)
2653 @findex gnus-group-add-to-virtual
2654 Add the current group to an @code{nnvirtual} group
2655 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2656 @end table
2657
2658 @xref{Select Methods}, for more information on the various select
2659 methods.
2660
2661 @vindex gnus-activate-foreign-newsgroups
2662 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2663 gnus will check all foreign groups with this level or lower at startup.
2664 This might take quite a while, especially if you subscribe to lots of
2665 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2666 @code{gnus-activate-level} also affects activation of foreign
2667 newsgroups.
2668
2669
2670 @node Group Parameters
2671 @section Group Parameters
2672 @cindex group parameters
2673
2674 The group parameters store information local to a particular group.
2675 Here's an example group parameter list:
2676
2677 @example
2678 ((to-address . "ding@@gnus.org")
2679  (auto-expire . t))
2680 @end example
2681
2682 We see that each element consists of a ``dotted pair''---the thing before
2683 the dot is the key, while the thing after the dot is the value.  All the
2684 parameters have this form @emph{except} local variable specs, which are
2685 not dotted pairs, but proper lists.
2686
2687 Some parameters have correspondent customizable variables, each of which
2688 is an alist of regexps and values.
2689
2690 The following group parameters can be used:
2691
2692 @table @code
2693 @item to-address
2694 @cindex to-address
2695 Address used by when doing followups and new posts.
2696
2697 @example
2698 (to-address . "some@@where.com")
2699 @end example
2700
2701 This is primarily useful in mail groups that represent closed mailing
2702 lists---mailing lists where it's expected that everybody that writes to
2703 the mailing list is subscribed to it.  Since using this parameter
2704 ensures that the mail only goes to the mailing list itself, it means
2705 that members won't receive two copies of your followups.
2706
2707 Using @code{to-address} will actually work whether the group is foreign
2708 or not.  Let's say there's a group on the server that is called
2709 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2710 the articles from a mail-to-news gateway.  Posting directly to this
2711 group is therefore impossible---you have to send mail to the mailing
2712 list address instead.
2713
2714 See also @code{gnus-parameter-to-address-alist}.
2715
2716 @item to-list
2717 @cindex to-list
2718 Address used when doing @kbd{a} in that group.
2719
2720 @example
2721 (to-list . "some@@where.com")
2722 @end example
2723
2724 It is totally ignored
2725 when doing a followup---except that if it is present in a news group,
2726 you'll get mail group semantics when doing @kbd{f}.
2727
2728 If you do an @kbd{a} command in a mail group and you have neither a
2729 @code{to-list} group parameter nor a @code{to-address} group parameter,
2730 then a @code{to-list} group parameter will be added automatically upon
2731 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2732 @vindex gnus-add-to-list
2733
2734 If you do an @kbd{a} command in a mail group and you don't have a
2735 @code{to-list} group parameter, one will be added automatically upon
2736 sending the message.
2737
2738 @findex gnus-mailing-list-mode
2739 @cindex mail list groups
2740 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2741 entering summary buffer.
2742
2743 See also @code{gnus-parameter-to-list-alist}.
2744
2745 @anchor{subscribed}
2746 @item subscribed
2747 @cindex subscribed
2748 If this parameter is set to @code{t}, Gnus will consider the
2749 to-address and to-list parameters for this group as addresses of
2750 mailing lists you are subscribed to.  Giving Gnus this information is
2751 (only) a first step in getting it to generate correct Mail-Followup-To
2752 headers for your posts to these lists.  @xref{Mailing Lists, ,Mailing
2753 Lists, message, The Message Manual}, for a complete treatment of
2754 available MFT support.
2755
2756 See also @code{gnus-find-subscribed-addresses}, the function that
2757 directly uses this group parameter.
2758
2759 @item visible
2760 @cindex visible
2761 If the group parameter list has the element @code{(visible . t)},
2762 that group will always be visible in the Group buffer, regardless
2763 of whether it has any unread articles.
2764
2765 @item broken-reply-to
2766 @cindex broken-reply-to
2767 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2768 headers in this group are to be ignored, and for the header to be hidden
2769 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2770 can be useful if you're reading a mailing list group where the listserv
2771 has inserted @code{Reply-To} headers that point back to the listserv
2772 itself.  That is broken behavior.  So there!
2773
2774 @item to-group
2775 @cindex to-group
2776 Elements like @code{(to-group . "some.group.name")} means that all
2777 posts in that group will be sent to @code{some.group.name}.
2778
2779 @item newsgroup
2780 @cindex newsgroup
2781 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2782 will treat all responses as if they were responses to news articles.
2783 This can be useful if you have a mail group that's really a mirror of a
2784 news group.
2785
2786 @item gcc-self
2787 @cindex gcc-self
2788 If @code{(gcc-self . t)} is present in the group parameter list, newly
2789 composed messages will be @code{Gcc}'d to the current group.  If
2790 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2791 generated, if @code{(gcc-self . "string")} is present, this string will
2792 be inserted literally as a @code{gcc} header.  This parameter takes
2793 precedence over any default @code{Gcc} rules as described later
2794 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2795 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2796 a @code{nntp} server doesn't accept articles.
2797
2798 @item auto-expire
2799 @cindex auto-expire
2800 If the group parameter has an element that looks like @code{(auto-expire
2801 . t)}, all articles read will be marked as expirable.  For an
2802 alternative approach, @pxref{Expiring Mail}.
2803
2804 See also @code{gnus-auto-expirable-newsgroups}.
2805
2806 @item total-expire
2807 @cindex total-expire
2808 If the group parameter has an element that looks like
2809 @code{(total-expire . t)}, all read articles will be put through the
2810 expiry process, even if they are not marked as expirable.  Use with
2811 caution.  Unread, ticked and dormant articles are not eligible for
2812 expiry.
2813
2814 See also @code{gnus-total-expirable-newsgroups}.
2815
2816 @item expiry-wait
2817 @cindex expiry-wait
2818 @vindex nnmail-expiry-wait-function
2819 If the group parameter has an element that looks like
2820 @code{(expiry-wait . 10)}, this value will override any
2821 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2822 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2823 can either be a number of days (not necessarily an integer) or the
2824 symbols @code{never} or @code{immediate}.
2825
2826 @item score-file
2827 @cindex score file group parameter
2828 Elements that look like @code{(score-file . "file")} will make
2829 @file{file} into the current score file for the group in question.  All
2830 interactive score entries will be put into this file.
2831
2832 @item adapt-file
2833 @cindex adapt file group parameter
2834 Elements that look like @code{(adapt-file . "file")} will make
2835 @file{file} into the current adaptive file for the group in question.
2836 All adaptive score entries will be put into this file.
2837
2838 @item admin-address
2839 @cindex admin-address
2840 When unsubscribing from a mailing list you should never send the
2841 unsubscription notice to the mailing list itself.  Instead, you'd send
2842 messages to the administrative address.  This parameter allows you to
2843 put the admin address somewhere convenient.
2844
2845 @item display
2846 @cindex display
2847 Elements that look like @code{(display . MODE)} say which articles to
2848 display on entering the group.  Valid values are:
2849
2850 @table @code
2851 @item all
2852 Display all articles, both read and unread.
2853
2854 @item an integer
2855 Display the last @var{integer} articles in the group.  This is the same as
2856 entering the group with @kbd{C-u @var{integer}}.
2857
2858 @item default
2859 Display the default visible articles, which normally includes unread and
2860 ticked articles.
2861
2862 @item an array
2863 Display articles that satisfy a predicate.
2864
2865 Here are some examples:
2866
2867 @table @code
2868 @item [unread]
2869 Display only unread articles.
2870
2871 @item [not expire]
2872 Display everything except expirable articles.
2873
2874 @item [and (not reply) (not expire)]
2875 Display everything except expirable and articles you've already
2876 responded to.
2877 @end table
2878
2879 The available operators are @code{not}, @code{and} and @code{or}.
2880 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2881 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2882 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2883 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2884
2885 @end table
2886
2887 The @code{display} parameter works by limiting the summary buffer to
2888 the subset specified.  You can pop the limit by using the @kbd{/ w}
2889 command (@pxref{Limiting}).
2890
2891 @item comment
2892 @cindex comment
2893 Elements that look like @code{(comment . "This is a comment")} are
2894 arbitrary comments on the group.  You can display comments in the
2895 group line (@pxref{Group Line Specification}).
2896
2897 @item charset
2898 @cindex charset
2899 Elements that look like @code{(charset . iso-8859-1)} will make
2900 @code{iso-8859-1} the default charset; that is, the charset that will be
2901 used for all articles that do not specify a charset.
2902
2903 See also @code{gnus-group-charset-alist}.
2904
2905 @item ignored-charsets
2906 @cindex ignored-charset
2907 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2908 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2909 default charset will be used for decoding articles.
2910
2911 See also @code{gnus-group-ignored-charsets-alist}.
2912
2913 @item posting-style
2914 @cindex posting-style
2915 You can store additional posting style information for this group
2916 here (@pxref{Posting Styles}).  The format is that of an entry in the
2917 @code{gnus-posting-styles} alist, except that there's no regexp matching
2918 the group name (of course).  Style elements in this group parameter will
2919 take precedence over the ones found in @code{gnus-posting-styles}.
2920
2921 For instance, if you want a funky name and signature in this group only,
2922 instead of hacking @code{gnus-posting-styles}, you could put something
2923 like this in the group parameters:
2924
2925 @example
2926 (posting-style
2927   (name "Funky Name")
2928   ("X-My-Header" "Funky Value")
2929   (signature "Funky Signature"))
2930 @end example
2931
2932 @item post-method
2933 @cindex post-method
2934 If it is set, the value is used as the method for posting message
2935 instead of @code{gnus-post-method}.
2936
2937 @item banner
2938 @cindex banner
2939 An item like @code{(banner . @var{regexp})} causes any part of an article
2940 that matches the regular expression @var{regexp} to be stripped.  Instead of
2941 @var{regexp}, you can also use the symbol @code{signature} which strips the
2942 last signature or any of the elements of the alist
2943 @code{gnus-article-banner-alist}.
2944
2945 @item sieve
2946 @cindex sieve
2947 This parameter contains a Sieve test that should match incoming mail
2948 that should be placed in this group.  From this group parameter, a
2949 Sieve @samp{IF} control structure is generated, having the test as the
2950 condition and @samp{fileinto "group.name";} as the body.
2951
2952 For example, if the INBOX.list.sieve group has the @code{(sieve
2953 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2954 translating the group parameter into a Sieve script (@pxref{Sieve
2955 Commands}) the following Sieve code is generated:
2956
2957 @example
2958 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2959         fileinto \"INBOX.list.sieve\";
2960 @}
2961 @end example
2962
2963 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2964 Emacs Sieve}.
2965
2966 @item (@var{variable} @var{form})
2967 You can use the group parameters to set variables local to the group you
2968 are entering.  If you want to turn threading off in @samp{news.answers},
2969 you could put @code{(gnus-show-threads nil)} in the group parameters of
2970 that group.  @code{gnus-show-threads} will be made into a local variable
2971 in the summary buffer you enter, and the form @code{nil} will be
2972 @code{eval}ed there.
2973
2974 Note that this feature sets the variable locally to the summary buffer.
2975 But some variables are evaluated in the article buffer, or in the
2976 message buffer (of a reply or followup or otherwise newly created
2977 message).  As a workaround, it might help to add the variable in
2978 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2979 Stuff}.  So if you want to set @code{message-from-style} via the group
2980 parameters, then you may need the following statement elsewhere in your
2981 @file{~/.gnus} file:
2982 @lisp
2983 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2984 @end lisp
2985
2986 @vindex gnus-list-identifiers
2987 A use for this feature is to remove a mailing list identifier tag in
2988 the subject fields of articles.  E.g. if the news group
2989 @example
2990 nntp+news.gnus.org:gmane.text.docbook.apps
2991 @end example
2992 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
2993 tag can be removed from the article subjects in the summary buffer for
2994 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
2995 into the group parameters for the group.
2996
2997 This can also be used as a group-specific hook function, if you'd like.
2998 If you want to hear a beep when you enter a group, you could put
2999 something like @code{(dummy-variable (ding))} in the parameters of that
3000 group.  @code{dummy-variable} will be set to the result of the
3001 @code{(ding)} form, but who cares?
3002
3003 @end table
3004
3005 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3006 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3007 presents you with a Customize-like interface.  The latter helps avoid
3008 silly Lisp errors.)  You might also be interested in reading about topic
3009 parameters (@pxref{Topic Parameters}).
3010
3011 @vindex gnus-parameters
3012 Group parameters can be set via the @code{gnus-parameters} variable too.
3013 But some variables, such as @code{visible}, have no effect.  For
3014 example:
3015
3016 @lisp
3017 (setq gnus-parameters
3018       '(("mail\\..*"
3019          (gnus-show-threads nil)
3020          (gnus-use-scoring nil)
3021          (gnus-summary-line-format
3022           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3023          (gcc-self . t)
3024          (display . all))
3025
3026         ("^nnimap:\\(foo.bar\\)$"
3027          (to-group . "\\1"))
3028
3029         ("mail\\.me"
3030          (gnus-use-scoring  t))
3031
3032         ("list\\..*"
3033          (total-expire . t)
3034          (broken-reply-to . t))))
3035 @end lisp
3036
3037 String value of parameters will be subjected to regexp substitution, as
3038 the @code{to-group} example shows.
3039
3040
3041 @node Listing Groups
3042 @section Listing Groups
3043 @cindex group listing
3044
3045 These commands all list various slices of the groups available.
3046
3047 @table @kbd
3048
3049 @item l
3050 @itemx A s
3051 @kindex A s (Group)
3052 @kindex l (Group)
3053 @findex gnus-group-list-groups
3054 List all groups that have unread articles
3055 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3056 command will list only groups of level ARG and lower.  By default, it
3057 only lists groups of level five (i.e.,
3058 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3059 groups).
3060
3061 @item L
3062 @itemx A u
3063 @kindex A u (Group)
3064 @kindex L (Group)
3065 @findex gnus-group-list-all-groups
3066 List all groups, whether they have unread articles or not
3067 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3068 this command will list only groups of level ARG and lower.  By default,
3069 it lists groups of level seven or lower (i.e., just subscribed and
3070 unsubscribed groups).
3071
3072 @item A l
3073 @kindex A l (Group)
3074 @findex gnus-group-list-level
3075 List all unread groups on a specific level
3076 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3077 with no unread articles.
3078
3079 @item A k
3080 @kindex A k (Group)
3081 @findex gnus-group-list-killed
3082 List all killed groups (@code{gnus-group-list-killed}).  If given a
3083 prefix argument, really list all groups that are available, but aren't
3084 currently (un)subscribed.  This could entail reading the active file
3085 from the server.
3086
3087 @item A z
3088 @kindex A z (Group)
3089 @findex gnus-group-list-zombies
3090 List all zombie groups (@code{gnus-group-list-zombies}).
3091
3092 @item A m
3093 @kindex A m (Group)
3094 @findex gnus-group-list-matching
3095 List all unread, subscribed groups with names that match a regexp
3096 (@code{gnus-group-list-matching}).
3097
3098 @item A M
3099 @kindex A M (Group)
3100 @findex gnus-group-list-all-matching
3101 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3102
3103 @item A A
3104 @kindex A A (Group)
3105 @findex gnus-group-list-active
3106 List absolutely all groups in the active file(s) of the
3107 server(s) you are connected to (@code{gnus-group-list-active}).  This
3108 might very well take quite a while.  It might actually be a better idea
3109 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3110 thing to match on.  Also note that this command may list groups that
3111 don't exist (yet)---these will be listed as if they were killed groups.
3112 Take the output with some grains of salt.
3113
3114 @item A a
3115 @kindex A a (Group)
3116 @findex gnus-group-apropos
3117 List all groups that have names that match a regexp
3118 (@code{gnus-group-apropos}).
3119
3120 @item A d
3121 @kindex A d (Group)
3122 @findex gnus-group-description-apropos
3123 List all groups that have names or descriptions that match a regexp
3124 (@code{gnus-group-description-apropos}).
3125
3126 @item A c
3127 @kindex A c (Group)
3128 @findex gnus-group-list-cached
3129 List all groups with cached articles (@code{gnus-group-list-cached}).
3130
3131 @item A ?
3132 @kindex A ? (Group)
3133 @findex gnus-group-list-dormant
3134 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3135
3136 @item A /
3137 @kindex A / (Group)
3138 @findex gnus-group-list-limit
3139 List groups limited within the current selection
3140 (@code{gnus-group-list-limit}).
3141
3142 @item A f
3143 @kindex A f (Group)
3144 @findex gnus-group-list-flush
3145 Flush groups from the current selection (@code{gnus-group-list-flush}).
3146
3147 @item A p
3148 @kindex A p (Group)
3149 @findex gnus-group-list-plus
3150 List groups plus the current selection (@code{gnus-group-list-plus}).
3151
3152 @end table
3153
3154 @vindex gnus-permanently-visible-groups
3155 @cindex visible group parameter
3156 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3157 always be shown, whether they have unread articles or not.  You can also
3158 add the @code{visible} element to the group parameters in question to
3159 get the same effect.
3160
3161 @vindex gnus-list-groups-with-ticked-articles
3162 Groups that have just ticked articles in it are normally listed in the
3163 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3164 @code{nil}, these groups will be treated just like totally empty
3165 groups.  It is @code{t} by default.
3166
3167
3168 @node Sorting Groups
3169 @section Sorting Groups
3170 @cindex sorting groups
3171
3172 @kindex C-c C-s (Group)
3173 @findex gnus-group-sort-groups
3174 @vindex gnus-group-sort-function
3175 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3176 group buffer according to the function(s) given by the
3177 @code{gnus-group-sort-function} variable.  Available sorting functions
3178 include:
3179
3180 @table @code
3181
3182 @item gnus-group-sort-by-alphabet
3183 @findex gnus-group-sort-by-alphabet
3184 Sort the group names alphabetically.  This is the default.
3185
3186 @item gnus-group-sort-by-real-name
3187 @findex gnus-group-sort-by-real-name
3188 Sort the group alphabetically on the real (unprefixed) group names.
3189
3190 @item gnus-group-sort-by-level
3191 @findex gnus-group-sort-by-level
3192 Sort by group level.
3193
3194 @item gnus-group-sort-by-score
3195 @findex gnus-group-sort-by-score
3196 Sort by group score.  @xref{Group Score}.
3197
3198 @item gnus-group-sort-by-rank
3199 @findex gnus-group-sort-by-rank
3200 Sort by group score and then the group level.  The level and the score
3201 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3202
3203 @item gnus-group-sort-by-unread
3204 @findex gnus-group-sort-by-unread
3205 Sort by number of unread articles.
3206
3207 @item gnus-group-sort-by-method
3208 @findex gnus-group-sort-by-method
3209 Sort alphabetically on the select method.
3210
3211 @item gnus-group-sort-by-server
3212 @findex gnus-group-sort-by-server
3213 Sort alphabetically on the Gnus server name.
3214
3215
3216 @end table
3217
3218 @code{gnus-group-sort-function} can also be a list of sorting
3219 functions.  In that case, the most significant sort key function must be
3220 the last one.
3221
3222
3223 There are also a number of commands for sorting directly according to
3224 some sorting criteria:
3225
3226 @table @kbd
3227 @item G S a
3228 @kindex G S a (Group)
3229 @findex gnus-group-sort-groups-by-alphabet
3230 Sort the group buffer alphabetically by group name
3231 (@code{gnus-group-sort-groups-by-alphabet}).
3232
3233 @item G S u
3234 @kindex G S u (Group)
3235 @findex gnus-group-sort-groups-by-unread
3236 Sort the group buffer by the number of unread articles
3237 (@code{gnus-group-sort-groups-by-unread}).
3238
3239 @item G S l
3240 @kindex G S l (Group)
3241 @findex gnus-group-sort-groups-by-level
3242 Sort the group buffer by group level
3243 (@code{gnus-group-sort-groups-by-level}).
3244
3245 @item G S v
3246 @kindex G S v (Group)
3247 @findex gnus-group-sort-groups-by-score
3248 Sort the group buffer by group score
3249 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3250
3251 @item G S r
3252 @kindex G S r (Group)
3253 @findex gnus-group-sort-groups-by-rank
3254 Sort the group buffer by group rank
3255 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3256
3257 @item G S m
3258 @kindex G S m (Group)
3259 @findex gnus-group-sort-groups-by-method
3260 Sort the group buffer alphabetically by back end name@*
3261 (@code{gnus-group-sort-groups-by-method}).
3262
3263 @item G S n
3264 @kindex G S n (Group)
3265 @findex gnus-group-sort-groups-by-real-name
3266 Sort the group buffer alphabetically by real (unprefixed) group name
3267 (@code{gnus-group-sort-groups-by-real-name}).
3268
3269 @end table
3270
3271 All the commands below obey the process/prefix convention
3272 (@pxref{Process/Prefix}).
3273
3274 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3275 commands will sort in reverse order.
3276
3277 You can also sort a subset of the groups:
3278
3279 @table @kbd
3280 @item G P a
3281 @kindex G P a (Group)
3282 @findex gnus-group-sort-selected-groups-by-alphabet
3283 Sort the groups alphabetically by group name
3284 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3285
3286 @item G P u
3287 @kindex G P u (Group)
3288 @findex gnus-group-sort-selected-groups-by-unread
3289 Sort the groups by the number of unread articles
3290 (@code{gnus-group-sort-selected-groups-by-unread}).
3291
3292 @item G P l
3293 @kindex G P l (Group)
3294 @findex gnus-group-sort-selected-groups-by-level
3295 Sort the groups by group level
3296 (@code{gnus-group-sort-selected-groups-by-level}).
3297
3298 @item G P v
3299 @kindex G P v (Group)
3300 @findex gnus-group-sort-selected-groups-by-score
3301 Sort the groups by group score
3302 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3303
3304 @item G P r
3305 @kindex G P r (Group)
3306 @findex gnus-group-sort-selected-groups-by-rank
3307 Sort the groups by group rank
3308 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3309
3310 @item G P m
3311 @kindex G P m (Group)
3312 @findex gnus-group-sort-selected-groups-by-method
3313 Sort the groups alphabetically by back end name@*
3314 (@code{gnus-group-sort-selected-groups-by-method}).
3315
3316 @item G P n
3317 @kindex G P n (Group)
3318 @findex gnus-group-sort-selected-groups-by-real-name
3319 Sort the groups alphabetically by real (unprefixed) group name
3320 (@code{gnus-group-sort-selected-groups-by-real-name}).
3321
3322 @item G P s
3323 @kindex G P s (Group)
3324 @findex gnus-group-sort-selected-groups
3325 Sort the groups according to @code{gnus-group-sort-function}.
3326
3327 @end table
3328
3329 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3330 move groups around.
3331
3332
3333 @node Group Maintenance
3334 @section Group Maintenance
3335 @cindex bogus groups
3336
3337 @table @kbd
3338 @item b
3339 @kindex b (Group)
3340 @findex gnus-group-check-bogus-groups
3341 Find bogus groups and delete them
3342 (@code{gnus-group-check-bogus-groups}).
3343
3344 @item F
3345 @kindex F (Group)
3346 @findex gnus-group-find-new-groups
3347 Find new groups and process them (@code{gnus-group-find-new-groups}).
3348 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3349 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3350 to query the server for new groups, and subscribe the new groups as
3351 zombies.
3352
3353 @item C-c C-x
3354 @kindex C-c C-x (Group)
3355 @findex gnus-group-expire-articles
3356 Run all expirable articles in the current group through the expiry
3357 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3358 all expirable articles in the group that have been around for a while.
3359 (@pxref{Expiring Mail}).
3360
3361 @item C-c C-M-x
3362 @kindex C-c C-M-x (Group)
3363 @findex gnus-group-expire-all-groups
3364 Run all expirable articles in all groups through the expiry process
3365 (@code{gnus-group-expire-all-groups}).
3366
3367 @end table
3368
3369
3370 @node Browse Foreign Server
3371 @section Browse Foreign Server
3372 @cindex foreign servers
3373 @cindex browsing servers
3374
3375 @table @kbd
3376 @item B
3377 @kindex B (Group)
3378 @findex gnus-group-browse-foreign-server
3379 You will be queried for a select method and a server name.  Gnus will
3380 then attempt to contact this server and let you browse the groups there
3381 (@code{gnus-group-browse-foreign-server}).
3382 @end table
3383
3384 @findex gnus-browse-mode
3385 A new buffer with a list of available groups will appear.  This buffer
3386 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3387 a lot) like a normal group buffer.
3388
3389 Here's a list of keystrokes available in the browse mode:
3390
3391 @table @kbd
3392 @item n
3393 @kindex n (Browse)
3394 @findex gnus-group-next-group
3395 Go to the next group (@code{gnus-group-next-group}).
3396
3397 @item p
3398 @kindex p (Browse)
3399 @findex gnus-group-prev-group
3400 Go to the previous group (@code{gnus-group-prev-group}).
3401
3402 @item SPACE
3403 @kindex SPACE (Browse)
3404 @findex gnus-browse-read-group
3405 Enter the current group and display the first article
3406 (@code{gnus-browse-read-group}).
3407
3408 @item RET
3409 @kindex RET (Browse)
3410 @findex gnus-browse-select-group
3411 Enter the current group (@code{gnus-browse-select-group}).
3412
3413 @item u
3414 @kindex u (Browse)
3415 @findex gnus-browse-unsubscribe-current-group
3416 Unsubscribe to the current group, or, as will be the case here,
3417 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3418
3419 @item l
3420 @itemx q
3421 @kindex q (Browse)
3422 @kindex l (Browse)
3423 @findex gnus-browse-exit
3424 Exit browse mode (@code{gnus-browse-exit}).
3425
3426 @item d
3427 @kindex d (Browse)
3428 @findex gnus-browse-describe-group
3429 Describe the current group (@code{gnus-browse-describe-group}).
3430
3431 @item ?
3432 @kindex ? (Browse)
3433 @findex gnus-browse-describe-briefly
3434 Describe browse mode briefly (well, there's not much to describe, is
3435 there) (@code{gnus-browse-describe-briefly}).
3436 @end table
3437
3438
3439 @node Exiting Gnus
3440 @section Exiting gnus
3441 @cindex exiting gnus
3442
3443 Yes, gnus is ex(c)iting.
3444
3445 @table @kbd
3446 @item z
3447 @kindex z (Group)
3448 @findex gnus-group-suspend
3449 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3450 but it kills all buffers except the Group buffer.  I'm not sure why this
3451 is a gain, but then who am I to judge?
3452
3453 @item q
3454 @kindex q (Group)
3455 @findex gnus-group-exit
3456 @c @icon{gnus-group-exit}
3457 Quit gnus (@code{gnus-group-exit}).
3458
3459 @item Q
3460 @kindex Q (Group)
3461 @findex gnus-group-quit
3462 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3463 The dribble file will be saved, though (@pxref{Auto Save}).
3464 @end table
3465
3466 @vindex gnus-exit-gnus-hook
3467 @vindex gnus-suspend-gnus-hook
3468 @vindex gnus-after-exiting-gnus-hook
3469 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3470 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3471 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3472 exiting gnus.
3473
3474 Note:
3475
3476 @quotation
3477 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3478 numbly heavy and herself fall into a hazy trance as the boy sitting
3479 behind her drew repeated lines with his pencil across the back of her
3480 plastic chair.
3481 @end quotation
3482
3483
3484 @node Group Topics
3485 @section Group Topics
3486 @cindex topics
3487
3488 If you read lots and lots of groups, it might be convenient to group
3489 them hierarchically according to topics.  You put your Emacs groups over
3490 here, your sex groups over there, and the rest (what, two groups or so?)
3491 you put in some misc section that you never bother with anyway.  You can
3492 even group the Emacs sex groups as a sub-topic to either the Emacs
3493 groups or the sex groups---or both!  Go wild!
3494
3495 @iftex
3496 @iflatex
3497 \gnusfigure{Group Topics}{400}{
3498 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3499 }
3500 @end iflatex
3501 @end iftex
3502
3503 Here's an example:
3504
3505 @example
3506 Gnus
3507   Emacs -- I wuw it!
3508      3: comp.emacs
3509      2: alt.religion.emacs
3510     Naughty Emacs
3511      452: alt.sex.emacs
3512        0: comp.talk.emacs.recovery
3513   Misc
3514      8: comp.binaries.fractals
3515     13: comp.sources.unix
3516 @end example
3517
3518 @findex gnus-topic-mode
3519 @kindex t (Group)
3520 To get this @emph{fab} functionality you simply turn on (ooh!) the
3521 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3522 is a toggling command.)
3523
3524 Go ahead, just try it.  I'll still be here when you get back.  La de
3525 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3526 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3527 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3528 Hot and bothered?
3529
3530 If you want this permanently enabled, you should add that minor mode to
3531 the hook for the group mode.  Put the following line in your
3532 @file{~/.gnus.el} file:
3533
3534 @lisp
3535 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3536 @end lisp
3537
3538 @menu
3539 * Topic Commands::              Interactive E-Z commands.
3540 * Topic Variables::             How to customize the topics the Lisp Way.
3541 * Topic Sorting::               Sorting each topic individually.
3542 * Topic Topology::              A map of the world.
3543 * Topic Parameters::            Parameters that apply to all groups in a topic.
3544 @end menu
3545
3546
3547 @node Topic Commands
3548 @subsection Topic Commands
3549 @cindex topic commands
3550
3551 When the topic minor mode is turned on, a new @kbd{T} submap will be
3552 available.  In addition, a few of the standard keys change their
3553 definitions slightly.
3554
3555 In general, the following kinds of operations are possible on topics.
3556 First of all, you want to create topics.  Secondly, you want to put
3557 groups in topics and to move them around until you have an order you
3558 like.  The third kind of operation is to show/hide parts of the whole
3559 shebang.  You might want to hide a topic including its subtopics and
3560 groups, to get a better overview of the other groups.
3561
3562 Here is a list of the basic keys that you might need to set up topics
3563 the way you like.
3564
3565 @table @kbd
3566
3567 @item T n
3568 @kindex T n (Topic)
3569 @findex gnus-topic-create-topic
3570 Prompt for a new topic name and create it
3571 (@code{gnus-topic-create-topic}).
3572
3573 @item T TAB
3574 @itemx TAB
3575 @kindex T TAB (Topic)
3576 @kindex TAB (Topic)
3577 @findex gnus-topic-indent
3578 ``Indent'' the current topic so that it becomes a sub-topic of the
3579 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3580 ``un-indent'' the topic instead.
3581
3582 @item M-TAB
3583 @kindex M-TAB (Topic)
3584 @findex gnus-topic-unindent
3585 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3586 parent of its current parent (@code{gnus-topic-unindent}).
3587
3588 @end table
3589
3590 The following two keys can be used to move groups and topics around.
3591 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3592 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3593 kill and yank rather than cut and paste.
3594
3595 @table @kbd
3596
3597 @item C-k
3598 @kindex C-k (Topic)
3599 @findex gnus-topic-kill-group
3600 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3601 topic will be removed along with the topic.
3602
3603 @item C-y
3604 @kindex C-y (Topic)
3605 @findex gnus-topic-yank-group
3606 Yank the previously killed group or topic
3607 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3608 before all groups.
3609
3610 So, to move a topic to the beginning of the list of topics, just hit
3611 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3612 move the cursor to the beginning of the buffer (just below the ``Gnus''
3613 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3614 paste.  Like I said -- E-Z.
3615
3616 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3617 you can move topics around as well as groups.
3618
3619 @end table
3620
3621 After setting up the topics the way you like them, you might wish to
3622 hide a topic, or to show it again.  That's why we have the following
3623 key.
3624
3625 @table @kbd
3626
3627 @item RET
3628 @kindex RET (Topic)
3629 @findex gnus-topic-select-group
3630 @itemx SPACE
3631 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3632 When you perform this command on a group, you'll enter the group, as
3633 usual.  When done on a topic line, the topic will be folded (if it was
3634 visible) or unfolded (if it was folded already).  So it's basically a
3635 toggling command on topics.  In addition, if you give a numerical
3636 prefix, group on that level (and lower) will be displayed.
3637
3638 @end table
3639
3640 Now for a list of other commands, in no particular order.
3641
3642 @table @kbd
3643
3644 @item T m
3645 @kindex T m (Topic)
3646 @findex gnus-topic-move-group
3647 Move the current group to some other topic
3648 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3649 convention (@pxref{Process/Prefix}).
3650
3651 @item T j
3652 @kindex T j (Topic)
3653 @findex gnus-topic-jump-to-topic
3654 Go to a topic (@code{gnus-topic-jump-to-topic}).
3655
3656 @item T c
3657 @kindex T c (Topic)
3658 @findex gnus-topic-copy-group
3659 Copy the current group to some other topic
3660 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3661 convention (@pxref{Process/Prefix}).
3662
3663 @item T h
3664 @kindex T h (Topic)
3665 @findex gnus-topic-hide-topic
3666 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3667 a prefix, hide the topic permanently.
3668
3669 @item T s
3670 @kindex T s (Topic)
3671 @findex gnus-topic-show-topic
3672 Show the current topic (@code{gnus-topic-show-topic}).  If given
3673 a prefix, show the topic permanently.
3674
3675 @item T D
3676 @kindex T D (Topic)
3677 @findex gnus-topic-remove-group
3678 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3679 This command is mainly useful if you have the same group in several
3680 topics and wish to remove it from one of the topics.  You may also
3681 remove a group from all topics, but in that case, Gnus will add it to
3682 the root topic the next time you start Gnus.  In fact, all new groups
3683 (which, naturally, don't belong to any topic) will show up in the root
3684 topic.
3685
3686 This command uses the process/prefix convention
3687 (@pxref{Process/Prefix}).
3688
3689 @item T M
3690 @kindex T M (Topic)
3691 @findex gnus-topic-move-matching
3692 Move all groups that match some regular expression to a topic
3693 (@code{gnus-topic-move-matching}).
3694
3695 @item T C
3696 @kindex T C (Topic)
3697 @findex gnus-topic-copy-matching
3698 Copy all groups that match some regular expression to a topic
3699 (@code{gnus-topic-copy-matching}).
3700
3701 @item T H
3702 @kindex T H (Topic)
3703 @findex gnus-topic-toggle-display-empty-topics
3704 Toggle hiding empty topics
3705 (@code{gnus-topic-toggle-display-empty-topics}).
3706
3707 @item T #
3708 @kindex T # (Topic)
3709 @findex gnus-topic-mark-topic
3710 Mark all groups in the current topic with the process mark
3711 (@code{gnus-topic-mark-topic}).  This command works recursively on
3712 sub-topics unless given a prefix.
3713
3714 @item T M-#
3715 @kindex T M-# (Topic)
3716 @findex gnus-topic-unmark-topic
3717 Remove the process mark from all groups in the current topic
3718 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3719 sub-topics unless given a prefix.
3720
3721 @item C-c C-x
3722 @kindex C-c C-x (Topic)
3723 @findex gnus-topic-expire-articles
3724 Run all expirable articles in the current group or topic through the
3725 expiry process (if any)
3726 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3727
3728 @item T r
3729 @kindex T r (Topic)
3730 @findex gnus-topic-rename
3731 Rename a topic (@code{gnus-topic-rename}).
3732
3733 @item T DEL
3734 @kindex T DEL (Topic)
3735 @findex gnus-topic-delete
3736 Delete an empty topic (@code{gnus-topic-delete}).
3737
3738 @item A T
3739 @kindex A T (Topic)
3740 @findex gnus-topic-list-active
3741 List all groups that gnus knows about in a topics-ified way
3742 (@code{gnus-topic-list-active}).
3743
3744 @item T M-n
3745 @kindex T M-n (Topic)
3746 @findex gnus-topic-goto-next-topic
3747 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3748
3749 @item T M-p
3750 @kindex T M-p (Topic)
3751 @findex gnus-topic-goto-previous-topic
3752 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3753
3754 @item G p
3755 @kindex G p (Topic)
3756 @findex gnus-topic-edit-parameters
3757 @cindex group parameters
3758 @cindex topic parameters
3759 @cindex parameters
3760 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3761 @xref{Topic Parameters}.
3762
3763 @end table
3764
3765
3766 @node Topic Variables
3767 @subsection Topic Variables
3768 @cindex topic variables
3769
3770 The previous section told you how to tell Gnus which topics to display.
3771 This section explains how to tell Gnus what to display about each topic.
3772
3773 @vindex gnus-topic-line-format
3774 The topic lines themselves are created according to the
3775 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3776 Valid elements are:
3777
3778 @table @samp
3779 @item i
3780 Indentation.
3781 @item n
3782 Topic name.
3783 @item v
3784 Visibility.
3785 @item l
3786 Level.
3787 @item g
3788 Number of groups in the topic.
3789 @item a
3790 Number of unread articles in the topic.
3791 @item A
3792 Number of unread articles in the topic and all its subtopics.
3793 @end table
3794
3795 @vindex gnus-topic-indent-level
3796 Each sub-topic (and the groups in the sub-topics) will be indented with
3797 @code{gnus-topic-indent-level} times the topic level number of spaces.
3798 The default is 2.
3799
3800 @vindex gnus-topic-mode-hook
3801 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3802
3803 @vindex gnus-topic-display-empty-topics
3804 The @code{gnus-topic-display-empty-topics} says whether to display even
3805 topics that have no unread articles in them.  The default is @code{t}.
3806
3807
3808 @node Topic Sorting
3809 @subsection Topic Sorting
3810 @cindex topic sorting
3811
3812 You can sort the groups in each topic individually with the following
3813 commands:
3814
3815
3816 @table @kbd
3817 @item T S a
3818 @kindex T S a (Topic)
3819 @findex gnus-topic-sort-groups-by-alphabet
3820 Sort the current topic alphabetically by group name
3821 (@code{gnus-topic-sort-groups-by-alphabet}).
3822
3823 @item T S u
3824 @kindex T S u (Topic)
3825 @findex gnus-topic-sort-groups-by-unread
3826 Sort the current topic by the number of unread articles
3827 (@code{gnus-topic-sort-groups-by-unread}).
3828
3829 @item T S l
3830 @kindex T S l (Topic)
3831 @findex gnus-topic-sort-groups-by-level
3832 Sort the current topic by group level
3833 (@code{gnus-topic-sort-groups-by-level}).
3834
3835 @item T S v
3836 @kindex T S v (Topic)
3837 @findex gnus-topic-sort-groups-by-score
3838 Sort the current topic by group score
3839 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3840
3841 @item T S r
3842 @kindex T S r (Topic)
3843 @findex gnus-topic-sort-groups-by-rank
3844 Sort the current topic by group rank
3845 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3846
3847 @item T S m
3848 @kindex T S m (Topic)
3849 @findex gnus-topic-sort-groups-by-method
3850 Sort the current topic alphabetically by back end name
3851 (@code{gnus-topic-sort-groups-by-method}).
3852
3853 @item T S e
3854 @kindex T S e (Topic)
3855 @findex gnus-topic-sort-groups-by-server
3856 Sort the current topic alphabetically by server name
3857 (@code{gnus-topic-sort-groups-by-server}).
3858
3859 @item T S s
3860 @kindex T S s
3861 @findex gnus-topic-sort-groups
3862 Sort the current topic according to the function(s) given by the
3863 @code{gnus-group-sort-function} variable
3864 (@code{gnus-topic-sort-groups}).
3865
3866 @end table
3867
3868 When given a prefix argument, all these commands will sort in reverse
3869 order.  @xref{Sorting Groups}, for more information about group
3870 sorting.
3871
3872
3873 @node Topic Topology
3874 @subsection Topic Topology
3875 @cindex topic topology
3876 @cindex topology
3877
3878 So, let's have a look at an example group buffer:
3879
3880 @example
3881 @group
3882 Gnus
3883   Emacs -- I wuw it!
3884      3: comp.emacs
3885      2: alt.religion.emacs
3886     Naughty Emacs
3887      452: alt.sex.emacs
3888        0: comp.talk.emacs.recovery
3889   Misc
3890      8: comp.binaries.fractals
3891     13: comp.sources.unix
3892 @end group
3893 @end example
3894
3895 So, here we have one top-level topic (@samp{Gnus}), two topics under
3896 that, and one sub-topic under one of the sub-topics.  (There is always
3897 just one (1) top-level topic).  This topology can be expressed as
3898 follows:
3899
3900 @lisp
3901 (("Gnus" visible)
3902  (("Emacs -- I wuw it!" visible)
3903   (("Naughty Emacs" visible)))
3904  (("Misc" visible)))
3905 @end lisp
3906
3907 @vindex gnus-topic-topology
3908 This is in fact how the variable @code{gnus-topic-topology} would look
3909 for the display above.  That variable is saved in the @file{.newsrc.eld}
3910 file, and shouldn't be messed with manually---unless you really want
3911 to.  Since this variable is read from the @file{.newsrc.eld} file,
3912 setting it in any other startup files will have no effect.
3913
3914 This topology shows what topics are sub-topics of what topics (right),
3915 and which topics are visible.  Two settings are currently
3916 allowed---@code{visible} and @code{invisible}.
3917
3918
3919 @node Topic Parameters
3920 @subsection Topic Parameters
3921 @cindex topic parameters
3922
3923 All groups in a topic will inherit group parameters from the parent (and
3924 ancestor) topic parameters.  All valid group parameters are valid topic
3925 parameters (@pxref{Group Parameters}).
3926
3927 In addition, the following parameters are only valid as topic
3928 parameters:
3929
3930 @table @code
3931 @item subscribe
3932 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3933 @code{subscribe} topic parameter says what groups go in what topic.  Its
3934 value should be a regexp to match the groups that should go in that
3935 topic.
3936
3937 @item subscribe-level
3938 When subscribing new groups by topic (see the @code{subscribe} parameter),
3939 the group will be subscribed with the level specified in the
3940 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3941
3942 @end table
3943
3944 Group parameters (of course) override topic parameters, and topic
3945 parameters in sub-topics override topic parameters in super-topics.  You
3946 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3947 verb, although you may feel free to disagree with me here.)
3948
3949 @example
3950 Gnus
3951   Emacs
3952      3: comp.emacs
3953      2: alt.religion.emacs
3954    452: alt.sex.emacs
3955     Relief
3956      452: alt.sex.emacs
3957        0: comp.talk.emacs.recovery
3958   Misc
3959      8: comp.binaries.fractals
3960     13: comp.sources.unix
3961    452: alt.sex.emacs
3962 @end example
3963
3964 The @samp{Emacs} topic has the topic parameter @code{(score-file
3965 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3966 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3967 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3968 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3969 . "religion.SCORE")}.
3970
3971 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3972 will get the @file{relief.SCORE} home score file.  If you enter the same
3973 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3974 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3975 get the @file{religion.SCORE} home score file.
3976
3977 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3978 there are some problems, especially with the @code{total-expiry}
3979 parameter.  Say you have a mail group in two topics; one with
3980 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3981 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3982 of these topics you mean to expire articles from, so anything may
3983 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3984 happens.  You just have to be careful if you do stuff like that.
3985
3986
3987 @node Misc Group Stuff
3988 @section Misc Group Stuff
3989
3990 @menu
3991 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3992 * Group Information::           Information and help on groups and Gnus.
3993 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3994 * File Commands::               Reading and writing the Gnus files.
3995 * Sieve Commands::              Managing Sieve scripts.
3996 @end menu
3997
3998 @table @kbd
3999
4000 @item ^
4001 @kindex ^ (Group)
4002 @findex gnus-group-enter-server-mode
4003 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4004 @xref{Server Buffer}.
4005
4006 @item a
4007 @kindex a (Group)
4008 @findex gnus-group-post-news
4009 Start composing a message (a news by default)
4010 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4011 under the point.  If the prefix is 1, prompt for a group to post to.
4012 Contrary to what the name of this function suggests, the prepared
4013 article might be a mail instead of a news, if a mail group is specified
4014 with the prefix argument.  @xref{Composing Messages}.
4015
4016 @item m
4017 @kindex m (Group)
4018 @findex gnus-group-mail
4019 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4020 use the posting style of the group under the point.  If the prefix is 1,
4021 prompt for a group name to find the posting style.
4022 @xref{Composing Messages}.
4023
4024 @item i
4025 @kindex i (Group)
4026 @findex gnus-group-news
4027 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4028 post to the group under the point.  If the prefix is 1, prompt
4029 for group to post to.  @xref{Composing Messages}.
4030
4031 This function actually prepares a news even when using mail groups.
4032 This is useful for ``posting'' messages to mail groups without actually
4033 sending them over the network: they're just saved directly to the group
4034 in question.  The corresponding back end must have a request-post method
4035 for this to work though.
4036
4037 @end table
4038
4039 Variables for the group buffer:
4040
4041 @table @code
4042
4043 @item gnus-group-mode-hook
4044 @vindex gnus-group-mode-hook
4045 is called after the group buffer has been
4046 created.
4047
4048 @item gnus-group-prepare-hook
4049 @vindex gnus-group-prepare-hook
4050 is called after the group buffer is
4051 generated.  It may be used to modify the buffer in some strange,
4052 unnatural way.
4053
4054 @item gnus-group-prepared-hook
4055 @vindex gnus-group-prepare-hook
4056 is called as the very last thing after the group buffer has been
4057 generated.  It may be used to move point around, for instance.
4058
4059 @item gnus-permanently-visible-groups
4060 @vindex gnus-permanently-visible-groups
4061 Groups matching this regexp will always be listed in the group buffer,
4062 whether they are empty or not.
4063
4064 @item gnus-group-name-charset-method-alist
4065 @vindex gnus-group-name-charset-method-alist
4066 An alist of method and the charset for group names.  It is used to show
4067 non-@acronym{ASCII} group names.
4068
4069 For example:
4070 @lisp
4071 (setq gnus-group-name-charset-method-alist
4072     '(((nntp "news.com.cn") . cn-gb-2312)))
4073 @end lisp
4074
4075 @item gnus-group-name-charset-group-alist
4076 @cindex UTF-8 group names
4077 @vindex gnus-group-name-charset-group-alist
4078 An alist of regexp of group name and the charset for group names.  It
4079 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4080 utf-8))} is the default value if UTF-8 is supported, otherwise the
4081 default is @code{nil}.
4082
4083 For example:
4084 @lisp
4085 (setq gnus-group-name-charset-group-alist
4086     '(("\\.com\\.cn:" . cn-gb-2312)))
4087 @end lisp
4088
4089 @end table
4090
4091 @node Scanning New Messages
4092 @subsection Scanning New Messages
4093 @cindex new messages
4094 @cindex scanning new news
4095
4096 @table @kbd
4097
4098 @item g
4099 @kindex g (Group)
4100 @findex gnus-group-get-new-news
4101 @c @icon{gnus-group-get-new-news}
4102 Check the server(s) for new articles.  If the numerical prefix is used,
4103 this command will check only groups of level @var{arg} and lower
4104 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4105 command will force a total re-reading of the active file(s) from the
4106 back end(s).
4107
4108 @item M-g
4109 @kindex M-g (Group)
4110 @findex gnus-group-get-new-news-this-group
4111 @vindex gnus-goto-next-group-when-activating
4112 @c @icon{gnus-group-get-new-news-this-group}
4113 Check whether new articles have arrived in the current group
4114 (@code{gnus-group-get-new-news-this-group}).
4115 @code{gnus-goto-next-group-when-activating} says whether this command is
4116 to move point to the next group or not.  It is @code{t} by default.
4117
4118 @findex gnus-activate-all-groups
4119 @cindex activating groups
4120 @item C-c M-g
4121 @kindex C-c M-g (Group)
4122 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4123
4124 @item R
4125 @kindex R (Group)
4126 @cindex restarting
4127 @findex gnus-group-restart
4128 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4129 file(s), closes the connection to all servers, clears up all run-time
4130 gnus variables, and then starts gnus all over again.
4131
4132 @end table
4133
4134 @vindex gnus-get-new-news-hook
4135 @code{gnus-get-new-news-hook} is run just before checking for new news.
4136
4137 @vindex gnus-after-getting-new-news-hook
4138 @code{gnus-after-getting-new-news-hook} is run after checking for new
4139 news.
4140
4141
4142 @node Group Information
4143 @subsection Group Information
4144 @cindex group information
4145 @cindex information on groups
4146
4147 @table @kbd
4148
4149
4150 @item H f
4151 @kindex H f (Group)
4152 @findex gnus-group-fetch-faq
4153 @vindex gnus-group-faq-directory
4154 @cindex FAQ
4155 @cindex ange-ftp
4156 Try to fetch the @acronym{FAQ} for the current group
4157 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4158 from @code{gnus-group-faq-directory}, which is usually a directory on
4159 a remote machine.  This variable can also be a list of directories.
4160 In that case, giving a prefix to this command will allow you to choose
4161 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4162 used for fetching the file.
4163
4164 If fetching from the first site is unsuccessful, gnus will attempt to go
4165 through @code{gnus-group-faq-directory} and try to open them one by one.
4166
4167 @item H c
4168 @kindex H c (Group)
4169 @findex gnus-group-fetch-charter
4170 @vindex gnus-group-charter-alist
4171 @cindex charter
4172 Try to open the charter for the current group in a web browser
4173 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4174 prefix argument.
4175
4176 Gnus will use @code{gnus-group-charter-alist} to find the location of
4177 the charter.  If no location is known, Gnus will fetch the control
4178 messages for the group, which in some cases includes the charter.
4179
4180 @item H C
4181 @kindex H C (Group)
4182 @findex gnus-group-fetch-control
4183 @vindex gnus-group-fetch-control-use-browse-url
4184 @cindex control message
4185 Fetch the control messages for the group from the archive at
4186 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4187 group if given a prefix argument.
4188
4189 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4190 Gnus will open the control messages in a browser using
4191 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4192 and displayed in an ephemeral group.
4193
4194 Note that the control messages are compressed.  To use this command
4195 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4196 Files, ,Compressed Files, emacs, The Emacs Manual}).
4197
4198 @item H d
4199 @itemx C-c C-d
4200 @c @icon{gnus-group-describe-group}
4201 @kindex H d (Group)
4202 @kindex C-c C-d (Group)
4203 @cindex describing groups
4204 @cindex group description
4205 @findex gnus-group-describe-group
4206 Describe the current group (@code{gnus-group-describe-group}).  If given
4207 a prefix, force Gnus to re-read the description from the server.
4208
4209 @item M-d
4210 @kindex M-d (Group)
4211 @findex gnus-group-describe-all-groups
4212 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4213 prefix, force gnus to re-read the description file from the server.
4214
4215 @item H v
4216 @itemx V
4217 @kindex V (Group)
4218 @kindex H v (Group)
4219 @cindex version
4220 @findex gnus-version
4221 Display current gnus version numbers (@code{gnus-version}).
4222
4223 @item ?
4224 @kindex ? (Group)
4225 @findex gnus-group-describe-briefly
4226 Give a very short help message (@code{gnus-group-describe-briefly}).
4227
4228 @item C-c C-i
4229 @kindex C-c C-i (Group)
4230 @cindex info
4231 @cindex manual
4232 @findex gnus-info-find-node
4233 Go to the gnus info node (@code{gnus-info-find-node}).
4234 @end table
4235
4236
4237 @node Group Timestamp
4238 @subsection Group Timestamp
4239 @cindex timestamps
4240 @cindex group timestamps
4241
4242 It can be convenient to let gnus keep track of when you last read a
4243 group.  To set the ball rolling, you should add
4244 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4245
4246 @lisp
4247 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4248 @end lisp
4249
4250 After doing this, each time you enter a group, it'll be recorded.
4251
4252 This information can be displayed in various ways---the easiest is to
4253 use the @samp{%d} spec in the group line format:
4254
4255 @lisp
4256 (setq gnus-group-line-format
4257       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4258 @end lisp
4259
4260 This will result in lines looking like:
4261
4262 @example
4263 *        0: mail.ding                                19961002T012943
4264          0: custom                                   19961002T012713
4265 @end example
4266
4267 As you can see, the date is displayed in compact ISO 8601 format.  This
4268 may be a bit too much, so to just display the date, you could say
4269 something like:
4270
4271 @lisp
4272 (setq gnus-group-line-format
4273       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4274 @end lisp
4275
4276 If you would like greater control of the time format, you can use a
4277 user-defined format spec.  Something like the following should do the
4278 trick:
4279
4280 @lisp
4281 (setq gnus-group-line-format
4282       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4283 (defun gnus-user-format-function-d (headers)
4284   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4285     (if time
4286         (format-time-string "%b %d  %H:%M" time)
4287       "")))
4288 @end lisp
4289
4290
4291 @node File Commands
4292 @subsection File Commands
4293 @cindex file commands
4294
4295 @table @kbd
4296
4297 @item r
4298 @kindex r (Group)
4299 @findex gnus-group-read-init-file
4300 @vindex gnus-init-file
4301 @cindex reading init file
4302 Re-read the init file (@code{gnus-init-file}, which defaults to
4303 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4304
4305 @item s
4306 @kindex s (Group)
4307 @findex gnus-group-save-newsrc
4308 @cindex saving .newsrc
4309 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4310 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4311 file(s) whether Gnus thinks it is necessary or not.
4312
4313 @c @item Z
4314 @c @kindex Z (Group)
4315 @c @findex gnus-group-clear-dribble
4316 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4317
4318 @end table
4319
4320
4321 @node Sieve Commands
4322 @subsection Sieve Commands
4323 @cindex group sieve commands
4324
4325 Sieve is a server-side mail filtering language.  In Gnus you can use
4326 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4327 sieve rules that should apply to each group.  Gnus provides two
4328 commands to translate all these group parameters into a proper Sieve
4329 script that can be transfered to the server somehow.
4330
4331 @vindex gnus-sieve-file
4332 @vindex gnus-sieve-region-start
4333 @vindex gnus-sieve-region-end
4334 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4335 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4336 between two delimiters, @code{gnus-sieve-region-start} and
4337 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4338 outside these delimiters that will not be removed the next time you
4339 regenerate the Sieve script.
4340
4341 @vindex gnus-sieve-crosspost
4342 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4343 is generated.  If it is non-@code{nil} (the default) articles is
4344 placed in all groups that have matching rules, otherwise the article
4345 is only placed in the group with the first matching rule.  For
4346 example, the group parameter @samp{(sieve address "sender"
4347 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4348 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4349 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4350 except that the line containing the call to @code{stop} is removed.)
4351
4352 @example
4353 if address "sender" "owner-ding@@hpc.uh.edu" @{
4354         fileinto "INBOX.ding";
4355         stop;
4356 @}
4357 @end example
4358
4359 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4360
4361 @table @kbd
4362
4363 @item D g
4364 @kindex D g (Group)
4365 @findex gnus-sieve-generate
4366 @vindex gnus-sieve-file
4367 @cindex generating sieve script
4368 Regenerate a Sieve script from the @code{sieve} group parameters and
4369 put you into the @code{gnus-sieve-file} without saving it.
4370
4371 @item D u
4372 @kindex D u (Group)
4373 @findex gnus-sieve-update
4374 @vindex gnus-sieve-file
4375 @cindex updating sieve script
4376 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4377 @code{sieve} group parameters, save the file and upload it to the
4378 server using the @code{sieveshell} program.
4379
4380 @end table
4381
4382
4383 @node Summary Buffer
4384 @chapter Summary Buffer
4385 @cindex summary buffer
4386
4387 A line for each article is displayed in the summary buffer.  You can
4388 move around, read articles, post articles and reply to articles.
4389
4390 The most common way to a summary buffer is to select a group from the
4391 group buffer (@pxref{Selecting a Group}).
4392
4393 You can have as many summary buffers open as you wish.
4394
4395 @menu
4396 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4397 * Summary Maneuvering::         Moving around the summary buffer.
4398 * Choosing Articles::           Reading articles.
4399 * Paging the Article::          Scrolling the current article.
4400 * Reply Followup and Post::     Posting articles.
4401 * Delayed Articles::            Send articles at a later time.
4402 * Marking Articles::            Marking articles as read, expirable, etc.
4403 * Limiting::                    You can limit the summary buffer.
4404 * Threading::                   How threads are made.
4405 * Sorting the Summary Buffer::  How articles and threads are sorted.
4406 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4407 * Article Caching::             You may store articles in a cache.
4408 * Persistent Articles::         Making articles expiry-resistant.
4409 * Article Backlog::             Having already read articles hang around.
4410 * Saving Articles::             Ways of customizing article saving.
4411 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4412 * Article Treatment::           The article buffer can be mangled at will.
4413 * MIME Commands::               Doing MIMEy things with the articles.
4414 * Charsets::                    Character set issues.
4415 * Article Commands::            Doing various things with the article buffer.
4416 * Summary Sorting::             Sorting the summary buffer in various ways.
4417 * Finding the Parent::          No child support? Get the parent.
4418 * Alternative Approaches::      Reading using non-default summaries.
4419 * Tree Display::                A more visual display of threads.
4420 * Mail Group Commands::         Some commands can only be used in mail groups.
4421 * Various Summary Stuff::       What didn't fit anywhere else.
4422 * Exiting the Summary Buffer::  Returning to the Group buffer,
4423                                 or reselecting the current group.
4424 * Crosspost Handling::          How crossposted articles are dealt with.
4425 * Duplicate Suppression::       An alternative when crosspost handling fails.
4426 * Security::                    Decrypt and Verify.
4427 * Mailing List::                Mailing list minor mode.
4428 @end menu
4429
4430
4431 @node Summary Buffer Format
4432 @section Summary Buffer Format
4433 @cindex summary buffer format
4434
4435 @iftex
4436 @iflatex
4437 \gnusfigure{The Summary Buffer}{180}{
4438 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4439 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4440 }
4441 @end iflatex
4442 @end iftex
4443
4444 @menu
4445 * Summary Buffer Lines::        You can specify how summary lines should look.
4446 * To From Newsgroups::          How to not display your own name.
4447 * Summary Buffer Mode Line::    You can say how the mode line should look.
4448 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4449 @end menu
4450
4451 @findex mail-extract-address-components
4452 @findex gnus-extract-address-components
4453 @vindex gnus-extract-address-components
4454 Gnus will use the value of the @code{gnus-extract-address-components}
4455 variable as a function for getting the name and address parts of a
4456 @code{From} header.  Three pre-defined functions exist:
4457 @code{gnus-extract-address-components}, which is the default, quite
4458 fast, and too simplistic solution;
4459 @code{mail-extract-address-components}, which works nicely, but is
4460 slower; and @code{std11-extract-address-components}, which works very
4461 nicely, but is slower.  The default function will return the wrong
4462 answer in 5% of the cases.  If this is unacceptable to you, use the
4463 other function instead:
4464
4465 @lisp
4466 (setq gnus-extract-address-components
4467       'mail-extract-address-components)
4468 @end lisp
4469
4470 @vindex gnus-summary-same-subject
4471 @code{gnus-summary-same-subject} is a string indicating that the current
4472 article has the same subject as the previous.  This string will be used
4473 with those specs that require it.  The default is @code{""}.
4474
4475
4476 @node Summary Buffer Lines
4477 @subsection Summary Buffer Lines
4478
4479 @vindex gnus-summary-line-format
4480 You can change the format of the lines in the summary buffer by changing
4481 the @code{gnus-summary-line-format} variable.  It works along the same
4482 lines as a normal @code{format} string, with some extensions
4483 (@pxref{Formatting Variables}).
4484
4485 There should always be a colon or a point position marker on the line;
4486 the cursor always moves to the point position marker or the colon after
4487 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4488 possible to change this.  Just write a new function
4489 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4490 @xref{Positioning Point}.
4491
4492 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4493
4494 The following format specification characters and extended format
4495 specification(s) are understood:
4496
4497 @table @samp
4498 @item N
4499 Article number.
4500 @item S
4501 Subject string.  List identifiers stripped,
4502 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4503 @item s
4504 Subject if the article is the root of the thread or the previous article
4505 had a different subject, @code{gnus-summary-same-subject} otherwise.
4506 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4507 @item F
4508 Full @code{From} header.
4509 @item n
4510 The name (from the @code{From} header).
4511 @item f
4512 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4513 From Newsgroups}).
4514 @item a
4515 The name (from the @code{From} header).  This differs from the @code{n}
4516 spec in that it uses the function designated by the
4517 @code{gnus-extract-address-components} variable, which is slower, but
4518 may be more thorough.
4519 @item A
4520 The address (from the @code{From} header).  This works the same way as
4521 the @code{a} spec.
4522 @item L
4523 Number of lines in the article.
4524 @item c
4525 Number of characters in the article.  This specifier is not supported
4526 in some methods (like nnfolder).
4527 @item k
4528 Pretty-printed version of the number of characters in the article;
4529 for example, @samp{1.2k} or @samp{0.4M}.
4530 @item I
4531 Indentation based on thread level (@pxref{Customizing Threading}).
4532 @item B
4533 A complex trn-style thread tree, showing response-connecting trace
4534 lines.  A thread could be drawn like this:
4535
4536 @example
4537 >
4538 +->
4539 | +->
4540 | | \->
4541 | |   \->
4542 | \->
4543 +->
4544 \->
4545 @end example
4546
4547 You can customize the appearance with the following options.  Note
4548 that it is possible to make the thread display look really neat by
4549 replacing the default @acronym{ASCII} characters with graphic
4550 line-drawing glyphs.
4551 @table @code
4552 @item gnus-sum-thread-tree-root
4553 @vindex gnus-sum-thread-tree-root
4554 Used for the root of a thread.  If @code{nil}, use subject
4555 instead.  The default is @samp{> }.
4556
4557 @item gnus-sum-thread-tree-false-root
4558 @vindex gnus-sum-thread-tree-false-root
4559 Used for the false root of a thread (@pxref{Loose Threads}).  If
4560 @code{nil}, use subject instead.  The default is @samp{> }.
4561
4562 @item gnus-sum-thread-tree-single-indent
4563 @vindex gnus-sum-thread-tree-single-indent
4564 Used for a thread with just one message.  If @code{nil}, use subject
4565 instead.  The default is @samp{}.
4566
4567 @item gnus-sum-thread-tree-vertical
4568 @vindex gnus-sum-thread-tree-vertical
4569 Used for drawing a vertical line.  The default is @samp{| }.
4570
4571 @item gnus-sum-thread-tree-indent
4572 @vindex gnus-sum-thread-tree-indent
4573 Used for indenting.  The default is @samp{  }.
4574
4575 @item gnus-sum-thread-tree-leaf-with-other
4576 @vindex gnus-sum-thread-tree-leaf-with-other
4577 Used for a leaf with brothers.  The default is @samp{+-> }.
4578
4579 @item gnus-sum-thread-tree-single-leaf
4580 @vindex gnus-sum-thread-tree-single-leaf
4581 Used for a leaf without brothers.  The default is @samp{\-> }
4582
4583 @end table
4584
4585 @item T
4586 Nothing if the article is a root and lots of spaces if it isn't (it
4587 pushes everything after it off the screen).
4588 @item [
4589 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4590 for adopted articles (@pxref{Customizing Threading}).
4591 @item ]
4592 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4593 for adopted articles.
4594 @item >
4595 One space for each thread level.
4596 @item <
4597 Twenty minus thread level spaces.
4598 @item U
4599 Unread.  @xref{Read Articles}.
4600
4601 @item R
4602 This misleadingly named specifier is the @dfn{secondary mark}.  This
4603 mark will say whether the article has been replied to, has been cached,
4604 or has been saved.  @xref{Other Marks}.
4605
4606 @item i
4607 Score as a number (@pxref{Scoring}).
4608 @item z
4609 @vindex gnus-summary-zcore-fuzz
4610 Zcore, @samp{+} if above the default level and @samp{-} if below the
4611 default level.  If the difference between
4612 @code{gnus-summary-default-score} and the score is less than
4613 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4614 @item V
4615 Total thread score.
4616 @item x
4617 @code{Xref}.
4618 @item D
4619 @code{Date}.
4620 @item d
4621 The @code{Date} in @code{DD-MMM} format.
4622 @item o
4623 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4624 @item M
4625 @code{Message-ID}.
4626 @item r
4627 @code{References}.
4628 @item t
4629 Number of articles in the current sub-thread.  Using this spec will slow
4630 down summary buffer generation somewhat.
4631 @item e
4632 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4633 article has any children.
4634 @item P
4635 The line number.
4636 @item O
4637 Download mark.
4638 @item &user-date;
4639 Age sensitive date format.  Various date format is defined in
4640 @code{gnus-user-date-format-alist}.
4641 @item u
4642 User defined specifier.  The next character in the format string should
4643 be a letter.  Gnus will call the function
4644 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4645 following @samp{%u}.  The function will be passed the current header as
4646 argument.  The function should return a string, which will be inserted
4647 into the summary just like information from any other summary specifier.
4648 @end table
4649
4650 Text between @samp{%(} and @samp{%)} will be highlighted with
4651 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4652 There can only be one such area.
4653
4654 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4655 have to be handled with care.  For reasons of efficiency, gnus will
4656 compute what column these characters will end up in, and ``hard-code''
4657 that.  This means that it is invalid to have these specs after a
4658 variable-length spec.  Well, you might not be arrested, but your summary
4659 buffer will look strange, which is bad enough.
4660
4661 The smart choice is to have these specs as far to the left as possible.
4662 (Isn't that the case with everything, though?  But I digress.)
4663
4664 This restriction may disappear in later versions of gnus.
4665
4666
4667 @node To From Newsgroups
4668 @subsection To From Newsgroups
4669 @cindex To
4670 @cindex Newsgroups
4671
4672 In some groups (particularly in archive groups), the @code{From} header
4673 isn't very interesting, since all the articles there are written by
4674 you.  To display the information in the @code{To} or @code{Newsgroups}
4675 headers instead, you need to decide three things: What information to
4676 gather; where to display it; and when to display it.
4677
4678 @enumerate
4679 @item
4680 @vindex gnus-extra-headers
4681 The reading of extra header information is controlled by the
4682 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4683 instance:
4684
4685 @lisp
4686 (setq gnus-extra-headers
4687       '(To Newsgroups X-Newsreader))
4688 @end lisp
4689
4690 This will result in Gnus trying to obtain these three headers, and
4691 storing it in header structures for later easy retrieval.
4692
4693 @item
4694 @findex gnus-extra-header
4695 The value of these extra headers can be accessed via the
4696 @code{gnus-extra-header} function.  Here's a format line spec that will
4697 access the @code{X-Newsreader} header:
4698
4699 @example
4700 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4701 @end example
4702
4703 @item
4704 @vindex gnus-ignored-from-addresses
4705 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4706 summary line spec returns the @code{To}, @code{Newsreader} or
4707 @code{From} header.  If this regexp matches the contents of the
4708 @code{From} header, the value of the @code{To} or @code{Newsreader}
4709 headers are used instead.
4710
4711 @end enumerate
4712
4713 @vindex nnmail-extra-headers
4714 A related variable is @code{nnmail-extra-headers}, which controls when
4715 to include extra headers when generating overview (@acronym{NOV}) files.
4716 If you have old overview files, you should regenerate them after
4717 changing this variable, by entering the server buffer using @kbd{^},
4718 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4719 regeneration.
4720
4721 @vindex gnus-summary-line-format
4722 You also have to instruct Gnus to display the data by changing the
4723 @code{%n} spec to the @code{%f} spec in the
4724 @code{gnus-summary-line-format} variable.
4725
4726 In summary, you'd typically put something like the following in
4727 @file{~/.gnus.el}:
4728
4729 @lisp
4730 (setq gnus-extra-headers
4731       '(To Newsgroups))
4732 (setq nnmail-extra-headers gnus-extra-headers)
4733 (setq gnus-summary-line-format
4734       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4735 (setq gnus-ignored-from-addresses
4736       "Your Name Here")
4737 @end lisp
4738
4739 (The values listed above are the default values in Gnus.  Alter them
4740 to fit your needs.)
4741
4742 A note for news server administrators, or for users who wish to try to
4743 convince their news server administrator to provide some additional
4744 support:
4745
4746 The above is mostly useful for mail groups, where you have control over
4747 the @acronym{NOV} files that are created.  However, if you can persuade your
4748 nntp admin to add (in the usual implementation, notably INN):
4749
4750 @example
4751 Newsgroups:full
4752 @end example
4753
4754 to the end of her @file{overview.fmt} file, then you can use that just
4755 as you would the extra headers from the mail groups.
4756
4757
4758 @node Summary Buffer Mode Line
4759 @subsection Summary Buffer Mode Line
4760
4761 @vindex gnus-summary-mode-line-format
4762 You can also change the format of the summary mode bar (@pxref{Mode Line
4763 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4764 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4765
4766 Here are the elements you can play with:
4767
4768 @table @samp
4769 @item G
4770 Group name.
4771 @item p
4772 Unprefixed group name.
4773 @item A
4774 Current article number.
4775 @item z
4776 Current article score.
4777 @item V
4778 Gnus version.
4779 @item U
4780 Number of unread articles in this group.
4781 @item e
4782 Number of unread articles in this group that aren't displayed in the
4783 summary buffer.
4784 @item Z
4785 A string with the number of unread and unselected articles represented
4786 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4787 articles, and just as @samp{<%U more>} if there are just unread articles
4788 and no unselected ones.
4789 @item g
4790 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4791 shortened to @samp{r.a.anime}.
4792 @item S
4793 Subject of the current article.
4794 @item u
4795 User-defined spec (@pxref{User-Defined Specs}).
4796 @item s
4797 Name of the current score file (@pxref{Scoring}).
4798 @item d
4799 Number of dormant articles (@pxref{Unread Articles}).
4800 @item t
4801 Number of ticked articles (@pxref{Unread Articles}).
4802 @item r
4803 Number of articles that have been marked as read in this session.
4804 @item E
4805 Number of articles expunged by the score files.
4806 @end table
4807
4808
4809 @node Summary Highlighting
4810 @subsection Summary Highlighting
4811
4812 @table @code
4813
4814 @item gnus-visual-mark-article-hook
4815 @vindex gnus-visual-mark-article-hook
4816 This hook is run after selecting an article.  It is meant to be used for
4817 highlighting the article in some way.  It is not run if
4818 @code{gnus-visual} is @code{nil}.
4819
4820 @item gnus-summary-update-hook
4821 @vindex gnus-summary-update-hook
4822 This hook is called when a summary line is changed.  It is not run if
4823 @code{gnus-visual} is @code{nil}.
4824
4825 @item gnus-summary-selected-face
4826 @vindex gnus-summary-selected-face
4827 This is the face (or @dfn{font} as some people call it) used to
4828 highlight the current article in the summary buffer.
4829
4830 @item gnus-summary-highlight
4831 @vindex gnus-summary-highlight
4832 Summary lines are highlighted according to this variable, which is a
4833 list where the elements are of the format @code{(@var{form}
4834 . @var{face})}.  If you would, for instance, like ticked articles to be
4835 italic and high-scored articles to be bold, you could set this variable
4836 to something like
4837 @lisp
4838 (((eq mark gnus-ticked-mark) . italic)
4839  ((> score default) . bold))
4840 @end lisp
4841 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4842 @var{face} will be applied to the line.
4843 @end table
4844
4845
4846 @node Summary Maneuvering
4847 @section Summary Maneuvering
4848 @cindex summary movement
4849
4850 All the straight movement commands understand the numeric prefix and
4851 behave pretty much as you'd expect.
4852
4853 None of these commands select articles.
4854
4855 @table @kbd
4856 @item G M-n
4857 @itemx M-n
4858 @kindex M-n (Summary)
4859 @kindex G M-n (Summary)
4860 @findex gnus-summary-next-unread-subject
4861 Go to the next summary line of an unread article
4862 (@code{gnus-summary-next-unread-subject}).
4863
4864 @item G M-p
4865 @itemx M-p
4866 @kindex M-p (Summary)
4867 @kindex G M-p (Summary)
4868 @findex gnus-summary-prev-unread-subject
4869 Go to the previous summary line of an unread article
4870 (@code{gnus-summary-prev-unread-subject}).
4871
4872 @item G g
4873 @kindex G g (Summary)
4874 @findex gnus-summary-goto-subject
4875 Ask for an article number and then go to the summary line of that article
4876 without displaying the article (@code{gnus-summary-goto-subject}).
4877 @end table
4878
4879 If gnus asks you to press a key to confirm going to the next group, you
4880 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4881 buffer, searching for the next group to read without actually returning
4882 to the group buffer.
4883
4884 Variables related to summary movement:
4885
4886 @table @code
4887
4888 @vindex gnus-auto-select-next
4889 @item gnus-auto-select-next
4890 If you issue one of the movement commands (like @kbd{n}) and there are
4891 no more unread articles after the current one, gnus will offer to go to
4892 the next group.  If this variable is @code{t} and the next group is
4893 empty, gnus will exit summary mode and return to the group buffer.  If
4894 this variable is neither @code{t} nor @code{nil}, gnus will select the
4895 next group with unread articles.  As a special case, if this variable
4896 is @code{quietly}, Gnus will select the next group without asking for
4897 confirmation.  If this variable is @code{almost-quietly}, the same
4898 will happen only if you are located on the last article in the group.
4899 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4900 command will go to the next group without confirmation.  Also
4901 @pxref{Group Levels}.
4902
4903 @item gnus-auto-select-same
4904 @vindex gnus-auto-select-same
4905 If non-@code{nil}, all the movement commands will try to go to the next
4906 article with the same subject as the current.  (@dfn{Same} here might
4907 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4908 for details (@pxref{Customizing Threading}).)  If there are no more
4909 articles with the same subject, go to the first unread article.
4910
4911 This variable is not particularly useful if you use a threaded display.
4912
4913 @item gnus-summary-check-current
4914 @vindex gnus-summary-check-current
4915 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4916 to the next (or previous) article if the current article is unread.
4917 Instead, they will choose the current article.
4918
4919 @item gnus-auto-center-summary
4920 @vindex gnus-auto-center-summary
4921 If non-@code{nil}, gnus will keep the point in the summary buffer
4922 centered at all times.  This makes things quite tidy, but if you have a
4923 slow network connection, or simply do not like this un-Emacsism, you can
4924 set this variable to @code{nil} to get the normal Emacs scrolling
4925 action.  This will also inhibit horizontal re-centering of the summary
4926 buffer, which might make it more inconvenient to read extremely long
4927 threads.
4928
4929 This variable can also be a number.  In that case, center the window at
4930 the given number of lines from the top.
4931
4932 @end table
4933
4934
4935 @node Choosing Articles
4936 @section Choosing Articles
4937 @cindex selecting articles
4938
4939 @menu
4940 * Choosing Commands::           Commands for choosing articles.
4941 * Choosing Variables::          Variables that influence these commands.
4942 @end menu
4943
4944
4945 @node Choosing Commands
4946 @subsection Choosing Commands
4947
4948 None of the following movement commands understand the numeric prefix,
4949 and they all select and display an article.
4950
4951 If you want to fetch new articles or redisplay the group, see
4952 @ref{Exiting the Summary Buffer}.
4953
4954 @table @kbd
4955 @item SPACE
4956 @kindex SPACE (Summary)
4957 @findex gnus-summary-next-page
4958 Select the current article, or, if that one's read already, the next
4959 unread article (@code{gnus-summary-next-page}).
4960
4961 If you have an article window open already and you press @kbd{SPACE}
4962 again, the article will be scrolled.  This lets you conveniently
4963 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
4964
4965 @item G n
4966 @itemx n
4967 @kindex n (Summary)
4968 @kindex G n (Summary)
4969 @findex gnus-summary-next-unread-article
4970 @c @icon{gnus-summary-next-unread}
4971 Go to next unread article (@code{gnus-summary-next-unread-article}).
4972
4973 @item G p
4974 @itemx p
4975 @kindex p (Summary)
4976 @findex gnus-summary-prev-unread-article
4977 @c @icon{gnus-summary-prev-unread}
4978 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4979
4980 @item G N
4981 @itemx N
4982 @kindex N (Summary)
4983 @kindex G N (Summary)
4984 @findex gnus-summary-next-article
4985 Go to the next article (@code{gnus-summary-next-article}).
4986
4987 @item G P
4988 @itemx P
4989 @kindex P (Summary)
4990 @kindex G P (Summary)
4991 @findex gnus-summary-prev-article
4992 Go to the previous article (@code{gnus-summary-prev-article}).
4993
4994 @item G C-n
4995 @kindex G C-n (Summary)
4996 @findex gnus-summary-next-same-subject
4997 Go to the next article with the same subject
4998 (@code{gnus-summary-next-same-subject}).
4999
5000 @item G C-p
5001 @kindex G C-p (Summary)
5002 @findex gnus-summary-prev-same-subject
5003 Go to the previous article with the same subject
5004 (@code{gnus-summary-prev-same-subject}).
5005
5006 @item G f
5007 @itemx .
5008 @kindex G f  (Summary)
5009 @kindex .  (Summary)
5010 @findex gnus-summary-first-unread-article
5011 Go to the first unread article
5012 (@code{gnus-summary-first-unread-article}).
5013
5014 @item G b
5015 @itemx ,
5016 @kindex G b (Summary)
5017 @kindex , (Summary)
5018 @findex gnus-summary-best-unread-article
5019 Go to the unread article with the highest score
5020 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5021 go to the first unread article that has a score over the default score.
5022
5023 @item G l
5024 @itemx l
5025 @kindex l (Summary)
5026 @kindex G l (Summary)
5027 @findex gnus-summary-goto-last-article
5028 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5029
5030 @item G o
5031 @kindex G o (Summary)
5032 @findex gnus-summary-pop-article
5033 @cindex history
5034 @cindex article history
5035 Pop an article off the summary history and go to this article
5036 (@code{gnus-summary-pop-article}).  This command differs from the
5037 command above in that you can pop as many previous articles off the
5038 history as you like, while @kbd{l} toggles the two last read articles.
5039 For a somewhat related issue (if you use these commands a lot),
5040 @pxref{Article Backlog}.
5041
5042 @item G j
5043 @itemx j
5044 @kindex j (Summary)
5045 @kindex G j (Summary)
5046 @findex gnus-summary-goto-article
5047 Ask for an article number or @code{Message-ID}, and then go to that
5048 article (@code{gnus-summary-goto-article}).
5049
5050 @end table
5051
5052
5053 @node Choosing Variables
5054 @subsection Choosing Variables
5055
5056 Some variables relevant for moving and selecting articles:
5057
5058 @table @code
5059 @item gnus-auto-extend-newsgroup
5060 @vindex gnus-auto-extend-newsgroup
5061 All the movement commands will try to go to the previous (or next)
5062 article, even if that article isn't displayed in the Summary buffer if
5063 this variable is non-@code{nil}.  Gnus will then fetch the article from
5064 the server and display it in the article buffer.
5065
5066 @item gnus-select-article-hook
5067 @vindex gnus-select-article-hook
5068 This hook is called whenever an article is selected.  By default it
5069 exposes any threads hidden under the selected article.  If you would
5070 like each article to be saved in the Agent as you read it, putting
5071 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5072
5073 @item gnus-mark-article-hook
5074 @vindex gnus-mark-article-hook
5075 @findex gnus-summary-mark-unread-as-read
5076 @findex gnus-summary-mark-read-and-unread-as-read
5077 @findex gnus-unread-mark
5078 This hook is called whenever an article is selected.  It is intended to
5079 be used for marking articles as read.  The default value is
5080 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5081 mark of almost any article you read to @code{gnus-unread-mark}.  The
5082 only articles not affected by this function are ticked, dormant, and
5083 expirable articles.  If you'd instead like to just have unread articles
5084 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5085 instead.  It will leave marks like @code{gnus-low-score-mark},
5086 @code{gnus-del-mark} (and so on) alone.
5087
5088 @end table
5089
5090
5091 @node Paging the Article
5092 @section Scrolling the Article
5093 @cindex article scrolling
5094
5095 @table @kbd
5096
5097 @item SPACE
5098 @kindex SPACE (Summary)
5099 @findex gnus-summary-next-page
5100 Pressing @kbd{SPACE} will scroll the current article forward one page,
5101 or, if you have come to the end of the current article, will choose the
5102 next article (@code{gnus-summary-next-page}).
5103
5104 @vindex gnus-article-boring-faces
5105 @vindex gnus-article-skip-boring
5106 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5107 the article consists only of citations and signature, then it will be
5108 skipped; the next article will be shown instead.  You can customize
5109 what is considered uninteresting with
5110 @code{gnus-article-boring-faces}.  You can manually view the article's
5111 pages, no matter how boring, using @kbd{C-M-v}.
5112
5113 @item DEL
5114 @kindex DEL (Summary)
5115 @findex gnus-summary-prev-page
5116 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5117
5118 @item RET
5119 @kindex RET (Summary)
5120 @findex gnus-summary-scroll-up
5121 Scroll the current article one line forward
5122 (@code{gnus-summary-scroll-up}).
5123
5124 @item M-RET
5125 @kindex M-RET (Summary)
5126 @findex gnus-summary-scroll-down
5127 Scroll the current article one line backward
5128 (@code{gnus-summary-scroll-down}).
5129
5130 @item A g
5131 @itemx g
5132 @kindex A g (Summary)
5133 @kindex g (Summary)
5134 @findex gnus-summary-show-article
5135 @vindex gnus-summary-show-article-charset-alist
5136 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5137 given a prefix, fetch the current article, but don't run any of the
5138 article treatment functions.  This will give you a ``raw'' article, just
5139 the way it came from the server.
5140
5141 If given a numerical prefix, you can do semi-manual charset stuff.
5142 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5143 encoded in the @code{cn-gb-2312} charset.  If you have
5144
5145 @lisp
5146 (setq gnus-summary-show-article-charset-alist
5147       '((1 . cn-gb-2312)
5148         (2 . big5)))
5149 @end lisp
5150
5151 then you can say @kbd{C-u 1 g} to get the same effect.
5152
5153 @item A <
5154 @itemx <
5155 @kindex < (Summary)
5156 @kindex A < (Summary)
5157 @findex gnus-summary-beginning-of-article
5158 Scroll to the beginning of the article
5159 (@code{gnus-summary-beginning-of-article}).
5160
5161 @item A >
5162 @itemx >
5163 @kindex > (Summary)
5164 @kindex A > (Summary)
5165 @findex gnus-summary-end-of-article
5166 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5167
5168 @item A s
5169 @itemx s
5170 @kindex A s (Summary)
5171 @kindex s (Summary)
5172 @findex gnus-summary-isearch-article
5173 Perform an isearch in the article buffer
5174 (@code{gnus-summary-isearch-article}).
5175
5176 @item h
5177 @kindex h (Summary)
5178 @findex gnus-summary-select-article-buffer
5179 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5180
5181 @end table
5182
5183
5184 @node Reply Followup and Post
5185 @section Reply, Followup and Post
5186
5187 @menu
5188 * Summary Mail Commands::       Sending mail.
5189 * Summary Post Commands::       Sending news.
5190 * Summary Message Commands::    Other Message-related commands.
5191 * Canceling and Superseding::
5192 @end menu
5193
5194
5195 @node Summary Mail Commands
5196 @subsection Summary Mail Commands
5197 @cindex mail
5198 @cindex composing mail
5199
5200 Commands for composing a mail message:
5201
5202 @table @kbd
5203
5204 @item S r
5205 @itemx r
5206 @kindex S r (Summary)
5207 @kindex r (Summary)
5208 @findex gnus-summary-reply
5209 @c @icon{gnus-summary-mail-reply}
5210 @c @icon{gnus-summary-reply}
5211 Mail a reply to the author of the current article
5212 (@code{gnus-summary-reply}).
5213
5214 @item S R
5215 @itemx R
5216 @kindex R (Summary)
5217 @kindex S R (Summary)
5218 @findex gnus-summary-reply-with-original
5219 @c @icon{gnus-summary-reply-with-original}
5220 Mail a reply to the author of the current article and include the
5221 original message (@code{gnus-summary-reply-with-original}).  This
5222 command uses the process/prefix convention.
5223
5224 @item S w
5225 @kindex S w (Summary)
5226 @findex gnus-summary-wide-reply
5227 Mail a wide reply to the author of the current article
5228 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5229 goes out to all people listed in the @code{To}, @code{From} (or
5230 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5231 present, that's used instead.
5232
5233 @item S W
5234 @kindex S W (Summary)
5235 @findex gnus-summary-wide-reply-with-original
5236 Mail a wide reply to the current article and include the original
5237 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5238 the process/prefix convention.
5239
5240 @item S v
5241 @kindex S v (Summary)
5242 @findex gnus-summary-very-wide-reply
5243 Mail a very wide reply to the author of the current article
5244 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5245 that goes out to all people listed in the @code{To}, @code{From} (or
5246 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5247 articles.  This command uses the process/prefix convention.
5248
5249 @item S V
5250 @kindex S V (Summary)
5251 @findex gnus-summary-very-wide-reply-with-original
5252 Mail a very wide reply to the author of the current article and include the
5253 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5254 command uses the process/prefix convention.
5255
5256 @item S B r
5257 @kindex S B r (Summary)
5258 @findex gnus-summary-reply-broken-reply-to
5259 Mail a reply to the author of the current article but ignore the
5260 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5261 If you need this because a mailing list incorrectly sets a
5262 @code{Reply-To} header pointing to the list, you probably want to set
5263 the @code{broken-reply-to} group parameter instead, so things will work
5264 correctly.  @xref{Group Parameters}.
5265
5266 @item S B R
5267 @kindex S B R (Summary)
5268 @findex gnus-summary-reply-broken-reply-to-with-original
5269 Mail a reply to the author of the current article and include the
5270 original message but ignore the @code{Reply-To} field
5271 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5272
5273 @item S o m
5274 @itemx C-c C-f
5275 @kindex S o m (Summary)
5276 @kindex C-c C-f (Summary)
5277 @findex gnus-summary-mail-forward
5278 @c @icon{gnus-summary-mail-forward}
5279 Forward the current article to some other person
5280 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5281 headers of the forwarded article.
5282
5283 @item S m
5284 @itemx m
5285 @kindex m (Summary)
5286 @kindex S m (Summary)
5287 @findex gnus-summary-mail-other-window
5288 @c @icon{gnus-summary-mail-originate}
5289 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5290 the posting style of the current group.  If given a prefix, disable that.
5291 If the prefix is 1, prompt for a group name to find the posting style.
5292
5293 @item S i
5294 @itemx i
5295 @kindex i (Summary)
5296 @kindex S i (Summary)
5297 @findex gnus-summary-news-other-window
5298 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5299 post to the current group.  If given a prefix, disable that.  If the
5300 prefix is 1, prompt for a group to post to.
5301
5302 This function actually prepares a news even when using mail groups.
5303 This is useful for ``posting'' messages to mail groups without actually
5304 sending them over the network: they're just saved directly to the group
5305 in question.  The corresponding back end must have a request-post method
5306 for this to work though.
5307
5308 @item S D b
5309 @kindex S D b (Summary)
5310 @findex gnus-summary-resend-bounced-mail
5311 @cindex bouncing mail
5312 If you have sent a mail, but the mail was bounced back to you for some
5313 reason (wrong address, transient failure), you can use this command to
5314 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5315 will be popped into a mail buffer where you can edit the headers before
5316 sending the mail off again.  If you give a prefix to this command, and
5317 the bounced mail is a reply to some other mail, gnus will try to fetch
5318 that mail and display it for easy perusal of its headers.  This might
5319 very well fail, though.
5320
5321 @item S D r
5322 @kindex S D r (Summary)
5323 @findex gnus-summary-resend-message
5324 Not to be confused with the previous command,
5325 @code{gnus-summary-resend-message} will prompt you for an address to
5326 send the current message off to, and then send it to that place.  The
5327 headers of the message won't be altered---but lots of headers that say
5328 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5329 means that you actually send a mail to someone that has a @code{To}
5330 header that (probably) points to yourself.  This will confuse people.
5331 So, natcherly you'll only do that if you're really eVIl.
5332
5333 This command is mainly used if you have several accounts and want to
5334 ship a mail to a different account of yours.  (If you're both
5335 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5336 to the @code{root} account, you may want to resend it to
5337 @code{postmaster}.  Ordnung muss sein!
5338
5339 This command understands the process/prefix convention
5340 (@pxref{Process/Prefix}).
5341
5342 @item S O m
5343 @kindex S O m (Summary)
5344 @findex gnus-summary-digest-mail-forward
5345 Digest the current series (@pxref{Decoding Articles}) and forward the
5346 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5347 command uses the process/prefix convention (@pxref{Process/Prefix}).
5348
5349 @item S M-c
5350 @kindex S M-c (Summary)
5351 @findex gnus-summary-mail-crosspost-complaint
5352 @cindex crossposting
5353 @cindex excessive crossposting
5354 Send a complaint about excessive crossposting to the author of the
5355 current article (@code{gnus-summary-mail-crosspost-complaint}).
5356
5357 @findex gnus-crosspost-complaint
5358 This command is provided as a way to fight back against the current
5359 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5360 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5361 command understands the process/prefix convention
5362 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5363
5364 @end table
5365
5366 Also @xref{Header Commands, ,Header Commands, message, The Message
5367 Manual}, for more information.
5368
5369
5370 @node Summary Post Commands
5371 @subsection Summary Post Commands
5372 @cindex post
5373 @cindex composing news
5374
5375 Commands for posting a news article:
5376
5377 @table @kbd
5378 @item S p
5379 @itemx a
5380 @kindex a (Summary)
5381 @kindex S p (Summary)
5382 @findex gnus-summary-post-news
5383 @c @icon{gnus-summary-post-news}
5384 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5385 default, post to the current group.  If given a prefix, disable that.
5386 If the prefix is 1, prompt for another group instead.
5387
5388 @item S f
5389 @itemx f
5390 @kindex f (Summary)
5391 @kindex S f (Summary)
5392 @findex gnus-summary-followup
5393 @c @icon{gnus-summary-followup}
5394 Post a followup to the current article (@code{gnus-summary-followup}).
5395
5396 @item S F
5397 @itemx F
5398 @kindex S F (Summary)
5399 @kindex F (Summary)
5400 @c @icon{gnus-summary-followup-with-original}
5401 @findex gnus-summary-followup-with-original
5402 Post a followup to the current article and include the original message
5403 (@code{gnus-summary-followup-with-original}).  This command uses the
5404 process/prefix convention.
5405
5406 @item S n
5407 @kindex S n (Summary)
5408 @findex gnus-summary-followup-to-mail
5409 Post a followup to the current article via news, even if you got the
5410 message through mail (@code{gnus-summary-followup-to-mail}).
5411
5412 @item S N
5413 @kindex S N (Summary)
5414 @findex gnus-summary-followup-to-mail-with-original
5415 Post a followup to the current article via news, even if you got the
5416 message through mail and include the original message
5417 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5418 the process/prefix convention.
5419
5420 @item S o p
5421 @kindex S o p (Summary)
5422 @findex gnus-summary-post-forward
5423 Forward the current article to a newsgroup
5424 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5425 headers of the forwarded article.
5426
5427 @item S O p
5428 @kindex S O p (Summary)
5429 @findex gnus-summary-digest-post-forward
5430 @cindex digests
5431 @cindex making digests
5432 Digest the current series and forward the result to a newsgroup
5433 (@code{gnus-summary-digest-post-forward}).  This command uses the
5434 process/prefix convention.
5435
5436 @item S u
5437 @kindex S u (Summary)
5438 @findex gnus-uu-post-news
5439 @c @icon{gnus-uu-post-news}
5440 Uuencode a file, split it into parts, and post it as a series
5441 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5442 @end table
5443
5444 Also @xref{Header Commands, ,Header Commands, message, The Message
5445 Manual}, for more information.
5446
5447
5448 @node Summary Message Commands
5449 @subsection Summary Message Commands
5450
5451 @table @kbd
5452 @item S y
5453 @kindex S y (Summary)
5454 @findex gnus-summary-yank-message
5455 Yank the current article into an already existing Message composition
5456 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5457 what message buffer you want to yank into, and understands the
5458 process/prefix convention (@pxref{Process/Prefix}).
5459
5460 @end table
5461
5462
5463 @node Canceling and Superseding
5464 @subsection Canceling Articles
5465 @cindex canceling articles
5466 @cindex superseding articles
5467
5468 Have you ever written something, and then decided that you really,
5469 really, really wish you hadn't posted that?
5470
5471 Well, you can't cancel mail, but you can cancel posts.
5472
5473 @findex gnus-summary-cancel-article
5474 @kindex C (Summary)
5475 @c @icon{gnus-summary-cancel-article}
5476 Find the article you wish to cancel (you can only cancel your own
5477 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5478 c} (@code{gnus-summary-cancel-article}).  Your article will be
5479 canceled---machines all over the world will be deleting your article.
5480 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5481
5482 Be aware, however, that not all sites honor cancels, so your article may
5483 live on here and there, while most sites will delete the article in
5484 question.
5485
5486 Gnus will use the ``current'' select method when canceling.  If you
5487 want to use the standard posting method, use the @samp{a} symbolic
5488 prefix (@pxref{Symbolic Prefixes}).
5489
5490 If you discover that you have made some mistakes and want to do some
5491 corrections, you can post a @dfn{superseding} article that will replace
5492 your original article.
5493
5494 @findex gnus-summary-supersede-article
5495 @kindex S (Summary)
5496 Go to the original article and press @kbd{S s}
5497 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5498 where you can edit the article all you want before sending it off the
5499 usual way.
5500
5501 The same goes for superseding as for canceling, only more so: Some
5502 sites do not honor superseding.  On those sites, it will appear that you
5503 have posted almost the same article twice.
5504
5505 If you have just posted the article, and change your mind right away,
5506 there is a trick you can use to cancel/supersede the article without
5507 waiting for the article to appear on your site first.  You simply return
5508 to the post buffer (which is called @code{*sent ...*}).  There you will
5509 find the article you just posted, with all the headers intact.  Change
5510 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5511 header by substituting one of those words for the word
5512 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5513 you would do normally.  The previous article will be
5514 canceled/superseded.
5515
5516 Just remember, kids: There is no 'c' in 'supersede'.
5517
5518 @node Delayed Articles
5519 @section Delayed Articles
5520 @cindex delayed sending
5521 @cindex send delayed
5522
5523 Sometimes, you might wish to delay the sending of a message.  For
5524 example, you might wish to arrange for a message to turn up just in time
5525 to remind your about the birthday of your Significant Other.  For this,
5526 there is the @code{gnus-delay} package.  Setup is simple:
5527
5528 @lisp
5529 (gnus-delay-initialize)
5530 @end lisp
5531
5532 @findex gnus-delay-article
5533 Normally, to send a message you use the @kbd{C-c C-c} command from
5534 Message mode.  To delay a message, use @kbd{C-c C-j}
5535 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5536 message should be delayed.  Possible answers are:
5537
5538 @itemize @bullet
5539 @item
5540 A time span.  Consists of an integer and a letter.  For example,
5541 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5542 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5543 (months) and @code{Y} (years).
5544
5545 @item
5546 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5547 delayed until that day, at a specific time (eight o'clock by default).
5548 See also @code{gnus-delay-default-hour}.
5549
5550 @item
5551 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5552 stuff.  The deadline will be at that time today, except if that time has
5553 already passed, then it's at the given time tomorrow.  So if it's ten
5554 o'clock in the morning and you specify @code{11:15}, then the deadline
5555 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5556 that means a time tomorrow.
5557 @end itemize
5558
5559 The action of the @code{gnus-delay-article} command is influenced by a
5560 couple of variables:
5561
5562 @table @code
5563 @item gnus-delay-default-hour
5564 @vindex gnus-delay-default-hour
5565 When you specify a specific date, the message will be due on that hour
5566 on the given date.  Possible values are integers 0 through 23.
5567
5568 @item gnus-delay-default-delay
5569 @vindex gnus-delay-default-delay
5570 This is a string and gives the default delay.  It can be of any of the
5571 formats described above.
5572
5573 @item gnus-delay-group
5574 @vindex gnus-delay-group
5575 Delayed articles will be kept in this group on the drafts server until
5576 they are due.  You probably don't need to change this.  The default
5577 value is @code{"delayed"}.
5578
5579 @item gnus-delay-header
5580 @vindex gnus-delay-header
5581 The deadline for each article will be stored in a header.  This variable
5582 is a string and gives the header name.  You probably don't need to
5583 change this.  The default value is @code{"X-Gnus-Delayed"}.
5584 @end table
5585
5586 The way delaying works is like this: when you use the
5587 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5588 calculates the deadline of the message and stores it in the
5589 @code{X-Gnus-Delayed} header and puts the message in the
5590 @code{nndraft:delayed} group.
5591
5592 @findex gnus-delay-send-queue
5593 And whenever you get new news, Gnus looks through the group for articles
5594 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5595 function for this.  By default, this function is added to the hook
5596 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5597 Maybe you want to use the demon to send drafts?  Just tell the demon to
5598 execute the @code{gnus-delay-send-queue} function.
5599
5600 @table @code
5601 @item gnus-delay-initialize
5602 @findex gnus-delay-initialize
5603
5604 By default, this function installs @code{gnus-delay-send-queue} in
5605 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5606 argument @code{no-check}.  If it is non-@code{nil},
5607 @code{gnus-get-new-news-hook} is not changed.  The optional first
5608 argument is ignored.
5609
5610 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5611 Presumably, you want to use the demon for sending due delayed articles.
5612 Just don't forget to set that up :-)
5613 @end table
5614
5615
5616 @node Marking Articles
5617 @section Marking Articles
5618 @cindex article marking
5619 @cindex article ticking
5620 @cindex marks
5621
5622 There are several marks you can set on an article.
5623
5624 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5625 neologism ohoy!) of the article.  Alphabetic marks generally mean
5626 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5627
5628 In addition, you also have marks that do not affect readedness.
5629
5630 @menu
5631 * Unread Articles::             Marks for unread articles.
5632 * Read Articles::               Marks for read articles.
5633 * Other Marks::                 Marks that do not affect readedness.
5634 @end menu
5635
5636 @ifinfo
5637 There's a plethora of commands for manipulating these marks:
5638 @end ifinfo
5639
5640 @menu
5641 * Setting Marks::             How to set and remove marks.
5642 * Generic Marking Commands::  How to customize the marking.
5643 * Setting Process Marks::     How to mark articles for later processing.
5644 @end menu
5645
5646
5647 @node Unread Articles
5648 @subsection Unread Articles
5649
5650 The following marks mark articles as (kinda) unread, in one form or
5651 other.
5652
5653 @table @samp
5654 @item !
5655 @vindex gnus-ticked-mark
5656 Marked as ticked (@code{gnus-ticked-mark}).
5657
5658 @dfn{Ticked articles} are articles that will remain visible always.  If
5659 you see an article that you find interesting, or you want to put off
5660 reading it, or replying to it, until sometime later, you'd typically
5661 tick it.  However, articles can be expired (from news servers by the
5662 news server software, Gnus itself never expires ticked messages), so if
5663 you want to keep an article forever, you'll have to make it persistent
5664 (@pxref{Persistent Articles}).
5665
5666 @item ?
5667 @vindex gnus-dormant-mark
5668 Marked as dormant (@code{gnus-dormant-mark}).
5669
5670 @dfn{Dormant articles} will only appear in the summary buffer if there
5671 are followups to it.  If you want to see them even if they don't have
5672 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5673 Otherwise (except for the visibility issue), they are just like ticked
5674 messages.
5675
5676 @item SPACE
5677 @vindex gnus-unread-mark
5678 Marked as unread (@code{gnus-unread-mark}).
5679
5680 @dfn{Unread articles} are articles that haven't been read at all yet.
5681 @end table
5682
5683
5684 @node Read Articles
5685 @subsection Read Articles
5686 @cindex expirable mark
5687
5688 All the following marks mark articles as read.
5689
5690 @table @samp
5691
5692 @item r
5693 @vindex gnus-del-mark
5694 These are articles that the user has marked as read with the @kbd{d}
5695 command manually, more or less (@code{gnus-del-mark}).
5696
5697 @item R
5698 @vindex gnus-read-mark
5699 Articles that have actually been read (@code{gnus-read-mark}).
5700
5701 @item O
5702 @vindex gnus-ancient-mark
5703 Articles that were marked as read in previous sessions and are now
5704 @dfn{old} (@code{gnus-ancient-mark}).
5705
5706 @item K
5707 @vindex gnus-killed-mark
5708 Marked as killed (@code{gnus-killed-mark}).
5709
5710 @item X
5711 @vindex gnus-kill-file-mark
5712 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5713
5714 @item Y
5715 @vindex gnus-low-score-mark
5716 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5717
5718 @item C
5719 @vindex gnus-catchup-mark
5720 Marked as read by a catchup (@code{gnus-catchup-mark}).
5721
5722 @item G
5723 @vindex gnus-canceled-mark
5724 Canceled article (@code{gnus-canceled-mark})
5725
5726 @item F
5727 @vindex gnus-souped-mark
5728 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5729
5730 @item Q
5731 @vindex gnus-sparse-mark
5732 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5733 Threading}.
5734
5735 @item M
5736 @vindex gnus-duplicate-mark
5737 Article marked as read by duplicate suppression
5738 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5739
5740 @end table
5741
5742 All these marks just mean that the article is marked as read, really.
5743 They are interpreted differently when doing adaptive scoring, though.
5744
5745 One more special mark, though:
5746
5747 @table @samp
5748 @item E
5749 @vindex gnus-expirable-mark
5750 Marked as expirable (@code{gnus-expirable-mark}).
5751
5752 Marking articles as @dfn{expirable} (or have them marked as such
5753 automatically) doesn't make much sense in normal groups---a user doesn't
5754 control expiring of news articles, but in mail groups, for instance,
5755 articles marked as @dfn{expirable} can be deleted by gnus at
5756 any time.
5757 @end table
5758
5759
5760 @node Other Marks
5761 @subsection Other Marks
5762 @cindex process mark
5763 @cindex bookmarks
5764
5765 There are some marks that have nothing to do with whether the article is
5766 read or not.
5767
5768 @itemize @bullet
5769
5770 @item
5771 You can set a bookmark in the current article.  Say you are reading a
5772 long thesis on cats' urinary tracts, and have to go home for dinner
5773 before you've finished reading the thesis.  You can then set a bookmark
5774 in the article, and gnus will jump to this bookmark the next time it
5775 encounters the article.  @xref{Setting Marks}.
5776
5777 @item
5778 @vindex gnus-replied-mark
5779 All articles that you have replied to or made a followup to (i.e., have
5780 answered) will be marked with an @samp{A} in the second column
5781 (@code{gnus-replied-mark}).
5782
5783 @item
5784 @vindex gnus-forwarded-mark
5785 All articles that you have forwarded will be marked with an @samp{F} in
5786 the second column (@code{gnus-forwarded-mark}).
5787
5788 @item
5789 @vindex gnus-cached-mark
5790 Articles stored in the article cache will be marked with an @samp{*} in
5791 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5792
5793 @item
5794 @vindex gnus-saved-mark
5795 Articles ``saved'' (in some manner or other; not necessarily
5796 religiously) are marked with an @samp{S} in the second column
5797 (@code{gnus-saved-mark}).
5798
5799 @item
5800 @vindex gnus-recent-mark
5801 Articles that according to the server haven't been shown to the user
5802 before are marked with a @samp{N} in the second column
5803 (@code{gnus-recent-mark}).  Note that not all servers support this
5804 mark, in which case it simply never appears.  Compare with
5805 @code{gnus-unseen-mark}.
5806
5807 @item
5808 @vindex gnus-unseen-mark
5809 Articles that haven't been seen before in Gnus by the user are marked
5810 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5811 Compare with @code{gnus-recent-mark}.
5812
5813 @item
5814 @vindex gnus-downloaded-mark
5815 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5816 downloaded for unplugged (offline) viewing.  If you are using the
5817 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5818 (The variable @code{gnus-downloaded-mark} controls which character to
5819 use.)
5820
5821 @item
5822 @vindex gnus-undownloaded-mark
5823 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5824 not have been downloaded.  Such articles cannot be viewed while you
5825 are unplugged (offline).  If you are using the @samp{%O} spec, these
5826 articles get the @samp{-} mark in that spec.  (The variable
5827 @code{gnus-undownloaded-mark} controls which character to use.)
5828
5829 @item
5830 @vindex gnus-downloadable-mark
5831 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5832 automatically, but it is also possible to explicitly mark articles for
5833 download, even if they would not be downloaded automatically.  Such
5834 explicitly-marked articles get the @samp{%} mark in the first column.
5835 (The variable @code{gnus-downloadable-mark} controls which character to
5836 use.)
5837
5838 @item
5839 @vindex gnus-not-empty-thread-mark
5840 @vindex gnus-empty-thread-mark
5841 If the @samp{%e} spec is used, the presence of threads or not will be
5842 marked with @code{gnus-not-empty-thread-mark} and
5843 @code{gnus-empty-thread-mark} in the third column, respectively.
5844
5845 @item
5846 @vindex gnus-process-mark
5847 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5848 variety of commands react to the presence of the process mark.  For
5849 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5850 all articles that have been marked with the process mark.  Articles
5851 marked with the process mark have a @samp{#} in the second column.
5852
5853 @end itemize
5854
5855 You might have noticed that most of these ``non-readedness'' marks
5856 appear in the second column by default.  So if you have a cached, saved,
5857 replied article that you have process-marked, what will that look like?
5858
5859 Nothing much.  The precedence rules go as follows: process -> cache ->
5860 replied -> saved.  So if the article is in the cache and is replied,
5861 you'll only see the cache mark and not the replied mark.
5862
5863
5864 @node Setting Marks
5865 @subsection Setting Marks
5866 @cindex setting marks
5867
5868 All the marking commands understand the numeric prefix.
5869
5870 @table @kbd
5871 @item M c
5872 @itemx M-u
5873 @kindex M c (Summary)
5874 @kindex M-u (Summary)
5875 @findex gnus-summary-clear-mark-forward
5876 @cindex mark as unread
5877 Clear all readedness-marks from the current article
5878 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5879 article as unread.
5880
5881 @item M t
5882 @itemx !
5883 @kindex ! (Summary)
5884 @kindex M t (Summary)
5885 @findex gnus-summary-tick-article-forward
5886 Tick the current article (@code{gnus-summary-tick-article-forward}).
5887 @xref{Article Caching}.
5888
5889 @item M ?
5890 @itemx ?
5891 @kindex ? (Summary)
5892 @kindex M ? (Summary)
5893 @findex gnus-summary-mark-as-dormant
5894 Mark the current article as dormant
5895 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5896
5897 @item M d
5898 @itemx d
5899 @kindex M d (Summary)
5900 @kindex d (Summary)
5901 @findex gnus-summary-mark-as-read-forward
5902 Mark the current article as read
5903 (@code{gnus-summary-mark-as-read-forward}).
5904
5905 @item D
5906 @kindex D (Summary)
5907 @findex gnus-summary-mark-as-read-backward
5908 Mark the current article as read and move point to the previous line
5909 (@code{gnus-summary-mark-as-read-backward}).
5910
5911 @item M k
5912 @itemx k
5913 @kindex k (Summary)
5914 @kindex M k (Summary)
5915 @findex gnus-summary-kill-same-subject-and-select
5916 Mark all articles that have the same subject as the current one as read,
5917 and then select the next unread article
5918 (@code{gnus-summary-kill-same-subject-and-select}).
5919
5920 @item M K
5921 @itemx C-k
5922 @kindex M K (Summary)
5923 @kindex C-k (Summary)
5924 @findex gnus-summary-kill-same-subject
5925 Mark all articles that have the same subject as the current one as read
5926 (@code{gnus-summary-kill-same-subject}).
5927
5928 @item M C
5929 @kindex M C (Summary)
5930 @findex gnus-summary-catchup
5931 @c @icon{gnus-summary-catchup}
5932 Mark all unread articles as read (@code{gnus-summary-catchup}).
5933
5934 @item M C-c
5935 @kindex M C-c (Summary)
5936 @findex gnus-summary-catchup-all
5937 Mark all articles in the group as read---even the ticked and dormant
5938 articles (@code{gnus-summary-catchup-all}).
5939
5940 @item M H
5941 @kindex M H (Summary)
5942 @findex gnus-summary-catchup-to-here
5943 Catchup the current group to point (before the point)
5944 (@code{gnus-summary-catchup-to-here}).
5945
5946 @item M h
5947 @kindex M h (Summary)
5948 @findex gnus-summary-catchup-from-here
5949 Catchup the current group from point (after the point)
5950 (@code{gnus-summary-catchup-from-here}).
5951
5952 @item C-w
5953 @kindex C-w (Summary)
5954 @findex gnus-summary-mark-region-as-read
5955 Mark all articles between point and mark as read
5956 (@code{gnus-summary-mark-region-as-read}).
5957
5958 @item M V k
5959 @kindex M V k (Summary)
5960 @findex gnus-summary-kill-below
5961 Kill all articles with scores below the default score (or below the
5962 numeric prefix) (@code{gnus-summary-kill-below}).
5963
5964 @item M e
5965 @itemx E
5966 @kindex M e (Summary)
5967 @kindex E (Summary)
5968 @findex gnus-summary-mark-as-expirable
5969 Mark the current article as expirable
5970 (@code{gnus-summary-mark-as-expirable}).
5971
5972 @item M b
5973 @kindex M b (Summary)
5974 @findex gnus-summary-set-bookmark
5975 Set a bookmark in the current article
5976 (@code{gnus-summary-set-bookmark}).
5977
5978 @item M B
5979 @kindex M B (Summary)
5980 @findex gnus-summary-remove-bookmark
5981 Remove the bookmark from the current article
5982 (@code{gnus-summary-remove-bookmark}).
5983
5984 @item M V c
5985 @kindex M V c (Summary)
5986 @findex gnus-summary-clear-above
5987 Clear all marks from articles with scores over the default score (or
5988 over the numeric prefix) (@code{gnus-summary-clear-above}).
5989
5990 @item M V u
5991 @kindex M V u (Summary)
5992 @findex gnus-summary-tick-above
5993 Tick all articles with scores over the default score (or over the
5994 numeric prefix) (@code{gnus-summary-tick-above}).
5995
5996 @item M V m
5997 @kindex M V m (Summary)
5998 @findex gnus-summary-mark-above
5999 Prompt for a mark, and mark all articles with scores over the default
6000 score (or over the numeric prefix) with this mark
6001 (@code{gnus-summary-clear-above}).
6002 @end table
6003
6004 @vindex gnus-summary-goto-unread
6005 The @code{gnus-summary-goto-unread} variable controls what action should
6006 be taken after setting a mark.  If non-@code{nil}, point will move to
6007 the next/previous unread article.  If @code{nil}, point will just move
6008 one line up or down.  As a special case, if this variable is
6009 @code{never}, all the marking commands as well as other commands (like
6010 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6011 The default is @code{t}.
6012
6013
6014 @node Generic Marking Commands
6015 @subsection Generic Marking Commands
6016
6017 Some people would like the command that ticks an article (@kbd{!}) go to
6018 the next article.  Others would like it to go to the next unread
6019 article.  Yet others would like it to stay on the current article.  And
6020 even though I haven't heard of anybody wanting it to go to the
6021 previous (unread) article, I'm sure there are people that want that as
6022 well.
6023
6024 Multiply these five behaviors with five different marking commands, and
6025 you get a potentially complex set of variable to control what each
6026 command should do.
6027
6028 To sidestep that mess, Gnus provides commands that do all these
6029 different things.  They can be found on the @kbd{M M} map in the summary
6030 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6031 to list in this manual.
6032
6033 While you can use these commands directly, most users would prefer
6034 altering the summary mode keymap.  For instance, if you would like the
6035 @kbd{!} command to go to the next article instead of the next unread
6036 article, you could say something like:
6037
6038 @lisp
6039 @group
6040 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6041 (defun my-alter-summary-map ()
6042   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6043 @end group
6044 @end lisp
6045
6046 @noindent
6047 or
6048
6049 @lisp
6050 (defun my-alter-summary-map ()
6051   (local-set-key "!" "MM!n"))
6052 @end lisp
6053
6054
6055 @node Setting Process Marks
6056 @subsection Setting Process Marks
6057 @cindex setting process marks
6058
6059 Process marks are displayed as @code{#} in the summary buffer, and are
6060 used for marking articles in such a way that other commands will
6061 process these articles.  For instance, if you process mark four
6062 articles and then use the @kbd{*} command, Gnus will enter these four
6063 commands into the cache.  For more information,
6064 @pxref{Process/Prefix}.
6065
6066 @table @kbd
6067
6068 @item M P p
6069 @itemx #
6070 @kindex # (Summary)
6071 @kindex M P p (Summary)
6072 @findex gnus-summary-mark-as-processable
6073 Mark the current article with the process mark
6074 (@code{gnus-summary-mark-as-processable}).
6075 @findex gnus-summary-unmark-as-processable
6076
6077 @item M P u
6078 @itemx M-#
6079 @kindex M P u (Summary)
6080 @kindex M-# (Summary)
6081 Remove the process mark, if any, from the current article
6082 (@code{gnus-summary-unmark-as-processable}).
6083
6084 @item M P U
6085 @kindex M P U (Summary)
6086 @findex gnus-summary-unmark-all-processable
6087 Remove the process mark from all articles
6088 (@code{gnus-summary-unmark-all-processable}).
6089
6090 @item M P i
6091 @kindex M P i (Summary)
6092 @findex gnus-uu-invert-processable
6093 Invert the list of process marked articles
6094 (@code{gnus-uu-invert-processable}).
6095
6096 @item M P R
6097 @kindex M P R (Summary)
6098 @findex gnus-uu-mark-by-regexp
6099 Mark articles that have a @code{Subject} header that matches a regular
6100 expression (@code{gnus-uu-mark-by-regexp}).
6101
6102 @item M P G
6103 @kindex M P G (Summary)
6104 @findex gnus-uu-unmark-by-regexp
6105 Unmark articles that have a @code{Subject} header that matches a regular
6106 expression (@code{gnus-uu-unmark-by-regexp}).
6107
6108 @item M P r
6109 @kindex M P r (Summary)
6110 @findex gnus-uu-mark-region
6111 Mark articles in region (@code{gnus-uu-mark-region}).
6112
6113 @item M P g
6114 @kindex M P g
6115 @findex gnus-uu-unmark-region
6116 Unmark articles in region (@code{gnus-uu-unmark-region}).
6117
6118 @item M P t
6119 @kindex M P t (Summary)
6120 @findex gnus-uu-mark-thread
6121 Mark all articles in the current (sub)thread
6122 (@code{gnus-uu-mark-thread}).
6123
6124 @item M P T
6125 @kindex M P T (Summary)
6126 @findex gnus-uu-unmark-thread
6127 Unmark all articles in the current (sub)thread
6128 (@code{gnus-uu-unmark-thread}).
6129
6130 @item M P v
6131 @kindex M P v (Summary)
6132 @findex gnus-uu-mark-over
6133 Mark all articles that have a score above the prefix argument
6134 (@code{gnus-uu-mark-over}).
6135
6136 @item M P s
6137 @kindex M P s (Summary)
6138 @findex gnus-uu-mark-series
6139 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6140
6141 @item M P S
6142 @kindex M P S (Summary)
6143 @findex gnus-uu-mark-sparse
6144 Mark all series that have already had some articles marked
6145 (@code{gnus-uu-mark-sparse}).
6146
6147 @item M P a
6148 @kindex M P a (Summary)
6149 @findex gnus-uu-mark-all
6150 Mark all articles in series order (@code{gnus-uu-mark-series}).
6151
6152 @item M P b
6153 @kindex M P b (Summary)
6154 @findex gnus-uu-mark-buffer
6155 Mark all articles in the buffer in the order they appear
6156 (@code{gnus-uu-mark-buffer}).
6157
6158 @item M P k
6159 @kindex M P k (Summary)
6160 @findex gnus-summary-kill-process-mark
6161 Push the current process mark set onto the stack and unmark all articles
6162 (@code{gnus-summary-kill-process-mark}).
6163
6164 @item M P y
6165 @kindex M P y (Summary)
6166 @findex gnus-summary-yank-process-mark
6167 Pop the previous process mark set from the stack and restore it
6168 (@code{gnus-summary-yank-process-mark}).
6169
6170 @item M P w
6171 @kindex M P w (Summary)
6172 @findex gnus-summary-save-process-mark
6173 Push the current process mark set onto the stack
6174 (@code{gnus-summary-save-process-mark}).
6175
6176 @end table
6177
6178 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6179 set process marks based on article body contents.
6180
6181
6182 @node Limiting
6183 @section Limiting
6184 @cindex limiting
6185
6186 It can be convenient to limit the summary buffer to just show some
6187 subset of the articles currently in the group.  The effect most limit
6188 commands have is to remove a few (or many) articles from the summary
6189 buffer.
6190
6191 All limiting commands work on subsets of the articles already fetched
6192 from the servers.  None of these commands query the server for
6193 additional articles.
6194
6195 @table @kbd
6196
6197 @item / /
6198 @itemx / s
6199 @kindex / / (Summary)
6200 @findex gnus-summary-limit-to-subject
6201 Limit the summary buffer to articles that match some subject
6202 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6203 matching articles.
6204
6205 @item / a
6206 @kindex / a (Summary)
6207 @findex gnus-summary-limit-to-author
6208 Limit the summary buffer to articles that match some author
6209 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6210 matching articles.
6211
6212 @item / x
6213 @kindex / x (Summary)
6214 @findex gnus-summary-limit-to-extra
6215 Limit the summary buffer to articles that match one of the ``extra''
6216 headers (@pxref{To From Newsgroups})
6217 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6218 matching articles.
6219
6220 @item / u
6221 @itemx x
6222 @kindex / u (Summary)
6223 @kindex x (Summary)
6224 @findex gnus-summary-limit-to-unread
6225 Limit the summary buffer to articles not marked as read
6226 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6227 buffer to articles strictly unread.  This means that ticked and
6228 dormant articles will also be excluded.
6229
6230 @item / m
6231 @kindex / m (Summary)
6232 @findex gnus-summary-limit-to-marks
6233 Ask for a mark and then limit to all articles that have been marked
6234 with that mark (@code{gnus-summary-limit-to-marks}).
6235
6236 @item / t
6237 @kindex / t (Summary)
6238 @findex gnus-summary-limit-to-age
6239 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6240 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6241 articles younger than that number of days.
6242
6243 @item / n
6244 @kindex / n (Summary)
6245 @findex gnus-summary-limit-to-articles
6246 Limit the summary buffer to the current article
6247 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6248 convention (@pxref{Process/Prefix}).
6249
6250 @item / w
6251 @kindex / w (Summary)
6252 @findex gnus-summary-pop-limit
6253 Pop the previous limit off the stack and restore it
6254 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6255 the stack.
6256
6257 @item / .
6258 @kindex / . (Summary)
6259 @findex gnus-summary-limit-to-unseen
6260 Limit the summary buffer to the unseen articles
6261 (@code{gnus-summary-limit-to-unseen}).
6262
6263 @item / v
6264 @kindex / v (Summary)
6265 @findex gnus-summary-limit-to-score
6266 Limit the summary buffer to articles that have a score at or above some
6267 score (@code{gnus-summary-limit-to-score}).
6268
6269 @item / p
6270 @kindex / p (Summary)
6271 @findex gnus-summary-limit-to-display-predicate
6272 Limit the summary buffer to articles that satisfy the @code{display}
6273 group parameter predicate
6274 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6275 Parameters}, for more on this predicate.
6276
6277 @item / E
6278 @itemx M S
6279 @kindex M S (Summary)
6280 @kindex / E (Summary)
6281 @findex gnus-summary-limit-include-expunged
6282 Include all expunged articles in the limit
6283 (@code{gnus-summary-limit-include-expunged}).
6284
6285 @item / D
6286 @kindex / D (Summary)
6287 @findex gnus-summary-limit-include-dormant
6288 Include all dormant articles in the limit
6289 (@code{gnus-summary-limit-include-dormant}).
6290
6291 @item / *
6292 @kindex / * (Summary)
6293 @findex gnus-summary-limit-include-cached
6294 Include all cached articles in the limit
6295 (@code{gnus-summary-limit-include-cached}).
6296
6297 @item / d
6298 @kindex / d (Summary)
6299 @findex gnus-summary-limit-exclude-dormant
6300 Exclude all dormant articles from the limit
6301 (@code{gnus-summary-limit-exclude-dormant}).
6302
6303 @item / M
6304 @kindex / M (Summary)
6305 @findex gnus-summary-limit-exclude-marks
6306 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6307
6308 @item / T
6309 @kindex / T (Summary)
6310 @findex gnus-summary-limit-include-thread
6311 Include all the articles in the current thread in the limit.
6312
6313 @item / c
6314 @kindex / c (Summary)
6315 @findex gnus-summary-limit-exclude-childless-dormant
6316 Exclude all dormant articles that have no children from the limit@*
6317 (@code{gnus-summary-limit-exclude-childless-dormant}).
6318
6319 @item / C
6320 @kindex / C (Summary)
6321 @findex gnus-summary-limit-mark-excluded-as-read
6322 Mark all excluded unread articles as read
6323 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6324 also mark excluded ticked and dormant articles as read.
6325
6326 @item / N
6327 @kindex / N (Summary)
6328 @findex gnus-summary-insert-new-articles
6329 Insert all new articles in the summary buffer.  It scans for new emails
6330 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6331
6332 @item / o
6333 @kindex / o (Summary)
6334 @findex gnus-summary-insert-old-articles
6335 Insert all old articles in the summary buffer.  If given a numbered
6336 prefix, fetch this number of articles.
6337
6338 @end table
6339
6340
6341 @node Threading
6342 @section Threading
6343 @cindex threading
6344 @cindex article threading
6345
6346 Gnus threads articles by default.  @dfn{To thread} is to put responses
6347 to articles directly after the articles they respond to---in a
6348 hierarchical fashion.
6349
6350 Threading is done by looking at the @code{References} headers of the
6351 articles.  In a perfect world, this would be enough to build pretty
6352 trees, but unfortunately, the @code{References} header is often broken
6353 or simply missing.  Weird news propagation exacerbates the problem,
6354 so one has to employ other heuristics to get pleasing results.  A
6355 plethora of approaches exists, as detailed in horrible detail in
6356 @ref{Customizing Threading}.
6357
6358 First, a quick overview of the concepts:
6359
6360 @table @dfn
6361 @item root
6362 The top-most article in a thread; the first article in the thread.
6363
6364 @item thread
6365 A tree-like article structure.
6366
6367 @item sub-thread
6368 A small(er) section of this tree-like structure.
6369
6370 @item loose threads
6371 Threads often lose their roots due to article expiry, or due to the root
6372 already having been read in a previous session, and not displayed in the
6373 summary buffer.  We then typically have many sub-threads that really
6374 belong to one thread, but are without connecting roots.  These are
6375 called loose threads.
6376
6377 @item thread gathering
6378 An attempt to gather loose threads into bigger threads.
6379
6380 @item sparse threads
6381 A thread where the missing articles have been ``guessed'' at, and are
6382 displayed as empty lines in the summary buffer.
6383
6384 @end table
6385
6386
6387 @menu
6388 * Customizing Threading::       Variables you can change to affect the threading.
6389 * Thread Commands::             Thread based commands in the summary buffer.
6390 @end menu
6391
6392
6393 @node Customizing Threading
6394 @subsection Customizing Threading
6395 @cindex customizing threading
6396
6397 @menu
6398 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6399 * Filling In Threads::          Making the threads displayed look fuller.
6400 * More Threading::              Even more variables for fiddling with threads.
6401 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6402 @end menu
6403
6404
6405 @node Loose Threads
6406 @subsubsection Loose Threads
6407 @cindex <
6408 @cindex >
6409 @cindex loose threads
6410
6411 @table @code
6412 @item gnus-summary-make-false-root
6413 @vindex gnus-summary-make-false-root
6414 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6415 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6416 Yup.)  Loose subtrees occur when the real root has expired, or you've
6417 read or killed the root in a previous session.
6418
6419 When there is no real root of a thread, gnus will have to fudge
6420 something.  This variable says what fudging method gnus should use.
6421 There are four possible values:
6422
6423 @iftex
6424 @iflatex
6425 \gnusfigure{The Summary Buffer}{390}{
6426 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6427 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6428 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6429 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6430 }
6431 @end iflatex
6432 @end iftex
6433
6434 @cindex adopting articles
6435
6436 @table @code
6437
6438 @item adopt
6439 Gnus will make the first of the orphaned articles the parent.  This
6440 parent will adopt all the other articles.  The adopted articles will be
6441 marked as such by pointy brackets (@samp{<>}) instead of the standard
6442 square brackets (@samp{[]}).  This is the default method.
6443
6444 @item dummy
6445 @vindex gnus-summary-dummy-line-format
6446 @vindex gnus-summary-make-false-root-always
6447 Gnus will create a dummy summary line that will pretend to be the
6448 parent.  This dummy line does not correspond to any real article, so
6449 selecting it will just select the first real article after the dummy
6450 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6451 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6452 which is the subject of the article.  @xref{Formatting Variables}.
6453 If you want all threads to have a dummy root, even the non-gathered
6454 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6455
6456 @item empty
6457 Gnus won't actually make any article the parent, but simply leave the
6458 subject field of all orphans except the first empty.  (Actually, it will
6459 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6460 Buffer Format}).)
6461
6462 @item none
6463 Don't make any article parent at all.  Just gather the threads and
6464 display them after one another.
6465
6466 @item nil
6467 Don't gather loose threads.
6468 @end table
6469
6470 @item gnus-summary-gather-subject-limit
6471 @vindex gnus-summary-gather-subject-limit
6472 Loose threads are gathered by comparing subjects of articles.  If this
6473 variable is @code{nil}, gnus requires an exact match between the
6474 subjects of the loose threads before gathering them into one big
6475 super-thread.  This might be too strict a requirement, what with the
6476 presence of stupid newsreaders that chop off long subject lines.  If
6477 you think so, set this variable to, say, 20 to require that only the
6478 first 20 characters of the subjects have to match.  If you set this
6479 variable to a really low number, you'll find that gnus will gather
6480 everything in sight into one thread, which isn't very helpful.
6481
6482 @cindex fuzzy article gathering
6483 If you set this variable to the special value @code{fuzzy}, gnus will
6484 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6485 Matching}).
6486
6487 @item gnus-simplify-subject-fuzzy-regexp
6488 @vindex gnus-simplify-subject-fuzzy-regexp
6489 This can either be a regular expression or list of regular expressions
6490 that match strings that will be removed from subjects if fuzzy subject
6491 simplification is used.
6492
6493 @item gnus-simplify-ignored-prefixes
6494 @vindex gnus-simplify-ignored-prefixes
6495 If you set @code{gnus-summary-gather-subject-limit} to something as low
6496 as 10, you might consider setting this variable to something sensible:
6497
6498 @c Written by Michael Ernst <mernst@cs.rice.edu>
6499 @lisp
6500 (setq gnus-simplify-ignored-prefixes
6501       (concat
6502        "\\`\\[?\\("
6503        (mapconcat
6504         'identity
6505         '("looking"
6506           "wanted" "followup" "summary\\( of\\)?"
6507           "help" "query" "problem" "question"
6508           "answer" "reference" "announce"
6509           "How can I" "How to" "Comparison of"
6510           ;; ...
6511           )
6512         "\\|")
6513        "\\)\\s *\\("
6514        (mapconcat 'identity
6515                   '("for" "for reference" "with" "about")
6516                   "\\|")
6517        "\\)?\\]?:?[ \t]*"))
6518 @end lisp
6519
6520 All words that match this regexp will be removed before comparing two
6521 subjects.
6522
6523 @item gnus-simplify-subject-functions
6524 @vindex gnus-simplify-subject-functions
6525 If non-@code{nil}, this variable overrides
6526 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6527 list of functions to apply to the @code{Subject} string iteratively to
6528 arrive at the simplified version of the string.
6529
6530 Useful functions to put in this list include:
6531
6532 @table @code
6533 @item gnus-simplify-subject-re
6534 @findex gnus-simplify-subject-re
6535 Strip the leading @samp{Re:}.
6536
6537 @item gnus-simplify-subject-fuzzy
6538 @findex gnus-simplify-subject-fuzzy
6539 Simplify fuzzily.
6540
6541 @item gnus-simplify-whitespace
6542 @findex gnus-simplify-whitespace
6543 Remove excessive whitespace.
6544
6545 @item gnus-simplify-all-whitespace
6546 @findex gnus-simplify-all-whitespace
6547 Remove all whitespace.
6548 @end table
6549
6550 You may also write your own functions, of course.
6551
6552
6553 @item gnus-summary-gather-exclude-subject
6554 @vindex gnus-summary-gather-exclude-subject
6555 Since loose thread gathering is done on subjects only, that might lead
6556 to many false hits, especially with certain common subjects like
6557 @samp{} and @samp{(none)}.  To make the situation slightly better,
6558 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6559 what subjects should be excluded from the gathering process.@*
6560 The default is @samp{^ *$\\|^(none)$}.
6561
6562 @item gnus-summary-thread-gathering-function
6563 @vindex gnus-summary-thread-gathering-function
6564 Gnus gathers threads by looking at @code{Subject} headers.  This means
6565 that totally unrelated articles may end up in the same ``thread'', which
6566 is confusing.  An alternate approach is to look at all the
6567 @code{Message-ID}s in all the @code{References} headers to find matches.
6568 This will ensure that no gathered threads ever include unrelated
6569 articles, but it also means that people who have posted with broken
6570 newsreaders won't be gathered properly.  The choice is yours---plague or
6571 cholera:
6572
6573 @table @code
6574 @item gnus-gather-threads-by-subject
6575 @findex gnus-gather-threads-by-subject
6576 This function is the default gathering function and looks at
6577 @code{Subject}s exclusively.
6578
6579 @item gnus-gather-threads-by-references
6580 @findex gnus-gather-threads-by-references
6581 This function looks at @code{References} headers exclusively.
6582 @end table
6583
6584 If you want to test gathering by @code{References}, you could say
6585 something like:
6586
6587 @lisp
6588 (setq gnus-summary-thread-gathering-function
6589       'gnus-gather-threads-by-references)
6590 @end lisp
6591
6592 @end table
6593
6594
6595 @node Filling In Threads
6596 @subsubsection Filling In Threads
6597
6598 @table @code
6599 @item gnus-fetch-old-headers
6600 @vindex gnus-fetch-old-headers
6601 If non-@code{nil}, gnus will attempt to build old threads by fetching
6602 more old headers---headers to articles marked as read.  If you
6603 would like to display as few summary lines as possible, but still
6604 connect as many loose threads as possible, you should set this variable
6605 to @code{some} or a number.  If you set it to a number, no more than
6606 that number of extra old headers will be fetched.  In either case,
6607 fetching old headers only works if the back end you are using carries
6608 overview files---this would normally be @code{nntp}, @code{nnspool},
6609 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6610 the thread has been expired by the server, there's not much Gnus can do
6611 about that.
6612
6613 This variable can also be set to @code{invisible}.  This won't have any
6614 visible effects, but is useful if you use the @kbd{A T} command a lot
6615 (@pxref{Finding the Parent}).
6616
6617 @item gnus-fetch-old-ephemeral-headers
6618 @vindex gnus-fetch-old-ephemeral-headers
6619 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6620 newsgroups.
6621
6622 @item gnus-build-sparse-threads
6623 @vindex gnus-build-sparse-threads
6624 Fetching old headers can be slow.  A low-rent similar effect can be
6625 gotten by setting this variable to @code{some}.  Gnus will then look at
6626 the complete @code{References} headers of all articles and try to string
6627 together articles that belong in the same thread.  This will leave
6628 @dfn{gaps} in the threading display where gnus guesses that an article
6629 is missing from the thread.  (These gaps appear like normal summary
6630 lines.  If you select a gap, gnus will try to fetch the article in
6631 question.)  If this variable is @code{t}, gnus will display all these
6632 ``gaps'' without regard for whether they are useful for completing the
6633 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6634 off sparse leaf nodes that don't lead anywhere.  This variable is
6635 @code{nil} by default.
6636
6637 @item gnus-read-all-available-headers
6638 @vindex gnus-read-all-available-headers
6639 This is a rather obscure variable that few will find useful.  It's
6640 intended for those non-news newsgroups where the back end has to fetch
6641 quite a lot to present the summary buffer, and where it's impossible to
6642 go back to parents of articles.  This is mostly the case in the
6643 web-based groups, like the @code{nnultimate} groups.
6644
6645 If you don't use those, then it's safe to leave this as the default
6646 @code{nil}.  If you want to use this variable, it should be a regexp
6647 that matches the group name, or @code{t} for all groups.
6648
6649 @end table
6650
6651
6652 @node More Threading
6653 @subsubsection More Threading
6654
6655 @table @code
6656 @item gnus-show-threads
6657 @vindex gnus-show-threads
6658 If this variable is @code{nil}, no threading will be done, and all of
6659 the rest of the variables here will have no effect.  Turning threading
6660 off will speed group selection up a bit, but it is sure to make reading
6661 slower and more awkward.
6662
6663 @item gnus-thread-hide-subtree
6664 @vindex gnus-thread-hide-subtree
6665 If non-@code{nil}, all threads will be hidden when the summary buffer is
6666 generated.
6667
6668 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6669 Available predicates are @code{gnus-article-unread-p} and
6670 @code{gnus-article-unseen-p}.
6671
6672 Here's an example:
6673
6674 @lisp
6675 (setq gnus-thread-hide-subtree
6676       '(or gnus-article-unread-p
6677            gnus-article-unseen-p))
6678 @end lisp
6679
6680 (It's a pretty nonsensical example, since all unseen articles are also
6681 unread, but you get my drift.)
6682
6683
6684 @item gnus-thread-expunge-below
6685 @vindex gnus-thread-expunge-below
6686 All threads that have a total score (as defined by
6687 @code{gnus-thread-score-function}) less than this number will be
6688 expunged.  This variable is @code{nil} by default, which means that no
6689 threads are expunged.
6690
6691 @item gnus-thread-hide-killed
6692 @vindex gnus-thread-hide-killed
6693 if you kill a thread and this variable is non-@code{nil}, the subtree
6694 will be hidden.
6695
6696 @item gnus-thread-ignore-subject
6697 @vindex gnus-thread-ignore-subject
6698 Sometimes somebody changes the subject in the middle of a thread.  If
6699 this variable is non-@code{nil}, which is the default, the subject
6700 change is ignored.  If it is @code{nil}, a change in the subject will
6701 result in a new thread.
6702
6703 @item gnus-thread-indent-level
6704 @vindex gnus-thread-indent-level
6705 This is a number that says how much each sub-thread should be indented.
6706 The default is 4.
6707
6708 @item gnus-sort-gathered-threads-function
6709 @vindex gnus-sort-gathered-threads-function
6710 Sometimes, particularly with mailing lists, the order in which mails
6711 arrive locally is not necessarily the same as the order in which they
6712 arrived on the mailing list.  Consequently, when sorting sub-threads
6713 using the default @code{gnus-thread-sort-by-number}, responses can end
6714 up appearing before the article to which they are responding to.
6715 Setting this variable to an alternate value
6716 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6717 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6718 more logical sub-thread ordering in such instances.
6719
6720 @end table
6721
6722
6723 @node Low-Level Threading
6724 @subsubsection Low-Level Threading
6725
6726 @table @code
6727
6728 @item gnus-parse-headers-hook
6729 @vindex gnus-parse-headers-hook
6730 Hook run before parsing any headers.  The default value is
6731 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6732 @code{default-mime-charset} in summary buffer based on variable
6733 @code{gnus-newsgroup-default-charset-alist}.
6734
6735 @item gnus-alter-header-function
6736 @vindex gnus-alter-header-function
6737 If non-@code{nil}, this function will be called to allow alteration of
6738 article header structures.  The function is called with one parameter,
6739 the article header vector, which it may alter in any way.  For instance,
6740 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6741 in systematic ways (by adding prefixes and such), you can use this
6742 variable to un-scramble the @code{Message-ID}s so that they are more
6743 meaningful.  Here's one example:
6744
6745 @lisp
6746 (setq gnus-alter-header-function 'my-alter-message-id)
6747
6748 (defun my-alter-message-id (header)
6749   (let ((id (mail-header-id header)))
6750     (when (string-match
6751            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6752       (mail-header-set-id
6753        (concat (match-string 1 id) "@@" (match-string 2 id))
6754        header))))
6755 @end lisp
6756
6757 @end table
6758
6759
6760 @node Thread Commands
6761 @subsection Thread Commands
6762 @cindex thread commands
6763
6764 @table @kbd
6765
6766 @item T k
6767 @itemx C-M-k
6768 @kindex T k (Summary)
6769 @kindex C-M-k (Summary)
6770 @findex gnus-summary-kill-thread
6771 Mark all articles in the current (sub-)thread as read
6772 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6773 remove all marks instead.  If the prefix argument is negative, tick
6774 articles instead.
6775
6776 @item T l
6777 @itemx C-M-l
6778 @kindex T l (Summary)
6779 @kindex C-M-l (Summary)
6780 @findex gnus-summary-lower-thread
6781 Lower the score of the current (sub-)thread
6782 (@code{gnus-summary-lower-thread}).
6783
6784 @item T i
6785 @kindex T i (Summary)
6786 @findex gnus-summary-raise-thread
6787 Increase the score of the current (sub-)thread
6788 (@code{gnus-summary-raise-thread}).
6789
6790 @item T #
6791 @kindex T # (Summary)
6792 @findex gnus-uu-mark-thread
6793 Set the process mark on the current (sub-)thread
6794 (@code{gnus-uu-mark-thread}).
6795
6796 @item T M-#
6797 @kindex T M-# (Summary)
6798 @findex gnus-uu-unmark-thread
6799 Remove the process mark from the current (sub-)thread
6800 (@code{gnus-uu-unmark-thread}).
6801
6802 @item T T
6803 @kindex T T (Summary)
6804 @findex gnus-summary-toggle-threads
6805 Toggle threading (@code{gnus-summary-toggle-threads}).
6806
6807 @item T s
6808 @kindex T s (Summary)
6809 @findex gnus-summary-show-thread
6810 Expose the (sub-)thread hidden under the current article, if any@*
6811 (@code{gnus-summary-show-thread}).
6812
6813 @item T h
6814 @kindex T h (Summary)
6815 @findex gnus-summary-hide-thread
6816 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6817
6818 @item T S
6819 @kindex T S (Summary)
6820 @findex gnus-summary-show-all-threads
6821 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6822
6823 @item T H
6824 @kindex T H (Summary)
6825 @findex gnus-summary-hide-all-threads
6826 Hide all threads (@code{gnus-summary-hide-all-threads}).
6827
6828 @item T t
6829 @kindex T t (Summary)
6830 @findex gnus-summary-rethread-current
6831 Re-thread the current article's thread
6832 (@code{gnus-summary-rethread-current}).  This works even when the
6833 summary buffer is otherwise unthreaded.
6834
6835 @item T ^
6836 @kindex T ^ (Summary)
6837 @findex gnus-summary-reparent-thread
6838 Make the current article the child of the marked (or previous) article
6839 (@code{gnus-summary-reparent-thread}).
6840
6841 @end table
6842
6843 The following commands are thread movement commands.  They all
6844 understand the numeric prefix.
6845
6846 @table @kbd
6847
6848 @item T n
6849 @kindex T n (Summary)
6850 @itemx C-M-f
6851 @kindex C-M-n (Summary)
6852 @itemx M-down
6853 @kindex M-down (Summary)
6854 @findex gnus-summary-next-thread
6855 Go to the next thread (@code{gnus-summary-next-thread}).
6856
6857 @item T p
6858 @kindex T p (Summary)
6859 @itemx C-M-b
6860 @kindex C-M-p (Summary)
6861 @itemx M-up
6862 @kindex M-up (Summary)
6863 @findex gnus-summary-prev-thread
6864 Go to the previous thread (@code{gnus-summary-prev-thread}).
6865
6866 @item T d
6867 @kindex T d (Summary)
6868 @findex gnus-summary-down-thread
6869 Descend the thread (@code{gnus-summary-down-thread}).
6870
6871 @item T u
6872 @kindex T u (Summary)
6873 @findex gnus-summary-up-thread
6874 Ascend the thread (@code{gnus-summary-up-thread}).
6875
6876 @item T o
6877 @kindex T o (Summary)
6878 @findex gnus-summary-top-thread
6879 Go to the top of the thread (@code{gnus-summary-top-thread}).
6880 @end table
6881
6882 @vindex gnus-thread-operation-ignore-subject
6883 If you ignore subject while threading, you'll naturally end up with
6884 threads that have several different subjects in them.  If you then issue
6885 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6886 wish to kill the entire thread, but just those parts of the thread that
6887 have the same subject as the current article.  If you like this idea,
6888 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6889 is non-@code{nil} (which it is by default), subjects will be ignored
6890 when doing thread commands.  If this variable is @code{nil}, articles in
6891 the same thread with different subjects will not be included in the
6892 operation in question.  If this variable is @code{fuzzy}, only articles
6893 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6894 Matching}).
6895
6896
6897 @node Sorting the Summary Buffer
6898 @section Sorting the Summary Buffer
6899
6900 @findex gnus-thread-sort-by-total-score
6901 @findex gnus-thread-sort-by-date
6902 @findex gnus-thread-sort-by-score
6903 @findex gnus-thread-sort-by-subject
6904 @findex gnus-thread-sort-by-author
6905 @findex gnus-thread-sort-by-number
6906 @findex gnus-thread-sort-by-random
6907 @vindex gnus-thread-sort-functions
6908 @findex gnus-thread-sort-by-most-recent-thread
6909 If you are using a threaded summary display, you can sort the threads by
6910 setting @code{gnus-thread-sort-functions}, which can be either a single
6911 function, a list of functions, or a list containing functions and
6912 @code{(not some-function)} elements.
6913
6914 By default, sorting is done on article numbers.  Ready-made sorting
6915 predicate functions include @code{gnus-thread-sort-by-number},
6916 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6917 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6918 @code{gnus-thread-sort-by-most-recent-number},
6919 @code{gnus-thread-sort-by-most-recent-date},
6920 @code{gnus-thread-sort-by-random} and
6921 @code{gnus-thread-sort-by-total-score}.
6922
6923 Each function takes two threads and returns non-@code{nil} if the first
6924 thread should be sorted before the other.  Note that sorting really is
6925 normally done by looking only at the roots of each thread.
6926
6927 If you use more than one function, the primary sort key should be the
6928 last function in the list.  You should probably always include
6929 @code{gnus-thread-sort-by-number} in the list of sorting
6930 functions---preferably first.  This will ensure that threads that are
6931 equal with respect to the other sort criteria will be displayed in
6932 ascending article order.
6933
6934 If you would like to sort by reverse score, then by subject, and finally
6935 by number, you could do something like:
6936
6937 @lisp
6938 (setq gnus-thread-sort-functions
6939       '(gnus-thread-sort-by-number
6940         gnus-thread-sort-by-subject
6941         (not gnus-thread-sort-by-total-score)))
6942 @end lisp
6943
6944 The threads that have highest score will be displayed first in the
6945 summary buffer.  When threads have the same score, they will be sorted
6946 alphabetically.  The threads that have the same score and the same
6947 subject will be sorted by number, which is (normally) the sequence in
6948 which the articles arrived.
6949
6950 If you want to sort by score and then reverse arrival order, you could
6951 say something like:
6952
6953 @lisp
6954 (setq gnus-thread-sort-functions
6955       '((lambda (t1 t2)
6956           (not (gnus-thread-sort-by-number t1 t2)))
6957         gnus-thread-sort-by-score))
6958 @end lisp
6959
6960 @vindex gnus-thread-score-function
6961 The function in the @code{gnus-thread-score-function} variable (default
6962 @code{+}) is used for calculating the total score of a thread.  Useful
6963 functions might be @code{max}, @code{min}, or squared means, or whatever
6964 tickles your fancy.
6965
6966 @findex gnus-article-sort-functions
6967 @findex gnus-article-sort-by-date
6968 @findex gnus-article-sort-by-score
6969 @findex gnus-article-sort-by-subject
6970 @findex gnus-article-sort-by-author
6971 @findex gnus-article-sort-by-random
6972 @findex gnus-article-sort-by-number
6973 If you are using an unthreaded display for some strange reason or
6974 other, you have to fiddle with the @code{gnus-article-sort-functions}
6975 variable.  It is very similar to the
6976 @code{gnus-thread-sort-functions}, except that it uses slightly
6977 different functions for article comparison.  Available sorting
6978 predicate functions are @code{gnus-article-sort-by-number},
6979 @code{gnus-article-sort-by-author},
6980 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6981 @code{gnus-article-sort-by-random}, and
6982 @code{gnus-article-sort-by-score}.
6983
6984 If you want to sort an unthreaded summary display by subject, you could
6985 say something like:
6986
6987 @lisp
6988 (setq gnus-article-sort-functions
6989       '(gnus-article-sort-by-number
6990         gnus-article-sort-by-subject))
6991 @end lisp
6992
6993
6994
6995 @node Asynchronous Fetching
6996 @section Asynchronous Article Fetching
6997 @cindex asynchronous article fetching
6998 @cindex article pre-fetch
6999 @cindex pre-fetch
7000
7001 If you read your news from an @acronym{NNTP} server that's far away, the
7002 network latencies may make reading articles a chore.  You have to wait
7003 for a while after pressing @kbd{n} to go to the next article before the
7004 article appears.  Why can't gnus just go ahead and fetch the article
7005 while you are reading the previous one?  Why not, indeed.
7006
7007 First, some caveats.  There are some pitfalls to using asynchronous
7008 article fetching, especially the way gnus does it.
7009
7010 Let's say you are reading article 1, which is short, and article 2 is
7011 quite long, and you are not interested in reading that.  Gnus does not
7012 know this, so it goes ahead and fetches article 2.  You decide to read
7013 article 3, but since gnus is in the process of fetching article 2, the
7014 connection is blocked.
7015
7016 To avoid these situations, gnus will open two (count 'em two)
7017 connections to the server.  Some people may think this isn't a very nice
7018 thing to do, but I don't see any real alternatives.  Setting up that
7019 extra connection takes some time, so gnus startup will be slower.
7020
7021 Gnus will fetch more articles than you will read.  This will mean that
7022 the link between your machine and the @acronym{NNTP} server will become more
7023 loaded than if you didn't use article pre-fetch.  The server itself will
7024 also become more loaded---both with the extra article requests, and the
7025 extra connection.
7026
7027 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7028 you really want to.
7029
7030 @vindex gnus-asynchronous
7031 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7032 happen automatically.
7033
7034 @vindex gnus-use-article-prefetch
7035 You can control how many articles are to be pre-fetched by setting
7036 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7037 that when you read an article in the group, the back end will pre-fetch
7038 the next 30 articles.  If this variable is @code{t}, the back end will
7039 pre-fetch all the articles it can without bound.  If it is
7040 @code{nil}, no pre-fetching will be done.
7041
7042 @vindex gnus-async-prefetch-article-p
7043 @findex gnus-async-read-p
7044 There are probably some articles that you don't want to pre-fetch---read
7045 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7046 variable controls whether an article is to be pre-fetched.  This
7047 function should return non-@code{nil} when the article in question is
7048 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7049 returns @code{nil} on read articles.  The function is called with an
7050 article data structure as the only parameter.
7051
7052 If, for instance, you wish to pre-fetch only unread articles shorter
7053 than 100 lines, you could say something like:
7054
7055 @lisp
7056 (defun my-async-short-unread-p (data)
7057   "Return non-nil for short, unread articles."
7058   (and (gnus-data-unread-p data)
7059        (< (mail-header-lines (gnus-data-header data))
7060           100)))
7061
7062 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7063 @end lisp
7064
7065 These functions will be called many, many times, so they should
7066 preferably be short and sweet to avoid slowing down gnus too much.
7067 It's probably a good idea to byte-compile things like this.
7068
7069 @vindex gnus-prefetched-article-deletion-strategy
7070 Articles have to be removed from the asynch buffer sooner or later.  The
7071 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7072 articles.  This is a list that may contain the following elements:
7073
7074 @table @code
7075 @item read
7076 Remove articles when they are read.
7077
7078 @item exit
7079 Remove articles when exiting the group.
7080 @end table
7081
7082 The default value is @code{(read exit)}.
7083
7084 @c @vindex gnus-use-header-prefetch
7085 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7086 @c from the next group.
7087
7088
7089 @node Article Caching
7090 @section Article Caching
7091 @cindex article caching
7092 @cindex caching
7093
7094 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7095 consider turning article caching on.  Each article will then be stored
7096 locally under your home directory.  As you may surmise, this could
7097 potentially use @emph{huge} amounts of disk space, as well as eat up all
7098 your inodes so fast it will make your head swim.  In vodka.
7099
7100 Used carefully, though, it could be just an easier way to save articles.
7101
7102 @vindex gnus-use-long-file-name
7103 @vindex gnus-cache-directory
7104 @vindex gnus-use-cache
7105 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7106 all articles ticked or marked as dormant will then be copied
7107 over to your local cache (@code{gnus-cache-directory}).  Whether this
7108 cache is flat or hierarchical is controlled by the
7109 @code{gnus-use-long-file-name} variable, as usual.
7110
7111 When re-selecting a ticked or dormant article, it will be fetched from the
7112 cache instead of from the server.  As articles in your cache will never
7113 expire, this might serve as a method of saving articles while still
7114 keeping them where they belong.  Just mark all articles you want to save
7115 as dormant, and don't worry.
7116
7117 When an article is marked as read, is it removed from the cache.
7118
7119 @vindex gnus-cache-remove-articles
7120 @vindex gnus-cache-enter-articles
7121 The entering/removal of articles from the cache is controlled by the
7122 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7123 variables.  Both are lists of symbols.  The first is @code{(ticked
7124 dormant)} by default, meaning that ticked and dormant articles will be
7125 put in the cache.  The latter is @code{(read)} by default, meaning that
7126 articles marked as read are removed from the cache.  Possibly
7127 symbols in these two lists are @code{ticked}, @code{dormant},
7128 @code{unread} and @code{read}.
7129
7130 @findex gnus-jog-cache
7131 So where does the massive article-fetching and storing come into the
7132 picture?  The @code{gnus-jog-cache} command will go through all
7133 subscribed newsgroups, request all unread articles, score them, and
7134 store them in the cache.  You should only ever, ever ever ever, use this
7135 command if 1) your connection to the @acronym{NNTP} server is really, really,
7136 really slow and 2) you have a really, really, really huge disk.
7137 Seriously.  One way to cut down on the number of articles downloaded is
7138 to score unwanted articles down and have them marked as read.  They will
7139 not then be downloaded by this command.
7140
7141 @vindex gnus-uncacheable-groups
7142 @vindex gnus-cacheable-groups
7143 It is likely that you do not want caching on all groups.  For instance,
7144 if your @code{nnml} mail is located under your home directory, it makes no
7145 sense to cache it somewhere else under your home directory.  Unless you
7146 feel that it's neat to use twice as much space.
7147
7148 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7149 regexp of groups to cache, @samp{^nntp} for instance, or set the
7150 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7151 Both variables are @code{nil} by default.  If a group matches both
7152 variables, the group is not cached.
7153
7154 @findex gnus-cache-generate-nov-databases
7155 @findex gnus-cache-generate-active
7156 @vindex gnus-cache-active-file
7157 The cache stores information on what articles it contains in its active
7158 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7159 of the cache) becomes all messed up for some reason or other, gnus
7160 offers two functions that will try to set things right.  @kbd{M-x
7161 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7162 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7163 file.
7164
7165 @findex gnus-cache-move-cache
7166 @code{gnus-cache-move-cache} will move your whole
7167 @code{gnus-cache-directory} to some other location.  You get asked to
7168 where, isn't that cool?
7169
7170 @node Persistent Articles
7171 @section Persistent Articles
7172 @cindex persistent articles
7173
7174 Closely related to article caching, we have @dfn{persistent articles}.
7175 In fact, it's just a different way of looking at caching, and much more
7176 useful in my opinion.
7177
7178 Say you're reading a newsgroup, and you happen on to some valuable gem
7179 that you want to keep and treasure forever.  You'd normally just save it
7180 (using one of the many saving commands) in some file.  The problem with
7181 that is that it's just, well, yucky.  Ideally you'd prefer just having
7182 the article remain in the group where you found it forever; untouched by
7183 the expiry going on at the news server.
7184
7185 This is what a @dfn{persistent article} is---an article that just won't
7186 be deleted.  It's implemented using the normal cache functions, but
7187 you use two explicit commands for managing persistent articles:
7188
7189 @table @kbd
7190
7191 @item *
7192 @kindex * (Summary)
7193 @findex gnus-cache-enter-article
7194 Make the current article persistent (@code{gnus-cache-enter-article}).
7195
7196 @item M-*
7197 @kindex M-* (Summary)
7198 @findex gnus-cache-remove-article
7199 Remove the current article from the persistent articles
7200 (@code{gnus-cache-remove-article}).  This will normally delete the
7201 article.
7202 @end table
7203
7204 Both these commands understand the process/prefix convention.
7205
7206 To avoid having all ticked articles (and stuff) entered into the cache,
7207 you should set @code{gnus-use-cache} to @code{passive} if you're just
7208 interested in persistent articles:
7209
7210 @lisp
7211 (setq gnus-use-cache 'passive)
7212 @end lisp
7213
7214
7215 @node Article Backlog
7216 @section Article Backlog
7217 @cindex backlog
7218 @cindex article backlog
7219
7220 If you have a slow connection, but the idea of using caching seems
7221 unappealing to you (and it is, really), you can help the situation some
7222 by switching on the @dfn{backlog}.  This is where gnus will buffer
7223 already read articles so that it doesn't have to re-fetch articles
7224 you've already read.  This only helps if you are in the habit of
7225 re-selecting articles you've recently read, of course.  If you never do
7226 that, turning the backlog on will slow gnus down a little bit, and
7227 increase memory usage some.
7228
7229 @vindex gnus-keep-backlog
7230 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7231 at most @var{n} old articles in a buffer for later re-fetching.  If this
7232 variable is non-@code{nil} and is not a number, gnus will store
7233 @emph{all} read articles, which means that your Emacs will grow without
7234 bound before exploding and taking your machine down with you.  I put
7235 that in there just to keep y'all on your toes.
7236
7237 The default value is 20.
7238
7239
7240 @node Saving Articles
7241 @section Saving Articles
7242 @cindex saving articles
7243
7244 Gnus can save articles in a number of ways.  Below is the documentation
7245 for saving articles in a fairly straight-forward fashion (i.e., little
7246 processing of the article is done before it is saved).  For a different
7247 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7248 (@pxref{Decoding Articles}).
7249
7250 For the commands listed here, the target is a file.  If you want to
7251 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7252 command (@pxref{Mail Group Commands}).
7253
7254 @vindex gnus-save-all-headers
7255 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7256 unwanted headers before saving the article.
7257
7258 @vindex gnus-saved-headers
7259 If the preceding variable is @code{nil}, all headers that match the
7260 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7261 deleted before saving.
7262
7263 @table @kbd
7264
7265 @item O o
7266 @itemx o
7267 @kindex O o (Summary)
7268 @kindex o (Summary)
7269 @findex gnus-summary-save-article
7270 @c @icon{gnus-summary-save-article}
7271 Save the current article using the default article saver
7272 (@code{gnus-summary-save-article}).
7273
7274 @item O m
7275 @kindex O m (Summary)
7276 @findex gnus-summary-save-article-mail
7277 Save the current article in mail format
7278 (@code{gnus-summary-save-article-mail}).
7279
7280 @item O r
7281 @kindex O r (Summary)
7282 @findex gnus-summary-save-article-rmail
7283 Save the current article in Rmail format
7284 (@code{gnus-summary-save-article-rmail}).
7285
7286 @item O f
7287 @kindex O f (Summary)
7288 @findex gnus-summary-save-article-file
7289 @c @icon{gnus-summary-save-article-file}
7290 Save the current article in plain file format
7291 (@code{gnus-summary-save-article-file}).
7292
7293 @item O F
7294 @kindex O F (Summary)
7295 @findex gnus-summary-write-article-file
7296 Write the current article in plain file format, overwriting any previous
7297 file contents (@code{gnus-summary-write-article-file}).
7298
7299 @item O b
7300 @kindex O b (Summary)
7301 @findex gnus-summary-save-article-body-file
7302 Save the current article body in plain file format
7303 (@code{gnus-summary-save-article-body-file}).
7304
7305 @item O h
7306 @kindex O h (Summary)
7307 @findex gnus-summary-save-article-folder
7308 Save the current article in mh folder format
7309 (@code{gnus-summary-save-article-folder}).
7310
7311 @item O v
7312 @kindex O v (Summary)
7313 @findex gnus-summary-save-article-vm
7314 Save the current article in a VM folder
7315 (@code{gnus-summary-save-article-vm}).
7316
7317 @item O p
7318 @itemx |
7319 @kindex O p (Summary)
7320 @kindex | (Summary)
7321 @findex gnus-summary-pipe-output
7322 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7323 the current article to a process (@code{gnus-summary-pipe-output}).
7324 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7325 complete headers in the piped output.
7326
7327 @item O P
7328 @kindex O P (Summary)
7329 @findex gnus-summary-muttprint
7330 @vindex gnus-summary-muttprint-program
7331 Save the current article into muttprint.  That is, print it using the
7332 external program @uref{http://muttprint.sourceforge.net/,
7333 Muttprint}.  The program name and options to use is controlled by the
7334 variable @code{gnus-summary-muttprint-program}.
7335 (@code{gnus-summary-muttprint}).
7336
7337 @end table
7338
7339 @vindex gnus-prompt-before-saving
7340 All these commands use the process/prefix convention
7341 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7342 functions, you might get tired of being prompted for files to save each
7343 and every article in.  The prompting action is controlled by
7344 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7345 default, giving you that excessive prompting action you know and
7346 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7347 just once for each series of articles you save.  If you like to really
7348 have Gnus do all your thinking for you, you can even set this variable
7349 to @code{nil}, which means that you will never be prompted for files to
7350 save articles in.  Gnus will simply save all the articles in the default
7351 files.
7352
7353
7354 @vindex gnus-default-article-saver
7355 You can customize the @code{gnus-default-article-saver} variable to make
7356 gnus do what you want it to.  You can use any of the six ready-made
7357 functions below, or you can create your own.
7358
7359 @table @code
7360
7361 @item gnus-summary-save-in-rmail
7362 @findex gnus-summary-save-in-rmail
7363 @vindex gnus-rmail-save-name
7364 @findex gnus-plain-save-name
7365 This is the default format, @dfn{Babyl}.  Uses the function in the
7366 @code{gnus-rmail-save-name} variable to get a file name to save the
7367 article in.  The default is @code{gnus-plain-save-name}.
7368
7369 @item gnus-summary-save-in-mail
7370 @findex gnus-summary-save-in-mail
7371 @vindex gnus-mail-save-name
7372 Save in a Unix mail (mbox) file.  Uses the function in the
7373 @code{gnus-mail-save-name} variable to get a file name to save the
7374 article in.  The default is @code{gnus-plain-save-name}.
7375
7376 @item gnus-summary-save-in-file
7377 @findex gnus-summary-save-in-file
7378 @vindex gnus-file-save-name
7379 @findex gnus-numeric-save-name
7380 Append the article straight to an ordinary file.  Uses the function in
7381 the @code{gnus-file-save-name} variable to get a file name to save the
7382 article in.  The default is @code{gnus-numeric-save-name}.
7383
7384 @item gnus-summary-write-to-file
7385 @findex gnus-summary-write-to-file
7386 Write the article straight to an ordinary file.  The file is
7387 overwritten if it exists.  Uses the function in the
7388 @code{gnus-file-save-name} variable to get a file name to save the
7389 article in.  The default is @code{gnus-numeric-save-name}.
7390
7391 @item gnus-summary-save-body-in-file
7392 @findex gnus-summary-save-body-in-file
7393 Append the article body to an ordinary file.  Uses the function in the
7394 @code{gnus-file-save-name} variable to get a file name to save the
7395 article in.  The default is @code{gnus-numeric-save-name}.
7396
7397 @item gnus-summary-save-in-folder
7398 @findex gnus-summary-save-in-folder
7399 @findex gnus-folder-save-name
7400 @findex gnus-Folder-save-name
7401 @vindex gnus-folder-save-name
7402 @cindex rcvstore
7403 @cindex MH folders
7404 Save the article to an MH folder using @code{rcvstore} from the MH
7405 library.  Uses the function in the @code{gnus-folder-save-name} variable
7406 to get a file name to save the article in.  The default is
7407 @code{gnus-folder-save-name}, but you can also use
7408 @code{gnus-Folder-save-name}, which creates capitalized names.
7409
7410 @item gnus-summary-save-in-vm
7411 @findex gnus-summary-save-in-vm
7412 Save the article in a VM folder.  You have to have the VM mail
7413 reader to use this setting.
7414 @end table
7415
7416 @vindex gnus-article-save-directory
7417 All of these functions, except for the last one, will save the article
7418 in the @code{gnus-article-save-directory}, which is initialized from the
7419 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7420 default.
7421
7422 As you can see above, the functions use different functions to find a
7423 suitable name of a file to save the article in.  Below is a list of
7424 available functions that generate names:
7425
7426 @table @code
7427
7428 @item gnus-Numeric-save-name
7429 @findex gnus-Numeric-save-name
7430 File names like @file{~/News/Alt.andrea-dworkin/45}.
7431
7432 @item gnus-numeric-save-name
7433 @findex gnus-numeric-save-name
7434 File names like @file{~/News/alt.andrea-dworkin/45}.
7435
7436 @item gnus-Plain-save-name
7437 @findex gnus-Plain-save-name
7438 File names like @file{~/News/Alt.andrea-dworkin}.
7439
7440 @item gnus-plain-save-name
7441 @findex gnus-plain-save-name
7442 File names like @file{~/News/alt.andrea-dworkin}.
7443
7444 @item gnus-sender-save-name
7445 @findex gnus-sender-save-name
7446 File names like @file{~/News/larsi}.
7447 @end table
7448
7449 @vindex gnus-split-methods
7450 You can have gnus suggest where to save articles by plonking a regexp into
7451 the @code{gnus-split-methods} alist.  For instance, if you would like to
7452 save articles related to gnus in the file @file{gnus-stuff}, and articles
7453 related to VM in @file{vm-stuff}, you could set this variable to something
7454 like:
7455
7456 @lisp
7457 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7458  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7459  (my-choosing-function "../other-dir/my-stuff")
7460  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7461 @end lisp
7462
7463 We see that this is a list where each element is a list that has two
7464 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7465 a string (in which case it is used as a regexp to match on the article
7466 head); it can be a symbol (which will be called as a function with the
7467 group name as a parameter); or it can be a list (which will be
7468 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7469 the @dfn{file} will be used as a default prompt.  In addition, the
7470 result of the operation itself will be used if the function or form
7471 called returns a string or a list of strings.
7472
7473 You basically end up with a list of file names that might be used when
7474 saving the current article.  (All ``matches'' will be used.)  You will
7475 then be prompted for what you really want to use as a name, with file
7476 name completion over the results from applying this variable.
7477
7478 This variable is @code{((gnus-article-archive-name))} by default, which
7479 means that gnus will look at the articles it saves for an
7480 @code{Archive-name} line and use that as a suggestion for the file
7481 name.
7482
7483 Here's an example function to clean up file names somewhat.  If you have
7484 lots of mail groups called things like
7485 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7486 these group names before creating the file name to save to.  The
7487 following will do just that:
7488
7489 @lisp
7490 (defun my-save-name (group)
7491   (when (string-match "^nnml:mail." group)
7492     (substring group (match-end 0))))
7493
7494 (setq gnus-split-methods
7495       '((gnus-article-archive-name)
7496         (my-save-name)))
7497 @end lisp
7498
7499
7500 @vindex gnus-use-long-file-name
7501 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7502 @code{nil}, all the preceding functions will replace all periods
7503 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7504 the functions will generate hierarchies of directories instead of having
7505 all the files in the top level directory
7506 (@file{~/News/alt/andrea-dworkin} instead of
7507 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7508 on most systems.  However, for historical reasons, this is @code{nil} on
7509 Xenix and usg-unix-v machines by default.
7510
7511 This function also affects kill and score file names.  If this variable
7512 is a list, and the list contains the element @code{not-score}, long file
7513 names will not be used for score files, if it contains the element
7514 @code{not-save}, long file names will not be used for saving, and if it
7515 contains the element @code{not-kill}, long file names will not be used
7516 for kill files.
7517
7518 If you'd like to save articles in a hierarchy that looks something like
7519 a spool, you could
7520
7521 @lisp
7522 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7523 (setq gnus-default-article-saver
7524       'gnus-summary-save-in-file)          ; @r{no encoding}
7525 @end lisp
7526
7527 Then just save with @kbd{o}.  You'd then read this hierarchy with
7528 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7529 the top level directory as the argument (@file{~/News/}).  Then just walk
7530 around to the groups/directories with @code{nneething}.
7531
7532
7533 @node Decoding Articles
7534 @section Decoding Articles
7535 @cindex decoding articles
7536
7537 Sometime users post articles (or series of articles) that have been
7538 encoded in some way or other.  Gnus can decode them for you.
7539
7540 @menu
7541 * Uuencoded Articles::          Uudecode articles.
7542 * Shell Archives::              Unshar articles.
7543 * PostScript Files::            Split PostScript.
7544 * Other Files::                 Plain save and binhex.
7545 * Decoding Variables::          Variables for a happy decoding.
7546 * Viewing Files::               You want to look at the result of the decoding?
7547 @end menu
7548
7549 @cindex series
7550 @cindex article series
7551 All these functions use the process/prefix convention
7552 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7553 the extension that a ``single article'' means ``a single series''.  Gnus
7554 can find out by itself what articles belong to a series, decode all the
7555 articles and unpack/view/save the resulting file(s).
7556
7557 Gnus guesses what articles are in the series according to the following
7558 simplish rule: The subjects must be (nearly) identical, except for the
7559 last two numbers of the line.  (Spaces are largely ignored, however.)
7560
7561 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7562 will find all the articles that match the regexp @samp{^cat.gif
7563 ([0-9]+/[0-9]+).*$}.
7564
7565 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7566 series}, will not be properly recognized by any of the automatic viewing
7567 commands, and you have to mark the articles manually with @kbd{#}.
7568
7569
7570 @node Uuencoded Articles
7571 @subsection Uuencoded Articles
7572 @cindex uudecode
7573 @cindex uuencoded articles
7574
7575 @table @kbd
7576
7577 @item X u
7578 @kindex X u (Summary)
7579 @findex gnus-uu-decode-uu
7580 @c @icon{gnus-uu-decode-uu}
7581 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7582
7583 @item X U
7584 @kindex X U (Summary)
7585 @findex gnus-uu-decode-uu-and-save
7586 Uudecodes and saves the current series
7587 (@code{gnus-uu-decode-uu-and-save}).
7588
7589 @item X v u
7590 @kindex X v u (Summary)
7591 @findex gnus-uu-decode-uu-view
7592 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7593
7594 @item X v U
7595 @kindex X v U (Summary)
7596 @findex gnus-uu-decode-uu-and-save-view
7597 Uudecodes, views and saves the current series
7598 (@code{gnus-uu-decode-uu-and-save-view}).
7599
7600 @end table
7601
7602 Remember that these all react to the presence of articles marked with
7603 the process mark.  If, for instance, you'd like to decode and save an
7604 entire newsgroup, you'd typically do @kbd{M P a}
7605 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7606 (@code{gnus-uu-decode-uu-and-save}).
7607
7608 All this is very much different from how @code{gnus-uu} worked with
7609 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7610 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7611 articles in some way (@pxref{Setting Process Marks}) and then press
7612 @kbd{X u}.
7613
7614 @vindex gnus-uu-notify-files
7615 Note: When trying to decode articles that have names matching
7616 @code{gnus-uu-notify-files}, which is hard-coded to
7617 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7618 automatically post an article on @samp{comp.unix.wizards} saying that
7619 you have just viewed the file in question.  This feature can't be turned
7620 off.
7621
7622
7623 @node Shell Archives
7624 @subsection Shell Archives
7625 @cindex unshar
7626 @cindex shell archives
7627 @cindex shared articles
7628
7629 Shell archives (``shar files'') used to be a popular way to distribute
7630 sources, but it isn't used all that much today.  In any case, we have
7631 some commands to deal with these:
7632
7633 @table @kbd
7634
7635 @item X s
7636 @kindex X s (Summary)
7637 @findex gnus-uu-decode-unshar
7638 Unshars the current series (@code{gnus-uu-decode-unshar}).
7639
7640 @item X S
7641 @kindex X S (Summary)
7642 @findex gnus-uu-decode-unshar-and-save
7643 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7644
7645 @item X v s
7646 @kindex X v s (Summary)
7647 @findex gnus-uu-decode-unshar-view
7648 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7649
7650 @item X v S
7651 @kindex X v S (Summary)
7652 @findex gnus-uu-decode-unshar-and-save-view
7653 Unshars, views and saves the current series
7654 (@code{gnus-uu-decode-unshar-and-save-view}).
7655 @end table
7656
7657
7658 @node PostScript Files
7659 @subsection PostScript Files
7660 @cindex PostScript
7661
7662 @table @kbd
7663
7664 @item X p
7665 @kindex X p (Summary)
7666 @findex gnus-uu-decode-postscript
7667 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7668
7669 @item X P
7670 @kindex X P (Summary)
7671 @findex gnus-uu-decode-postscript-and-save
7672 Unpack and save the current PostScript series
7673 (@code{gnus-uu-decode-postscript-and-save}).
7674
7675 @item X v p
7676 @kindex X v p (Summary)
7677 @findex gnus-uu-decode-postscript-view
7678 View the current PostScript series
7679 (@code{gnus-uu-decode-postscript-view}).
7680
7681 @item X v P
7682 @kindex X v P (Summary)
7683 @findex gnus-uu-decode-postscript-and-save-view
7684 View and save the current PostScript series
7685 (@code{gnus-uu-decode-postscript-and-save-view}).
7686 @end table
7687
7688
7689 @node Other Files
7690 @subsection Other Files
7691
7692 @table @kbd
7693 @item X o
7694 @kindex X o (Summary)
7695 @findex gnus-uu-decode-save
7696 Save the current series
7697 (@code{gnus-uu-decode-save}).
7698
7699 @item X b
7700 @kindex X b (Summary)
7701 @findex gnus-uu-decode-binhex
7702 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7703 doesn't really work yet.
7704 @end table
7705
7706
7707 @node Decoding Variables
7708 @subsection Decoding Variables
7709
7710 Adjective, not verb.
7711
7712 @menu
7713 * Rule Variables::              Variables that say how a file is to be viewed.
7714 * Other Decode Variables::      Other decode variables.
7715 * Uuencoding and Posting::      Variables for customizing uuencoding.
7716 @end menu
7717
7718
7719 @node Rule Variables
7720 @subsubsection Rule Variables
7721 @cindex rule variables
7722
7723 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7724 variables are of the form
7725
7726 @lisp
7727       (list '(regexp1 command2)
7728             '(regexp2 command2)
7729             ...)
7730 @end lisp
7731
7732 @table @code
7733
7734 @item gnus-uu-user-view-rules
7735 @vindex gnus-uu-user-view-rules
7736 @cindex sox
7737 This variable is consulted first when viewing files.  If you wish to use,
7738 for instance, @code{sox} to convert an @file{.au} sound file, you could
7739 say something like:
7740 @lisp
7741 (setq gnus-uu-user-view-rules
7742       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7743 @end lisp
7744
7745 @item gnus-uu-user-view-rules-end
7746 @vindex gnus-uu-user-view-rules-end
7747 This variable is consulted if gnus couldn't make any matches from the
7748 user and default view rules.
7749
7750 @item gnus-uu-user-archive-rules
7751 @vindex gnus-uu-user-archive-rules
7752 This variable can be used to say what commands should be used to unpack
7753 archives.
7754 @end table
7755
7756
7757 @node Other Decode Variables
7758 @subsubsection Other Decode Variables
7759
7760 @table @code
7761 @vindex gnus-uu-grabbed-file-functions
7762
7763 @item gnus-uu-grabbed-file-functions
7764 All functions in this list will be called right after each file has been
7765 successfully decoded---so that you can move or view files right away,
7766 and don't have to wait for all files to be decoded before you can do
7767 anything.  Ready-made functions you can put in this list are:
7768
7769 @table @code
7770
7771 @item gnus-uu-grab-view
7772 @findex gnus-uu-grab-view
7773 View the file.
7774
7775 @item gnus-uu-grab-move
7776 @findex gnus-uu-grab-move
7777 Move the file (if you're using a saving function.)
7778 @end table
7779
7780 @item gnus-uu-be-dangerous
7781 @vindex gnus-uu-be-dangerous
7782 Specifies what to do if unusual situations arise during decoding.  If
7783 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7784 that didn't work, and overwrite existing files.  Otherwise, ask each
7785 time.
7786
7787 @item gnus-uu-ignore-files-by-name
7788 @vindex gnus-uu-ignore-files-by-name
7789 Files with name matching this regular expression won't be viewed.
7790
7791 @item gnus-uu-ignore-files-by-type
7792 @vindex gnus-uu-ignore-files-by-type
7793 Files with a @acronym{MIME} type matching this variable won't be viewed.
7794 Note that Gnus tries to guess what type the file is based on the name.
7795 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7796 kludgey.
7797
7798 @item gnus-uu-tmp-dir
7799 @vindex gnus-uu-tmp-dir
7800 Where @code{gnus-uu} does its work.
7801
7802 @item gnus-uu-do-not-unpack-archives
7803 @vindex gnus-uu-do-not-unpack-archives
7804 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7805 looking for files to display.
7806
7807 @item gnus-uu-view-and-save
7808 @vindex gnus-uu-view-and-save
7809 Non-@code{nil} means that the user will always be asked to save a file
7810 after viewing it.
7811
7812 @item gnus-uu-ignore-default-view-rules
7813 @vindex gnus-uu-ignore-default-view-rules
7814 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7815 rules.
7816
7817 @item gnus-uu-ignore-default-archive-rules
7818 @vindex gnus-uu-ignore-default-archive-rules
7819 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7820 unpacking commands.
7821
7822 @item gnus-uu-kill-carriage-return
7823 @vindex gnus-uu-kill-carriage-return
7824 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7825 from articles.
7826
7827 @item gnus-uu-unmark-articles-not-decoded
7828 @vindex gnus-uu-unmark-articles-not-decoded
7829 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7830 decoded articles as unread.
7831
7832 @item gnus-uu-correct-stripped-uucode
7833 @vindex gnus-uu-correct-stripped-uucode
7834 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7835 uuencoded files that have had trailing spaces deleted.
7836
7837 @item gnus-uu-pre-uudecode-hook
7838 @vindex gnus-uu-pre-uudecode-hook
7839 Hook run before sending a message to @code{uudecode}.
7840
7841 @item gnus-uu-view-with-metamail
7842 @vindex gnus-uu-view-with-metamail
7843 @cindex metamail
7844 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7845 commands defined by the rule variables and just fudge a @acronym{MIME}
7846 content type based on the file name.  The result will be fed to
7847 @code{metamail} for viewing.
7848
7849 @item gnus-uu-save-in-digest
7850 @vindex gnus-uu-save-in-digest
7851 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7852 decoding, will save in digests.  If this variable is @code{nil},
7853 @code{gnus-uu} will just save everything in a file without any
7854 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7855 to specify any meaningful volume and issue numbers were found, so I
7856 simply dropped them.
7857
7858 @end table
7859
7860
7861 @node Uuencoding and Posting
7862 @subsubsection Uuencoding and Posting
7863
7864 @table @code
7865
7866 @item gnus-uu-post-include-before-composing
7867 @vindex gnus-uu-post-include-before-composing
7868 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7869 before you compose the article.  If this variable is @code{t}, you can
7870 either include an encoded file with @kbd{C-c C-i} or have one included
7871 for you when you post the article.
7872
7873 @item gnus-uu-post-length
7874 @vindex gnus-uu-post-length
7875 Maximum length of an article.  The encoded file will be split into how
7876 many articles it takes to post the entire file.
7877
7878 @item gnus-uu-post-threaded
7879 @vindex gnus-uu-post-threaded
7880 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7881 thread.  This may not be smart, as no other decoder I have seen is able
7882 to follow threads when collecting uuencoded articles.  (Well, I have
7883 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7884 think that counts@dots{}) Default is @code{nil}.
7885
7886 @item gnus-uu-post-separate-description
7887 @vindex gnus-uu-post-separate-description
7888 Non-@code{nil} means that the description will be posted in a separate
7889 article.  The first article will typically be numbered (0/x).  If this
7890 variable is @code{nil}, the description the user enters will be included
7891 at the beginning of the first article, which will be numbered (1/x).
7892 Default is @code{t}.
7893
7894 @end table
7895
7896
7897 @node Viewing Files
7898 @subsection Viewing Files
7899 @cindex viewing files
7900 @cindex pseudo-articles
7901
7902 After decoding, if the file is some sort of archive, gnus will attempt
7903 to unpack the archive and see if any of the files in the archive can be
7904 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7905 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7906 uncompress and de-tar the main file, and then view the two pictures.
7907 This unpacking process is recursive, so if the archive contains archives
7908 of archives, it'll all be unpacked.
7909
7910 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7911 extracted file into the summary buffer.  If you go to these
7912 ``articles'', you will be prompted for a command to run (usually Gnus
7913 will make a suggestion), and then the command will be run.
7914
7915 @vindex gnus-view-pseudo-asynchronously
7916 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7917 until the viewing is done before proceeding.
7918
7919 @vindex gnus-view-pseudos
7920 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7921 the pseudo-articles into the summary buffer, but view them
7922 immediately.  If this variable is @code{not-confirm}, the user won't even
7923 be asked for a confirmation before viewing is done.
7924
7925 @vindex gnus-view-pseudos-separately
7926 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7927 pseudo-article will be created for each file to be viewed.  If
7928 @code{nil}, all files that use the same viewing command will be given as
7929 a list of parameters to that command.
7930
7931 @vindex gnus-insert-pseudo-articles
7932 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7933 pseudo-articles when decoding.  It is @code{t} by default.
7934
7935 So; there you are, reading your @emph{pseudo-articles} in your
7936 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7937 Why isn't anything real anymore? How did we get here?
7938
7939
7940 @node Article Treatment
7941 @section Article Treatment
7942
7943 Reading through this huge manual, you may have quite forgotten that the
7944 object of newsreaders is to actually, like, read what people have
7945 written.  Reading articles.  Unfortunately, people are quite bad at
7946 writing, so there are tons of functions and variables to make reading
7947 these articles easier.
7948
7949 @menu
7950 * Article Highlighting::        You want to make the article look like fruit salad.
7951 * Article Fontisizing::         Making emphasized text look nice.
7952 * Article Hiding::              You also want to make certain info go away.
7953 * Article Washing::             Lots of way-neat functions to make life better.
7954 * Article Header::              Doing various header transformations.
7955 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7956 * Article Button Levels::       Controlling appearance of buttons.
7957 * Article Date::                Grumble, UT!
7958 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7959 * Article Signature::           What is a signature?
7960 * Article Miscellanea::         Various other stuff.
7961 @end menu
7962
7963
7964 @node Article Highlighting
7965 @subsection Article Highlighting
7966 @cindex highlighting
7967
7968 Not only do you want your article buffer to look like fruit salad, but
7969 you want it to look like technicolor fruit salad.
7970
7971 @table @kbd
7972
7973 @item W H a
7974 @kindex W H a (Summary)
7975 @findex gnus-article-highlight
7976 @findex gnus-article-maybe-highlight
7977 Do much highlighting of the current article
7978 (@code{gnus-article-highlight}).  This function highlights header, cited
7979 text, the signature, and adds buttons to the body and the head.
7980
7981 @item W H h
7982 @kindex W H h (Summary)
7983 @findex gnus-article-highlight-headers
7984 @vindex gnus-header-face-alist
7985 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7986 highlighting will be done according to the @code{gnus-header-face-alist}
7987 variable, which is a list where each element has the form
7988 @code{(@var{regexp} @var{name} @var{content})}.
7989 @var{regexp} is a regular expression for matching the
7990 header, @var{name} is the face used for highlighting the header name
7991 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7992 the header value.  The first match made will be used.  Note that
7993 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7994
7995 @item W H c
7996 @kindex W H c (Summary)
7997 @findex gnus-article-highlight-citation
7998 Highlight cited text (@code{gnus-article-highlight-citation}).
7999
8000 Some variables to customize the citation highlights:
8001
8002 @table @code
8003 @vindex gnus-cite-parse-max-size
8004
8005 @item gnus-cite-parse-max-size
8006 If the article size if bigger than this variable (which is 25000 by
8007 default), no citation highlighting will be performed.
8008
8009 @item gnus-cite-max-prefix
8010 @vindex gnus-cite-max-prefix
8011 Maximum possible length for a citation prefix (default 20).
8012
8013 @item gnus-cite-face-list
8014 @vindex gnus-cite-face-list
8015 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8016 When there are citations from multiple articles in the same message,
8017 gnus will try to give each citation from each article its own face.
8018 This should make it easier to see who wrote what.
8019
8020 @item gnus-supercite-regexp
8021 @vindex gnus-supercite-regexp
8022 Regexp matching normal Supercite attribution lines.
8023
8024 @item gnus-supercite-secondary-regexp
8025 @vindex gnus-supercite-secondary-regexp
8026 Regexp matching mangled Supercite attribution lines.
8027
8028 @item gnus-cite-minimum-match-count
8029 @vindex gnus-cite-minimum-match-count
8030 Minimum number of identical prefixes we have to see before we believe
8031 that it's a citation.
8032
8033 @item gnus-cite-attribution-prefix
8034 @vindex gnus-cite-attribution-prefix
8035 Regexp matching the beginning of an attribution line.
8036
8037 @item gnus-cite-attribution-suffix
8038 @vindex gnus-cite-attribution-suffix
8039 Regexp matching the end of an attribution line.
8040
8041 @item gnus-cite-attribution-face
8042 @vindex gnus-cite-attribution-face
8043 Face used for attribution lines.  It is merged with the face for the
8044 cited text belonging to the attribution.
8045
8046 @end table
8047
8048
8049 @item W H s
8050 @kindex W H s (Summary)
8051 @vindex gnus-signature-separator
8052 @vindex gnus-signature-face
8053 @findex gnus-article-highlight-signature
8054 Highlight the signature (@code{gnus-article-highlight-signature}).
8055 Everything after @code{gnus-signature-separator} (@pxref{Article
8056 Signature}) in an article will be considered a signature and will be
8057 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8058 default.
8059
8060 @end table
8061
8062 @xref{Customizing Articles}, for how to highlight articles automatically.
8063
8064
8065 @node Article Fontisizing
8066 @subsection Article Fontisizing
8067 @cindex emphasis
8068 @cindex article emphasis
8069
8070 @findex gnus-article-emphasize
8071 @kindex W e (Summary)
8072 People commonly add emphasis to words in news articles by writing things
8073 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8074 this look nicer by running the article through the @kbd{W e}
8075 (@code{gnus-article-emphasize}) command.
8076
8077 @vindex gnus-emphasis-alist
8078 How the emphasis is computed is controlled by the
8079 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8080 element is a regular expression to be matched.  The second is a number
8081 that says what regular expression grouping is used to find the entire
8082 emphasized word.  The third is a number that says what regexp grouping
8083 should be displayed and highlighted.  (The text between these two
8084 groupings will be hidden.)  The fourth is the face used for
8085 highlighting.
8086
8087 @lisp
8088 (setq gnus-emphasis-alist
8089       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8090         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8091 @end lisp
8092
8093 @cindex slash
8094 @cindex asterisk
8095 @cindex underline
8096 @cindex /
8097 @cindex *
8098
8099 @vindex gnus-emphasis-underline
8100 @vindex gnus-emphasis-bold
8101 @vindex gnus-emphasis-italic
8102 @vindex gnus-emphasis-underline-bold
8103 @vindex gnus-emphasis-underline-italic
8104 @vindex gnus-emphasis-bold-italic
8105 @vindex gnus-emphasis-underline-bold-italic
8106 By default, there are seven rules, and they use the following faces:
8107 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8108 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8109 @code{gnus-emphasis-underline-italic},
8110 @code{gnus-emphasis-underline-bold}, and
8111 @code{gnus-emphasis-underline-bold-italic}.
8112
8113 If you want to change these faces, you can either use @kbd{M-x
8114 customize}, or you can use @code{copy-face}.  For instance, if you want
8115 to make @code{gnus-emphasis-italic} use a red face instead, you could
8116 say something like:
8117
8118 @lisp
8119 (copy-face 'red 'gnus-emphasis-italic)
8120 @end lisp
8121
8122 @vindex gnus-group-highlight-words-alist
8123
8124 If you want to highlight arbitrary words, you can use the
8125 @code{gnus-group-highlight-words-alist} variable, which uses the same
8126 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8127 parameter (@pxref{Group Parameters}) can also be used.
8128
8129 @xref{Customizing Articles}, for how to fontize articles automatically.
8130
8131
8132 @node Article Hiding
8133 @subsection Article Hiding
8134 @cindex article hiding
8135
8136 Or rather, hiding certain things in each article.  There usually is much
8137 too much cruft in most articles.
8138
8139 @table @kbd
8140
8141 @item W W a
8142 @kindex W W a (Summary)
8143 @findex gnus-article-hide
8144 Do quite a lot of hiding on the article buffer
8145 (@kbd{gnus-article-hide}).  In particular, this function will hide
8146 headers, @acronym{PGP}, cited text and the signature.
8147
8148 @item W W h
8149 @kindex W W h (Summary)
8150 @findex gnus-article-hide-headers
8151 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8152 Headers}.
8153
8154 @item W W b
8155 @kindex W W b (Summary)
8156 @findex gnus-article-hide-boring-headers
8157 Hide headers that aren't particularly interesting
8158 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8159
8160 @item W W s
8161 @kindex W W s (Summary)
8162 @findex gnus-article-hide-signature
8163 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8164 Signature}.
8165
8166 @item W W l
8167 @kindex W W l (Summary)
8168 @findex gnus-article-hide-list-identifiers
8169 @vindex gnus-list-identifiers
8170 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8171 are strings some mailing list servers add to the beginning of all
8172 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8173 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8174 may not contain @code{\\(..\\)}.
8175
8176 @table @code
8177
8178 @item gnus-list-identifiers
8179 @vindex gnus-list-identifiers
8180 A regular expression that matches list identifiers to be removed from
8181 subject.  This can also be a list of regular expressions.
8182
8183 @end table
8184
8185 @item W W P
8186 @kindex W W P (Summary)
8187 @findex gnus-article-hide-pem
8188 Hide @acronym{PEM} (privacy enhanced messages) cruft
8189 (@code{gnus-article-hide-pem}).
8190
8191 @item W W B
8192 @kindex W W B (Summary)
8193 @findex gnus-article-strip-banner
8194 @vindex gnus-article-banner-alist
8195 @vindex gnus-article-address-banner-alist
8196 @cindex banner
8197 @cindex OneList
8198 @cindex stripping advertisements
8199 @cindex advertisements
8200 Strip the banner specified by the @code{banner} group parameter
8201 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8202 annoying banners and/or signatures that some mailing lists and moderated
8203 groups adds to all the messages.  The way to use this function is to add
8204 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8205 group you want banners stripped from.  The parameter either be a string,
8206 which will be interpreted as a regular expression matching text to be
8207 removed, or the symbol @code{signature}, meaning that the (last)
8208 signature should be removed, or other symbol, meaning that the
8209 corresponding regular expression in @code{gnus-article-banner-alist} is
8210 used.
8211
8212 Regardless of a group, you can hide things like advertisements only when
8213 the sender of an article has a certain mail address specified in
8214 @code{gnus-article-address-banner-alist}.
8215
8216 @table @code
8217
8218 @item gnus-article-address-banner-alist
8219 @vindex gnus-article-address-banner-alist
8220 Alist of mail addresses and banners.  Each element has the form
8221 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8222 matching a mail address in the From header, @var{banner} is one of a
8223 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8224 a regexp and @code{nil}.  If @var{address} matches author's mail
8225 address, it will remove things like advertisements.  For example, if a
8226 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8227 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8228 sends, you can use the following element to remove them:
8229
8230 @lisp
8231 ("@@yoo-hoo\\.co\\.jp\\'" .
8232  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8233 @end lisp
8234
8235 @end table
8236
8237 @item W W c
8238 @kindex W W c (Summary)
8239 @findex gnus-article-hide-citation
8240 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8241 customizing the hiding:
8242
8243 @table @code
8244
8245 @item gnus-cited-opened-text-button-line-format
8246 @itemx gnus-cited-closed-text-button-line-format
8247 @vindex gnus-cited-closed-text-button-line-format
8248 @vindex gnus-cited-opened-text-button-line-format
8249 Gnus adds buttons to show where the cited text has been hidden, and to
8250 allow toggle hiding the text.  The format of the variable is specified
8251 by these format-like variable (@pxref{Formatting Variables}).  These
8252 specs are valid:
8253
8254 @table @samp
8255 @item b
8256 Starting point of the hidden text.
8257 @item e
8258 Ending point of the hidden text.
8259 @item l
8260 Number of characters in the hidden region.
8261 @item n
8262 Number of lines of hidden text.
8263 @end table
8264
8265 @item gnus-cited-lines-visible
8266 @vindex gnus-cited-lines-visible
8267 The number of lines at the beginning of the cited text to leave
8268 shown.  This can also be a cons cell with the number of lines at the top
8269 and bottom of the text, respectively, to remain visible.
8270
8271 @end table
8272
8273 @item W W C-c
8274 @kindex W W C-c (Summary)
8275 @findex gnus-article-hide-citation-maybe
8276
8277 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8278 following two variables:
8279
8280 @table @code
8281 @item gnus-cite-hide-percentage
8282 @vindex gnus-cite-hide-percentage
8283 If the cited text is of a bigger percentage than this variable (default
8284 50), hide the cited text.
8285
8286 @item gnus-cite-hide-absolute
8287 @vindex gnus-cite-hide-absolute
8288 The cited text must have at least this length (default 10) before it
8289 is hidden.
8290 @end table
8291
8292 @item W W C
8293 @kindex W W C (Summary)
8294 @findex gnus-article-hide-citation-in-followups
8295 Hide cited text in articles that aren't roots
8296 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8297 useful as an interactive command, but might be a handy function to stick
8298 have happen automatically (@pxref{Customizing Articles}).
8299
8300 @end table
8301
8302 All these ``hiding'' commands are toggles, but if you give a negative
8303 prefix to these commands, they will show what they have previously
8304 hidden.  If you give a positive prefix, they will always hide.
8305
8306 Also @pxref{Article Highlighting} for further variables for
8307 citation customization.
8308
8309 @xref{Customizing Articles}, for how to hide article elements
8310 automatically.
8311
8312
8313 @node Article Washing
8314 @subsection Article Washing
8315 @cindex washing
8316 @cindex article washing
8317
8318 We call this ``article washing'' for a really good reason.  Namely, the
8319 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8320
8321 @dfn{Washing} is defined by us as ``changing something from something to
8322 something else'', but normally results in something looking better.
8323 Cleaner, perhaps.
8324
8325 @xref{Customizing Articles}, if you want to change how Gnus displays
8326 articles by default.
8327
8328 @table @kbd
8329
8330 @item C-u g
8331 This is not really washing, it's sort of the opposite of washing.  If
8332 you type this, you see the article exactly as it exists on disk or on
8333 the server.
8334
8335 @item g
8336 Force redisplaying of the current article
8337 (@code{gnus-summary-show-article}).  This is also not really washing.
8338 If you type this, you see the article without any previously applied
8339 interactive Washing functions but with all default treatments
8340 (@pxref{Customizing Articles}).
8341
8342 @item W l
8343 @kindex W l (Summary)
8344 @findex gnus-summary-stop-page-breaking
8345 Remove page breaks from the current article
8346 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8347 delimiters.
8348
8349 @item W r
8350 @kindex W r (Summary)
8351 @findex gnus-summary-caesar-message
8352 @c @icon{gnus-summary-caesar-message}
8353 Do a Caesar rotate (rot13) on the article buffer
8354 (@code{gnus-summary-caesar-message}).
8355 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8356 (Typically offensive jokes and such.)
8357
8358 It's commonly called ``rot13'' because each letter is rotated 13
8359 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8360 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8361 is rumored to have employed this form of, uh, somewhat weak encryption.
8362
8363 @item W m
8364 @kindex W m (Summary)
8365 @findex gnus-summary-morse-message
8366 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8367
8368 @item W t
8369 @item t
8370 @kindex W t (Summary)
8371 @kindex t (Summary)
8372 @findex gnus-summary-toggle-header
8373 Toggle whether to display all headers in the article buffer
8374 (@code{gnus-summary-toggle-header}).
8375
8376 @item W v
8377 @kindex W v (Summary)
8378 @findex gnus-summary-verbose-headers
8379 Toggle whether to display all headers in the article buffer permanently
8380 (@code{gnus-summary-verbose-headers}).
8381
8382 @item W m
8383 @kindex W m (Summary)
8384 @findex gnus-summary-toggle-mime
8385 Toggle whether to run the article through @acronym{MIME} before
8386 displaying (@code{gnus-summary-toggle-mime}).
8387
8388 @item W o
8389 @kindex W o (Summary)
8390 @findex gnus-article-treat-overstrike
8391 Treat overstrike (@code{gnus-article-treat-overstrike}).
8392
8393 @item W d
8394 @kindex W d (Summary)
8395 @findex gnus-article-treat-dumbquotes
8396 @vindex gnus-article-dumbquotes-map
8397 @cindex Smartquotes
8398 @cindex M****s*** sm*rtq**t*s
8399 @cindex Latin 1
8400 Treat M****s*** sm*rtq**t*s according to
8401 @code{gnus-article-dumbquotes-map}
8402 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8403 whether a character is a sm*rtq**t* or not, so it should only be used
8404 interactively.
8405
8406 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8407 an attempt to provide more quoting characters.  If you see something
8408 like @code{\222} or @code{\264} where you're expecting some kind of
8409 apostrophe or quotation mark, then try this wash.
8410
8411 @item W Y f
8412 @kindex W Y f (Summary)
8413 @findex gnus-article-outlook-deuglify-article
8414 @cindex Outlook Express
8415 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8416 unwrap lines, repair attribution and rearrange citation.
8417 (@code{gnus-article-outlook-deuglify-article}).
8418
8419 @item W Y u
8420 @kindex W Y u (Summary)
8421 @findex gnus-article-outlook-unwrap-lines
8422 @vindex gnus-outlook-deuglify-unwrap-min
8423 @vindex gnus-outlook-deuglify-unwrap-max
8424 Unwrap lines that appear to be wrapped citation lines.  You can control
8425 what lines will be unwrapped by frobbing
8426 @code{gnus-outlook-deuglify-unwrap-min} and
8427 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8428 maximum length of an unwrapped citation line.
8429 (@code{gnus-article-outlook-unwrap-lines}).
8430
8431 @item W Y a
8432 @kindex W Y a (Summary)
8433 @findex gnus-article-outlook-repair-attribution
8434 Repair a broken attribution line.@*
8435 (@code{gnus-article-outlook-repair-attribution}).
8436
8437 @item W Y c
8438 @kindex W Y c (Summary)
8439 @findex gnus-article-outlook-rearrange-citation
8440 Repair broken citations by rearranging the text.
8441 (@code{gnus-article-outlook-rearrange-citation}).
8442
8443 @item W w
8444 @kindex W w (Summary)
8445 @findex gnus-article-fill-cited-article
8446 Do word wrap (@code{gnus-article-fill-cited-article}).
8447
8448 You can give the command a numerical prefix to specify the width to use
8449 when filling.
8450
8451 @item W Q
8452 @kindex W Q (Summary)
8453 @findex gnus-article-fill-long-lines
8454 Fill long lines (@code{gnus-article-fill-long-lines}).
8455
8456 @item W C
8457 @kindex W C (Summary)
8458 @findex gnus-article-capitalize-sentences
8459 Capitalize the first word in each sentence
8460 (@code{gnus-article-capitalize-sentences}).
8461
8462 @item W c
8463 @kindex W c (Summary)
8464 @findex gnus-article-remove-cr
8465 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8466 (this takes care of DOS line endings), and then translate any remaining
8467 CRs into LF (this takes care of Mac line endings)
8468 (@code{gnus-article-remove-cr}).
8469
8470 @kindex W q (Summary)
8471 @findex gnus-article-de-quoted-unreadable
8472 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8473 Quoted-Printable is one common @acronym{MIME} encoding employed when
8474 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8475 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8476 doesn't look very readable to me.  Note that this is usually done
8477 automatically by Gnus if the message in question has a
8478 @code{Content-Transfer-Encoding} header that says that this encoding
8479 has been done.  If a prefix is given, a charset will be asked for.
8480
8481 @item W 6
8482 @kindex W 6 (Summary)
8483 @findex gnus-article-de-base64-unreadable
8484 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8485 one common @acronym{MIME} encoding employed when sending
8486 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8487 usually done automatically by Gnus if the message in question has a
8488 @code{Content-Transfer-Encoding} header that says that this encoding
8489 has been done.  If a prefix is given, a charset will be asked for.
8490
8491 @item W Z
8492 @kindex W Z (Summary)
8493 @findex gnus-article-decode-HZ
8494 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8495 common encoding employed when sending Chinese articles.  It typically
8496 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8497
8498 @item W u
8499 @kindex W u (Summary)
8500 @findex gnus-article-unsplit-urls
8501 Remove newlines from within URLs.  Some mailers insert newlines into
8502 outgoing email messages to keep lines short.  This reformatting can
8503 split long URLs onto multiple lines.  Repair those URLs by removing
8504 the newlines (@code{gnus-article-unsplit-urls}).
8505
8506 @item W h
8507 @kindex W h (Summary)
8508 @findex gnus-article-wash-html
8509 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8510 usually done automatically by Gnus if the message in question has a
8511 @code{Content-Type} header that says that the message is @acronym{HTML}.
8512
8513 If a prefix is given, a charset will be asked for.
8514
8515 @vindex gnus-article-wash-function
8516 The default is to use the function specified by
8517 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8518 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8519 @acronym{HTML}, but this is controlled by the
8520 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8521 can use include:
8522
8523 @table @code
8524 @item w3
8525 Use Emacs/w3.
8526
8527 @item w3m
8528 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8529
8530 @item links
8531 Use @uref{http://links.sf.net/, Links}.
8532
8533 @item lynx
8534 Use @uref{http://lynx.isc.org/, Lynx}.
8535
8536 @item html2text
8537 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8538
8539 @end table
8540
8541 @item W b
8542 @kindex W b (Summary)
8543 @findex gnus-article-add-buttons
8544 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8545 @xref{Article Buttons}.
8546
8547 @item W B
8548 @kindex W B (Summary)
8549 @findex gnus-article-add-buttons-to-head
8550 Add clickable buttons to the article headers
8551 (@code{gnus-article-add-buttons-to-head}).
8552
8553 @item W p
8554 @kindex W p (Summary)
8555 @findex gnus-article-verify-x-pgp-sig
8556 Verify a signed control message
8557 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8558 @code{newgroup} and @code{checkgroups} are usually signed by the
8559 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8560 the maintainer to your keyring to verify the
8561 message.@footnote{@acronym{PGP} keys for many hierarchies are
8562 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8563
8564 @item W s
8565 @kindex W s (Summary)
8566 @findex gnus-summary-force-verify-and-decrypt
8567 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8568 @acronym{S/MIME}) message
8569 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8570
8571 @item W a
8572 @kindex W a (Summary)
8573 @findex gnus-article-strip-headers-in-body
8574 Strip headers like the @code{X-No-Archive} header from the beginning of
8575 article bodies (@code{gnus-article-strip-headers-in-body}).
8576
8577 @item W E l
8578 @kindex W E l (Summary)
8579 @findex gnus-article-strip-leading-blank-lines
8580 Remove all blank lines from the beginning of the article
8581 (@code{gnus-article-strip-leading-blank-lines}).
8582
8583 @item W E m
8584 @kindex W E m (Summary)
8585 @findex gnus-article-strip-multiple-blank-lines
8586 Replace all blank lines with empty lines and then all multiple empty
8587 lines with a single empty line.
8588 (@code{gnus-article-strip-multiple-blank-lines}).
8589
8590 @item W E t
8591 @kindex W E t (Summary)
8592 @findex gnus-article-remove-trailing-blank-lines
8593 Remove all blank lines at the end of the article
8594 (@code{gnus-article-remove-trailing-blank-lines}).
8595
8596 @item W E a
8597 @kindex W E a (Summary)
8598 @findex gnus-article-strip-blank-lines
8599 Do all the three commands above
8600 (@code{gnus-article-strip-blank-lines}).
8601
8602 @item W E A
8603 @kindex W E A (Summary)
8604 @findex gnus-article-strip-all-blank-lines
8605 Remove all blank lines
8606 (@code{gnus-article-strip-all-blank-lines}).
8607
8608 @item W E s
8609 @kindex W E s (Summary)
8610 @findex gnus-article-strip-leading-space
8611 Remove all white space from the beginning of all lines of the article
8612 body (@code{gnus-article-strip-leading-space}).
8613
8614 @item W E e
8615 @kindex W E e (Summary)
8616 @findex gnus-article-strip-trailing-space
8617 Remove all white space from the end of all lines of the article
8618 body (@code{gnus-article-strip-trailing-space}).
8619
8620 @end table
8621
8622 @xref{Customizing Articles}, for how to wash articles automatically.
8623
8624
8625 @node Article Header
8626 @subsection Article Header
8627
8628 These commands perform various transformations of article header.
8629
8630 @table @kbd
8631
8632 @item W G u
8633 @kindex W G u (Summary)
8634 @findex gnus-article-treat-unfold-headers
8635 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8636
8637 @item W G n
8638 @kindex W G n (Summary)
8639 @findex gnus-article-treat-fold-newsgroups
8640 Fold the @code{Newsgroups} and @code{Followup-To} headers
8641 (@code{gnus-article-treat-fold-newsgroups}).
8642
8643 @item W G f
8644 @kindex W G f (Summary)
8645 @findex gnus-article-treat-fold-headers
8646 Fold all the message headers
8647 (@code{gnus-article-treat-fold-headers}).
8648
8649 @item W E w
8650 @kindex W E w
8651 @findex gnus-article-remove-leading-whitespace
8652 Remove excessive whitespace from all headers
8653 (@code{gnus-article-remove-leading-whitespace}).
8654
8655 @end table
8656
8657
8658 @node Article Buttons
8659 @subsection Article Buttons
8660 @cindex buttons
8661
8662 People often include references to other stuff in articles, and it would
8663 be nice if Gnus could just fetch whatever it is that people talk about
8664 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8665 button on these references.
8666
8667 @vindex gnus-button-man-handler
8668 Gnus adds @dfn{buttons} to certain standard references by default:
8669 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8670 Emacs or Gnus related references.  This is controlled by two variables,
8671 one that handles article bodies and one that handles article heads:
8672
8673 @table @code
8674
8675 @item gnus-button-alist
8676 @vindex gnus-button-alist
8677 This is an alist where each entry has this form:
8678
8679 @lisp
8680 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8681 @end lisp
8682
8683 @table @var
8684
8685 @item regexp
8686 All text that match this regular expression (case insensitive) will be
8687 considered an external reference.  Here's a typical regexp that matches
8688 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8689 variable containing a regexp, useful variables to use include
8690 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8691
8692 @item button-par
8693 Gnus has to know which parts of the matches is to be highlighted.  This
8694 is a number that says what sub-expression of the regexp is to be
8695 highlighted.  If you want it all highlighted, you use 0 here.
8696
8697 @item use-p
8698 This form will be @code{eval}ed, and if the result is non-@code{nil},
8699 this is considered a match.  This is useful if you want extra sifting to
8700 avoid false matches.  Often variables named
8701 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8702 Levels}, but any other form may be used too.
8703
8704 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8705
8706 @item function
8707 This function will be called when you click on this button.
8708
8709 @item data-par
8710 As with @var{button-par}, this is a sub-expression number, but this one
8711 says which part of the match is to be sent as data to @var{function}.
8712
8713 @end table
8714
8715 So the full entry for buttonizing URLs is then
8716
8717 @lisp
8718 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8719 @end lisp
8720
8721 @item gnus-header-button-alist
8722 @vindex gnus-header-button-alist
8723 This is just like the other alist, except that it is applied to the
8724 article head only, and that each entry has an additional element that is
8725 used to say what headers to apply the buttonize coding to:
8726
8727 @lisp
8728 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8729 @end lisp
8730
8731 @var{header} is a regular expression.
8732 @end table
8733
8734 @subsubsection Related variables and functions
8735
8736 @table @code
8737 @item gnus-button-@var{*}-level
8738 @xref{Article Button Levels}.
8739
8740 @c Stuff related to gnus-button-browse-level
8741
8742 @item gnus-button-url-regexp
8743 @vindex gnus-button-url-regexp
8744 A regular expression that matches embedded URLs.  It is used in the
8745 default values of the variables above.
8746
8747 @c Stuff related to gnus-button-man-level
8748
8749 @item gnus-button-man-handler
8750 @vindex gnus-button-man-handler
8751 The function to use for displaying man pages.  It must take at least one
8752 argument with a string naming the man page.
8753
8754 @c Stuff related to gnus-button-message-level
8755
8756 @item gnus-button-mid-or-mail-regexp
8757 @vindex gnus-button-mid-or-mail-regexp
8758 Regular expression that matches a message ID or a mail address.
8759
8760 @item gnus-button-prefer-mid-or-mail
8761 @vindex gnus-button-prefer-mid-or-mail
8762 This variable determines what to do when the button on a string as
8763 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8764 message ID or a mail address.  If it is one of the symbols @code{mid} or
8765 @code{mail}, Gnus will always assume that the string is a message ID or
8766 a mail address, respectively.  If this variable is set to the symbol
8767 @code{ask}, always query the user what do do.  If it is a function, this
8768 function will be called with the string as its only argument.  The
8769 function must return @code{mid}, @code{mail}, @code{invalid} or
8770 @code{ask}.  The default value is the function
8771 @code{gnus-button-mid-or-mail-heuristic}.
8772
8773 @item gnus-button-mid-or-mail-heuristic
8774 @findex gnus-button-mid-or-mail-heuristic
8775 Function that guesses whether its argument is a message ID or a mail
8776 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8777 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8778 string is invalid.
8779
8780 @item gnus-button-mid-or-mail-heuristic-alist
8781 @vindex gnus-button-mid-or-mail-heuristic-alist
8782 An alist of @code{(RATE . REGEXP)} pairs used by the function
8783 @code{gnus-button-mid-or-mail-heuristic}.
8784
8785 @c Stuff related to gnus-button-tex-level
8786
8787 @item gnus-button-ctan-handler
8788 @findex gnus-button-ctan-handler
8789 The function to use for displaying CTAN links.  It must take one
8790 argument, the string naming the URL.
8791
8792 @item gnus-ctan-url
8793 @vindex gnus-ctan-url
8794 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8795 by @code{gnus-button-ctan-handler}.
8796
8797 @c Misc stuff
8798
8799 @item gnus-article-button-face
8800 @vindex gnus-article-button-face
8801 Face used on buttons.
8802
8803 @item gnus-article-mouse-face
8804 @vindex gnus-article-mouse-face
8805 Face used when the mouse cursor is over a button.
8806
8807 @end table
8808
8809 @xref{Customizing Articles}, for how to buttonize articles automatically.
8810
8811
8812 @node Article Button Levels
8813 @subsection Article button levels
8814 @cindex button levels
8815 The higher the value of the variables @code{gnus-button-@var{*}-level},
8816 the more buttons will appear.  If the level is zero, no corresponding
8817 buttons are displayed.  With the default value (which is 5) you should
8818 already see quite a lot of buttons.  With higher levels, you will see
8819 more buttons, but you may also get more false positives.  To avoid them,
8820 you can set the variables @code{gnus-button-@var{*}-level} local to
8821 specific groups (@pxref{Group Parameters}).  Here's an example for the
8822 variable @code{gnus-parameters}:
8823
8824 @lisp
8825 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8826 (setq gnus-parameters
8827       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8828         ("\\<unix\\>"               (gnus-button-man-level 10))
8829         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8830 @end lisp
8831
8832 @table @code
8833
8834 @item gnus-button-browse-level
8835 @vindex gnus-button-browse-level
8836 Controls the display of references to message IDs, mail addresses and
8837 news URLs.  Related variables and functions include
8838 @code{gnus-button-url-regexp}, @code{browse-url}, and
8839 @code{browse-url-browser-function}.
8840
8841 @item gnus-button-emacs-level
8842 @vindex gnus-button-emacs-level
8843 Controls the display of Emacs or Gnus references.  Related functions are
8844 @code{gnus-button-handle-custom},
8845 @code{gnus-button-handle-describe-function},
8846 @code{gnus-button-handle-describe-variable},
8847 @code{gnus-button-handle-symbol},
8848 @code{gnus-button-handle-describe-key},
8849 @code{gnus-button-handle-apropos},
8850 @code{gnus-button-handle-apropos-command},
8851 @code{gnus-button-handle-apropos-variable},
8852 @code{gnus-button-handle-apropos-documentation}, and
8853 @code{gnus-button-handle-library}.
8854
8855 @item gnus-button-man-level
8856 @vindex gnus-button-man-level
8857 Controls the display of references to (Unix) man pages.
8858 See @code{gnus-button-man-handler}.
8859
8860 @item gnus-button-message-level
8861 @vindex gnus-button-message-level
8862 Controls the display of message IDs, mail addresses and news URLs.
8863 Related variables and functions include
8864 @code{gnus-button-mid-or-mail-regexp},
8865 @code{gnus-button-prefer-mid-or-mail},
8866 @code{gnus-button-mid-or-mail-heuristic}, and
8867 @code{gnus-button-mid-or-mail-heuristic-alist}.
8868
8869 @item gnus-button-tex-level
8870 @vindex gnus-button-tex-level
8871 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8872 URLs.  See the variables @code{gnus-ctan-url},
8873 @code{gnus-button-ctan-handler},
8874 @code{gnus-button-ctan-directory-regexp}, and
8875 @code{gnus-button-handle-ctan-bogus-regexp}.
8876
8877 @end table
8878
8879
8880 @node Article Date
8881 @subsection Article Date
8882
8883 The date is most likely generated in some obscure timezone you've never
8884 heard of, so it's quite nice to be able to find out what the time was
8885 when the article was sent.
8886
8887 @table @kbd
8888
8889 @item W T u
8890 @kindex W T u (Summary)
8891 @findex gnus-article-date-ut
8892 Display the date in UT (aka. GMT, aka ZULU)
8893 (@code{gnus-article-date-ut}).
8894
8895 @item W T i
8896 @kindex W T i (Summary)
8897 @findex gnus-article-date-iso8601
8898 @cindex ISO 8601
8899 Display the date in international format, aka. ISO 8601
8900 (@code{gnus-article-date-iso8601}).
8901
8902 @item W T l
8903 @kindex W T l (Summary)
8904 @findex gnus-article-date-local
8905 Display the date in the local timezone (@code{gnus-article-date-local}).
8906
8907 @item W T p
8908 @kindex W T p (Summary)
8909 @findex gnus-article-date-english
8910 Display the date in a format that's easily pronounceable in English
8911 (@code{gnus-article-date-english}).
8912
8913 @item W T s
8914 @kindex W T s (Summary)
8915 @vindex gnus-article-time-format
8916 @findex gnus-article-date-user
8917 @findex format-time-string
8918 Display the date using a user-defined format
8919 (@code{gnus-article-date-user}).  The format is specified by the
8920 @code{gnus-article-time-format} variable, and is a string that's passed
8921 to @code{format-time-string}.  See the documentation of that variable
8922 for a list of possible format specs.
8923
8924 @item W T e
8925 @kindex W T e (Summary)
8926 @findex gnus-article-date-lapsed
8927 @findex gnus-start-date-timer
8928 @findex gnus-stop-date-timer
8929 Say how much time has elapsed between the article was posted and now
8930 (@code{gnus-article-date-lapsed}).  It looks something like:
8931
8932 @example
8933 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8934 @end example
8935
8936 @vindex gnus-article-date-lapsed-new-header
8937 The value of @code{gnus-article-date-lapsed-new-header} determines
8938 whether this header will just be added below the old Date one, or will
8939 replace it.
8940
8941 An advantage of using Gnus to read mail is that it converts simple bugs
8942 into wonderful absurdities.
8943
8944 If you want to have this line updated continually, you can put
8945
8946 @lisp
8947 (gnus-start-date-timer)
8948 @end lisp
8949
8950 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8951 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8952 command.
8953
8954 @item W T o
8955 @kindex W T o (Summary)
8956 @findex gnus-article-date-original
8957 Display the original date (@code{gnus-article-date-original}).  This can
8958 be useful if you normally use some other conversion function and are
8959 worried that it might be doing something totally wrong.  Say, claiming
8960 that the article was posted in 1854.  Although something like that is
8961 @emph{totally} impossible.  Don't you trust me? *titter*
8962
8963 @end table
8964
8965 @xref{Customizing Articles}, for how to display the date in your
8966 preferred format automatically.
8967
8968
8969 @node Article Display
8970 @subsection Article Display
8971 @cindex picons
8972 @cindex x-face
8973 @cindex smileys
8974
8975 These commands add various frivolous display gimmicks to the article
8976 buffer in Emacs versions that support them.
8977
8978 @code{X-Face} headers are small black-and-white images supplied by the
8979 message headers (@pxref{X-Face}).
8980
8981 @code{Face} headers are small colored images supplied by the message
8982 headers (@pxref{Face}).
8983
8984 Smileys are those little @samp{:-)} symbols that people like to litter
8985 their messages with (@pxref{Smileys}).
8986
8987 Picons, on the other hand, reside on your own system, and Gnus will
8988 try to match the headers to what you have (@pxref{Picons}).
8989
8990 All these functions are toggles---if the elements already exist,
8991 they'll be removed.
8992
8993 @table @kbd
8994 @item W D x
8995 @kindex W D x (Summary)
8996 @findex gnus-article-display-x-face
8997 Display an @code{X-Face} in the @code{From} header.
8998 (@code{gnus-article-display-x-face}).
8999
9000 @item W D d
9001 @kindex W D d (Summary)
9002 @findex gnus-article-display-face
9003 Display a @code{Face} in the @code{From} header.
9004 (@code{gnus-article-display-face}).
9005
9006 @item W D s
9007 @kindex W D s (Summary)
9008 @findex gnus-treat-smiley
9009 Display smileys (@code{gnus-treat-smiley}).
9010
9011 @item W D f
9012 @kindex W D f (Summary)
9013 @findex gnus-treat-from-picon
9014 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9015
9016 @item W D m
9017 @kindex W D m (Summary)
9018 @findex gnus-treat-mail-picon
9019 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9020 (@code{gnus-treat-mail-picon}).
9021
9022 @item W D n
9023 @kindex W D n (Summary)
9024 @findex gnus-treat-newsgroups-picon
9025 Piconify all news headers (i. e., @code{Newsgroups} and
9026 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9027
9028 @item W D D
9029 @kindex W D D (Summary)
9030 @findex gnus-article-remove-images
9031 Remove all images from the article buffer
9032 (@code{gnus-article-remove-images}).
9033
9034 @end table
9035
9036
9037
9038 @node Article Signature
9039 @subsection Article Signature
9040 @cindex signatures
9041 @cindex article signature
9042
9043 @vindex gnus-signature-separator
9044 Each article is divided into two parts---the head and the body.  The
9045 body can be divided into a signature part and a text part.  The variable
9046 that says what is to be considered a signature is
9047 @code{gnus-signature-separator}.  This is normally the standard
9048 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9049 non-standard signature separators, so this variable can also be a list
9050 of regular expressions to be tested, one by one.  (Searches are done
9051 from the end of the body towards the beginning.)  One likely value is:
9052
9053 @lisp
9054 (setq gnus-signature-separator
9055       '("^-- $"         ; @r{The standard}
9056         "^-- *$"        ; @r{A common mangling}
9057         "^-------*$"    ; @r{Many people just use a looong}
9058                         ; @r{line of dashes.  Shame!}
9059         "^ *--------*$" ; @r{Double-shame!}
9060         "^________*$"   ; @r{Underscores are also popular}
9061         "^========*$")) ; @r{Pervert!}
9062 @end lisp
9063
9064 The more permissive you are, the more likely it is that you'll get false
9065 positives.
9066
9067 @vindex gnus-signature-limit
9068 @code{gnus-signature-limit} provides a limit to what is considered a
9069 signature when displaying articles.
9070
9071 @enumerate
9072 @item
9073 If it is an integer, no signature may be longer (in characters) than
9074 that integer.
9075 @item
9076 If it is a floating point number, no signature may be longer (in lines)
9077 than that number.
9078 @item
9079 If it is a function, the function will be called without any parameters,
9080 and if it returns @code{nil}, there is no signature in the buffer.
9081 @item
9082 If it is a string, it will be used as a regexp.  If it matches, the text
9083 in question is not a signature.
9084 @end enumerate
9085
9086 This variable can also be a list where the elements may be of the types
9087 listed above.  Here's an example:
9088
9089 @lisp
9090 (setq gnus-signature-limit
9091       '(200.0 "^---*Forwarded article"))
9092 @end lisp
9093
9094 This means that if there are more than 200 lines after the signature
9095 separator, or the text after the signature separator is matched by
9096 the regular expression @samp{^---*Forwarded article}, then it isn't a
9097 signature after all.
9098
9099
9100 @node Article Miscellanea
9101 @subsection Article Miscellanea
9102
9103 @table @kbd
9104 @item A t
9105 @kindex A t (Summary)
9106 @findex gnus-article-babel
9107 Translate the article from one language to another
9108 (@code{gnus-article-babel}).
9109
9110 @end table
9111
9112
9113 @node MIME Commands
9114 @section MIME Commands
9115 @cindex MIME decoding
9116 @cindex attachments
9117 @cindex viewing attachments
9118
9119 The following commands all understand the numerical prefix.  For
9120 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9121
9122 @table @kbd
9123 @item b
9124 @itemx K v
9125 @kindex b (Summary)
9126 @kindex K v (Summary)
9127 View the @acronym{MIME} part.
9128
9129 @item K o
9130 @kindex K o (Summary)
9131 Save the @acronym{MIME} part.
9132
9133 @item K c
9134 @kindex K c (Summary)
9135 Copy the @acronym{MIME} part.
9136
9137 @item K e
9138 @kindex K e (Summary)
9139 View the @acronym{MIME} part externally.
9140
9141 @item K i
9142 @kindex K i (Summary)
9143 View the @acronym{MIME} part internally.
9144
9145 @item K |
9146 @kindex K | (Summary)
9147 Pipe the @acronym{MIME} part to an external command.
9148 @end table
9149
9150 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9151 the same manner:
9152
9153 @table @kbd
9154 @item K b
9155 @kindex K b (Summary)
9156 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9157 mostly useful if you wish to save (or perform other actions) on inlined
9158 parts.
9159
9160 @item K m
9161 @kindex K m (Summary)
9162 @findex gnus-summary-repair-multipart
9163 Some multipart messages are transmitted with missing or faulty headers.
9164 This command will attempt to ``repair'' these messages so that they can
9165 be viewed in a more pleasant manner
9166 (@code{gnus-summary-repair-multipart}).
9167
9168 @item X m
9169 @kindex X m (Summary)
9170 @findex gnus-summary-save-parts
9171 Save all parts matching a @acronym{MIME} type to a directory
9172 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9173 convention (@pxref{Process/Prefix}).
9174
9175 @item M-t
9176 @kindex M-t (Summary)
9177 @findex gnus-summary-toggle-display-buttonized
9178 Toggle the buttonized display of the article buffer
9179 (@code{gnus-summary-toggle-display-buttonized}).
9180
9181 @item W M w
9182 @kindex W M w (Summary)
9183 @findex gnus-article-decode-mime-words
9184 Decode RFC 2047-encoded words in the article headers
9185 (@code{gnus-article-decode-mime-words}).
9186
9187 @item W M c
9188 @kindex W M c (Summary)
9189 @findex gnus-article-decode-charset
9190 Decode encoded article bodies as well as charsets
9191 (@code{gnus-article-decode-charset}).
9192
9193 This command looks in the @code{Content-Type} header to determine the
9194 charset.  If there is no such header in the article, you can give it a
9195 prefix, which will prompt for the charset to decode as.  In regional
9196 groups where people post using some common encoding (but do not
9197 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9198 parameter to the required charset (@pxref{Group Parameters}).
9199
9200 @item W M v
9201 @kindex W M v (Summary)
9202 @findex gnus-mime-view-all-parts
9203 View all the @acronym{MIME} parts in the current article
9204 (@code{gnus-mime-view-all-parts}).
9205
9206 @end table
9207
9208 Relevant variables:
9209
9210 @table @code
9211 @item gnus-ignored-mime-types
9212 @vindex gnus-ignored-mime-types
9213 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9214 this list will be completely ignored by Gnus.  The default value is
9215 @code{nil}.
9216
9217 To have all Vcards be ignored, you'd say something like this:
9218
9219 @lisp
9220 (setq gnus-ignored-mime-types
9221       '("text/x-vcard"))
9222 @end lisp
9223
9224 @item gnus-article-loose-mime
9225 @vindex gnus-article-loose-mime
9226 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9227 before interpreting the message as a @acronym{MIME} message.  This helps
9228 when reading messages from certain broken mail user agents.  The
9229 default is @code{nil}.
9230
9231 @item gnus-article-emulate-mime
9232 @vindex gnus-article-emulate-mime
9233 There are other, non-@acronym{MIME} encoding methods used.  The most common
9234 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9235 this variable is non-@code{nil}, Gnus will look in message bodies to
9236 see if it finds these encodings, and if so, it'll run them through the
9237 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9238
9239 @item gnus-unbuttonized-mime-types
9240 @vindex gnus-unbuttonized-mime-types
9241 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9242 this list won't have @acronym{MIME} buttons inserted unless they aren't
9243 displayed or this variable is overridden by
9244 @code{gnus-buttonized-mime-types}.  The default value is
9245 @code{(".*/.*")}.  This variable is only used when
9246 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9247
9248 @item gnus-buttonized-mime-types
9249 @vindex gnus-buttonized-mime-types
9250 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9251 this list will have @acronym{MIME} buttons inserted unless they aren't
9252 displayed.  This variable overrides
9253 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9254 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9255 is @code{nil}.
9256
9257 To see e.g. security buttons but no other buttons, you could set this
9258 variable to @code{("multipart/signed")} and leave
9259 @code{gnus-unbuttonized-mime-types} at the default value.
9260
9261 @item gnus-inhibit-mime-unbuttonizing
9262 @vindex gnus-inhibit-mime-unbuttonizing
9263 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9264 default value is @code{nil}.
9265
9266 @item gnus-article-mime-part-function
9267 @vindex gnus-article-mime-part-function
9268 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9269 handle as the parameter.  The function is meant to be used to allow
9270 users to gather information from the article (e. g., add Vcard info to
9271 the bbdb database) or to do actions based on parts (e. g., automatically
9272 save all jpegs into some directory).
9273
9274 Here's an example function the does the latter:
9275
9276 @lisp
9277 (defun my-save-all-jpeg-parts (handle)
9278   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9279     (with-temp-buffer
9280       (insert (mm-get-part handle))
9281       (write-region (point-min) (point-max)
9282                     (read-file-name "Save jpeg to: ")))))
9283 (setq gnus-article-mime-part-function
9284       'my-save-all-jpeg-parts)
9285 @end lisp
9286
9287 @vindex gnus-mime-multipart-functions
9288 @item gnus-mime-multipart-functions
9289 Alist of @acronym{MIME} multipart types and functions to handle them.
9290
9291 @vindex mm-file-name-rewrite-functions
9292 @item mm-file-name-rewrite-functions
9293 List of functions used for rewriting file names of @acronym{MIME} parts.
9294 Each function takes a file name as input and returns a file name.
9295
9296 Ready-made functions include@*
9297 @code{mm-file-name-delete-whitespace},
9298 @code{mm-file-name-trim-whitespace},
9299 @code{mm-file-name-collapse-whitespace}, and
9300 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9301 the variable @code{mm-file-name-replace-whitespace} to replace each
9302 whitespace character in a file name with that string; default value
9303 is @code{"_"} (a single underscore).
9304 @findex mm-file-name-delete-whitespace
9305 @findex mm-file-name-trim-whitespace
9306 @findex mm-file-name-collapse-whitespace
9307 @findex mm-file-name-replace-whitespace
9308 @vindex mm-file-name-replace-whitespace
9309
9310 The standard functions @code{capitalize}, @code{downcase},
9311 @code{upcase}, and @code{upcase-initials} may be useful, too.
9312
9313 Everybody knows that whitespace characters in file names are evil,
9314 except those who don't know.  If you receive lots of attachments from
9315 such unenlightened users, you can make live easier by adding
9316
9317 @lisp
9318 (setq mm-file-name-rewrite-functions
9319       '(mm-file-name-trim-whitespace
9320         mm-file-name-collapse-whitespace
9321         mm-file-name-replace-whitespace))
9322 @end lisp
9323
9324 @noindent
9325 to your @file{~/.gnus.el} file.
9326
9327 @end table
9328
9329
9330 @node Charsets
9331 @section Charsets
9332 @cindex charsets
9333
9334 People use different charsets, and we have @acronym{MIME} to let us know what
9335 charsets they use.  Or rather, we wish we had.  Many people use
9336 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9337 just send out messages without saying what character sets they use.  To
9338 help a bit with this, some local news hierarchies have policies that say
9339 what character set is the default.  For instance, the @samp{fj}
9340 hierarchy uses @code{iso-2022-jp-2}.
9341
9342 @vindex gnus-group-charset-alist
9343 This knowledge is encoded in the @code{gnus-group-charset-alist}
9344 variable, which is an alist of regexps (use the first item to match full
9345 group names) and default charsets to be used when reading these groups.
9346
9347 @vindex gnus-newsgroup-ignored-charsets
9348 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9349 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9350 even if they really are in @code{koi-8}.  To help here, the
9351 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9352 charsets that are listed here will be ignored.  The variable can be
9353 set on a group-by-group basis using the group parameters (@pxref{Group
9354 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9355 which includes values some agents insist on having in there.
9356
9357 @vindex gnus-group-posting-charset-alist
9358 When posting, @code{gnus-group-posting-charset-alist} is used to
9359 determine which charsets should not be encoded using the @acronym{MIME}
9360 encodings.  For instance, some hierarchies discourage using
9361 quoted-printable header encoding.
9362
9363 This variable is an alist of regexps and permitted unencoded charsets
9364 for posting.  Each element of the alist has the form @code{(}@var{test
9365 header body-list}@code{)}, where:
9366
9367 @table @var
9368 @item test
9369 is either a regular expression matching the newsgroup header or a
9370 variable to query,
9371 @item header
9372 is the charset which may be left unencoded in the header (@code{nil}
9373 means encode all charsets),
9374 @item body-list
9375 is a list of charsets which may be encoded using 8bit content-transfer
9376 encoding in the body, or one of the special values @code{nil} (always
9377 encode using quoted-printable) or @code{t} (always use 8bit).
9378 @end table
9379
9380 @cindex Russian
9381 @cindex koi8-r
9382 @cindex koi8-u
9383 @cindex iso-8859-5
9384 @cindex coding system aliases
9385 @cindex preferred charset
9386
9387 Other charset tricks that may be useful, although not Gnus-specific:
9388
9389 If there are several @acronym{MIME} charsets that encode the same Emacs
9390 charset, you can choose what charset to use by saying the following:
9391
9392 @lisp
9393 (put-charset-property 'cyrillic-iso8859-5
9394                       'preferred-coding-system 'koi8-r)
9395 @end lisp
9396
9397 This means that Russian will be encoded using @code{koi8-r} instead of
9398 the default @code{iso-8859-5} @acronym{MIME} charset.
9399
9400 If you want to read messages in @code{koi8-u}, you can cheat and say
9401
9402 @lisp
9403 (define-coding-system-alias 'koi8-u 'koi8-r)
9404 @end lisp
9405
9406 This will almost do the right thing.
9407
9408 And finally, to read charsets like @code{windows-1251}, you can say
9409 something like
9410
9411 @lisp
9412 (codepage-setup 1251)
9413 (define-coding-system-alias 'windows-1251 'cp1251)
9414 @end lisp
9415
9416
9417 @node Article Commands
9418 @section Article Commands
9419
9420 @table @kbd
9421
9422 @item A P
9423 @cindex PostScript
9424 @cindex printing
9425 @kindex A P (Summary)
9426 @vindex gnus-ps-print-hook
9427 @findex gnus-summary-print-article
9428 Generate and print a PostScript image of the article buffer
9429 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9430 be run just before printing the buffer.  An alternative way to print
9431 article is to use Muttprint (@pxref{Saving Articles}).
9432
9433 @end table
9434
9435
9436 @node Summary Sorting
9437 @section Summary Sorting
9438 @cindex summary sorting
9439
9440 You can have the summary buffer sorted in various ways, even though I
9441 can't really see why you'd want that.
9442
9443 @table @kbd
9444
9445 @item C-c C-s C-n
9446 @kindex C-c C-s C-n (Summary)
9447 @findex gnus-summary-sort-by-number
9448 Sort by article number (@code{gnus-summary-sort-by-number}).
9449
9450 @item C-c C-s C-a
9451 @kindex C-c C-s C-a (Summary)
9452 @findex gnus-summary-sort-by-author
9453 Sort by author (@code{gnus-summary-sort-by-author}).
9454
9455 @item C-c C-s C-s
9456 @kindex C-c C-s C-s (Summary)
9457 @findex gnus-summary-sort-by-subject
9458 Sort by subject (@code{gnus-summary-sort-by-subject}).
9459
9460 @item C-c C-s C-d
9461 @kindex C-c C-s C-d (Summary)
9462 @findex gnus-summary-sort-by-date
9463 Sort by date (@code{gnus-summary-sort-by-date}).
9464
9465 @item C-c C-s C-l
9466 @kindex C-c C-s C-l (Summary)
9467 @findex gnus-summary-sort-by-lines
9468 Sort by lines (@code{gnus-summary-sort-by-lines}).
9469
9470 @item C-c C-s C-c
9471 @kindex C-c C-s C-c (Summary)
9472 @findex gnus-summary-sort-by-chars
9473 Sort by article length (@code{gnus-summary-sort-by-chars}).
9474
9475 @item C-c C-s C-i
9476 @kindex C-c C-s C-i (Summary)
9477 @findex gnus-summary-sort-by-score
9478 Sort by score (@code{gnus-summary-sort-by-score}).
9479
9480 @item C-c C-s C-r
9481 @kindex C-c C-s C-r (Summary)
9482 @findex gnus-summary-sort-by-random
9483 Randomize (@code{gnus-summary-sort-by-random}).
9484
9485 @item C-c C-s C-o
9486 @kindex C-c C-s C-o (Summary)
9487 @findex gnus-summary-sort-by-original
9488 Sort using the default sorting method
9489 (@code{gnus-summary-sort-by-original}).
9490 @end table
9491
9492 These functions will work both when you use threading and when you don't
9493 use threading.  In the latter case, all summary lines will be sorted,
9494 line by line.  In the former case, sorting will be done on a
9495 root-by-root basis, which might not be what you were looking for.  To
9496 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9497 Commands}).
9498
9499
9500 @node Finding the Parent
9501 @section Finding the Parent
9502 @cindex parent articles
9503 @cindex referring articles
9504
9505 @table @kbd
9506 @item ^
9507 @kindex ^ (Summary)
9508 @findex gnus-summary-refer-parent-article
9509 If you'd like to read the parent of the current article, and it is not
9510 displayed in the summary buffer, you might still be able to.  That is,
9511 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9512 and the @code{References} in the current article are not mangled, you
9513 can just press @kbd{^} or @kbd{A r}
9514 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9515 you'll get the parent.  If the parent is already displayed in the
9516 summary buffer, point will just move to this article.
9517
9518 If given a positive numerical prefix, fetch that many articles back into
9519 the ancestry.  If given a negative numerical prefix, fetch just that
9520 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9521 grandparent and the grandgrandparent of the current article.  If you say
9522 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9523 article.
9524
9525 @item A R (Summary)
9526 @findex gnus-summary-refer-references
9527 @kindex A R (Summary)
9528 Fetch all articles mentioned in the @code{References} header of the
9529 article (@code{gnus-summary-refer-references}).
9530
9531 @item A T (Summary)
9532 @findex gnus-summary-refer-thread
9533 @kindex A T (Summary)
9534 Display the full thread where the current article appears
9535 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9536 headers in the current group to work, so it usually takes a while.  If
9537 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9538 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9539 visible effects normally, but it'll make this command work a whole lot
9540 faster.  Of course, it'll make group entry somewhat slow.
9541
9542 @vindex gnus-refer-thread-limit
9543 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9544 articles before the first displayed in the current group) headers to
9545 fetch when doing this command.  The default is 200.  If @code{t}, all
9546 the available headers will be fetched.  This variable can be overridden
9547 by giving the @kbd{A T} command a numerical prefix.
9548
9549 @item M-^ (Summary)
9550 @findex gnus-summary-refer-article
9551 @kindex M-^ (Summary)
9552 @cindex Message-ID
9553 @cindex fetching by Message-ID
9554 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9555 matter what group it belongs to.  @kbd{M-^}
9556 (@code{gnus-summary-refer-article}) will ask you for a
9557 @code{Message-ID}, which is one of those long, hard-to-read thingies
9558 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9559 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9560 @end table
9561
9562 The current select method will be used when fetching by
9563 @code{Message-ID} from non-news select method, but you can override this
9564 by giving this command a prefix.
9565
9566 @vindex gnus-refer-article-method
9567 If the group you are reading is located on a back end that does not
9568 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9569 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9570 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9571 updating the spool you are reading from, but that's not really
9572 necessary.
9573
9574 It can also be a list of select methods, as well as the special symbol
9575 @code{current}, which means to use the current select method.  If it
9576 is a list, Gnus will try all the methods in the list until it finds a
9577 match.
9578
9579 Here's an example setting that will first try the current method, and
9580 then ask Google if that fails:
9581
9582 @lisp
9583 (setq gnus-refer-article-method
9584       '(current
9585         (nnweb "google" (nnweb-type google))))
9586 @end lisp
9587
9588 Most of the mail back ends support fetching by @code{Message-ID}, but
9589 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9590 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9591 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9592 only able to locate articles that have been posted to the current group.
9593 (Anything else would be too time consuming.)  @code{nnmh} does not
9594 support this at all.
9595
9596
9597 @node Alternative Approaches
9598 @section Alternative Approaches
9599
9600 Different people like to read news using different methods.  This being
9601 gnus, we offer a small selection of minor modes for the summary buffers.
9602
9603 @menu
9604 * Pick and Read::               First mark articles and then read them.
9605 * Binary Groups::               Auto-decode all articles.
9606 @end menu
9607
9608
9609 @node Pick and Read
9610 @subsection Pick and Read
9611 @cindex pick and read
9612
9613 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9614 a two-phased reading interface.  The user first marks in a summary
9615 buffer the articles she wants to read.  Then she starts reading the
9616 articles with just an article buffer displayed.
9617
9618 @findex gnus-pick-mode
9619 @kindex M-x gnus-pick-mode
9620 Gnus provides a summary buffer minor mode that allows
9621 this---@code{gnus-pick-mode}.  This basically means that a few process
9622 mark commands become one-keystroke commands to allow easy marking, and
9623 it provides one additional command for switching to the summary buffer.
9624
9625 Here are the available keystrokes when using pick mode:
9626
9627 @table @kbd
9628 @item .
9629 @kindex . (Pick)
9630 @findex gnus-pick-article-or-thread
9631 Pick the article or thread on the current line
9632 (@code{gnus-pick-article-or-thread}).  If the variable
9633 @code{gnus-thread-hide-subtree} is true, then this key selects the
9634 entire thread when used at the first article of the thread.  Otherwise,
9635 it selects just the article.  If given a numerical prefix, go to that
9636 thread or article and pick it.  (The line number is normally displayed
9637 at the beginning of the summary pick lines.)
9638
9639 @item SPACE
9640 @kindex SPACE (Pick)
9641 @findex gnus-pick-next-page
9642 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9643 at the end of the buffer, start reading the picked articles.
9644
9645 @item u
9646 @kindex u (Pick)
9647 @findex gnus-pick-unmark-article-or-thread.
9648 Unpick the thread or article
9649 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9650 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9651 thread if used at the first article of the thread.  Otherwise it unpicks
9652 just the article.  You can give this key a numerical prefix to unpick
9653 the thread or article at that line.
9654
9655 @item RET
9656 @kindex RET (Pick)
9657 @findex gnus-pick-start-reading
9658 @vindex gnus-pick-display-summary
9659 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9660 given a prefix, mark all unpicked articles as read first.  If
9661 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9662 will still be visible when you are reading.
9663
9664 @end table
9665
9666 All the normal summary mode commands are still available in the
9667 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9668 which is mapped to the same function
9669 @code{gnus-summary-tick-article-forward}.
9670
9671 If this sounds like a good idea to you, you could say:
9672
9673 @lisp
9674 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9675 @end lisp
9676
9677 @vindex gnus-pick-mode-hook
9678 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9679
9680 @vindex gnus-mark-unpicked-articles-as-read
9681 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9682 all unpicked articles as read.  The default is @code{nil}.
9683
9684 @vindex gnus-summary-pick-line-format
9685 The summary line format in pick mode is slightly different from the
9686 standard format.  At the beginning of each line the line number is
9687 displayed.  The pick mode line format is controlled by the
9688 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9689 Variables}).  It accepts the same format specs that
9690 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9691
9692
9693 @node Binary Groups
9694 @subsection Binary Groups
9695 @cindex binary groups
9696
9697 @findex gnus-binary-mode
9698 @kindex M-x gnus-binary-mode
9699 If you spend much time in binary groups, you may grow tired of hitting
9700 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9701 is a minor mode for summary buffers that makes all ordinary Gnus article
9702 selection functions uudecode series of articles and display the result
9703 instead of just displaying the articles the normal way.
9704
9705 @kindex g (Binary)
9706 @findex gnus-binary-show-article
9707 The only way, in fact, to see the actual articles is the @kbd{g}
9708 command, when you have turned on this mode
9709 (@code{gnus-binary-show-article}).
9710
9711 @vindex gnus-binary-mode-hook
9712 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9713
9714
9715 @node Tree Display
9716 @section Tree Display
9717 @cindex trees
9718
9719 @vindex gnus-use-trees
9720 If you don't like the normal gnus summary display, you might try setting
9721 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9722 additional @dfn{tree buffer}.  You can execute all summary mode commands
9723 in the tree buffer.
9724
9725 There are a few variables to customize the tree display, of course:
9726
9727 @table @code
9728 @item gnus-tree-mode-hook
9729 @vindex gnus-tree-mode-hook
9730 A hook called in all tree mode buffers.
9731
9732 @item gnus-tree-mode-line-format
9733 @vindex gnus-tree-mode-line-format
9734 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9735 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9736 of valid specs, @pxref{Summary Buffer Mode Line}.
9737
9738 @item gnus-selected-tree-face
9739 @vindex gnus-selected-tree-face
9740 Face used for highlighting the selected article in the tree buffer.  The
9741 default is @code{modeline}.
9742
9743 @item gnus-tree-line-format
9744 @vindex gnus-tree-line-format
9745 A format string for the tree nodes.  The name is a bit of a misnomer,
9746 though---it doesn't define a line, but just the node.  The default value
9747 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9748 the name of the poster.  It is vital that all nodes are of the same
9749 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9750
9751 Valid specs are:
9752
9753 @table @samp
9754 @item n
9755 The name of the poster.
9756 @item f
9757 The @code{From} header.
9758 @item N
9759 The number of the article.
9760 @item [
9761 The opening bracket.
9762 @item ]
9763 The closing bracket.
9764 @item s
9765 The subject.
9766 @end table
9767
9768 @xref{Formatting Variables}.
9769
9770 Variables related to the display are:
9771
9772 @table @code
9773 @item gnus-tree-brackets
9774 @vindex gnus-tree-brackets
9775 This is used for differentiating between ``real'' articles and
9776 ``sparse'' articles.  The format is
9777 @example
9778 ((@var{real-open} . @var{real-close})
9779  (@var{sparse-open} . @var{sparse-close})
9780  (@var{dummy-open} . @var{dummy-close}))
9781 @end example
9782 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9783
9784 @item gnus-tree-parent-child-edges
9785 @vindex gnus-tree-parent-child-edges
9786 This is a list that contains the characters used for connecting parent
9787 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9788
9789 @end table
9790
9791 @item gnus-tree-minimize-window
9792 @vindex gnus-tree-minimize-window
9793 If this variable is non-@code{nil}, gnus will try to keep the tree
9794 buffer as small as possible to allow more room for the other gnus
9795 windows.  If this variable is a number, the tree buffer will never be
9796 higher than that number.  The default is @code{t}.  Note that if you
9797 have several windows displayed side-by-side in a frame and the tree
9798 buffer is one of these, minimizing the tree window will also resize all
9799 other windows displayed next to it.
9800
9801 You may also wish to add the following hook to keep the window minimized
9802 at all times:
9803
9804 @lisp
9805 (add-hook 'gnus-configure-windows-hook
9806           'gnus-tree-perhaps-minimize)
9807 @end lisp
9808
9809 @item gnus-generate-tree-function
9810 @vindex gnus-generate-tree-function
9811 @findex gnus-generate-horizontal-tree
9812 @findex gnus-generate-vertical-tree
9813 The function that actually generates the thread tree.  Two predefined
9814 functions are available: @code{gnus-generate-horizontal-tree} and
9815 @code{gnus-generate-vertical-tree} (which is the default).
9816
9817 @end table
9818
9819 Here's an example from a horizontal tree buffer:
9820
9821 @example
9822 @{***@}-(***)-[odd]-[Gun]
9823      |      \[Jan]
9824      |      \[odd]-[Eri]
9825      |      \(***)-[Eri]
9826      |            \[odd]-[Paa]
9827      \[Bjo]
9828      \[Gun]
9829      \[Gun]-[Jor]
9830 @end example
9831
9832 Here's the same thread displayed in a vertical tree buffer:
9833
9834 @example
9835 @group
9836 @{***@}
9837   |--------------------------\-----\-----\
9838 (***)                         [Bjo] [Gun] [Gun]
9839   |--\-----\-----\                          |
9840 [odd] [Jan] [odd] (***)                   [Jor]
9841   |           |     |--\
9842 [Gun]       [Eri] [Eri] [odd]
9843                           |
9844                         [Paa]
9845 @end group
9846 @end example
9847
9848 If you're using horizontal trees, it might be nice to display the trees
9849 side-by-side with the summary buffer.  You could add something like the
9850 following to your @file{~/.gnus.el} file:
9851
9852 @lisp
9853 (setq gnus-use-trees t
9854       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9855       gnus-tree-minimize-window nil)
9856 (gnus-add-configuration
9857  '(article
9858    (vertical 1.0
9859              (horizontal 0.25
9860                          (summary 0.75 point)
9861                          (tree 1.0))
9862              (article 1.0))))
9863 @end lisp
9864
9865 @xref{Window Layout}.
9866
9867
9868 @node Mail Group Commands
9869 @section Mail Group Commands
9870 @cindex mail group commands
9871
9872 Some commands only make sense in mail groups.  If these commands are
9873 invalid in the current group, they will raise a hell and let you know.
9874
9875 All these commands (except the expiry and edit commands) use the
9876 process/prefix convention (@pxref{Process/Prefix}).
9877
9878 @table @kbd
9879
9880 @item B e
9881 @kindex B e (Summary)
9882 @findex gnus-summary-expire-articles
9883 Run all expirable articles in the current group through the expiry
9884 process (@code{gnus-summary-expire-articles}).  That is, delete all
9885 expirable articles in the group that have been around for a while.
9886 (@pxref{Expiring Mail}).
9887
9888 @item B C-M-e
9889 @kindex B C-M-e (Summary)
9890 @findex gnus-summary-expire-articles-now
9891 Delete all the expirable articles in the group
9892 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9893 articles eligible for expiry in the current group will
9894 disappear forever into that big @file{/dev/null} in the sky.
9895
9896 @item B DEL
9897 @kindex B DEL (Summary)
9898 @findex gnus-summary-delete-article
9899 @c @icon{gnus-summary-mail-delete}
9900 Delete the mail article.  This is ``delete'' as in ``delete it from your
9901 disk forever and ever, never to return again.'' Use with caution.
9902 (@code{gnus-summary-delete-article}).
9903
9904 @item B m
9905 @kindex B m (Summary)
9906 @cindex move mail
9907 @findex gnus-summary-move-article
9908 @vindex gnus-preserve-marks
9909 Move the article from one mail group to another
9910 (@code{gnus-summary-move-article}).  Marks will be preserved if
9911 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9912
9913 @item B c
9914 @kindex B c (Summary)
9915 @cindex copy mail
9916 @findex gnus-summary-copy-article
9917 @c @icon{gnus-summary-mail-copy}
9918 Copy the article from one group (mail group or not) to a mail group
9919 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9920 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9921
9922 @item B B
9923 @kindex B B (Summary)
9924 @cindex crosspost mail
9925 @findex gnus-summary-crosspost-article
9926 Crosspost the current article to some other group
9927 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9928 the article in the other group, and the Xref headers of the article will
9929 be properly updated.
9930
9931 @item B i
9932 @kindex B i (Summary)
9933 @findex gnus-summary-import-article
9934 Import an arbitrary file into the current mail newsgroup
9935 (@code{gnus-summary-import-article}).  You will be prompted for a file
9936 name, a @code{From} header and a @code{Subject} header.
9937
9938 @item B I
9939 @kindex B I (Summary)
9940 @findex gnus-summary-create-article
9941 Create an empty article in the current mail newsgroups
9942 (@code{gnus-summary-create-article}).  You will be prompted for a
9943 @code{From} header and a @code{Subject} header.
9944
9945 @item B r
9946 @kindex B r (Summary)
9947 @findex gnus-summary-respool-article
9948 @vindex gnus-summary-respool-default-method
9949 Respool the mail article (@code{gnus-summary-respool-article}).
9950 @code{gnus-summary-respool-default-method} will be used as the default
9951 select method when respooling.  This variable is @code{nil} by default,
9952 which means that the current group select method will be used instead.
9953 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9954 (which is the default).
9955
9956 @item B w
9957 @itemx e
9958 @kindex B w (Summary)
9959 @kindex e (Summary)
9960 @findex gnus-summary-edit-article
9961 @kindex C-c C-c (Article)
9962 @findex gnus-summary-edit-article-done
9963 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9964 editing and make the changes permanent, type @kbd{C-c C-c}
9965 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9966 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9967
9968 @item B q
9969 @kindex B q (Summary)
9970 @findex gnus-summary-respool-query
9971 If you want to re-spool an article, you might be curious as to what group
9972 the article will end up in before you do the re-spooling.  This command
9973 will tell you (@code{gnus-summary-respool-query}).
9974
9975 @item B t
9976 @kindex B t (Summary)
9977 @findex gnus-summary-respool-trace
9978 Similarly, this command will display all fancy splitting patterns used
9979 when respooling, if any (@code{gnus-summary-respool-trace}).
9980
9981 @item B p
9982 @kindex B p (Summary)
9983 @findex gnus-summary-article-posted-p
9984 Some people have a tendency to send you ``courtesy'' copies when they
9985 follow up to articles you have posted.  These usually have a
9986 @code{Newsgroups} header in them, but not always.  This command
9987 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9988 article from your news server (or rather, from
9989 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9990 report back whether it found the article or not.  Even if it says that
9991 it didn't find the article, it may have been posted anyway---mail
9992 propagation is much faster than news propagation, and the news copy may
9993 just not have arrived yet.
9994
9995 @item K E
9996 @kindex K E (Summary)
9997 @findex gnus-article-encrypt-body
9998 @vindex gnus-article-encrypt-protocol
9999 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10000 The body is encrypted with the encryption protocol specified by the
10001 variable @code{gnus-article-encrypt-protocol}.
10002
10003 @end table
10004
10005 @vindex gnus-move-split-methods
10006 @cindex moving articles
10007 If you move (or copy) articles regularly, you might wish to have gnus
10008 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10009 variable that uses the same syntax as @code{gnus-split-methods}
10010 (@pxref{Saving Articles}).  You may customize that variable to create
10011 suggestions you find reasonable.  (Note that
10012 @code{gnus-move-split-methods} uses group names where
10013 @code{gnus-split-methods} uses file names.)
10014
10015 @lisp
10016 (setq gnus-move-split-methods
10017       '(("^From:.*Lars Magne" "nnml:junk")
10018         ("^Subject:.*gnus" "nnfolder:important")
10019         (".*" "nnml:misc")))
10020 @end lisp
10021
10022
10023 @node Various Summary Stuff
10024 @section Various Summary Stuff
10025
10026 @menu
10027 * Summary Group Information::   Information oriented commands.
10028 * Searching for Articles::      Multiple article commands.
10029 * Summary Generation Commands::
10030 * Really Various Summary Commands::  Those pesky non-conformant commands.
10031 @end menu
10032
10033 @table @code
10034 @vindex gnus-summary-display-while-building
10035 @item gnus-summary-display-while-building
10036 If non-@code{nil}, show and update the summary buffer as it's being
10037 built.  If @code{t}, update the buffer after every line is inserted.
10038 If the value is an integer, @var{n}, update the display every @var{n}
10039 lines.  The default is @code{nil}.
10040
10041 @vindex gnus-summary-display-arrow
10042 @item gnus-summary-display-arrow
10043 If non-@code{nil}, display an arrow in the fringe to indicate the
10044 current article.
10045
10046 @vindex gnus-summary-mode-hook
10047 @item gnus-summary-mode-hook
10048 This hook is called when creating a summary mode buffer.
10049
10050 @vindex gnus-summary-generate-hook
10051 @item gnus-summary-generate-hook
10052 This is called as the last thing before doing the threading and the
10053 generation of the summary buffer.  It's quite convenient for customizing
10054 the threading variables based on what data the newsgroup has.  This hook
10055 is called from the summary buffer after most summary buffer variables
10056 have been set.
10057
10058 @vindex gnus-summary-prepare-hook
10059 @item gnus-summary-prepare-hook
10060 It is called after the summary buffer has been generated.  You might use
10061 it to, for instance, highlight lines or modify the look of the buffer in
10062 some other ungodly manner.  I don't care.
10063
10064 @vindex gnus-summary-prepared-hook
10065 @item gnus-summary-prepared-hook
10066 A hook called as the very last thing after the summary buffer has been
10067 generated.
10068
10069 @vindex gnus-summary-ignore-duplicates
10070 @item gnus-summary-ignore-duplicates
10071 When gnus discovers two articles that have the same @code{Message-ID},
10072 it has to do something drastic.  No articles are allowed to have the
10073 same @code{Message-ID}, but this may happen when reading mail from some
10074 sources.  Gnus allows you to customize what happens with this variable.
10075 If it is @code{nil} (which is the default), gnus will rename the
10076 @code{Message-ID} (for display purposes only) and display the article as
10077 any other article.  If this variable is @code{t}, it won't display the
10078 article---it'll be as if it never existed.
10079
10080 @vindex gnus-alter-articles-to-read-function
10081 @item gnus-alter-articles-to-read-function
10082 This function, which takes two parameters (the group name and the list
10083 of articles to be selected), is called to allow the user to alter the
10084 list of articles to be selected.
10085
10086 For instance, the following function adds the list of cached articles to
10087 the list in one particular group:
10088
10089 @lisp
10090 (defun my-add-cached-articles (group articles)
10091   (if (string= group "some.group")
10092       (append gnus-newsgroup-cached articles)
10093     articles))
10094 @end lisp
10095
10096 @vindex gnus-newsgroup-variables
10097 @item gnus-newsgroup-variables
10098 A list of newsgroup (summary buffer) local variables, or cons of
10099 variables and their default values (when the default values are not
10100 @code{nil}), that should be made global while the summary buffer is
10101 active.  These variables can be used to set variables in the group
10102 parameters while still allowing them to affect operations done in
10103 other buffers.  For example:
10104
10105 @lisp
10106 (setq gnus-newsgroup-variables
10107       '(message-use-followup-to
10108         (gnus-visible-headers .
10109  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10110 @end lisp
10111
10112 @end table
10113
10114
10115 @node Summary Group Information
10116 @subsection Summary Group Information
10117
10118 @table @kbd
10119
10120 @item H f
10121 @kindex H f (Summary)
10122 @findex gnus-summary-fetch-faq
10123 @vindex gnus-group-faq-directory
10124 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10125 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10126 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10127 is usually a directory on a remote machine.  This variable can also be
10128 a list of directories.  In that case, giving a prefix to this command
10129 will allow you to choose between the various sites.  @code{ange-ftp}
10130 or @code{efs} will probably be used for fetching the file.
10131
10132 @item H d
10133 @kindex H d (Summary)
10134 @findex gnus-summary-describe-group
10135 Give a brief description of the current group
10136 (@code{gnus-summary-describe-group}).  If given a prefix, force
10137 rereading the description from the server.
10138
10139 @item H h
10140 @kindex H h (Summary)
10141 @findex gnus-summary-describe-briefly
10142 Give an extremely brief description of the most important summary
10143 keystrokes (@code{gnus-summary-describe-briefly}).
10144
10145 @item H i
10146 @kindex H i (Summary)
10147 @findex gnus-info-find-node
10148 Go to the gnus info node (@code{gnus-info-find-node}).
10149 @end table
10150
10151
10152 @node Searching for Articles
10153 @subsection Searching for Articles
10154
10155 @table @kbd
10156
10157 @item M-s
10158 @kindex M-s (Summary)
10159 @findex gnus-summary-search-article-forward
10160 Search through all subsequent (raw) articles for a regexp
10161 (@code{gnus-summary-search-article-forward}).
10162
10163 @item M-r
10164 @kindex M-r (Summary)
10165 @findex gnus-summary-search-article-backward
10166 Search through all previous (raw) articles for a regexp
10167 (@code{gnus-summary-search-article-backward}).
10168
10169 @item &
10170 @kindex & (Summary)
10171 @findex gnus-summary-execute-command
10172 This command will prompt you for a header, a regular expression to match
10173 on this field, and a command to be executed if the match is made
10174 (@code{gnus-summary-execute-command}).  If the header is an empty
10175 string, the match is done on the entire article.  If given a prefix,
10176 search backward instead.
10177
10178 For instance, @kbd{& RET some.*string #} will put the process mark on
10179 all articles that have heads or bodies that match @samp{some.*string}.
10180
10181 @item M-&
10182 @kindex M-& (Summary)
10183 @findex gnus-summary-universal-argument
10184 Perform any operation on all articles that have been marked with
10185 the process mark (@code{gnus-summary-universal-argument}).
10186 @end table
10187
10188 @node Summary Generation Commands
10189 @subsection Summary Generation Commands
10190
10191 @table @kbd
10192
10193 @item Y g
10194 @kindex Y g (Summary)
10195 @findex gnus-summary-prepare
10196 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10197
10198 @item Y c
10199 @kindex Y c (Summary)
10200 @findex gnus-summary-insert-cached-articles
10201 Pull all cached articles (for the current group) into the summary buffer
10202 (@code{gnus-summary-insert-cached-articles}).
10203
10204 @item Y d
10205 @kindex Y d (Summary)
10206 @findex gnus-summary-insert-dormant-articles
10207 Pull all dormant articles (for the current group) into the summary buffer
10208 (@code{gnus-summary-insert-dormant-articles}).
10209
10210 @end table
10211
10212
10213 @node Really Various Summary Commands
10214 @subsection Really Various Summary Commands
10215
10216 @table @kbd
10217
10218 @item A D
10219 @itemx C-d
10220 @kindex C-d (Summary)
10221 @kindex A D (Summary)
10222 @findex gnus-summary-enter-digest-group
10223 If the current article is a collection of other articles (for instance,
10224 a digest), you might use this command to enter a group based on the that
10225 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10226 guess what article type is currently displayed unless you give a prefix
10227 to this command, which forces a ``digest'' interpretation.  Basically,
10228 whenever you see a message that is a collection of other messages of
10229 some format, you @kbd{C-d} and read these messages in a more convenient
10230 fashion.
10231
10232 @item C-M-d
10233 @kindex C-M-d (Summary)
10234 @findex gnus-summary-read-document
10235 This command is very similar to the one above, but lets you gather
10236 several documents into one biiig group
10237 (@code{gnus-summary-read-document}).  It does this by opening several
10238 @code{nndoc} groups for each document, and then opening an
10239 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10240 command understands the process/prefix convention
10241 (@pxref{Process/Prefix}).
10242
10243 @item C-t
10244 @kindex C-t (Summary)
10245 @findex gnus-summary-toggle-truncation
10246 Toggle truncation of summary lines
10247 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10248 line centering function in the summary buffer, so it's not a good idea
10249 to have truncation switched off while reading articles.
10250
10251 @item =
10252 @kindex = (Summary)
10253 @findex gnus-summary-expand-window
10254 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10255 If given a prefix, force an @code{article} window configuration.
10256
10257 @item C-M-e
10258 @kindex C-M-e (Summary)
10259 @findex gnus-summary-edit-parameters
10260 Edit the group parameters (@pxref{Group Parameters}) of the current
10261 group (@code{gnus-summary-edit-parameters}).
10262
10263 @item C-M-a
10264 @kindex C-M-a (Summary)
10265 @findex gnus-summary-customize-parameters
10266 Customize the group parameters (@pxref{Group Parameters}) of the current
10267 group (@code{gnus-summary-customize-parameters}).
10268
10269 @end table
10270
10271
10272 @node Exiting the Summary Buffer
10273 @section Exiting the Summary Buffer
10274 @cindex summary exit
10275 @cindex exiting groups
10276
10277 Exiting from the summary buffer will normally update all info on the
10278 group and return you to the group buffer.
10279
10280 @table @kbd
10281
10282 @item Z Z
10283 @itemx q
10284 @kindex Z Z (Summary)
10285 @kindex q (Summary)
10286 @findex gnus-summary-exit
10287 @vindex gnus-summary-exit-hook
10288 @vindex gnus-summary-prepare-exit-hook
10289 @vindex gnus-group-no-more-groups-hook
10290 @c @icon{gnus-summary-exit}
10291 Exit the current group and update all information on the group
10292 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10293 called before doing much of the exiting, which calls
10294 @code{gnus-summary-expire-articles} by default.
10295 @code{gnus-summary-exit-hook} is called after finishing the exit
10296 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10297 group mode having no more (unread) groups.
10298
10299 @item Z E
10300 @itemx Q
10301 @kindex Z E (Summary)
10302 @kindex Q (Summary)
10303 @findex gnus-summary-exit-no-update
10304 Exit the current group without updating any information on the group
10305 (@code{gnus-summary-exit-no-update}).
10306
10307 @item Z c
10308 @itemx c
10309 @kindex Z c (Summary)
10310 @kindex c (Summary)
10311 @findex gnus-summary-catchup-and-exit
10312 @c @icon{gnus-summary-catchup-and-exit}
10313 Mark all unticked articles in the group as read and then exit
10314 (@code{gnus-summary-catchup-and-exit}).
10315
10316 @item Z C
10317 @kindex Z C (Summary)
10318 @findex gnus-summary-catchup-all-and-exit
10319 Mark all articles, even the ticked ones, as read and then exit
10320 (@code{gnus-summary-catchup-all-and-exit}).
10321
10322 @item Z n
10323 @kindex Z n (Summary)
10324 @findex gnus-summary-catchup-and-goto-next-group
10325 Mark all articles as read and go to the next group
10326 (@code{gnus-summary-catchup-and-goto-next-group}).
10327
10328 @item Z R
10329 @kindex Z R (Summary)
10330 @findex gnus-summary-reselect-current-group
10331 Exit this group, and then enter it again
10332 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10333 all articles, both read and unread.
10334
10335 @item Z G
10336 @itemx M-g
10337 @kindex Z G (Summary)
10338 @kindex M-g (Summary)
10339 @findex gnus-summary-rescan-group
10340 @c @icon{gnus-summary-mail-get}
10341 Exit the group, check for new articles in the group, and select the
10342 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10343 articles, both read and unread.
10344
10345 @item Z N
10346 @kindex Z N (Summary)
10347 @findex gnus-summary-next-group
10348 Exit the group and go to the next group
10349 (@code{gnus-summary-next-group}).
10350
10351 @item Z P
10352 @kindex Z P (Summary)
10353 @findex gnus-summary-prev-group
10354 Exit the group and go to the previous group
10355 (@code{gnus-summary-prev-group}).
10356
10357 @item Z s
10358 @kindex Z s (Summary)
10359 @findex gnus-summary-save-newsrc
10360 Save the current number of read/marked articles in the dribble buffer
10361 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10362 given a prefix, also save the @file{.newsrc} file(s).  Using this
10363 command will make exit without updating (the @kbd{Q} command) worthless.
10364 @end table
10365
10366 @vindex gnus-exit-group-hook
10367 @code{gnus-exit-group-hook} is called when you exit the current group
10368 with an ``updating'' exit.  For instance @kbd{Q}
10369 (@code{gnus-summary-exit-no-update}) does not call this hook.
10370
10371 @findex gnus-summary-wake-up-the-dead
10372 @findex gnus-dead-summary-mode
10373 @vindex gnus-kill-summary-on-exit
10374 If you're in the habit of exiting groups, and then changing your mind
10375 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10376 If you do that, gnus won't kill the summary buffer when you exit it.
10377 (Quelle surprise!)  Instead it will change the name of the buffer to
10378 something like @samp{*Dead Summary ... *} and install a minor mode
10379 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10380 buffer, you'll find that all keys are mapped to a function called
10381 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10382 summary buffer will result in a live, normal summary buffer.
10383
10384 There will never be more than one dead summary buffer at any one time.
10385
10386 @vindex gnus-use-cross-reference
10387 The data on the current group will be updated (which articles you have
10388 read, which articles you have replied to, etc.) when you exit the
10389 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10390 @code{t} (which is the default), articles that are cross-referenced to
10391 this group and are marked as read, will also be marked as read in the
10392 other subscribed groups they were cross-posted to.  If this variable is
10393 neither @code{nil} nor @code{t}, the article will be marked as read in
10394 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10395
10396
10397 @node Crosspost Handling
10398 @section Crosspost Handling
10399
10400 @cindex velveeta
10401 @cindex spamming
10402 Marking cross-posted articles as read ensures that you'll never have to
10403 read the same article more than once.  Unless, of course, somebody has
10404 posted it to several groups separately.  Posting the same article to
10405 several groups (not cross-posting) is called @dfn{spamming}, and you are
10406 by law required to send nasty-grams to anyone who perpetrates such a
10407 heinous crime.  You may want to try NoCeM handling to filter out spam
10408 (@pxref{NoCeM}).
10409
10410 Remember: Cross-posting is kinda ok, but posting the same article
10411 separately to several groups is not.  Massive cross-posting (aka.
10412 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10413 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10414 excessive crossposting (@pxref{Summary Mail Commands}).
10415
10416 @cindex cross-posting
10417 @cindex Xref
10418 @cindex @acronym{NOV}
10419 One thing that may cause Gnus to not do the cross-posting thing
10420 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10421 (which is very nice, because it speeds things up considerably) which
10422 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10423 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10424 even with @sc{xover} by registering the @code{Xref} lines of all
10425 articles you actually read, but if you kill the articles, or just mark
10426 them as read without reading them, Gnus will not get a chance to snoop
10427 the @code{Xref} lines out of these articles, and will be unable to use
10428 the cross reference mechanism.
10429
10430 @cindex LIST overview.fmt
10431 @cindex overview.fmt
10432 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10433 in its overview files, try @samp{telnet your.nntp.server nntp},
10434 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10435 overview.fmt}.  This may not work, but if it does, and the last line you
10436 get does not read @samp{Xref:full}, then you should shout and whine at
10437 your news admin until she includes the @code{Xref} header in the
10438 overview files.
10439
10440 @vindex gnus-nov-is-evil
10441 If you want Gnus to get the @code{Xref}s right all the time, you have to
10442 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10443 considerably.
10444
10445 C'est la vie.
10446
10447 For an alternative approach, @pxref{Duplicate Suppression}.
10448
10449
10450 @node Duplicate Suppression
10451 @section Duplicate Suppression
10452
10453 By default, gnus tries to make sure that you don't have to read the same
10454 article more than once by utilizing the crossposting mechanism
10455 (@pxref{Crosspost Handling}).  However, that simple and efficient
10456 approach may not work satisfactory for some users for various
10457 reasons.
10458
10459 @enumerate
10460 @item
10461 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10462 is evil and not very common.
10463
10464 @item
10465 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10466 @file{.overview} data bases.  This is evil and all too common, alas.
10467
10468 @item
10469 You may be reading the same group (or several related groups) from
10470 different @acronym{NNTP} servers.
10471
10472 @item
10473 You may be getting mail that duplicates articles posted to groups.
10474 @end enumerate
10475
10476 I'm sure there are other situations where @code{Xref} handling fails as
10477 well, but these four are the most common situations.
10478
10479 If, and only if, @code{Xref} handling fails for you, then you may
10480 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10481 will remember the @code{Message-ID}s of all articles you have read or
10482 otherwise marked as read, and then, as if by magic, mark them as read
10483 all subsequent times you see them---in @emph{all} groups.  Using this
10484 mechanism is quite likely to be somewhat inefficient, but not overly
10485 so.  It's certainly preferable to reading the same articles more than
10486 once.
10487
10488 Duplicate suppression is not a very subtle instrument.  It's more like a
10489 sledge hammer than anything else.  It works in a very simple
10490 fashion---if you have marked an article as read, it adds this Message-ID
10491 to a cache.  The next time it sees this Message-ID, it will mark the
10492 article as read with the @samp{M} mark.  It doesn't care what group it
10493 saw the article in.
10494
10495 @table @code
10496 @item gnus-suppress-duplicates
10497 @vindex gnus-suppress-duplicates
10498 If non-@code{nil}, suppress duplicates.
10499
10500 @item gnus-save-duplicate-list
10501 @vindex gnus-save-duplicate-list
10502 If non-@code{nil}, save the list of duplicates to a file.  This will
10503 make startup and shutdown take longer, so the default is @code{nil}.
10504 However, this means that only duplicate articles read in a single gnus
10505 session are suppressed.
10506
10507 @item gnus-duplicate-list-length
10508 @vindex gnus-duplicate-list-length
10509 This variable says how many @code{Message-ID}s to keep in the duplicate
10510 suppression list.  The default is 10000.
10511
10512 @item gnus-duplicate-file
10513 @vindex gnus-duplicate-file
10514 The name of the file to store the duplicate suppression list in.  The
10515 default is @file{~/News/suppression}.
10516 @end table
10517
10518 If you have a tendency to stop and start gnus often, setting
10519 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10520 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10521 the other hand, saving the list makes startup and shutdown much slower,
10522 so that means that if you stop and start gnus often, you should set
10523 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10524 to you to figure out, I think.
10525
10526 @node Security
10527 @section Security
10528
10529 Gnus is able to verify signed messages or decrypt encrypted messages.
10530 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10531 and @acronym{S/MIME}, however you need some external programs to get
10532 things to work:
10533
10534 @enumerate
10535 @item
10536 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10537 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10538 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10539 Manual}), but Mailcrypt and gpg.el are also supported.
10540
10541 @item
10542 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10543 or newer is recommended.
10544
10545 @end enumerate
10546
10547 More information on how to set things up can be found in the message
10548 manual (@pxref{Security, ,Security, message, Message Manual}).
10549
10550 @table @code
10551 @item mm-verify-option
10552 @vindex mm-verify-option
10553 Option of verifying signed parts.  @code{never}, not verify;
10554 @code{always}, always verify; @code{known}, only verify known
10555 protocols.  Otherwise, ask user.
10556
10557 @item mm-decrypt-option
10558 @vindex mm-decrypt-option
10559 Option of decrypting encrypted parts.  @code{never}, no decryption;
10560 @code{always}, always decrypt; @code{known}, only decrypt known
10561 protocols.  Otherwise, ask user.
10562
10563 @item mml1991-use
10564 @vindex mml1991-use
10565 Symbol indicating elisp interface to OpenPGP implementation for
10566 @acronym{PGP} messages.  The default is @code{pgg}, but
10567 @code{mailcrypt} and @code{gpg} are also supported although
10568 deprecated.
10569
10570 @item mml2015-use
10571 @vindex mml2015-use
10572 Symbol indicating elisp interface to OpenPGP implementation for
10573 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10574 @code{mailcrypt} and @code{gpg} are also supported although
10575 deprecated.
10576
10577 @end table
10578
10579 @cindex snarfing keys
10580 @cindex importing PGP keys
10581 @cindex PGP key ring import
10582 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10583 key ring) is not supported explicitly through a menu item or command,
10584 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10585 allowing you to specify whatever action you think is appropriate
10586 through the usual @acronym{MIME} infrastructure.  You can use a
10587 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10588 Emacs MIME Manual}) such as the following to import keys using GNU
10589 Privacy Guard when you click on the @acronym{MIME} button
10590 (@pxref{Using MIME}).
10591
10592 @example
10593 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10594 @end example
10595 @noindent
10596 This happens to also be the default action defined in
10597 @code{mailcap-mime-data}.
10598
10599 @node Mailing List
10600 @section Mailing List
10601 @cindex mailing list
10602 @cindex RFC 2396
10603
10604 @kindex A M (summary)
10605 @findex gnus-mailing-list-insinuate
10606 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10607 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10608 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10609 summary buffer.
10610
10611 That enables the following commands to the summary buffer:
10612
10613 @table @kbd
10614
10615 @item C-c C-n h
10616 @kindex C-c C-n h (Summary)
10617 @findex gnus-mailing-list-help
10618 Send a message to fetch mailing list help, if List-Help field exists.
10619
10620 @item C-c C-n s
10621 @kindex C-c C-n s (Summary)
10622 @findex gnus-mailing-list-subscribe
10623 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10624
10625 @item C-c C-n u
10626 @kindex C-c C-n u (Summary)
10627 @findex gnus-mailing-list-unsubscribe
10628 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10629 field exists.
10630
10631 @item C-c C-n p
10632 @kindex C-c C-n p (Summary)
10633 @findex gnus-mailing-list-post
10634 Post to the mailing list, if List-Post field exists.
10635
10636 @item C-c C-n o
10637 @kindex C-c C-n o (Summary)
10638 @findex gnus-mailing-list-owner
10639 Send a message to the mailing list owner, if List-Owner field exists.
10640
10641 @item C-c C-n a
10642 @kindex C-c C-n a (Summary)
10643 @findex gnus-mailing-list-owner
10644 Browse the mailing list archive, if List-Archive field exists.
10645
10646 @end table
10647
10648
10649 @node Article Buffer
10650 @chapter Article Buffer
10651 @cindex article buffer
10652
10653 The articles are displayed in the article buffer, of which there is only
10654 one.  All the summary buffers share the same article buffer unless you
10655 tell gnus otherwise.
10656
10657 @menu
10658 * Hiding Headers::              Deciding what headers should be displayed.
10659 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10660 * Customizing Articles::        Tailoring the look of the articles.
10661 * Article Keymap::              Keystrokes available in the article buffer.
10662 * Misc Article::                Other stuff.
10663 @end menu
10664
10665
10666 @node Hiding Headers
10667 @section Hiding Headers
10668 @cindex hiding headers
10669 @cindex deleting headers
10670
10671 The top section of each article is the @dfn{head}.  (The rest is the
10672 @dfn{body}, but you may have guessed that already.)
10673
10674 @vindex gnus-show-all-headers
10675 There is a lot of useful information in the head: the name of the person
10676 who wrote the article, the date it was written and the subject of the
10677 article.  That's well and nice, but there's also lots of information
10678 most people do not want to see---what systems the article has passed
10679 through before reaching you, the @code{Message-ID}, the
10680 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10681 of some of those lines.  If you want to keep all those lines in the
10682 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10683
10684 Gnus provides you with two variables for sifting headers:
10685
10686 @table @code
10687
10688 @item gnus-visible-headers
10689 @vindex gnus-visible-headers
10690 If this variable is non-@code{nil}, it should be a regular expression
10691 that says what headers you wish to keep in the article buffer.  All
10692 headers that do not match this variable will be hidden.
10693
10694 For instance, if you only want to see the name of the person who wrote
10695 the article and the subject, you'd say:
10696
10697 @lisp
10698 (setq gnus-visible-headers "^From:\\|^Subject:")
10699 @end lisp
10700
10701 This variable can also be a list of regexps to match headers to
10702 remain visible.
10703
10704 @item gnus-ignored-headers
10705 @vindex gnus-ignored-headers
10706 This variable is the reverse of @code{gnus-visible-headers}.  If this
10707 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10708 should be a regular expression that matches all lines that you want to
10709 hide.  All lines that do not match this variable will remain visible.
10710
10711 For instance, if you just want to get rid of the @code{References} field
10712 and the @code{Xref} field, you might say:
10713
10714 @lisp
10715 (setq gnus-ignored-headers "^References:\\|^Xref:")
10716 @end lisp
10717
10718 This variable can also be a list of regexps to match headers to
10719 be removed.
10720
10721 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10722 variable will have no effect.
10723
10724 @end table
10725
10726 @vindex gnus-sorted-header-list
10727 Gnus can also sort the headers for you.  (It does this by default.)  You
10728 can control the sorting by setting the @code{gnus-sorted-header-list}
10729 variable.  It is a list of regular expressions that says in what order
10730 the headers are to be displayed.
10731
10732 For instance, if you want the name of the author of the article first,
10733 and then the subject, you might say something like:
10734
10735 @lisp
10736 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10737 @end lisp
10738
10739 Any headers that are to remain visible, but are not listed in this
10740 variable, will be displayed in random order after all the headers listed in this variable.
10741
10742 @findex gnus-article-hide-boring-headers
10743 @vindex gnus-boring-article-headers
10744 You can hide further boring headers by setting
10745 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10746 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10747 list, but this list doesn't actually contain header names.  Instead is
10748 lists various @dfn{boring conditions} that Gnus can check and remove
10749 from sight.
10750
10751 These conditions are:
10752 @table @code
10753 @item empty
10754 Remove all empty headers.
10755 @item followup-to
10756 Remove the @code{Followup-To} header if it is identical to the
10757 @code{Newsgroups} header.
10758 @item reply-to
10759 Remove the @code{Reply-To} header if it lists the same address as the
10760 @code{From} header, or if the @code{broken-reply-to} group parameter is
10761 set.
10762 @item newsgroups
10763 Remove the @code{Newsgroups} header if it only contains the current group
10764 name.
10765 @item to-address
10766 Remove the @code{To} header if it only contains the address identical to
10767 the current group's @code{to-address} parameter.
10768 @item to-list
10769 Remove the @code{To} header if it only contains the address identical to
10770 the current group's @code{to-list} parameter.
10771 @item cc-list
10772 Remove the @code{CC} header if it only contains the address identical to
10773 the current group's @code{to-list} parameter.
10774 @item date
10775 Remove the @code{Date} header if the article is less than three days
10776 old.
10777 @item long-to
10778 Remove the @code{To} header if it is very long.
10779 @item many-to
10780 Remove all @code{To} headers if there are more than one.
10781 @end table
10782
10783 To include these three elements, you could say something like:
10784
10785 @lisp
10786 (setq gnus-boring-article-headers
10787       '(empty followup-to reply-to))
10788 @end lisp
10789
10790 This is also the default value for this variable.
10791
10792
10793 @node Using MIME
10794 @section Using MIME
10795 @cindex @acronym{MIME}
10796
10797 Mime is a standard for waving your hands through the air, aimlessly,
10798 while people stand around yawning.
10799
10800 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10801 while all newsreaders die of fear.
10802
10803 @acronym{MIME} may specify what character set the article uses, the encoding
10804 of the characters, and it also makes it possible to embed pictures and
10805 other naughty stuff in innocent-looking articles.
10806
10807 @vindex gnus-show-mime
10808 @vindex gnus-article-display-method-for-mime
10809 @findex gnus-article-display-mime-message
10810 gnus handles @acronym{MIME} by pushing the articles through
10811 @code{gnus-article-display-method-for-mime}, which is
10812 @code{gnus-article-display-mime-message} by default.  This function
10813 calls the @acronym{SEMI} MIME-View program to actually do the work.  For
10814 more information on @acronym{SEMI} MIME-View, see its manual page
10815 (however it is not existed yet, sorry).
10816
10817 Set @code{gnus-show-mime} to @code{t} if you want to use
10818 @acronym{MIME} all the time.  If you have @code{gnus-show-mime} set,
10819 then you'll see some unfortunate display glitches in the article buffer.
10820 These can't be avoided.
10821
10822 In GNUS or Gnus, it might be best to just use the toggling functions
10823 from the summary buffer to avoid getting nasty surprises. (For instance,
10824 you enter the group @samp{alt.sing-a-long} and, before you know it,
10825 @acronym{MIME} has decoded the sound file in the article and some
10826 horrible sing-a-long song comes screaming out your speakers, and you
10827 can't find the volume button, because there isn't one, and people are
10828 starting to look at you, and you try to stop the program, but you can't,
10829 and you can't find the program to control the volume, and everybody else
10830 in the room suddenly decides to look at you disdainfully, and you'll
10831 feel rather stupid.)
10832
10833 Any similarity to real events and people is purely coincidental.  Ahem.
10834
10835 To avoid such kind of situation, gnus stops to use
10836 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10837 non-@code{nil} every-time, then you can push button in the article
10838 buffer when there are nobody else.
10839
10840 Also @pxref{MIME Commands}.
10841
10842
10843 @node Customizing Articles
10844 @section Customizing Articles
10845 @cindex article customization
10846
10847 A slew of functions for customizing how the articles are to look like
10848 exist.  You can call these functions interactively
10849 (@pxref{Article Washing}), or you can have them
10850 called automatically when you select the articles.
10851
10852 To have them called automatically, you should set the corresponding
10853 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10854 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10855 be set, but first we discuss the values these variables can have.
10856
10857 Note: Some values, while valid, make little sense.  Check the list below
10858 for sensible values.
10859
10860 @enumerate
10861 @item
10862 @code{nil}: Don't do this treatment.
10863
10864 @item
10865 @code{t}: Do this treatment on all body parts.
10866
10867 @item
10868 @code{head}: Do the treatment on the headers.
10869
10870 @item
10871 @code{last}: Do this treatment on the last part.
10872
10873 @item
10874 An integer: Do this treatment on all body parts that have a length less
10875 than this number.
10876
10877 @item
10878 A list of strings: Do this treatment on all body parts that are in
10879 articles that are read in groups that have names that match one of the
10880 regexps in the list.
10881
10882 @item
10883 A list where the first element is not a string:
10884
10885 The list is evaluated recursively.  The first element of the list is a
10886 predicate.  The following predicates are recognized: @code{or},
10887 @code{and}, @code{not} and @code{typep}.  Here's an example:
10888
10889 @lisp
10890 (or last
10891     (typep "text/x-vcard"))
10892 @end lisp
10893
10894 @item
10895 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10896 non-nil.
10897
10898 @end enumerate
10899
10900 You may have noticed that the word @dfn{part} is used here.  This refers
10901 to the fact that some messages are @acronym{MIME} multipart articles that may
10902 be divided into several parts.  Articles that are not multiparts are
10903 considered to contain just a single part.
10904
10905 @vindex gnus-article-treat-types
10906 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10907 want to, but by default, only @samp{text/plain} parts are given the
10908 treatment.  This is controlled by the @code{gnus-article-treat-types}
10909 variable, which is a list of regular expressions that are matched to the
10910 type of the part.  This variable is ignored if the value of the
10911 controlling variable is a predicate list, as described above.
10912
10913 The following treatment options are available.  The easiest way to
10914 customize this is to examine the @code{gnus-article-treat} customization
10915 group.  Values in parenthesis are suggested sensible values.  Others are
10916 possible but those listed are probably sufficient for most people.
10917
10918 @table @code
10919 @item gnus-treat-buttonize (t, integer)
10920 @item gnus-treat-buttonize-head (head)
10921
10922 @xref{Article Buttons}.
10923
10924 @item gnus-treat-capitalize-sentences (t, integer)
10925 @item gnus-treat-overstrike (t, integer)
10926 @item gnus-treat-strip-cr (t, integer)
10927 @item gnus-treat-strip-headers-in-body (t, integer)
10928 @item gnus-treat-strip-leading-blank-lines (t, integer)
10929 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10930 @item gnus-treat-strip-pem (t, last, integer)
10931 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10932 @item gnus-treat-unsplit-urls (t, integer)
10933 @item gnus-treat-wash-html (t, integer)
10934 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10935
10936 @xref{Article Washing}.
10937
10938 @item gnus-treat-date-english (head)
10939 @item gnus-treat-date-iso8601 (head)
10940 @item gnus-treat-date-lapsed (head)
10941 @item gnus-treat-date-local (head)
10942 @item gnus-treat-date-original (head)
10943 @item gnus-treat-date-user-defined (head)
10944 @item gnus-treat-date-ut (head)
10945
10946 @xref{Article Date}.
10947
10948 @item gnus-treat-from-picon (head)
10949 @item gnus-treat-mail-picon (head)
10950 @item gnus-treat-newsgroups-picon (head)
10951
10952 @xref{Picons}.
10953
10954 @item gnus-treat-display-smileys (t, integer)
10955
10956 @item gnus-treat-body-boundary (head)
10957
10958 @vindex gnus-body-boundary-delimiter
10959 Adds a delimiter between header and body, the string used as delimiter
10960 is controlled by @code{gnus-body-boundary-delimiter}.
10961
10962 @xref{Smileys}.
10963
10964 @item gnus-treat-display-xface (head)
10965
10966 @xref{X-Face}.
10967
10968 @item gnus-treat-display-face (head)
10969
10970 @xref{Face}.
10971
10972 @item gnus-treat-emphasize (t, head, integer)
10973 @item gnus-treat-fill-article (t, integer)
10974 @item gnus-treat-fill-long-lines (t, integer)
10975 @item gnus-treat-hide-boring-headers (head)
10976 @item gnus-treat-hide-citation (t, integer)
10977 @item gnus-treat-hide-citation-maybe (t, integer)
10978 @item gnus-treat-hide-headers (head)
10979 @item gnus-treat-hide-signature (t, last)
10980 @item gnus-treat-strip-banner (t, last)
10981 @item gnus-treat-strip-list-identifiers (head)
10982
10983 @xref{Article Hiding}.
10984
10985 @item gnus-treat-highlight-citation (t, integer)
10986 @item gnus-treat-highlight-headers (head)
10987 @item gnus-treat-highlight-signature (t, last, integer)
10988
10989 @xref{Article Highlighting}.
10990
10991 @item gnus-treat-play-sounds
10992 @item gnus-treat-translate
10993 @item gnus-treat-x-pgp-sig (head)
10994
10995 @item gnus-treat-unfold-headers (head)
10996 @item gnus-treat-fold-headers (head)
10997 @item gnus-treat-fold-newsgroups (head)
10998 @item gnus-treat-leading-whitespace (head)
10999
11000 @xref{Article Header}.
11001
11002
11003 @end table
11004
11005 @vindex gnus-part-display-hook
11006 You can, of course, write your own functions to be called from
11007 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11008 part, and you can do anything you like, pretty much.  There is no
11009 information that you have to keep in the buffer---you can change
11010 everything.
11011
11012
11013 @node Article Keymap
11014 @section Article Keymap
11015
11016 Most of the keystrokes in the summary buffer can also be used in the
11017 article buffer.  They should behave as if you typed them in the summary
11018 buffer, which means that you don't actually have to have a summary
11019 buffer displayed while reading.  You can do it all from the article
11020 buffer.
11021
11022 A few additional keystrokes are available:
11023
11024 @table @kbd
11025
11026 @item SPACE
11027 @kindex SPACE (Article)
11028 @findex gnus-article-next-page
11029 Scroll forwards one page (@code{gnus-article-next-page}).
11030 This is exactly the same as @kbd{h SPACE h}.
11031
11032 @item DEL
11033 @kindex DEL (Article)
11034 @findex gnus-article-prev-page
11035 Scroll backwards one page (@code{gnus-article-prev-page}).
11036 This is exactly the same as @kbd{h DEL h}.
11037
11038 @item C-c ^
11039 @kindex C-c ^ (Article)
11040 @findex gnus-article-refer-article
11041 If point is in the neighborhood of a @code{Message-ID} and you press
11042 @kbd{C-c ^}, Gnus will try to get that article from the server
11043 (@code{gnus-article-refer-article}).
11044
11045 @item C-c C-m
11046 @kindex C-c C-m (Article)
11047 @findex gnus-article-mail
11048 Send a reply to the address near point (@code{gnus-article-mail}).  If
11049 given a prefix, include the mail.
11050
11051 @item s
11052 @kindex s (Article)
11053 @findex gnus-article-show-summary
11054 Reconfigure the buffers so that the summary buffer becomes visible
11055 (@code{gnus-article-show-summary}).
11056
11057 @item ?
11058 @kindex ? (Article)
11059 @findex gnus-article-describe-briefly
11060 Give a very brief description of the available keystrokes
11061 (@code{gnus-article-describe-briefly}).
11062
11063 @item TAB
11064 @kindex TAB (Article)
11065 @findex gnus-article-next-button
11066 Go to the next button, if any (@code{gnus-article-next-button}).  This
11067 only makes sense if you have buttonizing turned on.
11068
11069 @item M-TAB
11070 @kindex M-TAB (Article)
11071 @findex gnus-article-prev-button
11072 Go to the previous button, if any (@code{gnus-article-prev-button}).
11073
11074 @item R
11075 @kindex R (Article)
11076 @findex gnus-article-reply-with-original
11077 Send a reply to the current article and yank the current article
11078 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11079 wide reply.  If the region is active, only yank the text in the
11080 region.
11081
11082 @item F
11083 @kindex F (Article)
11084 @findex gnus-article-followup-with-original
11085 Send a followup to the current article and yank the current article
11086 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11087 a wide reply.  If the region is active, only yank the text in the
11088 region.
11089
11090
11091 @end table
11092
11093
11094 @node Misc Article
11095 @section Misc Article
11096
11097 @table @code
11098
11099 @item gnus-single-article-buffer
11100 @vindex gnus-single-article-buffer
11101 If non-@code{nil}, use the same article buffer for all the groups.
11102 (This is the default.)  If @code{nil}, each group will have its own
11103 article buffer.
11104
11105 @vindex gnus-article-decode-hook
11106 @item gnus-article-decode-hook
11107 @cindex @acronym{MIME}
11108 Hook used to decode @acronym{MIME} articles.  The default value is
11109 @code{(article-decode-charset article-decode-encoded-words)}
11110
11111 @vindex gnus-article-prepare-hook
11112 @item gnus-article-prepare-hook
11113 This hook is called right after the article has been inserted into the
11114 article buffer.  It is mainly intended for functions that do something
11115 depending on the contents; it should probably not be used for changing
11116 the contents of the article buffer.
11117
11118 @item gnus-article-mode-hook
11119 @vindex gnus-article-mode-hook
11120 Hook called in article mode buffers.
11121
11122 @item gnus-article-mode-syntax-table
11123 @vindex gnus-article-mode-syntax-table
11124 Syntax table used in article buffers.  It is initialized from
11125 @code{text-mode-syntax-table}.
11126
11127 @vindex gnus-article-over-scroll
11128 @item gnus-article-over-scroll
11129 If non-@code{nil}, allow scrolling the article buffer even when there
11130 no more new text to scroll in.  The default is @code{nil}.
11131
11132 @vindex gnus-article-mode-line-format
11133 @item gnus-article-mode-line-format
11134 This variable is a format string along the same lines as
11135 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11136 accepts the same format specifications as that variable, with two
11137 extensions:
11138
11139 @table @samp
11140
11141 @item w
11142 The @dfn{wash status} of the article.  This is a short string with one
11143 character for each possible article wash operation that may have been
11144 performed.  The characters and their meaning:
11145
11146 @table @samp
11147
11148 @item c
11149 Displayed when cited text may be hidden in the article buffer.
11150
11151 @item h
11152 Displayed when headers are hidden in the article buffer.
11153
11154 @item p
11155 Displayed when article is digitally signed or encrypted, and Gnus has
11156 hidden the security headers.  (N.B. does not tell anything about
11157 security status, i.e. good or bad signature.)
11158
11159 @item s
11160 Displayed when the signature has been hidden in the Article buffer.
11161
11162 @item o
11163 Displayed when Gnus has treated overstrike characters in the article buffer.
11164
11165 @item e
11166 Displayed when Gnus has treated emphasised strings in the article buffer.
11167
11168 @end table
11169
11170 @item m
11171 The number of @acronym{MIME} parts in the article.
11172
11173 @end table
11174
11175 @vindex gnus-break-pages
11176
11177 @item gnus-break-pages
11178 Controls whether @dfn{page breaking} is to take place.  If this variable
11179 is non-@code{nil}, the articles will be divided into pages whenever a
11180 page delimiter appears in the article.  If this variable is @code{nil},
11181 paging will not be done.
11182
11183 @item gnus-page-delimiter
11184 @vindex gnus-page-delimiter
11185 This is the delimiter mentioned above.  By default, it is @samp{^L}
11186 (formfeed).
11187
11188 @cindex IDNA
11189 @cindex internationalized domain names
11190 @vindex gnus-use-idna
11191 @item gnus-use-idna
11192 This variable controls whether Gnus performs IDNA decoding of
11193 internationalized domain names inside @samp{From}, @samp{To} and
11194 @samp{Cc} headers.  This requires
11195 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11196 variable is only enabled if you have installed it.
11197
11198 @end table
11199
11200
11201 @node Composing Messages
11202 @chapter Composing Messages
11203 @cindex composing messages
11204 @cindex messages
11205 @cindex mail
11206 @cindex sending mail
11207 @cindex reply
11208 @cindex followup
11209 @cindex post
11210 @cindex using gpg
11211 @cindex using s/mime
11212 @cindex using smime
11213
11214 @kindex C-c C-c (Post)
11215 All commands for posting and mailing will put you in a message buffer
11216 where you can edit the article all you like, before you send the
11217 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11218 Message Manual}.  Where the message will be posted/mailed to depends
11219 on your setup (@pxref{Posting Server}).
11220
11221 @menu
11222 * Mail::                        Mailing and replying.
11223 * Posting Server::              What server should you post and mail via?
11224 * Mail and Post::               Mailing and posting at the same time.
11225 * Archived Messages::           Where Gnus stores the messages you've sent.
11226 * Posting Styles::              An easier way to specify who you are.
11227 * Drafts::                      Postponing messages and rejected messages.
11228 * Rejected Articles::           What happens if the server doesn't like your article?
11229 * Signing and encrypting::      How to compose secure messages.
11230 @end menu
11231
11232 Also @pxref{Canceling and Superseding} for information on how to
11233 remove articles you shouldn't have posted.
11234
11235
11236 @node Mail
11237 @section Mail
11238
11239 Variables for customizing outgoing mail:
11240
11241 @table @code
11242 @item gnus-uu-digest-headers
11243 @vindex gnus-uu-digest-headers
11244 List of regexps to match headers included in digested messages.  The
11245 headers will be included in the sequence they are matched.  If
11246 @code{nil} include all headers.
11247
11248 @item gnus-add-to-list
11249 @vindex gnus-add-to-list
11250 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11251 that have none when you do a @kbd{a}.
11252
11253 @item gnus-confirm-mail-reply-to-news
11254 @vindex gnus-confirm-mail-reply-to-news
11255 This can also be a function receiving the group name as the only
11256 parameter which should return non-@code{nil} if a confirmation is
11257 needed, or a regular expression matching group names, where
11258 confirmation is should be asked for.
11259
11260 If you find yourself never wanting to reply to mail, but occasionally
11261 press R anyway, this variable might be for you.
11262
11263 @item gnus-confirm-treat-mail-like-news
11264 @vindex gnus-confirm-treat-mail-like-news
11265 If non-@code{nil}, Gnus also requests confirmation according to
11266 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11267 useful for treating mailing lists like newsgroups.
11268
11269 @end table
11270
11271
11272 @node Posting Server
11273 @section Posting Server
11274
11275 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11276 (extremely intelligent, of course) article, where does it go?
11277
11278 Thank you for asking.  I hate you.
11279
11280 It can be quite complicated.
11281
11282 @vindex gnus-post-method
11283 When posting news, Message usually invokes @code{message-send-news}
11284 (@pxref{News Variables, , News Variables, message, Message Manual}).
11285 Normally, Gnus will post using the same select method as you're
11286 reading from (which might be convenient if you're reading lots of
11287 groups from different private servers).  However.  If the server
11288 you're reading from doesn't allow posting, just reading, you probably
11289 want to use some other server to post your (extremely intelligent and
11290 fabulously interesting) articles.  You can then set the
11291 @code{gnus-post-method} to some other method:
11292
11293 @lisp
11294 (setq gnus-post-method '(nnspool ""))
11295 @end lisp
11296
11297 Now, if you've done this, and then this server rejects your article, or
11298 this server is down, what do you do then?  To override this variable you
11299 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11300 the ``current'' server, to get back the default behavior, for posting.
11301
11302 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11303 gnus will prompt you for what method to use for posting.
11304
11305 You can also set @code{gnus-post-method} to a list of select methods.
11306 If that's the case, gnus will always prompt you for what method to use
11307 for posting.
11308
11309 Finally, if you want to always post using the native select method,
11310 you can set this variable to @code{native}.
11311
11312 When sending mail, Message invokes @code{message-send-mail-function}.
11313 The default function, @code{message-send-mail-with-sendmail}, pipes
11314 your article to the @code{sendmail} binary for further queuing and
11315 sending.  When your local system is not configured for sending mail
11316 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11317 server, you can set @code{message-send-mail-function} to
11318 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11319 package correctly.  An example:
11320
11321 @lisp
11322 (setq message-send-mail-function 'smtpmail-send-it
11323       smtpmail-default-smtp-server "YOUR SMTP HOST")
11324 ;; The following variable needs to be set because of the FLIM version of
11325 ;; smtpmail.el.  Which smtpmail.el is used depends on the `load-path'.
11326 (setq smtp-default-smtp-server "YOUR SMTP HOST")
11327 @end lisp
11328
11329 To the thing similar to this, there is
11330 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11331 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11332 documentation for the function @code{mail-source-touch-pop}.
11333
11334 Other possible choices for @code{message-send-mail-function} includes
11335 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11336 and @code{feedmail-send-it}.
11337
11338 @node Mail and Post
11339 @section Mail and Post
11340
11341 Here's a list of variables relevant to both mailing and
11342 posting:
11343
11344 @table @code
11345 @item gnus-mailing-list-groups
11346 @findex gnus-mailing-list-groups
11347 @cindex mailing lists
11348
11349 If your news server offers groups that are really mailing lists
11350 gatewayed to the @acronym{NNTP} server, you can read those groups without
11351 problems, but you can't post/followup to them without some difficulty.
11352 One solution is to add a @code{to-address} to the group parameters
11353 (@pxref{Group Parameters}).  An easier thing to do is set the
11354 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11355 really are mailing lists.  Then, at least, followups to the mailing
11356 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11357 still a pain, though.
11358
11359 @item gnus-user-agent
11360 @vindex gnus-user-agent
11361 @cindex User-Agent
11362
11363 This variable controls which information should be exposed in the
11364 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11365 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11366 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11367 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11368 system type) or a custom string.  If you set it to a string, be sure to
11369 use a valid format, see RFC 2616.
11370
11371 @end table
11372
11373 You may want to do spell-checking on messages that you send out.  Or, if
11374 you don't want to spell-check by hand, you could add automatic
11375 spell-checking via the @code{ispell} package:
11376
11377 @cindex ispell
11378 @findex ispell-message
11379 @lisp
11380 (add-hook 'message-send-hook 'ispell-message)
11381 @end lisp
11382
11383 If you want to change the @code{ispell} dictionary based on what group
11384 you're in, you could say something like the following:
11385
11386 @lisp
11387 (add-hook 'gnus-select-group-hook
11388           (lambda ()
11389             (cond
11390              ((string-match
11391                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11392               (ispell-change-dictionary "deutsch"))
11393              (t
11394               (ispell-change-dictionary "english")))))
11395 @end lisp
11396
11397 Modify to suit your needs.
11398
11399
11400 @node Archived Messages
11401 @section Archived Messages
11402 @cindex archived messages
11403 @cindex sent messages
11404
11405 Gnus provides a few different methods for storing the mail and news you
11406 send.  The default method is to use the @dfn{archive virtual server} to
11407 store the messages.  If you want to disable this completely, the
11408 @code{gnus-message-archive-group} variable should be @code{nil}, which
11409 is the default.
11410
11411 For archiving interesting messages in a group you read, see the
11412 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11413 Group Commands}).
11414
11415 @vindex gnus-message-archive-method
11416 @code{gnus-message-archive-method} says what virtual server gnus is to
11417 use to store sent messages.  The default is:
11418
11419 @lisp
11420 (nnfolder "archive"
11421           (nnfolder-directory   "~/Mail/archive")
11422           (nnfolder-active-file "~/Mail/archive/active")
11423           (nnfolder-get-new-mail nil)
11424           (nnfolder-inhibit-expiry t))
11425 @end lisp
11426
11427 You can, however, use any mail select method (@code{nnml},
11428 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11429 for doing this sort of thing, though.  If you don't like the default
11430 directory chosen, you could say something like:
11431
11432 @lisp
11433 (setq gnus-message-archive-method
11434       '(nnfolder "archive"
11435                  (nnfolder-inhibit-expiry t)
11436                  (nnfolder-active-file "~/News/sent-mail/active")
11437                  (nnfolder-directory "~/News/sent-mail/")))
11438 @end lisp
11439
11440 @vindex gnus-message-archive-group
11441 @cindex Gcc
11442 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11443 to one or more group(s) on that server.  Which group to use is
11444 determined by the @code{gnus-message-archive-group} variable.
11445
11446 This variable can be used to do the following:
11447
11448 @itemize @bullet
11449 @item
11450 a string
11451 Messages will be saved in that group.
11452
11453 Note that you can include a select method in the group name, then the
11454 message will not be stored in the select method given by
11455 @code{gnus-message-archive-method}, but in the select method specified
11456 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11457 has the default value shown above.  Then setting
11458 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11459 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11460 value @code{"nnml:foo"}, then outgoing messages will be stored in
11461 @samp{nnml:foo}.
11462 @item
11463 a list of strings
11464 Messages will be saved in all those groups.
11465 @item
11466 an alist of regexps, functions and forms
11467 When a key ``matches'', the result is used.
11468 @item
11469 @code{nil}
11470 No message archiving will take place.  This is the default.
11471 @end itemize
11472
11473 Let's illustrate:
11474
11475 Just saving to a single group called @samp{MisK}:
11476 @lisp
11477 (setq gnus-message-archive-group "MisK")
11478 @end lisp
11479
11480 Saving to two groups, @samp{MisK} and @samp{safe}:
11481 @lisp
11482 (setq gnus-message-archive-group '("MisK" "safe"))
11483 @end lisp
11484
11485 Save to different groups based on what group you are in:
11486 @lisp
11487 (setq gnus-message-archive-group
11488       '(("^alt" "sent-to-alt")
11489         ("mail" "sent-to-mail")
11490         (".*" "sent-to-misc")))
11491 @end lisp
11492
11493 More complex stuff:
11494 @lisp
11495 (setq gnus-message-archive-group
11496       '((if (message-news-p)
11497             "misc-news"
11498           "misc-mail")))
11499 @end lisp
11500
11501 How about storing all news messages in one file, but storing all mail
11502 messages in one file per month:
11503
11504 @lisp
11505 (setq gnus-message-archive-group
11506       '((if (message-news-p)
11507             "misc-news"
11508           (concat "mail." (format-time-string "%Y-%m")))))
11509 @end lisp
11510
11511 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11512 @c use a different value for @code{gnus-message-archive-group} there.)
11513
11514 Now, when you send a message off, it will be stored in the appropriate
11515 group.  (If you want to disable storing for just one particular message,
11516 you can just remove the @code{Gcc} header that has been inserted.)  The
11517 archive group will appear in the group buffer the next time you start
11518 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11519 enter it and read the articles in it just like you'd read any other
11520 group.  If the group gets really big and annoying, you can simply rename
11521 if (using @kbd{G r} in the group buffer) to something
11522 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11523 continue to be stored in the old (now empty) group.
11524
11525 That's the default method of archiving sent messages.  Gnus offers a
11526 different way for the people who don't like the default method.  In that
11527 case you should set @code{gnus-message-archive-group} to @code{nil};
11528 this will disable archiving.
11529
11530 @table @code
11531 @item gnus-outgoing-message-group
11532 @vindex gnus-outgoing-message-group
11533 All outgoing messages will be put in this group.  If you want to store
11534 all your outgoing mail and articles in the group @samp{nnml:archive},
11535 you set this variable to that value.  This variable can also be a list of
11536 group names.
11537
11538 If you want to have greater control over what group to put each
11539 message in, you can set this variable to a function that checks the
11540 current newsgroup name and then returns a suitable group name (or list
11541 of names).
11542
11543 This variable can be used instead of @code{gnus-message-archive-group},
11544 but the latter is the preferred method.
11545
11546 @item gnus-gcc-mark-as-read
11547 @vindex gnus-gcc-mark-as-read
11548 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11549
11550 @item gnus-gcc-externalize-attachments
11551 @vindex gnus-gcc-externalize-attachments
11552 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11553 and matches the Gcc group name, attach files as external parts; if it is
11554 @code{all}, attach local files as external parts; if it is other
11555 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11556 changed in the future.
11557
11558 @end table
11559
11560
11561 @node Posting Styles
11562 @section Posting Styles
11563 @cindex posting styles
11564 @cindex styles
11565
11566 All them variables, they make my head swim.
11567
11568 So what if you want a different @code{Organization} and signature based
11569 on what groups you post to?  And you post both from your home machine
11570 and your work machine, and you want different @code{From} lines, and so
11571 on?
11572
11573 @vindex gnus-posting-styles
11574 One way to do stuff like that is to write clever hooks that change the
11575 variables you need to have changed.  That's a bit boring, so somebody
11576 came up with the bright idea of letting the user specify these things in
11577 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11578 variable:
11579
11580 @lisp
11581 ((".*"
11582   (signature "Peace and happiness")
11583   (organization "What me?"))
11584  ("^comp"
11585   (signature "Death to everybody"))
11586  ("comp.emacs.i-love-it"
11587   (organization "Emacs is it")))
11588 @end lisp
11589
11590 As you might surmise from this example, this alist consists of several
11591 @dfn{styles}.  Each style will be applicable if the first element
11592 ``matches'', in some form or other.  The entire alist will be iterated
11593 over, from the beginning towards the end, and each match will be
11594 applied, which means that attributes in later styles that match override
11595 the same attributes in earlier matching styles.  So
11596 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11597 signature and the @samp{What me?} @code{Organization} header.
11598
11599 The first element in each style is called the @code{match}.  If it's a
11600 string, then Gnus will try to regexp match it against the group name.
11601 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11602 will look in the original article for a header whose name is
11603 @var{match} and compare that @var{regexp}.  @var{match} and
11604 @var{regexp} are strings.  (There original article is the one you are
11605 replying or following up to.  If you are not composing a reply or a
11606 followup, then there is nothing to match against.)  If the
11607 @code{match} is a function symbol, that function will be called with
11608 no arguments.  If it's a variable symbol, then the variable will be
11609 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11610 any case, if this returns a non-@code{nil} value, then the style is
11611 said to @dfn{match}.
11612
11613 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11614 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11615 attribute name can be one of @code{signature}, @code{signature-file},
11616 @code{x-face-file}, @code{address} (overriding
11617 @code{user-mail-address}), @code{name} (overriding
11618 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11619 be a string or a symbol.  In that case, this will be used as a header
11620 name, and the value will be inserted in the headers of the article; if
11621 the value is @code{nil}, the header name will be removed.  If the
11622 attribute name is @code{eval}, the form is evaluated, and the result
11623 is thrown away.
11624
11625 The attribute value can be a string (used verbatim), a function with
11626 zero arguments (the return value will be used), a variable (its value
11627 will be used) or a list (it will be @code{eval}ed and the return value
11628 will be used).  The functions and sexps are called/@code{eval}ed in the
11629 message buffer that is being set up.  The headers of the current article
11630 are available through the @code{message-reply-headers} variable, which
11631 is a vector of the following headers: number subject from date id
11632 references chars lines xref extra.
11633
11634 @vindex message-reply-headers
11635
11636 If you wish to check whether the message you are about to compose is
11637 meant to be a news article or a mail message, you can check the values
11638 of the @code{message-news-p} and @code{message-mail-p} functions.
11639
11640 @findex message-mail-p
11641 @findex message-news-p
11642
11643 So here's a new example:
11644
11645 @lisp
11646 (setq gnus-posting-styles
11647       '((".*"
11648          (signature-file "~/.signature")
11649          (name "User Name")
11650          ("X-Home-Page" (getenv "WWW_HOME"))
11651          (organization "People's Front Against MWM"))
11652         ("^rec.humor"
11653          (signature my-funny-signature-randomizer))
11654         ((equal (system-name) "gnarly")  ;; @r{A form}
11655          (signature my-quote-randomizer))
11656         (message-news-p        ;; @r{A function symbol}
11657          (signature my-news-signature))
11658         (window-system         ;; @r{A value symbol}
11659          ("X-Window-System" (format "%s" window-system)))
11660         ;; @r{If I'm replying to Larsi, set the Organization header.}
11661         ((header "from" "larsi.*org")
11662          (Organization "Somewhere, Inc."))
11663         ((posting-from-work-p) ;; @r{A user defined function}
11664          (signature-file "~/.work-signature")
11665          (address "user@@bar.foo")
11666          (body "You are fired.\n\nSincerely, your boss.")
11667          (organization "Important Work, Inc"))
11668         ("nnml:.*"
11669          (From (save-excursion
11670                  (set-buffer gnus-article-buffer)
11671                  (message-fetch-field "to"))))
11672         ("^nn.+:"
11673          (signature-file "~/.mail-signature"))))
11674 @end lisp
11675
11676 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11677 @code{From} address in all your outgoing replies, which might be handy
11678 if you fill many roles.
11679
11680 Setting the @code{gnus-named-posting-styles} variable will make
11681 posting-styles allow to have distinctive names.  You can specify an
11682 arbitrary posting-style when article posting with @kbd{S P} in the
11683 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11684 the names to styles.  Once a posting-style is added to the alist, we can
11685 import it from @code{gnus-posting-styles}.  If an attribute whose name
11686 is @code{import} is found, Gnus will look for the attribute value in
11687 @code{gnus-named-posting-styles} and expand it in place.
11688
11689 Here's an example:
11690
11691 @lisp
11692 (setq gnus-named-posting-styles
11693       '(("Default"
11694          (signature-file "~/.signature")
11695          (name "User Name")
11696          ("X-Home-Page" (getenv "WWW_HOME"))
11697          (organization "People's Front Against MWM"))
11698         ("Emacs"
11699          (import "Default")
11700          (organization "The Church of Emacs"))))
11701 @end lisp
11702
11703 The posting-style named "Emacs" will inherit all the attributes from
11704 "Default" except @code{organization}.
11705
11706
11707 @node Drafts
11708 @section Drafts
11709 @cindex drafts
11710
11711 If you are writing a message (mail or news) and suddenly remember that
11712 you have a steak in the oven (or some pesto in the food processor, you
11713 craaazy vegetarians), you'll probably wish there was a method to save
11714 the message you are writing so that you can continue editing it some
11715 other day, and send it when you feel its finished.
11716
11717 Well, don't worry about it.  Whenever you start composing a message of
11718 some sort using the gnus mail and post commands, the buffer you get will
11719 automatically associate to an article in a special @dfn{draft} group.
11720 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11721 article will be saved there.  (Auto-save files also go to the draft
11722 group.)
11723
11724 @cindex nndraft
11725 @vindex nndraft-directory
11726 The draft group is a special group (which is implemented as an
11727 @code{nndraft} group, if you absolutely have to know) called
11728 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11729 @code{nndraft} is to store its files.  What makes this group special is
11730 that you can't tick any articles in it or mark any articles as
11731 read---all articles in the group are permanently unread.
11732
11733 If the group doesn't exist, it will be created and you'll be subscribed
11734 to it.  The only way to make it disappear from the Group buffer is to
11735 unsubscribe it.  The special properties of the draft group comes from
11736 a group property (@pxref{Group Parameters}), and if lost the group
11737 behaves like any other group.  This means the commands below will not
11738 be available.  To restore the special properties of the group, the
11739 simplest way is to kill the group, using @kbd{C-k}, and restart
11740 Gnus.  The group is automatically created again with the
11741 correct parameters.  The content of the group is not lost.
11742
11743 @c @findex gnus-dissociate-buffer-from-draft
11744 @c @kindex C-c M-d (Mail)
11745 @c @kindex C-c M-d (Post)
11746 @c @findex gnus-associate-buffer-with-draft
11747 @c @kindex C-c C-d (Mail)
11748 @c @kindex C-c C-d (Post)
11749 @c If you're writing some super-secret message that you later want to
11750 @c encode with PGP before sending, you may wish to turn the auto-saving
11751 @c (and association with the draft group) off.  You never know who might be
11752 @c interested in reading all your extremely valuable and terribly horrible
11753 @c and interesting secrets.  The @kbd{C-c M-d}
11754 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11755 @c If you change your mind and want to turn the auto-saving back on again,
11756 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11757 @c
11758 @c @vindex gnus-use-draft
11759 @c To leave association with the draft group off by default, set
11760 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11761
11762 @findex gnus-draft-edit-message
11763 @kindex D e (Draft)
11764 When you want to continue editing the article, you simply enter the
11765 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11766 that.  You will be placed in a buffer where you left off.
11767
11768 Rejected articles will also be put in this draft group (@pxref{Rejected
11769 Articles}).
11770
11771 @findex gnus-draft-send-all-messages
11772 @kindex D s (Draft)
11773 @findex gnus-draft-send-message
11774 @kindex D S (Draft)
11775 If you have lots of rejected messages you want to post (or mail) without
11776 doing further editing, you can use the @kbd{D s} command
11777 (@code{gnus-draft-send-message}).  This command understands the
11778 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11779 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11780 in the buffer.
11781
11782 @findex gnus-draft-toggle-sending
11783 @kindex D t (Draft)
11784 If you have some messages that you wish not to send, you can use the
11785 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11786 as unsendable.  This is a toggling command.
11787
11788
11789 @node Rejected Articles
11790 @section Rejected Articles
11791 @cindex rejected articles
11792
11793 Sometimes a news server will reject an article.  Perhaps the server
11794 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11795 @emph{there be demons}.  Perhaps you have included too much cited text.
11796 Perhaps the disk is full.  Perhaps the server is down.
11797
11798 These situations are, of course, totally beyond the control of gnus.
11799 (Gnus, of course, loves the way you look, always feels great, has angels
11800 fluttering around inside of it, doesn't care about how much cited text
11801 you include, never runs full and never goes down.)  So gnus saves these
11802 articles until some later time when the server feels better.
11803
11804 The rejected articles will automatically be put in a special draft group
11805 (@pxref{Drafts}).  When the server comes back up again, you'd then
11806 typically enter that group and send all the articles off.
11807
11808 @node Signing and encrypting
11809 @section Signing and encrypting
11810 @cindex using gpg
11811 @cindex using s/mime
11812 @cindex using smime
11813
11814 Gnus can digitally sign and encrypt your messages, using vanilla
11815 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11816 decoding such messages, see the @code{mm-verify-option} and
11817 @code{mm-decrypt-option} options (@pxref{Security}).
11818
11819 @vindex gnus-message-replysign
11820 @vindex gnus-message-replyencrypt
11821 @vindex gnus-message-replysignencrypted
11822 Often, you would like to sign replies to people who send you signed
11823 messages.  Even more often, you might want to encrypt messages which
11824 are in reply to encrypted messages.  Gnus offers
11825 @code{gnus-message-replysign} to enable the former, and
11826 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11827 @code{gnus-message-replysignencrypted} (on by default) will sign
11828 automatically encrypted messages.
11829
11830 Instructing MML to perform security operations on a @acronym{MIME} part is
11831 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11832 C-m c} key map for encryption, as follows.
11833
11834 @table @kbd
11835
11836 @item C-c C-m s s
11837 @kindex C-c C-m s s
11838 @findex mml-secure-message-sign-smime
11839
11840 Digitally sign current message using @acronym{S/MIME}.
11841
11842 @item C-c C-m s o
11843 @kindex C-c C-m s o
11844 @findex mml-secure-message-sign-pgp
11845
11846 Digitally sign current message using @acronym{PGP}.
11847
11848 @item C-c C-m s p
11849 @kindex C-c C-m s p
11850 @findex mml-secure-message-sign-pgp
11851
11852 Digitally sign current message using @acronym{PGP/MIME}.
11853
11854 @item C-c C-m c s
11855 @kindex C-c C-m c s
11856 @findex mml-secure-message-encrypt-smime
11857
11858 Digitally encrypt current message using @acronym{S/MIME}.
11859
11860 @item C-c C-m c o
11861 @kindex C-c C-m c o
11862 @findex mml-secure-message-encrypt-pgp
11863
11864 Digitally encrypt current message using @acronym{PGP}.
11865
11866 @item C-c C-m c p
11867 @kindex C-c C-m c p
11868 @findex mml-secure-message-encrypt-pgpmime
11869
11870 Digitally encrypt current message using @acronym{PGP/MIME}.
11871
11872 @item C-c C-m C-n
11873 @kindex C-c C-m C-n
11874 @findex mml-unsecure-message
11875 Remove security related MML tags from message.
11876
11877 @end table
11878
11879 @xref{Security, ,Security, message, Message Manual}, for more information.
11880
11881 @node Select Methods
11882 @chapter Select Methods
11883 @cindex foreign groups
11884 @cindex select methods
11885
11886 A @dfn{foreign group} is a group not read by the usual (or
11887 default) means.  It could be, for instance, a group from a different
11888 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11889 personal mail group.
11890
11891 A foreign group (or any group, really) is specified by a @dfn{name} and
11892 a @dfn{select method}.  To take the latter first, a select method is a
11893 list where the first element says what back end to use (e.g. @code{nntp},
11894 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11895 name}.  There may be additional elements in the select method, where the
11896 value may have special meaning for the back end in question.
11897
11898 One could say that a select method defines a @dfn{virtual server}---so
11899 we do just that (@pxref{Server Buffer}).
11900
11901 The @dfn{name} of the group is the name the back end will recognize the
11902 group as.
11903
11904 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11905 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11906 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11907 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11908 back end just knows this group as @samp{soc.motss}.
11909
11910 The different methods all have their peculiarities, of course.
11911
11912 @menu
11913 * Server Buffer::               Making and editing virtual servers.
11914 * Getting News::                Reading USENET news with Gnus.
11915 * Getting Mail::                Reading your personal mail with Gnus.
11916 * Browsing the Web::            Getting messages from a plethora of Web sources.
11917 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11918 * Other Sources::               Reading directories, files, SOUP packets.
11919 * Combined Groups::             Combining groups into one group.
11920 * Gnus Unplugged::              Reading news and mail offline.
11921 @end menu
11922
11923
11924 @node Server Buffer
11925 @section Server Buffer
11926
11927 Traditionally, a @dfn{server} is a machine or a piece of software that
11928 one connects to, and then requests information from.  Gnus does not
11929 connect directly to any real servers, but does all transactions through
11930 one back end or other.  But that's just putting one layer more between
11931 the actual media and Gnus, so we might just as well say that each
11932 back end represents a virtual server.
11933
11934 For instance, the @code{nntp} back end may be used to connect to several
11935 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11936 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11937 use, and what parameters to set by specifying a @dfn{select method}.
11938
11939 These select method specifications can sometimes become quite
11940 complicated---say, for instance, that you want to read from the
11941 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11942 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11943 Anyway, if you had to specify that for each group that used this
11944 server, that would be too much work, so Gnus offers a way of naming
11945 select methods, which is what you do in the server buffer.
11946
11947 To enter the server buffer, use the @kbd{^}
11948 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11949
11950 @menu
11951 * Server Buffer Format::        You can customize the look of this buffer.
11952 * Server Commands::             Commands to manipulate servers.
11953 * Example Methods::             Examples server specifications.
11954 * Creating a Virtual Server::   An example session.
11955 * Server Variables::            Which variables to set.
11956 * Servers and Methods::         You can use server names as select methods.
11957 * Unavailable Servers::         Some servers you try to contact may be down.
11958 @end menu
11959
11960 @vindex gnus-server-mode-hook
11961 @code{gnus-server-mode-hook} is run when creating the server buffer.
11962
11963
11964 @node Server Buffer Format
11965 @subsection Server Buffer Format
11966 @cindex server buffer format
11967
11968 @vindex gnus-server-line-format
11969 You can change the look of the server buffer lines by changing the
11970 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11971 variable, with some simple extensions:
11972
11973 @table @samp
11974
11975 @item h
11976 How the news is fetched---the back end name.
11977
11978 @item n
11979 The name of this server.
11980
11981 @item w
11982 Where the news is to be fetched from---the address.
11983
11984 @item s
11985 The opened/closed/denied status of the server.
11986 @end table
11987
11988 @vindex gnus-server-mode-line-format
11989 The mode line can also be customized by using the
11990 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11991 Formatting}).  The following specs are understood:
11992
11993 @table @samp
11994 @item S
11995 Server name.
11996
11997 @item M
11998 Server method.
11999 @end table
12000
12001 Also @pxref{Formatting Variables}.
12002
12003
12004 @node Server Commands
12005 @subsection Server Commands
12006 @cindex server commands
12007
12008 @table @kbd
12009
12010 @item a
12011 @kindex a (Server)
12012 @findex gnus-server-add-server
12013 Add a new server (@code{gnus-server-add-server}).
12014
12015 @item e
12016 @kindex e (Server)
12017 @findex gnus-server-edit-server
12018 Edit a server (@code{gnus-server-edit-server}).
12019
12020 @item SPACE
12021 @kindex SPACE (Server)
12022 @findex gnus-server-read-server
12023 Browse the current server (@code{gnus-server-read-server}).
12024
12025 @item q
12026 @kindex q (Server)
12027 @findex gnus-server-exit
12028 Return to the group buffer (@code{gnus-server-exit}).
12029
12030 @item k
12031 @kindex k (Server)
12032 @findex gnus-server-kill-server
12033 Kill the current server (@code{gnus-server-kill-server}).
12034
12035 @item y
12036 @kindex y (Server)
12037 @findex gnus-server-yank-server
12038 Yank the previously killed server (@code{gnus-server-yank-server}).
12039
12040 @item c
12041 @kindex c (Server)
12042 @findex gnus-server-copy-server
12043 Copy the current server (@code{gnus-server-copy-server}).
12044
12045 @item l
12046 @kindex l (Server)
12047 @findex gnus-server-list-servers
12048 List all servers (@code{gnus-server-list-servers}).
12049
12050 @item s
12051 @kindex s (Server)
12052 @findex gnus-server-scan-server
12053 Request that the server scan its sources for new articles
12054 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12055 servers.
12056
12057 @item g
12058 @kindex g (Server)
12059 @findex gnus-server-regenerate-server
12060 Request that the server regenerate all its data structures
12061 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12062 a mail back end that has gotten out of sync.
12063
12064 @end table
12065
12066
12067 @node Example Methods
12068 @subsection Example Methods
12069
12070 Most select methods are pretty simple and self-explanatory:
12071
12072 @lisp
12073 (nntp "news.funet.fi")
12074 @end lisp
12075
12076 Reading directly from the spool is even simpler:
12077
12078 @lisp
12079 (nnspool "")
12080 @end lisp
12081
12082 As you can see, the first element in a select method is the name of the
12083 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12084 will.
12085
12086 After these two elements, there may be an arbitrary number of
12087 @code{(@var{variable} @var{form})} pairs.
12088
12089 To go back to the first example---imagine that you want to read from
12090 port 15 on that machine.  This is what the select method should
12091 look like then:
12092
12093 @lisp
12094 (nntp "news.funet.fi" (nntp-port-number 15))
12095 @end lisp
12096
12097 You should read the documentation to each back end to find out what
12098 variables are relevant, but here's an @code{nnmh} example:
12099
12100 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12101 you have two structures that you wish to access: One is your private
12102 mail spool, and the other is a public one.  Here's the possible spec for
12103 your private mail:
12104
12105 @lisp
12106 (nnmh "private" (nnmh-directory "~/private/mail/"))
12107 @end lisp
12108
12109 (This server is then called @samp{private}, but you may have guessed
12110 that.)
12111
12112 Here's the method for a public spool:
12113
12114 @lisp
12115 (nnmh "public"
12116       (nnmh-directory "/usr/information/spool/")
12117       (nnmh-get-new-mail nil))
12118 @end lisp
12119
12120 @cindex proxy
12121 @cindex firewall
12122
12123 If you are behind a firewall and only have access to the @acronym{NNTP}
12124 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12125 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12126 Doing this can be rather fiddly, but your virtual server definition
12127 should probably look something like this:
12128
12129 @lisp
12130 (nntp "firewall"
12131       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12132       (nntp-via-address "the.firewall.machine")
12133       (nntp-address "the.real.nntp.host")
12134       (nntp-end-of-line "\n"))
12135 @end lisp
12136
12137 If you want to use the wonderful @code{ssh} program to provide a
12138 compressed connection over the modem line, you could add the following
12139 configuration to the example above:
12140
12141 @lisp
12142       (nntp-via-rlogin-command "ssh")
12143 @end lisp
12144
12145 See also @code{nntp-via-rlogin-command-switches}.
12146
12147 If you're behind a firewall, but have direct access to the outside world
12148 through a wrapper command like "runsocks", you could open a socksified
12149 telnet connection to the news server as follows:
12150
12151 @lisp
12152 (nntp "outside"
12153       (nntp-pre-command "runsocks")
12154       (nntp-open-connection-function nntp-open-via-telnet)
12155       (nntp-address "the.news.server")
12156       (nntp-end-of-line "\n"))
12157 @end lisp
12158
12159 This means that you have to have set up @code{ssh-agent} correctly to
12160 provide automatic authorization, of course.  And to get a compressed
12161 connection, you have to have the @samp{Compression} option in the
12162 @code{ssh} @file{config} file.
12163
12164
12165 @node Creating a Virtual Server
12166 @subsection Creating a Virtual Server
12167
12168 If you're saving lots of articles in the cache by using persistent
12169 articles, you may want to create a virtual server to read the cache.
12170
12171 First you need to add a new server.  The @kbd{a} command does that.  It
12172 would probably be best to use @code{nnspool} to read the cache.  You
12173 could also use @code{nnml} or @code{nnmh}, though.
12174
12175 Type @kbd{a nnspool RET cache RET}.
12176
12177 You should now have a brand new @code{nnspool} virtual server called
12178 @samp{cache}.  You now need to edit it to have the right definitions.
12179 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12180 will contain the following:
12181
12182 @lisp
12183 (nnspool "cache")
12184 @end lisp
12185
12186 Change that to:
12187
12188 @lisp
12189 (nnspool "cache"
12190          (nnspool-spool-directory "~/News/cache/")
12191          (nnspool-nov-directory "~/News/cache/")
12192          (nnspool-active-file "~/News/cache/active"))
12193 @end lisp
12194
12195 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12196 @kbd{RET} over this virtual server, you should be entered into a browse
12197 buffer, and you should be able to enter any of the groups displayed.
12198
12199
12200 @node Server Variables
12201 @subsection Server Variables
12202 @cindex server variables
12203 @cindex server parameters
12204
12205 One sticky point when defining variables (both on back ends and in Emacs
12206 in general) is that some variables are typically initialized from other
12207 variables when the definition of the variables is being loaded.  If you
12208 change the ``base'' variable after the variables have been loaded, you
12209 won't change the ``derived'' variables.
12210
12211 This typically affects directory and file variables.  For instance,
12212 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12213 directory variables are initialized from that variable, so
12214 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12215 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12216 @code{nnml-directory}---you have to explicitly set all the file
12217 variables to be what you want them to be.  For a complete list of
12218 variables for each back end, see each back end's section later in this
12219 manual, but here's an example @code{nnml} definition:
12220
12221 @lisp
12222 (nnml "public"
12223       (nnml-directory "~/my-mail/")
12224       (nnml-active-file "~/my-mail/active")
12225       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12226 @end lisp
12227
12228 Server variables are often called @dfn{server parameters}.
12229
12230 @node Servers and Methods
12231 @subsection Servers and Methods
12232
12233 Wherever you would normally use a select method
12234 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12235 when browsing a foreign server) you can use a virtual server name
12236 instead.  This could potentially save lots of typing.  And it's nice all
12237 over.
12238
12239
12240 @node Unavailable Servers
12241 @subsection Unavailable Servers
12242
12243 If a server seems to be unreachable, Gnus will mark that server as
12244 @code{denied}.  That means that any subsequent attempt to make contact
12245 with that server will just be ignored.  ``It can't be opened,'' Gnus
12246 will tell you, without making the least effort to see whether that is
12247 actually the case or not.
12248
12249 That might seem quite naughty, but it does make sense most of the time.
12250 Let's say you have 10 groups subscribed to on server
12251 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12252 away from you and the machine is quite slow, so it takes 1 minute just
12253 to find out that it refuses connection to you today.  If Gnus were to
12254 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12255 attempt to do that.  Once it has gotten a single ``connection refused'',
12256 it will regard that server as ``down''.
12257
12258 So, what happens if the machine was only feeling unwell temporarily?
12259 How do you test to see whether the machine has come up again?
12260
12261 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12262 with the following commands:
12263
12264 @table @kbd
12265
12266 @item O
12267 @kindex O (Server)
12268 @findex gnus-server-open-server
12269 Try to establish connection to the server on the current line
12270 (@code{gnus-server-open-server}).
12271
12272 @item C
12273 @kindex C (Server)
12274 @findex gnus-server-close-server
12275 Close the connection (if any) to the server
12276 (@code{gnus-server-close-server}).
12277
12278 @item D
12279 @kindex D (Server)
12280 @findex gnus-server-deny-server
12281 Mark the current server as unreachable
12282 (@code{gnus-server-deny-server}).
12283
12284 @item M-o
12285 @kindex M-o (Server)
12286 @findex gnus-server-open-all-servers
12287 Open the connections to all servers in the buffer
12288 (@code{gnus-server-open-all-servers}).
12289
12290 @item M-c
12291 @kindex M-c (Server)
12292 @findex gnus-server-close-all-servers
12293 Close the connections to all servers in the buffer
12294 (@code{gnus-server-close-all-servers}).
12295
12296 @item R
12297 @kindex R (Server)
12298 @findex gnus-server-remove-denials
12299 Remove all marks to whether Gnus was denied connection from any servers
12300 (@code{gnus-server-remove-denials}).
12301
12302 @item L
12303 @kindex L (Server)
12304 @findex gnus-server-offline-server
12305 Set server status to offline (@code{gnus-server-offline-server}).
12306
12307 @end table
12308
12309
12310 @node Getting News
12311 @section Getting News
12312 @cindex reading news
12313 @cindex news back ends
12314
12315 A newsreader is normally used for reading news.  Gnus currently provides
12316 only two methods of getting news---it can read from an @acronym{NNTP} server,
12317 or it can read from a local spool.
12318
12319 @menu
12320 * NNTP::                        Reading news from an @acronym{NNTP} server.
12321 * News Spool::                  Reading news from the local spool.
12322 @end menu
12323
12324
12325 @node NNTP
12326 @subsection NNTP
12327 @cindex nntp
12328
12329 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12330 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12331 server as the, uhm, address.
12332
12333 If the @acronym{NNTP} server is located at a non-standard port, setting the
12334 third element of the select method to this port number should allow you
12335 to connect to the right port.  You'll have to edit the group info for
12336 that (@pxref{Foreign Groups}).
12337
12338 The name of the foreign group can be the same as a native group.  In
12339 fact, you can subscribe to the same group from as many different servers
12340 you feel like.  There will be no name collisions.
12341
12342 The following variables can be used to create a virtual @code{nntp}
12343 server:
12344
12345 @table @code
12346
12347 @item nntp-server-opened-hook
12348 @vindex nntp-server-opened-hook
12349 @cindex @sc{mode reader}
12350 @cindex authinfo
12351 @cindex authentification
12352 @cindex nntp authentification
12353 @findex nntp-send-authinfo
12354 @findex nntp-send-mode-reader
12355 is run after a connection has been made.  It can be used to send
12356 commands to the @acronym{NNTP} server after it has been contacted.  By
12357 default it sends the command @code{MODE READER} to the server with the
12358 @code{nntp-send-mode-reader} function.  This function should always be
12359 present in this hook.
12360
12361 @item nntp-authinfo-function
12362 @vindex nntp-authinfo-function
12363 @findex nntp-send-authinfo
12364 @vindex nntp-authinfo-file
12365 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12366 server.  The default function is @code{nntp-send-authinfo}, which looks
12367 through your @file{~/.authinfo} (or whatever you've set the
12368 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12369 are found, it will prompt you for a login name and a password.  The
12370 format of the @file{~/.authinfo} file is (almost) the same as the
12371 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12372 manual page, but here are the salient facts:
12373
12374 @enumerate
12375 @item
12376 The file contains one or more line, each of which define one server.
12377
12378 @item
12379 Each line may contain an arbitrary number of token/value pairs.
12380
12381 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12382 @samp{default}.  In addition Gnus introduces two new tokens, not present
12383 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12384 @samp{force}.  (This is the only way the @file{.authinfo} file format
12385 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12386 indicate what port on the server the credentials apply to and
12387 @samp{force} is explained below.
12388
12389 @end enumerate
12390
12391 Here's an example file:
12392
12393 @example
12394 machine news.uio.no login larsi password geheimnis
12395 machine nntp.ifi.uio.no login larsi force yes
12396 @end example
12397
12398 The token/value pairs may appear in any order; @samp{machine} doesn't
12399 have to be first, for instance.
12400
12401 In this example, both login name and password have been supplied for the
12402 former server, while the latter has only the login name listed, and the
12403 user will be prompted for the password.  The latter also has the
12404 @samp{force} tag, which means that the authinfo will be sent to the
12405 @var{nntp} server upon connection; the default (i.e., when there is not
12406 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12407 until the @var{nntp} server asks for it.
12408
12409 You can also add @samp{default} lines that will apply to all servers
12410 that don't have matching @samp{machine} lines.
12411
12412 @example
12413 default force yes
12414 @end example
12415
12416 This will force sending @samp{AUTHINFO} commands to all servers not
12417 previously mentioned.
12418
12419 Remember to not leave the @file{~/.authinfo} file world-readable.
12420
12421 @item nntp-server-action-alist
12422 @vindex nntp-server-action-alist
12423 This is a list of regexps to match on server types and actions to be
12424 taken when matches are made.  For instance, if you want Gnus to beep
12425 every time you connect to innd, you could say something like:
12426
12427 @lisp
12428 (setq nntp-server-action-alist
12429       '(("innd" (ding))))
12430 @end lisp
12431
12432 You probably don't want to do that, though.
12433
12434 The default value is
12435
12436 @lisp
12437 '(("nntpd 1\\.5\\.11t"
12438    (remove-hook 'nntp-server-opened-hook
12439                 'nntp-send-mode-reader)))
12440 @end lisp
12441
12442 This ensures that Gnus doesn't send the @code{MODE READER} command to
12443 nntpd 1.5.11t, since that command chokes that server, I've been told.
12444
12445 @item nntp-maximum-request
12446 @vindex nntp-maximum-request
12447 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12448 will collect headers by sending a series of @code{head} commands.  To
12449 speed things up, the back end sends lots of these commands without
12450 waiting for reply, and then reads all the replies.  This is controlled
12451 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12452 your network is buggy, you should set this to 1.
12453
12454 @item nntp-connection-timeout
12455 @vindex nntp-connection-timeout
12456 If you have lots of foreign @code{nntp} groups that you connect to
12457 regularly, you're sure to have problems with @acronym{NNTP} servers not
12458 responding properly, or being too loaded to reply within reasonable
12459 time.  This is can lead to awkward problems, which can be helped
12460 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12461 that says how many seconds the @code{nntp} back end should wait for a
12462 connection before giving up.  If it is @code{nil}, which is the default,
12463 no timeouts are done.
12464
12465 @c @item nntp-command-timeout
12466 @c @vindex nntp-command-timeout
12467 @c @cindex PPP connections
12468 @c @cindex dynamic IP addresses
12469 @c If you're running Gnus on a machine that has a dynamically assigned
12470 @c address, Gnus may become confused.  If the address of your machine
12471 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12472 @c waiting forever for replies from the server.  To help with this
12473 @c unfortunate problem, you can set this command to a number.  Gnus will
12474 @c then, if it sits waiting for a reply from the server longer than that
12475 @c number of seconds, shut down the connection, start a new one, and resend
12476 @c the command.  This should hopefully be transparent to the user.  A
12477 @c likely number is 30 seconds.
12478 @c
12479 @c @item nntp-retry-on-break
12480 @c @vindex nntp-retry-on-break
12481 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12482 @c hangs.  This will have much the same effect as the command timeout
12483 @c described above.
12484
12485 @item nntp-server-hook
12486 @vindex nntp-server-hook
12487 This hook is run as the last step when connecting to an @acronym{NNTP}
12488 server.
12489
12490 @item nntp-buggy-select
12491 @vindex nntp-buggy-select
12492 Set this to non-@code{nil} if your select routine is buggy.
12493
12494 @item nntp-nov-is-evil
12495 @vindex nntp-nov-is-evil
12496 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12497 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12498 can be used.
12499
12500 @item nntp-xover-commands
12501 @vindex nntp-xover-commands
12502 @cindex @acronym{NOV}
12503 @cindex XOVER
12504 List of strings used as commands to fetch @acronym{NOV} lines from a
12505 server.  The default value of this variable is @code{("XOVER"
12506 "XOVERVIEW")}.
12507
12508 @item nntp-nov-gap
12509 @vindex nntp-nov-gap
12510 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12511 the server.  The server responds with one huge list of lines.  However,
12512 if you have read articles 2-5000 in the group, and only want to read
12513 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12514 lines that you will not need.  This variable says how
12515 big a gap between two consecutive articles is allowed to be before the
12516 @code{XOVER} request is split into several request.  Note that if your
12517 network is fast, setting this variable to a really small number means
12518 that fetching will probably be slower.  If this variable is @code{nil},
12519 @code{nntp} will never split requests.  The default is 5.
12520
12521 @item nntp-prepare-server-hook
12522 @vindex nntp-prepare-server-hook
12523 A hook run before attempting to connect to an @acronym{NNTP} server.
12524
12525 @item nntp-warn-about-losing-connection
12526 @vindex nntp-warn-about-losing-connection
12527 If this variable is non-@code{nil}, some noise will be made when a
12528 server closes connection.
12529
12530 @item nntp-record-commands
12531 @vindex nntp-record-commands
12532 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12533 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12534 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12535 that doesn't seem to work.
12536
12537 @item nntp-open-connection-function
12538 @vindex nntp-open-connection-function
12539 It is possible to customize how the connection to the nntp server will
12540 be opened.  If you specify an @code{nntp-open-connection-function}
12541 parameter, Gnus will use that function to establish the connection.
12542 Five pre-made functions are supplied.  These functions can be grouped in
12543 two categories: direct connection functions (three pre-made), and
12544 indirect ones (two pre-made).
12545
12546 @item nntp-prepare-post-hook
12547 @vindex nntp-prepare-post-hook
12548 A hook run just before posting an article.  If there is no
12549 @code{Message-ID} header in the article and the news server provides the
12550 recommended ID, it will be added to the article before running this
12551 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12552 inhibit Gnus to add a @code{Message-ID} header, you could say:
12553
12554 @lisp
12555 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12556 @end lisp
12557
12558 Note that not all servers support the recommended ID.  This works for
12559 INN versions 2.3.0 and later, for instance.
12560
12561 @item nntp-read-timeout
12562 @vindex nntp-read-timeout
12563 How long nntp should wait between checking for the end of output.
12564 Shorter values mean quicker response, but is more CPU intensive.  The
12565 default is 0.1 seconds.  If you have a slow line to the server (and
12566 don't like to see Emacs eat your available CPU power), you might set
12567 this to, say, 1.
12568
12569 @item nntp-list-options
12570 @vindex nntp-list-options
12571 List of newsgroup name used for a option of the LIST command to restrict
12572 the listing output to only the specified newsgroups.  Each newsgroup name
12573 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12574 etc.  Fortunately, if the server can accept such a option, it will
12575 probably make gnus run faster.  You may use it as a server variable as
12576 follows:
12577
12578 @lisp
12579 (setq gnus-select-method
12580       '(nntp "news.somewhere.edu"
12581              (nntp-list-options ("fj.*" "japan.*"))))
12582 @end lisp
12583
12584 @item nntp-options-subscribe
12585 @vindex nntp-options-subscribe
12586 Regexp matching the newsgroup names which will be subscribed
12587 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12588 It may be effective as well as @code{nntp-list-options} even though the
12589 server could not accept a shell-style wildcard as a option of the LIST
12590 command.  You may use it as a server variable as follows:
12591
12592 @lisp
12593 (setq gnus-select-method
12594       '(nntp "news.somewhere.edu"
12595              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12596 @end lisp
12597
12598 @item nntp-options-not-subscribe
12599 @vindex nntp-options-not-subscribe
12600 Regexp matching the newsgroup names which will not be subscribed
12601 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12602 It may be effective as well as @code{nntp-list-options} even though the
12603 server could not accept a shell-style wildcard as a option of the LIST
12604 command.  You may use it as a server variable as follows:
12605
12606 @lisp
12607 (setq gnus-select-method
12608       '(nntp "news.somewhere.edu"
12609              (nntp-options-not-subscribe "\\.binaries\\.")))
12610 @end lisp
12611 @end table
12612
12613 @menu
12614 * Direct Functions::            Connecting directly to the server.
12615 * Indirect Functions::          Connecting indirectly to the server.
12616 * Common Variables::            Understood by several connection functions.
12617 @end menu
12618
12619
12620 @node Direct Functions
12621 @subsubsection Direct Functions
12622 @cindex direct connection functions
12623
12624 These functions are called direct because they open a direct connection
12625 between your machine and the @acronym{NNTP} server.  The behavior of these
12626 functions is also affected by commonly understood variables
12627 (@pxref{Common Variables}).
12628
12629 @table @code
12630 @findex nntp-open-network-stream
12631 @item nntp-open-network-stream
12632 This is the default, and simply connects to some port or other on the
12633 remote system.
12634
12635 @findex nntp-open-tls-stream
12636 @item nntp-open-tls-stream
12637 Opens a connection to a server over a @dfn{secure} channel.  To use
12638 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12639 installed.  You then define a server as follows:
12640
12641 @lisp
12642 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12643 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12644 ;;
12645 (nntp "snews.bar.com"
12646       (nntp-open-connection-function nntp-open-tls-stream)
12647       (nntp-port-number )
12648       (nntp-address "snews.bar.com"))
12649 @end lisp
12650
12651 @findex nntp-open-ssl-stream
12652 @item nntp-open-ssl-stream
12653 Opens a connection to a server over a @dfn{secure} channel.  To use
12654 this you must have @uref{http://www.openssl.org, OpenSSL} or
12655 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12656 then define a server as follows:
12657
12658 @lisp
12659 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12660 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12661 ;;
12662 (nntp "snews.bar.com"
12663       (nntp-open-connection-function nntp-open-ssl-stream)
12664       (nntp-port-number 563)
12665       (nntp-address "snews.bar.com"))
12666 @end lisp
12667
12668 @findex nntp-open-telnet-stream
12669 @item nntp-open-telnet-stream
12670 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12671 it.  You might wonder why this function exists, since we have the
12672 default @code{nntp-open-network-stream} which would do the job.  (One
12673 of) the reason(s) is that if you are behind a firewall but have direct
12674 connections to the outside world thanks to a command wrapper like
12675 @code{runsocks}, you can use it like this:
12676
12677 @lisp
12678 (nntp "socksified"
12679       (nntp-pre-command "runsocks")
12680       (nntp-open-connection-function nntp-open-telnet-stream)
12681       (nntp-address "the.news.server"))
12682 @end lisp
12683
12684 With the default method, you would need to wrap your whole Emacs
12685 session, which is not a good idea.
12686 @end table
12687
12688
12689 @node Indirect Functions
12690 @subsubsection Indirect Functions
12691 @cindex indirect connection functions
12692
12693 These functions are called indirect because they connect to an
12694 intermediate host before actually connecting to the @acronym{NNTP} server.
12695 All of these functions and related variables are also said to belong to
12696 the ``via'' family of connection: they're all prefixed with ``via'' to make
12697 things cleaner.  The behavior of these functions is also affected by
12698 commonly understood variables (@pxref{Common Variables}).
12699
12700 @table @code
12701 @item nntp-open-via-rlogin-and-telnet
12702 @findex nntp-open-via-rlogin-and-telnet
12703 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12704 to the real @acronym{NNTP} server from there.  This is useful for instance if
12705 you need to connect to a firewall machine first.
12706
12707 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12708
12709 @table @code
12710 @item nntp-via-rlogin-command
12711 @vindex nntp-via-rlogin-command
12712 Command used to log in on the intermediate host.  The default is
12713 @samp{rsh}, but @samp{ssh} is a popular alternative.
12714
12715 @item nntp-via-rlogin-command-switches
12716 @vindex nntp-via-rlogin-command-switches
12717 List of strings to be used as the switches to
12718 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12719 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12720 @samp{("-C")} in order to compress all data connections, otherwise set
12721 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12722 the telnet command requires a pseudo-tty allocation on an intermediate
12723 host.
12724 @end table
12725
12726 @item nntp-open-via-telnet-and-telnet
12727 @findex nntp-open-via-telnet-and-telnet
12728 Does essentially the same, but uses @samp{telnet} instead of
12729 @samp{rlogin} to connect to the intermediate host.
12730
12731 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12732
12733 @table @code
12734 @item nntp-via-telnet-command
12735 @vindex nntp-via-telnet-command
12736 Command used to @code{telnet} the intermediate host.  The default is
12737 @samp{telnet}.
12738
12739 @item nntp-via-telnet-switches
12740 @vindex nntp-via-telnet-switches
12741 List of strings to be used as the switches to the
12742 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12743
12744 @item nntp-via-user-password
12745 @vindex nntp-via-user-password
12746 Password to use when logging in on the intermediate host.
12747
12748 @item nntp-via-envuser
12749 @vindex nntp-via-envuser
12750 If non-@code{nil}, the intermediate @code{telnet} session (client and
12751 server both) will support the @code{ENVIRON} option and not prompt for
12752 login name.  This works for Solaris @code{telnet}, for instance.
12753
12754 @item nntp-via-shell-prompt
12755 @vindex nntp-via-shell-prompt
12756 Regexp matching the shell prompt on the intermediate host.  The default
12757 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12758
12759 @end table
12760
12761 @end table
12762
12763
12764 Here are some additional variables that are understood by all the above
12765 functions:
12766
12767 @table @code
12768
12769 @item nntp-via-user-name
12770 @vindex nntp-via-user-name
12771 User name to use when connecting to the intermediate host.
12772
12773 @item nntp-via-address
12774 @vindex nntp-via-address
12775 Address of the intermediate host to connect to.
12776
12777 @end table
12778
12779
12780 @node Common Variables
12781 @subsubsection Common Variables
12782
12783 The following variables affect the behavior of all, or several of the
12784 pre-made connection functions.  When not specified, all functions are
12785 affected.
12786
12787 @table @code
12788
12789 @item nntp-pre-command
12790 @vindex nntp-pre-command
12791 A command wrapper to use when connecting through a non native
12792 connection function (all except @code{nntp-open-network-stream},
12793 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12794 where you would put a @samp{SOCKS} wrapper for instance.
12795
12796 @item nntp-address
12797 @vindex nntp-address
12798 The address of the @acronym{NNTP} server.
12799
12800 @item nntp-port-number
12801 @vindex nntp-port-number
12802 Port number to connect to the @acronym{NNTP} server.  The default is
12803 @samp{nntp}.  If you use @acronym{NNTP} over
12804 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
12805 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12806 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12807 not work with named ports.
12808
12809 @item nntp-end-of-line
12810 @vindex nntp-end-of-line
12811 String to use as end-of-line marker when talking to the @acronym{NNTP}
12812 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12813 using a non native connection function.
12814
12815 @item nntp-telnet-command
12816 @vindex nntp-telnet-command
12817 Command to use when connecting to the @acronym{NNTP} server through
12818 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12819 just for the real @acronym{NNTP} server.  The default is
12820 @samp{telnet}.
12821
12822 @item nntp-telnet-switches
12823 @vindex nntp-telnet-switches
12824 A list of switches to pass to @code{nntp-telnet-command}.  The default
12825 is @samp{("-8")}.
12826
12827 @end table
12828
12829
12830 @node News Spool
12831 @subsection News Spool
12832 @cindex nnspool
12833 @cindex news spool
12834
12835 Subscribing to a foreign group from the local spool is extremely easy,
12836 and might be useful, for instance, to speed up reading groups that
12837 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12838 instance.
12839
12840 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12841 anything else) as the address.
12842
12843 If you have access to a local spool, you should probably use that as the
12844 native select method (@pxref{Finding the News}).  It is normally faster
12845 than using an @code{nntp} select method, but might not be.  It depends.
12846 You just have to try to find out what's best at your site.
12847
12848 @table @code
12849
12850 @item nnspool-inews-program
12851 @vindex nnspool-inews-program
12852 Program used to post an article.
12853
12854 @item nnspool-inews-switches
12855 @vindex nnspool-inews-switches
12856 Parameters given to the inews program when posting an article.
12857
12858 @item nnspool-spool-directory
12859 @vindex nnspool-spool-directory
12860 Where @code{nnspool} looks for the articles.  This is normally
12861 @file{/usr/spool/news/}.
12862
12863 @item nnspool-nov-directory
12864 @vindex nnspool-nov-directory
12865 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12866 @file{/usr/spool/news/over.view/}.
12867
12868 @item nnspool-lib-dir
12869 @vindex nnspool-lib-dir
12870 Where the news lib dir is (@file{/usr/lib/news/} by default).
12871
12872 @item nnspool-active-file
12873 @vindex nnspool-active-file
12874 The name of the active file.
12875
12876 @item nnspool-newsgroups-file
12877 @vindex nnspool-newsgroups-file
12878 The name of the group descriptions file.
12879
12880 @item nnspool-history-file
12881 @vindex nnspool-history-file
12882 The name of the news history file.
12883
12884 @item nnspool-active-times-file
12885 @vindex nnspool-active-times-file
12886 The name of the active date file.
12887
12888 @item nnspool-nov-is-evil
12889 @vindex nnspool-nov-is-evil
12890 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12891 that it finds.
12892
12893 @item nnspool-sift-nov-with-sed
12894 @vindex nnspool-sift-nov-with-sed
12895 @cindex sed
12896 If non-@code{nil}, which is the default, use @code{sed} to get the
12897 relevant portion from the overview file.  If @code{nil},
12898 @code{nnspool} will load the entire file into a buffer and process it
12899 there.
12900
12901 @end table
12902
12903
12904 @node Getting Mail
12905 @section Getting Mail
12906 @cindex reading mail
12907 @cindex mail
12908
12909 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12910 course.
12911
12912 @menu
12913 * Mail in a Newsreader::        Important introductory notes.
12914 * Getting Started Reading Mail::  A simple cookbook example.
12915 * Splitting Mail::              How to create mail groups.
12916 * Mail Sources::                How to tell Gnus where to get mail from.
12917 * Mail Back End Variables::     Variables for customizing mail handling.
12918 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12919 * Group Mail Splitting::        Use group customize to drive mail splitting.
12920 * Incorporating Old Mail::      What about the old mail you have?
12921 * Expiring Mail::               Getting rid of unwanted mail.
12922 * Washing Mail::                Removing cruft from the mail you get.
12923 * Duplicates::                  Dealing with duplicated mail.
12924 * Not Reading Mail::            Using mail back ends for reading other files.
12925 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12926 @end menu
12927
12928
12929 @node Mail in a Newsreader
12930 @subsection Mail in a Newsreader
12931
12932 If you are used to traditional mail readers, but have decided to switch
12933 to reading mail with Gnus, you may find yourself experiencing something
12934 of a culture shock.
12935
12936 Gnus does not behave like traditional mail readers.  If you want to make
12937 it behave that way, you can, but it's an uphill battle.
12938
12939 Gnus, by default, handles all its groups using the same approach.  This
12940 approach is very newsreaderly---you enter a group, see the new/unread
12941 messages, and when you read the messages, they get marked as read, and
12942 you don't see them any more.  (Unless you explicitly ask for them.)
12943
12944 In particular, you do not do anything explicitly to delete messages.
12945
12946 Does this mean that all the messages that have been marked as read are
12947 deleted?  How awful!
12948
12949 But, no, it means that old messages are @dfn{expired} according to some
12950 scheme or other.  For news messages, the expire process is controlled by
12951 the news administrator; for mail, the expire process is controlled by
12952 you.  The expire process for mail is covered in depth in @ref{Expiring
12953 Mail}.
12954
12955 What many Gnus users find, after using it a while for both news and
12956 mail, is that the transport mechanism has very little to do with how
12957 they want to treat a message.
12958
12959 Many people subscribe to several mailing lists.  These are transported
12960 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12961 answering, or even reading these messages very carefully.  We may not
12962 need to save them because if we should need to read one again, they are
12963 archived somewhere else.
12964
12965 Some people have local news groups which have only a handful of readers.
12966 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12967 to read and answer a large fraction of the messages very carefully in
12968 order to do our work.  And there may not be an archive, so we may need
12969 to save the interesting messages the same way we would personal mail.
12970
12971 The important distinction turns out to be not the transport mechanism,
12972 but other factors such as how interested we are in the subject matter,
12973 or how easy it is to retrieve the message if we need to read it again.
12974
12975 Gnus provides many options for sorting mail into ``groups'' which behave
12976 like newsgroups, and for treating each group (whether mail or news)
12977 differently.
12978
12979 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12980 that Gnus should grow up and be a male, er, mail reader.  It is possible
12981 to whip Gnus into a more mailreaderly being, but, as said before, it's
12982 not easy.  People who prefer proper mail readers should try @sc{vm}
12983 instead, which is an excellent, and proper, mail reader.
12984
12985 I don't mean to scare anybody off, but I want to make it clear that you
12986 may be required to learn a new way of thinking about messages.  After
12987 you've been subjected to The Gnus Way, you will come to love it.  I can
12988 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12989 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12990 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12991 You Do.)
12992
12993
12994 @node Getting Started Reading Mail
12995 @subsection Getting Started Reading Mail
12996
12997 It's quite easy to use Gnus to read your new mail.  You just plonk the
12998 mail back end of your choice into @code{gnus-secondary-select-methods},
12999 and things will happen automatically.
13000
13001 For instance, if you want to use @code{nnml} (which is a ``one file per
13002 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13003
13004 @lisp
13005 (setq gnus-secondary-select-methods '((nnml "")))
13006 @end lisp
13007
13008 Now, the next time you start Gnus, this back end will be queried for new
13009 articles, and it will move all the messages in your spool file to its
13010 directory, which is @file{~/Mail/} by default.  The new group that will
13011 be created (@samp{mail.misc}) will be subscribed, and you can read it
13012 like any other group.
13013
13014 You will probably want to split the mail into several groups, though:
13015
13016 @lisp
13017 (setq nnmail-split-methods
13018       '(("junk" "^From:.*Lars Ingebrigtsen")
13019         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13020         ("other" "")))
13021 @end lisp
13022
13023 This will result in three new @code{nnml} mail groups being created:
13024 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13025 mail that doesn't fit into the first two groups will be placed in the
13026 last group.
13027
13028 This should be sufficient for reading mail with Gnus.  You might want to
13029 give the other sections in this part of the manual a perusal, though.
13030 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13031
13032
13033 @node Splitting Mail
13034 @subsection Splitting Mail
13035 @cindex splitting mail
13036 @cindex mail splitting
13037 @cindex mail filtering (splitting)
13038
13039 @vindex nnmail-split-methods
13040 The @code{nnmail-split-methods} variable says how the incoming mail is
13041 to be split into groups.
13042
13043 @lisp
13044 (setq nnmail-split-methods
13045   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13046     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13047     ("mail.other" "")))
13048 @end lisp
13049
13050 This variable is a list of lists, where the first element of each of
13051 these lists is the name of the mail group (they do not have to be called
13052 something beginning with @samp{mail}, by the way), and the second
13053 element is a regular expression used on the header of each mail to
13054 determine if it belongs in this mail group.  The first string may
13055 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13056 insert sub-expressions from the matched text.  For instance:
13057
13058 @lisp
13059 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13060 @end lisp
13061
13062 The second element can also be a function.  In that case, it will be
13063 called narrowed to the headers with the first element of the rule as the
13064 argument.  It should return a non-@code{nil} value if it thinks that the
13065 mail belongs in that group.
13066
13067 The last of these groups should always be a general one, and the regular
13068 expression should @emph{always} be @samp{*} so that it matches any mails
13069 that haven't been matched by any of the other regexps.  (These rules are
13070 processed from the beginning of the alist toward the end.  The first
13071 rule to make a match will ``win'', unless you have crossposting enabled.
13072 In that case, all matching rules will ``win''.)
13073
13074 If you like to tinker with this yourself, you can set this variable to a
13075 function of your choice.  This function will be called without any
13076 arguments in a buffer narrowed to the headers of an incoming mail
13077 message.  The function should return a list of group names that it
13078 thinks should carry this mail message.
13079
13080 Note that the mail back ends are free to maul the poor, innocent,
13081 incoming headers all they want to.  They all add @code{Lines} headers;
13082 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13083 @code{From<SPACE>} line to something else.
13084
13085 @vindex nnmail-crosspost
13086 The mail back ends all support cross-posting.  If several regexps match,
13087 the mail will be ``cross-posted'' to all those groups.
13088 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13089 that no articles are crossposted to the general (@samp{*}) group.
13090
13091 @vindex nnmail-crosspost-link-function
13092 @cindex crosspost
13093 @cindex links
13094 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13095 the crossposted articles.  However, not all file systems support hard
13096 links.  If that's the case for you, set
13097 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13098 variable is @code{add-name-to-file} by default.)
13099
13100 @kindex M-x nnmail-split-history
13101 @findex nnmail-split-history
13102 If you wish to see where the previous mail split put the messages, you
13103 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13104 where re-spooling messages would put the messages, you can use
13105 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13106 Group Commands}).
13107
13108 @vindex nnmail-split-header-length-limit
13109 Header lines longer than the value of
13110 @code{nnmail-split-header-length-limit} are excluded from the split
13111 function.
13112
13113 @vindex nnmail-mail-splitting-charset
13114 @vindex nnmail-mail-splitting-decodes
13115 By default the splitting codes @acronym{MIME} decodes headers so you
13116 can match on non-@acronym{ASCII} strings.  The
13117 @code{nnmail-mail-splitting-charset} variable specifies the default
13118 charset for decoding.  The behaviour can be turned off completely by
13119 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13120 useful if you want to match articles based on the raw header data.
13121
13122 @vindex nnmail-resplit-incoming
13123 By default, splitting is performed on all incoming messages.  If you
13124 specify a @code{directory} entry for the variable @code{mail-sources}
13125 (@pxref{Mail Source Specifiers}), however, then splitting does
13126 @emph{not} happen by default.  You can set the variable
13127 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13128 splitting happen even in this case.  (This variable has no effect on
13129 other kinds of entries.)
13130
13131 Gnus gives you all the opportunity you could possibly want for shooting
13132 yourself in the foot.  Let's say you create a group that will contain
13133 all the mail you get from your boss.  And then you accidentally
13134 unsubscribe from the group.  Gnus will still put all the mail from your
13135 boss in the unsubscribed group, and so, when your boss mails you ``Have
13136 that report ready by Monday or you're fired!'', you'll never see it and,
13137 come Tuesday, you'll still believe that you're gainfully employed while
13138 you really should be out collecting empty bottles to save up for next
13139 month's rent money.
13140
13141
13142 @node Mail Sources
13143 @subsection Mail Sources
13144
13145 Mail can be gotten from many different sources---the mail spool, from
13146 a @acronym{POP} mail server, from a procmail directory, or from a
13147 maildir, for instance.
13148
13149 @menu
13150 * Mail Source Specifiers::      How to specify what a mail source is.
13151 * Mail Source Customization::   Some variables that influence things.
13152 * Fetching Mail::               Using the mail source specifiers.
13153 @end menu
13154
13155
13156 @node Mail Source Specifiers
13157 @subsubsection Mail Source Specifiers
13158 @cindex POP
13159 @cindex mail server
13160 @cindex procmail
13161 @cindex mail spool
13162 @cindex mail source
13163
13164 You tell Gnus how to fetch mail by setting @code{mail-sources}
13165 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13166
13167 Here's an example:
13168
13169 @lisp
13170 (pop :server "pop3.mailserver.com" :user "myname")
13171 @end lisp
13172
13173 As can be observed, a mail source specifier is a list where the first
13174 element is a @dfn{mail source type}, followed by an arbitrary number of
13175 @dfn{keywords}.  Keywords that are not explicitly specified are given
13176 default values.
13177
13178 The following mail source types are available:
13179
13180 @table @code
13181 @item file
13182 Get mail from a single file; typically from the mail spool.
13183
13184 Keywords:
13185
13186 @table @code
13187 @item :path
13188 The file name.  Defaults to the value of the @env{MAIL}
13189 environment variable or the value of @code{rmail-spool-directory}
13190 (usually something like @file{/usr/mail/spool/user-name}).
13191
13192 @item :prescript
13193 @itemx :postscript
13194 Script run before/after fetching mail.
13195 @end table
13196
13197 An example file mail source:
13198
13199 @lisp
13200 (file :path "/usr/spool/mail/user-name")
13201 @end lisp
13202
13203 Or using the default file name:
13204
13205 @lisp
13206 (file)
13207 @end lisp
13208
13209 If the mail spool file is not located on the local machine, it's best
13210 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13211 You can not use ange-ftp file names here---it has no way to lock the
13212 mail spool while moving the mail.
13213
13214 If it's impossible to set up a proper server, you can use ssh instead.
13215
13216 @lisp
13217 (setq mail-sources
13218       '((file :prescript "ssh host bin/getmail >%t")))
13219 @end lisp
13220
13221 The @samp{getmail} script would look something like the following:
13222
13223 @example
13224 #!/bin/sh
13225 #  getmail - move mail from spool to stdout
13226 #  flu@@iki.fi
13227
13228 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13229 TMP=$HOME/Mail/tmp
13230 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13231 @end example
13232
13233 Alter this script to fit find the @samp{movemail} you want to use.
13234
13235
13236 @item directory
13237 @vindex nnmail-scan-directory-mail-source-once
13238 Get mail from several files in a directory.  This is typically used
13239 when you have procmail split the incoming mail into several files.
13240 That is, there is a one-to-one correspondence between files in that
13241 directory and groups, so that mail from the file @file{foo.bar.spool}
13242 will be put in the group @code{foo.bar}.  (You can change the suffix
13243 to be used instead of @code{.spool}.)  Setting
13244 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13245 Gnus to scan the mail source only once.  This is particularly useful
13246 if you want to scan mail groups at a specified level.
13247
13248 @vindex nnmail-resplit-incoming
13249 There is also the variable @code{nnmail-resplit-incoming}, if you set
13250 that to a non-@code{nil} value, then the normal splitting process is
13251 applied to all the files from the directory, @ref{Splitting Mail}.
13252
13253 Keywords:
13254
13255 @table @code
13256 @item :path
13257 The name of the directory where the files are.  There is no default
13258 value.
13259
13260 @item :suffix
13261 Only files ending with this suffix are used.  The default is
13262 @samp{.spool}.
13263
13264 @item :predicate
13265 Only files that have this predicate return non-@code{nil} are returned.
13266 The default is @code{identity}.  This is used as an additional
13267 filter---only files that have the right suffix @emph{and} satisfy this
13268 predicate are considered.
13269
13270 @item :prescript
13271 @itemx :postscript
13272 Script run before/after fetching mail.
13273
13274 @end table
13275
13276 An example directory mail source:
13277
13278 @lisp
13279 (directory :path "/home/user-name/procmail-dir/"
13280            :suffix ".prcml")
13281 @end lisp
13282
13283 @item pop
13284 Get mail from a @acronym{POP} server.
13285
13286 Keywords:
13287
13288 @table @code
13289 @item :server
13290 The name of the @acronym{POP} server.  The default is taken from the
13291 @env{MAILHOST} environment variable.
13292
13293 @item :port
13294 The port number of the @acronym{POP} server.  This can be a number (eg,
13295 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13296 string, it should be a service name as listed in @file{/etc/services} on
13297 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13298 need to specify it as @samp{"pop-3"} instead.
13299
13300 @item :user
13301 The user name to give to the @acronym{POP} server.  The default is the login
13302 name.
13303
13304 @item :password
13305 The password to give to the @acronym{POP} server.  If not specified,
13306 the user is prompted.
13307
13308 @item :program
13309 The program to use to fetch mail from the @acronym{POP} server.  This
13310 should be a @code{format}-like string.  Here's an example:
13311
13312 @example
13313 fetchmail %u@@%s -P %p %t
13314 @end example
13315
13316 The valid format specifier characters are:
13317
13318 @table @samp
13319 @item t
13320 The name of the file the mail is to be moved to.  This must always be
13321 included in this string.
13322
13323 @item s
13324 The name of the server.
13325
13326 @item P
13327 The port number of the server.
13328
13329 @item u
13330 The user name to use.
13331
13332 @item p
13333 The password to use.
13334 @end table
13335
13336 The values used for these specs are taken from the values you give the
13337 corresponding keywords.
13338
13339 @item :prescript
13340 A script to be run before fetching the mail.  The syntax is the same as
13341 the @code{:program} keyword.  This can also be a function to be run.
13342
13343 @item :postscript
13344 A script to be run after fetching the mail.  The syntax is the same as
13345 the @code{:program} keyword.  This can also be a function to be run.
13346
13347 @item :function
13348 The function to use to fetch mail from the @acronym{POP} server.  The
13349 function is called with one parameter---the name of the file where the
13350 mail should be moved to.
13351
13352 @item :authentication
13353 This can be either the symbol @code{password} or the symbol @code{apop}
13354 and says what authentication scheme to use.  The default is
13355 @code{password}.
13356
13357 @item :connection
13358 What stream to use for connecting to the server, this can be the symbol
13359 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
13360 and use insecure connections.  Note that for SSL/TLS, you need external
13361 programs and libraries:
13362
13363 @itemize @bullet
13364 @item
13365 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
13366 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
13367 library @samp{ssl.el}.
13368 @item
13369 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
13370 Requires the external library @samp{starttls.el} and program
13371 @samp{starttls}.
13372 @end itemize
13373
13374 @item :leave
13375 Non-@code{nil} if mail is to be left on the server and UIDL used for
13376 message retrieval.  The default is @code{nil}.
13377
13378 @end table
13379
13380 If the @code{:program} and @code{:function} keywords aren't specified,
13381 @code{pop3-movemail} will be used.
13382
13383 Here are some examples.  Fetch from the default @acronym{POP} server,
13384 using the default user name, and default fetcher:
13385
13386 @lisp
13387 (pop)
13388 @end lisp
13389
13390 Fetch from a named server with a named user and password:
13391
13392 @lisp
13393 (pop :server "my.pop.server"
13394      :user "user-name" :password "secret")
13395 @end lisp
13396
13397 Use @samp{movemail} to move the mail:
13398
13399 @lisp
13400 (pop :program "movemail po:%u %t %p")
13401 @end lisp
13402
13403 @item maildir
13404 Get mail from a maildir.  This is a type of mailbox that is supported by
13405 at least qmail and postfix, where each file in a special directory
13406 contains exactly one mail.
13407
13408 Keywords:
13409
13410 @table @code
13411 @item :path
13412 The name of the directory where the mails are stored.  The default is
13413 taken from the @env{MAILDIR} environment variable or
13414 @file{~/Maildir/}.
13415 @item :subdirs
13416 The subdirectories of the Maildir.  The default is
13417 @samp{("new" "cur")}.
13418
13419 @c If you sometimes look at your mail through a pop3 daemon before fetching
13420 @c them with Gnus, you may also have to fetch your mails from the
13421 @c @code{cur} directory inside the maildir, like in the first example
13422 @c below.
13423
13424 You can also get mails from remote hosts (because maildirs don't suffer
13425 from locking problems).
13426
13427 @end table
13428
13429 Two example maildir mail sources:
13430
13431 @lisp
13432 (maildir :path "/home/user-name/Maildir/"
13433          :subdirs ("cur" "new"))
13434 @end lisp
13435
13436 @lisp
13437 (maildir :path "/user@@remotehost.org:~/Maildir/"
13438          :subdirs ("new"))
13439 @end lisp
13440
13441 @item imap
13442 Get mail from a @acronym{IMAP} server.  If you don't want to use
13443 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13444 with nnimap), for some reason or other, Gnus let you treat it similar
13445 to a @acronym{POP} server and fetches articles from a given
13446 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13447
13448 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13449 may need external programs and libraries, @xref{IMAP}.
13450
13451 Keywords:
13452
13453 @table @code
13454 @item :server
13455 The name of the @acronym{IMAP} server.  The default is taken from the
13456 @env{MAILHOST} environment variable.
13457
13458 @item :port
13459 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13460 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13461
13462 @item :user
13463 The user name to give to the @acronym{IMAP} server.  The default is the login
13464 name.
13465
13466 @item :password
13467 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13468 prompted.
13469
13470 @item :stream
13471 What stream to use for connecting to the server, this is one of the
13472 symbols in @code{imap-stream-alist}.  Right now, this means
13473 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13474 @samp{ssl}, @samp{shell} or the default @samp{network}.
13475
13476 @item :authentication
13477 Which authenticator to use for authenticating to the server, this is
13478 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13479 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13480 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13481
13482 @item :program
13483 When using the `shell' :stream, the contents of this variable is
13484 mapped into the @code{imap-shell-program} variable.  This should be a
13485 @code{format}-like string (or list of strings).  Here's an example:
13486
13487 @example
13488 ssh %s imapd
13489 @end example
13490
13491 The valid format specifier characters are:
13492
13493 @table @samp
13494 @item s
13495 The name of the server.
13496
13497 @item l
13498 User name from @code{imap-default-user}.
13499
13500 @item p
13501 The port number of the server.
13502 @end table
13503
13504 The values used for these specs are taken from the values you give the
13505 corresponding keywords.
13506
13507 @item :mailbox
13508 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13509 which normally is the mailbox which receive incoming mail.
13510
13511 @item :predicate
13512 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13513 UNDELETED}, is probably the best choice for most people, but if you
13514 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13515 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13516 Then all articles in the mailbox is fetched, no matter what.  For a
13517 complete list of predicates, see RFC 2060 section 6.4.4.
13518
13519 @item :fetchflag
13520 How to flag fetched articles on the server, the default @samp{\Deleted}
13521 will mark them as deleted, an alternative would be @samp{\Seen} which
13522 would simply mark them as read.  These are the two most likely choices,
13523 but more flags are defined in RFC 2060 section 2.3.2.
13524
13525 @item :dontexpunge
13526 If non-@code{nil}, don't remove all articles marked as deleted in the
13527 mailbox after finishing the fetch.
13528
13529 @end table
13530
13531 An example @acronym{IMAP} mail source:
13532
13533 @lisp
13534 (imap :server "mail.mycorp.com"
13535       :stream kerberos4
13536       :fetchflag "\\Seen")
13537 @end lisp
13538
13539 @item webmail
13540 Get mail from a webmail server, such as @uref{www.hotmail.com},
13541 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13542 @uref{mail.yahoo.com}.
13543
13544 NOTE: Webmail largely depends cookies.  A "one-line-cookie" patch is
13545 required for url "4.0pre.46".
13546
13547 WARNING: Mails may be lost.  NO WARRANTY.
13548
13549 Keywords:
13550
13551 @table @code
13552 @item :subtype
13553 The type of the webmail server.  The default is @code{hotmail}.  The
13554 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13555
13556 @item :user
13557 The user name to give to the webmail server.  The default is the login
13558 name.
13559
13560 @item :password
13561 The password to give to the webmail server.  If not specified, the user is
13562 prompted.
13563
13564 @item :dontexpunge
13565 If non-@code{nil}, only fetch unread articles and don't move them to
13566 trash folder after finishing the fetch.
13567
13568 @end table
13569
13570 An example webmail source:
13571
13572 @lisp
13573 (webmail :subtype 'hotmail
13574          :user "user-name"
13575          :password "secret")
13576 @end lisp
13577 @end table
13578
13579 @table @dfn
13580 @item Common Keywords
13581 Common keywords can be used in any type of mail source.
13582
13583 Keywords:
13584
13585 @table @code
13586 @item :plugged
13587 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13588 use directory source to get mail, you can specify it as in this
13589 example:
13590
13591 @lisp
13592 (setq mail-sources
13593       '((directory :path "/home/pavel/.Spool/"
13594                    :suffix ""
13595                    :plugged t)))
13596 @end lisp
13597
13598 Gnus will then fetch your mail even when you are unplugged.  This is
13599 useful when you use local mail and news.
13600
13601 @end table
13602 @end table
13603
13604 @subsubsection Function Interface
13605
13606 Some of the above keywords specify a Lisp function to be executed.
13607 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13608 the value of the keyword while the function is executing.  For example,
13609 consider the following mail-source setting:
13610
13611 @lisp
13612 (setq mail-sources '((pop :user "jrl"
13613                           :server "pophost" :function fetchfunc)))
13614 @end lisp
13615
13616 While the function @code{fetchfunc} is executing, the symbol @code{user}
13617 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13618 @code{"pophost"}.  The symbols @code{port}, @code{password},
13619 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13620 and @code{authentication} are also bound (to their default values).
13621
13622 See above for a list of keywords for each type of mail source.
13623
13624
13625 @node Mail Source Customization
13626 @subsubsection Mail Source Customization
13627
13628 The following is a list of variables that influence how the mail is
13629 fetched.  You would normally not need to set or change any of these
13630 variables.
13631
13632 @table @code
13633 @item mail-source-crash-box
13634 @vindex mail-source-crash-box
13635 File where mail will be stored while processing it.  The default is@*
13636 @file{~/.emacs-mail-crash-box}.
13637
13638 @item mail-source-delete-incoming
13639 @vindex mail-source-delete-incoming
13640 If non-@code{nil}, delete incoming files after handling them.  If
13641 @code{t}, delete the files immediately, if @code{nil}, never delete any
13642 files.  If a positive number, delete files older than number of days
13643 (This will only happen, when receiving new mail).  You may also set
13644 @code{mail-source-delete-incoming} to @code{nil} and call
13645 @code{mail-source-delete-old-incoming} from a hook or interactively.
13646
13647 @item mail-source-delete-old-incoming-confirm
13648 @vindex mail-source-delete-old-incoming-confirm
13649 If non-@code{nil}, ask for for confirmation before deleting old incoming
13650 files.  This variable only applies when
13651 @code{mail-source-delete-incoming} is a positive number.
13652
13653 @item mail-source-ignore-errors
13654 @vindex mail-source-ignore-errors
13655 If non-@code{nil}, ignore errors when reading mail from a mail source.
13656
13657 @item mail-source-directory
13658 @vindex mail-source-directory
13659 Directory where files (if any) will be stored.  The default is
13660 @file{~/Mail/}.  At present, the only thing this is used for is to say
13661 where the incoming files will be stored if the previous variable is
13662 @code{nil}.
13663
13664 @item mail-source-incoming-file-prefix
13665 @vindex mail-source-incoming-file-prefix
13666 Prefix for file name for storing incoming mail.  The default is
13667 @file{Incoming}, in which case files will end up with names like
13668 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13669 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13670
13671 @item mail-source-default-file-modes
13672 @vindex mail-source-default-file-modes
13673 All new mail files will get this file mode.  The default is 384.
13674
13675 @item mail-source-movemail-program
13676 @vindex mail-source-movemail-program
13677 If non-@code{nil}, name of program for fetching new mail.  If
13678 @code{nil}, @code{movemail} in @var{exec-directory}.
13679
13680 @end table
13681
13682
13683 @node Fetching Mail
13684 @subsubsection Fetching Mail
13685
13686 @vindex mail-sources
13687 @vindex nnmail-spool-file
13688 The way to actually tell Gnus where to get new mail from is to set
13689 @code{mail-sources} to a list of mail source specifiers
13690 (@pxref{Mail Source Specifiers}).
13691
13692 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13693 @code{nil}, the mail back ends will never attempt to fetch mail by
13694 themselves.
13695
13696 If you want to fetch mail both from your local spool as well as a
13697 @acronym{POP} mail server, you'd say something like:
13698
13699 @lisp
13700 (setq mail-sources
13701       '((file)
13702         (pop :server "pop3.mail.server"
13703              :password "secret")))
13704 @end lisp
13705
13706 Or, if you don't want to use any of the keyword defaults:
13707
13708 @lisp
13709 (setq mail-sources
13710       '((file :path "/var/spool/mail/user-name")
13711         (pop :server "pop3.mail.server"
13712              :user "user-name"
13713              :port "pop3"
13714              :password "secret")))
13715 @end lisp
13716
13717
13718 When you use a mail back end, Gnus will slurp all your mail from your
13719 inbox and plonk it down in your home directory.  Gnus doesn't move any
13720 mail if you're not using a mail back end---you have to do a lot of magic
13721 invocations first.  At the time when you have finished drawing the
13722 pentagram, lightened the candles, and sacrificed the goat, you really
13723 shouldn't be too surprised when Gnus moves your mail.
13724
13725
13726
13727 @node Mail Back End Variables
13728 @subsection Mail Back End Variables
13729
13730 These variables are (for the most part) pertinent to all the various
13731 mail back ends.
13732
13733 @table @code
13734 @vindex nnmail-read-incoming-hook
13735 @item nnmail-read-incoming-hook
13736 The mail back ends all call this hook after reading new mail.  You can
13737 use this hook to notify any mail watch programs, if you want to.
13738
13739 @vindex nnmail-split-hook
13740 @item nnmail-split-hook
13741 @findex gnus-article-decode-encoded-words
13742 @cindex RFC 1522 decoding
13743 @cindex RFC 2047 decoding
13744 Hook run in the buffer where the mail headers of each message is kept
13745 just before the splitting based on these headers is done.  The hook is
13746 free to modify the buffer contents in any way it sees fit---the buffer
13747 is discarded after the splitting has been done, and no changes performed
13748 in the buffer will show up in any files.
13749 @code{gnus-article-decode-encoded-words} is one likely function to add
13750 to this hook.
13751
13752 @vindex nnmail-pre-get-new-mail-hook
13753 @vindex nnmail-post-get-new-mail-hook
13754 @item nnmail-pre-get-new-mail-hook
13755 @itemx nnmail-post-get-new-mail-hook
13756 These are two useful hooks executed when treating new incoming
13757 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13758 starting to handle the new mail) and
13759 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13760 is done).  Here's and example of using these two hooks to change the
13761 default file modes the new mail files get:
13762
13763 @lisp
13764 (add-hook 'nnmail-pre-get-new-mail-hook
13765           (lambda () (set-default-file-modes 511)))
13766
13767 (add-hook 'nnmail-post-get-new-mail-hook
13768           (lambda () (set-default-file-modes 551)))
13769 @end lisp
13770
13771 @item nnmail-use-long-file-names
13772 @vindex nnmail-use-long-file-names
13773 If non-@code{nil}, the mail back ends will use long file and directory
13774 names.  Groups like @samp{mail.misc} will end up in directories
13775 (assuming use of @code{nnml} back end) or files (assuming use of
13776 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13777 the same group will end up in @file{mail/misc}.
13778
13779 @item nnmail-delete-file-function
13780 @vindex nnmail-delete-file-function
13781 @findex delete-file
13782 Function called to delete files.  It is @code{delete-file} by default.
13783
13784 @item nnmail-cache-accepted-message-ids
13785 @vindex nnmail-cache-accepted-message-ids
13786 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13787 the back end (via @code{Gcc}, for instance) into the mail duplication
13788 discovery cache.  The default is @code{nil}.
13789
13790 @item nnmail-cache-ignore-groups
13791 @vindex nnmail-cache-ignore-groups
13792 This can be a regular expression or a list of regular expressions.
13793 Group names that match any of the regular expressions will never be
13794 recorded in the @code{Message-ID} cache.
13795
13796 This can be useful, for example, when using Fancy Splitting
13797 (@pxref{Fancy Mail Splitting}) together with the function
13798 @code{nnmail-split-fancy-with-parent}.
13799
13800 @end table
13801
13802
13803 @node Fancy Mail Splitting
13804 @subsection Fancy Mail Splitting
13805 @cindex mail splitting
13806 @cindex fancy mail splitting
13807
13808 @vindex nnmail-split-fancy
13809 @findex nnmail-split-fancy
13810 If the rather simple, standard method for specifying how to split mail
13811 doesn't allow you to do what you want, you can set
13812 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13813 play with the @code{nnmail-split-fancy} variable.
13814
13815 Let's look at an example value of this variable first:
13816
13817 @lisp
13818 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13819 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13820 ;; @r{from real errors.}
13821 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13822                    "mail.misc"))
13823    ;; @r{Non-error messages are crossposted to all relevant}
13824    ;; @r{groups, but we don't crosspost between the group for the}
13825    ;; @r{(ding) list and the group for other (ding) related mail.}
13826    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13827          ("subject" "ding" "ding.misc"))
13828       ;; @r{Other mailing lists@dots{}}
13829       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13830       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13831       ;; @r{Both lists below have the same suffix, so prevent}
13832       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13833       ;; @r{the bugs- list, but allow cross-posting when the}
13834       ;; @r{message was really cross-posted.}
13835       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13836       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13837       ;; @r{People@dots{}}
13838       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13839    ;; @r{Unmatched mail goes to the catch all group.}
13840    "misc.misc")
13841 @end lisp
13842
13843 This variable has the format of a @dfn{split}.  A split is a (possibly)
13844 recursive structure where each split may contain other splits.  Here are
13845 the five possible split syntaxes:
13846
13847 @enumerate
13848
13849 @item
13850 @samp{group}: If the split is a string, that will be taken as a group
13851 name.  Normal regexp match expansion will be done.  See below for
13852 examples.
13853
13854 @item
13855 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13856 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13857 first element of which is a string, then store the message as
13858 specified by @var{split}, if header @var{field} (a regexp) contains
13859 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13860 matches some string after @var{field} and before the end of the
13861 matched @var{value}, the @var{split} is ignored.  If none of the
13862 @var{restrict} clauses match, @var{split} is processed.
13863
13864 @item
13865 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13866 element is @code{|} (vertical bar), then process each @var{split} until
13867 one of them matches.  A @var{split} is said to match if it will cause
13868 the mail message to be stored in one or more groups.
13869
13870 @item
13871 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13872 element is @code{&}, then process all @var{split}s in the list.
13873
13874 @item
13875 @code{junk}: If the split is the symbol @code{junk}, then don't save
13876 (i.e., delete) this message.  Use with extreme caution.
13877
13878 @item
13879 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13880 a list, and the first element is @code{:}, then the second element will
13881 be called as a function with @var{args} given as arguments.  The
13882 function should return a @var{split}.
13883
13884 @cindex body split
13885 For instance, the following function could be used to split based on the
13886 body of the messages:
13887
13888 @lisp
13889 (defun split-on-body ()
13890   (save-excursion
13891     (set-buffer " *nnmail incoming*")
13892     (goto-char (point-min))
13893     (when (re-search-forward "Some.*string" nil t)
13894       "string.group")))
13895 @end lisp
13896
13897 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13898 when the @code{:} function is run.
13899
13900 @item
13901 @code{(! @var{func} @var{split})}: If the split is a list, and the
13902 first element is @code{!}, then @var{split} will be processed, and
13903 @var{func} will be called as a function with the result of @var{split}
13904 as argument.  @var{func} should return a split.
13905
13906 @item
13907 @code{nil}: If the split is @code{nil}, it is ignored.
13908
13909 @end enumerate
13910
13911 In these splits, @var{field} must match a complete field name.
13912 @var{value} must match a complete word according to the fundamental mode
13913 syntax table.  You can use @code{.*} in the regexps to match partial
13914 field names or words.  In other words, all @var{value}'s are wrapped in
13915 @samp{\<} and @samp{\>} pairs.
13916
13917 @vindex nnmail-split-abbrev-alist
13918 @var{field} and @var{value} can also be Lisp symbols, in that case
13919 they are expanded as specified by the variable
13920 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
13921 where the @code{car} of a cell contains the key, and the @code{cdr}
13922 contains the associated value.  Predefined entries in
13923 @code{nnmail-split-abbrev-alist} include:
13924
13925 @table @code
13926 @item from
13927 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
13928 @item to
13929 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
13930 @samp{Resent-To} and @samp{Resent-Cc} fields.
13931 @item any
13932 Is the union of the @code{from} and @code{to} entries.
13933 @end table
13934
13935 @vindex nnmail-split-fancy-syntax-table
13936 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13937 when all this splitting is performed.
13938
13939 If you want to have Gnus create groups dynamically based on some
13940 information in the headers (i.e., do @code{replace-match}-like
13941 substitutions in the group names), you can say things like:
13942
13943 @example
13944 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13945 @end example
13946
13947 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13948 will be filed in @samp{mail.debian.foo}.
13949
13950 If the string contains the element @samp{\&}, then the previously
13951 matched string will be substituted.  Similarly, the elements @samp{\\1}
13952 up to @samp{\\9} will be substituted with the text matched by the
13953 groupings 1 through 9.
13954
13955 @findex nnmail-split-fancy-with-parent
13956 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13957 split followups into the same groups their parents are in.  Sometimes
13958 you can't make splitting rules for all your mail.  For example, your
13959 boss might send you personal mail regarding different projects you are
13960 working on, and as you can't tell your boss to put a distinguishing
13961 string into the subject line, you have to resort to manually moving the
13962 messages into the right group.  With this function, you only have to do
13963 it once per thread.
13964
13965 To use this feature, you have to set @code{nnmail-treat-duplicates}
13966 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13967 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13968 using the colon feature, like so:
13969 @lisp
13970 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13971       nnmail-cache-accepted-message-ids t
13972       nnmail-split-fancy
13973       '(| (: nnmail-split-fancy-with-parent)
13974           ;; @r{other splits go here}
13975         ))
13976 @end lisp
13977
13978 This feature works as follows: when @code{nnmail-treat-duplicates} is
13979 non-@code{nil}, Gnus records the message id of every message it sees
13980 in the file specified by the variable
13981 @code{nnmail-message-id-cache-file}, together with the group it is in
13982 (the group is omitted for non-mail messages).  When mail splitting is
13983 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13984 at the References (and In-Reply-To) header of each message to split
13985 and searches the file specified by @code{nnmail-message-id-cache-file}
13986 for the message ids.  When it has found a parent, it returns the
13987 corresponding group name unless the group name matches the regexp
13988 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13989 recommended that you set @code{nnmail-message-id-cache-length} to a
13990 somewhat higher number than the default so that the message ids are
13991 still in the cache.  (A value of 5000 appears to create a file some
13992 300 kBytes in size.)
13993 @vindex nnmail-cache-accepted-message-ids
13994 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13995 also records the message ids of moved articles, so that the followup
13996 messages goes into the new group.
13997
13998 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13999 want certain groups to be recorded in the cache.  For example, if all
14000 outgoing messages are written to an ``outgoing'' group, you could set
14001 @code{nnmail-cache-ignore-groups} to match that group name.
14002 Otherwise, answers to all your messages would end up in the
14003 ``outgoing'' group.
14004
14005
14006 @node Group Mail Splitting
14007 @subsection Group Mail Splitting
14008 @cindex mail splitting
14009 @cindex group mail splitting
14010
14011 @findex gnus-group-split
14012 If you subscribe to dozens of mailing lists but you don't want to
14013 maintain mail splitting rules manually, group mail splitting is for you.
14014 You just have to set @var{to-list} and/or @var{to-address} in group
14015 parameters or group customization and set @code{nnmail-split-methods} to
14016 @code{gnus-group-split}.  This splitting function will scan all groups
14017 for those parameters and split mail accordingly, i.e., messages posted
14018 from or to the addresses specified in the parameters @var{to-list} or
14019 @var{to-address} of a mail group will be stored in that group.
14020
14021 Sometimes, mailing lists have multiple addresses, and you may want mail
14022 splitting to recognize them all: just set the @var{extra-aliases} group
14023 parameter to the list of additional addresses and it's done.  If you'd
14024 rather use a regular expression, set @var{split-regexp}.
14025
14026 All these parameters in a group will be used to create an
14027 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14028 the @var{value} is a single regular expression that matches
14029 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
14030 matches of @var{split-regexp}, and the @var{split} is the name of the
14031 group.  @var{restrict}s are also supported: just set the
14032 @var{split-exclude} parameter to a list of regular expressions.
14033
14034 If you can't get the right split to be generated using all these
14035 parameters, or you just need something fancier, you can set the
14036 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
14037 this case, all other aforementioned parameters will be ignored by
14038 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
14039 @code{nil}, in which case the group will be ignored by
14040 @code{gnus-group-split}.
14041
14042 @vindex gnus-group-split-default-catch-all-group
14043 @code{gnus-group-split} will do cross-posting on all groups that match,
14044 by defining a single @code{&} fancy split containing one split for each
14045 group.  If a message doesn't match any split, it will be stored in the
14046 group named in @code{gnus-group-split-default-catch-all-group}, unless
14047 some group has @var{split-spec} set to @code{catch-all}, in which case
14048 that group is used as the catch-all group.  Even though this variable is
14049 often used just to name a group, it may also be set to an arbitrarily
14050 complex fancy split (after all, a group name is a fancy split), and this
14051 may be useful to split mail that doesn't go to any mailing list to
14052 personal mail folders.  Note that this fancy split is added as the last
14053 element of a @code{|} split list that also contains a @code{&} split
14054 with the rules extracted from group parameters.
14055
14056 It's time for an example.  Assume the following group parameters have
14057 been defined:
14058
14059 @example
14060 nnml:mail.bar:
14061 ((to-address . "bar@@femail.com")
14062  (split-regexp . ".*@@femail\\.com"))
14063 nnml:mail.foo:
14064 ((to-list . "foo@@nowhere.gov")
14065  (extra-aliases "foo@@localhost" "foo-redist@@home")
14066  (split-exclude "bugs-foo" "rambling-foo")
14067  (admin-address . "foo-request@@nowhere.gov"))
14068 nnml:mail.others:
14069 ((split-spec . catch-all))
14070 @end example
14071
14072 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14073 behave as if @code{nnmail-split-fancy} had been selected and variable
14074 @code{nnmail-split-fancy} had been set as follows:
14075
14076 @lisp
14077 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14078       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14079            - "bugs-foo" - "rambling-foo" "mail.foo"))
14080    "mail.others")
14081 @end lisp
14082
14083 @findex gnus-group-split-fancy
14084 If you'd rather not use group splitting for all your mail groups, you
14085 may use it for only some of them, by using @code{nnmail-split-fancy}
14086 splits like this:
14087
14088 @lisp
14089 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14090 @end lisp
14091
14092 @var{groups} may be a regular expression or a list of group names whose
14093 parameters will be scanned to generate the output split.
14094 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14095 single @code{|} split will be output.  @var{catch-all} is the fall back
14096 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14097 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14098 empty string in any selected group, no catch-all split will be issued.
14099 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14100 this group will override the value of the @var{catch-all} argument.
14101
14102 @findex gnus-group-split-setup
14103 Unfortunately, scanning all groups and their parameters can be quite
14104 slow, especially considering that it has to be done for every message.
14105 But don't despair!  The function @code{gnus-group-split-setup} can be
14106 used to enable @code{gnus-group-split} in a much more efficient way.  It
14107 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14108 @code{nnmail-split-fancy} to the split produced by
14109 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14110 scanned once, no matter how many messages are split.
14111
14112 @findex gnus-group-split-update
14113 However, if you change group parameters, you'd have to update
14114 @code{nnmail-split-fancy} manually.  You can do it by running
14115 @code{gnus-group-split-update}.  If you'd rather have it updated
14116 automatically, just tell @code{gnus-group-split-setup} to do it for
14117 you.  For example, add to your @file{~/.gnus.el}:
14118
14119 @lisp
14120 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14121 @end lisp
14122
14123 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14124 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14125 have to worry about updating @code{nnmail-split-fancy} again.  If you
14126 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14127 @code{gnus-group-split-default-catch-all-group} will be set to its
14128 value.
14129
14130 @vindex gnus-group-split-updated-hook
14131 Because you may want to change @code{nnmail-split-fancy} after it is set
14132 by @code{gnus-group-split-update}, this function will run
14133 @code{gnus-group-split-updated-hook} just before finishing.
14134
14135 @node Incorporating Old Mail
14136 @subsection Incorporating Old Mail
14137 @cindex incorporating old mail
14138 @cindex import old mail
14139
14140 Most people have lots of old mail stored in various file formats.  If
14141 you have set up Gnus to read mail using one of the spiffy Gnus mail
14142 back ends, you'll probably wish to have that old mail incorporated into
14143 your mail groups.
14144
14145 Doing so can be quite easy.
14146
14147 To take an example: You're reading mail using @code{nnml}
14148 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14149 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14150 file filled with important, but old, mail.  You want to move it into
14151 your @code{nnml} groups.
14152
14153 Here's how:
14154
14155 @enumerate
14156 @item
14157 Go to the group buffer.
14158
14159 @item
14160 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14161 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14162
14163 @item
14164 Type @kbd{SPACE} to enter the newly created group.
14165
14166 @item
14167 Type @kbd{M P b} to process-mark all articles in this group's buffer
14168 (@pxref{Setting Process Marks}).
14169
14170 @item
14171 Type @kbd{B r} to respool all the process-marked articles, and answer
14172 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14173 @end enumerate
14174
14175 All the mail messages in the mbox file will now also be spread out over
14176 all your @code{nnml} groups.  Try entering them and check whether things
14177 have gone without a glitch.  If things look ok, you may consider
14178 deleting the mbox file, but I wouldn't do that unless I was absolutely
14179 sure that all the mail has ended up where it should be.
14180
14181 Respooling is also a handy thing to do if you're switching from one mail
14182 back end to another.  Just respool all the mail in the old mail groups
14183 using the new mail back end.
14184
14185
14186 @node Expiring Mail
14187 @subsection Expiring Mail
14188 @cindex article expiry
14189
14190 Traditional mail readers have a tendency to remove mail articles when
14191 you mark them as read, in some way.  Gnus takes a fundamentally
14192 different approach to mail reading.
14193
14194 Gnus basically considers mail just to be news that has been received in
14195 a rather peculiar manner.  It does not think that it has the power to
14196 actually change the mail, or delete any mail messages.  If you enter a
14197 mail group, and mark articles as ``read'', or kill them in some other
14198 fashion, the mail articles will still exist on the system.  I repeat:
14199 Gnus will not delete your old, read mail.  Unless you ask it to, of
14200 course.
14201
14202 To make Gnus get rid of your unwanted mail, you have to mark the
14203 articles as @dfn{expirable}.  (With the default key bindings, this means
14204 that you have to type @kbd{E}.)  This does not mean that the articles
14205 will disappear right away, however.  In general, a mail article will be
14206 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14207 more than one week old.  If you do not mark an article as expirable, it
14208 will remain on your system until hell freezes over.  This bears
14209 repeating one more time, with some spurious capitalizations: IF you do
14210 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14211
14212 You do not have to mark articles as expirable by hand.  Gnus provides
14213 two features, called ``auto-expire'' and ``total-expire'', that can help you
14214 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14215 for you when you select an article.  And ``total-expire'' means that Gnus
14216 considers all articles as expirable that are read.  So, in addition to
14217 the articles marked @samp{E}, also the articles marked @samp{r},
14218 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14219 expirable.
14220
14221 When should either auto-expire or total-expire be used?  Most people
14222 who are subscribed to mailing lists split each list into its own group
14223 and then turn on auto-expire or total-expire for those groups.
14224 (@xref{Splitting Mail}, for more information on splitting each list
14225 into its own group.)
14226
14227 Which one is better, auto-expire or total-expire?  It's not easy to
14228 answer.  Generally speaking, auto-expire is probably faster.  Another
14229 advantage of auto-expire is that you get more marks to work with: for
14230 the articles that are supposed to stick around, you can still choose
14231 between tick and dormant and read marks.  But with total-expire, you
14232 only have dormant and ticked to choose from.  The advantage of
14233 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14234 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14235 scoring.
14236
14237 @vindex gnus-auto-expirable-newsgroups
14238 Groups that match the regular expression
14239 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14240 read marked as expirable automatically.  All articles marked as
14241 expirable have an @samp{E} in the first column in the summary buffer.
14242
14243 By default, if you have auto expiry switched on, Gnus will mark all the
14244 articles you read as expirable, no matter if they were read or unread
14245 before.  To avoid having articles marked as read marked as expirable
14246 automatically, you can put something like the following in your
14247 @file{~/.gnus.el} file:
14248
14249 @vindex gnus-mark-article-hook
14250 @lisp
14251 (remove-hook 'gnus-mark-article-hook
14252              'gnus-summary-mark-read-and-unread-as-read)
14253 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14254 @end lisp
14255
14256 Note that making a group auto-expirable doesn't mean that all read
14257 articles are expired---only the articles marked as expirable
14258 will be expired.  Also note that using the @kbd{d} command won't make
14259 articles expirable---only semi-automatic marking of articles as read will
14260 mark the articles as expirable in auto-expirable groups.
14261
14262 Let's say you subscribe to a couple of mailing lists, and you want the
14263 articles you have read to disappear after a while:
14264
14265 @lisp
14266 (setq gnus-auto-expirable-newsgroups
14267       "mail.nonsense-list\\|mail.nice-list")
14268 @end lisp
14269
14270 Another way to have auto-expiry happen is to have the element
14271 @code{auto-expire} in the group parameters of the group.
14272
14273 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14274 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14275 don't really mix very well.
14276
14277 @vindex nnmail-expiry-wait
14278 The @code{nnmail-expiry-wait} variable supplies the default time an
14279 expirable article has to live.  Gnus starts counting days from when the
14280 message @emph{arrived}, not from when it was sent.  The default is seven
14281 days.
14282
14283 Gnus also supplies a function that lets you fine-tune how long articles
14284 are to live, based on what group they are in.  Let's say you want to
14285 have one month expiry period in the @samp{mail.private} group, a one day
14286 expiry period in the @samp{mail.junk} group, and a six day expiry period
14287 everywhere else:
14288
14289 @vindex nnmail-expiry-wait-function
14290 @lisp
14291 (setq nnmail-expiry-wait-function
14292       (lambda (group)
14293        (cond ((string= group "mail.private")
14294                31)
14295              ((string= group "mail.junk")
14296                1)
14297              ((string= group "important")
14298                'never)
14299              (t
14300                6))))
14301 @end lisp
14302
14303 The group names this function is fed are ``unadorned'' group
14304 names---no @samp{nnml:} prefixes and the like.
14305
14306 The @code{nnmail-expiry-wait} variable and
14307 @code{nnmail-expiry-wait-function} function can either be a number (not
14308 necessarily an integer) or one of the symbols @code{immediate} or
14309 @code{never}.
14310
14311 You can also use the @code{expiry-wait} group parameter to selectively
14312 change the expiry period (@pxref{Group Parameters}).
14313
14314 @vindex nnmail-expiry-target
14315 The normal action taken when expiring articles is to delete them.
14316 However, in some circumstances it might make more sense to move them
14317 to other groups instead of deleting them.  The variable
14318 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14319 parameter) controls this.  The variable supplies a default value for
14320 all groups, which can be overridden for specific groups by the group
14321 parameter.  default value is @code{delete}, but this can also be a
14322 string (which should be the name of the group the message should be
14323 moved to), or a function (which will be called in a buffer narrowed to
14324 the message in question, and with the name of the group being moved
14325 from as its parameter) which should return a target---either a group
14326 name or @code{delete}.
14327
14328 Here's an example for specifying a group name:
14329 @lisp
14330 (setq nnmail-expiry-target "nnml:expired")
14331 @end lisp
14332
14333 @findex nnmail-fancy-expiry-target
14334 @vindex nnmail-fancy-expiry-targets
14335 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14336 expire mail to groups according to the variable
14337 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14338
14339 @lisp
14340  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14341        nnmail-fancy-expiry-targets
14342        '((to-from "boss" "nnfolder:Work")
14343          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14344          ("from" ".*" "nnfolder:Archive-%Y")))
14345 @end lisp
14346
14347 With this setup, any mail that has @code{IMPORTANT} in its Subject
14348 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14349 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14350 From or To header contains the string @code{boss}, it will get expired
14351 to @code{nnfolder:Work}.  All other mail will get expired to
14352 @code{nnfolder:Archive-YYYY}.
14353
14354 @vindex nnmail-keep-last-article
14355 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14356 expire the final article in a mail newsgroup.  This is to make life
14357 easier for procmail users.
14358
14359 @vindex gnus-total-expirable-newsgroups
14360 By the way: That line up there, about Gnus never expiring non-expirable
14361 articles, is a lie.  If you put @code{total-expire} in the group
14362 parameters, articles will not be marked as expirable, but all read
14363 articles will be put through the expiry process.  Use with extreme
14364 caution.  Even more dangerous is the
14365 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14366 this regexp will have all read articles put through the expiry process,
14367 which means that @emph{all} old mail articles in the groups in question
14368 will be deleted after a while.  Use with extreme caution, and don't come
14369 crying to me when you discover that the regexp you used matched the
14370 wrong group and all your important mail has disappeared.  Be a
14371 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14372 with!  So there!
14373
14374 Most people make most of their mail groups total-expirable, though.
14375
14376 @vindex gnus-inhibit-user-auto-expire
14377 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14378 commands will not mark an article as expirable, even if the group has
14379 auto-expire turned on.
14380
14381
14382 @node Washing Mail
14383 @subsection Washing Mail
14384 @cindex mail washing
14385 @cindex list server brain damage
14386 @cindex incoming mail treatment
14387
14388 Mailers and list servers are notorious for doing all sorts of really,
14389 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14390 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14391 end of all lines passing through our server, so let's do that!!!!1!''
14392 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14393 considered to be self-evident were not discussed.  So.  Here we are.
14394
14395 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14396 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14397 be shocked and dismayed by this, but I haven't got the energy.  It is to
14398 laugh.
14399
14400 Gnus provides a plethora of functions for washing articles while
14401 displaying them, but it might be nicer to do the filtering before
14402 storing the mail to disk.  For that purpose, we have three hooks and
14403 various functions that can be put in these hooks.
14404
14405 @table @code
14406 @item nnmail-prepare-incoming-hook
14407 @vindex nnmail-prepare-incoming-hook
14408 This hook is called before doing anything with the mail and is meant for
14409 grand, sweeping gestures.  It is called in a buffer that contains all
14410 the new, incoming mail.  Functions to be used include:
14411
14412 @table @code
14413 @item nnheader-ms-strip-cr
14414 @findex nnheader-ms-strip-cr
14415 Remove trailing carriage returns from each line.  This is default on
14416 Emacs running on MS machines.
14417
14418 @end table
14419
14420 @item nnmail-prepare-incoming-header-hook
14421 @vindex nnmail-prepare-incoming-header-hook
14422 This hook is called narrowed to each header.  It can be used when
14423 cleaning up the headers.  Functions that can be used include:
14424
14425 @table @code
14426 @item nnmail-remove-leading-whitespace
14427 @findex nnmail-remove-leading-whitespace
14428 Clear leading white space that ``helpful'' listservs have added to the
14429 headers to make them look nice.  Aaah.
14430
14431 (Note that this function works on both the header on the body of all
14432 messages, so it is a potentially dangerous function to use (if a body
14433 of a message contains something that looks like a header line).  So
14434 rather than fix the bug, it is of course the right solution to make it
14435 into a feature by documenting it.)
14436
14437 @item nnmail-remove-list-identifiers
14438 @findex nnmail-remove-list-identifiers
14439 Some list servers add an identifier---for example, @samp{(idm)}---to the
14440 beginning of all @code{Subject} headers.  I'm sure that's nice for
14441 people who use stone age mail readers.  This function will remove
14442 strings that match the @code{nnmail-list-identifiers} regexp, which can
14443 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14444 @code{\\(..\\)}.
14445
14446 For instance, if you want to remove the @samp{(idm)} and the
14447 @samp{nagnagnag} identifiers:
14448
14449 @lisp
14450 (setq nnmail-list-identifiers
14451       '("(idm)" "nagnagnag"))
14452 @end lisp
14453
14454 This can also be done non-destructively with
14455 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14456
14457 @item nnmail-remove-tabs
14458 @findex nnmail-remove-tabs
14459 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14460
14461 @item nnmail-fix-eudora-headers
14462 @findex nnmail-fix-eudora-headers
14463 @cindex Eudora
14464 Eudora produces broken @code{References} headers, but OK
14465 @code{In-Reply-To} headers.  This function will get rid of the
14466 @code{References} headers.
14467
14468 @end table
14469
14470 @item nnmail-prepare-incoming-message-hook
14471 @vindex nnmail-prepare-incoming-message-hook
14472 This hook is called narrowed to each message.  Functions to be used
14473 include:
14474
14475 @table @code
14476 @item article-de-quoted-unreadable
14477 @findex article-de-quoted-unreadable
14478 Decode Quoted Readable encoding.
14479
14480 @end table
14481 @end table
14482
14483
14484 @node Duplicates
14485 @subsection Duplicates
14486
14487 @vindex nnmail-treat-duplicates
14488 @vindex nnmail-message-id-cache-length
14489 @vindex nnmail-message-id-cache-file
14490 @cindex duplicate mails
14491 If you are a member of a couple of mailing lists, you will sometimes
14492 receive two copies of the same mail.  This can be quite annoying, so
14493 @code{nnmail} checks for and treats any duplicates it might find.  To do
14494 this, it keeps a cache of old @code{Message-ID}s---
14495 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14496 default.  The approximate maximum number of @code{Message-ID}s stored
14497 there is controlled by the @code{nnmail-message-id-cache-length}
14498 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14499 stored.) If all this sounds scary to you, you can set
14500 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14501 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14502 will insert a warning into the head of the mail saying that it thinks
14503 that this is a duplicate of a different message.
14504
14505 This variable can also be a function.  If that's the case, the function
14506 will be called from a buffer narrowed to the message in question with
14507 the @code{Message-ID} as a parameter.  The function must return either
14508 @code{nil}, @code{warn}, or @code{delete}.
14509
14510 You can turn this feature off completely by setting the variable to
14511 @code{nil}.
14512
14513 If you want all the duplicate mails to be put into a special
14514 @dfn{duplicates} group, you could do that using the normal mail split
14515 methods:
14516
14517 @lisp
14518 (setq nnmail-split-fancy
14519       '(| ;; @r{Messages duplicates go to a separate group.}
14520         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14521         ;; @r{Message from daemons, postmaster, and the like to another.}
14522         (any mail "mail.misc")
14523         ;; @r{Other rules.}
14524         [...] ))
14525 @end lisp
14526 @noindent
14527 Or something like:
14528 @lisp
14529 (setq nnmail-split-methods
14530       '(("duplicates" "^Gnus-Warning:.*duplicate")
14531         ;; @r{Other rules.}
14532         [...]))
14533 @end lisp
14534
14535 Here's a neat feature: If you know that the recipient reads her mail
14536 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14537 @code{delete}, you can send her as many insults as you like, just by
14538 using a @code{Message-ID} of a mail that you know that she's already
14539 received.  Think of all the fun!  She'll never see any of it!  Whee!
14540
14541
14542 @node Not Reading Mail
14543 @subsection Not Reading Mail
14544
14545 If you start using any of the mail back ends, they have the annoying
14546 habit of assuming that you want to read mail with them.  This might not
14547 be unreasonable, but it might not be what you want.
14548
14549 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14550 @code{nil}, none of the back ends will ever attempt to read incoming
14551 mail, which should help.
14552
14553 @vindex nnbabyl-get-new-mail
14554 @vindex nnmbox-get-new-mail
14555 @vindex nnml-get-new-mail
14556 @vindex nnmh-get-new-mail
14557 @vindex nnfolder-get-new-mail
14558 This might be too much, if, for instance, you are reading mail quite
14559 happily with @code{nnml} and just want to peek at some old Rmail
14560 file you have stashed away with @code{nnbabyl}.  All back ends have
14561 variables called back-end-@code{get-new-mail}.  If you want to disable
14562 the @code{nnbabyl} mail reading, you edit the virtual server for the
14563 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14564
14565 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14566 narrowed to the article to be saved before saving it when reading
14567 incoming mail.
14568
14569
14570 @node Choosing a Mail Back End
14571 @subsection Choosing a Mail Back End
14572
14573 Gnus will read the mail spool when you activate a mail group.  The mail
14574 file is first copied to your home directory.  What happens after that
14575 depends on what format you want to store your mail in.
14576
14577 There are six different mail back ends in the standard Gnus, and more
14578 back ends are available separately.  The mail back end most people use
14579 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14580 Spool}).
14581
14582 @menu
14583 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14584 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14585 * Mail Spool::                  Store your mail in a private spool?
14586 * MH Spool::                    An mhspool-like back end.
14587 * Maildir::                     Another one-file-per-message format.
14588 * Mail Folders::                Having one file for each group.
14589 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14590 @end menu
14591
14592
14593 @node Unix Mail Box
14594 @subsubsection Unix Mail Box
14595 @cindex nnmbox
14596 @cindex unix mail box
14597
14598 @vindex nnmbox-active-file
14599 @vindex nnmbox-mbox-file
14600 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14601 mail.  @code{nnmbox} will add extra headers to each mail article to say
14602 which group it belongs in.
14603
14604 Virtual server settings:
14605
14606 @table @code
14607 @item nnmbox-mbox-file
14608 @vindex nnmbox-mbox-file
14609 The name of the mail box in the user's home directory.  Default is
14610 @file{~/mbox}.
14611
14612 @item nnmbox-active-file
14613 @vindex nnmbox-active-file
14614 The name of the active file for the mail box.  Default is
14615 @file{~/.mbox-active}.
14616
14617 @item nnmbox-get-new-mail
14618 @vindex nnmbox-get-new-mail
14619 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14620 into groups.  Default is @code{t}.
14621 @end table
14622
14623
14624 @node Rmail Babyl
14625 @subsubsection Rmail Babyl
14626 @cindex nnbabyl
14627 @cindex Rmail mbox
14628
14629 @vindex nnbabyl-active-file
14630 @vindex nnbabyl-mbox-file
14631 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14632 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14633 mail article to say which group it belongs in.
14634
14635 Virtual server settings:
14636
14637 @table @code
14638 @item nnbabyl-mbox-file
14639 @vindex nnbabyl-mbox-file
14640 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14641
14642 @item nnbabyl-active-file
14643 @vindex nnbabyl-active-file
14644 The name of the active file for the rmail box.  The default is
14645 @file{~/.rmail-active}
14646
14647 @item nnbabyl-get-new-mail
14648 @vindex nnbabyl-get-new-mail
14649 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14650 @code{t}
14651 @end table
14652
14653
14654 @node Mail Spool
14655 @subsubsection Mail Spool
14656 @cindex nnml
14657 @cindex mail @acronym{NOV} spool
14658
14659 The @dfn{nnml} spool mail format isn't compatible with any other known
14660 format.  It should be used with some caution.
14661
14662 @vindex nnml-directory
14663 If you use this back end, Gnus will split all incoming mail into files,
14664 one file for each mail, and put the articles into the corresponding
14665 directories under the directory specified by the @code{nnml-directory}
14666 variable.  The default value is @file{~/Mail/}.
14667
14668 You do not have to create any directories beforehand; Gnus will take
14669 care of all that.
14670
14671 If you have a strict limit as to how many files you are allowed to store
14672 in your account, you should not use this back end.  As each mail gets its
14673 own file, you might very well occupy thousands of inodes within a few
14674 weeks.  If this is no problem for you, and it isn't a problem for you
14675 having your friendly systems administrator walking around, madly,
14676 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14677 know that this is probably the fastest format to use.  You do not have
14678 to trudge through a big mbox file just to read your new mail.
14679
14680 @code{nnml} is probably the slowest back end when it comes to article
14681 splitting.  It has to create lots of files, and it also generates
14682 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14683 fastest back end when it comes to reading mail.
14684
14685 @cindex self contained nnml servers
14686 @cindex marks
14687 When the marks file is used (which it is by default), @code{nnml}
14688 servers have the property that you may backup them using @code{tar} or
14689 similar, and later be able to restore them into Gnus (by adding the
14690 proper @code{nnml} server) and have all your marks be preserved.  Marks
14691 for a group is usually stored in the @code{.marks} file (but see
14692 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14693 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14694 to restore the group (after restoring the backup into the nnml
14695 directory).
14696
14697 If for some reason you believe your @file{.marks} files are screwed
14698 up, you can just delete them all.  Gnus will then correctly regenerate
14699 them next time it starts.
14700
14701 Virtual server settings:
14702
14703 @table @code
14704 @item nnml-directory
14705 @vindex nnml-directory
14706 All @code{nnml} directories will be placed under this directory.  The
14707 default is the value of @code{message-directory} (whose default value
14708 is @file{~/Mail}).
14709
14710 @item nnml-active-file
14711 @vindex nnml-active-file
14712 The active file for the @code{nnml} server.  The default is
14713 @file{~/Mail/active}.
14714
14715 @item nnml-newsgroups-file
14716 @vindex nnml-newsgroups-file
14717 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14718 Format}.  The default is @file{~/Mail/newsgroups}.
14719
14720 @item nnml-get-new-mail
14721 @vindex nnml-get-new-mail
14722 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14723 @code{t}.
14724
14725 @item nnml-nov-is-evil
14726 @vindex nnml-nov-is-evil
14727 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14728 default is @code{nil}.
14729
14730 @item nnml-nov-file-name
14731 @vindex nnml-nov-file-name
14732 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14733
14734 @item nnml-prepare-save-mail-hook
14735 @vindex nnml-prepare-save-mail-hook
14736 Hook run narrowed to an article before saving.
14737
14738 @item nnml-marks-is-evil
14739 @vindex nnml-marks-is-evil
14740 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14741 default is @code{nil}.
14742
14743 @item nnml-marks-file-name
14744 @vindex nnml-marks-file-name
14745 The name of the @dfn{marks} files.  The default is @file{.marks}.
14746
14747 @item nnml-use-compressed-files
14748 @vindex nnml-use-compressed-files
14749 If non-@code{nil}, @code{nnml} will allow using compressed message
14750 files.
14751
14752 @end table
14753
14754 @findex nnml-generate-nov-databases
14755 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14756 you can do a complete update by typing @kbd{M-x
14757 nnml-generate-nov-databases}.  This command will trawl through the
14758 entire @code{nnml} hierarchy, looking at each and every article, so it
14759 might take a while to complete.  A better interface to this
14760 functionality can be found in the server buffer (@pxref{Server
14761 Commands}).
14762
14763
14764 @node MH Spool
14765 @subsubsection MH Spool
14766 @cindex nnmh
14767 @cindex mh-e mail spool
14768
14769 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14770 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14771 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14772 but it also makes it easier to write procmail scripts for.
14773
14774 Virtual server settings:
14775
14776 @table @code
14777 @item nnmh-directory
14778 @vindex nnmh-directory
14779 All @code{nnmh} directories will be located under this directory.  The
14780 default is the value of @code{message-directory} (whose default is
14781 @file{~/Mail})
14782
14783 @item nnmh-get-new-mail
14784 @vindex nnmh-get-new-mail
14785 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14786 @code{t}.
14787
14788 @item nnmh-be-safe
14789 @vindex nnmh-be-safe
14790 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14791 sure that the articles in the folder are actually what Gnus thinks they
14792 are.  It will check date stamps and stat everything in sight, so
14793 setting this to @code{t} will mean a serious slow-down.  If you never
14794 use anything but Gnus to read the @code{nnmh} articles, you do not have
14795 to set this variable to @code{t}.  The default is @code{nil}.
14796 @end table
14797
14798
14799 @node Maildir
14800 @subsubsection Maildir
14801 @cindex nnmaildir
14802 @cindex maildir
14803
14804 @code{nnmaildir} stores mail in the maildir format, with each maildir
14805 corresponding to a group in Gnus.  This format is documented here:
14806 @uref{http://cr.yp.to/proto/maildir.html} and here:
14807 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14808 stores extra information in the @file{.nnmaildir/} directory within a
14809 maildir.
14810
14811 Maildir format was designed to allow concurrent deliveries and
14812 reading, without needing locks.  With other back ends, you would have
14813 your mail delivered to a spool of some kind, and then you would
14814 configure Gnus to split mail from that spool into your groups.  You
14815 can still do that with nnmaildir, but the more common configuration is
14816 to have your mail delivered directly to the maildirs that appear as
14817 group in Gnus.
14818
14819 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14820 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14821 data in the filesystem.
14822
14823 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14824 can copy a whole maildir from one Gnus setup to another, and you will
14825 keep your marks.
14826
14827 Virtual server settings:
14828
14829 @table @code
14830 @item directory
14831 For each of your nnmaildir servers (it's very unlikely that you'd need
14832 more than one), you need to create a directory and populate it with
14833 maildirs or symlinks to maildirs (and nothing else; do not choose a
14834 directory already used for other purposes).  Each maildir will be
14835 represented in Gnus as a newsgroup on that server; the filename of the
14836 symlink will be the name of the group.  Any filenames in the directory
14837 starting with @samp{.} are ignored.  The directory is scanned when you
14838 first start Gnus, and each time you type @kbd{g} in the group buffer;
14839 if any maildirs have been removed or added, nnmaildir notices at these
14840 times.
14841
14842 The value of the @code{directory} parameter should be a Lisp form
14843 which is processed by @code{eval} and @code{expand-file-name} to get
14844 the path of the directory for this server.  The form is @code{eval}ed
14845 only when the server is opened; the resulting string is used until the
14846 server is closed.  (If you don't know about forms and @code{eval},
14847 don't worry---a simple string will work.)  This parameter is not
14848 optional; you must specify it.  I don't recommend using
14849 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14850 use that directory by default for various things, and may get confused
14851 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14852
14853 @item target-prefix
14854 This should be a Lisp form which is processed by @code{eval} and
14855 @code{expand-file-name}.  The form is @code{eval}ed only when the
14856 server is opened; the resulting string is used until the server is
14857 closed.
14858
14859 When you create a group on an nnmaildir server, the maildir is created
14860 with @code{target-prefix} prepended to its name, and a symlink
14861 pointing to that maildir is created, named with the plain group name.
14862 So if @code{directory} is @code{"~/.nnmaildir"} and
14863 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14864 the group @code{foo}, nnmaildir will create
14865 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14866 @file{~/.nnmaildir/foo} as a symlink pointing to
14867 @file{../maildirs/foo}.
14868
14869 You can set @code{target-prefix} to a string without any slashes to
14870 create both maildirs and symlinks in the same @code{directory}; in
14871 this case, any maildirs found in @code{directory} whose names start
14872 with @code{target-prefix} will not be listed as groups (but the
14873 symlinks pointing to them will be).
14874
14875 As a special case, if @code{target-prefix} is @code{""} (the default),
14876 then when you create a group, the maildir will be created in
14877 @code{directory} without a corresponding symlink.  Beware that you
14878 cannot use @code{gnus-group-delete-group} on such groups without the
14879 @code{force} argument.
14880
14881 @item directory-files
14882 This should be a function with the same interface as
14883 @code{directory-files} (such as @code{directory-files} itself).  It is
14884 used to scan the server's @code{directory} for maildirs.  This
14885 parameter is optional; the default is
14886 @code{nnheader-directory-files-safe} if
14887 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14888 @code{directory-files} otherwise.
14889 (@code{nnheader-directory-files-is-safe} is checked only once when the
14890 server is opened; if you want to check it each time the directory is
14891 scanned, you'll have to provide your own function that does that.)
14892
14893 @item get-new-mail
14894 If non-@code{nil}, then after scanning for new mail in the group
14895 maildirs themselves as usual, this server will also incorporate mail
14896 the conventional Gnus way, from @code{mail-sources} according to
14897 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14898 value is @code{nil}.
14899
14900 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14901 an nnmaildir group.  The results might happen to be useful, but that
14902 would be by chance, not by design, and the results might be different
14903 in the future.  If your split rules create new groups, remember to
14904 supply a @code{create-directory} server parameter.
14905 @end table
14906
14907 @subsubsection Group parameters
14908
14909 nnmaildir uses several group parameters.  It's safe to ignore all
14910 this; the default behavior for nnmaildir is the same as the default
14911 behavior for other mail back ends: articles are deleted after one week,
14912 etc.  Except for the expiry parameters, all this functionality is
14913 unique to nnmaildir, so you can ignore it if you're just trying to
14914 duplicate the behavior you already have with another back end.
14915
14916 If the value of any of these parameters is a vector, the first element
14917 is evaluated as a Lisp form and the result is used, rather than the
14918 original value.  If the value is not a vector, the value itself is
14919 evaluated as a Lisp form.  (This is why these parameters use names
14920 different from those of other, similar parameters supported by other
14921 back ends: they have different, though similar, meanings.)  (For
14922 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14923 @code{eval} business again; for other values, remember to use an extra
14924 quote and wrap the value in a vector when appropriate.)
14925
14926 @table @code
14927 @item expire-age
14928 An integer specifying the minimum age, in seconds, of an article before
14929 it will be expired, or the symbol @code{never} to specify that
14930 articles should never be expired.  If this parameter is not set,
14931 nnmaildir falls back to the usual
14932 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14933 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14934 wanted a value of 3 days, you could use something like @code{[(* 3 24
14935 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14936 article's age is measured starting from the article file's
14937 modification time.  Normally, this is the same as the article's
14938 delivery time, but editing an article makes it younger.  Moving an
14939 article (other than via expiry) may also make an article younger.
14940
14941 @item expire-group
14942 If this is set to a string such as a full Gnus group name, like
14943 @example
14944 "backend+server.address.string:group.name"
14945 @end example
14946 and if it is not the name of the same group that the parameter belongs
14947 to, then articles will be moved to the specified group during expiry
14948 before being deleted.  @emph{If this is set to an nnmaildir group, the
14949 article will be just as old in the destination group as it was in the
14950 source group.}  So be careful with @code{expire-age} in the
14951 destination group.  If this is set to the name of the same group that
14952 the parameter belongs to, then the article is not expired at all.  If
14953 you use the vector form, the first element is evaluated once for each
14954 article.  So that form can refer to
14955 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14956 article.  @emph{If this parameter is not set, nnmaildir does not fall
14957 back to the @code{expiry-target} group parameter or the
14958 @code{nnmail-expiry-target} variable.}
14959
14960 @item read-only
14961 If this is set to @code{t}, nnmaildir will treat the articles in this
14962 maildir as read-only.  This means: articles are not renamed from
14963 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14964 not @file{cur/}; articles are never deleted; articles cannot be
14965 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14966 directory of another maildir---e.g., a system-wide mailbox containing
14967 a mailing list of common interest.  Everything in the maildir outside
14968 @file{new/} is @emph{not} treated as read-only, so for a shared
14969 mailbox, you do still need to set up your own maildir (or have write
14970 permission to the shared mailbox); your maildir just won't contain
14971 extra copies of the articles.
14972
14973 @item directory-files
14974 A function with the same interface as @code{directory-files}.  It is
14975 used to scan the directories in the maildir corresponding to this
14976 group to find articles.  The default is the function specified by the
14977 server's @code{directory-files} parameter.
14978
14979 @item distrust-Lines:
14980 If non-@code{nil}, nnmaildir will always count the lines of an
14981 article, rather than use the @code{Lines:} header field.  If
14982 @code{nil}, the header field will be used if present.
14983
14984 @item always-marks
14985 A list of mark symbols, such as
14986 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14987 article marks, nnmaildir will say that all articles have these
14988 marks, regardless of whether the marks stored in the filesystem
14989 say so.  This is a proof-of-concept feature that will probably be
14990 removed eventually; it ought to be done in Gnus proper, or
14991 abandoned if it's not worthwhile.
14992
14993 @item never-marks
14994 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14995 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14996 articles have these marks, regardless of whether the marks stored in
14997 the filesystem say so.  @code{never-marks} overrides
14998 @code{always-marks}.  This is a proof-of-concept feature that will
14999 probably be removed eventually; it ought to be done in Gnus proper, or
15000 abandoned if it's not worthwhile.
15001
15002 @item nov-cache-size
15003 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
15004 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
15005 articles in each group.  (This is probably not worthwhile, and will
15006 probably be removed in the future.)  This parameter's value is noticed
15007 only the first time a group is seen after the server is opened---i.e.,
15008 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
15009 until the server is closed and reopened.  The default is an estimate
15010 of the number of articles that would be displayed in the summary
15011 buffer: a count of articles that are either marked with @code{tick} or
15012 not marked with @code{read}, plus a little extra.
15013 @end table
15014
15015 @subsubsection Article identification
15016 Articles are stored in the @file{cur/} subdirectory of each maildir.
15017 Each article file is named like @code{uniq:info}, where @code{uniq}
15018 contains no colons.  nnmaildir ignores, but preserves, the
15019 @code{:info} part.  (Other maildir readers typically use this part of
15020 the filename to store marks.)  The @code{uniq} part uniquely
15021 identifies the article, and is used in various places in the
15022 @file{.nnmaildir/} subdirectory of the maildir to store information
15023 about the corresponding article.  The full pathname of an article is
15024 available in the variable @code{nnmaildir-article-file-name} after you
15025 request the article in the summary buffer.
15026
15027 @subsubsection NOV data
15028 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15029 generate lines in the summary buffer) stored in
15030 @code{.nnmaildir/nov/uniq}.  There is no
15031 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15032 need for it---an article's @acronym{NOV} data is updated automatically when the
15033 article or @code{nnmail-extra-headers} has changed.)  You can force
15034 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15035 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15036 cause nnmaildir to assign a new article number for this article, which
15037 may cause trouble with @code{seen} marks, the Agent, and the cache.
15038
15039 @subsubsection Article marks
15040 An article identified by @code{uniq} is considered to have the mark
15041 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15042 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15043 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15044 to store a new set of marks, nnmaildir creates and deletes the
15045 corresponding files as needed.  (Actually, rather than create a new
15046 file for each mark, it just creates hard links to
15047 @file{.nnmaildir/markfile}, to save inodes.)
15048
15049 You can invent new marks by creating a new directory in
15050 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15051 your server, untar it later, and keep your marks.  You can add and
15052 remove marks yourself by creating and deleting mark files.  If you do
15053 this while Gnus is running and your nnmaildir server is open, it's
15054 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15055 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15056 group buffer afterwards.  Otherwise, Gnus might not pick up the
15057 changes, and might undo them.
15058
15059
15060 @node Mail Folders
15061 @subsubsection Mail Folders
15062 @cindex nnfolder
15063 @cindex mbox folders
15064 @cindex mail folders
15065
15066 @code{nnfolder} is a back end for storing each mail group in a separate
15067 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15068 will add extra headers to keep track of article numbers and arrival
15069 dates.
15070
15071 @cindex self contained nnfolder servers
15072 @cindex marks
15073 When the marks file is used (which it is by default), @code{nnfolder}
15074 servers have the property that you may backup them using @code{tar} or
15075 similar, and later be able to restore them into Gnus (by adding the
15076 proper @code{nnfolder} server) and have all your marks be preserved.
15077 Marks for a group is usually stored in a file named as the mbox file
15078 with @code{.mrk} concatenated to it (but see
15079 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15080 Individual @code{nnfolder} groups are also possible to backup, use
15081 @kbd{G m} to restore the group (after restoring the backup into the
15082 @code{nnfolder} directory).
15083
15084 Virtual server settings:
15085
15086 @table @code
15087 @item nnfolder-directory
15088 @vindex nnfolder-directory
15089 All the @code{nnfolder} mail boxes will be stored under this directory.
15090 The default is the value of @code{message-directory} (whose default is
15091 @file{~/Mail})
15092
15093 @item nnfolder-active-file
15094 @vindex nnfolder-active-file
15095 The name of the active file.  The default is @file{~/Mail/active}.
15096
15097 @item nnfolder-newsgroups-file
15098 @vindex nnfolder-newsgroups-file
15099 The name of the group descriptions file.  @xref{Newsgroups File
15100 Format}.  The default is @file{~/Mail/newsgroups}
15101
15102 @item nnfolder-get-new-mail
15103 @vindex nnfolder-get-new-mail
15104 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15105 is @code{t}
15106
15107 @item nnfolder-save-buffer-hook
15108 @vindex nnfolder-save-buffer-hook
15109 @cindex backup files
15110 Hook run before saving the folders.  Note that Emacs does the normal
15111 backup renaming of files even with the @code{nnfolder} buffers.  If you
15112 wish to switch this off, you could say something like the following in
15113 your @file{.emacs} file:
15114
15115 @lisp
15116 (defun turn-off-backup ()
15117   (set (make-local-variable 'backup-inhibited) t))
15118
15119 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15120 @end lisp
15121
15122 @item nnfolder-delete-mail-hook
15123 @vindex nnfolder-delete-mail-hook
15124 Hook run in a buffer narrowed to the message that is to be deleted.
15125 This function can be used to copy the message to somewhere else, or to
15126 extract some information from it before removing it.
15127
15128 @item nnfolder-nov-is-evil
15129 @vindex nnfolder-nov-is-evil
15130 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15131 default is @code{nil}.
15132
15133 @item nnfolder-nov-file-suffix
15134 @vindex nnfolder-nov-file-suffix
15135 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15136
15137 @item nnfolder-nov-directory
15138 @vindex nnfolder-nov-directory
15139 The directory where the @acronym{NOV} files should be stored.  If
15140 @code{nil}, @code{nnfolder-directory} is used.
15141
15142 @item nnfolder-marks-is-evil
15143 @vindex nnfolder-marks-is-evil
15144 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15145 default is @code{nil}.
15146
15147 @item nnfolder-marks-file-suffix
15148 @vindex nnfolder-marks-file-suffix
15149 The extension for @sc{marks} files.  The default is @file{.mrk}.
15150
15151 @item nnfolder-marks-directory
15152 @vindex nnfolder-marks-directory
15153 The directory where the @sc{marks} files should be stored.  If
15154 @code{nil}, @code{nnfolder-directory} is used.
15155
15156 @end table
15157
15158
15159 @findex nnfolder-generate-active-file
15160 @kindex M-x nnfolder-generate-active-file
15161 If you have lots of @code{nnfolder}-like files you'd like to read with
15162 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15163 command to make @code{nnfolder} aware of all likely files in
15164 @code{nnfolder-directory}.  This only works if you use long file names,
15165 though.
15166
15167 @node Comparing Mail Back Ends
15168 @subsubsection Comparing Mail Back Ends
15169
15170 First, just for terminology, the @dfn{back end} is the common word for a
15171 low-level access method---a transport, if you will, by which something
15172 is acquired.  The sense is that one's mail has to come from somewhere,
15173 and so selection of a suitable back end is required in order to get that
15174 mail within spitting distance of Gnus.
15175
15176 The same concept exists for Usenet itself: Though access to articles is
15177 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15178 in the world got at Usenet by running a reader on the machine where the
15179 articles lay (the machine which today we call an @acronym{NNTP} server), and
15180 access was by the reader stepping into the articles' directory spool
15181 area directly.  One can still select between either the @code{nntp} or
15182 @code{nnspool} back ends, to select between these methods, if one happens
15183 actually to live on the server (or can see its spool directly, anyway,
15184 via NFS).
15185
15186 The goal in selecting a mail back end is to pick one which
15187 simultaneously represents a suitable way of dealing with the original
15188 format plus leaving mail in a form that is convenient to use in the
15189 future.  Here are some high and low points on each:
15190
15191 @table @code
15192 @item nnmbox
15193
15194 UNIX systems have historically had a single, very common, and well-
15195 defined format.  All messages arrive in a single @dfn{spool file}, and
15196 they are delineated by a line whose regular expression matches
15197 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15198 to make it clear in this instance that this is not the RFC-specified
15199 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15200 historically from the Unix environment, it is simplest if one does not
15201 mess a great deal with the original mailbox format, so if one chooses
15202 this back end, Gnus' primary activity in getting mail from the real spool
15203 area to Gnus' preferred directory is simply to copy it, with no
15204 (appreciable) format change in the process.  It is the ``dumbest'' way
15205 to move mail into availability in the Gnus environment.  This makes it
15206 fast to move into place, but slow to parse, when Gnus has to look at
15207 what's where.
15208
15209 @item nnbabyl
15210
15211 Once upon a time, there was the DEC-10 and DEC-20, running operating
15212 systems called TOPS and related things, and the usual (only?) mail
15213 reading environment was a thing called Babyl.  I don't know what format
15214 was used for mail landing on the system, but Babyl had its own internal
15215 format to which mail was converted, primarily involving creating a
15216 spool-file-like entity with a scheme for inserting Babyl-specific
15217 headers and status bits above the top of each message in the file.
15218 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15219 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15220 to understand the mail files folks already had in existence.  Gnus (and
15221 VM, for that matter) continue to support this format because it's
15222 perceived as having some good qualities in those mailer-specific
15223 headers/status bits stuff.  Rmail itself still exists as well, of
15224 course, and is still maintained by Stallman.
15225
15226 Both of the above forms leave your mail in a single file on your
15227 file system, and they must parse that entire file each time you take a
15228 look at your mail.
15229
15230 @item nnml
15231
15232 @code{nnml} is the back end which smells the most as though you were
15233 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15234 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15235 lo these years ago.)  One's mail is taken from the original spool file,
15236 and is then cut up into individual message files, 1:1.  It maintains a
15237 Usenet-style active file (analogous to what one finds in an INN- or
15238 CNews-based news system in (for instance) @file{/var/lib/news/active},
15239 or what is returned via the @samp{NNTP LIST} verb) and also creates
15240 @dfn{overview} files for efficient group entry, as has been defined for
15241 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15242 due to the creation of lots of files, updates to the @code{nnml} active
15243 file, and additions to overview files on a per-message basis, but it is
15244 extremely fast on access because of what amounts to the indexing support
15245 provided by the active file and overviews.
15246
15247 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15248 resource which defines available places in the file system to put new
15249 files.  Sysadmins take a dim view of heavy inode occupation within
15250 tight, shared file systems.  But if you live on a personal machine where
15251 the file system is your own and space is not at a premium, @code{nnml}
15252 wins big.
15253
15254 It is also problematic using this back end if you are living in a
15255 FAT16-based Windows world, since much space will be wasted on all these
15256 tiny files.
15257
15258 @item nnmh
15259
15260 The Rand MH mail-reading system has been around UNIX systems for a very
15261 long time; it operates by splitting one's spool file of messages into
15262 individual files, but with little or no indexing support---@code{nnmh}
15263 is considered to be semantically equivalent to ``@code{nnml} without
15264 active file or overviews''.  This is arguably the worst choice, because
15265 one gets the slowness of individual file creation married to the
15266 slowness of access parsing when learning what's new in one's groups.
15267
15268 @item nnfolder
15269
15270 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15271 method described above) on a per-group basis.  That is, @code{nnmbox}
15272 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15273 little bit of optimization to this so that each of one's mail groups has
15274 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15275 can be parsed separately, and still provides the simple Unix mail box
15276 format requiring minimal effort in moving the mail around.  In addition,
15277 it maintains an ``active'' file making it much faster for Gnus to figure
15278 out how many messages there are in each separate group.
15279
15280 If you have groups that are expected to have a massive amount of
15281 messages, @code{nnfolder} is not the best choice, but if you receive
15282 only a moderate amount of mail, @code{nnfolder} is probably the most
15283 friendly mail back end all over.
15284
15285 @item nnmaildir
15286
15287 For configuring expiry and other things, @code{nnmaildir} uses
15288 incompatible group parameters, slightly different from those of other
15289 mail back ends.
15290
15291 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15292 differences.  Each message is stored in a separate file, but the
15293 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15294 also stores the equivalent of @code{nnml}'s overview files in one file
15295 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15296 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15297 you down or takes up very much space, consider switching to
15298 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15299 file system.
15300
15301 Since maildirs don't require locking for delivery, the maildirs you use
15302 as groups can also be the maildirs your mail is directly delivered to.
15303 This means you can skip Gnus' mail splitting if your mail is already
15304 organized into different mailboxes during delivery.  A @code{directory}
15305 entry in @code{mail-sources} would have a similar effect, but would
15306 require one set of mailboxes for spooling deliveries (in mbox format,
15307 thus damaging message bodies), and another set to be used as groups (in
15308 whatever format you like).  A maildir has a built-in spool, in the
15309 @code{new/} subdirectory.  Beware that currently, mail moved from
15310 @code{new/} to @code{cur/} instead of via mail splitting will not
15311 undergo treatment such as duplicate checking.
15312
15313 @code{nnmaildir} stores article marks for a given group in the
15314 corresponding maildir, in a way designed so that it's easy to manipulate
15315 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15316 else, and still have your marks.  @code{nnml} also stores marks, but
15317 it's not as easy to work with them from outside Gnus as with
15318 @code{nnmaildir}.
15319
15320 @code{nnmaildir} uses a significant amount of memory to speed things up.
15321 (It keeps in memory some of the things that @code{nnml} stores in files
15322 and that @code{nnmh} repeatedly parses out of message files.)  If this
15323 is a problem for you, you can set the @code{nov-cache-size} group
15324 parameter to something small (0 would probably not work, but 1 probably
15325 would) to make it use less memory.  This caching will probably be
15326 removed in the future.
15327
15328 Startup is likely to be slower with @code{nnmaildir} than with other
15329 back ends.  Everything else is likely to be faster, depending in part
15330 on your file system.
15331
15332 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15333 to write an @code{nnmaildir}-derived back end.
15334
15335 @end table
15336
15337
15338 @node Browsing the Web
15339 @section Browsing the Web
15340 @cindex web
15341 @cindex browsing the web
15342 @cindex www
15343 @cindex http
15344
15345 Web-based discussion forums are getting more and more popular.  On many
15346 subjects, the web-based forums have become the most important forums,
15347 eclipsing the importance of mailing lists and news groups.  The reason
15348 is easy to understand---they are friendly to new users; you just point
15349 and click, and there's the discussion.  With mailing lists, you have to
15350 go through a cumbersome subscription procedure, and most people don't
15351 even know what a news group is.
15352
15353 The problem with this scenario is that web browsers are not very good at
15354 being newsreaders.  They do not keep track of what articles you've read;
15355 they do not allow you to score on subjects you're interested in; they do
15356 not allow off-line browsing; they require you to click around and drive
15357 you mad in the end.
15358
15359 So---if web browsers suck at reading discussion forums, why not use Gnus
15360 to do it instead?
15361
15362 Gnus has been getting a bit of a collection of back ends for providing
15363 interfaces to these sources.
15364
15365 @menu
15366 * Archiving Mail::
15367 * Web Searches::                Creating groups from articles that match a string.
15368 * Slashdot::                    Reading the Slashdot comments.
15369 * Ultimate::                    The Ultimate Bulletin Board systems.
15370 * Web Archive::                 Reading mailing list archived on web.
15371 * RSS::                         Reading RDF site summary.
15372 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15373 @end menu
15374
15375 All the web sources require Emacs/w3 and the url library to work.
15376
15377 The main caveat with all these web sources is that they probably won't
15378 work for a very long time.  Gleaning information from the @acronym{HTML} data
15379 is guesswork at best, and when the layout is altered, the Gnus back end
15380 will fail.  If you have reasonably new versions of these back ends,
15381 though, you should be ok.
15382
15383 One thing all these Web methods have in common is that the Web sources
15384 are often down, unavailable or just plain too slow to be fun.  In those
15385 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15386 Unplugged}) handle downloading articles, and then you can read them at
15387 leisure from your local disk.  No more World Wide Wait for you.
15388
15389 @node Archiving Mail
15390 @subsection Archiving Mail
15391 @cindex archiving mail
15392 @cindex backup of mail
15393
15394 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15395 @code{nnmaildir}, now actually store the article marks with each group.
15396 For these servers, archiving and restoring a group while preserving
15397 marks is fairly simple.
15398
15399 (Preserving the group level and group parameters as well still
15400 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15401 though.)
15402
15403 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15404 server, take a recursive copy of the server directory.  There is no need
15405 to shut down Gnus, so archiving may be invoked by @code{cron} or
15406 similar.  You restore the data by restoring the directory tree, and
15407 adding a server definition pointing to that directory in Gnus.  The
15408 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15409 might interfere with overwriting data, so you may want to shut down Gnus
15410 before you restore the data.
15411
15412 It is also possible to archive individual @code{nnml},
15413 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15414 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15415 directory.  For @code{nnfolder} you need to copy both the base folder
15416 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15417 this example).  Restoring the group is done with @kbd{G m} from the Group
15418 buffer.  The last step makes Gnus notice the new directory.
15419 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15420 is unnecessary in that case.
15421
15422 @node Web Searches
15423 @subsection Web Searches
15424 @cindex nnweb
15425 @cindex Google
15426 @cindex dejanews
15427 @cindex gmane
15428 @cindex Usenet searches
15429 @cindex searching the Usenet
15430
15431 It's, like, too neat to search the Usenet for articles that match a
15432 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15433 those, like, Web browsers, and you, like, have to, rilly, like, look at
15434 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15435 searches without having to use a browser.
15436
15437 The @code{nnweb} back end allows an easy interface to the mighty search
15438 engine.  You create an @code{nnweb} group, enter a search pattern, and
15439 then enter the group and read the articles like you would any normal
15440 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15441 Groups}) will do this in an easy-to-use fashion.
15442
15443 @code{nnweb} groups don't really lend themselves to being solid
15444 groups---they have a very fleeting idea of article numbers.  In fact,
15445 each time you enter an @code{nnweb} group (not even changing the search
15446 pattern), you are likely to get the articles ordered in a different
15447 manner.  Not even using duplicate suppression (@pxref{Duplicate
15448 Suppression}) will help, since @code{nnweb} doesn't even know the
15449 @code{Message-ID} of the articles before reading them using some search
15450 engines (Google, for instance).  The only possible way to keep track
15451 of which articles you've read is by scoring on the @code{Date}
15452 header---mark all articles posted before the last date you read the
15453 group as read.
15454
15455 If the search engine changes its output substantially, @code{nnweb}
15456 won't be able to parse it and will fail.  One could hardly fault the Web
15457 providers if they were to do this---their @emph{raison d'être} is to
15458 make money off of advertisements, not to provide services to the
15459 community.  Since @code{nnweb} washes the ads off all the articles, one
15460 might think that the providers might be somewhat miffed.  We'll see.
15461
15462 You must have the @code{url} and @code{w3} package installed to be able
15463 to use @code{nnweb}.
15464
15465 Virtual server variables:
15466
15467 @table @code
15468 @item nnweb-type
15469 @vindex nnweb-type
15470 What search engine type is being used.  The currently supported types
15471 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15472 @code{dejanews} is an alias to @code{google}.
15473
15474 @item nnweb-search
15475 @vindex nnweb-search
15476 The search string to feed to the search engine.
15477
15478 @item nnweb-max-hits
15479 @vindex nnweb-max-hits
15480 Advisory maximum number of hits per search to display.  The default is
15481 999.
15482
15483 @item nnweb-type-definition
15484 @vindex nnweb-type-definition
15485 Type-to-definition alist.  This alist says what @code{nnweb} should do
15486 with the various search engine types.  The following elements must be
15487 present:
15488
15489 @table @code
15490 @item article
15491 Function to decode the article and provide something that Gnus
15492 understands.
15493
15494 @item map
15495 Function to create an article number to message header and URL alist.
15496
15497 @item search
15498 Function to send the search string to the search engine.
15499
15500 @item address
15501 The address the aforementioned function should send the search string
15502 to.
15503
15504 @item id
15505 Format string URL to fetch an article by @code{Message-ID}.
15506 @end table
15507
15508 @end table
15509
15510
15511 @node Slashdot
15512 @subsection Slashdot
15513 @cindex Slashdot
15514 @cindex nnslashdot
15515
15516 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15517 lively discussion following the news articles.  @code{nnslashdot} will
15518 let you read this forum in a convenient manner.
15519
15520 The easiest way to read this source is to put something like the
15521 following in your @file{~/.gnus.el} file:
15522
15523 @lisp
15524 (setq gnus-secondary-select-methods
15525       '((nnslashdot "")))
15526 @end lisp
15527
15528 This will make Gnus query the @code{nnslashdot} back end for new comments
15529 and groups.  The @kbd{F} command will subscribe each new news article as
15530 a new Gnus group, and you can read the comments by entering these
15531 groups.  (Note that the default subscription method is to subscribe new
15532 groups as zombies.  Other methods are available (@pxref{Subscription
15533 Methods}).
15534
15535 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15536 command is the most handy tool (@pxref{Foreign Groups}).
15537
15538 When following up to @code{nnslashdot} comments (or posting new
15539 comments), some light @acronym{HTML}izations will be performed.  In
15540 particular, text quoted with @samp{> } will be quoted with
15541 @code{blockquote} instead, and signatures will have @code{br} added to
15542 the end of each line.  Other than that, you can just write @acronym{HTML}
15543 directly into the message buffer.  Note that Slashdot filters out some
15544 @acronym{HTML} forms.
15545
15546 The following variables can be altered to change its behavior:
15547
15548 @table @code
15549 @item nnslashdot-threaded
15550 Whether @code{nnslashdot} should display threaded groups or not.  The
15551 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15552 has to retrieve absolutely all comments in a group upon entry.  If a
15553 threaded display is not required, @code{nnslashdot} will only retrieve
15554 the comments that are actually wanted by the user.  Threading is nicer,
15555 but much, much slower than unthreaded.
15556
15557 @item nnslashdot-login-name
15558 @vindex nnslashdot-login-name
15559 The login name to use when posting.
15560
15561 @item nnslashdot-password
15562 @vindex nnslashdot-password
15563 The password to use when posting.
15564
15565 @item nnslashdot-directory
15566 @vindex nnslashdot-directory
15567 Where @code{nnslashdot} will store its files.  The default is
15568 @file{~/News/slashdot/}.
15569
15570 @item nnslashdot-active-url
15571 @vindex nnslashdot-active-url
15572 The @sc{url} format string that will be used to fetch the information on
15573 news articles and comments.  The default is@*
15574 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15575
15576 @item nnslashdot-comments-url
15577 @vindex nnslashdot-comments-url
15578 The @sc{url} format string that will be used to fetch comments.  The
15579 default is
15580 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15581
15582 @item nnslashdot-article-url
15583 @vindex nnslashdot-article-url
15584 The @sc{url} format string that will be used to fetch the news article.  The
15585 default is
15586 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15587
15588 @item nnslashdot-threshold
15589 @vindex nnslashdot-threshold
15590 The score threshold.  The default is -1.
15591
15592 @item nnslashdot-group-number
15593 @vindex nnslashdot-group-number
15594 The number of old groups, in addition to the ten latest, to keep
15595 updated.  The default is 0.
15596
15597 @end table
15598
15599
15600
15601 @node Ultimate
15602 @subsection Ultimate
15603 @cindex nnultimate
15604 @cindex Ultimate Bulletin Board
15605
15606 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15607 probably the most popular Web bulletin board system used.  It has a
15608 quite regular and nice interface, and it's possible to get the
15609 information Gnus needs to keep groups updated.
15610
15611 The easiest way to get started with @code{nnultimate} is to say
15612 something like the following in the group buffer:  @kbd{B nnultimate RET
15613 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15614 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15615 you're interested in; there's quite a list of them on the Ultimate web
15616 site.)  Then subscribe to the groups you're interested in from the
15617 server buffer, and read them from the group buffer.
15618
15619 The following @code{nnultimate} variables can be altered:
15620
15621 @table @code
15622 @item nnultimate-directory
15623 @vindex nnultimate-directory
15624 The directory where @code{nnultimate} stores its files.  The default is@*
15625 @file{~/News/ultimate/}.
15626 @end table
15627
15628
15629 @node Web Archive
15630 @subsection Web Archive
15631 @cindex nnwarchive
15632 @cindex Web Archive
15633
15634 Some mailing lists only have archives on Web servers, such as
15635 @uref{http://www.egroups.com/} and
15636 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15637 interface, and it's possible to get the information Gnus needs to keep
15638 groups updated.
15639
15640 @findex gnus-group-make-warchive-group
15641 The easiest way to get started with @code{nnwarchive} is to say
15642 something like the following in the group buffer: @kbd{M-x
15643 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15644 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15645 @var{an_egroup} with the mailing list you subscribed, the
15646 @var{your@@email.address} with your email address.), or to browse the
15647 back end by @kbd{B nnwarchive RET mail-archive RET}.
15648
15649 The following @code{nnwarchive} variables can be altered:
15650
15651 @table @code
15652 @item nnwarchive-directory
15653 @vindex nnwarchive-directory
15654 The directory where @code{nnwarchive} stores its files.  The default is@*
15655 @file{~/News/warchive/}.
15656
15657 @item nnwarchive-login
15658 @vindex nnwarchive-login
15659 The account name on the web server.
15660
15661 @item nnwarchive-passwd
15662 @vindex nnwarchive-passwd
15663 The password for your account on the web server.
15664 @end table
15665
15666 @node RSS
15667 @subsection RSS
15668 @cindex nnrss
15669 @cindex RSS
15670
15671 Some sites have RDF site summary (RSS)
15672 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15673 interface, and it's possible to get the information Gnus needs to keep
15674 groups updated.
15675
15676 The easiest way to get started with @code{nnrss} is to say something
15677 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15678 subscribe groups.
15679
15680 The following @code{nnrss} variables can be altered:
15681
15682 @table @code
15683 @item nnrss-directory
15684 @vindex nnrss-directory
15685 The directory where @code{nnrss} stores its files.  The default is
15686 @file{~/News/rss/}.
15687
15688 @end table
15689
15690 The following code may be helpful, if you want to show the description in
15691 the summary buffer.
15692
15693 @lisp
15694 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15695 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15696
15697 (defun gnus-user-format-function-X (header)
15698   (let ((descr
15699          (assq nnrss-description-field (mail-header-extra header))))
15700     (if descr (concat "\n\t" (cdr descr)) "")))
15701 @end lisp
15702
15703 The following code may be useful to open an nnrss url directly from the
15704 summary buffer.
15705 @lisp
15706 (require 'browse-url)
15707
15708 (defun browse-nnrss-url( arg )
15709   (interactive "p")
15710   (let ((url (assq nnrss-url-field
15711                    (mail-header-extra
15712                     (gnus-data-header
15713                      (assq (gnus-summary-article-number)
15714                            gnus-newsgroup-data))))))
15715     (if url
15716         (progn
15717           (browse-url (cdr url))
15718           (gnus-summary-mark-as-read-forward 1))
15719       (gnus-summary-scroll-up arg))))
15720
15721 (eval-after-load "gnus"
15722   #'(define-key gnus-summary-mode-map
15723       (kbd "<RET>") 'browse-nnrss-url))
15724 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15725 @end lisp
15726
15727 @node Customizing w3
15728 @subsection Customizing w3
15729 @cindex w3
15730 @cindex html
15731 @cindex url
15732 @cindex Netscape
15733
15734 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15735 pages.  Emacs/w3 is documented in its own manual, but there are some
15736 things that may be more relevant for Gnus users.
15737
15738 For instance, a common question is how to make Emacs/w3 follow links
15739 using the @code{browse-url} functions (which will call some external web
15740 browser like Netscape).  Here's one way:
15741
15742 @lisp
15743 (eval-after-load "w3"
15744   '(progn
15745     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15746     (defun w3-fetch (&optional url target)
15747       (interactive (list (w3-read-url-with-default)))
15748       (if (eq major-mode 'gnus-article-mode)
15749           (browse-url url)
15750         (w3-fetch-orig url target)))))
15751 @end lisp
15752
15753 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15754 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15755 follow the link.
15756
15757
15758 @node IMAP
15759 @section IMAP
15760 @cindex nnimap
15761 @cindex @acronym{IMAP}
15762
15763 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15764 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15765 server is much similar to connecting to a news server, you just
15766 specify the network address of the server.
15767
15768 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15769 everything that @acronym{POP} can, it can hence be viewed as a
15770 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15771 similar to @acronym{NNTP} being a news storage protocol---however,
15772 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15773 is more or less read-only whereas mail is read-write.
15774
15775 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15776 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15777 the @acronym{IMAP} server and store them on the local disk.  This is
15778 not the usage described in this section---@xref{Mail Sources}.
15779
15780 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15781 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15782 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15783 usage explained in this section.
15784
15785 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15786 servers might look something like the following.  (Note that for
15787 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15788 see below.)
15789
15790 @lisp
15791 (setq gnus-secondary-select-methods
15792       '((nnimap "simpleserver") ; @r{no special configuration}
15793         ; @r{perhaps a ssh port forwarded server:}
15794         (nnimap "dolk"
15795                 (nnimap-address "localhost")
15796                 (nnimap-server-port 1430))
15797         ; @r{a UW server running on localhost}
15798         (nnimap "barbar"
15799                 (nnimap-server-port 143)
15800                 (nnimap-address "localhost")
15801                 (nnimap-list-pattern ("INBOX" "mail/*")))
15802         ; @r{anonymous public cyrus server:}
15803         (nnimap "cyrus.andrew.cmu.edu"
15804                 (nnimap-authenticator anonymous)
15805                 (nnimap-list-pattern "archive.*")
15806                 (nnimap-stream network))
15807         ; @r{a ssl server on a non-standard port:}
15808         (nnimap "vic20"
15809                 (nnimap-address "vic20.somewhere.com")
15810                 (nnimap-server-port 9930)
15811                 (nnimap-stream ssl))))
15812 @end lisp
15813
15814 After defining the new server, you can subscribe to groups on the
15815 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15816 (@pxref{Subscription Commands}) or via the Server Buffer
15817 (@pxref{Server Buffer}).
15818
15819 The following variables can be used to create a virtual @code{nnimap}
15820 server:
15821
15822 @table @code
15823
15824 @item nnimap-address
15825 @vindex nnimap-address
15826
15827 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15828 server name if not specified.
15829
15830 @item nnimap-server-port
15831 @vindex nnimap-server-port
15832 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15833
15834 Note that this should be an integer, example server specification:
15835
15836 @lisp
15837 (nnimap "mail.server.com"
15838         (nnimap-server-port 4711))
15839 @end lisp
15840
15841 @item nnimap-list-pattern
15842 @vindex nnimap-list-pattern
15843 String or list of strings of mailboxes to limit available groups to.
15844 This is used when the server has very many mailboxes and you're only
15845 interested in a few---some servers export your home directory via
15846 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15847 @file{~/Mail/*} then.
15848
15849 The string can also be a cons of REFERENCE and the string as above, what
15850 REFERENCE is used for is server specific, but on the University of
15851 Washington server it's a directory that will be concatenated with the
15852 mailbox.
15853
15854 Example server specification:
15855
15856 @lisp
15857 (nnimap "mail.server.com"
15858         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15859                                ("~friend/Mail/" . "list/*"))))
15860 @end lisp
15861
15862 @item nnimap-stream
15863 @vindex nnimap-stream
15864 The type of stream used to connect to your server.  By default, nnimap
15865 will detect and automatically use all of the below, with the exception
15866 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
15867 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
15868 be automatically detected, but it's not widely deployed yet.)
15869
15870 Example server specification:
15871
15872 @lisp
15873 (nnimap "mail.server.com"
15874         (nnimap-stream ssl))
15875 @end lisp
15876
15877 Please note that the value of @code{nnimap-stream} is a symbol!
15878
15879 @itemize @bullet
15880 @item
15881 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
15882 @samp{gsasl} or @samp{imtest} program.
15883 @item
15884 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
15885 @item
15886 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15887 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15888 @samp{starttls}.
15889 @item
15890 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15891 @samp{gnutls-cli}).
15892 @item
15893 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15894 @samp{openssl}) or SSLeay (@samp{s_client}).
15895 @item
15896 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15897 @item
15898 @dfn{network:} Plain, TCP/IP network connection.
15899 @end itemize
15900
15901 @vindex imap-kerberos4-program
15902 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15903 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15904 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15905 to make @code{imap.el} use a pty instead of a pipe when communicating
15906 with @samp{imtest}.  You will then suffer from a line length
15907 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15908 indefinitely if you have many articles in a mailbox.  The variable
15909 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15910 program.
15911
15912 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15913 needed.  It is available from
15914 @uref{http://www.gnu.org/software/gnutls/}.
15915
15916 @vindex imap-gssapi-program
15917 This parameter specifies a list of command lines that invoke a GSSAPI
15918 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15919 sequentially until a connection is made, or the list has been
15920 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15921 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15922 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15923 tried.
15924
15925 @vindex imap-ssl-program
15926 For @acronym{SSL} connections, the OpenSSL program is available from
15927 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
15928 and nnimap support it too---although the most recent versions of
15929 SSLeay, 0.9.x, are known to have serious bugs making it
15930 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
15931 work.  The variable @code{imap-ssl-program} contain parameters to pass
15932 to OpenSSL/SSLeay.
15933
15934 @vindex imap-shell-program
15935 @vindex imap-shell-host
15936 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15937 @code{imap-shell-program} specify what program to call.
15938
15939 @item nnimap-authenticator
15940 @vindex nnimap-authenticator
15941
15942 The authenticator used to connect to the server.  By default, nnimap
15943 will use the most secure authenticator your server is capable of.
15944
15945 Example server specification:
15946
15947 @lisp
15948 (nnimap "mail.server.com"
15949         (nnimap-authenticator anonymous))
15950 @end lisp
15951
15952 Please note that the value of @code{nnimap-authenticator} is a symbol!
15953
15954 @itemize @bullet
15955 @item
15956 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
15957 external program @code{gsasl} or @code{imtest}.
15958 @item
15959 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
15960 @code{imtest}.
15961 @item
15962 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
15963 external library @code{digest-md5.el}.
15964 @item
15965 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15966 @item
15967 @dfn{login:} Plain-text username/password via LOGIN.
15968 @item
15969 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
15970 @end itemize
15971
15972 @item nnimap-expunge-on-close
15973 @cindex expunging
15974 @vindex nnimap-expunge-on-close
15975 Unlike Parmenides the @acronym{IMAP} designers have decided things that
15976 don't exist actually do exist.  More specifically, @acronym{IMAP} has
15977 this concept of marking articles @code{Deleted} which doesn't actually
15978 delete them, and this (marking them @code{Deleted}, that is) is what
15979 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
15980 similar).
15981
15982 Since the articles aren't really removed when we mark them with the
15983 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15984 running in circles yet?
15985
15986 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15987 when closing a mailbox but this is now configurable by this server
15988 variable.
15989
15990 The possible options are:
15991
15992 @table @code
15993
15994 @item always
15995 The default behavior, delete all articles marked as ``Deleted'' when
15996 closing a mailbox.
15997 @item never
15998 Never actually delete articles.  Currently there is no way of showing
15999 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16000 may allow you to do this.  If you ever want to run the EXPUNGE command
16001 manually, @xref{Expunging mailboxes}.
16002 @item ask
16003 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16004 articles or not.
16005
16006 @end table
16007
16008 @item nnimap-importantize-dormant
16009 @vindex nnimap-importantize-dormant
16010
16011 If non-@code{nil} (the default), marks dormant articles as ticked (as
16012 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16013 naturally still (only) be marked as dormant.  This is to make dormant
16014 articles stand out, just like ticked articles, in other @acronym{IMAP}
16015 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16016 has only one.)
16017
16018 Probably the only reason for frobing this would be if you're trying
16019 enable per-user persistent dormant flags, using something like:
16020
16021 @lisp
16022 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16023         (format "gnus-dormant-%s" (user-login-name)))
16024 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16025         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16026 @end lisp
16027
16028 In this case, you would not want the per-user dormant flag showing up
16029 as ticked for other users.
16030
16031 @item nnimap-expunge-search-string
16032 @cindex expunging
16033 @vindex nnimap-expunge-search-string
16034
16035 This variable contain the @acronym{IMAP} search command sent to server when
16036 searching for articles eligible for expiring.  The default is
16037 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16038 UID set and the second @code{%s} is replaced by a date.
16039
16040 Probably the only useful value to change this to is
16041 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16042 messages instead of the internal article date.  See section 6.4.4 of
16043 RFC 2060 for more information on valid strings.
16044
16045 @item nnimap-authinfo-file
16046 @vindex nnimap-authinfo-file
16047
16048 A file containing credentials used to log in on servers.  The format is
16049 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16050 variable @code{nntp-authinfo-file} for exact syntax; also see
16051 @ref{NNTP}.
16052
16053 @item nnimap-need-unselect-to-notice-new-mail
16054 @vindex nnimap-need-unselect-to-notice-new-mail
16055
16056 Unselect mailboxes before looking for new mail in them.  Some servers
16057 seem to need this under some circumstances; it was reported that
16058 Courier 1.7.1 did.
16059
16060 @end table
16061
16062 @menu
16063 * Splitting in IMAP::           Splitting mail with nnimap.
16064 * Expiring in IMAP::            Expiring mail with nnimap.
16065 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16066 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16067 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16068 @end menu
16069
16070
16071
16072 @node Splitting in IMAP
16073 @subsection Splitting in IMAP
16074 @cindex splitting imap mail
16075
16076 Splitting is something Gnus users have loved and used for years, and now
16077 the rest of the world is catching up.  Yeah, dream on, not many
16078 @acronym{IMAP} servers have server side splitting and those that have
16079 splitting seem to use some non-standard protocol.  This means that
16080 @acronym{IMAP} support for Gnus has to do its own splitting.
16081
16082 And it does.
16083
16084 (Incidentally, people seem to have been dreaming on, and Sieve has
16085 gaining a market share and is supported by several IMAP servers.
16086 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16087
16088 Here are the variables of interest:
16089
16090 @table @code
16091
16092 @item nnimap-split-crosspost
16093 @cindex splitting, crosspost
16094 @cindex crosspost
16095 @vindex nnimap-split-crosspost
16096
16097 If non-@code{nil}, do crossposting if several split methods match the
16098 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16099 found will be used.
16100
16101 Nnmail equivalent: @code{nnmail-crosspost}.
16102
16103 @item nnimap-split-inbox
16104 @cindex splitting, inbox
16105 @cindex inbox
16106 @vindex nnimap-split-inbox
16107
16108 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16109 mailboxes to split from.  Defaults to @code{nil}, which means that
16110 splitting is disabled!
16111
16112 @lisp
16113 (setq nnimap-split-inbox
16114       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16115 @end lisp
16116
16117 No nnmail equivalent.
16118
16119 @item nnimap-split-rule
16120 @cindex splitting, rules
16121 @vindex nnimap-split-rule
16122
16123 New mail found in @code{nnimap-split-inbox} will be split according to
16124 this variable.
16125
16126 This variable contains a list of lists, where the first element in the
16127 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16128 matching the regexp in the second element in the sublist.  Got that?
16129 Neither did I, we need examples.
16130
16131 @lisp
16132 (setq nnimap-split-rule
16133       '(("INBOX.nnimap"
16134          "^Sender: owner-nnimap@@vic20.globalcom.se")
16135         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16136         ("INBOX.private" "")))
16137 @end lisp
16138
16139 This will put all articles from the nnimap mailing list into mailbox
16140 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16141 into INBOX.junk and everything else in INBOX.private.
16142
16143 The first string may contain @samp{\\1} forms, like the ones used by
16144 replace-match to insert sub-expressions from the matched text.  For
16145 instance:
16146
16147 @lisp
16148 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16149 @end lisp
16150
16151 The first element can also be the symbol @code{junk} to indicate that
16152 matching messages should simply be deleted.  Use with care.
16153
16154 The second element can also be a function.  In that case, it will be
16155 called with the first element of the rule as the argument, in a buffer
16156 containing the headers of the article.  It should return a
16157 non-@code{nil} value if it thinks that the mail belongs in that group.
16158
16159 Nnmail users might recollect that the last regexp had to be empty to
16160 match all articles (like in the example above).  This is not required in
16161 nnimap.  Articles not matching any of the regexps will not be moved out
16162 of your inbox.  (This might affect performance if you keep lots of
16163 unread articles in your inbox, since the splitting code would go over
16164 them every time you fetch new mail.)
16165
16166 These rules are processed from the beginning of the alist toward the
16167 end.  The first rule to make a match will ``win'', unless you have
16168 crossposting enabled.  In that case, all matching rules will ``win''.
16169
16170 This variable can also have a function as its value, the function will
16171 be called with the headers narrowed and should return a group where it
16172 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16173
16174 The splitting code tries to create mailboxes if it needs to.
16175
16176 To allow for different split rules on different virtual servers, and
16177 even different split rules in different inboxes on the same server,
16178 the syntax of this variable have been extended along the lines of:
16179
16180 @lisp
16181 (setq nnimap-split-rule
16182       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16183                                ("junk"    "From:.*Simon"))))
16184         ("my2server"    ("INBOX" nnimap-split-fancy))
16185         ("my[34]server" (".*" (("private" "To:.*Simon")
16186                                ("junk"    my-junk-func))))))
16187 @end lisp
16188
16189 The virtual server name is in fact a regexp, so that the same rules
16190 may apply to several servers.  In the example, the servers
16191 @code{my3server} and @code{my4server} both use the same rules.
16192 Similarly, the inbox string is also a regexp.  The actual splitting
16193 rules are as before, either a function, or a list with group/regexp or
16194 group/function elements.
16195
16196 Nnmail equivalent: @code{nnmail-split-methods}.
16197
16198 @item nnimap-split-predicate
16199 @cindex splitting
16200 @vindex nnimap-split-predicate
16201
16202 Mail matching this predicate in @code{nnimap-split-inbox} will be
16203 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16204
16205 This might be useful if you use another @acronym{IMAP} client to read mail in
16206 your inbox but would like Gnus to split all articles in the inbox
16207 regardless of readedness.  Then you might change this to
16208 @samp{UNDELETED}.
16209
16210 @item nnimap-split-fancy
16211 @cindex splitting, fancy
16212 @findex nnimap-split-fancy
16213 @vindex nnimap-split-fancy
16214
16215 It's possible to set @code{nnimap-split-rule} to
16216 @code{nnmail-split-fancy} if you want to use fancy
16217 splitting.  @xref{Fancy Mail Splitting}.
16218
16219 However, to be able to have different fancy split rules for nnmail and
16220 nnimap back ends you can set @code{nnimap-split-rule} to
16221 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16222 rule in @code{nnimap-split-fancy}.
16223
16224 Example:
16225
16226 @lisp
16227 (setq nnimap-split-rule 'nnimap-split-fancy
16228       nnimap-split-fancy ...)
16229 @end lisp
16230
16231 Nnmail equivalent: @code{nnmail-split-fancy}.
16232
16233 @item nnimap-split-download-body
16234 @findex nnimap-split-download-body
16235 @vindex nnimap-split-download-body
16236
16237 Set to non-@code{nil} to download entire articles during splitting.
16238 This is generally not required, and will slow things down
16239 considerably.  You may need it if you want to use an advanced
16240 splitting function that analyses the body to split the article.
16241
16242 @end table
16243
16244 @node Expiring in IMAP
16245 @subsection Expiring in IMAP
16246 @cindex expiring imap mail
16247
16248 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16249 end, it supports most features in regular expiring (@pxref{Expiring
16250 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16251 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16252 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16253 follows below are the variables used by the @code{nnimap} expiry
16254 process.
16255
16256 A note on how the expire mark is stored on the @acronym{IMAP} server is
16257 appropriate here as well.  The expire mark is translated into a
16258 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16259 message.  This means that likely only Gnus will understand and treat
16260 the @code{gnus-expire} mark properly, although other clients may allow
16261 you to view client specific flags on the message.  It also means that
16262 your server must support permanent storage of client specific flags on
16263 messages.  Most do, fortunately.
16264
16265 @table @code
16266
16267 @item nnmail-expiry-wait
16268 @item nnmail-expiry-wait-function
16269
16270 These variables are fully supported.  The expire value can be a
16271 number, the symbol @code{immediate} or @code{never}.
16272
16273 @item nnmail-expiry-target
16274
16275 This variable is supported, and internally implemented by calling the
16276 @code{nnmail} functions that handle this.  It contains an optimization
16277 that if the destination is a @acronym{IMAP} group on the same server, the
16278 article is copied instead of appended (that is, uploaded again).
16279
16280 @end table
16281
16282 @node Editing IMAP ACLs
16283 @subsection Editing IMAP ACLs
16284 @cindex editing imap acls
16285 @cindex Access Control Lists
16286 @cindex Editing @acronym{IMAP} ACLs
16287 @kindex G l
16288 @findex gnus-group-nnimap-edit-acl
16289
16290 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16291 limiting (or enabling) other users access to your mail boxes.  Not all
16292 @acronym{IMAP} servers support this, this function will give an error if it
16293 doesn't.
16294
16295 To edit an ACL for a mailbox, type @kbd{G l}
16296 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16297 editing window with detailed instructions.
16298
16299 Some possible uses:
16300
16301 @itemize @bullet
16302 @item
16303 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16304 on your mailing list mailboxes enables other users on the same server to
16305 follow the list without subscribing to it.
16306 @item
16307 At least with the Cyrus server, you are required to give the user
16308 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16309 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16310 INBOX.mailbox).
16311 @end itemize
16312
16313 @node Expunging mailboxes
16314 @subsection Expunging mailboxes
16315 @cindex expunging
16316
16317 @cindex expunge
16318 @cindex manual expunging
16319 @kindex G x
16320 @findex gnus-group-nnimap-expunge
16321
16322 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16323 you may want the option of expunging all deleted articles in a mailbox
16324 manually.  This is exactly what @kbd{G x} does.
16325
16326 Currently there is no way of showing deleted articles, you can just
16327 delete them.
16328
16329 @node A note on namespaces
16330 @subsection A note on namespaces
16331 @cindex IMAP namespace
16332 @cindex namespaces
16333
16334 The @acronym{IMAP} protocol has a concept called namespaces, described
16335 by the following text in the RFC:
16336
16337 @display
16338 5.1.2.  Mailbox Namespace Naming Convention
16339
16340    By convention, the first hierarchical element of any mailbox name
16341    which begins with "#" identifies the "namespace" of the remainder of
16342    the name.  This makes it possible to disambiguate between different
16343    types of mailbox stores, each of which have their own namespaces.
16344
16345       For example, implementations which offer access to USENET
16346       newsgroups MAY use the "#news" namespace to partition the USENET
16347       newsgroup namespace from that of other mailboxes.  Thus, the
16348       comp.mail.misc newsgroup would have an mailbox name of
16349       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16350       to a different object (e.g. a user's private mailbox).
16351 @end display
16352
16353 While there is nothing in this text that warrants concern for the
16354 @acronym{IMAP} implementation in Gnus, some servers use namespace
16355 prefixes in a way that does not work with how Gnus uses mailbox names.
16356
16357 Specifically, University of Washington's @acronym{IMAP} server uses
16358 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16359 in the @sc{create} and @sc{append} commands.  After the mailbox is
16360 created (or a messages is appended to a mailbox), it must be accessed
16361 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16362 not make it possible for the user to guarantee that user entered
16363 mailbox names will only be used with the CREATE and APPEND commands,
16364 you should simply not use the namespace prefixed mailbox names in
16365 Gnus.
16366
16367 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16368 for more information on how to use the prefixes.  They are a power
16369 tool and should be used only if you are sure what the effects are.
16370
16371 @node Other Sources
16372 @section Other Sources
16373
16374 Gnus can do more than just read news or mail.  The methods described
16375 below allow Gnus to view directories and files as if they were
16376 newsgroups.
16377
16378 @menu
16379 * Directory Groups::            You can read a directory as if it was a newsgroup.
16380 * Anything Groups::             Dired?  Who needs dired?
16381 * Document Groups::             Single files can be the basis of a group.
16382 * SOUP::                        Reading @sc{soup} packets ``offline''.
16383 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16384 @end menu
16385
16386
16387 @node Directory Groups
16388 @subsection Directory Groups
16389 @cindex nndir
16390 @cindex directory groups
16391
16392 If you have a directory that has lots of articles in separate files in
16393 it, you might treat it as a newsgroup.  The files have to have numerical
16394 names, of course.
16395
16396 This might be an opportune moment to mention @code{ange-ftp} (and its
16397 successor @code{efs}), that most wonderful of all wonderful Emacs
16398 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16399 back end to read directories.  Big deal.
16400
16401 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16402 enter the @code{ange-ftp} file name
16403 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16404 @code{ange-ftp} or @code{efs} will actually allow you to read this
16405 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16406
16407 @code{nndir} will use @acronym{NOV} files if they are present.
16408
16409 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16410 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16411 whatever you use @code{nndir} for, so you could switch to any of those
16412 methods if you feel the need to have a non-read-only @code{nndir}.
16413
16414
16415 @node Anything Groups
16416 @subsection Anything Groups
16417 @cindex nneething
16418
16419 From the @code{nndir} back end (which reads a single spool-like
16420 directory), it's just a hop and a skip to @code{nneething}, which
16421 pretends that any arbitrary directory is a newsgroup.  Strange, but
16422 true.
16423
16424 When @code{nneething} is presented with a directory, it will scan this
16425 directory and assign article numbers to each file.  When you enter such
16426 a group, @code{nneething} must create ``headers'' that Gnus can use.
16427 After all, Gnus is a newsreader, in case you're forgetting.
16428 @code{nneething} does this in a two-step process.  First, it snoops each
16429 file in question.  If the file looks like an article (i.e., the first
16430 few lines look like headers), it will use this as the head.  If this is
16431 just some arbitrary file without a head (e.g. a C source file),
16432 @code{nneething} will cobble up a header out of thin air.  It will use
16433 file ownership, name and date and do whatever it can with these
16434 elements.
16435
16436 All this should happen automatically for you, and you will be presented
16437 with something that looks very much like a newsgroup.  Totally like a
16438 newsgroup, to be precise.  If you select an article, it will be displayed
16439 in the article buffer, just as usual.
16440
16441 If you select a line that represents a directory, Gnus will pop you into
16442 a new summary buffer for this @code{nneething} group.  And so on.  You can
16443 traverse the entire disk this way, if you feel like, but remember that
16444 Gnus is not dired, really, and does not intend to be, either.
16445
16446 There are two overall modes to this action---ephemeral or solid.  When
16447 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16448 will not store information on what files you have read, and what files
16449 are new, and so on.  If you create a solid @code{nneething} group the
16450 normal way with @kbd{G m}, Gnus will store a mapping table between
16451 article numbers and file names, and you can treat this group like any
16452 other groups.  When you activate a solid @code{nneething} group, you will
16453 be told how many unread articles it contains, etc., etc.
16454
16455 Some variables:
16456
16457 @table @code
16458 @item nneething-map-file-directory
16459 @vindex nneething-map-file-directory
16460 All the mapping files for solid @code{nneething} groups will be stored
16461 in this directory, which defaults to @file{~/.nneething/}.
16462
16463 @item nneething-exclude-files
16464 @vindex nneething-exclude-files
16465 All files that match this regexp will be ignored.  Nice to use to exclude
16466 auto-save files and the like, which is what it does by default.
16467
16468 @item nneething-include-files
16469 @vindex nneething-include-files
16470 Regexp saying what files to include in the group.  If this variable is
16471 non-@code{nil}, only files matching this regexp will be included.
16472
16473 @item nneething-map-file
16474 @vindex nneething-map-file
16475 Name of the map files.
16476 @end table
16477
16478
16479 @node Document Groups
16480 @subsection Document Groups
16481 @cindex nndoc
16482 @cindex documentation group
16483 @cindex help group
16484
16485 @code{nndoc} is a cute little thing that will let you read a single file
16486 as a newsgroup.  Several files types are supported:
16487
16488 @table @code
16489 @cindex Babyl
16490 @cindex Rmail mbox
16491
16492 @item babyl
16493 The Babyl (Rmail) mail box.
16494 @cindex mbox
16495 @cindex Unix mbox
16496
16497 @item mbox
16498 The standard Unix mbox file.
16499
16500 @cindex MMDF mail box
16501 @item mmdf
16502 The MMDF mail box format.
16503
16504 @item news
16505 Several news articles appended into a file.
16506
16507 @item rnews
16508 @cindex rnews batch files
16509 The rnews batch transport format.
16510 @cindex forwarded messages
16511
16512 @item forward
16513 Forwarded articles.
16514
16515 @item nsmail
16516 Netscape mail boxes.
16517
16518 @item mime-parts
16519 @acronym{MIME} multipart messages.
16520
16521 @item standard-digest
16522 The standard (RFC 1153) digest format.
16523
16524 @item mime-digest
16525 A @acronym{MIME} digest of messages.
16526
16527 @item lanl-gov-announce
16528 Announcement messages from LANL Gov Announce.
16529
16530 @item rfc822-forward
16531 A message forwarded according to RFC822.
16532
16533 @item outlook
16534 The Outlook mail box.
16535
16536 @item oe-dbx
16537 The Outlook Express dbx mail box.
16538
16539 @item exim-bounce
16540 A bounce message from the Exim MTA.
16541
16542 @item forward
16543 A message forwarded according to informal rules.
16544
16545 @item rfc934
16546 An RFC934-forwarded message.
16547
16548 @item mailman
16549 A mailman digest.
16550
16551 @item clari-briefs
16552 A digest of Clarinet brief news items.
16553
16554 @item slack-digest
16555 Non-standard digest format---matches most things, but does it badly.
16556
16557 @item mail-in-mail
16558 The last resort.
16559 @end table
16560
16561 You can also use the special ``file type'' @code{guess}, which means
16562 that @code{nndoc} will try to guess what file type it is looking at.
16563 @code{digest} means that @code{nndoc} should guess what digest type the
16564 file is.
16565
16566 @code{nndoc} will not try to change the file or insert any extra headers into
16567 it---it will simply, like, let you use the file as the basis for a
16568 group.  And that's it.
16569
16570 If you have some old archived articles that you want to insert into your
16571 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16572 that.  Say you have an old @file{RMAIL} file with mail that you now want
16573 to split into your new @code{nnml} groups.  You look at that file using
16574 @code{nndoc} (using the @kbd{G f} command in the group buffer
16575 (@pxref{Foreign Groups})), set the process mark on all the articles in
16576 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16577 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16578 file is now also stored in lots of @code{nnml} directories, and you can
16579 delete that pesky @file{RMAIL} file.  If you have the guts!
16580
16581 Virtual server variables:
16582
16583 @table @code
16584 @item nndoc-article-type
16585 @vindex nndoc-article-type
16586 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16587 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16588 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16589 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16590 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16591
16592 @item nndoc-post-type
16593 @vindex nndoc-post-type
16594 This variable says whether Gnus is to consider the group a news group or
16595 a mail group.  There are two valid values:  @code{mail} (the default)
16596 and @code{news}.
16597 @end table
16598
16599 @menu
16600 * Document Server Internals::   How to add your own document types.
16601 @end menu
16602
16603
16604 @node Document Server Internals
16605 @subsubsection Document Server Internals
16606
16607 Adding new document types to be recognized by @code{nndoc} isn't
16608 difficult.  You just have to whip up a definition of what the document
16609 looks like, write a predicate function to recognize that document type,
16610 and then hook into @code{nndoc}.
16611
16612 First, here's an example document type definition:
16613
16614 @example
16615 (mmdf
16616  (article-begin .  "^\^A\^A\^A\^A\n")
16617  (body-end .  "^\^A\^A\^A\^A\n"))
16618 @end example
16619
16620 The definition is simply a unique @dfn{name} followed by a series of
16621 regexp pseudo-variable settings.  Below are the possible
16622 variables---don't be daunted by the number of variables; most document
16623 types can be defined with very few settings:
16624
16625 @table @code
16626 @item first-article
16627 If present, @code{nndoc} will skip past all text until it finds
16628 something that match this regexp.  All text before this will be
16629 totally ignored.
16630
16631 @item article-begin
16632 This setting has to be present in all document type definitions.  It
16633 says what the beginning of each article looks like.
16634
16635 @item head-begin-function
16636 If present, this should be a function that moves point to the head of
16637 the article.
16638
16639 @item nndoc-head-begin
16640 If present, this should be a regexp that matches the head of the
16641 article.
16642
16643 @item nndoc-head-end
16644 This should match the end of the head of the article.  It defaults to
16645 @samp{^$}---the empty line.
16646
16647 @item body-begin-function
16648 If present, this function should move point to the beginning of the body
16649 of the article.
16650
16651 @item body-begin
16652 This should match the beginning of the body of the article.  It defaults
16653 to @samp{^\n}.
16654
16655 @item body-end-function
16656 If present, this function should move point to the end of the body of
16657 the article.
16658
16659 @item body-end
16660 If present, this should match the end of the body of the article.
16661
16662 @item file-end
16663 If present, this should match the end of the file.  All text after this
16664 regexp will be totally ignored.
16665
16666 @end table
16667
16668 So, using these variables @code{nndoc} is able to dissect a document
16669 file into a series of articles, each with a head and a body.  However, a
16670 few more variables are needed since not all document types are all that
16671 news-like---variables needed to transform the head or the body into
16672 something that's palatable for Gnus:
16673
16674 @table @code
16675 @item prepare-body-function
16676 If present, this function will be called when requesting an article.  It
16677 will be called with point at the start of the body, and is useful if the
16678 document has encoded some parts of its contents.
16679
16680 @item article-transform-function
16681 If present, this function is called when requesting an article.  It's
16682 meant to be used for more wide-ranging transformation of both head and
16683 body of the article.
16684
16685 @item generate-head-function
16686 If present, this function is called to generate a head that Gnus can
16687 understand.  It is called with the article number as a parameter, and is
16688 expected to generate a nice head for the article in question.  It is
16689 called when requesting the headers of all articles.
16690
16691 @end table
16692
16693 Let's look at the most complicated example I can come up with---standard
16694 digests:
16695
16696 @example
16697 (standard-digest
16698  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16699  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16700  (prepare-body-function . nndoc-unquote-dashes)
16701  (body-end-function . nndoc-digest-body-end)
16702  (head-end . "^ ?$")
16703  (body-begin . "^ ?\n")
16704  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16705  (subtype digest guess))
16706 @end example
16707
16708 We see that all text before a 70-width line of dashes is ignored; all
16709 text after a line that starts with that @samp{^End of} is also ignored;
16710 each article begins with a 30-width line of dashes; the line separating
16711 the head from the body may contain a single space; and that the body is
16712 run through @code{nndoc-unquote-dashes} before being delivered.
16713
16714 To hook your own document definition into @code{nndoc}, use the
16715 @code{nndoc-add-type} function.  It takes two parameters---the first
16716 is the definition itself and the second (optional) parameter says
16717 where in the document type definition alist to put this definition.
16718 The alist is traversed sequentially, and
16719 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16720 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16721 @code{mmdf} type, and so on.  These type predicates should return
16722 @code{nil} if the document is not of the correct type; @code{t} if it
16723 is of the correct type; and a number if the document might be of the
16724 correct type.  A high number means high probability; a low number
16725 means low probability with @samp{0} being the lowest valid number.
16726
16727
16728 @node SOUP
16729 @subsection SOUP
16730 @cindex SOUP
16731 @cindex offline
16732
16733 In the PC world people often talk about ``offline'' newsreaders.  These
16734 are thingies that are combined reader/news transport monstrosities.
16735 With built-in modem programs.  Yecchh!
16736
16737 Of course, us Unix Weenie types of human beans use things like
16738 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16739 transport things like Ghod intended.  And then we just use normal
16740 newsreaders.
16741
16742 However, it can sometimes be convenient to do something that's a bit
16743 easier on the brain if you have a very slow modem, and you're not really
16744 that interested in doing things properly.
16745
16746 A file format called @sc{soup} has been developed for transporting news
16747 and mail from servers to home machines and back again.  It can be a bit
16748 fiddly.
16749
16750 First some terminology:
16751
16752 @table @dfn
16753
16754 @item server
16755 This is the machine that is connected to the outside world and where you
16756 get news and/or mail from.
16757
16758 @item home machine
16759 This is the machine that you want to do the actual reading and responding
16760 on.  It is typically not connected to the rest of the world in any way.
16761
16762 @item packet
16763 Something that contains messages and/or commands.  There are two kinds
16764 of packets:
16765
16766 @table @dfn
16767 @item message packets
16768 These are packets made at the server, and typically contain lots of
16769 messages for you to read.  These are called @file{SoupoutX.tgz} by
16770 default, where @var{x} is a number.
16771
16772 @item response packets
16773 These are packets made at the home machine, and typically contains
16774 replies that you've written.  These are called @file{SoupinX.tgz} by
16775 default, where @var{x} is a number.
16776
16777 @end table
16778
16779 @end table
16780
16781
16782 @enumerate
16783
16784 @item
16785 You log in on the server and create a @sc{soup} packet.  You can either
16786 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16787 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16788 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16789
16790 @item
16791 You transfer the packet home.  Rail, boat, car or modem will do fine.
16792
16793 @item
16794 You put the packet in your home directory.
16795
16796 @item
16797 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16798 the native or secondary server.
16799
16800 @item
16801 You read articles and mail and answer and followup to the things you
16802 want (@pxref{SOUP Replies}).
16803
16804 @item
16805 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16806 packet.
16807
16808 @item
16809 You transfer this packet to the server.
16810
16811 @item
16812 You use Gnus to mail this packet out with the @kbd{G s s} command.
16813
16814 @item
16815 You then repeat until you die.
16816
16817 @end enumerate
16818
16819 So you basically have a bipartite system---you use @code{nnsoup} for
16820 reading and Gnus for packing/sending these @sc{soup} packets.
16821
16822 @menu
16823 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16824 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16825 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16826 @end menu
16827
16828
16829 @node SOUP Commands
16830 @subsubsection SOUP Commands
16831
16832 These are commands for creating and manipulating @sc{soup} packets.
16833
16834 @table @kbd
16835 @item G s b
16836 @kindex G s b (Group)
16837 @findex gnus-group-brew-soup
16838 Pack all unread articles in the current group
16839 (@code{gnus-group-brew-soup}).  This command understands the
16840 process/prefix convention.
16841
16842 @item G s w
16843 @kindex G s w (Group)
16844 @findex gnus-soup-save-areas
16845 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16846
16847 @item G s s
16848 @kindex G s s (Group)
16849 @findex gnus-soup-send-replies
16850 Send all replies from the replies packet
16851 (@code{gnus-soup-send-replies}).
16852
16853 @item G s p
16854 @kindex G s p (Group)
16855 @findex gnus-soup-pack-packet
16856 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16857
16858 @item G s r
16859 @kindex G s r (Group)
16860 @findex nnsoup-pack-replies
16861 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16862
16863 @item O s
16864 @kindex O s (Summary)
16865 @findex gnus-soup-add-article
16866 This summary-mode command adds the current article to a @sc{soup} packet
16867 (@code{gnus-soup-add-article}).  It understands the process/prefix
16868 convention (@pxref{Process/Prefix}).
16869
16870 @end table
16871
16872
16873 There are a few variables to customize where Gnus will put all these
16874 thingies:
16875
16876 @table @code
16877
16878 @item gnus-soup-directory
16879 @vindex gnus-soup-directory
16880 Directory where Gnus will save intermediate files while composing
16881 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16882
16883 @item gnus-soup-replies-directory
16884 @vindex gnus-soup-replies-directory
16885 This is what Gnus will use as a temporary directory while sending our
16886 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16887
16888 @item gnus-soup-prefix-file
16889 @vindex gnus-soup-prefix-file
16890 Name of the file where Gnus stores the last used prefix.  The default is
16891 @samp{gnus-prefix}.
16892
16893 @item gnus-soup-packer
16894 @vindex gnus-soup-packer
16895 A format string command for packing a @sc{soup} packet.  The default is
16896 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16897
16898 @item gnus-soup-unpacker
16899 @vindex gnus-soup-unpacker
16900 Format string command for unpacking a @sc{soup} packet.  The default is
16901 @samp{gunzip -c %s | tar xvf -}.
16902
16903 @item gnus-soup-packet-directory
16904 @vindex gnus-soup-packet-directory
16905 Where Gnus will look for reply packets.  The default is @file{~/}.
16906
16907 @item gnus-soup-packet-regexp
16908 @vindex gnus-soup-packet-regexp
16909 Regular expression matching @sc{soup} reply packets in
16910 @code{gnus-soup-packet-directory}.
16911
16912 @end table
16913
16914
16915 @node SOUP Groups
16916 @subsubsection SOUP Groups
16917 @cindex nnsoup
16918
16919 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16920 read incoming packets, unpack them, and put them in a directory where
16921 you can read them at leisure.
16922
16923 These are the variables you can use to customize its behavior:
16924
16925 @table @code
16926
16927 @item nnsoup-tmp-directory
16928 @vindex nnsoup-tmp-directory
16929 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16930 directory.  (@file{/tmp/} by default.)
16931
16932 @item nnsoup-directory
16933 @vindex nnsoup-directory
16934 @code{nnsoup} then moves each message and index file to this directory.
16935 The default is @file{~/SOUP/}.
16936
16937 @item nnsoup-replies-directory
16938 @vindex nnsoup-replies-directory
16939 All replies will be stored in this directory before being packed into a
16940 reply packet.  The default is @file{~/SOUP/replies/}.
16941
16942 @item nnsoup-replies-format-type
16943 @vindex nnsoup-replies-format-type
16944 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16945 (rnews), and I don't think you should touch that variable.  I probably
16946 shouldn't even have documented it.  Drats!  Too late!
16947
16948 @item nnsoup-replies-index-type
16949 @vindex nnsoup-replies-index-type
16950 The index type of the replies packet.  The default is @samp{?n}, which
16951 means ``none''.  Don't fiddle with this one either!
16952
16953 @item nnsoup-active-file
16954 @vindex nnsoup-active-file
16955 Where @code{nnsoup} stores lots of information.  This is not an ``active
16956 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16957 this file or mess it up in any way, you're dead.  The default is
16958 @file{~/SOUP/active}.
16959
16960 @item nnsoup-packer
16961 @vindex nnsoup-packer
16962 Format string command for packing a reply @sc{soup} packet.  The default
16963 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16964
16965 @item nnsoup-unpacker
16966 @vindex nnsoup-unpacker
16967 Format string command for unpacking incoming @sc{soup} packets.  The
16968 default is @samp{gunzip -c %s | tar xvf -}.
16969
16970 @item nnsoup-packet-directory
16971 @vindex nnsoup-packet-directory
16972 Where @code{nnsoup} will look for incoming packets.  The default is
16973 @file{~/}.
16974
16975 @item nnsoup-packet-regexp
16976 @vindex nnsoup-packet-regexp
16977 Regular expression matching incoming @sc{soup} packets.  The default is
16978 @samp{Soupout}.
16979
16980 @item nnsoup-always-save
16981 @vindex nnsoup-always-save
16982 If non-@code{nil}, save the replies buffer after each posted message.
16983
16984 @end table
16985
16986
16987 @node SOUP Replies
16988 @subsubsection SOUP Replies
16989
16990 Just using @code{nnsoup} won't mean that your postings and mailings end
16991 up in @sc{soup} reply packets automagically.  You have to work a bit
16992 more for that to happen.
16993
16994 @findex nnsoup-set-variables
16995 The @code{nnsoup-set-variables} command will set the appropriate
16996 variables to ensure that all your followups and replies end up in the
16997 @sc{soup} system.
16998
16999 In specific, this is what it does:
17000
17001 @lisp
17002 (setq message-send-news-function 'nnsoup-request-post)
17003 (setq message-send-mail-function 'nnsoup-request-mail)
17004 @end lisp
17005
17006 And that's it, really.  If you only want news to go into the @sc{soup}
17007 system you just use the first line.  If you only want mail to be
17008 @sc{soup}ed you use the second.
17009
17010
17011 @node Mail-To-News Gateways
17012 @subsection Mail-To-News Gateways
17013 @cindex mail-to-news gateways
17014 @cindex gateways
17015
17016 If your local @code{nntp} server doesn't allow posting, for some reason
17017 or other, you can post using one of the numerous mail-to-news gateways.
17018 The @code{nngateway} back end provides the interface.
17019
17020 Note that you can't read anything from this back end---it can only be
17021 used to post with.
17022
17023 Server variables:
17024
17025 @table @code
17026 @item nngateway-address
17027 @vindex nngateway-address
17028 This is the address of the mail-to-news gateway.
17029
17030 @item nngateway-header-transformation
17031 @vindex nngateway-header-transformation
17032 News headers often have to be transformed in some odd way or other
17033 for the mail-to-news gateway to accept it.  This variable says what
17034 transformation should be called, and defaults to
17035 @code{nngateway-simple-header-transformation}.  The function is called
17036 narrowed to the headers to be transformed and with one parameter---the
17037 gateway address.
17038
17039 This default function just inserts a new @code{To} header based on the
17040 @code{Newsgroups} header and the gateway address.
17041 For instance, an article with this @code{Newsgroups} header:
17042
17043 @example
17044 Newsgroups: alt.religion.emacs
17045 @end example
17046
17047 will get this @code{To} header inserted:
17048
17049 @example
17050 To: alt-religion-emacs@@GATEWAY
17051 @end example
17052
17053 The following pre-defined functions exist:
17054
17055 @findex nngateway-simple-header-transformation
17056 @table @code
17057
17058 @item nngateway-simple-header-transformation
17059 Creates a @code{To} header that looks like
17060 @var{newsgroup}@@@code{nngateway-address}.
17061
17062 @findex nngateway-mail2news-header-transformation
17063
17064 @item nngateway-mail2news-header-transformation
17065 Creates a @code{To} header that looks like
17066 @code{nngateway-address}.
17067 @end table
17068
17069 @end table
17070
17071 Here's an example:
17072
17073 @lisp
17074 (setq gnus-post-method
17075       '(nngateway
17076         "mail2news@@replay.com"
17077         (nngateway-header-transformation
17078          nngateway-mail2news-header-transformation)))
17079 @end lisp
17080
17081 So, to use this, simply say something like:
17082
17083 @lisp
17084 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17085 @end lisp
17086
17087
17088
17089 @node Combined Groups
17090 @section Combined Groups
17091
17092 Gnus allows combining a mixture of all the other group types into bigger
17093 groups.
17094
17095 @menu
17096 * Virtual Groups::              Combining articles from many groups.
17097 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17098 @end menu
17099
17100
17101 @node Virtual Groups
17102 @subsection Virtual Groups
17103 @cindex nnvirtual
17104 @cindex virtual groups
17105 @cindex merging groups
17106
17107 An @dfn{nnvirtual group} is really nothing more than a collection of
17108 other groups.
17109
17110 For instance, if you are tired of reading many small groups, you can
17111 put them all in one big group, and then grow tired of reading one
17112 big, unwieldy group.  The joys of computing!
17113
17114 You specify @code{nnvirtual} as the method.  The address should be a
17115 regexp to match component groups.
17116
17117 All marks in the virtual group will stick to the articles in the
17118 component groups.  So if you tick an article in a virtual group, the
17119 article will also be ticked in the component group from whence it
17120 came.  (And vice versa---marks from the component groups will also be
17121 shown in the virtual group.).  To create an empty virtual group, run
17122 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17123 and edit the method regexp with @kbd{M-e}
17124 (@code{gnus-group-edit-group-method})
17125
17126 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17127 newsgroups into one, big, happy newsgroup:
17128
17129 @lisp
17130 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17131 @end lisp
17132
17133 The component groups can be native or foreign; everything should work
17134 smoothly, but if your computer explodes, it was probably my fault.
17135
17136 Collecting the same group from several servers might actually be a good
17137 idea if users have set the Distribution header to limit distribution.
17138 If you would like to read @samp{soc.motss} both from a server in Japan
17139 and a server in Norway, you could use the following as the group regexp:
17140
17141 @example
17142 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17143 @end example
17144
17145 (Remember, though, that if you're creating the group with @kbd{G m}, you
17146 shouldn't double the backslashes, and you should leave off the quote
17147 characters at the beginning and the end of the string.)
17148
17149 This should work kinda smoothly---all articles from both groups should
17150 end up in this one, and there should be no duplicates.  Threading (and
17151 the rest) will still work as usual, but there might be problems with the
17152 sequence of articles.  Sorting on date might be an option here
17153 (@pxref{Selecting a Group}).
17154
17155 One limitation, however---all groups included in a virtual
17156 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17157 zombie groups can't be component groups for @code{nnvirtual} groups.
17158
17159 @vindex nnvirtual-always-rescan
17160 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17161 @code{nnvirtual} will always scan groups for unread articles when
17162 entering a virtual group.  If this variable is @code{nil} (which is the
17163 default) and you read articles in a component group after the virtual
17164 group has been activated, the read articles from the component group
17165 will show up when you enter the virtual group.  You'll also see this
17166 effect if you have two virtual groups that have a component group in
17167 common.  If that's the case, you should set this variable to @code{t}.
17168 Or you can just tap @code{M-g} on the virtual group every time before
17169 you enter it---it'll have much the same effect.
17170
17171 @code{nnvirtual} can have both mail and news groups as component groups.
17172 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17173 has to ask the back end of the component group the article comes from
17174 whether it is a news or mail back end.  However, when you do a @kbd{^},
17175 there is typically no sure way for the component back end to know this,
17176 and in that case @code{nnvirtual} tells Gnus that the article came from a
17177 not-news back end.  (Just to be on the safe side.)
17178
17179 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17180 line from the article you respond to in these cases.
17181
17182 @code{nnvirtual} groups do not inherit anything but articles and marks
17183 from component groups---group parameters, for instance, are not
17184 inherited.
17185
17186
17187 @node Kibozed Groups
17188 @subsection Kibozed Groups
17189 @cindex nnkiboze
17190 @cindex kibozing
17191
17192 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17193 the news feed''.  @code{nnkiboze} is a back end that will do this for
17194 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17195 with useless requests!  Oh happiness!
17196
17197 @kindex G k (Group)
17198 To create a kibozed group, use the @kbd{G k} command in the group
17199 buffer.
17200
17201 The address field of the @code{nnkiboze} method is, as with
17202 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17203 @code{nnkiboze} group.  That's where most similarities between
17204 @code{nnkiboze} and @code{nnvirtual} end.
17205
17206 In addition to this regexp detailing component groups, an
17207 @code{nnkiboze} group must have a score file to say what articles are
17208 to be included in the group (@pxref{Scoring}).
17209
17210 @kindex M-x nnkiboze-generate-groups
17211 @findex nnkiboze-generate-groups
17212 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17213 @code{nnkiboze} groups you want to have.  This command will take time.
17214 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17215 headers from all the articles in all the component groups and run them
17216 through the scoring process to determine if there are any articles in
17217 the groups that are to be part of the @code{nnkiboze} groups.
17218
17219 Please limit the number of component groups by using restrictive
17220 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17221 @acronym{NNTP} site may throw you off and never let you back in again.
17222 Stranger things have happened.
17223
17224 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17225 and they can be foreign.  No restrictions.
17226
17227 @vindex nnkiboze-directory
17228 The generation of an @code{nnkiboze} group means writing two files in
17229 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17230 contains the @acronym{NOV} header lines for all the articles in the group,
17231 and the other is an additional @file{.newsrc} file to store information
17232 on what groups have been searched through to find component articles.
17233
17234 Articles marked as read in the @code{nnkiboze} group will have
17235 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17236
17237
17238 @node Gnus Unplugged
17239 @section Gnus Unplugged
17240 @cindex offline
17241 @cindex unplugged
17242 @cindex agent
17243 @cindex Gnus agent
17244 @cindex Gnus unplugged
17245
17246 In olden times (ca. February '88), people used to run their newsreaders
17247 on big machines with permanent connections to the net.  News transport
17248 was dealt with by news servers, and all the newsreaders had to do was to
17249 read news.  Believe it or not.
17250
17251 Nowadays most people read news and mail at home, and use some sort of
17252 modem to connect to the net.  To avoid running up huge phone bills, it
17253 would be nice to have a way to slurp down all the news and mail, hang up
17254 the phone, read for several hours, and then upload any responses you
17255 have to make.  And then you repeat the procedure.
17256
17257 Of course, you can use news servers for doing this as well.  I've used
17258 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17259 for some years, but doing that's a bore.  Moving the news server
17260 functionality up to the newsreader makes sense if you're the only person
17261 reading news on a machine.
17262
17263 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17264 fact, you don't even have to configure anything.
17265
17266 Of course, to use it as such, you have to learn a few new commands.
17267
17268 @menu
17269 * Agent Basics::                How it all is supposed to work.
17270 * Agent Categories::            How to tell the Gnus Agent what to download.
17271 * Agent Commands::              New commands for all the buffers.
17272 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17273 * Agent as Cache::              The Agent is a big cache too.
17274 * Agent Expiry::                How to make old articles go away.
17275 * Agent Regeneration::          How to recover from lost connections and other accidents.
17276 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17277 * Outgoing Messages::           What happens when you post/mail something?
17278 * Agent Variables::             Customizing is fun.
17279 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17280 * Batching Agents::             How to fetch news from a @code{cron} job.
17281 * Agent Caveats::               What you think it'll do and what it does.
17282 @end menu
17283
17284
17285 @node Agent Basics
17286 @subsection Agent Basics
17287
17288 First, let's get some terminology out of the way.
17289
17290 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17291 connection to the net (and notified the Agent that this is the case).
17292 When the connection to the net is up again (and Gnus knows this), the
17293 Agent is @dfn{plugged}.
17294
17295 The @dfn{local} machine is the one you're running on, and which isn't
17296 connected to the net continuously.
17297
17298 @dfn{Downloading} means fetching things from the net to your local
17299 machine.  @dfn{Uploading} is doing the opposite.
17300
17301 You know that Gnus gives you all the opportunity you'd ever want for
17302 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17303 is also customizable to a great extent, which means that the user has a
17304 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17305 you in your foot, but with Gnus, you have a choice!
17306
17307 Gnus is never really in plugged or unplugged state.  Rather, it applies
17308 that state to each server individually.  This means that some servers
17309 can be plugged while others can be unplugged.  Additionally, some
17310 servers can be ignored by the Agent altogether (which means that
17311 they're kinda like plugged always).
17312
17313 So when you unplug the Agent and then wonder why is Gnus opening a
17314 connection to the Net, the next step to do is to look whether all
17315 servers are agentized.  If there is an unagentized server, you found
17316 the culprit.
17317
17318 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17319 reachable.  When Gnus notices this, it asks you whether you want the
17320 server to be switched to offline state.  If you say yes, then the
17321 server will behave somewhat as if it was unplugged, except that Gnus
17322 will ask you whether you want to switch it back online again.
17323
17324 Let's take a typical Gnus session using the Agent.
17325
17326 @itemize @bullet
17327
17328 @item
17329 @findex gnus-unplugged
17330 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17331 Agent in a disconnected state.  You can read all the news that you have
17332 already fetched while in this mode.
17333
17334 @item
17335 You then decide to see whether any new news has arrived.  You connect
17336 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17337 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17338 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17339 Source Specifiers}).
17340
17341 @item
17342 You can then read the new news immediately, or you can download the
17343 news onto your local machine.  If you want to do the latter, you press
17344 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17345 all the eligible articles in all the groups.  (To let Gnus know which
17346 articles you want to download, @pxref{Agent Categories}).
17347
17348 @item
17349 After fetching the articles, you press @kbd{J j} to make Gnus become
17350 unplugged again, and you shut down the PPP thing (or whatever).  And
17351 then you read the news offline.
17352
17353 @item
17354 And then you go to step 2.
17355 @end itemize
17356
17357 Here are some things you should do the first time (or so) that you use
17358 the Agent.
17359
17360 @itemize @bullet
17361
17362 @item
17363 Decide which servers should be covered by the Agent.  If you have a mail
17364 back end, it would probably be nonsensical to have it covered by the
17365 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17366 @kbd{J a} on the server (or servers) that you wish to have covered by the
17367 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17368 added servers you do not wish to have covered by the Agent.  By default,
17369 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17370 @code{gnus-secondary-select-methods} are agentized.
17371
17372 @item
17373 Decide on download policy.  It's fairly simple once you decide whether
17374 you are going to use agent categories, topic parameters, and/or group
17375 parameters to implement your policy.  If you're new to gnus, it
17376 is probably best to start with a category, @xref{Agent Categories}.
17377
17378 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17379 (@pxref{Agent Categories}) provide for setting a policy that applies
17380 to multiple groups.  Which you use is entirely up to you.  Topic
17381 parameters do override categories so, if you mix the two, you'll have
17382 to take that into account.  If you have a few groups that deviate from
17383 your policy, you can use group parameters (@pxref{Group Parameters}) to
17384 configure them.
17385
17386 @item
17387 Uhm@dots{} that's it.
17388 @end itemize
17389
17390
17391 @node Agent Categories
17392 @subsection Agent Categories
17393
17394 One of the main reasons to integrate the news transport layer into the
17395 newsreader is to allow greater control over what articles to download.
17396 There's not much point in downloading huge amounts of articles, just to
17397 find out that you're not interested in reading any of them.  It's better
17398 to be somewhat more conservative in choosing what to download, and then
17399 mark the articles for downloading manually if it should turn out that
17400 you're interested in the articles anyway.
17401
17402 One of the more effective methods for controlling what is to be
17403 downloaded is to create a @dfn{category} and then assign some (or all)
17404 groups to this category.  Groups that do not belong in any other
17405 category belong to the @code{default} category.  Gnus has its own
17406 buffer for creating and managing categories.
17407
17408 If you prefer, you can also use group parameters (@pxref{Group
17409 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17410 alternative approach to controlling the agent.  The only real
17411 difference is that categories are specific to the agent (so there is
17412 less to learn) while group and topic parameters include the kitchen
17413 sink.
17414
17415 Since you can set agent parameters in several different places we have
17416 a rule to decide which source to believe.  This rule specifies that
17417 the parameter sources are checked in the following order: group
17418 parameters, topic parameters, agent category, and finally customizable
17419 variables.  So you can mix all of these sources to produce a wide range
17420 of behavior, just don't blame me if you don't remember where you put
17421 your settings.
17422
17423 @menu
17424 * Category Syntax::             What a category looks like.
17425 * Category Buffer::             A buffer for maintaining categories.
17426 * Category Variables::          Customize'r'Us.
17427 @end menu
17428
17429
17430 @node Category Syntax
17431 @subsubsection Category Syntax
17432
17433 A category consists of a name, the list of groups belonging to the
17434 category, and a number of optional parameters that override the
17435 customizable variables.  The complete list of agent parameters are
17436 listed below.
17437
17438 @table @code
17439 @item gnus-agent-cat-name
17440 The name of the category.
17441
17442 @item gnus-agent-cat-groups
17443 The list of groups that are in this category.
17444
17445 @item gnus-agent-cat-predicate
17446 A predicate which (generally) gives a rough outline of which articles
17447 are eligible for downloading; and
17448
17449 @item gnus-agent-cat-score-file
17450 a score rule which (generally) gives you a finer granularity when
17451 deciding what articles to download.  (Note that this @dfn{download
17452 score} is not necessarily related to normal scores.)
17453
17454 @item gnus-agent-cat-enable-expiration
17455 a boolean indicating whether the agent should expire old articles in
17456 this group.  Most groups should be expired to conserve disk space.  In
17457 fact, its probably safe to say that the gnus.* hierarchy contains the
17458 only groups that should not be expired.
17459
17460 @item gnus-agent-cat-days-until-old
17461 an integer indicating the number of days that the agent should wait
17462 before deciding that a read article is safe to expire.
17463
17464 @item gnus-agent-cat-low-score
17465 an integer that overrides the value of @code{gnus-agent-low-score}.
17466
17467 @item gnus-agent-cat-high-score
17468 an integer that overrides the value of @code{gnus-agent-high-score}.
17469
17470 @item gnus-agent-cat-length-when-short
17471 an integer that overrides the value of
17472 @code{gnus-agent-short-article}.
17473
17474 @item gnus-agent-cat-length-when-long
17475 an integer that overrides the value of @code{gnus-agent-long-article}.
17476 @end table
17477
17478 The name of a category can not be changed once the category has been
17479 created.
17480
17481 Each category maintains a list of groups that are exclusive members of
17482 that category.  The exclusivity rule is automatically enforced, add a
17483 group to a new category and it is automatically removed from its old
17484 category.
17485
17486 A predicate in its simplest form can be a single predicate such as
17487 @code{true} or @code{false}.  These two will download every available
17488 article or nothing respectively.  In the case of these two special
17489 predicates an additional score rule is superfluous.
17490
17491 Predicates of @code{high} or @code{low} download articles in respect of
17492 their scores in relationship to @code{gnus-agent-high-score} and
17493 @code{gnus-agent-low-score} as described below.
17494
17495 To gain even finer control of what is to be regarded eligible for
17496 download a predicate can consist of a number of predicates with logical
17497 operators sprinkled in between.
17498
17499 Perhaps some examples are in order.
17500
17501 Here's a simple predicate.  (It's the default predicate, in fact, used
17502 for all groups that don't belong to any other category.)
17503
17504 @lisp
17505 short
17506 @end lisp
17507
17508 Quite simple, eh?  This predicate is true if and only if the article is
17509 short (for some value of ``short'').
17510
17511 Here's a more complex predicate:
17512
17513 @lisp
17514 (or high
17515     (and
17516      (not low)
17517      (not long)))
17518 @end lisp
17519
17520 This means that an article should be downloaded if it has a high score,
17521 or if the score is not low and the article is not long.  You get the
17522 drift.
17523
17524 The available logical operators are @code{or}, @code{and} and
17525 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17526 @samp{|}, @code{&} and @code{!} instead.)
17527
17528 The following predicates are pre-defined, but if none of these fit what
17529 you want to do, you can write your own.
17530
17531 When evaluating each of these predicates, the named constant will be
17532 bound to the value determined by calling
17533 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17534 example, gnus-agent-short-article will be bound to
17535 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17536 means that you can specify a predicate in your category then tune that
17537 predicate to individual groups.
17538
17539 @table @code
17540 @item short
17541 True iff the article is shorter than @code{gnus-agent-short-article}
17542 lines; default 100.
17543
17544 @item long
17545 True iff the article is longer than @code{gnus-agent-long-article}
17546 lines; default 200.
17547
17548 @item low
17549 True iff the article has a download score less than
17550 @code{gnus-agent-low-score}; default 0.
17551
17552 @item high
17553 True iff the article has a download score greater than
17554 @code{gnus-agent-high-score}; default 0.
17555
17556 @item spam
17557 True iff the Gnus Agent guesses that the article is spam.  The
17558 heuristics may change over time, but at present it just computes a
17559 checksum and sees whether articles match.
17560
17561 @item true
17562 Always true.
17563
17564 @item false
17565 Always false.
17566 @end table
17567
17568 If you want to create your own predicate function, here's what you have
17569 to know:  The functions are called with no parameters, but the
17570 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17571 useful values.
17572
17573 For example, you could decide that you don't want to download articles
17574 that were posted more than a certain number of days ago (e.g. posted
17575 more than @code{gnus-agent-expire-days} ago) you might write a function
17576 something along the lines of the following:
17577
17578 @lisp
17579 (defun my-article-old-p ()
17580   "Say whether an article is old."
17581   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17582      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17583 @end lisp
17584
17585 with the predicate then defined as:
17586
17587 @lisp
17588 (not my-article-old-p)
17589 @end lisp
17590
17591 or you could append your predicate to the predefined
17592 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17593 wherever.
17594
17595 @lisp
17596 (require 'gnus-agent)
17597 (setq  gnus-category-predicate-alist
17598   (append gnus-category-predicate-alist
17599          '((old . my-article-old-p))))
17600 @end lisp
17601
17602 and simply specify your predicate as:
17603
17604 @lisp
17605 (not old)
17606 @end lisp
17607
17608 If/when using something like the above, be aware that there are many
17609 misconfigured systems/mailers out there and so an article's date is not
17610 always a reliable indication of when it was posted.  Hell, some people
17611 just don't give a damn.
17612
17613 The above predicates apply to @emph{all} the groups which belong to the
17614 category.  However, if you wish to have a specific predicate for an
17615 individual group within a category, or you're just too lazy to set up a
17616 new category, you can enter a group's individual predicate in its group
17617 parameters like so:
17618
17619 @lisp
17620 (agent-predicate . short)
17621 @end lisp
17622
17623 This is the group/topic parameter equivalent of the agent category default.
17624 Note that when specifying a single word predicate like this, the
17625 @code{agent-predicate} specification must be in dotted pair notation.
17626
17627 The equivalent of the longer example from above would be:
17628
17629 @lisp
17630 (agent-predicate or high (and (not low) (not long)))
17631 @end lisp
17632
17633 The outer parenthesis required in the category specification are not
17634 entered here as, not being in dotted pair notation, the value of the
17635 predicate is assumed to be a list.
17636
17637
17638 Now, the syntax of the download score is the same as the syntax of
17639 normal score files, except that all elements that require actually
17640 seeing the article itself are verboten.  This means that only the
17641 following headers can be scored on: @code{Subject}, @code{From},
17642 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17643 @code{Lines}, and @code{Xref}.
17644
17645 As with predicates, the specification of the @code{download score rule}
17646 to use in respect of a group can be in either the category definition if
17647 it's to be applicable to all groups in therein, or a group's parameters
17648 if it's to be specific to that group.
17649
17650 In both of these places the @code{download score rule} can take one of
17651 three forms:
17652
17653 @enumerate
17654 @item
17655 Score rule
17656
17657 This has the same syntax as a normal gnus score file except only a
17658 subset of scoring keywords are available as mentioned above.
17659
17660 example:
17661
17662 @itemize @bullet
17663 @item
17664 Category specification
17665
17666 @lisp
17667 (("from"
17668        ("Lars Ingebrigtsen" 1000000 nil s))
17669 ("lines"
17670        (500 -100 nil <)))
17671 @end lisp
17672
17673 @item
17674 Group/Topic Parameter specification
17675
17676 @lisp
17677 (agent-score ("from"
17678                    ("Lars Ingebrigtsen" 1000000 nil s))
17679              ("lines"
17680                    (500 -100 nil <)))
17681 @end lisp
17682
17683 Again, note the omission of the outermost parenthesis here.
17684 @end itemize
17685
17686 @item
17687 Agent score file
17688
17689 These score files must @emph{only} contain the permitted scoring
17690 keywords stated above.
17691
17692 example:
17693
17694 @itemize @bullet
17695 @item
17696 Category specification
17697
17698 @lisp
17699 ("~/News/agent.SCORE")
17700 @end lisp
17701
17702 or perhaps
17703
17704 @lisp
17705 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17706 @end lisp
17707
17708 @item
17709 Group Parameter specification
17710
17711 @lisp
17712 (agent-score "~/News/agent.SCORE")
17713 @end lisp
17714
17715 Additional score files can be specified as above.  Need I say anything
17716 about parenthesis?
17717 @end itemize
17718
17719 @item
17720 Use @code{normal} score files
17721
17722 If you don't want to maintain two sets of scoring rules for a group, and
17723 your desired @code{downloading} criteria for a group are the same as your
17724 @code{reading} criteria then you can tell the agent to refer to your
17725 @code{normal} score files when deciding what to download.
17726
17727 These directives in either the category definition or a group's
17728 parameters will cause the agent to read in all the applicable score
17729 files for a group, @emph{filtering out} those sections that do not
17730 relate to one of the permitted subset of scoring keywords.
17731
17732 @itemize @bullet
17733 @item
17734 Category Specification
17735
17736 @lisp
17737 file
17738 @end lisp
17739
17740 @item
17741 Group Parameter specification
17742
17743 @lisp
17744 (agent-score . file)
17745 @end lisp
17746 @end itemize
17747 @end enumerate
17748
17749 @node Category Buffer
17750 @subsubsection Category Buffer
17751
17752 You'd normally do all category maintenance from the category buffer.
17753 When you enter it for the first time (with the @kbd{J c} command from
17754 the group buffer), you'll only see the @code{default} category.
17755
17756 The following commands are available in this buffer:
17757
17758 @table @kbd
17759 @item q
17760 @kindex q (Category)
17761 @findex gnus-category-exit
17762 Return to the group buffer (@code{gnus-category-exit}).
17763
17764 @item e
17765 @kindex e (Category)
17766 @findex gnus-category-customize-category
17767 Use a customization buffer to set all of the selected category's
17768 parameters at one time (@code{gnus-category-customize-category}).
17769
17770 @item k
17771 @kindex k (Category)
17772 @findex gnus-category-kill
17773 Kill the current category (@code{gnus-category-kill}).
17774
17775 @item c
17776 @kindex c (Category)
17777 @findex gnus-category-copy
17778 Copy the current category (@code{gnus-category-copy}).
17779
17780 @item a
17781 @kindex a (Category)
17782 @findex gnus-category-add
17783 Add a new category (@code{gnus-category-add}).
17784
17785 @item p
17786 @kindex p (Category)
17787 @findex gnus-category-edit-predicate
17788 Edit the predicate of the current category
17789 (@code{gnus-category-edit-predicate}).
17790
17791 @item g
17792 @kindex g (Category)
17793 @findex gnus-category-edit-groups
17794 Edit the list of groups belonging to the current category
17795 (@code{gnus-category-edit-groups}).
17796
17797 @item s
17798 @kindex s (Category)
17799 @findex gnus-category-edit-score
17800 Edit the download score rule of the current category
17801 (@code{gnus-category-edit-score}).
17802
17803 @item l
17804 @kindex l (Category)
17805 @findex gnus-category-list
17806 List all the categories (@code{gnus-category-list}).
17807 @end table
17808
17809
17810 @node Category Variables
17811 @subsubsection Category Variables
17812
17813 @table @code
17814 @item gnus-category-mode-hook
17815 @vindex gnus-category-mode-hook
17816 Hook run in category buffers.
17817
17818 @item gnus-category-line-format
17819 @vindex gnus-category-line-format
17820 Format of the lines in the category buffer (@pxref{Formatting
17821 Variables}).  Valid elements are:
17822
17823 @table @samp
17824 @item c
17825 The name of the category.
17826
17827 @item g
17828 The number of groups in the category.
17829 @end table
17830
17831 @item gnus-category-mode-line-format
17832 @vindex gnus-category-mode-line-format
17833 Format of the category mode line (@pxref{Mode Line Formatting}).
17834
17835 @item gnus-agent-short-article
17836 @vindex gnus-agent-short-article
17837 Articles that have fewer lines than this are short.  Default 100.
17838
17839 @item gnus-agent-long-article
17840 @vindex gnus-agent-long-article
17841 Articles that have more lines than this are long.  Default 200.
17842
17843 @item gnus-agent-low-score
17844 @vindex gnus-agent-low-score
17845 Articles that have a score lower than this have a low score.  Default
17846 0.
17847
17848 @item gnus-agent-high-score
17849 @vindex gnus-agent-high-score
17850 Articles that have a score higher than this have a high score.  Default
17851 0.
17852
17853 @item gnus-agent-expire-days
17854 @vindex gnus-agent-expire-days
17855 The number of days that a @samp{read} article must stay in the agent's
17856 local disk before becoming eligible for expiration (While the name is
17857 the same, this doesn't mean expiring the article on the server.  It
17858 just means deleting the local copy of the article).  What is also
17859 important to understand is that the counter starts with the time the
17860 article was written to the local disk and not the time the article was
17861 read.
17862 Default 7.
17863
17864 @item gnus-agent-enable-expiration
17865 @vindex gnus-agent-enable-expiration
17866 Determines whether articles in a group are, by default, expired or
17867 retained indefinitely.  The default is @code{ENABLE} which means that
17868 you'll have to disable expiration when desired.  On the other hand,
17869 you could set this to @code{DISABLE}.  In that case, you would then
17870 have to enable expiration in selected groups.
17871
17872 @end table
17873
17874
17875 @node Agent Commands
17876 @subsection Agent Commands
17877 @findex gnus-agent-toggle-plugged
17878 @kindex J j (Agent)
17879
17880 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17881 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17882 toggles the plugged/unplugged state of the Gnus Agent.
17883
17884
17885 @menu
17886 * Group Agent Commands::        Configure groups and fetch their contents.
17887 * Summary Agent Commands::      Manually select then fetch specific articles.
17888 * Server Agent Commands::       Select the servers that are supported by the agent.
17889 @end menu
17890
17891
17892
17893
17894 @node Group Agent Commands
17895 @subsubsection Group Agent Commands
17896
17897 @table @kbd
17898 @item J u
17899 @kindex J u (Agent Group)
17900 @findex gnus-agent-fetch-groups
17901 Fetch all eligible articles in the current group
17902 (@code{gnus-agent-fetch-groups}).
17903
17904 @item J c
17905 @kindex J c (Agent Group)
17906 @findex gnus-enter-category-buffer
17907 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17908
17909 @item J s
17910 @kindex J s (Agent Group)
17911 @findex gnus-agent-fetch-session
17912 Fetch all eligible articles in all groups
17913 (@code{gnus-agent-fetch-session}).
17914
17915 @item J S
17916 @kindex J S (Agent Group)
17917 @findex gnus-group-send-queue
17918 Send all sendable messages in the queue group
17919 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17920
17921 @item J a
17922 @kindex J a (Agent Group)
17923 @findex gnus-agent-add-group
17924 Add the current group to an Agent category
17925 (@code{gnus-agent-add-group}).  This command understands the
17926 process/prefix convention (@pxref{Process/Prefix}).
17927
17928 @item J r
17929 @kindex J r (Agent Group)
17930 @findex gnus-agent-remove-group
17931 Remove the current group from its category, if any
17932 (@code{gnus-agent-remove-group}).  This command understands the
17933 process/prefix convention (@pxref{Process/Prefix}).
17934
17935 @item J Y
17936 @kindex J Y (Agent Group)
17937 @findex gnus-agent-synchronize-flags
17938 Synchronize flags changed while unplugged with remote server, if any.
17939
17940
17941 @end table
17942
17943
17944 @node Summary Agent Commands
17945 @subsubsection Summary Agent Commands
17946
17947 @table @kbd
17948 @item J #
17949 @kindex J # (Agent Summary)
17950 @findex gnus-agent-mark-article
17951 Mark the article for downloading (@code{gnus-agent-mark-article}).
17952
17953 @item J M-#
17954 @kindex J M-# (Agent Summary)
17955 @findex gnus-agent-unmark-article
17956 Remove the downloading mark from the article
17957 (@code{gnus-agent-unmark-article}).
17958
17959 @cindex %
17960 @item @@
17961 @kindex @@ (Agent Summary)
17962 @findex gnus-agent-toggle-mark
17963 Toggle whether to download the article
17964 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17965 default.
17966
17967 @item J c
17968 @kindex J c (Agent Summary)
17969 @findex gnus-agent-catchup
17970 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17971
17972 @item J S
17973 @kindex J S (Agent Summary)
17974 @findex gnus-agent-fetch-group
17975 Download all eligible (@pxref{Agent Categories}) articles in this group.
17976 (@code{gnus-agent-fetch-group}).
17977
17978 @item J s
17979 @kindex J s (Agent Summary)
17980 @findex gnus-agent-fetch-series
17981 Download all processable articles in this group.
17982 (@code{gnus-agent-fetch-series}).
17983
17984 @item J u
17985 @kindex J u (Agent Summary)
17986 @findex gnus-agent-summary-fetch-group
17987 Download all downloadable articles in the current group
17988 (@code{gnus-agent-summary-fetch-group}).
17989
17990 @end table
17991
17992
17993 @node Server Agent Commands
17994 @subsubsection Server Agent Commands
17995
17996 @table @kbd
17997 @item J a
17998 @kindex J a (Agent Server)
17999 @findex gnus-agent-add-server
18000 Add the current server to the list of servers covered by the Gnus Agent
18001 (@code{gnus-agent-add-server}).
18002
18003 @item J r
18004 @kindex J r (Agent Server)
18005 @findex gnus-agent-remove-server
18006 Remove the current server from the list of servers covered by the Gnus
18007 Agent (@code{gnus-agent-remove-server}).
18008
18009 @end table
18010
18011
18012 @node Agent Visuals
18013 @subsection Agent Visuals
18014
18015 If you open a summary while unplugged and, Gnus knows from the group's
18016 active range that there are more articles than the headers currently
18017 stored in the Agent, you may see some articles whose subject looks
18018 something like @samp{[Undownloaded article #####]}.  These are
18019 placeholders for the missing headers.  Aside from setting a mark,
18020 there is not much that can be done with one of these placeholders.
18021 When Gnus finally gets a chance to fetch the group's headers, the
18022 placeholders will automatically be replaced by the actual headers.
18023 You can configure the summary buffer's maneuvering to skip over the
18024 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18025
18026 While it may be obvious to all, the only headers and articles
18027 available while unplugged are those headers and articles that were
18028 fetched into the Agent while previously plugged.  To put it another
18029 way, "If you forget to fetch something while plugged, you might have a
18030 less than satisfying unplugged session".  For this reason, the Agent
18031 adds two visual effects to your summary buffer.  These effects display
18032 the download status of each article so that you always know which
18033 articles will be available when unplugged.
18034
18035 The first visual effect is the @samp{%O} spec.  If you customize
18036 @code{gnus-summary-line-format} to include this specifier, you will add
18037 a single character field that indicates an article's download status.
18038 Articles that have been fetched into either the Agent or the Cache,
18039 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18040 other articles will display @code{gnus-undownloaded-mark} (defaults to
18041 @samp{-}).  If you open a group that has not been agentized, a space
18042 (@samp{ }) will be displayed.
18043
18044 The second visual effect are the undownloaded faces.  The faces, there
18045 are three indicating the article's score (low, normal, high), seem to
18046 result in a love/hate response from many Gnus users.  The problem is
18047 that the face selection is controlled by a list of condition tests and
18048 face names (See @code{gnus-summary-highlight}).  Each condition is
18049 tested in the order in which it appears in the list so early
18050 conditions have precedence over later conditions.  All of this means
18051 that, if you tick an undownloaded article, the article will continue
18052 to be displayed in the undownloaded face rather than the ticked face.
18053
18054 If you use the Agent as a cache (to avoid downloading the same article
18055 each time you visit it or to minimize your connection time), the
18056 undownloaded face will probably seem like a good idea.  The reason
18057 being that you do all of our work (marking, reading, deleting) with
18058 downloaded articles so the normal faces always appear.
18059
18060 For occasional Agent users, the undownloaded faces may appear to be an
18061 absolutely horrible idea.  The issue being that, since most of their
18062 articles have not been fetched into the Agent, most of the normal
18063 faces will be obscured by the undownloaded faces.  If this is your
18064 situation, you have two choices available.  First, you can completely
18065 disable the undownload faces by customizing
18066 @code{gnus-summary-highlight} to delete the three cons-cells that
18067 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18068 you prefer to take a more fine-grained approach, you may set the
18069 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18070 parameter, like all other agent parameters, may be set on an Agent
18071 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18072 Parameters}), or an individual group (@pxref{Group Parameters}).
18073
18074 @node Agent as Cache
18075 @subsection Agent as Cache
18076
18077 When Gnus is plugged, it is not efficient to download headers or
18078 articles from the server again, if they are already stored in the
18079 Agent.  So, Gnus normally only downloads headers once, and stores them
18080 in the Agent.  These headers are later used when generating the summary
18081 buffer, regardless of whether you are plugged or unplugged.  Articles
18082 are not cached in the Agent by default though (that would potentially
18083 consume lots of disk space), but if you have already downloaded an
18084 article into the Agent, Gnus will not download the article from the
18085 server again but use the locally stored copy instead.
18086
18087 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18088 @pxref{Agent Variables}) to always download headers and articles while
18089 plugged.  Gnus will almost certainly be slower, but it will be kept
18090 synchronized with the server.  That last point probably won't make any
18091 sense if you are using a nntp or nnimap back end.
18092
18093 @node Agent Expiry
18094 @subsection Agent Expiry
18095
18096 @vindex gnus-agent-expire-days
18097 @findex gnus-agent-expire
18098 @kindex M-x gnus-agent-expire
18099 @kindex M-x gnus-agent-expire-group
18100 @findex gnus-agent-expire-group
18101 @cindex agent expiry
18102 @cindex Gnus agent expiry
18103 @cindex expiry
18104
18105 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18106 least it doesn't handle it like other back ends.  Instead, there are
18107 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18108 commands that will expire all read articles that are older than
18109 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18110 that you're running out of space.  Neither are particularly fast or
18111 efficient, and it's not a particularly good idea to interrupt them (with
18112 @kbd{C-g} or anything else) once you've started one of them.
18113
18114 Note that other functions, e.g. @code{gnus-request-expire-articles},
18115 might run @code{gnus-agent-expire} for you to keep the agent
18116 synchronized with the group.
18117
18118 The agent parameter @code{agent-enable-expiration} may be used to
18119 prevent expiration in selected groups.
18120
18121 @vindex gnus-agent-expire-all
18122 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18123 expiration commands will expire all articles---unread, read, ticked
18124 and dormant.  If @code{nil} (which is the default), only read articles
18125 are eligible for expiry, and unread, ticked and dormant articles will
18126 be kept indefinitely.
18127
18128 If you find that some articles eligible for expiry are never expired,
18129 perhaps some Gnus Agent files are corrupted.  There's are special
18130 commands, @code{gnus-agent-regenerate} and
18131 @code{gnus-agent-regenerate-group}, to fix possible problems.
18132
18133 @node Agent Regeneration
18134 @subsection Agent Regeneration
18135
18136 @cindex agent regeneration
18137 @cindex Gnus agent regeneration
18138 @cindex regeneration
18139
18140 The local data structures used by @code{nnagent} may become corrupted
18141 due to certain exceptional conditions.  When this happens,
18142 @code{nnagent} functionality may degrade or even fail.  The solution
18143 to this problem is to repair the local data structures by removing all
18144 internal inconsistencies.
18145
18146 For example, if your connection to your server is lost while
18147 downloaded articles into the agent, the local data structures will not
18148 know about articles successfully downloaded prior to the connection
18149 failure.  Running @code{gnus-agent-regenerate} or
18150 @code{gnus-agent-regenerate-group} will update the data structures
18151 such that you don't need to download these articles a second time.
18152
18153 @findex gnus-agent-regenerate
18154 @kindex M-x gnus-agent-regenerate
18155 The command @code{gnus-agent-regenerate} will perform
18156 @code{gnus-agent-regenerate-group} on every agentized group.  While
18157 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18158 recommended that you first close all summary buffers.
18159
18160 @findex gnus-agent-regenerate-group
18161 @kindex M-x gnus-agent-regenerate-group
18162 The command @code{gnus-agent-regenerate-group} uses the local copies
18163 of individual articles to repair the local @acronym{NOV}(header) database.  It
18164 then updates the internal data structures that document which articles
18165 are stored locally.  An optional argument will mark articles in the
18166 agent as unread.
18167
18168 @node Agent and IMAP
18169 @subsection Agent and IMAP
18170
18171 The Agent works with any Gnus back end, including nnimap.  However,
18172 since there are some conceptual differences between @acronym{NNTP} and
18173 @acronym{IMAP}, this section (should) provide you with some information to
18174 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18175
18176 The first thing to keep in mind is that all flags (read, ticked, etc)
18177 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18178 case for nntp.  Thus Gnus need to remember flag changes when
18179 disconnected, and synchronize these flags when you plug back in.
18180
18181 Gnus keeps track of flag changes when reading nnimap groups under the
18182 Agent.  When you plug back in, Gnus will check if you have any changed
18183 any flags and ask if you wish to synchronize these with the server.
18184 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18185
18186 @vindex gnus-agent-synchronize-flags
18187 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18188 never automatically synchronize flags.  If it is @code{ask}, which is
18189 the default, the Agent will check if you made any changes and if so
18190 ask if you wish to synchronize these when you re-connect.  If it has
18191 any other value, all flags will be synchronized automatically.
18192
18193 If you do not wish to synchronize flags automatically when you
18194 re-connect, you can do it manually with the
18195 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18196 in the group buffer.
18197
18198 Some things are currently not implemented in the Agent that you'd might
18199 expect from a disconnected @acronym{IMAP} client, including:
18200
18201 @itemize @bullet
18202
18203 @item
18204 Copying/moving articles into nnimap groups when unplugged.
18205
18206 @item
18207 Creating/deleting nnimap groups when unplugged.
18208
18209 @end itemize
18210
18211 Technical note: the synchronization algorithm does not work by ``pushing''
18212 all local flags to the server, but rather incrementally update the
18213 server view of flags by changing only those flags that were changed by
18214 the user.  Thus, if you set one flag on an article, quit the group and
18215 re-select the group and remove the flag; the flag will be set and
18216 removed from the server when you ``synchronize''.  The queued flag
18217 operations can be found in the per-server @code{flags} file in the Agent
18218 directory.  It's emptied when you synchronize flags.
18219
18220
18221 @node Outgoing Messages
18222 @subsection Outgoing Messages
18223
18224 When Gnus is unplugged, all outgoing messages (both mail and news) are
18225 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18226 them there after posting, and edit them at will.
18227
18228 When Gnus is plugged again, you can send the messages either from the
18229 draft group with the special commands available there, or you can use
18230 the @kbd{J S} command in the group buffer to send all the sendable
18231 messages in the draft group.
18232
18233
18234
18235 @node Agent Variables
18236 @subsection Agent Variables
18237
18238 @table @code
18239 @item gnus-agent-directory
18240 @vindex gnus-agent-directory
18241 Where the Gnus Agent will store its files.  The default is
18242 @file{~/News/agent/}.
18243
18244 @item gnus-agent-handle-level
18245 @vindex gnus-agent-handle-level
18246 Groups on levels (@pxref{Group Levels}) higher than this variable will
18247 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18248 which means that only subscribed group will be considered by the Agent
18249 by default.
18250
18251 @item gnus-agent-plugged-hook
18252 @vindex gnus-agent-plugged-hook
18253 Hook run when connecting to the network.
18254
18255 @item gnus-agent-unplugged-hook
18256 @vindex gnus-agent-unplugged-hook
18257 Hook run when disconnecting from the network.
18258
18259 @item gnus-agent-fetched-hook
18260 @vindex gnus-agent-fetched-hook
18261 Hook run when finished fetching articles.
18262
18263 @item gnus-agent-cache
18264 @vindex gnus-agent-cache
18265 Variable to control whether use the locally stored @acronym{NOV} and
18266 articles when plugged, e.g. essentially using the Agent as a cache.
18267 The default is non-@code{nil}, which means to use the Agent as a cache.
18268
18269 @item gnus-agent-go-online
18270 @vindex gnus-agent-go-online
18271 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18272 automatically switch offline servers into online status.  If it is
18273 @code{ask}, the default, the Agent will ask if you wish to switch
18274 offline servers into online status when you re-connect.  If it has any
18275 other value, all offline servers will be automatically switched into
18276 online status.
18277
18278 @item gnus-agent-mark-unread-after-downloaded
18279 @vindex gnus-agent-mark-unread-after-downloaded
18280 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18281 mark articles as unread after downloading.  This is usually a safe
18282 thing to do as the newly downloaded article has obviously not been
18283 read.  The default is t.
18284
18285 @item gnus-agent-consider-all-articles
18286 @vindex gnus-agent-consider-all-articles
18287 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18288 agent will fetch all missing headers.  When @code{nil}, the agent will
18289 fetch only new headers.  The default is @code{nil}.
18290
18291 @item gnus-agent-max-fetch-size
18292 @vindex gnus-agent-max-fetch-size
18293 The agent fetches articles into a temporary buffer prior to parsing
18294 them into individual files.  To avoid exceeding the max. buffer size,
18295 the agent alternates between fetching and parsing until all articles
18296 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18297 limit to control how often the cycling occurs.  A large value improves
18298 performance.  A small value minimizes the time lost should the
18299 connection be lost while fetching (You may need to run
18300 @code{gnus-agent-regenerate-group} to update the group's state.
18301 However, all articles parsed prior to loosing the connection will be
18302 available while unplugged).  The default is 10M so it is unusual to
18303 see any cycling.
18304
18305 @item gnus-server-unopen-status
18306 @vindex gnus-server-unopen-status
18307 Perhaps not an Agent variable, but closely related to the Agent, this
18308 variable says what will happen if Gnus cannot open a server.  If the
18309 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18310 whether to deny the server or whether to unplug the agent.  If the
18311 Agent is disabled, Gnus always simply deny the server.  Other choices
18312 for this variable include @code{denied} and @code{offline} the latter
18313 is only valid if the Agent is used.
18314
18315 @item gnus-auto-goto-ignores
18316 @vindex gnus-auto-goto-ignores
18317 Another variable that isn't an Agent variable, yet so closely related
18318 that most will look for it here, this variable tells the summary
18319 buffer how to maneuver around undownloaded (only headers stored in the
18320 agent) and unfetched (neither article nor headers stored) articles.
18321
18322 The legal values are @code{nil} (maneuver to any article),
18323 @code{undownloaded} (maneuvering while unplugged ignores articles that
18324 have not been fetched), @code{always-undownloaded} (maneuvering always
18325 ignores articles that have not been fetched), @code{unfetched}
18326 (maneuvering ignores articles whose headers have not been fetched).
18327
18328 @end table
18329
18330
18331 @node Example Setup
18332 @subsection Example Setup
18333
18334 If you don't want to read this manual, and you have a fairly standard
18335 setup, you may be able to use something like the following as your
18336 @file{~/.gnus.el} file to get started.
18337
18338 @lisp
18339 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18340 ;;; @r{from your ISP's server.}
18341 (setq gnus-select-method '(nntp "news.your-isp.com"))
18342
18343 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18344 ;;; @r{your ISP's @acronym{POP} server.}
18345 (setq mail-sources '((pop :server "pop.your-isp.com")))
18346
18347 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18348 (setq gnus-secondary-select-methods '((nnml "")))
18349
18350 ;;; @r{Make Gnus into an offline newsreader.}
18351 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18352 ;;; (setq gnus-agent t) ; @r{Now the default.}
18353 @end lisp
18354
18355 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18356 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18357 gnus}.
18358
18359 If this is the first time you've run Gnus, you will be subscribed
18360 automatically to a few default newsgroups.  You'll probably want to
18361 subscribe to more groups, and to do that, you have to query the
18362 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18363 command.  This usually takes quite a while, but you only have to do it
18364 once.
18365
18366 After reading and parsing a while, you'll be presented with a list of
18367 groups.  Subscribe to the ones you want to read with the @kbd{u}
18368 command.  @kbd{l} to make all the killed groups disappear after you've
18369 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18370 back all the killed groups.)
18371
18372 You can now read the groups at once, or you can download the articles
18373 with the @kbd{J s} command.  And then read the rest of this manual to
18374 find out which of the other gazillion things you want to customize.
18375
18376
18377 @node Batching Agents
18378 @subsection Batching Agents
18379 @findex gnus-agent-batch
18380
18381 Having the Gnus Agent fetch articles (and post whatever messages you've
18382 written) is quite easy once you've gotten things set up properly.  The
18383 following shell script will do everything that is necessary:
18384
18385 You can run a complete batch command from the command line with the
18386 following incantation:
18387
18388 @example
18389 #!/bin/sh
18390 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18391 @end example
18392
18393
18394 @node Agent Caveats
18395 @subsection Agent Caveats
18396
18397 The Gnus Agent doesn't seem to work like most other offline
18398 newsreaders.  Here are some common questions that some imaginary people
18399 may ask:
18400
18401 @table @dfn
18402 @item If I read an article while plugged, do they get entered into the Agent?
18403
18404 @strong{No}.  If you want this behaviour, add
18405 @code{gnus-agent-fetch-selected-article} to
18406 @code{gnus-select-article-hook}.
18407
18408 @item If I read an article while plugged, and the article already exists in
18409 the Agent, will it get downloaded once more?
18410
18411 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18412
18413 @end table
18414
18415 In short, when Gnus is unplugged, it only looks into the locally stored
18416 articles; when it's plugged, it talks to your ISP and may also use the
18417 locally stored articles.
18418
18419
18420 @node Scoring
18421 @chapter Scoring
18422 @cindex scoring
18423
18424 Other people use @dfn{kill files}, but we here at Gnus Towers like
18425 scoring better than killing, so we'd rather switch than fight.  They do
18426 something completely different as well, so sit up straight and pay
18427 attention!
18428
18429 @vindex gnus-summary-mark-below
18430 All articles have a default score (@code{gnus-summary-default-score}),
18431 which is 0 by default.  This score may be raised or lowered either
18432 interactively or by score files.  Articles that have a score lower than
18433 @code{gnus-summary-mark-below} are marked as read.
18434
18435 Gnus will read any @dfn{score files} that apply to the current group
18436 before generating the summary buffer.
18437
18438 There are several commands in the summary buffer that insert score
18439 entries based on the current article.  You can, for instance, ask Gnus to
18440 lower or increase the score of all articles with a certain subject.
18441
18442 There are two sorts of scoring entries: Permanent and temporary.
18443 Temporary score entries are self-expiring entries.  Any entries that are
18444 temporary and have not been used for, say, a week, will be removed
18445 silently to help keep the sizes of the score files down.
18446
18447 @menu
18448 * Summary Score Commands::      Adding score entries for the current group.
18449 * Group Score Commands::        General score commands.
18450 * Score Variables::             Customize your scoring.  (My, what terminology).
18451 * Score File Format::           What a score file may contain.
18452 * Score File Editing::          You can edit score files by hand as well.
18453 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18454 * Home Score File::             How to say where new score entries are to go.
18455 * Followups To Yourself::       Having Gnus notice when people answer you.
18456 * Scoring On Other Headers::    Scoring on non-standard headers.
18457 * Scoring Tips::                How to score effectively.
18458 * Reverse Scoring::             That problem child of old is not problem.
18459 * Global Score Files::          Earth-spanning, ear-splitting score files.
18460 * Kill Files::                  They are still here, but they can be ignored.
18461 * Converting Kill Files::       Translating kill files to score files.
18462 * GroupLens::                   Getting predictions on what you like to read.
18463 * Advanced Scoring::            Using logical expressions to build score rules.
18464 * Score Decays::                It can be useful to let scores wither away.
18465 @end menu
18466
18467
18468 @node Summary Score Commands
18469 @section Summary Score Commands
18470 @cindex score commands
18471
18472 The score commands that alter score entries do not actually modify real
18473 score files.  That would be too inefficient.  Gnus maintains a cache of
18474 previously loaded score files, one of which is considered the
18475 @dfn{current score file alist}.  The score commands simply insert
18476 entries into this list, and upon group exit, this list is saved.
18477
18478 The current score file is by default the group's local score file, even
18479 if no such score file actually exists.  To insert score commands into
18480 some other score file (e.g. @file{all.SCORE}), you must first make this
18481 score file the current one.
18482
18483 General score commands that don't actually change the score file:
18484
18485 @table @kbd
18486
18487 @item V s
18488 @kindex V s (Summary)
18489 @findex gnus-summary-set-score
18490 Set the score of the current article (@code{gnus-summary-set-score}).
18491
18492 @item V S
18493 @kindex V S (Summary)
18494 @findex gnus-summary-current-score
18495 Display the score of the current article
18496 (@code{gnus-summary-current-score}).
18497
18498 @item V t
18499 @kindex V t (Summary)
18500 @findex gnus-score-find-trace
18501 Display all score rules that have been used on the current article
18502 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18503 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18504 When point is on a string within the match element, @kbd{e} will try to
18505 bring you to this string in the score file.
18506
18507 @item V w
18508 @kindex V w (Summary)
18509 @findex gnus-score-find-favourite-words
18510 List words used in scoring (@code{gnus-score-find-favourite-words}).
18511
18512 @item V R
18513 @kindex V R (Summary)
18514 @findex gnus-summary-rescore
18515 Run the current summary through the scoring process
18516 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18517 around with your score files behind Gnus' back and want to see the
18518 effect you're having.
18519
18520 @item V c
18521 @kindex V c (Summary)
18522 @findex gnus-score-change-score-file
18523 Make a different score file the current
18524 (@code{gnus-score-change-score-file}).
18525
18526 @item V e
18527 @kindex V e (Summary)
18528 @findex gnus-score-edit-current-scores
18529 Edit the current score file (@code{gnus-score-edit-current-scores}).
18530 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18531 File Editing}).
18532
18533 @item V f
18534 @kindex V f (Summary)
18535 @findex gnus-score-edit-file
18536 Edit a score file and make this score file the current one
18537 (@code{gnus-score-edit-file}).
18538
18539 @item V F
18540 @kindex V F (Summary)
18541 @findex gnus-score-flush-cache
18542 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18543 after editing score files.
18544
18545 @item V C
18546 @kindex V C (Summary)
18547 @findex gnus-score-customize
18548 Customize a score file in a visually pleasing manner
18549 (@code{gnus-score-customize}).
18550
18551 @end table
18552
18553 The rest of these commands modify the local score file.
18554
18555 @table @kbd
18556
18557 @item V m
18558 @kindex V m (Summary)
18559 @findex gnus-score-set-mark-below
18560 Prompt for a score, and mark all articles with a score below this as
18561 read (@code{gnus-score-set-mark-below}).
18562
18563 @item V x
18564 @kindex V x (Summary)
18565 @findex gnus-score-set-expunge-below
18566 Prompt for a score, and add a score rule to the current score file to
18567 expunge all articles below this score
18568 (@code{gnus-score-set-expunge-below}).
18569 @end table
18570
18571 The keystrokes for actually making score entries follow a very regular
18572 pattern, so there's no need to list all the commands.  (Hundreds of
18573 them.)
18574
18575 @findex gnus-summary-increase-score
18576 @findex gnus-summary-lower-score
18577
18578 @enumerate
18579 @item
18580 The first key is either @kbd{I} (upper case i) for increasing the score
18581 or @kbd{L} for lowering the score.
18582 @item
18583 The second key says what header you want to score on.  The following
18584 keys are available:
18585 @table @kbd
18586
18587 @item a
18588 Score on the author name.
18589
18590 @item s
18591 Score on the subject line.
18592
18593 @item x
18594 Score on the @code{Xref} line---i.e., the cross-posting line.
18595
18596 @item r
18597 Score on the @code{References} line.
18598
18599 @item d
18600 Score on the date.
18601
18602 @item l
18603 Score on the number of lines.
18604
18605 @item i
18606 Score on the @code{Message-ID} header.
18607
18608 @item e
18609 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18610 if your @acronym{NNTP} server tracks additional header data in overviews.
18611
18612 @item f
18613 Score on followups---this matches the author name, and adds scores to
18614 the followups to this author.  (Using this key leads to the creation of
18615 @file{ADAPT} files.)
18616
18617 @item b
18618 Score on the body.
18619
18620 @item h
18621 Score on the head.
18622
18623 @item t
18624 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18625 files.)
18626
18627 @end table
18628
18629 @item
18630 The third key is the match type.  Which match types are valid depends on
18631 what headers you are scoring on.
18632
18633 @table @code
18634
18635 @item strings
18636
18637 @table @kbd
18638
18639 @item e
18640 Exact matching.
18641
18642 @item s
18643 Substring matching.
18644
18645 @item f
18646 Fuzzy matching (@pxref{Fuzzy Matching}).
18647
18648 @item r
18649 Regexp matching
18650 @end table
18651
18652 @item date
18653 @table @kbd
18654
18655 @item b
18656 Before date.
18657
18658 @item a
18659 After date.
18660
18661 @item n
18662 This date.
18663 @end table
18664
18665 @item number
18666 @table @kbd
18667
18668 @item <
18669 Less than number.
18670
18671 @item =
18672 Equal to number.
18673
18674 @item >
18675 Greater than number.
18676 @end table
18677 @end table
18678
18679 @item
18680 The fourth and usually final key says whether this is a temporary (i.e.,
18681 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18682 or whether it is to be done immediately, without adding to the score
18683 file.
18684 @table @kbd
18685
18686 @item t
18687 Temporary score entry.
18688
18689 @item p
18690 Permanent score entry.
18691
18692 @item i
18693 Immediately scoring.
18694 @end table
18695
18696 @item
18697 If you are scoring on `e' (extra) headers, you will then be prompted for
18698 the header name on which you wish to score.  This must be a header named
18699 in gnus-extra-headers, and @samp{TAB} completion is available.
18700
18701 @end enumerate
18702
18703 So, let's say you want to increase the score on the current author with
18704 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18705 score based on the subject line, using substring matching, and make a
18706 temporary score entry: @kbd{L s s t}.  Pretty easy.
18707
18708 To make things a bit more complicated, there are shortcuts.  If you use
18709 a capital letter on either the second or third keys, Gnus will use
18710 defaults for the remaining one or two keystrokes.  The defaults are
18711 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18712 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18713
18714 These functions take both the numerical prefix and the symbolic prefix
18715 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18716 (or increase) the score of the article.  A symbolic prefix of @code{a}
18717 says to use the @file{all.SCORE} file for the command instead of the
18718 current score file.
18719
18720 @vindex gnus-score-mimic-keymap
18721 The @code{gnus-score-mimic-keymap} says whether these commands will
18722 pretend they are keymaps or not.
18723
18724
18725 @node Group Score Commands
18726 @section Group Score Commands
18727 @cindex group score commands
18728
18729 There aren't many of these as yet, I'm afraid.
18730
18731 @table @kbd
18732
18733 @item W f
18734 @kindex W f (Group)
18735 @findex gnus-score-flush-cache
18736 Gnus maintains a cache of score alists to avoid having to reload them
18737 all the time.  This command will flush the cache
18738 (@code{gnus-score-flush-cache}).
18739
18740 @end table
18741
18742 You can do scoring from the command line by saying something like:
18743
18744 @findex gnus-batch-score
18745 @cindex batch scoring
18746 @example
18747 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18748 @end example
18749
18750
18751 @node Score Variables
18752 @section Score Variables
18753 @cindex score variables
18754
18755 @table @code
18756
18757 @item gnus-use-scoring
18758 @vindex gnus-use-scoring
18759 If @code{nil}, Gnus will not check for score files, and will not, in
18760 general, do any score-related work.  This is @code{t} by default.
18761
18762 @item gnus-kill-killed
18763 @vindex gnus-kill-killed
18764 If this variable is @code{nil}, Gnus will never apply score files to
18765 articles that have already been through the kill process.  While this
18766 may save you lots of time, it also means that if you apply a kill file
18767 to a group, and then change the kill file and want to run it over you
18768 group again to kill more articles, it won't work.  You have to set this
18769 variable to @code{t} to do that.  (It is @code{t} by default.)
18770
18771 @item gnus-kill-files-directory
18772 @vindex gnus-kill-files-directory
18773 All kill and score files will be stored in this directory, which is
18774 initialized from the @env{SAVEDIR} environment variable by default.
18775 This is @file{~/News/} by default.
18776
18777 @item gnus-score-file-suffix
18778 @vindex gnus-score-file-suffix
18779 Suffix to add to the group name to arrive at the score file name
18780 (@file{SCORE} by default.)
18781
18782 @item gnus-score-uncacheable-files
18783 @vindex gnus-score-uncacheable-files
18784 @cindex score cache
18785 All score files are normally cached to avoid excessive re-loading of
18786 score files.  However, if this might make your Emacs grow big and
18787 bloated, so this regexp can be used to weed out score files unlikely
18788 to be needed again.  It would be a bad idea to deny caching of
18789 @file{all.SCORE}, while it might be a good idea to not cache
18790 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18791 variable is @samp{ADAPT$} by default, so no adaptive score files will
18792 be cached.
18793
18794 @item gnus-save-score
18795 @vindex gnus-save-score
18796 If you have really complicated score files, and do lots of batch
18797 scoring, then you might set this variable to @code{t}.  This will make
18798 Gnus save the scores into the @file{.newsrc.eld} file.
18799
18800 If you do not set this to @code{t}, then manual scores (like those set
18801 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18802 across group visits.
18803
18804 @item gnus-score-interactive-default-score
18805 @vindex gnus-score-interactive-default-score
18806 Score used by all the interactive raise/lower commands to raise/lower
18807 score with.  Default is 1000, which may seem excessive, but this is to
18808 ensure that the adaptive scoring scheme gets enough room to play with.
18809 We don't want the small changes from the adaptive scoring to overwrite
18810 manually entered data.
18811
18812 @item gnus-summary-default-score
18813 @vindex gnus-summary-default-score
18814 Default score of an article, which is 0 by default.
18815
18816 @item gnus-summary-expunge-below
18817 @vindex gnus-summary-expunge-below
18818 Don't display the summary lines of articles that have scores lower than
18819 this variable.  This is @code{nil} by default, which means that no
18820 articles will be hidden.  This variable is local to the summary buffers,
18821 and has to be set from @code{gnus-summary-mode-hook}.
18822
18823 @item gnus-score-over-mark
18824 @vindex gnus-score-over-mark
18825 Mark (in the third column) used for articles with a score over the
18826 default.  Default is @samp{+}.
18827
18828 @item gnus-score-below-mark
18829 @vindex gnus-score-below-mark
18830 Mark (in the third column) used for articles with a score below the
18831 default.  Default is @samp{-}.
18832
18833 @item gnus-score-find-score-files-function
18834 @vindex gnus-score-find-score-files-function
18835 Function used to find score files for the current group.  This function
18836 is called with the name of the group as the argument.
18837
18838 Predefined functions available are:
18839 @table @code
18840
18841 @item gnus-score-find-single
18842 @findex gnus-score-find-single
18843 Only apply the group's own score file.
18844
18845 @item gnus-score-find-bnews
18846 @findex gnus-score-find-bnews
18847 Apply all score files that match, using bnews syntax.  This is the
18848 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18849 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18850 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18851 @samp{all} in the score file names are translated into @samp{.*}, and
18852 then a regexp match is done.
18853
18854 This means that if you have some score entries that you want to apply to
18855 all groups, then you put those entries in the @file{all.SCORE} file.
18856
18857 The score files are applied in a semi-random order, although Gnus will
18858 try to apply the more general score files before the more specific score
18859 files.  It does this by looking at the number of elements in the score
18860 file names---discarding the @samp{all} elements.
18861
18862 @item gnus-score-find-hierarchical
18863 @findex gnus-score-find-hierarchical
18864 Apply all score files from all the parent groups.  This means that you
18865 can't have score files like @file{all.SCORE}, but you can have
18866 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18867 server.
18868
18869 @end table
18870 This variable can also be a list of functions.  In that case, all
18871 these functions will be called with the group name as argument, and
18872 all the returned lists of score files will be applied.  These
18873 functions can also return lists of lists of score alists directly.  In
18874 that case, the functions that return these non-file score alists
18875 should probably be placed before the ``real'' score file functions, to
18876 ensure that the last score file returned is the local score file.
18877 Phu.
18878
18879 For example, to do hierarchical scoring but use a non-server-specific
18880 overall score file, you could use the value
18881 @example
18882 (list (lambda (group) ("all.SCORE"))
18883       'gnus-score-find-hierarchical)
18884 @end example
18885
18886 @item gnus-score-expiry-days
18887 @vindex gnus-score-expiry-days
18888 This variable says how many days should pass before an unused score file
18889 entry is expired.  If this variable is @code{nil}, no score file entries
18890 are expired.  It's 7 by default.
18891
18892 @item gnus-update-score-entry-dates
18893 @vindex gnus-update-score-entry-dates
18894 If this variable is non-@code{nil}, temporary score entries that have
18895 been triggered (matched) will have their dates updated.  (This is how Gnus
18896 controls expiry---all non-matched-entries will become too old while
18897 matched entries will stay fresh and young.)  However, if you set this
18898 variable to @code{nil}, even matched entries will grow old and will
18899 have to face that oh-so grim reaper.
18900
18901 @item gnus-score-after-write-file-function
18902 @vindex gnus-score-after-write-file-function
18903 Function called with the name of the score file just written.
18904
18905 @item gnus-score-thread-simplify
18906 @vindex gnus-score-thread-simplify
18907 If this variable is non-@code{nil}, article subjects will be
18908 simplified for subject scoring purposes in the same manner as with
18909 threading---according to the current value of
18910 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18911 @code{substring} or @code{exact} matching, the match will also be
18912 simplified in this manner.
18913
18914 @end table
18915
18916
18917 @node Score File Format
18918 @section Score File Format
18919 @cindex score file format
18920
18921 A score file is an @code{emacs-lisp} file that normally contains just a
18922 single form.  Casual users are not expected to edit these files;
18923 everything can be changed from the summary buffer.
18924
18925 Anyway, if you'd like to dig into it yourself, here's an example:
18926
18927 @lisp
18928 (("from"
18929   ("Lars Ingebrigtsen" -10000)
18930   ("Per Abrahamsen")
18931   ("larsi\\|lmi" -50000 nil R))
18932  ("subject"
18933   ("Ding is Badd" nil 728373))
18934  ("xref"
18935   ("alt.politics" -1000 728372 s))
18936  ("lines"
18937   (2 -100 nil <))
18938  (mark 0)
18939  (expunge -1000)
18940  (mark-and-expunge -10)
18941  (read-only nil)
18942  (orphan -10)
18943  (adapt t)
18944  (files "/hom/larsi/News/gnu.SCORE")
18945  (exclude-files "all.SCORE")
18946  (local (gnus-newsgroup-auto-expire t)
18947         (gnus-summary-make-false-root empty))
18948  (eval (ding)))
18949 @end lisp
18950
18951 This example demonstrates most score file elements.  @xref{Advanced
18952 Scoring}, for a different approach.
18953
18954 Even though this looks much like Lisp code, nothing here is actually
18955 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18956 has to be valid syntactically, if not semantically.
18957
18958 Six keys are supported by this alist:
18959
18960 @table @code
18961
18962 @item STRING
18963 If the key is a string, it is the name of the header to perform the
18964 match on.  Scoring can only be performed on these eight headers:
18965 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18966 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18967 these headers, there are three strings to tell Gnus to fetch the entire
18968 article and do the match on larger parts of the article: @code{Body}
18969 will perform the match on the body of the article, @code{Head} will
18970 perform the match on the head of the article, and @code{All} will
18971 perform the match on the entire article.  Note that using any of these
18972 last three keys will slow down group entry @emph{considerably}.  The
18973 final ``header'' you can score on is @code{Followup}.  These score
18974 entries will result in new score entries being added for all follow-ups
18975 to articles that matches these score entries.
18976
18977 Following this key is an arbitrary number of score entries, where each
18978 score entry has one to four elements.
18979 @enumerate
18980
18981 @item
18982 The first element is the @dfn{match element}.  On most headers this will
18983 be a string, but on the Lines and Chars headers, this must be an
18984 integer.
18985
18986 @item
18987 If the second element is present, it should be a number---the @dfn{score
18988 element}.  This number should be an integer in the neginf to posinf
18989 interval.  This number is added to the score of the article if the match
18990 is successful.  If this element is not present, the
18991 @code{gnus-score-interactive-default-score} number will be used
18992 instead.  This is 1000 by default.
18993
18994 @item
18995 If the third element is present, it should be a number---the @dfn{date
18996 element}.  This date says when the last time this score entry matched,
18997 which provides a mechanism for expiring the score entries.  It this
18998 element is not present, the score entry is permanent.  The date is
18999 represented by the number of days since December 31, 1 BCE.
19000
19001 @item
19002 If the fourth element is present, it should be a symbol---the @dfn{type
19003 element}.  This element specifies what function should be used to see
19004 whether this score entry matches the article.  What match types that can
19005 be used depends on what header you wish to perform the match on.
19006 @table @dfn
19007
19008 @item From, Subject, References, Xref, Message-ID
19009 For most header types, there are the @code{r} and @code{R} (regexp), as
19010 well as @code{s} and @code{S} (substring) types, and @code{e} and
19011 @code{E} (exact match), and @code{w} (word match) types.  If this
19012 element is not present, Gnus will assume that substring matching should
19013 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19014 that the matches will be done in a case-sensitive manner.  All these
19015 one-letter types are really just abbreviations for the @code{regexp},
19016 @code{string}, @code{exact}, and @code{word} types, which you can use
19017 instead, if you feel like.
19018
19019 @item Extra
19020 Just as for the standard string overview headers, if you are using
19021 gnus-extra-headers, you can score on these headers' values.  In this
19022 case, there is a 5th element in the score entry, being the name of the
19023 header to be scored.  The following entry is useful in your
19024 @file{all.SCORE} file in case of spam attacks from a single origin host,
19025 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
19026
19027 @lisp
19028 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
19029 @end lisp
19030
19031 @item Lines, Chars
19032 These two headers use different match types: @code{<}, @code{>},
19033 @code{=}, @code{>=} and @code{<=}.
19034
19035 These predicates are true if
19036
19037 @example
19038 (PREDICATE HEADER MATCH)
19039 @end example
19040
19041 evaluates to non-@code{nil}.  For instance, the advanced match
19042 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19043 following form:
19044
19045 @lisp
19046 (< header-value 4)
19047 @end lisp
19048
19049 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19050 the match, we get the score added if the article has less than 4 lines.
19051 (It's easy to get confused and think it's the other way around.  But
19052 it's not.  I think.)
19053
19054 When matching on @code{Lines}, be careful because some back ends (like
19055 @code{nndir}) do not generate @code{Lines} header, so every article ends
19056 up being marked as having 0 lines.  This can lead to strange results if
19057 you happen to lower score of the articles with few lines.
19058
19059 @item Date
19060 For the Date header we have three kinda silly match types:
19061 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19062 ever being useful, but, like, it would feel kinda silly not to provide
19063 this function.  Just in case.  You never know.  Better safe than sorry.
19064 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19065 sex on a first date.  (I have been told that at least one person, and I
19066 quote, ``found this function indispensable'', however.)
19067
19068 @cindex ISO8601
19069 @cindex date
19070 A more useful match type is @code{regexp}.  With it, you can match the
19071 date string using a regular expression.  The date is normalized to
19072 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19073 you want to match all articles that have been posted on April 1st in
19074 every year, you could use @samp{....0401.........} as a match string,
19075 for instance.  (Note that the date is kept in its original time zone, so
19076 this will match articles that were posted when it was April 1st where
19077 the article was posted from.  Time zones are such wholesome fun for the
19078 whole family, eh?)
19079
19080 @item Head, Body, All
19081 These three match keys use the same match types as the @code{From} (etc)
19082 header uses.
19083
19084 @item Followup
19085 This match key is somewhat special, in that it will match the
19086 @code{From} header, and affect the score of not only the matching
19087 articles, but also all followups to the matching articles.  This allows
19088 you e.g. increase the score of followups to your own articles, or
19089 decrease the score of followups to the articles of some known
19090 trouble-maker.  Uses the same match types as the @code{From} header
19091 uses.  (Using this match key will lead to creation of @file{ADAPT}
19092 files.)
19093
19094 @item Thread
19095 This match key works along the same lines as the @code{Followup} match
19096 key.  If you say that you want to score on a (sub-)thread started by an
19097 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19098 match.  This will add a new @samp{thread} match for each article that
19099 has @var{x} in its @code{References} header.  (These new @samp{thread}
19100 matches will use the @code{Message-ID}s of these matching articles.)
19101 This will ensure that you can raise/lower the score of an entire thread,
19102 even though some articles in the thread may not have complete
19103 @code{References} headers.  Note that using this may lead to
19104 undeterministic scores of the articles in the thread.  (Using this match
19105 key will lead to creation of @file{ADAPT} files.)
19106 @end table
19107 @end enumerate
19108
19109 @cindex score file atoms
19110 @item mark
19111 The value of this entry should be a number.  Any articles with a score
19112 lower than this number will be marked as read.
19113
19114 @item expunge
19115 The value of this entry should be a number.  Any articles with a score
19116 lower than this number will be removed from the summary buffer.
19117
19118 @item mark-and-expunge
19119 The value of this entry should be a number.  Any articles with a score
19120 lower than this number will be marked as read and removed from the
19121 summary buffer.
19122
19123 @item thread-mark-and-expunge
19124 The value of this entry should be a number.  All articles that belong to
19125 a thread that has a total score below this number will be marked as read
19126 and removed from the summary buffer.  @code{gnus-thread-score-function}
19127 says how to compute the total score for a thread.
19128
19129 @item files
19130 The value of this entry should be any number of file names.  These files
19131 are assumed to be score files as well, and will be loaded the same way
19132 this one was.
19133
19134 @item exclude-files
19135 The clue of this entry should be any number of files.  These files will
19136 not be loaded, even though they would normally be so, for some reason or
19137 other.
19138
19139 @item eval
19140 The value of this entry will be @code{eval}el.  This element will be
19141 ignored when handling global score files.
19142
19143 @item read-only
19144 Read-only score files will not be updated or saved.  Global score files
19145 should feature this atom (@pxref{Global Score Files}).  (Note:
19146 @dfn{Global} here really means @dfn{global}; not your personal
19147 apply-to-all-groups score files.)
19148
19149 @item orphan
19150 The value of this entry should be a number.  Articles that do not have
19151 parents will get this number added to their scores.  Imagine you follow
19152 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19153 will only follow a few of the threads, also want to see any new threads.
19154
19155 You can do this with the following two score file entries:
19156
19157 @example
19158         (orphan -500)
19159         (mark-and-expunge -100)
19160 @end example
19161
19162 When you enter the group the first time, you will only see the new
19163 threads.  You then raise the score of the threads that you find
19164 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19165 rest.  Next time you enter the group, you will see new articles in the
19166 interesting threads, plus any new threads.
19167
19168 I.e.---the orphan score atom is for high-volume groups where a few
19169 interesting threads which can't be found automatically by ordinary
19170 scoring rules exist.
19171
19172 @item adapt
19173 This entry controls the adaptive scoring.  If it is @code{t}, the
19174 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19175 adaptive scoring will be performed on this group.  If it is a list, this
19176 list will be used as the adaptive scoring rules.  If it isn't present,
19177 or is something other than @code{t} or @code{ignore}, the default
19178 adaptive scoring rules will be used.  If you want to use adaptive
19179 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19180 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19181 not want adaptive scoring.  If you only want adaptive scoring in a few
19182 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19183 insert @code{(adapt t)} in the score files of the groups where you want
19184 it.
19185
19186 @item adapt-file
19187 All adaptive score entries will go to the file named by this entry.  It
19188 will also be applied when entering the group.  This atom might be handy
19189 if you want to adapt on several groups at once, using the same adaptive
19190 file for a number of groups.
19191
19192 @item local
19193 @cindex local variables
19194 The value of this entry should be a list of @code{(@var{var}
19195 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19196 current summary buffer, and set to the value specified.  This is a
19197 convenient, if somewhat strange, way of setting variables in some
19198 groups if you don't like hooks much.  Note that the @var{value} won't
19199 be evaluated.
19200 @end table
19201
19202
19203 @node Score File Editing
19204 @section Score File Editing
19205
19206 You normally enter all scoring commands from the summary buffer, but you
19207 might feel the urge to edit them by hand as well, so we've supplied you
19208 with a mode for that.
19209
19210 It's simply a slightly customized @code{emacs-lisp} mode, with these
19211 additional commands:
19212
19213 @table @kbd
19214
19215 @item C-c C-c
19216 @kindex C-c C-c (Score)
19217 @findex gnus-score-edit-done
19218 Save the changes you have made and return to the summary buffer
19219 (@code{gnus-score-edit-done}).
19220
19221 @item C-c C-d
19222 @kindex C-c C-d (Score)
19223 @findex gnus-score-edit-insert-date
19224 Insert the current date in numerical format
19225 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19226 you were wondering.
19227
19228 @item C-c C-p
19229 @kindex C-c C-p (Score)
19230 @findex gnus-score-pretty-print
19231 The adaptive score files are saved in an unformatted fashion.  If you
19232 intend to read one of these files, you want to @dfn{pretty print} it
19233 first.  This command (@code{gnus-score-pretty-print}) does that for
19234 you.
19235
19236 @end table
19237
19238 Type @kbd{M-x gnus-score-mode} to use this mode.
19239
19240 @vindex gnus-score-mode-hook
19241 @code{gnus-score-menu-hook} is run in score mode buffers.
19242
19243 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19244 e} to begin editing score files.
19245
19246
19247 @node Adaptive Scoring
19248 @section Adaptive Scoring
19249 @cindex adaptive scoring
19250
19251 If all this scoring is getting you down, Gnus has a way of making it all
19252 happen automatically---as if by magic.  Or rather, as if by artificial
19253 stupidity, to be precise.
19254
19255 @vindex gnus-use-adaptive-scoring
19256 When you read an article, or mark an article as read, or kill an
19257 article, you leave marks behind.  On exit from the group, Gnus can sniff
19258 these marks and add score elements depending on what marks it finds.
19259 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19260 @code{t} or @code{(line)}.  If you want score adaptively on separate
19261 words appearing in the subjects, you should set this variable to
19262 @code{(word)}.  If you want to use both adaptive methods, set this
19263 variable to @code{(word line)}.
19264
19265 @vindex gnus-default-adaptive-score-alist
19266 To give you complete control over the scoring process, you can customize
19267 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19268 might look something like this:
19269
19270 @lisp
19271 (setq gnus-default-adaptive-score-alist
19272   '((gnus-unread-mark)
19273     (gnus-ticked-mark (from 4))
19274     (gnus-dormant-mark (from 5))
19275     (gnus-del-mark (from -4) (subject -1))
19276     (gnus-read-mark (from 4) (subject 2))
19277     (gnus-expirable-mark (from -1) (subject -1))
19278     (gnus-killed-mark (from -1) (subject -3))
19279     (gnus-kill-file-mark)
19280     (gnus-ancient-mark)
19281     (gnus-low-score-mark)
19282     (gnus-catchup-mark (from -1) (subject -1))))
19283 @end lisp
19284
19285 As you see, each element in this alist has a mark as a key (either a
19286 variable name or a ``real'' mark---a character).  Following this key is
19287 a arbitrary number of header/score pairs.  If there are no header/score
19288 pairs following the key, no adaptive scoring will be done on articles
19289 that have that key as the article mark.  For instance, articles with
19290 @code{gnus-unread-mark} in the example above will not get adaptive score
19291 entries.
19292
19293 Each article can have only one mark, so just a single of these rules
19294 will be applied to each article.
19295
19296 To take @code{gnus-del-mark} as an example---this alist says that all
19297 articles that have that mark (i.e., are marked with @samp{e}) will have a
19298 score entry added to lower based on the @code{From} header by -4, and
19299 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19300
19301 If you have marked 10 articles with the same subject with
19302 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19303 That means that that subject will get a score of ten times -1, which
19304 should be, unless I'm much mistaken, -10.
19305
19306 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19307 the read articles will be marked with the @samp{E} mark.  This'll
19308 probably make adaptive scoring slightly impossible, so auto-expiring and
19309 adaptive scoring doesn't really mix very well.
19310
19311 The headers you can score on are @code{from}, @code{subject},
19312 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19313 @code{chars} and @code{date}.  In addition, you can score on
19314 @code{followup}, which will create an adaptive score entry that matches
19315 on the @code{References} header using the @code{Message-ID} of the
19316 current article, thereby matching the following thread.
19317
19318 If you use this scheme, you should set the score file atom @code{mark}
19319 to something small---like -300, perhaps, to avoid having small random
19320 changes result in articles getting marked as read.
19321
19322 After using adaptive scoring for a week or so, Gnus should start to
19323 become properly trained and enhance the authors you like best, and kill
19324 the authors you like least, without you having to say so explicitly.
19325
19326 You can control what groups the adaptive scoring is to be performed on
19327 by using the score files (@pxref{Score File Format}).  This will also
19328 let you use different rules in different groups.
19329
19330 @vindex gnus-adaptive-file-suffix
19331 The adaptive score entries will be put into a file where the name is the
19332 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19333 is @file{ADAPT}.
19334
19335 @vindex gnus-score-exact-adapt-limit
19336 When doing adaptive scoring, substring or fuzzy matching would probably
19337 give you the best results in most cases.  However, if the header one
19338 matches is short, the possibility for false positives is great, so if
19339 the length of the match is less than
19340 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19341 this variable is @code{nil}, exact matching will always be used to avoid
19342 this problem.
19343
19344 @vindex gnus-default-adaptive-word-score-alist
19345 As mentioned above, you can adapt either on individual words or entire
19346 headers.  If you adapt on words, the
19347 @code{gnus-default-adaptive-word-score-alist} variable says what score
19348 each instance of a word should add given a mark.
19349
19350 @lisp
19351 (setq gnus-default-adaptive-word-score-alist
19352       `((,gnus-read-mark . 30)
19353         (,gnus-catchup-mark . -10)
19354         (,gnus-killed-mark . -20)
19355         (,gnus-del-mark . -15)))
19356 @end lisp
19357
19358 This is the default value.  If you have adaption on words enabled, every
19359 word that appears in subjects of articles marked with
19360 @code{gnus-read-mark} will result in a score rule that increase the
19361 score with 30 points.
19362
19363 @vindex gnus-default-ignored-adaptive-words
19364 @vindex gnus-ignored-adaptive-words
19365 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19366 will be ignored.  If you wish to add more words to be ignored, use the
19367 @code{gnus-ignored-adaptive-words} list instead.
19368
19369 @vindex gnus-adaptive-word-length-limit
19370 Some may feel that short words shouldn't count when doing adaptive
19371 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19372 an integer.  Words shorter than this number will be ignored.  This
19373 variable defaults to @code{nil}.
19374
19375 @vindex gnus-adaptive-word-syntax-table
19376 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19377 syntax table in effect.  It is similar to the standard syntax table, but
19378 it considers numbers to be non-word-constituent characters.
19379
19380 @vindex gnus-adaptive-word-minimum
19381 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19382 word scoring process will never bring down the score of an article to
19383 below this number.  The default is @code{nil}.
19384
19385 @vindex gnus-adaptive-word-no-group-words
19386 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19387 won't adaptively word score any of the words in the group name.  Useful
19388 for groups like @samp{comp.editors.emacs}, where most of the subject
19389 lines contain the word @samp{emacs}.
19390
19391 After using this scheme for a while, it might be nice to write a
19392 @code{gnus-psychoanalyze-user} command to go through the rules and see
19393 what words you like and what words you don't like.  Or perhaps not.
19394
19395 Note that the adaptive word scoring thing is highly experimental and is
19396 likely to change in the future.  Initial impressions seem to indicate
19397 that it's totally useless as it stands.  Some more work (involving more
19398 rigorous statistical methods) will have to be done to make this useful.
19399
19400
19401 @node Home Score File
19402 @section Home Score File
19403
19404 The score file where new score file entries will go is called the
19405 @dfn{home score file}.  This is normally (and by default) the score file
19406 for the group itself.  For instance, the home score file for
19407 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19408
19409 However, this may not be what you want.  It is often convenient to share
19410 a common home score file among many groups---all @samp{emacs} groups
19411 could perhaps use the same home score file.
19412
19413 @vindex gnus-home-score-file
19414 The variable that controls this is @code{gnus-home-score-file}.  It can
19415 be:
19416
19417 @enumerate
19418 @item
19419 A string.  Then this file will be used as the home score file for all
19420 groups.
19421
19422 @item
19423 A function.  The result of this function will be used as the home score
19424 file.  The function will be called with the name of the group as the
19425 parameter.
19426
19427 @item
19428 A list.  The elements in this list can be:
19429
19430 @enumerate
19431 @item
19432 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19433 group name, the @var{file-name} will be used as the home score file.
19434
19435 @item
19436 A function.  If the function returns non-@code{nil}, the result will
19437 be used as the home score file.
19438
19439 @item
19440 A string.  Use the string as the home score file.
19441 @end enumerate
19442
19443 The list will be traversed from the beginning towards the end looking
19444 for matches.
19445
19446 @end enumerate
19447
19448 So, if you want to use just a single score file, you could say:
19449
19450 @lisp
19451 (setq gnus-home-score-file
19452       "my-total-score-file.SCORE")
19453 @end lisp
19454
19455 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19456 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19457
19458 @findex gnus-hierarchial-home-score-file
19459 @lisp
19460 (setq gnus-home-score-file
19461       'gnus-hierarchial-home-score-file)
19462 @end lisp
19463
19464 This is a ready-made function provided for your convenience.
19465 Other functions include
19466
19467 @table @code
19468 @item gnus-current-home-score-file
19469 @findex gnus-current-home-score-file
19470 Return the ``current'' regular score file.  This will make scoring
19471 commands add entry to the ``innermost'' matching score file.
19472
19473 @end table
19474
19475 If you want to have one score file for the @samp{emacs} groups and
19476 another for the @samp{comp} groups, while letting all other groups use
19477 their own home score files:
19478
19479 @lisp
19480 (setq gnus-home-score-file
19481       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19482       '(("\\.emacs" "emacs.SCORE")
19483         ;; @r{All the comp groups in one score file}
19484         ("^comp" "comp.SCORE")))
19485 @end lisp
19486
19487 @vindex gnus-home-adapt-file
19488 @code{gnus-home-adapt-file} works exactly the same way as
19489 @code{gnus-home-score-file}, but says what the home adaptive score file
19490 is instead.  All new adaptive file entries will go into the file
19491 specified by this variable, and the same syntax is allowed.
19492
19493 In addition to using @code{gnus-home-score-file} and
19494 @code{gnus-home-adapt-file}, you can also use group parameters
19495 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19496 Parameters}) to achieve much the same.  Group and topic parameters take
19497 precedence over this variable.
19498
19499
19500 @node Followups To Yourself
19501 @section Followups To Yourself
19502
19503 Gnus offers two commands for picking out the @code{Message-ID} header in
19504 the current buffer.  Gnus will then add a score rule that scores using
19505 this @code{Message-ID} on the @code{References} header of other
19506 articles.  This will, in effect, increase the score of all articles that
19507 respond to the article in the current buffer.  Quite useful if you want
19508 to easily note when people answer what you've said.
19509
19510 @table @code
19511
19512 @item gnus-score-followup-article
19513 @findex gnus-score-followup-article
19514 This will add a score to articles that directly follow up your own
19515 article.
19516
19517 @item gnus-score-followup-thread
19518 @findex gnus-score-followup-thread
19519 This will add a score to all articles that appear in a thread ``below''
19520 your own article.
19521 @end table
19522
19523 @vindex message-sent-hook
19524 These two functions are both primarily meant to be used in hooks like
19525 @code{message-sent-hook}, like this:
19526 @lisp
19527 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19528 @end lisp
19529
19530
19531 If you look closely at your own @code{Message-ID}, you'll notice that
19532 the first two or three characters are always the same.  Here's two of
19533 mine:
19534
19535 @example
19536 <x6u3u47icf.fsf@@eyesore.no>
19537 <x6sp9o7ibw.fsf@@eyesore.no>
19538 @end example
19539
19540 So ``my'' ident on this machine is @samp{x6}.  This can be
19541 exploited---the following rule will raise the score on all followups to
19542 myself:
19543
19544 @lisp
19545 ("references"
19546  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19547   1000 nil r))
19548 @end lisp
19549
19550 Whether it's the first two or first three characters that are ``yours''
19551 is system-dependent.
19552
19553
19554 @node Scoring On Other Headers
19555 @section Scoring On Other Headers
19556 @cindex scoring on other headers
19557
19558 Gnus is quite fast when scoring the ``traditional''
19559 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19560 other headers requires writing a @code{head} scoring rule, which means
19561 that Gnus has to request every single article from the back end to find
19562 matches.  This takes a long time in big groups.
19563
19564 Now, there's not much you can do about this for news groups, but for
19565 mail groups, you have greater control.  In @ref{To From Newsgroups},
19566 it's explained in greater detail what this mechanism does, but here's
19567 a cookbook example for @code{nnml} on how to allow scoring on the
19568 @samp{To} and @samp{Cc} headers.
19569
19570 Put the following in your @file{~/.gnus.el} file.
19571
19572 @lisp
19573 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19574       nnmail-extra-headers gnus-extra-headers)
19575 @end lisp
19576
19577 Restart Gnus and rebuild your @code{nnml} overview files with the
19578 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19579 time if you have much mail.
19580
19581 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19582 so: @kbd{I e s p To RET <your name> RET}.
19583
19584 See?  Simple.
19585
19586
19587 @node Scoring Tips
19588 @section Scoring Tips
19589 @cindex scoring tips
19590
19591 @table @dfn
19592
19593 @item Crossposts
19594 @cindex crossposts
19595 @cindex scoring crossposts
19596 If you want to lower the score of crossposts, the line to match on is
19597 the @code{Xref} header.
19598 @lisp
19599 ("xref" (" talk.politics.misc:" -1000))
19600 @end lisp
19601
19602 @item Multiple crossposts
19603 If you want to lower the score of articles that have been crossposted to
19604 more than, say, 3 groups:
19605 @lisp
19606 ("xref"
19607   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19608    -1000 nil r))
19609 @end lisp
19610
19611 @item Matching on the body
19612 This is generally not a very good idea---it takes a very long time.
19613 Gnus actually has to fetch each individual article from the server.  But
19614 you might want to anyway, I guess.  Even though there are three match
19615 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19616 and stick with it in each score file.  If you use any two, each article
19617 will be fetched @emph{twice}.  If you want to match a bit on the
19618 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19619 the matches.
19620
19621 @item Marking as read
19622 You will probably want to mark articles that have scores below a certain
19623 number as read.  This is most easily achieved by putting the following
19624 in your @file{all.SCORE} file:
19625 @lisp
19626 ((mark -100))
19627 @end lisp
19628 You may also consider doing something similar with @code{expunge}.
19629
19630 @item Negated character classes
19631 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19632 That will match newlines, which might lead to, well, The Unknown.  Say
19633 @code{[^abcd\n]*} instead.
19634 @end table
19635
19636
19637 @node Reverse Scoring
19638 @section Reverse Scoring
19639 @cindex reverse scoring
19640
19641 If you want to keep just articles that have @samp{Sex with Emacs} in the
19642 subject header, and expunge all other articles, you could put something
19643 like this in your score file:
19644
19645 @lisp
19646 (("subject"
19647   ("Sex with Emacs" 2))
19648  (mark 1)
19649  (expunge 1))
19650 @end lisp
19651
19652 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19653 rest as read, and expunge them to boot.
19654
19655
19656 @node Global Score Files
19657 @section Global Score Files
19658 @cindex global score files
19659
19660 Sure, other newsreaders have ``global kill files''.  These are usually
19661 nothing more than a single kill file that applies to all groups, stored
19662 in the user's home directory.  Bah!  Puny, weak newsreaders!
19663
19664 What I'm talking about here are Global Score Files.  Score files from
19665 all over the world, from users everywhere, uniting all nations in one
19666 big, happy score file union!  Ange-score!  New and untested!
19667
19668 @vindex gnus-global-score-files
19669 All you have to do to use other people's score files is to set the
19670 @code{gnus-global-score-files} variable.  One entry for each score file,
19671 or each score file directory.  Gnus will decide by itself what score
19672 files are applicable to which group.
19673
19674 To use the score file
19675 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19676 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19677 say this:
19678
19679 @lisp
19680 (setq gnus-global-score-files
19681       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19682         "/ftp@@ftp.some-where:/pub/score/"))
19683 @end lisp
19684
19685 @findex gnus-score-search-global-directories
19686 @noindent
19687 Simple, eh?  Directory names must end with a @samp{/}.  These
19688 directories are typically scanned only once during each Gnus session.
19689 If you feel the need to manually re-scan the remote directories, you can
19690 use the @code{gnus-score-search-global-directories} command.
19691
19692 Note that, at present, using this option will slow down group entry
19693 somewhat.  (That is---a lot.)
19694
19695 If you want to start maintaining score files for other people to use,
19696 just put your score file up for anonymous ftp and announce it to the
19697 world.  Become a retro-moderator!  Participate in the retro-moderator
19698 wars sure to ensue, where retro-moderators battle it out for the
19699 sympathy of the people, luring them to use their score files on false
19700 premises!  Yay!  The net is saved!
19701
19702 Here are some tips for the would-be retro-moderator, off the top of my
19703 head:
19704
19705 @itemize @bullet
19706
19707 @item
19708 Articles heavily crossposted are probably junk.
19709 @item
19710 To lower a single inappropriate article, lower by @code{Message-ID}.
19711 @item
19712 Particularly brilliant authors can be raised on a permanent basis.
19713 @item
19714 Authors that repeatedly post off-charter for the group can safely be
19715 lowered out of existence.
19716 @item
19717 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19718 articles completely.
19719
19720 @item
19721 Use expiring score entries to keep the size of the file down.  You
19722 should probably have a long expiry period, though, as some sites keep
19723 old articles for a long time.
19724 @end itemize
19725
19726 @dots{} I wonder whether other newsreaders will support global score files
19727 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19728 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19729 holding our breath yet?
19730
19731
19732 @node Kill Files
19733 @section Kill Files
19734 @cindex kill files
19735
19736 Gnus still supports those pesky old kill files.  In fact, the kill file
19737 entries can now be expiring, which is something I wrote before Daniel
19738 Quinlan thought of doing score files, so I've left the code in there.
19739
19740 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19741 than score processing, so it might be a good idea to rewrite your kill
19742 files into score files.
19743
19744 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19745 forms into this file, which means that you can use kill files as some
19746 sort of primitive hook function to be run on group entry, even though
19747 that isn't a very good idea.
19748
19749 Normal kill files look like this:
19750
19751 @lisp
19752 (gnus-kill "From" "Lars Ingebrigtsen")
19753 (gnus-kill "Subject" "ding")
19754 (gnus-expunge "X")
19755 @end lisp
19756
19757 This will mark every article written by me as read, and remove the
19758 marked articles from the summary buffer.  Very useful, you'll agree.
19759
19760 Other programs use a totally different kill file syntax.  If Gnus
19761 encounters what looks like a @code{rn} kill file, it will take a stab at
19762 interpreting it.
19763
19764 Two summary functions for editing a @sc{gnus} kill file:
19765
19766 @table @kbd
19767
19768 @item M-k
19769 @kindex M-k (Summary)
19770 @findex gnus-summary-edit-local-kill
19771 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19772
19773 @item M-K
19774 @kindex M-K (Summary)
19775 @findex gnus-summary-edit-global-kill
19776 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19777 @end table
19778
19779 Two group mode functions for editing the kill files:
19780
19781 @table @kbd
19782
19783 @item M-k
19784 @kindex M-k (Group)
19785 @findex gnus-group-edit-local-kill
19786 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19787
19788 @item M-K
19789 @kindex M-K (Group)
19790 @findex gnus-group-edit-global-kill
19791 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19792 @end table
19793
19794 Kill file variables:
19795
19796 @table @code
19797 @item gnus-kill-file-name
19798 @vindex gnus-kill-file-name
19799 A kill file for the group @samp{soc.motss} is normally called
19800 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19801 this file name is detailed by the @code{gnus-kill-file-name} variable.
19802 The ``global'' kill file (not in the score file sense of ``global'', of
19803 course) is just called @file{KILL}.
19804
19805 @vindex gnus-kill-save-kill-file
19806 @item gnus-kill-save-kill-file
19807 If this variable is non-@code{nil}, Gnus will save the
19808 kill file after processing, which is necessary if you use expiring
19809 kills.
19810
19811 @item gnus-apply-kill-hook
19812 @vindex gnus-apply-kill-hook
19813 @findex gnus-apply-kill-file-unless-scored
19814 @findex gnus-apply-kill-file
19815 A hook called to apply kill files to a group.  It is
19816 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19817 kill file if you have a score file for the same group, you can set this
19818 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19819 kill files to be processed, you should set this variable to @code{nil}.
19820
19821 @item gnus-kill-file-mode-hook
19822 @vindex gnus-kill-file-mode-hook
19823 A hook called in kill-file mode buffers.
19824
19825 @end table
19826
19827
19828 @node Converting Kill Files
19829 @section Converting Kill Files
19830 @cindex kill files
19831 @cindex converting kill files
19832
19833 If you have loads of old kill files, you may want to convert them into
19834 score files.  If they are ``regular'', you can use
19835 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19836 by hand.
19837
19838 The kill to score conversion package isn't included in Gnus by default.
19839 You can fetch it from
19840 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19841
19842 If your old kill files are very complex---if they contain more
19843 non-@code{gnus-kill} forms than not, you'll have to convert them by
19844 hand.  Or just let them be as they are.  Gnus will still use them as
19845 before.
19846
19847
19848 @node GroupLens
19849 @section GroupLens
19850 @cindex GroupLens
19851
19852 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19853 collaborative filtering system that helps you work together with other
19854 people to find the quality news articles out of the huge volume of
19855 news articles generated every day.
19856
19857 To accomplish this the GroupLens system combines your opinions about
19858 articles you have already read with the opinions of others who have done
19859 likewise and gives you a personalized prediction for each unread news
19860 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19861 rate articles, and finds other people that rate articles the same way.
19862 Once it has found some people you agree with it tells you, in the form
19863 of a prediction, what they thought of the article.  You can use this
19864 prediction to help you decide whether or not you want to read the
19865 article.
19866
19867 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19868 so this section is mostly of historical interest.
19869
19870 @menu
19871 * Using GroupLens::             How to make Gnus use GroupLens.
19872 * Rating Articles::             Letting GroupLens know how you rate articles.
19873 * Displaying Predictions::      Displaying predictions given by GroupLens.
19874 * GroupLens Variables::         Customizing GroupLens.
19875 @end menu
19876
19877
19878 @node Using GroupLens
19879 @subsection Using GroupLens
19880
19881 To use GroupLens you must register a pseudonym with your local
19882 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19883 Bureau (BBB)} is the only better bit in town at the moment.
19884
19885 Once you have registered you'll need to set a couple of variables.
19886
19887 @table @code
19888
19889 @item gnus-use-grouplens
19890 @vindex gnus-use-grouplens
19891 Setting this variable to a non-@code{nil} value will make Gnus hook into
19892 all the relevant GroupLens functions.
19893
19894 @item grouplens-pseudonym
19895 @vindex grouplens-pseudonym
19896 This variable should be set to the pseudonym you got when registering
19897 with the Better Bit Bureau.
19898
19899 @item grouplens-newsgroups
19900 @vindex grouplens-newsgroups
19901 A list of groups that you want to get GroupLens predictions for.
19902
19903 @end table
19904
19905 That's the minimum of what you need to get up and running with GroupLens.
19906 Once you've registered, GroupLens will start giving you scores for
19907 articles based on the average of what other people think.  But, to get
19908 the real benefit of GroupLens you need to start rating articles
19909 yourself.  Then the scores GroupLens gives you will be personalized for
19910 you, based on how the people you usually agree with have already rated.
19911
19912
19913 @node Rating Articles
19914 @subsection Rating Articles
19915
19916 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19917 Where 1 means something like this article is a waste of bandwidth and 5
19918 means that the article was really good.  The basic question to ask
19919 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19920 like this one?''
19921
19922 There are four ways to enter a rating for an article in GroupLens.
19923
19924 @table @kbd
19925
19926 @item r
19927 @kindex r (GroupLens)
19928 @findex bbb-summary-rate-article
19929 This function will prompt you for a rating on a scale of one to five.
19930
19931 @item k
19932 @kindex k (GroupLens)
19933 @findex grouplens-score-thread
19934 This function will prompt you for a rating, and rate all the articles in
19935 the thread.  This is really useful for some of those long running giant
19936 threads in rec.humor.
19937
19938 @end table
19939
19940 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19941 the score of the article you're reading.
19942
19943 @table @kbd
19944
19945 @item 1-5 n
19946 @kindex n (GroupLens)
19947 @findex grouplens-next-unread-article
19948 Rate the article and go to the next unread article.
19949
19950 @item 1-5 ,
19951 @kindex , (GroupLens)
19952 @findex grouplens-best-unread-article
19953 Rate the article and go to the next unread article with the highest score.
19954
19955 @end table
19956
19957 If you want to give the current article a score of 4 and then go to the
19958 next article, just type @kbd{4 n}.
19959
19960
19961 @node Displaying Predictions
19962 @subsection Displaying Predictions
19963
19964 GroupLens makes a prediction for you about how much you will like a
19965 news article.  The predictions from GroupLens are on a scale from 1 to
19966 5, where 1 is the worst and 5 is the best.  You can use the predictions
19967 from GroupLens in one of three ways controlled by the variable
19968 @code{gnus-grouplens-override-scoring}.
19969
19970 @vindex gnus-grouplens-override-scoring
19971 There are three ways to display predictions in grouplens.  You may
19972 choose to have the GroupLens scores contribute to, or override the
19973 regular gnus scoring mechanism.  override is the default; however, some
19974 people prefer to see the Gnus scores plus the grouplens scores.  To get
19975 the separate scoring behavior you need to set
19976 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19977 GroupLens predictions combined with the grouplens scores set it to
19978 @code{'override} and to combine the scores set
19979 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19980 the combine option you will also want to set the values for
19981 @code{grouplens-prediction-offset} and
19982 @code{grouplens-score-scale-factor}.
19983
19984 @vindex grouplens-prediction-display
19985 In either case, GroupLens gives you a few choices for how you would like
19986 to see your predictions displayed.  The display of predictions is
19987 controlled by the @code{grouplens-prediction-display} variable.
19988
19989 The following are valid values for that variable.
19990
19991 @table @code
19992 @item prediction-spot
19993 The higher the prediction, the further to the right an @samp{*} is
19994 displayed.
19995
19996 @item confidence-interval
19997 A numeric confidence interval.
19998
19999 @item prediction-bar
20000 The higher the prediction, the longer the bar.
20001
20002 @item confidence-bar
20003 Numerical confidence.
20004
20005 @item confidence-spot
20006 The spot gets bigger with more confidence.
20007
20008 @item prediction-num
20009 Plain-old numeric value.
20010
20011 @item confidence-plus-minus
20012 Prediction +/- confidence.
20013
20014 @end table
20015
20016
20017 @node GroupLens Variables
20018 @subsection GroupLens Variables
20019
20020 @table @code
20021
20022 @item gnus-summary-grouplens-line-format
20023 The summary line format used in GroupLens-enhanced summary buffers.  It
20024 accepts the same specs as the normal summary line format (@pxref{Summary
20025 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20026 %s\n}.
20027
20028 @item grouplens-bbb-host
20029 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20030 default.
20031
20032 @item grouplens-bbb-port
20033 Port of the host running the bbbd server.  The default is 9000.
20034
20035 @item grouplens-score-offset
20036 Offset the prediction by this value.  In other words, subtract the
20037 prediction value by this number to arrive at the effective score.  The
20038 default is 0.
20039
20040 @item grouplens-score-scale-factor
20041 This variable allows the user to magnify the effect of GroupLens scores.
20042 The scale factor is applied after the offset.  The default is 1.
20043
20044 @end table
20045
20046
20047 @node Advanced Scoring
20048 @section Advanced Scoring
20049
20050 Scoring on Subjects and From headers is nice enough, but what if you're
20051 really interested in what a person has to say only when she's talking
20052 about a particular subject?  Or what if you really don't want to
20053 read what person A has to say when she's following up to person B, but
20054 want to read what she says when she's following up to person C?
20055
20056 By using advanced scoring rules you may create arbitrarily complex
20057 scoring patterns.
20058
20059 @menu
20060 * Advanced Scoring Syntax::     A definition.
20061 * Advanced Scoring Examples::   What they look like.
20062 * Advanced Scoring Tips::       Getting the most out of it.
20063 @end menu
20064
20065
20066 @node Advanced Scoring Syntax
20067 @subsection Advanced Scoring Syntax
20068
20069 Ordinary scoring rules have a string as the first element in the rule.
20070 Advanced scoring rules have a list as the first element.  The second
20071 element is the score to be applied if the first element evaluated to a
20072 non-@code{nil} value.
20073
20074 These lists may consist of three logical operators, one redirection
20075 operator, and various match operators.
20076
20077 Logical operators:
20078
20079 @table @code
20080 @item &
20081 @itemx and
20082 This logical operator will evaluate each of its arguments until it finds
20083 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20084 evaluate to @code{true} values, then this operator will return
20085 @code{true}.
20086
20087 @item |
20088 @itemx or
20089 This logical operator will evaluate each of its arguments until it finds
20090 one that evaluates to @code{true}.  If no arguments are @code{true},
20091 then this operator will return @code{false}.
20092
20093 @item !
20094 @itemx not
20095 @itemx Â¬
20096 This logical operator only takes a single argument.  It returns the
20097 logical negation of the value of its argument.
20098
20099 @end table
20100
20101 There is an @dfn{indirection operator} that will make its arguments
20102 apply to the ancestors of the current article being scored.  For
20103 instance, @code{1-} will make score rules apply to the parent of the
20104 current article.  @code{2-} will make score rules apply to the
20105 grandparent of the current article.  Alternatively, you can write
20106 @code{^^}, where the number of @code{^}s (carets) says how far back into
20107 the ancestry you want to go.
20108
20109 Finally, we have the match operators.  These are the ones that do the
20110 real work.  Match operators are header name strings followed by a match
20111 and a match type.  A typical match operator looks like @samp{("from"
20112 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20113 simple scoring, and the match types are also the same.
20114
20115
20116 @node Advanced Scoring Examples
20117 @subsection Advanced Scoring Examples
20118
20119 Please note that the following examples are score file rules.  To
20120 make a complete score file from them, surround them with another pair
20121 of parentheses.
20122
20123 Let's say you want to increase the score of articles written by Lars
20124 when he's talking about Gnus:
20125
20126 @example
20127 @group
20128 ((&
20129   ("from" "Lars Ingebrigtsen")
20130   ("subject" "Gnus"))
20131  1000)
20132 @end group
20133 @end example
20134
20135 Quite simple, huh?
20136
20137 When he writes long articles, he sometimes has something nice to say:
20138
20139 @example
20140 ((&
20141   ("from" "Lars Ingebrigtsen")
20142   (|
20143    ("subject" "Gnus")
20144    ("lines" 100 >)))
20145  1000)
20146 @end example
20147
20148 However, when he responds to things written by Reig Eigil Logge, you
20149 really don't want to read what he's written:
20150
20151 @example
20152 ((&
20153   ("from" "Lars Ingebrigtsen")
20154   (1- ("from" "Reig Eigir Logge")))
20155  -100000)
20156 @end example
20157
20158 Everybody that follows up Redmondo when he writes about disappearing
20159 socks should have their scores raised, but only when they talk about
20160 white socks.  However, when Lars talks about socks, it's usually not
20161 very interesting:
20162
20163 @example
20164 ((&
20165   (1-
20166    (&
20167     ("from" "redmondo@@.*no" r)
20168     ("body" "disappearing.*socks" t)))
20169   (! ("from" "Lars Ingebrigtsen"))
20170   ("body" "white.*socks"))
20171  1000)
20172 @end example
20173
20174 The possibilities are endless.
20175
20176
20177 @node Advanced Scoring Tips
20178 @subsection Advanced Scoring Tips
20179
20180 The @code{&} and @code{|} logical operators do short-circuit logic.
20181 That is, they stop processing their arguments when it's clear what the
20182 result of the operation will be.  For instance, if one of the arguments
20183 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20184 the rest of the arguments.  This means that you should put slow matches
20185 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20186 @samp{subject}) first.
20187
20188 The indirection arguments (@code{1-} and so on) will make their
20189 arguments work on previous generations of the thread.  If you say
20190 something like:
20191
20192 @example
20193 ...
20194 (1-
20195  (1-
20196   ("from" "lars")))
20197 ...
20198 @end example
20199
20200 Then that means "score on the from header of the grandparent of the
20201 current article".  An indirection is quite fast, but it's better to say:
20202
20203 @example
20204 (1-
20205  (&
20206   ("from" "Lars")
20207   ("subject" "Gnus")))
20208 @end example
20209
20210 than it is to say:
20211
20212 @example
20213 (&
20214  (1- ("from" "Lars"))
20215  (1- ("subject" "Gnus")))
20216 @end example
20217
20218
20219 @node Score Decays
20220 @section Score Decays
20221 @cindex score decays
20222 @cindex decays
20223
20224 You may find that your scores have a tendency to grow without
20225 bounds, especially if you're using adaptive scoring.  If scores get too
20226 big, they lose all meaning---they simply max out and it's difficult to
20227 use them in any sensible way.
20228
20229 @vindex gnus-decay-scores
20230 @findex gnus-decay-score
20231 @vindex gnus-decay-score-function
20232 Gnus provides a mechanism for decaying scores to help with this problem.
20233 When score files are loaded and @code{gnus-decay-scores} is
20234 non-@code{nil}, Gnus will run the score files through the decaying
20235 mechanism thereby lowering the scores of all non-permanent score rules.
20236 The decay itself if performed by the @code{gnus-decay-score-function}
20237 function, which is @code{gnus-decay-score} by default.  Here's the
20238 definition of that function:
20239
20240 @lisp
20241 (defun gnus-decay-score (score)
20242   "Decay SCORE.
20243 This is done according to `gnus-score-decay-constant'
20244 and `gnus-score-decay-scale'."
20245   (floor
20246    (- score
20247       (* (if (< score 0) 1 -1)
20248          (min (abs score)
20249               (max gnus-score-decay-constant
20250                    (* (abs score)
20251                       gnus-score-decay-scale)))))))
20252 @end lisp
20253
20254 @vindex gnus-score-decay-scale
20255 @vindex gnus-score-decay-constant
20256 @code{gnus-score-decay-constant} is 3 by default and
20257 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20258
20259 @enumerate
20260 @item
20261 Scores between -3 and 3 will be set to 0 when this function is called.
20262
20263 @item
20264 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20265
20266 @item
20267 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20268 score.
20269 @end enumerate
20270
20271 If you don't like this decay function, write your own.  It is called
20272 with the score to be decayed as its only parameter, and it should return
20273 the new score, which should be an integer.
20274
20275 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20276 four days, Gnus will decay the scores four times, for instance.
20277
20278 @iftex
20279 @iflatex
20280 @chapter Message
20281 @include message.texi
20282 @chapter Emacs MIME
20283 @include emacs-mime.texi
20284 @chapter Sieve
20285 @include sieve.texi
20286 @c @chapter PGG
20287 @c @include pgg.texi
20288 @end iflatex
20289 @end iftex
20290
20291 @node Various
20292 @chapter Various
20293
20294 @menu
20295 * Process/Prefix::              A convention used by many treatment commands.
20296 * Interactive::                 Making Gnus ask you many questions.
20297 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20298 * Formatting Variables::        You can specify what buffers should look like.
20299 * Window Layout::               Configuring the Gnus buffer windows.
20300 * Faces and Fonts::             How to change how faces look.
20301 * Compilation::                 How to speed Gnus up.
20302 * Mode Lines::                  Displaying information in the mode lines.
20303 * Highlighting and Menus::      Making buffers look all nice and cozy.
20304 * Buttons::                     Get tendinitis in ten easy steps!
20305 * Daemons::                     Gnus can do things behind your back.
20306 * NoCeM::                       How to avoid spam and other fatty foods.
20307 * Undo::                        Some actions can be undone.
20308 * Predicate Specifiers::        Specifying predicates.
20309 * Moderation::                  What to do if you're a moderator.
20310 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20311 * Fuzzy Matching::              What's the big fuzz?
20312 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20313 * Various Various::             Things that are really various.
20314 @end menu
20315
20316
20317 @node Process/Prefix
20318 @section Process/Prefix
20319 @cindex process/prefix convention
20320
20321 Many functions, among them functions for moving, decoding and saving
20322 articles, use what is known as the @dfn{Process/Prefix convention}.
20323
20324 This is a method for figuring out what articles the user wants the
20325 command to be performed on.
20326
20327 It goes like this:
20328
20329 If the numeric prefix is N, perform the operation on the next N
20330 articles, starting with the current one.  If the numeric prefix is
20331 negative, perform the operation on the previous N articles, starting
20332 with the current one.
20333
20334 @vindex transient-mark-mode
20335 If @code{transient-mark-mode} in non-@code{nil} and the region is
20336 active, all articles in the region will be worked upon.
20337
20338 If there is no numeric prefix, but some articles are marked with the
20339 process mark, perform the operation on the articles marked with
20340 the process mark.
20341
20342 If there is neither a numeric prefix nor any articles marked with the
20343 process mark, just perform the operation on the current article.
20344
20345 Quite simple, really, but it needs to be made clear so that surprises
20346 are avoided.
20347
20348 Commands that react to the process mark will push the current list of
20349 process marked articles onto a stack and will then clear all process
20350 marked articles.  You can restore the previous configuration with the
20351 @kbd{M P y} command (@pxref{Setting Process Marks}).
20352
20353 @vindex gnus-summary-goto-unread
20354 One thing that seems to shock & horrify lots of people is that, for
20355 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20356 Since each @kbd{d} (which marks the current article as read) by default
20357 goes to the next unread article after marking, this means that @kbd{3 d}
20358 will mark the next three unread articles as read, no matter what the
20359 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20360 @code{nil} for a more straightforward action.
20361
20362 Many commands do not use the process/prefix convention.  All commands
20363 that do explicitly say so in this manual.  To apply the process/prefix
20364 convention to commands that do not use it, you can use the @kbd{M-&}
20365 command.  For instance, to mark all the articles in the group as
20366 expirable, you could say @kbd{M P b M-& E}.
20367
20368
20369 @node Interactive
20370 @section Interactive
20371 @cindex interaction
20372
20373 @table @code
20374
20375 @item gnus-novice-user
20376 @vindex gnus-novice-user
20377 If this variable is non-@code{nil}, you are either a newcomer to the
20378 World of Usenet, or you are very cautious, which is a nice thing to be,
20379 really.  You will be given questions of the type ``Are you sure you want
20380 to do this?'' before doing anything dangerous.  This is @code{t} by
20381 default.
20382
20383 @item gnus-expert-user
20384 @vindex gnus-expert-user
20385 If this variable is non-@code{nil}, you will seldom be asked any
20386 questions by Gnus.  It will simply assume you know what you're doing, no
20387 matter how strange.
20388
20389 @item gnus-interactive-catchup
20390 @vindex gnus-interactive-catchup
20391 Require confirmation before catching up a group if non-@code{nil}.  It
20392 is @code{t} by default.
20393
20394 @item gnus-interactive-exit
20395 @vindex gnus-interactive-exit
20396 Require confirmation before exiting Gnus.  This variable is @code{t} by
20397 default.
20398 @end table
20399
20400
20401 @node Symbolic Prefixes
20402 @section Symbolic Prefixes
20403 @cindex symbolic prefixes
20404
20405 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20406 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20407 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20408 rule of 900 to the current article.
20409
20410 This is all nice and well, but what if you want to give a command some
20411 additional information?  Well, what most commands do is interpret the
20412 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20413 doesn't want a backup file to be created when saving the current buffer,
20414 for instance.  But what if you want to save without making a backup
20415 file, and you want Emacs to flash lights and play a nice tune at the
20416 same time?  You can't, and you're probably perfectly happy that way.
20417
20418 @kindex M-i (Summary)
20419 @findex gnus-symbolic-argument
20420 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20421 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20422 character typed in is the value.  You can stack as many @kbd{M-i}
20423 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20424 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20425 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20426 @code{b}''.  You get the drift.
20427
20428 Typing in symbolic prefixes to commands that don't accept them doesn't
20429 hurt, but it doesn't do any good either.  Currently not many Gnus
20430 functions make use of the symbolic prefix.
20431
20432 If you're interested in how Gnus implements this, @pxref{Extended
20433 Interactive}.
20434
20435
20436 @node Formatting Variables
20437 @section Formatting Variables
20438 @cindex formatting variables
20439
20440 Throughout this manual you've probably noticed lots of variables called
20441 things like @code{gnus-group-line-format} and
20442 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20443 output lines in the various buffers.  There's quite a lot of them.
20444 Fortunately, they all use the same syntax, so there's not that much to
20445 be annoyed by.
20446
20447 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20448 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20449 lots of percentages everywhere.
20450
20451 @menu
20452 * Formatting Basics::           A formatting variable is basically a format string.
20453 * Mode Line Formatting::        Some rules about mode line formatting variables.
20454 * Advanced Formatting::         Modifying output in various ways.
20455 * User-Defined Specs::          Having Gnus call your own functions.
20456 * Formatting Fonts::            Making the formatting look colorful and nice.
20457 * Positioning Point::           Moving point to a position after an operation.
20458 * Tabulation::                  Tabulating your output.
20459 * Wide Characters::             Dealing with wide characters.
20460 @end menu
20461
20462 Currently Gnus uses the following formatting variables:
20463 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20464 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20465 @code{gnus-group-mode-line-format},
20466 @code{gnus-summary-mode-line-format},
20467 @code{gnus-article-mode-line-format},
20468 @code{gnus-server-mode-line-format}, and
20469 @code{gnus-summary-pick-line-format}.
20470
20471 All these format variables can also be arbitrary elisp forms.  In that
20472 case, they will be @code{eval}ed to insert the required lines.
20473
20474 @kindex M-x gnus-update-format
20475 @findex gnus-update-format
20476 Gnus includes a command to help you while creating your own format
20477 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20478 update the spec in question and pop you to a buffer where you can
20479 examine the resulting Lisp code to be run to generate the line.
20480
20481
20482
20483 @node Formatting Basics
20484 @subsection Formatting Basics
20485
20486 Each @samp{%} element will be replaced by some string or other when the
20487 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20488 spec, and pad with spaces to get a 5-character field''.
20489
20490 As with normal C and Emacs Lisp formatting strings, the numerical
20491 modifier between the @samp{%} and the formatting type character will
20492 @dfn{pad} the output so that it is always at least that long.
20493 @samp{%5y} will make the field always (at least) five characters wide by
20494 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20495 the right instead.
20496
20497 You may also wish to limit the length of the field to protect against
20498 particularly wide values.  For that you can say @samp{%4,6y}, which
20499 means that the field will never be more than 6 characters wide and never
20500 less than 4 characters wide.
20501
20502 Also Gnus supports some extended format specifications, such as
20503 @samp{%&user-date;}.
20504
20505
20506 @node Mode Line Formatting
20507 @subsection Mode Line Formatting
20508
20509 Mode line formatting variables (e.g.,
20510 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20511 buffer line oriented formatting variables (@pxref{Formatting Basics})
20512 with the following two differences:
20513
20514 @enumerate
20515
20516 @item
20517 There must be no newline (@samp{\n}) at the end.
20518
20519 @item
20520 The special @samp{%%b} spec can be used to display the buffer name.
20521 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20522 @samp{%} to allow it to pass through the formatting machinery unmangled,
20523 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20524 display interprets to mean ``show the buffer name''.  For a full list of
20525 mode line specs Emacs understands, see the documentation of the
20526 @code{mode-line-format} variable.
20527
20528 @end enumerate
20529
20530
20531 @node Advanced Formatting
20532 @subsection Advanced Formatting
20533
20534 It is frequently useful to post-process the fields in some way.
20535 Padding, limiting, cutting off parts and suppressing certain values can
20536 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20537 look like @samp{%~(cut 3)~(ignore "0")y}.
20538
20539 These are the valid modifiers:
20540
20541 @table @code
20542 @item pad
20543 @itemx pad-left
20544 Pad the field to the left with spaces until it reaches the required
20545 length.
20546
20547 @item pad-right
20548 Pad the field to the right with spaces until it reaches the required
20549 length.
20550
20551 @item max
20552 @itemx max-left
20553 Cut off characters from the left until it reaches the specified length.
20554
20555 @item max-right
20556 Cut off characters from the right until it reaches the specified
20557 length.
20558
20559 @item cut
20560 @itemx cut-left
20561 Cut off the specified number of characters from the left.
20562
20563 @item cut-right
20564 Cut off the specified number of characters from the right.
20565
20566 @item ignore
20567 Return an empty string if the field is equal to the specified value.
20568
20569 @item form
20570 Use the specified form as the field value when the @samp{@@} spec is
20571 used.
20572
20573 Here's an example:
20574
20575 @lisp
20576 "~(form (current-time-string))@@"
20577 @end lisp
20578
20579 @end table
20580
20581 Let's take an example.  The @samp{%o} spec in the summary mode lines
20582 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20583 This is quite a mouthful, so we want to shave off the century number and
20584 the time, leaving us with a six-character date.  That would be
20585 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20586 maxing, and we need the padding to ensure that the date is never less
20587 than 6 characters to make it look nice in columns.)
20588
20589 Ignoring is done first; then cutting; then maxing; and then as the very
20590 last operation, padding.
20591
20592 @vindex gnus-compile-user-specs
20593 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
20594 default) with your strong personality, and use a lots of these advanced
20595 thingies, you'll find that Gnus gets quite slow.  This can be helped
20596 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
20597 the look of your lines.
20598 @xref{Compilation}.
20599
20600
20601 @node User-Defined Specs
20602 @subsection User-Defined Specs
20603
20604 All the specs allow for inserting user defined specifiers---@samp{u}.
20605 The next character in the format string should be a letter.  Gnus
20606 will call the function @code{gnus-user-format-function-}@samp{X}, where
20607 @samp{X} is the letter following @samp{%u}.  The function will be passed
20608 a single parameter---what the parameter means depends on what buffer
20609 it's being called from.  The function should return a string, which will
20610 be inserted into the buffer just like information from any other
20611 specifier.  This function may also be called with dummy values, so it
20612 should protect against that.
20613
20614 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20615 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20616
20617 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20618 much the same without defining new functions.  Here's an example:
20619 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20620 given here will be evaluated to yield the current line number, and then
20621 inserted.
20622
20623
20624 @node Formatting Fonts
20625 @subsection Formatting Fonts
20626
20627 There are specs for highlighting, and these are shared by all the format
20628 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20629 the special @code{mouse-face} property set, which means that it will be
20630 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20631 over it.
20632
20633 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20634 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20635 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20636 and so on.  Create as many faces as you wish.  The same goes for the
20637 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20638 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20639
20640 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20641 special @code{balloon-help} property set to
20642 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20643 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20644 variables should be either strings or symbols naming functions that
20645 return a string.  When the mouse passes over text with this property
20646 set, a balloon window will appear and display the string.  Please
20647 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20648 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20649 XEmacs) for more information on this.  (For technical reasons, the
20650 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20651 paragraph.)
20652
20653 Here's an alternative recipe for the group buffer:
20654
20655 @lisp
20656 ;; @r{Create three face types.}
20657 (setq gnus-face-1 'bold)
20658 (setq gnus-face-3 'italic)
20659
20660 ;; @r{We want the article count to be in}
20661 ;; @r{a bold and green face.  So we create}
20662 ;; @r{a new face called @code{my-green-bold}.}
20663 (copy-face 'bold 'my-green-bold)
20664 ;; @r{Set the color.}
20665 (set-face-foreground 'my-green-bold "ForestGreen")
20666 (setq gnus-face-2 'my-green-bold)
20667
20668 ;; @r{Set the new & fancy format.}
20669 (setq gnus-group-line-format
20670       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20671 @end lisp
20672
20673 I'm sure you'll be able to use this scheme to create totally unreadable
20674 and extremely vulgar displays.  Have fun!
20675
20676 Note that the @samp{%(} specs (and friends) do not make any sense on the
20677 mode-line variables.
20678
20679 @node Positioning Point
20680 @subsection Positioning Point
20681
20682 Gnus usually moves point to a pre-defined place on each line in most
20683 buffers.  By default, point move to the first colon character on the
20684 line.  You can customize this behaviour in three different ways.
20685
20686 You can move the colon character to somewhere else on the line.
20687
20688 @findex gnus-goto-colon
20689 You can redefine the function that moves the point to the colon.  The
20690 function is called @code{gnus-goto-colon}.
20691
20692 But perhaps the most convenient way to deal with this, if you don't want
20693 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20694 put a @samp{%*} somewhere in your format line definition, Gnus will
20695 place point there.
20696
20697
20698 @node Tabulation
20699 @subsection Tabulation
20700
20701 You can usually line up your displays by padding and cutting your
20702 strings.  However, when combining various strings of different size, it
20703 can often be more convenient to just output the strings, and then worry
20704 about lining up the following text afterwards.
20705
20706 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20707 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20708
20709 @samp{%50=} will insert space characters to pad the line up to column
20710 50.  If the text is already past column 50, nothing will be inserted.
20711 This is the soft tabulator.
20712
20713 @samp{%-50=} will insert space characters to pad the line up to column
20714 50.  If the text is already past column 50, the excess text past column
20715 50 will be removed.  This is the hard tabulator.
20716
20717
20718 @node Wide Characters
20719 @subsection Wide Characters
20720
20721 Fixed width fonts in most countries have characters of the same width.
20722 Some countries, however, use Latin characters mixed with wider
20723 characters---most notable East Asian countries.
20724
20725 The problem is that when formatting, Gnus assumes that if a string is 10
20726 characters wide, it'll be 10 Latin characters wide on the screen.  In
20727 these countries, that's not true.
20728
20729 @vindex gnus-use-correct-string-widths
20730 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20731 @code{t}.  This makes buffer generation slower, but the results will be
20732 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20733 for Emacs.
20734
20735
20736 @node Window Layout
20737 @section Window Layout
20738 @cindex window layout
20739
20740 No, there's nothing here about X, so be quiet.
20741
20742 @vindex gnus-use-full-window
20743 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20744 other windows and occupy the entire Emacs screen by itself.  It is
20745 @code{t} by default.
20746
20747 Setting this variable to @code{nil} kinda works, but there are
20748 glitches.  Use at your own peril.
20749
20750 @vindex gnus-buffer-configuration
20751 @code{gnus-buffer-configuration} describes how much space each Gnus
20752 buffer should be given.  Here's an excerpt of this variable:
20753
20754 @lisp
20755 ((group (vertical 1.0 (group 1.0 point)
20756                       (if gnus-carpal (group-carpal 4))))
20757  (article (vertical 1.0 (summary 0.25 point)
20758                         (article 1.0))))
20759 @end lisp
20760
20761 This is an alist.  The @dfn{key} is a symbol that names some action or
20762 other.  For instance, when displaying the group buffer, the window
20763 configuration function will use @code{group} as the key.  A full list of
20764 possible names is listed below.
20765
20766 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20767 should occupy.  To take the @code{article} split as an example -
20768
20769 @lisp
20770 (article (vertical 1.0 (summary 0.25 point)
20771                        (article 1.0)))
20772 @end lisp
20773
20774 This @dfn{split} says that the summary buffer should occupy 25% of upper
20775 half of the screen, and that it is placed over the article buffer.  As
20776 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20777 reaching for that calculator there).  However, the special number
20778 @code{1.0} is used to signal that this buffer should soak up all the
20779 rest of the space available after the rest of the buffers have taken
20780 whatever they need.  There should be only one buffer with the @code{1.0}
20781 size spec per split.
20782
20783 Point will be put in the buffer that has the optional third element
20784 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20785 split where the tag @code{frame-focus} is a member (i.e. is the third or
20786 fourth element in the list, depending on whether the @code{point} tag is
20787 present) gets focus.
20788
20789 Here's a more complicated example:
20790
20791 @lisp
20792 (article (vertical 1.0 (group 4)
20793                        (summary 0.25 point)
20794                        (if gnus-carpal (summary-carpal 4))
20795                        (article 1.0)))
20796 @end lisp
20797
20798 If the size spec is an integer instead of a floating point number,
20799 then that number will be used to say how many lines a buffer should
20800 occupy, not a percentage.
20801
20802 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20803 precise---if the @code{car} of the split is a function or a subr), this
20804 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20805 be used as a split.  This means that there will be three buffers if
20806 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20807 is non-@code{nil}.
20808
20809 Not complicated enough for you?  Well, try this on for size:
20810
20811 @lisp
20812 (article (horizontal 1.0
20813              (vertical 0.5
20814                  (group 1.0)
20815                  (gnus-carpal 4))
20816              (vertical 1.0
20817                  (summary 0.25 point)
20818                  (summary-carpal 4)
20819                  (article 1.0))))
20820 @end lisp
20821
20822 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20823 @code{horizontal} thingie?
20824
20825 If the first element in one of the split is @code{horizontal}, Gnus will
20826 split the window horizontally, giving you two windows side-by-side.
20827 Inside each of these strips you may carry on all you like in the normal
20828 fashion.  The number following @code{horizontal} says what percentage of
20829 the screen is to be given to this strip.
20830
20831 For each split, there @emph{must} be one element that has the 100% tag.
20832 The splitting is never accurate, and this buffer will eat any leftover
20833 lines from the splits.
20834
20835 To be slightly more formal, here's a definition of what a valid split
20836 may look like:
20837
20838 @example
20839 @group
20840 split      = frame | horizontal | vertical | buffer | form
20841 frame      = "(frame " size *split ")"
20842 horizontal = "(horizontal " size *split ")"
20843 vertical   = "(vertical " size *split ")"
20844 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20845 size       = number | frame-params
20846 buf-name   = group | article | summary ...
20847 @end group
20848 @end example
20849
20850 The limitations are that the @code{frame} split can only appear as the
20851 top-level split.  @var{form} should be an Emacs Lisp form that should
20852 return a valid split.  We see that each split is fully recursive, and
20853 may contain any number of @code{vertical} and @code{horizontal} splits.
20854
20855 @vindex gnus-window-min-width
20856 @vindex gnus-window-min-height
20857 @cindex window height
20858 @cindex window width
20859 Finding the right sizes can be a bit complicated.  No window may be less
20860 than @code{gnus-window-min-height} (default 1) characters high, and all
20861 windows must be at least @code{gnus-window-min-width} (default 1)
20862 characters wide.  Gnus will try to enforce this before applying the
20863 splits.  If you want to use the normal Emacs window width/height limit,
20864 you can just set these two variables to @code{nil}.
20865
20866 If you're not familiar with Emacs terminology, @code{horizontal} and
20867 @code{vertical} splits may work the opposite way of what you'd expect.
20868 Windows inside a @code{horizontal} split are shown side-by-side, and
20869 windows within a @code{vertical} split are shown above each other.
20870
20871 @findex gnus-configure-frame
20872 If you want to experiment with window placement, a good tip is to call
20873 @code{gnus-configure-frame} directly with a split.  This is the function
20874 that does all the real work when splitting buffers.  Below is a pretty
20875 nonsensical configuration with 5 windows; two for the group buffer and
20876 three for the article buffer.  (I said it was nonsensical.)  If you
20877 @code{eval} the statement below, you can get an idea of how that would
20878 look straight away, without going through the normal Gnus channels.
20879 Play with it until you're satisfied, and then use
20880 @code{gnus-add-configuration} to add your new creation to the buffer
20881 configuration list.
20882
20883 @lisp
20884 (gnus-configure-frame
20885  '(horizontal 1.0
20886     (vertical 10
20887       (group 1.0)
20888       (article 0.3 point))
20889     (vertical 1.0
20890       (article 1.0)
20891       (horizontal 4
20892         (group 1.0)
20893         (article 10)))))
20894 @end lisp
20895
20896 You might want to have several frames as well.  No prob---just use the
20897 @code{frame} split:
20898
20899 @lisp
20900 (gnus-configure-frame
20901  '(frame 1.0
20902          (vertical 1.0
20903                    (summary 0.25 point frame-focus)
20904                    (article 1.0))
20905          (vertical ((height . 5) (width . 15)
20906                     (user-position . t)
20907                     (left . -1) (top . 1))
20908                    (picon 1.0))))
20909
20910 @end lisp
20911
20912 This split will result in the familiar summary/article window
20913 configuration in the first (or ``main'') frame, while a small additional
20914 frame will be created where picons will be shown.  As you can see,
20915 instead of the normal @code{1.0} top-level spec, each additional split
20916 should have a frame parameter alist as the size spec.
20917 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20918 Reference Manual}.  Under XEmacs, a frame property list will be
20919 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20920 is such a plist.
20921 The list of all possible keys for @code{gnus-buffer-configuration} can
20922 be found in its default value.
20923
20924 Note that the @code{message} key is used for both
20925 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20926 it is desirable to distinguish between the two, something like this
20927 might be used:
20928
20929 @lisp
20930 (message (horizontal 1.0
20931                      (vertical 1.0 (message 1.0 point))
20932                      (vertical 0.24
20933                                (if (buffer-live-p gnus-summary-buffer)
20934                                    '(summary 0.5))
20935                                (group 1.0))))
20936 @end lisp
20937
20938 One common desire for a multiple frame split is to have a separate frame
20939 for composing mail and news while leaving the original frame intact.  To
20940 accomplish that, something like the following can be done:
20941
20942 @lisp
20943 (message
20944   (frame 1.0
20945          (if (not (buffer-live-p gnus-summary-buffer))
20946              (car (cdr (assoc 'group gnus-buffer-configuration)))
20947            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20948          (vertical ((user-position . t) (top . 1) (left . 1)
20949                     (name . "Message"))
20950                    (message 1.0 point))))
20951 @end lisp
20952
20953 @findex gnus-add-configuration
20954 Since the @code{gnus-buffer-configuration} variable is so long and
20955 complicated, there's a function you can use to ease changing the config
20956 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20957 you want to change the @code{article} setting, you could say:
20958
20959 @lisp
20960 (gnus-add-configuration
20961  '(article (vertical 1.0
20962                (group 4)
20963                (summary .25 point)
20964                (article 1.0))))
20965 @end lisp
20966
20967 You'd typically stick these @code{gnus-add-configuration} calls in your
20968 @file{~/.gnus.el} file or in some startup hook---they should be run after
20969 Gnus has been loaded.
20970
20971 @vindex gnus-always-force-window-configuration
20972 If all windows mentioned in the configuration are already visible, Gnus
20973 won't change the window configuration.  If you always want to force the
20974 ``right'' window configuration, you can set
20975 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20976
20977 If you're using tree displays (@pxref{Tree Display}), and the tree
20978 window is displayed vertically next to another window, you may also want
20979 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20980 windows resized.
20981
20982 @subsection Example Window Configurations
20983
20984 @itemize @bullet
20985 @item
20986 Narrow left hand side occupied by group buffer.  Right hand side split
20987 between summary buffer (top one-sixth) and article buffer (bottom).
20988
20989 @ifinfo
20990 @example
20991 +---+---------+
20992 | G | Summary |
20993 | r +---------+
20994 | o |         |
20995 | u | Article |
20996 | p |         |
20997 +---+---------+
20998 @end example
20999 @end ifinfo
21000
21001 @lisp
21002 (gnus-add-configuration
21003  '(article
21004    (horizontal 1.0
21005                (vertical 25 (group 1.0))
21006                (vertical 1.0
21007                          (summary 0.16 point)
21008                          (article 1.0)))))
21009
21010 (gnus-add-configuration
21011  '(summary
21012    (horizontal 1.0
21013                (vertical 25 (group 1.0))
21014                (vertical 1.0 (summary 1.0 point)))))
21015 @end lisp
21016
21017 @end itemize
21018
21019
21020 @node Faces and Fonts
21021 @section Faces and Fonts
21022 @cindex faces
21023 @cindex fonts
21024 @cindex colors
21025
21026 Fiddling with fonts and faces used to be very difficult, but these days
21027 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21028 the face you want to alter, and alter it via the standard Customize
21029 interface.
21030
21031
21032 @node Compilation
21033 @section Compilation
21034 @cindex compilation
21035 @cindex byte-compilation
21036
21037 @findex gnus-compile
21038
21039 Remember all those line format specification variables?
21040 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21041 on.  By default, T-gnus will use the byte-compiled codes of these
21042 variables and we can keep a slow-down to a minimum.  However, if you set
21043 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
21044 unfortunately, changing them will mean a quite significant slow-down.
21045 (The default values of these variables have byte-compiled functions
21046 associated with them, while the user-generated versions do not, of
21047 course.)
21048
21049 To help with this, you can run @kbd{M-x gnus-compile} after you've
21050 fiddled around with the variables and feel that you're (kind of)
21051 satisfied.  This will result in the new specs being byte-compiled, and
21052 you'll get top speed again.  Note that T-gnus will not save these
21053 compiled specs in the @file{.newsrc.eld} file.
21054
21055 @table @code
21056 @item gnus-compile-user-specs
21057 @vindex gnus-compile-user-specs
21058 If it is non-nil, the user-defined format specs will be byte-compiled
21059 automatically.  The default value of this variable is @code{t}.  It has
21060 an effect on the values of @code{gnus-*-line-format-spec}.
21061 @end table
21062
21063
21064 @node Mode Lines
21065 @section Mode Lines
21066 @cindex mode lines
21067
21068 @vindex gnus-updated-mode-lines
21069 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21070 lines updated.  It is a list of symbols.  Supported symbols include
21071 @code{group}, @code{article}, @code{summary}, @code{server},
21072 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21073 Gnus will keep that mode line updated with information that may be
21074 pertinent.  If this variable is @code{nil}, screen refresh may be
21075 quicker.
21076
21077 @cindex display-time
21078
21079 @vindex gnus-mode-non-string-length
21080 By default, Gnus displays information on the current article in the mode
21081 lines of the summary and article buffers.  The information Gnus wishes
21082 to display (e.g. the subject of the article) is often longer than the
21083 mode lines, and therefore have to be cut off at some point.  The
21084 @code{gnus-mode-non-string-length} variable says how long the other
21085 elements on the line is (i.e., the non-info part).  If you put
21086 additional elements on the mode line (e.g. a clock), you should modify
21087 this variable:
21088
21089 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21090 @lisp
21091 (add-hook 'display-time-hook
21092           (lambda () (setq gnus-mode-non-string-length
21093                            (+ 21
21094                               (if line-number-mode 5 0)
21095                               (if column-number-mode 4 0)
21096                               (length display-time-string)))))
21097 @end lisp
21098
21099 If this variable is @code{nil} (which is the default), the mode line
21100 strings won't be chopped off, and they won't be padded either.  Note
21101 that the default is unlikely to be desirable, as even the percentage
21102 complete in the buffer may be crowded off the mode line; the user should
21103 configure this variable appropriately for her configuration.
21104
21105
21106 @node Highlighting and Menus
21107 @section Highlighting and Menus
21108 @cindex visual
21109 @cindex highlighting
21110 @cindex menus
21111
21112 @vindex gnus-visual
21113 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21114 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21115 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21116 file.
21117
21118 This variable can be a list of visual properties that are enabled.  The
21119 following elements are valid, and are all included by default:
21120
21121 @table @code
21122 @item group-highlight
21123 Do highlights in the group buffer.
21124 @item summary-highlight
21125 Do highlights in the summary buffer.
21126 @item article-highlight
21127 Do highlights in the article buffer.
21128 @item highlight
21129 Turn on highlighting in all buffers.
21130 @item group-menu
21131 Create menus in the group buffer.
21132 @item summary-menu
21133 Create menus in the summary buffers.
21134 @item article-menu
21135 Create menus in the article buffer.
21136 @item browse-menu
21137 Create menus in the browse buffer.
21138 @item server-menu
21139 Create menus in the server buffer.
21140 @item score-menu
21141 Create menus in the score buffers.
21142 @item menu
21143 Create menus in all buffers.
21144 @end table
21145
21146 So if you only want highlighting in the article buffer and menus in all
21147 buffers, you could say something like:
21148
21149 @lisp
21150 (setq gnus-visual '(article-highlight menu))
21151 @end lisp
21152
21153 If you want highlighting only and no menus whatsoever, you'd say:
21154
21155 @lisp
21156 (setq gnus-visual '(highlight))
21157 @end lisp
21158
21159 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21160 in all Gnus buffers.
21161
21162 Other general variables that influence the look of all buffers include:
21163
21164 @table @code
21165 @item gnus-mouse-face
21166 @vindex gnus-mouse-face
21167 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21168 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21169
21170 @end table
21171
21172 There are hooks associated with the creation of all the different menus:
21173
21174 @table @code
21175
21176 @item gnus-article-menu-hook
21177 @vindex gnus-article-menu-hook
21178 Hook called after creating the article mode menu.
21179
21180 @item gnus-group-menu-hook
21181 @vindex gnus-group-menu-hook
21182 Hook called after creating the group mode menu.
21183
21184 @item gnus-summary-menu-hook
21185 @vindex gnus-summary-menu-hook
21186 Hook called after creating the summary mode menu.
21187
21188 @item gnus-server-menu-hook
21189 @vindex gnus-server-menu-hook
21190 Hook called after creating the server mode menu.
21191
21192 @item gnus-browse-menu-hook
21193 @vindex gnus-browse-menu-hook
21194 Hook called after creating the browse mode menu.
21195
21196 @item gnus-score-menu-hook
21197 @vindex gnus-score-menu-hook
21198 Hook called after creating the score mode menu.
21199
21200 @end table
21201
21202
21203 @node Buttons
21204 @section Buttons
21205 @cindex buttons
21206 @cindex mouse
21207 @cindex click
21208
21209 Those new-fangled @dfn{mouse} contraptions is very popular with the
21210 young, hep kids who don't want to learn the proper way to do things
21211 these days.  Why, I remember way back in the summer of '89, when I was
21212 using Emacs on a Tops 20 system.  Three hundred users on one single
21213 machine, and every user was running Simula compilers.  Bah!
21214
21215 Right.
21216
21217 @vindex gnus-carpal
21218 Well, you can make Gnus display bufferfuls of buttons you can click to
21219 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21220 really.  Tell the chiropractor I sent you.
21221
21222
21223 @table @code
21224
21225 @item gnus-carpal-mode-hook
21226 @vindex gnus-carpal-mode-hook
21227 Hook run in all carpal mode buffers.
21228
21229 @item gnus-carpal-button-face
21230 @vindex gnus-carpal-button-face
21231 Face used on buttons.
21232
21233 @item gnus-carpal-header-face
21234 @vindex gnus-carpal-header-face
21235 Face used on carpal buffer headers.
21236
21237 @item gnus-carpal-group-buffer-buttons
21238 @vindex gnus-carpal-group-buffer-buttons
21239 Buttons in the group buffer.
21240
21241 @item gnus-carpal-summary-buffer-buttons
21242 @vindex gnus-carpal-summary-buffer-buttons
21243 Buttons in the summary buffer.
21244
21245 @item gnus-carpal-server-buffer-buttons
21246 @vindex gnus-carpal-server-buffer-buttons
21247 Buttons in the server buffer.
21248
21249 @item gnus-carpal-browse-buffer-buttons
21250 @vindex gnus-carpal-browse-buffer-buttons
21251 Buttons in the browse buffer.
21252 @end table
21253
21254 All the @code{buttons} variables are lists.  The elements in these list
21255 are either cons cells where the @code{car} contains a text to be displayed and
21256 the @code{cdr} contains a function symbol, or a simple string.
21257
21258
21259 @node Daemons
21260 @section Daemons
21261 @cindex demons
21262 @cindex daemons
21263
21264 Gnus, being larger than any program ever written (allegedly), does lots
21265 of strange stuff that you may wish to have done while you're not
21266 present.  For instance, you may want it to check for new mail once in a
21267 while.  Or you may want it to close down all connections to all servers
21268 when you leave Emacs idle.  And stuff like that.
21269
21270 Gnus will let you do stuff like that by defining various
21271 @dfn{handlers}.  Each handler consists of three elements:  A
21272 @var{function}, a @var{time}, and an @var{idle} parameter.
21273
21274 Here's an example of a handler that closes connections when Emacs has
21275 been idle for thirty minutes:
21276
21277 @lisp
21278 (gnus-demon-close-connections nil 30)
21279 @end lisp
21280
21281 Here's a handler that scans for @acronym{PGP} headers every hour when
21282 Emacs is idle:
21283
21284 @lisp
21285 (gnus-demon-scan-pgp 60 t)
21286 @end lisp
21287
21288 This @var{time} parameter and that @var{idle} parameter work together
21289 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21290 @code{nil}, then the function will be called every @var{time} minutes.
21291
21292 If @var{idle} is @code{t}, then the function will be called after
21293 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21294 the function will never be called.  But once Emacs goes idle, the
21295 function will be called every @var{time} minutes.
21296
21297 If @var{idle} is a number and @var{time} is a number, the function will
21298 be called every @var{time} minutes only when Emacs has been idle for
21299 @var{idle} minutes.
21300
21301 If @var{idle} is a number and @var{time} is @code{nil}, the function
21302 will be called once every time Emacs has been idle for @var{idle}
21303 minutes.
21304
21305 And if @var{time} is a string, it should look like @samp{07:31}, and
21306 the function will then be called once every day somewhere near that
21307 time.  Modified by the @var{idle} parameter, of course.
21308
21309 @vindex gnus-demon-timestep
21310 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21311 seconds.  This is 60 by default.  If you change that variable,
21312 all the timings in the handlers will be affected.)
21313
21314 So, if you want to add a handler, you could put something like this in
21315 your @file{~/.gnus.el} file:
21316
21317 @findex gnus-demon-add-handler
21318 @lisp
21319 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21320 @end lisp
21321
21322 @findex gnus-demon-add-nocem
21323 @findex gnus-demon-add-scanmail
21324 @findex gnus-demon-add-rescan
21325 @findex gnus-demon-add-scan-timestamps
21326 @findex gnus-demon-add-disconnection
21327 Some ready-made functions to do this have been created:
21328 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21329 @code{gnus-demon-add-nntp-close-connection},
21330 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21331 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21332 @file{~/.gnus.el} if you want those abilities.
21333
21334 @findex gnus-demon-init
21335 @findex gnus-demon-cancel
21336 @vindex gnus-demon-handlers
21337 If you add handlers to @code{gnus-demon-handlers} directly, you should
21338 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21339 daemons, you can use the @code{gnus-demon-cancel} function.
21340
21341 Note that adding daemons can be pretty naughty if you over do it.  Adding
21342 functions that scan all news and mail from all servers every two seconds
21343 is a sure-fire way of getting booted off any respectable system.  So
21344 behave.
21345
21346
21347 @node NoCeM
21348 @section NoCeM
21349 @cindex nocem
21350 @cindex spam
21351
21352 @dfn{Spamming} is posting the same article lots and lots of times.
21353 Spamming is bad.  Spamming is evil.
21354
21355 Spamming is usually canceled within a day or so by various anti-spamming
21356 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21357 NoCeM is pronounced ``no see-'em'', and means what the name
21358 implies---these are messages that make the offending articles, like, go
21359 away.
21360
21361 What use are these NoCeM messages if the articles are canceled anyway?
21362 Some sites do not honor cancel messages and some sites just honor cancels
21363 from a select few people.  Then you may wish to make use of the NoCeM
21364 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21365
21366 Gnus can read and parse the messages in this group automatically, and
21367 this will make spam disappear.
21368
21369 There are some variables to customize, of course:
21370
21371 @table @code
21372 @item gnus-use-nocem
21373 @vindex gnus-use-nocem
21374 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21375 by default.
21376
21377 @item gnus-nocem-groups
21378 @vindex gnus-nocem-groups
21379 Gnus will look for NoCeM messages in the groups in this list.  The
21380 default is
21381 @lisp
21382 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21383  "alt.nocem.misc" "news.admin.net-abuse.announce")
21384 @end lisp
21385
21386 @item gnus-nocem-issuers
21387 @vindex gnus-nocem-issuers
21388 There are many people issuing NoCeM messages.  This list says what
21389 people you want to listen to.  The default is
21390 @lisp
21391 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21392  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21393 @end lisp
21394 fine, upstanding citizens all of them.
21395
21396 Known despammers that you can put in this list are listed at@*
21397 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21398
21399 You do not have to heed NoCeM messages from all these people---just the
21400 ones you want to listen to.  You also don't have to accept all NoCeM
21401 messages from the people you like.  Each NoCeM message has a @dfn{type}
21402 header that gives the message a (more or less, usually less) rigorous
21403 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21404 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21405 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21406 Each condition is either a string (which is a regexp that matches types
21407 you want to use) or a list on the form @code{(not @var{string})}, where
21408 @var{string} is a regexp that matches types you don't want to use.
21409
21410 For instance, if you want all NoCeM messages from Chris Lewis except his
21411 @samp{troll} messages, you'd say:
21412
21413 @lisp
21414 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21415 @end lisp
21416
21417 On the other hand, if you just want nothing but his @samp{spam} and
21418 @samp{spew} messages, you'd say:
21419
21420 @lisp
21421 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21422 @end lisp
21423
21424 The specs are applied left-to-right.
21425
21426
21427 @item gnus-nocem-verifyer
21428 @vindex gnus-nocem-verifyer
21429 @findex mc-verify
21430 This should be a function for verifying that the NoCeM issuer is who she
21431 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21432 function.  If this is too slow and you don't care for verification
21433 (which may be dangerous), you can set this variable to @code{nil}.
21434
21435 If you want signed NoCeM messages to be verified and unsigned messages
21436 not to be verified (but used anyway), you could do something like:
21437
21438 @lisp
21439 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21440
21441 (defun my-gnus-mc-verify ()
21442   (not (eq 'forged
21443            (ignore-errors
21444              (if (mc-verify)
21445                  t
21446                'forged)))))
21447 @end lisp
21448
21449 This might be dangerous, though.
21450
21451 @item gnus-nocem-directory
21452 @vindex gnus-nocem-directory
21453 This is where Gnus will store its NoCeM cache files.  The default is@*
21454 @file{~/News/NoCeM/}.
21455
21456 @item gnus-nocem-expiry-wait
21457 @vindex gnus-nocem-expiry-wait
21458 The number of days before removing old NoCeM entries from the cache.
21459 The default is 15.  If you make it shorter Gnus will be faster, but you
21460 might then see old spam.
21461
21462 @item gnus-nocem-check-from
21463 @vindex gnus-nocem-check-from
21464 Non-@code{nil} means check for valid issuers in message bodies.
21465 Otherwise don't bother fetching articles unless their author matches a
21466 valid issuer; that is much faster if you are selective about the
21467 issuers.
21468
21469 @item gnus-nocem-check-article-limit
21470 @vindex gnus-nocem-check-article-limit
21471 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21472 group.  NoCeM groups can be huge and very slow to process.
21473
21474 @end table
21475
21476 Using NoCeM could potentially be a memory hog.  If you have many living
21477 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21478 big.  If this is a problem, you should kill off all (or most) of your
21479 unsubscribed groups (@pxref{Subscription Commands}).
21480
21481
21482 @node Undo
21483 @section Undo
21484 @cindex undo
21485
21486 It is very useful to be able to undo actions one has done.  In normal
21487 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21488 In Gnus buffers, however, it isn't that simple.
21489
21490 The things Gnus displays in its buffer is of no value whatsoever to
21491 Gnus---it's all just data designed to look nice to the user.
21492 Killing a group in the group buffer with @kbd{C-k} makes the line
21493 disappear, but that's just a side-effect of the real action---the
21494 removal of the group in question from the internal Gnus structures.
21495 Undoing something like that can't be done by the normal Emacs
21496 @code{undo} function.
21497
21498 Gnus tries to remedy this somewhat by keeping track of what the user
21499 does and coming up with actions that would reverse the actions the user
21500 takes.  When the user then presses the @code{undo} key, Gnus will run
21501 the code to reverse the previous action, or the previous actions.
21502 However, not all actions are easily reversible, so Gnus currently offers
21503 a few key functions to be undoable.  These include killing groups,
21504 yanking groups, and changing the list of read articles of groups.
21505 That's it, really.  More functions may be added in the future, but each
21506 added function means an increase in data to be stored, so Gnus will
21507 never be totally undoable.
21508
21509 @findex gnus-undo-mode
21510 @vindex gnus-use-undo
21511 @findex gnus-undo
21512 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21513 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21514 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21515 command, which should feel kinda like the normal Emacs @code{undo}
21516 command.
21517
21518
21519 @node Predicate Specifiers
21520 @section Predicate Specifiers
21521 @cindex predicate specifiers
21522
21523 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21524 form that allows flexible specification of predicates without having
21525 to type all that much.
21526
21527 These specifiers are lists consisting of functions, symbols and lists.
21528
21529 Here's an example:
21530
21531 @lisp
21532 (or gnus-article-unseen-p
21533     gnus-article-unread-p)
21534 @end lisp
21535
21536 The available symbols are @code{or}, @code{and} and @code{not}.  The
21537 functions all take one parameter.
21538
21539 @findex gnus-make-predicate
21540 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21541 to create a function that can be called.  This input parameter to this
21542 function will be passed along to all the functions in the predicate
21543 specifier.
21544
21545
21546 @node Moderation
21547 @section Moderation
21548 @cindex moderation
21549
21550 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21551 It is not included in the standard Gnus package.  Write a mail to
21552 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21553 get a copy.
21554
21555 The moderation package is implemented as a minor mode for summary
21556 buffers.  Put
21557
21558 @lisp
21559 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21560 @end lisp
21561
21562 in your @file{~/.gnus.el} file.
21563
21564 If you are the moderator of @samp{rec.zoofle}, this is how it's
21565 supposed to work:
21566
21567 @enumerate
21568 @item
21569 You split your incoming mail by matching on
21570 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21571 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21572
21573 @item
21574 You enter that group once in a while and post articles using the @kbd{e}
21575 (edit-and-post) or @kbd{s} (just send unedited) commands.
21576
21577 @item
21578 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21579 articles that weren't approved by you, you can cancel them with the
21580 @kbd{c} command.
21581 @end enumerate
21582
21583 To use moderation mode in these two groups, say:
21584
21585 @lisp
21586 (setq gnus-moderated-list
21587       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21588 @end lisp
21589
21590
21591 @node Image Enhancements
21592 @section Image Enhancements
21593
21594 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21595 support images yet.}, is able to display pictures and stuff, so Gnus has
21596 taken advantage of that.
21597
21598 @menu
21599 * X-Face::                      Display a funky, teensy black-and-white image.
21600 * Face::                        Display a funkier, teensier colored image.
21601 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21602 * Picons::                      How to display pictures of what you're reading.
21603 * XVarious::                    Other XEmacsy Gnusey variables.
21604 @end menu
21605
21606
21607 @node X-Face
21608 @subsection X-Face
21609 @cindex x-face
21610
21611 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21612 depth) image that's supposed to represent the author of the message.
21613 It seems to be supported by an ever-growing number of mail and news
21614 readers.
21615
21616 @cindex x-face
21617 @findex gnus-article-display-x-face
21618 @vindex gnus-article-x-face-command
21619 @vindex gnus-article-x-face-too-ugly
21620 @iftex
21621 @iflatex
21622 \include{xface}
21623 @end iflatex
21624 @end iftex
21625 @c @anchor{X-Face}
21626
21627 Decoding an @code{X-Face} header either requires an Emacs that has
21628 @samp{compface} support (which most XEmacs versions has), or that you
21629 have @samp{compface} installed on your system.  If either is true,
21630 Gnus will default to displaying @code{X-Face} headers.
21631
21632 The variable that controls this is the
21633 @code{gnus-article-x-face-command} variable.  If this variable is a
21634 string, this string will be executed in a sub-shell.  If it is a
21635 function, this function will be called with the face as the argument.
21636 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21637 the @code{From} header, the face will not be shown.
21638
21639 The default action under Emacs 20 is to fork off the @code{display}
21640 program@footnote{@code{display} is from the ImageMagick package.  For
21641 the @code{uncompface} and @code{icontopbm} programs look for a package
21642 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21643 view the face.
21644
21645 Under XEmacs or Emacs 21+ with suitable image support, the default
21646 action is to display the face before the @code{From} header.  (It's
21647 nicer if XEmacs has been compiled with @code{X-Face} support---that
21648 will make display somewhat faster.  If there's no native @code{X-Face}
21649 support, Gnus will try to convert the @code{X-Face} header using
21650 external programs from the @code{pbmplus} package and
21651 friends.@footnote{On a GNU/Linux system look for packages with names
21652 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21653
21654 (Note: @code{x-face} is used in the variable/function names, not
21655 @code{xface}).
21656
21657 Gnus provides a few convenience functions and variables to allow
21658 easier insertion of X-Face headers in outgoing messages.
21659
21660 @findex gnus-random-x-face
21661 @vindex gnus-convert-pbm-to-x-face-command
21662 @vindex gnus-x-face-directory
21663 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21664 @code{gnus-x-face-directory} and picks one at random, and then
21665 converts it to the X-Face format by using the
21666 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21667 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21668 header data as a string.
21669
21670 @findex gnus-insert-random-x-face-header
21671 @code{gnus-insert-random-x-face-header} calls
21672 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21673 randomly generated data.
21674
21675 @findex gnus-x-face-from-file
21676 @vindex gnus-convert-image-to-x-face-command
21677 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21678 converts the file to X-Face format by using the
21679 @code{gnus-convert-image-to-x-face-command} shell command.
21680
21681 Here's how you would typically use the first function.  Put something
21682 like the following in your @file{~/.gnus.el} file:
21683
21684 @lisp
21685 (setq message-required-news-headers
21686       (nconc message-required-news-headers
21687              (list '(X-Face . gnus-random-x-face))))
21688 @end lisp
21689
21690 Using the last function would be something like this:
21691
21692 @lisp
21693 (setq message-required-news-headers
21694       (nconc message-required-news-headers
21695              (list '(X-Face . (lambda ()
21696                                 (gnus-x-face-from-file
21697                                  "~/My-face.gif"))))))
21698 @end lisp
21699
21700
21701 @node Face
21702 @subsection Face
21703 @cindex face
21704
21705 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21706
21707 @code{Face} headers are essentially a funkier version of @code{X-Face}
21708 ones. They describe a 48x48 pixel colored image that's supposed to
21709 represent the author of the message.
21710
21711 @cindex face
21712 @findex gnus-article-display-face
21713 The contents of a @code{Face} header must be a base64 encoded PNG image.
21714 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21715 specifications.
21716
21717 Gnus provides a few convenience functions and variables to allow
21718 easier insertion of Face headers in outgoing messages.
21719
21720 @findex gnus-convert-png-to-face
21721 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21722 726 bytes long, and converts it to a face.
21723
21724 @findex gnus-face-from-file
21725 @vindex gnus-convert-image-to-face-command
21726 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21727 converts the file to Face format by using the
21728 @code{gnus-convert-image-to-face-command} shell command.
21729
21730 Here's how you would typically use this function. Put something like the
21731 following in your @file{~/.gnus.el} file:
21732
21733 @lisp
21734 (setq message-required-news-headers
21735       (nconc message-required-news-headers
21736              (list '(Face . (lambda ()
21737                               (gnus-face-from-file "~/face.jpg"))))))
21738 @end lisp
21739
21740
21741 @node Smileys
21742 @subsection Smileys
21743 @cindex smileys
21744
21745 @iftex
21746 @iflatex
21747 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21748 \input{smiley}
21749 @end iflatex
21750 @end iftex
21751
21752 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21753 currently the only package that uses Smiley, it is documented here.
21754
21755 In short---to use Smiley in Gnus, put the following in your
21756 @file{~/.gnus.el} file:
21757
21758 @lisp
21759 (setq gnus-treat-display-smileys t)
21760 @end lisp
21761
21762 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21763 the like---to pictures and displays those instead of the text smiley
21764 faces.  The conversion is controlled by a list of regexps that matches
21765 text and maps that to file names.
21766
21767 @vindex smiley-regexp-alist
21768 The alist used is specified by the @code{smiley-regexp-alist}
21769 variable.  The first item in each element is the regexp to be matched;
21770 the second element is the regexp match group that is to be replaced by
21771 the picture; and the third element is the name of the file to be
21772 displayed.
21773
21774 The following variables customize where Smiley will look for these
21775 files:
21776
21777 @table @code
21778
21779 @item smiley-data-directory
21780 @vindex smiley-data-directory
21781 Where Smiley will look for smiley faces files.
21782
21783 @item gnus-smiley-file-types
21784 @vindex gnus-smiley-file-types
21785 List of suffixes on smiley file names to try.
21786
21787 @end table
21788
21789
21790 @node Picons
21791 @subsection Picons
21792
21793 @iftex
21794 @iflatex
21795 \include{picons}
21796 @end iflatex
21797 @end iftex
21798
21799 So@dots{}  You want to slow down your news reader even more!  This is a
21800 good way to do so.  It's also a great way to impress people staring
21801 over your shoulder as you read news.
21802
21803 What are Picons?  To quote directly from the Picons Web site:
21804
21805 @iftex
21806 @iflatex
21807 \margindex{}
21808 @end iflatex
21809 @end iftex
21810
21811 @quotation
21812 @dfn{Picons} is short for ``personal icons''.  They're small,
21813 constrained images used to represent users and domains on the net,
21814 organized into databases so that the appropriate image for a given
21815 e-mail address can be found.  Besides users and domains, there are picon
21816 databases for Usenet newsgroups and weather forecasts.  The picons are
21817 in either monochrome @code{XBM} format or color @code{XPM} and
21818 @code{GIF} formats.
21819 @end quotation
21820
21821 @vindex gnus-picon-databases
21822 For instructions on obtaining and installing the picons databases,
21823 point your Web browser at
21824 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21825
21826 If you are using Debian GNU/Linux, saying @samp{apt-get install
21827 picons.*} will install the picons where Gnus can find them.
21828
21829 To enable displaying picons, simply make sure that
21830 @code{gnus-picon-databases} points to the directory containing the
21831 Picons databases.
21832
21833 The following variables offer control over where things are located.
21834
21835 @table @code
21836
21837 @item gnus-picon-databases
21838 @vindex gnus-picon-databases
21839 The location of the picons database.  This is a list of directories
21840 containing the @file{news}, @file{domains}, @file{users} (and so on)
21841 subdirectories.  Defaults to @code{("/usr/lib/picon"
21842 "/usr/local/faces")}.
21843
21844 @item gnus-picon-news-directories
21845 @vindex gnus-picon-news-directories
21846 List of subdirectories to search in @code{gnus-picon-databases} for
21847 newsgroups faces.  @code{("news")} is the default.
21848
21849 @item gnus-picon-user-directories
21850 @vindex gnus-picon-user-directories
21851 List of subdirectories to search in @code{gnus-picon-databases} for user
21852 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21853
21854 @item gnus-picon-domain-directories
21855 @vindex gnus-picon-domain-directories
21856 List of subdirectories to search in @code{gnus-picon-databases} for
21857 domain name faces.  Defaults to @code{("domains")}.  Some people may
21858 want to add @samp{"unknown"} to this list.
21859
21860 @item gnus-picon-file-types
21861 @vindex gnus-picon-file-types
21862 Ordered list of suffixes on picon file names to try.  Defaults to
21863 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21864
21865 @end table
21866
21867
21868 @node XVarious
21869 @subsection Various XEmacs Variables
21870
21871 @table @code
21872 @item gnus-xmas-glyph-directory
21873 @vindex gnus-xmas-glyph-directory
21874 This is where Gnus will look for pictures.  Gnus will normally
21875 auto-detect this directory, but you may set it manually if you have an
21876 unusual directory structure.
21877
21878 @item gnus-xmas-logo-color-alist
21879 @vindex gnus-xmas-logo-color-alist
21880 This is an alist where the key is a type symbol and the values are the
21881 foreground and background color of the splash page glyph.
21882
21883 @item gnus-xmas-logo-color-style
21884 @vindex gnus-xmas-logo-color-style
21885 This is the key used to look up the color in the alist described above.
21886 Valid values include @code{flame}, @code{pine}, @code{moss},
21887 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21888 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21889
21890 @item gnus-xmas-modeline-glyph
21891 @vindex gnus-xmas-modeline-glyph
21892 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21893 default.
21894
21895 @end table
21896
21897 @subsubsection Toolbar
21898
21899 @table @code
21900
21901 @item gnus-use-toolbar
21902 @vindex gnus-use-toolbar
21903 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21904 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21905 @code{right-toolbar}, or @code{left-toolbar}.
21906
21907 @item gnus-group-toolbar
21908 @vindex gnus-group-toolbar
21909 The toolbar in the group buffer.
21910
21911 @item gnus-summary-toolbar
21912 @vindex gnus-summary-toolbar
21913 The toolbar in the summary buffer.
21914
21915 @item gnus-summary-mail-toolbar
21916 @vindex gnus-summary-mail-toolbar
21917 The toolbar in the summary buffer of mail groups.
21918
21919 @end table
21920
21921 @iftex
21922 @iflatex
21923 \margindex{}
21924 @end iflatex
21925 @end iftex
21926
21927
21928 @node Fuzzy Matching
21929 @section Fuzzy Matching
21930 @cindex fuzzy matching
21931
21932 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21933 things like scoring, thread gathering and thread comparison.
21934
21935 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21936 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21937 means, and the implementation has changed over time.
21938
21939 Basically, it tries to remove all noise from lines before comparing.
21940 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21941 out of the strings before comparing the results.  This often leads to
21942 adequate results---even when faced with strings generated by text
21943 manglers masquerading as newsreaders.
21944
21945
21946 @node Thwarting Email Spam
21947 @section Thwarting Email Spam
21948 @cindex email spam
21949 @cindex spam
21950 @cindex UCE
21951 @cindex unsolicited commercial email
21952
21953 In these last days of the Usenet, commercial vultures are hanging about
21954 and grepping through news like crazy to find email addresses they can
21955 foist off their scams and products to.  As a reaction to this, many
21956 people have started putting nonsense addresses into their @code{From}
21957 lines.  I think this is counterproductive---it makes it difficult for
21958 people to send you legitimate mail in response to things you write, as
21959 well as making it difficult to see who wrote what.  This rewriting may
21960 perhaps be a bigger menace than the unsolicited commercial email itself
21961 in the end.
21962
21963 The biggest problem I have with email spam is that it comes in under
21964 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21965 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21966 mail group, only to find two pyramid schemes, seven advertisements
21967 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21968 and one mail asking me to repent and find some god.
21969
21970 This is annoying.  Here's what you can do about it.
21971
21972 @menu
21973 * The problem of spam::         Some background, and some solutions
21974 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21975 * SpamAssassin::                How to use external anti-spam tools.
21976 * Hashcash::                    Reduce spam by burning CPU time.
21977 * Filtering Spam Using The Spam ELisp Package::
21978 * Filtering Spam Using Statistics with spam-stat::
21979 @end menu
21980
21981 @node The problem of spam
21982 @subsection The problem of spam
21983 @cindex email spam
21984 @cindex spam filtering approaches
21985 @cindex filtering approaches, spam
21986 @cindex UCE
21987 @cindex unsolicited commercial email
21988
21989 First, some background on spam.
21990
21991 If you have access to e-mail, you are familiar with spam (technically
21992 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21993 because e-mail delivery is very cheap compared to paper mail, so only
21994 a very small percentage of people need to respond to an UCE to make it
21995 worthwhile to the advertiser.  Ironically, one of the most common
21996 spams is the one offering a database of e-mail addresses for further
21997 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21998 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21999
22000 Spam comes from a wide variety of sources.  It is simply impossible to
22001 dispose of all spam without discarding useful messages.  A good
22002 example is the TMDA system, which requires senders
22003 unknown to you to confirm themselves as legitimate senders before
22004 their e-mail can reach you.  Without getting into the technical side
22005 of TMDA, a downside is clearly that e-mail from legitimate sources may
22006 be discarded if those sources can't or won't confirm themselves
22007 through the TMDA system.  Another problem with TMDA is that it
22008 requires its users to have a basic understanding of e-mail delivery
22009 and processing.
22010
22011 The simplest approach to filtering spam is filtering.  If you get 200
22012 spam messages per day from @samp{random-address@@vmadmin.com}, you
22013 block @samp{vmadmin.com}.  If you get 200 messages about
22014 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22015 message.  This, unfortunately, is a great way to discard legitimate
22016 e-mail.  For instance, the very informative and useful RISKS digest
22017 has been blocked by overzealous mail filters because it
22018 @strong{contained} words that were common in spam messages.
22019 Nevertheless, in isolated cases, with great care, direct filtering of
22020 mail can be useful.
22021
22022 Another approach to filtering e-mail is the distributed spam
22023 processing, for instance DCC implements such a system.  In essence,
22024 @var{N} systems around the world agree that a machine @var{X} in
22025 China, Ghana, or California is sending out spam e-mail, and these
22026 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22027 a database.  The criteria for spam detection vary---it may be the
22028 number of messages sent, the content of the messages, and so on.  When
22029 a user of the distributed processing system wants to find out if a
22030 message is spam, he consults one of those @var{N} systems.
22031
22032 Distributed spam processing works very well against spammers that send
22033 a large number of messages at once, but it requires the user to set up
22034 fairly complicated checks.  There are commercial and free distributed
22035 spam processing systems.  Distributed spam processing has its risks as
22036 well.  For instance legitimate e-mail senders have been accused of
22037 sending spam, and their web sites have been shut down for some time
22038 because of the incident.
22039
22040 The statistical approach to spam filtering is also popular.  It is
22041 based on a statistical analysis of previous spam messages.  Usually
22042 the analysis is a simple word frequency count, with perhaps pairs of
22043 words or 3-word combinations thrown into the mix.  Statistical
22044 analysis of spam works very well in most of the cases, but it can
22045 classify legitimate e-mail as spam in some cases.  It takes time to
22046 run the analysis, the full message must be analyzed, and the user has
22047 to store the database of spam analyses.
22048
22049 @node Anti-Spam Basics
22050 @subsection Anti-Spam Basics
22051 @cindex email spam
22052 @cindex spam
22053 @cindex UCE
22054 @cindex unsolicited commercial email
22055
22056 One way of dealing with spam is having Gnus split out all spam into a
22057 @samp{spam} mail group (@pxref{Splitting Mail}).
22058
22059 First, pick one (1) valid mail address that you can be reached at, and
22060 put it in your @code{From} header of all your news articles.  (I've
22061 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22062 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22063 sysadmin whether your sendmail installation accepts keywords in the local
22064 part of the mail address.)
22065
22066 @lisp
22067 (setq message-default-news-headers
22068       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22069 @end lisp
22070
22071 Then put the following split rule in @code{nnmail-split-fancy}
22072 (@pxref{Fancy Mail Splitting}):
22073
22074 @lisp
22075 (
22076  ...
22077  (to "larsi@@trym.ifi.uio.no"
22078       (| ("subject" "re:.*" "misc")
22079          ("references" ".*@@.*" "misc")
22080          "spam"))
22081  ...
22082 )
22083 @end lisp
22084
22085 This says that all mail to this address is suspect, but if it has a
22086 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22087 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22088 (This idea probably comes from Tim Pierce.)
22089
22090 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22091 and do not include your email address explicitly in the @code{To}
22092 header.  Why they do this is unknown---perhaps it's to thwart this
22093 thwarting scheme?  In any case, this is trivial to deal with---you just
22094 put anything not addressed to you in the @samp{spam} group by ending
22095 your fancy split rule in this way:
22096
22097 @lisp
22098 (
22099  ...
22100  (to "larsi" "misc")
22101  "spam")
22102 @end lisp
22103
22104 In my experience, this will sort virtually everything into the right
22105 group.  You still have to check the @samp{spam} group from time to time to
22106 check for legitimate mail, though.  If you feel like being a good net
22107 citizen, you can even send off complaints to the proper authorities on
22108 each unsolicited commercial email---at your leisure.
22109
22110 This works for me.  It allows people an easy way to contact me (they can
22111 just press @kbd{r} in the usual way), and I'm not bothered at all with
22112 spam.  It's a win-win situation.  Forging @code{From} headers to point
22113 to non-existent domains is yucky, in my opinion.
22114
22115
22116
22117 @node SpamAssassin
22118 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22119 @cindex SpamAssassin
22120 @cindex Vipul's Razor
22121 @cindex DCC
22122
22123 The days where the hints in the previous section was sufficient in
22124 avoiding spam are coming to an end.  There are many tools out there
22125 that claim to reduce the amount of spam you get.  This section could
22126 easily become outdated fast, as new products replace old, but
22127 fortunately most of these tools seem to have similar interfaces.  Even
22128 though this section will use SpamAssassin as an example, it should be
22129 easy to adapt it to most other tools.
22130
22131 If the tool you are using is not installed on the mail server, you
22132 need to invoke it yourself.  Ideas on how to use the
22133 @code{:postscript} mail source parameter (@pxref{Mail Source
22134 Specifiers}) follow.
22135
22136 @lisp
22137 (setq mail-sources
22138       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22139         (pop :user "jrl"
22140              :server "pophost"
22141              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22142 @end lisp
22143
22144 Once you manage to process your incoming spool somehow, thus making
22145 the mail contain e.g.@: a header indicating it is spam, you are ready to
22146 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22147
22148 @lisp
22149 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22150                              ...))
22151 @end lisp
22152
22153 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22154
22155 @lisp
22156 (setq nnmail-split-methods 'nnmail-split-fancy
22157       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22158                              ...))
22159 @end lisp
22160
22161 Some people might not like the idea of piping the mail through various
22162 programs using a @code{:prescript} (if some program is buggy, you
22163 might lose all mail).  If you are one of them, another solution is to
22164 call the external tools during splitting.  Example fancy split method:
22165
22166 @lisp
22167 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22168                              ...))
22169 (defun kevin-spamassassin ()
22170   (save-excursion
22171     (let ((buf (or (get-buffer " *nnmail incoming*")
22172                    (get-buffer " *nnml move*"))))
22173       (if (not buf)
22174           (progn (message "Oops, cannot find message buffer") nil)
22175         (set-buffer buf)
22176         (if (eq 1 (call-process-region (point-min) (point-max)
22177                                        "spamc" nil nil nil "-c"))
22178             "spam")))))
22179 @end lisp
22180
22181 That is about it.  As some spam is likely to get through anyway, you
22182 might want to have a nifty function to call when you happen to read
22183 spam.  And here is the nifty function:
22184
22185 @lisp
22186  (defun my-gnus-raze-spam ()
22187   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22188   (interactive)
22189   (gnus-summary-show-raw-article)
22190   (gnus-summary-save-in-pipe "razor-report -f -d")
22191   (gnus-summary-mark-as-expirable 1))
22192 @end lisp
22193
22194 @node Hashcash
22195 @subsection Hashcash
22196 @cindex hashcash
22197
22198 A novel technique to fight spam is to require senders to do something
22199 costly for each message they send.  This has the obvious drawback that
22200 you cannot rely on everyone in the world using this technique,
22201 since it is not part of the Internet standards, but it may be useful
22202 in smaller communities.
22203
22204 While the tools in the previous section work well in practice, they
22205 work only because the tools are constantly maintained and updated as
22206 new form of spam appears.  This means that a small percentage of spam
22207 will always get through.  It also means that somewhere, someone needs
22208 to read lots of spam to update these tools.  Hashcash avoids that, but
22209 instead requires that everyone you communicate with supports the
22210 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22211 The approaches have their own advantages and disadvantages, but as
22212 often in the real world, a combination of them is stronger than either
22213 one of them separately.
22214
22215 @cindex X-Hashcash
22216 The ``something costly'' is to burn CPU time, more specifically to
22217 compute a hash collision up to a certain number of bits.  The
22218 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22219 header.  For more details, and for the external application
22220 @code{hashcash} you need to install to use this feature, see
22221 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22222 information can be found at @uref{http://www.camram.org/}.
22223
22224 If you wish to call hashcash for each message you send, say something
22225 like:
22226
22227 @lisp
22228 (require 'hashcash)
22229 (add-hook 'message-send-hook 'mail-add-payment)
22230 @end lisp
22231
22232 The @file{hashcash.el} library can be found in the Gnus development
22233 contrib directory or at
22234 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22235
22236 You will need to set up some additional variables as well:
22237
22238 @table @code
22239
22240 @item hashcash-default-payment
22241 @vindex hashcash-default-payment
22242 This variable indicates the default number of bits the hash collision
22243 should consist of.  By default this is 0, meaning nothing will be
22244 done.  Suggested useful values include 17 to 29.
22245
22246 @item hashcash-payment-alist
22247 @vindex hashcash-payment-alist
22248 Some receivers may require you to spend burn more CPU time than the
22249 default.  This variable contains a list of @samp{(@var{addr}
22250 @var{amount})} cells, where @var{addr} is the receiver (email address
22251 or newsgroup) and @var{amount} is the number of bits in the collision
22252 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22253 @var{amount})} cells, where the @var{string} is the string to use
22254 (normally the email address or newsgroup name is used).
22255
22256 @item hashcash
22257 @vindex hashcash
22258 Where the @code{hashcash} binary is installed.
22259
22260 @end table
22261
22262 Currently there is no built in functionality in Gnus to verify
22263 hashcash cookies, it is expected that this is performed by your hand
22264 customized mail filtering scripts.  Improvements in this area would be
22265 a useful contribution, however.
22266
22267 @node Filtering Spam Using The Spam ELisp Package
22268 @subsection Filtering Spam Using The Spam ELisp Package
22269 @cindex spam filtering
22270 @cindex spam
22271
22272 The idea behind @file{spam.el} is to have a control center for spam detection
22273 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22274 filters incoming mail, and it analyzes mail known to be spam or ham.
22275 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22276 non-spam messages.
22277
22278 So, what happens when you load @file{spam.el}?  
22279
22280 First of all, you @strong{must} set the variable
22281 @code{spam-install-hooks} to t and install the @code{spam.el} hooks:
22282
22283 @example
22284 (setq spam-install-hooks t)
22285 (spam-install-hooks-function)
22286 @end example
22287
22288 This is automatically done for you if you load @code{spam.el}
22289 @emph{after} one of the @code{spam-use-*} variables explained later
22290 are set.  So you should load @code{spam.el} after you set one of the
22291 @code{spam-use-*} variables:
22292
22293 @example
22294 (setq spam-use-bogofilter t)
22295 (require 'spam)
22296 @end example
22297
22298 You get the following keyboard commands:
22299
22300 @table @kbd
22301
22302 @item M-d
22303 @itemx M s x
22304 @itemx S x
22305 @kindex M-d
22306 @kindex S x
22307 @kindex M s x
22308 @findex gnus-summary-mark-as-spam
22309 @code{gnus-summary-mark-as-spam}.
22310
22311 Mark current article as spam, showing it with the @samp{$} mark.
22312 Whenever you see a spam article, make sure to mark its summary line
22313 with @kbd{M-d} before leaving the group.  This is done automatically
22314 for unread articles in @emph{spam} groups.
22315
22316 @item M s t
22317 @itemx S t
22318 @kindex M s t
22319 @kindex S t
22320 @findex spam-bogofilter-score
22321 @code{spam-bogofilter-score}.
22322
22323 You must have Bogofilter installed for that command to work properly.
22324
22325 @xref{Bogofilter}.
22326
22327 @end table
22328
22329 Also, when you load @file{spam.el}, you will be able to customize its
22330 variables.  Try @code{customize-group} on the @samp{spam} variable
22331 group.
22332
22333 @vindex gnus-spam-process-newsgroups
22334 The concepts of ham processors and spam processors are very important.
22335 Ham processors and spam processors for a group can be set with the
22336 @code{spam-process} group parameter, or the
22337 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22338 mail known to be non-spam (@emph{ham}) and process it in some way so
22339 that later similar mail will also be considered non-spam.  Spam
22340 processors take mail known to be spam and process it so similar spam
22341 will be detected later.
22342
22343 @vindex gnus-spam-newsgroup-contents
22344 Gnus learns from the spam you get.  You have to collect your spam in
22345 one or more spam groups, and set or customize the variable
22346 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22347 groups to contain spam by setting their group parameter
22348 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22349 by customizing the corresponding variable
22350 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22351 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22352 also be used to declare groups as @emph{ham} groups if you set their
22353 classification to @code{gnus-group-spam-classification-ham}.  If
22354 groups are not classified by means of @code{spam-junk-mailgroups},
22355 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22356 considered @emph{unclassified}.  All groups are unclassified by
22357 default.
22358
22359 @vindex gnus-spam-mark
22360 @cindex $
22361 In spam groups, all messages are considered to be spam by default:
22362 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22363 group.  If you have seen a message, had it marked as spam, then
22364 unmarked it, it won't be marked as spam when you enter the group
22365 thereafter.  You can disable that behavior, so all unread messages
22366 will get the @samp{$} mark, if you set the
22367 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22368 remove the @samp{$} mark when you are in the group summary buffer for
22369 every message that is not spam after all.  To remove the @samp{$}
22370 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22371 declaring it read the non-spam way.  When you leave a group, all
22372 spam-marked (@samp{$}) articles are sent to a spam processor which
22373 will study them as spam samples.
22374
22375 Messages may also be deleted in various other ways, and unless
22376 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22377 and @samp{r} for default read or explicit delete, marks @samp{X} and
22378 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22379 low scores, are all considered to be associated with articles which
22380 are not spam.  This assumption might be false, in particular if you
22381 use kill files or score files as means for detecting genuine spam, you
22382 should then adjust the @code{ham-marks} group parameter.
22383
22384 @defvar ham-marks
22385 You can customize this group or topic parameter to be the list of
22386 marks you want to consider ham.  By default, the list contains the
22387 deleted, read, killed, kill-filed, and low-score marks.
22388 @end defvar
22389
22390 @defvar spam-marks
22391 You can customize this group or topic parameter to be the list of
22392 marks you want to consider spam.  By default, the list contains only
22393 the spam mark.
22394 @end defvar
22395
22396 When you leave @emph{any} group, regardless of its
22397 @code{spam-contents} classification, all spam-marked articles are sent
22398 to a spam processor, which will study these as spam samples.  If you
22399 explicit kill a lot, you might sometimes end up with articles marked
22400 @samp{K} which you never saw, and which might accidentally contain
22401 spam.  Best is to make sure that real spam is marked with @samp{$},
22402 and nothing else.
22403
22404 @vindex gnus-ham-process-destinations
22405 When you leave a @emph{spam} group, all spam-marked articles are
22406 marked as expired after processing with the spam processor.  This is
22407 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22408 @strong{ham} articles in a spam group will be moved to a location
22409 determined by either the @code{ham-process-destination} group
22410 parameter or a match in the @code{gnus-ham-process-destinations}
22411 variable, which is a list of regular expressions matched with group
22412 names (it's easiest to customize this variable with
22413 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22414 location is a group name.  If the @code{ham-process-destination}
22415 parameter is not set, ham articles are left in place.  If the
22416 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22417 set, the ham articles are marked as unread before being moved.
22418
22419 When you leave a @emph{ham} group, all ham-marked articles are sent to
22420 a ham processor, which will study these as non-spam samples.
22421
22422 @vindex gnus-spam-process-destinations
22423 When you leave a @emph{ham} or @emph{unclassified} group, all
22424 @strong{spam} articles are moved to a location determined by either
22425 the @code{spam-process-destination} group parameter or a match in the
22426 @code{gnus-spam-process-destinations} variable, which is a list of
22427 regular expressions matched with group names (it's easiest to
22428 customize this variable with @code{customize-variable
22429 gnus-spam-process-destinations}).  The ultimate location is a group
22430 name.  If the @code{spam-process-destination} parameter is not set,
22431 the spam articles are only expired.
22432
22433 To use the @file{spam.el} facilities for incoming mail filtering, you
22434 must add the following to your fancy split list
22435 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22436
22437 @example
22438 (: spam-split)
22439 @end example
22440
22441 Note that the fancy split may be called @code{nnmail-split-fancy} or
22442 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22443 nnimap back ends to retrieve your mail.
22444
22445 The @code{spam-split} function will process incoming mail and send the
22446 mail considered to be spam into the group name given by the variable
22447 @code{spam-split-group}.  By default that group name is @samp{spam},
22448 but you can customize @code{spam-split-group}.
22449
22450 You can also give @code{spam-split} a parameter,
22451 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22452
22453 Take these split rules (with @code{spam-use-regex-headers} and
22454 @code{spam-use-blackholes} set):
22455
22456 @example
22457  nnimap-split-fancy '(|
22458                       (any "ding" "ding")
22459                       (: spam-split)
22460                       ;; default mailbox
22461                       "mail")
22462 @end example
22463
22464 Now, the problem is that you want all ding messages to make it to the
22465 ding folder.  But that will let obvious spam (for example, spam
22466 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22467 when it's sent to the ding list.  On the other hand, some messages to
22468 the ding list are from a mail server in the blackhole list, so the
22469 invocation of @code{spam-split} can't be before the ding rule.
22470
22471 You can let SpamAssassin headers supercede ding rules, but all other
22472 @code{spam-split} rules (including a second invocation of the
22473 regex-headers check) will be after the ding rule:
22474
22475 @example
22476  nnimap-split-fancy '(|
22477                       (: spam-split 'spam-use-regex-headers)
22478                       (any "ding" "ding")
22479                       (: spam-split)
22480                       ;; default mailbox
22481                       "mail")
22482 @end example
22483
22484 Basically, this lets you invoke specific @code{spam-split} checks
22485 depending on your particular needs.  You don't have to throw all mail
22486 into all the spam tests.  Another reason why this is nice is that
22487 messages to mailing lists you have rules for don't have to have
22488 resource-intensive blackhole checks performed on them.  You could also
22489 specify different spam checks for your nnmail split vs. your nnimap
22490 split.  Go crazy.
22491
22492 You still have to have specific checks such as
22493 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22494 invoke @code{spam-split} with the check.  The reason is that when
22495 loading @file{spam.el}, some conditional loading is done depending on
22496 what @code{spam-use-xyz} variables you have set.
22497
22498 @emph{Note for IMAP users}
22499
22500 The boolean variable @code{nnimap-split-download-body} needs to be
22501 set, if you want to split based on the whole message instead of just
22502 the headers.  By default, the nnimap back end will only retrieve the
22503 message headers.  If you use @code{spam-check-bogofilter},
22504 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22505 can benefit from the full message body), you should set this variable.
22506 It is not set by default because it will slow @acronym{IMAP} down, and
22507 that is not an appropriate decision to make on behalf of the user.
22508
22509 @xref{Splitting in IMAP}.
22510
22511 @emph{TODO: Currently, spam.el only supports insertion of articles
22512 into a back end.  There is no way to tell spam.el that an article is no
22513 longer spam or ham.}
22514
22515 @emph{TODO: spam.el needs to provide a uniform way of training all the
22516 statistical databases.  Some have that functionality built-in, others
22517 don't.}
22518
22519 The following are the methods you can use to control the behavior of
22520 @code{spam-split} and their corresponding spam and ham processors:
22521
22522 @menu
22523 * Blacklists and Whitelists::
22524 * BBDB Whitelists::
22525 * Gmane Spam Reporting::
22526 * Anti-spam Hashcash Payments::
22527 * Blackholes::
22528 * Regular Expressions Header Matching::
22529 * Bogofilter::
22530 * ifile spam filtering::
22531 * spam-stat spam filtering::
22532 * SpamOracle::
22533 * Extending the spam elisp package::
22534 @end menu
22535
22536 @node Blacklists and Whitelists
22537 @subsubsection Blacklists and Whitelists
22538 @cindex spam filtering
22539 @cindex whitelists, spam filtering
22540 @cindex blacklists, spam filtering
22541 @cindex spam
22542
22543 @defvar spam-use-blacklist
22544
22545 Set this variable to @code{t} if you want to use blacklists when
22546 splitting incoming mail.  Messages whose senders are in the blacklist
22547 will be sent to the @code{spam-split-group}.  This is an explicit
22548 filter, meaning that it acts only on mail senders @emph{declared} to
22549 be spammers.
22550
22551 @end defvar
22552
22553 @defvar spam-use-whitelist
22554
22555 Set this variable to @code{t} if you want to use whitelists when
22556 splitting incoming mail.  Messages whose senders are not in the
22557 whitelist will be sent to the next spam-split rule.  This is an
22558 explicit filter, meaning that unless someone is in the whitelist, their
22559 messages are not assumed to be spam or ham.
22560
22561 @end defvar
22562
22563 @defvar spam-use-whitelist-exclusive
22564
22565 Set this variable to @code{t} if you want to use whitelists as an
22566 implicit filter, meaning that every message will be considered spam
22567 unless the sender is in the whitelist.  Use with care.
22568
22569 @end defvar
22570
22571 @defvar gnus-group-spam-exit-processor-blacklist
22572
22573 Add this symbol to a group's @code{spam-process} parameter by
22574 customizing the group parameters or the
22575 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22576 added to a group's @code{spam-process} parameter, the senders of
22577 spam-marked articles will be added to the blacklist.
22578
22579 @end defvar
22580
22581 @defvar gnus-group-ham-exit-processor-whitelist
22582
22583 Add this symbol to a group's @code{spam-process} parameter by
22584 customizing the group parameters or the
22585 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22586 added to a group's @code{spam-process} parameter, the senders of
22587 ham-marked articles in @emph{ham} groups will be added to the
22588 whitelist.  Note that this ham processor has no effect in @emph{spam}
22589 or @emph{unclassified} groups.
22590
22591 @end defvar
22592
22593 Blacklists are lists of regular expressions matching addresses you
22594 consider to be spam senders.  For instance, to block mail from any
22595 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22596 blacklist.  You start out with an empty blacklist.  Blacklist entries
22597 use the Emacs regular expression syntax.
22598
22599 Conversely, whitelists tell Gnus what addresses are considered
22600 legitimate.  All messages from whitelisted addresses are considered
22601 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22602 Emacs regular expression syntax.
22603
22604 The blacklist and whitelist file locations can be customized with the
22605 @code{spam-directory} variable (@file{~/News/spam} by default), or
22606 the @code{spam-whitelist} and @code{spam-blacklist} variables
22607 directly.  The whitelist and blacklist files will by default be in the
22608 @code{spam-directory} directory, named @file{whitelist} and
22609 @file{blacklist} respectively.
22610
22611 @node BBDB Whitelists
22612 @subsubsection BBDB Whitelists
22613 @cindex spam filtering
22614 @cindex BBDB whitelists, spam filtering
22615 @cindex BBDB, spam filtering
22616 @cindex spam
22617
22618 @defvar spam-use-BBDB
22619
22620 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22621 Whitelists}), but uses the BBDB as the source of whitelisted
22622 addresses, without regular expressions.  You must have the BBDB loaded
22623 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22624 not in the BBDB will be sent to the next spam-split rule.  This is an
22625 explicit filter, meaning that unless someone is in the BBDB, their
22626 messages are not assumed to be spam or ham.
22627
22628 @end defvar
22629
22630 @defvar spam-use-BBDB-exclusive
22631
22632 Set this variable to @code{t} if you want to use the BBDB as an
22633 implicit filter, meaning that every message will be considered spam
22634 unless the sender is in the BBDB.  Use with care.  Only sender
22635 addresses in the BBDB will be allowed through; all others will be
22636 classified as spammers.
22637
22638 @end defvar
22639
22640 @defvar gnus-group-ham-exit-processor-BBDB
22641
22642 Add this symbol to a group's @code{spam-process} parameter by
22643 customizing the group parameters or the
22644 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22645 added to a group's @code{spam-process} parameter, the senders of
22646 ham-marked articles in @emph{ham} groups will be added to the
22647 BBDB.  Note that this ham processor has no effect in @emph{spam}
22648 or @emph{unclassified} groups.
22649
22650 @end defvar
22651
22652 @node Gmane Spam Reporting
22653 @subsubsection Gmane Spam Reporting
22654 @cindex spam reporting
22655 @cindex Gmane, spam reporting
22656 @cindex Gmane, spam reporting
22657 @cindex spam
22658
22659 @defvar gnus-group-spam-exit-processor-report-gmane
22660
22661 Add this symbol to a group's @code{spam-process} parameter by
22662 customizing the group parameters or the
22663 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22664 added to a group's @code{spam-process} parameter, the spam-marked
22665 articles groups will be reported to the Gmane administrators.
22666
22667 @end defvar
22668
22669 @node Anti-spam Hashcash Payments
22670 @subsubsection Anti-spam Hashcash Payments
22671 @cindex spam filtering
22672 @cindex hashcash, spam filtering
22673 @cindex spam
22674
22675 @defvar spam-use-hashcash
22676
22677 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22678 Whitelists}), but uses hashcash tokens for whitelisting messages
22679 instead of the sender address.  You must have the @code{hashcash.el}
22680 package loaded for @code{spam-use-hashcash} to work properly.
22681 Messages without a hashcash payment token will be sent to the next
22682 spam-split rule.  This is an explicit filter, meaning that unless a
22683 hashcash token is found, the messages are not assumed to be spam or
22684 ham.
22685
22686 @end defvar
22687
22688 @node Blackholes
22689 @subsubsection Blackholes
22690 @cindex spam filtering
22691 @cindex blackholes, spam filtering
22692 @cindex spam
22693
22694 @defvar spam-use-blackholes
22695
22696 This option is disabled by default.  You can let Gnus consult the
22697 blackhole-type distributed spam processing systems (DCC, for instance)
22698 when you set this option.  The variable @code{spam-blackhole-servers}
22699 holds the list of blackhole servers Gnus will consult.  The current
22700 list is fairly comprehensive, but make sure to let us know if it
22701 contains outdated servers.
22702
22703 The blackhole check uses the @code{dig.el} package, but you can tell
22704 @file{spam.el} to use @code{dns.el} instead for better performance if
22705 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22706 this time to set @code{spam-use-dig} to @code{nil} despite the
22707 possible performance improvements, because some users may be unable to
22708 use it, but you can try it and see if it works for you.
22709
22710 @end defvar
22711
22712 @defvar spam-blackhole-servers
22713
22714 The list of servers to consult for blackhole checks.
22715
22716 @end defvar
22717
22718 @defvar spam-blackhole-good-server-regex
22719
22720 A regular expression for IPs that should not be checked against the
22721 blackhole server list.  When set to @code{nil}, it has no effect.
22722
22723 @end defvar
22724
22725 @defvar spam-use-dig
22726
22727 Use the @code{dig.el} package instead of the @code{dns.el} package.
22728 The default setting of @code{t} is recommended.
22729
22730 @end defvar
22731
22732 Blackhole checks are done only on incoming mail.  There is no spam or
22733 ham processor for blackholes.
22734
22735 @node Regular Expressions Header Matching
22736 @subsubsection Regular Expressions Header Matching
22737 @cindex spam filtering
22738 @cindex regular expressions header matching, spam filtering
22739 @cindex spam
22740
22741 @defvar spam-use-regex-headers
22742
22743 This option is disabled by default.  You can let Gnus check the
22744 message headers against lists of regular expressions when you set this
22745 option.  The variables @code{spam-regex-headers-spam} and
22746 @code{spam-regex-headers-ham} hold the list of regular expressions.
22747 Gnus will check against the message headers to determine if the
22748 message is spam or ham, respectively.
22749
22750 @end defvar
22751
22752 @defvar spam-regex-headers-spam
22753
22754 The list of regular expressions that, when matched in the headers of
22755 the message, positively identify it as spam.
22756
22757 @end defvar
22758
22759 @defvar spam-regex-headers-ham
22760
22761 The list of regular expressions that, when matched in the headers of
22762 the message, positively identify it as ham.
22763
22764 @end defvar
22765
22766 Regular expression header checks are done only on incoming mail.
22767 There is no specific spam or ham processor for regular expressions.
22768
22769 @node Bogofilter
22770 @subsubsection Bogofilter
22771 @cindex spam filtering
22772 @cindex bogofilter, spam filtering
22773 @cindex spam
22774
22775 @defvar spam-use-bogofilter
22776
22777 Set this variable if you want @code{spam-split} to use Eric Raymond's
22778 speedy Bogofilter.
22779
22780 With a minimum of care for associating the @samp{$} mark for spam
22781 articles only, Bogofilter training all gets fairly automatic.  You
22782 should do this until you get a few hundreds of articles in each
22783 category, spam or not.  The command @kbd{S t} in summary mode, either
22784 for debugging or for curiosity, shows the @emph{spamicity} score of
22785 the current article (between 0.0 and 1.0).
22786
22787 Bogofilter determines if a message is spam based on a specific
22788 threshold.  That threshold can be customized, consult the Bogofilter
22789 documentation.
22790
22791 If the @code{bogofilter} executable is not in your path, Bogofilter
22792 processing will be turned off.
22793
22794 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22795
22796 @end defvar
22797
22798 @defvar spam-use-bogofilter-headers
22799
22800 Set this variable if you want @code{spam-split} to use Eric Raymond's
22801 speedy Bogofilter, looking only at the message headers.  It works
22802 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22803 must be in the message already.  Normally you would do this with a
22804 procmail recipe or something similar; consult the Bogofilter
22805 installation documents for details.
22806
22807 You should not enable this if you use @code{spam-use-bogofilter}.
22808
22809 @end defvar
22810
22811 @defvar gnus-group-spam-exit-processor-bogofilter
22812 Add this symbol to a group's @code{spam-process} parameter by
22813 customizing the group parameters or the
22814 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22815 added to a group's @code{spam-process} parameter, spam-marked articles
22816 will be added to the Bogofilter spam database.
22817 @end defvar
22818
22819 @defvar gnus-group-ham-exit-processor-bogofilter
22820 Add this symbol to a group's @code{spam-process} parameter by
22821 customizing the group parameters or the
22822 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22823 added to a group's @code{spam-process} parameter, the ham-marked
22824 articles in @emph{ham} groups will be added to the Bogofilter database
22825 of non-spam messages.  Note that this ham processor has no effect in
22826 @emph{spam} or @emph{unclassified} groups.
22827 @end defvar
22828
22829 @defvar spam-bogofilter-database-directory
22830
22831 This is the directory where Bogofilter will store its databases.  It
22832 is not specified by default, so Bogofilter will use its own default
22833 database directory.
22834
22835 @end defvar
22836
22837 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22838 purpose.  A ham and a spam processor are provided, plus the
22839 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22840 variables to indicate to spam-split that Bogofilter should either be
22841 used, or has already been used on the article.  The 0.9.2.1 version of
22842 Bogofilter was used to test this functionality.
22843
22844 @node ifile spam filtering
22845 @subsubsection ifile spam filtering
22846 @cindex spam filtering
22847 @cindex ifile, spam filtering
22848 @cindex spam
22849
22850 @defvar spam-use-ifile
22851
22852 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22853 statistical analyzer similar to Bogofilter.
22854
22855 @end defvar
22856
22857 @defvar spam-ifile-all-categories
22858
22859 Enable this variable if you want @code{spam-use-ifile} to give you all
22860 the ifile categories, not just spam/non-spam.  If you use this, make
22861 sure you train ifile as described in its documentation.
22862
22863 @end defvar
22864
22865 @defvar spam-ifile-spam-category
22866
22867 This is the category of spam messages as far as ifile is concerned.
22868 The actual string used is irrelevant, but you probably want to leave
22869 the default value of @samp{spam}.
22870 @end defvar
22871
22872 @defvar spam-ifile-database-path
22873
22874 This is the filename for the ifile database.  It is not specified by
22875 default, so ifile will use its own default database name.
22876
22877 @end defvar
22878
22879 The ifile mail classifier is similar to Bogofilter in intent and
22880 purpose.  A ham and a spam processor are provided, plus the
22881 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22882 should be used.  The 1.2.1 version of ifile was used to test this
22883 functionality.
22884
22885 @node spam-stat spam filtering
22886 @subsubsection spam-stat spam filtering
22887 @cindex spam filtering
22888 @cindex spam-stat, spam filtering
22889 @cindex spam-stat
22890 @cindex spam
22891
22892 @xref{Filtering Spam Using Statistics with spam-stat}.
22893
22894 @defvar spam-use-stat
22895
22896 Enable this variable if you want @code{spam-split} to use
22897 spam-stat.el, an Emacs Lisp statistical analyzer.
22898
22899 @end defvar
22900
22901 @defvar gnus-group-spam-exit-processor-stat
22902 Add this symbol to a group's @code{spam-process} parameter by
22903 customizing the group parameters or the
22904 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22905 added to a group's @code{spam-process} parameter, the spam-marked
22906 articles will be added to the spam-stat database of spam messages.
22907 @end defvar
22908
22909 @defvar gnus-group-ham-exit-processor-stat
22910 Add this symbol to a group's @code{spam-process} parameter by
22911 customizing the group parameters or the
22912 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22913 added to a group's @code{spam-process} parameter, the ham-marked
22914 articles in @emph{ham} groups will be added to the spam-stat database
22915 of non-spam messages.  Note that this ham processor has no effect in
22916 @emph{spam} or @emph{unclassified} groups.
22917 @end defvar
22918
22919 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
22920 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
22921 which unlike ifile or Bogofilter does not require external programs.
22922 A spam and a ham processor, and the @code{spam-use-stat} variable for
22923 @code{spam-split} are provided.
22924
22925 @node SpamOracle
22926 @subsubsection Using SpamOracle with Gnus
22927 @cindex spam filtering
22928 @cindex SpamOracle
22929 @cindex spam
22930
22931 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
22932 statistical mail filtering tool written by Xavier Leroy and needs to be
22933 installed separately.
22934
22935 There are several ways to use SpamOracle with Gnus.  In all cases, your
22936 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
22937 then enter an @samp{X-Spam} header indicating whether it regards the
22938 mail as a spam mail or not.
22939
22940 One possibility is to run SpamOracle as a @code{:prescript} from the
22941 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
22942 the advantage that the user can see the @emph{X-Spam} headers.
22943
22944 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
22945 Using The Spam ELisp Package}) call SpamOracle.
22946
22947 @vindex spam-use-spamoracle
22948 To enable SpamOracle usage by @file{spam.el}, set the variable
22949 @code{spam-use-spamoracle} to @code{t} and configure the
22950 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
22951 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
22952 this example the @samp{INBOX} of an nnimap server is filtered using
22953 SpamOracle.  Mails recognized as spam mails will be moved to
22954 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
22955 in @samp{INBOX}:
22956
22957 @example
22958 (setq spam-use-spamoracle t
22959       spam-split-group "Junk"
22960       nnimap-split-inbox '("INBOX")
22961       nnimap-split-rule 'nnimap-split-fancy
22962       nnimap-split-fancy '(| (: spam-split) "INBOX"))
22963 @end example
22964
22965 @defvar spam-use-spamoracle
22966 Set to @code{t} if you want Gnus to enable spam filtering using
22967 SpamOracle.
22968 @end defvar
22969
22970 @defvar spam-spamoracle-binary
22971 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
22972 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
22973 can be customized.
22974 @end defvar
22975
22976 @defvar spam-spamoracle-database
22977 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
22978 store its analyses.  This is controlled by the variable
22979 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
22980 the default SpamOracle database will be used.  In case you want your
22981 database to live somewhere special, set
22982 @code{spam-spamoracle-database} to this path.
22983 @end defvar
22984
22985 SpamOracle employs a statistical algorithm to determine whether a
22986 message is spam or ham.  In order to get good results, meaning few
22987 false hits or misses, SpamOracle needs training.  SpamOracle learns the
22988 characteristics of your spam mails.  Using the @emph{add} mode
22989 (training mode) one has to feed good (ham) and spam mails to
22990 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
22991 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
22992 spam- and ham-processors, which is much more convenient.  For a
22993 detailed description of spam- and ham-processors, @xref{Filtering Spam
22994 Using The Spam ELisp Package}.
22995
22996 @defvar gnus-group-spam-exit-processor-spamoracle
22997 Add this symbol to a group's @code{spam-process} parameter by
22998 customizing the group parameter or the
22999 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23000 to a group's @code{spam-process} parameter, spam-marked articles will be
23001 sent to SpamOracle as spam samples.
23002 @end defvar
23003
23004 @defvar gnus-group-ham-exit-processor-spamoracle
23005 Add this symbol to a group's @code{spam-process} parameter by
23006 customizing the group parameter or the
23007 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23008 to a grup's @code{spam-process} parameter, the ham-marked articles in
23009 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23010 messages.  Note that this ham processor has no effect in @emph{spam} or
23011 @emph{unclassified} groups.
23012 @end defvar
23013
23014 @emph{Example:} These are the Group Parameters of an group that has been
23015 classified as a ham group, meaning that it should only contain ham
23016 messages.
23017 @example
23018  ((spam-contents gnus-group-spam-classification-ham)
23019   (spam-process
23020    (gnus-group-spam-exit-processor-spamoracle)))
23021 @end example
23022 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
23023 installed.  If the group contains spam message (e.g. because SpamOracle
23024 has not had enough sample messages yet) and the user marks some
23025 messages as spam messages, these messages will be processed by
23026 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23027 the messages to SpamOracle as new samples for spam.
23028
23029 @node Extending the spam elisp package
23030 @subsubsection Extending the spam elisp package
23031 @cindex spam filtering
23032 @cindex spam elisp package, extending
23033 @cindex extending the spam elisp package
23034
23035 Say you want to add a new back end called blackbox.  For filtering
23036 incoming mail, provide the following:
23037
23038 @enumerate
23039
23040 @item
23041 code
23042
23043 @lisp
23044 (defvar spam-use-blackbox nil
23045   "True if blackbox should be used.")
23046 @end lisp
23047
23048 Add
23049 @example
23050     (spam-use-blackbox   . spam-check-blackbox)
23051 @end example
23052 to @code{spam-list-of-checks}.
23053
23054 @item
23055 functionality
23056
23057 Write the @code{spam-check-blackbox} function.  It should return
23058 @samp{nil} or @code{spam-split-group}.  See the existing
23059 @code{spam-check-*} functions for examples of what you can do.
23060
23061 Make sure to add @code{spam-use-blackbox} to
23062 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23063 mail analyzer that needs the full message body to operate.
23064
23065 @end enumerate
23066
23067 For processing spam and ham messages, provide the following:
23068
23069 @enumerate
23070
23071 @item
23072 code
23073
23074 Note you don't have to provide a spam or a ham processor.  Only
23075 provide them if Blackbox supports spam or ham processing.
23076
23077 @lisp
23078 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23079   "The Blackbox summary exit spam processor.
23080 Only applicable to spam groups.")
23081
23082 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23083   "The whitelist summary exit ham processor.
23084 Only applicable to non-spam (unclassified and ham) groups.")
23085
23086 @end lisp
23087
23088 @item
23089 functionality
23090
23091 @lisp
23092 (defun spam-blackbox-register-spam-routine ()
23093   (spam-generic-register-routine
23094    ;; @r{the spam function}
23095    (lambda (article)
23096      (let ((from (spam-fetch-field-from-fast article)))
23097        (when (stringp from)
23098            (blackbox-do-something-with-this-spammer from))))
23099    ;; @r{the ham function}
23100    nil))
23101
23102 (defun spam-blackbox-register-ham-routine ()
23103   (spam-generic-register-routine
23104    ;; @r{the spam function}
23105    nil
23106    ;; @r{the ham function}
23107    (lambda (article)
23108      (let ((from (spam-fetch-field-from-fast article)))
23109        (when (stringp from)
23110            (blackbox-do-something-with-this-ham-sender from))))))
23111 @end lisp
23112
23113 Write the @code{blackbox-do-something-with-this-ham-sender} and
23114 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23115 more complex code than fetching the message sender, but keep in mind
23116 that retrieving the whole message takes significantly longer than the
23117 sender through @code{spam-fetch-field-from-fast}, because the message
23118 senders are kept in memory by Gnus.
23119
23120 @end enumerate
23121
23122
23123 @node Filtering Spam Using Statistics with spam-stat
23124 @subsection Filtering Spam Using Statistics with spam-stat
23125 @cindex Paul Graham
23126 @cindex Graham, Paul
23127 @cindex naive Bayesian spam filtering
23128 @cindex Bayesian spam filtering, naive
23129 @cindex spam filtering, naive Bayesian
23130
23131 Paul Graham has written an excellent essay about spam filtering using
23132 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23133 Spam}.  In it he describes the inherent deficiency of rule-based
23134 filtering as used by SpamAssassin, for example: Somebody has to write
23135 the rules, and everybody else has to install these rules.  You are
23136 always late.  It would be much better, he argues, to filter mail based
23137 on whether it somehow resembles spam or non-spam.  One way to measure
23138 this is word distribution.  He then goes on to describe a solution
23139 that checks whether a new mail resembles any of your other spam mails
23140 or not.
23141
23142 The basic idea is this:  Create a two collections of your mail, one
23143 with spam, one with non-spam.  Count how often each word appears in
23144 either collection, weight this by the total number of mails in the
23145 collections, and store this information in a dictionary.  For every
23146 word in a new mail, determine its probability to belong to a spam or a
23147 non-spam mail.  Use the 15 most conspicuous words, compute the total
23148 probability of the mail being spam.  If this probability is higher
23149 than a certain threshold, the mail is considered to be spam.
23150
23151 Gnus supports this kind of filtering.  But it needs some setting up.
23152 First, you need two collections of your mail, one with spam, one with
23153 non-spam.  Then you need to create a dictionary using these two
23154 collections, and save it.  And last but not least, you need to use
23155 this dictionary in your fancy mail splitting rules.
23156
23157 @menu
23158 * Creating a spam-stat dictionary::
23159 * Splitting mail using spam-stat::
23160 * Low-level interface to the spam-stat dictionary::
23161 @end menu
23162
23163 @node Creating a spam-stat dictionary
23164 @subsubsection Creating a spam-stat dictionary
23165
23166 Before you can begin to filter spam based on statistics, you must
23167 create these statistics based on two mail collections, one with spam,
23168 one with non-spam.  These statistics are then stored in a dictionary
23169 for later use.  In order for these statistics to be meaningful, you
23170 need several hundred emails in both collections.
23171
23172 Gnus currently supports only the nnml back end for automated dictionary
23173 creation.  The nnml back end stores all mails in a directory, one file
23174 per mail.  Use the following:
23175
23176 @defun spam-stat-process-spam-directory
23177 Create spam statistics for every file in this directory.  Every file
23178 is treated as one spam mail.
23179 @end defun
23180
23181 @defun spam-stat-process-non-spam-directory
23182 Create non-spam statistics for every file in this directory.  Every
23183 file is treated as one non-spam mail.
23184 @end defun
23185
23186 Usually you would call @code{spam-stat-process-spam-directory} on a
23187 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23188 the the group @samp{nnml:mail.spam}), and you would call
23189 @code{spam-stat-process-non-spam-directory} on a directory such as
23190 @file{~/Mail/mail/misc} (this usually corresponds the the group
23191 @samp{nnml:mail.misc}).
23192
23193 When you are using @acronym{IMAP}, you won't have the mails available
23194 locally, so that will not work.  One solution is to use the Gnus Agent
23195 to cache the articles.  Then you can use directories such as
23196 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23197 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23198
23199 @defvar spam-stat
23200 This variable holds the hash-table with all the statistics---the
23201 dictionary we have been talking about.  For every word in either
23202 collection, this hash-table stores a vector describing how often the
23203 word appeared in spam and often it appeared in non-spam mails.
23204 @end defvar
23205
23206 If you want to regenerate the statistics from scratch, you need to
23207 reset the dictionary.
23208
23209 @defun spam-stat-reset
23210 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23211 @end defun
23212
23213 When you are done, you must save the dictionary.  The dictionary may
23214 be rather large.  If you will not update the dictionary incrementally
23215 (instead, you will recreate it once a month, for example), then you
23216 can reduce the size of the dictionary by deleting all words that did
23217 not appear often enough or that do not clearly belong to only spam or
23218 only non-spam mails.
23219
23220 @defun spam-stat-reduce-size
23221 Reduce the size of the dictionary.  Use this only if you do not want
23222 to update the dictionary incrementally.
23223 @end defun
23224
23225 @defun spam-stat-save
23226 Save the dictionary.
23227 @end defun
23228
23229 @defvar spam-stat-file
23230 The filename used to store the dictionary.  This defaults to
23231 @file{~/.spam-stat.el}.
23232 @end defvar
23233
23234 @node Splitting mail using spam-stat
23235 @subsubsection Splitting mail using spam-stat
23236
23237 In order to use @code{spam-stat} to split your mail, you need to add the
23238 following to your @file{~/.gnus.el} file:
23239
23240 @lisp
23241 (require 'spam-stat)
23242 (spam-stat-load)
23243 @end lisp
23244
23245 This will load the necessary Gnus code, and the dictionary you
23246 created.
23247
23248 Next, you need to adapt your fancy splitting rules:  You need to
23249 determine how to use @code{spam-stat}.  The following examples are for
23250 the nnml back end.  Using the nnimap back end works just as well.  Just
23251 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23252
23253 In the simplest case, you only have two groups, @samp{mail.misc} and
23254 @samp{mail.spam}.  The following expression says that mail is either
23255 spam or it should go into @samp{mail.misc}.  If it is spam, then
23256 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23257
23258 @lisp
23259 (setq nnmail-split-fancy
23260       `(| (: spam-stat-split-fancy)
23261           "mail.misc"))
23262 @end lisp
23263
23264 @defvar spam-stat-split-fancy-spam-group
23265 The group to use for spam.  Default is @samp{mail.spam}.
23266 @end defvar
23267
23268 If you also filter mail with specific subjects into other groups, use
23269 the following expression.  Only mails not matching the regular
23270 expression are considered potential spam.
23271
23272 @lisp
23273 (setq nnmail-split-fancy
23274       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23275           (: spam-stat-split-fancy)
23276           "mail.misc"))
23277 @end lisp
23278
23279 If you want to filter for spam first, then you must be careful when
23280 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23281 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23282 non-spam, therefore both should be in your collection of non-spam
23283 mails, when creating the dictionary!
23284
23285 @lisp
23286 (setq nnmail-split-fancy
23287       `(| (: spam-stat-split-fancy)
23288           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23289           "mail.misc"))
23290 @end lisp
23291
23292 You can combine this with traditional filtering.  Here, we move all
23293 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23294 @code{spam-stat-split-fancy} will never see them, the mails in
23295 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23296 nor in your collection of non-spam mails, when creating the
23297 dictionary!
23298
23299 @lisp
23300 (setq nnmail-split-fancy
23301       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23302           (: spam-stat-split-fancy)
23303           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23304           "mail.misc"))
23305 @end lisp
23306
23307
23308 @node Low-level interface to the spam-stat dictionary
23309 @subsubsection Low-level interface to the spam-stat dictionary
23310
23311 The main interface to using @code{spam-stat}, are the following functions:
23312
23313 @defun spam-stat-buffer-is-spam
23314 Called in a buffer, that buffer is considered to be a new spam mail.
23315 Use this for new mail that has not been processed before.
23316 @end defun
23317
23318 @defun spam-stat-buffer-is-no-spam
23319 Called in a buffer, that buffer is considered to be a new non-spam
23320 mail.  Use this for new mail that has not been processed before.
23321 @end defun
23322
23323 @defun spam-stat-buffer-change-to-spam
23324 Called in a buffer, that buffer is no longer considered to be normal
23325 mail but spam.  Use this to change the status of a mail that has
23326 already been processed as non-spam.
23327 @end defun
23328
23329 @defun spam-stat-buffer-change-to-non-spam
23330 Called in a buffer, that buffer is no longer considered to be spam but
23331 normal mail.  Use this to change the status of a mail that has already
23332 been processed as spam.
23333 @end defun
23334
23335 @defun spam-stat-save
23336 Save the hash table to the file.  The filename used is stored in the
23337 variable @code{spam-stat-file}.
23338 @end defun
23339
23340 @defun spam-stat-load
23341 Load the hash table from a file.  The filename used is stored in the
23342 variable @code{spam-stat-file}.
23343 @end defun
23344
23345 @defun spam-stat-score-word
23346 Return the spam score for a word.
23347 @end defun
23348
23349 @defun spam-stat-score-buffer
23350 Return the spam score for a buffer.
23351 @end defun
23352
23353 @defun spam-stat-split-fancy
23354 Use this function for fancy mail splitting.  Add the rule @samp{(:
23355 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23356 @end defun
23357
23358 Make sure you load the dictionary before using it.  This requires the
23359 following in your @file{~/.gnus.el} file:
23360
23361 @lisp
23362 (require 'spam-stat)
23363 (spam-stat-load)
23364 @end lisp
23365
23366 Typical test will involve calls to the following functions:
23367
23368 @smallexample
23369 Reset: (setq spam-stat (make-hash-table :test 'equal))
23370 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23371 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23372 Save table: (spam-stat-save)
23373 File size: (nth 7 (file-attributes spam-stat-file))
23374 Number of words: (hash-table-count spam-stat)
23375 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23376 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23377 Reduce table size: (spam-stat-reduce-size)
23378 Save table: (spam-stat-save)
23379 File size: (nth 7 (file-attributes spam-stat-file))
23380 Number of words: (hash-table-count spam-stat)
23381 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23382 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23383 @end smallexample
23384
23385 Here is how you would create your dictionary:
23386
23387 @smallexample
23388 Reset: (setq spam-stat (make-hash-table :test 'equal))
23389 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23390 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23391 Repeat for any other non-spam group you need...
23392 Reduce table size: (spam-stat-reduce-size)
23393 Save table: (spam-stat-save)
23394 @end smallexample
23395
23396 @node Various Various
23397 @section Various Various
23398 @cindex mode lines
23399 @cindex highlights
23400
23401 @table @code
23402
23403 @item gnus-home-directory
23404 @vindex gnus-home-directory
23405 All Gnus file and directory variables will be initialized from this
23406 variable, which defaults to @file{~/}.
23407
23408 @item gnus-directory
23409 @vindex gnus-directory
23410 Most Gnus storage file and directory variables will be initialized from
23411 this variable, which defaults to the @env{SAVEDIR} environment
23412 variable, or @file{~/News/} if that variable isn't set.
23413
23414 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
23415 This means that other directory variables that are initialized from this
23416 variable won't be set properly if you set this variable in
23417 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
23418
23419 @item gnus-default-directory
23420 @vindex gnus-default-directory
23421 Not related to the above variable at all---this variable says what the
23422 default directory of all Gnus buffers should be.  If you issue commands
23423 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23424 default directory.  If this variable is @code{nil} (which is the
23425 default), the default directory will be the default directory of the
23426 buffer you were in when you started Gnus.
23427
23428 @item gnus-verbose
23429 @vindex gnus-verbose
23430 This variable is an integer between zero and ten.  The higher the value,
23431 the more messages will be displayed.  If this variable is zero, Gnus
23432 will never flash any messages, if it is seven (which is the default),
23433 most important messages will be shown, and if it is ten, Gnus won't ever
23434 shut up, but will flash so many messages it will make your head swim.
23435
23436 @item gnus-verbose-backends
23437 @vindex gnus-verbose-backends
23438 This variable works the same way as @code{gnus-verbose}, but it applies
23439 to the Gnus back ends instead of Gnus proper.
23440
23441 @item nnheader-max-head-length
23442 @vindex nnheader-max-head-length
23443 When the back ends read straight heads of articles, they all try to read
23444 as little as possible.  This variable (default 4096) specifies
23445 the absolute max length the back ends will try to read before giving up
23446 on finding a separator line between the head and the body.  If this
23447 variable is @code{nil}, there is no upper read bound.  If it is
23448 @code{t}, the back ends won't try to read the articles piece by piece,
23449 but read the entire articles.  This makes sense with some versions of
23450 @code{ange-ftp} or @code{efs}.
23451
23452 @item nnheader-head-chop-length
23453 @vindex nnheader-head-chop-length
23454 This variable (default 2048) says how big a piece of each article to
23455 read when doing the operation described above.
23456
23457 @item nnheader-file-name-translation-alist
23458 @vindex nnheader-file-name-translation-alist
23459 @cindex file names
23460 @cindex invalid characters in file names
23461 @cindex characters in file names
23462 This is an alist that says how to translate characters in file names.
23463 For instance, if @samp{:} is invalid as a file character in file names
23464 on your system (you OS/2 user you), you could say something like:
23465
23466 @lisp
23467 @group
23468 (setq nnheader-file-name-translation-alist
23469       '((?: . ?_)))
23470 @end group
23471 @end lisp
23472
23473 In fact, this is the default value for this variable on OS/2 and MS
23474 Windows (phooey) systems.
23475
23476 @item gnus-hidden-properties
23477 @vindex gnus-hidden-properties
23478 This is a list of properties to use to hide ``invisible'' text.  It is
23479 @code{(invisible t intangible t)} by default on most systems, which
23480 makes invisible text invisible and intangible.
23481
23482 @item gnus-parse-headers-hook
23483 @vindex gnus-parse-headers-hook
23484 A hook called before parsing headers.  It can be used, for instance, to
23485 gather statistics on the headers fetched, or perhaps you'd like to prune
23486 some headers.  I don't see why you'd want that, though.
23487
23488 @item gnus-shell-command-separator
23489 @vindex gnus-shell-command-separator
23490 String used to separate two shell commands.  The default is @samp{;}.
23491
23492 @item gnus-invalid-group-regexp
23493 @vindex gnus-invalid-group-regexp
23494
23495 Regexp to match ``invalid'' group names when querying user for a group
23496 name.  The default value catches some @strong{really} invalid group
23497 names who could possibly mess up Gnus internally (like allowing
23498 @samp{:} in a group name, which is normally used to delimit method and
23499 group).
23500
23501 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23502
23503
23504 @end table
23505
23506 @node The End
23507 @chapter The End
23508
23509 Well, that's the manual---you can get on with your life now.  Keep in
23510 touch.  Say hello to your cats from me.
23511
23512 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23513
23514 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23515
23516 @quotation
23517 @strong{Te Deum}
23518
23519 @sp 1
23520 Not because of victories @*
23521 I sing,@*
23522 having none,@*
23523 but for the common sunshine,@*
23524 the breeze,@*
23525 the largess of the spring.
23526
23527 @sp 1
23528 Not for victory@*
23529 but for the day's work done@*
23530 as well as I was able;@*
23531 not for a seat upon the dais@*
23532 but at the common table.@*
23533 @end quotation
23534
23535
23536 @node Appendices
23537 @chapter Appendices
23538
23539 @menu
23540 * XEmacs::                      Requirements for installing under XEmacs.
23541 * History::                     How Gnus got where it is today.
23542 * On Writing Manuals::          Why this is not a beginner's guide.
23543 * Terminology::                 We use really difficult, like, words here.
23544 * Customization::               Tailoring Gnus to your needs.
23545 * Troubleshooting::             What you might try if things do not work.
23546 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23547 * Emacs for Heathens::          A short introduction to Emacsian terms.
23548 * Frequently Asked Questions::  The Gnus FAQ
23549 @end menu
23550
23551
23552 @node XEmacs
23553 @section XEmacs
23554 @cindex XEmacs
23555 @cindex installing under XEmacs
23556
23557 XEmacs is distributed as a collection of packages.  You should install
23558 whatever packages the Gnus XEmacs package requires.  The current
23559 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23560 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23561 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23562 @samp{misc-games} package is required for Morse decoding.
23563
23564
23565 @node History
23566 @section History
23567
23568 @cindex history
23569 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23570 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23571
23572 If you want to investigate the person responsible for this outrage,
23573 you can point your (feh!) web browser to
23574 @uref{http://quimby.gnus.org/}.  This is also the primary
23575 distribution point for the new and spiffy versions of Gnus, and is
23576 known as The Site That Destroys Newsrcs And Drives People Mad.
23577
23578 During the first extended alpha period of development, the new Gnus was
23579 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23580 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23581 (Besides, the ``Gnus'' in this abbreviation should probably be
23582 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23583 appropriate name, don't you think?)
23584
23585 In any case, after spending all that energy on coming up with a new and
23586 spunky name, we decided that the name was @emph{too} spunky, so we
23587 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23588 ``@sc{gnus}''.  New vs. old.
23589
23590 @menu
23591 * Gnus Versions::               What Gnus versions have been released.
23592 * Other Gnus Versions::         Other Gnus versions that also have been released.
23593 * Why?::                        What's the point of Gnus?
23594 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23595 * Conformity::                  Gnus tries to conform to all standards.
23596 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23597 * Gnus Development::            How Gnus is developed.
23598 * Contributors::                Oodles of people.
23599 * New Features::                Pointers to some of the new stuff in Gnus.
23600 @end menu
23601
23602
23603 @node Gnus Versions
23604 @subsection Gnus Versions
23605 @cindex ding Gnus
23606 @cindex September Gnus
23607 @cindex Red Gnus
23608 @cindex Quassia Gnus
23609 @cindex Pterodactyl Gnus
23610 @cindex Oort Gnus
23611 @cindex No Gnus
23612 @cindex Gnus versions
23613
23614 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23615 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23616 plus 15 Gnus 5.0 releases).
23617
23618 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23619 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23620
23621 On July 28th 1996 work on Red Gnus was begun, and it was released on
23622 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23623
23624 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23625 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23626
23627 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23628 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23629 1999.
23630
23631 On the 26th of October 2000, Oort Gnus was begun.
23632
23633 If you happen upon a version of Gnus that has a prefixed name --
23634 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23635 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23636 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23637 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23638 released version of Gnus and snuggle up to that instead.
23639
23640
23641 @node Other Gnus Versions
23642 @subsection Other Gnus Versions
23643 @cindex Semi-gnus
23644
23645 In addition to the versions of Gnus which have had their releases
23646 coordinated by Lars, one major development has been Semi-gnus from
23647 Japan.  It's based on a library called @acronym{SEMI}, which provides
23648 @acronym{MIME} capabilities.
23649
23650 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23651 Collectively, they are called ``Semi-gnus'', and different strains are
23652 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23653 @acronym{MIME} and multilingualization things, especially important for
23654 Japanese users.
23655
23656
23657 @node Why?
23658 @subsection Why?
23659
23660 What's the point of Gnus?
23661
23662 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23663 newsreader, that lets you do anything you can think of.  That was my
23664 original motivation, but while working on Gnus, it has become clear to
23665 me that this generation of newsreaders really belong in the stone age.
23666 Newsreaders haven't developed much since the infancy of the net.  If the
23667 volume continues to rise with the current rate of increase, all current
23668 newsreaders will be pretty much useless.  How do you deal with
23669 newsgroups that have thousands of new articles each day?  How do you
23670 keep track of millions of people who post?
23671
23672 Gnus offers no real solutions to these questions, but I would very much
23673 like to see Gnus being used as a testing ground for new methods of
23674 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23675 to separate the newsreader from the back ends, Gnus now offers a simple
23676 interface for anybody who wants to write new back ends for fetching mail
23677 and news from different sources.  I have added hooks for customizations
23678 everywhere I could imagine it being useful.  By doing so, I'm inviting
23679 every one of you to explore and invent.
23680
23681 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23682 @kbd{C-u 100 M-x all-hail-xemacs}.
23683
23684
23685 @node Compatibility
23686 @subsection Compatibility
23687
23688 @cindex compatibility
23689 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23690 bindings have been kept.  More key bindings have been added, of course,
23691 but only in one or two obscure cases have old bindings been changed.
23692
23693 Our motto is:
23694 @quotation
23695 @cartouche
23696 @center In a cloud bones of steel.
23697 @end cartouche
23698 @end quotation
23699
23700 All commands have kept their names.  Some internal functions have changed
23701 their names.
23702
23703 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23704 Articles}.
23705
23706 One major compatibility question is the presence of several summary
23707 buffers.  All variables relevant while reading a group are
23708 buffer-local to the summary buffer they belong in.  Although many
23709 important variables have their values copied into their global
23710 counterparts whenever a command is executed in the summary buffer, this
23711 change might lead to incorrect values being used unless you are careful.
23712
23713 All code that relies on knowledge of @sc{gnus} internals will probably
23714 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23715 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23716 maintains a hash table that points to the entries in this alist (which
23717 speeds up many functions), and changing the alist directly will lead to
23718 peculiar results.
23719
23720 @cindex hilit19
23721 @cindex highlighting
23722 Old hilit19 code does not work at all.  In fact, you should probably
23723 remove all hilit code from all Gnus hooks
23724 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23725 Gnus provides various integrated functions for highlighting.  These are
23726 faster and more accurate.  To make life easier for everybody, Gnus will
23727 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23728 Away!
23729
23730 Packages like @code{expire-kill} will no longer work.  As a matter of
23731 fact, you should probably remove all old @sc{gnus} packages (and other
23732 code) when you start using Gnus.  More likely than not, Gnus already
23733 does what you have written code to make @sc{gnus} do.  (Snicker.)
23734
23735 Even though old methods of doing things are still supported, only the
23736 new methods are documented in this manual.  If you detect a new method of
23737 doing something while reading this manual, that does not mean you have
23738 to stop doing it the old way.
23739
23740 Gnus understands all @sc{gnus} startup files.
23741
23742 @kindex M-x gnus-bug
23743 @findex gnus-bug
23744 @cindex reporting bugs
23745 @cindex bugs
23746 Overall, a casual user who hasn't written much code that depends on
23747 @sc{gnus} internals should suffer no problems.  If problems occur,
23748 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23749
23750 @vindex gnus-bug-create-help-buffer
23751 If you are in the habit of sending bug reports @emph{very} often, you
23752 may find the helpful help buffer annoying after a while.  If so, set
23753 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23754 up at you.
23755
23756
23757 @node Conformity
23758 @subsection Conformity
23759
23760 No rebels without a clue here, ma'am.  We conform to all standards known
23761 to (wo)man.  Except for those standards and/or conventions we disagree
23762 with, of course.
23763
23764 @table @strong
23765
23766 @item RFC (2)822
23767 @cindex RFC 822
23768 @cindex RFC 2822
23769 There are no known breaches of this standard.
23770
23771 @item RFC 1036
23772 @cindex RFC 1036
23773 There are no known breaches of this standard, either.
23774
23775 @item Son-of-RFC 1036
23776 @cindex Son-of-RFC 1036
23777 We do have some breaches to this one.
23778
23779 @table @emph
23780
23781 @item X-Newsreader
23782 @itemx User-Agent
23783 These are considered to be ``vanity headers'', while I consider them
23784 to be consumer information.  After seeing so many badly formatted
23785 articles coming from @code{tin} and @code{Netscape} I know not to use
23786 either of those for posting articles.  I would not have known that if
23787 it wasn't for the @code{X-Newsreader} header.
23788 @end table
23789
23790 @item USEFOR
23791 @cindex USEFOR
23792 USEFOR is an IETF working group writing a successor to RFC 1036, based
23793 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23794 various changes to the format of news articles.  The Gnus towers will
23795 look into implementing the changes when the draft is accepted as an RFC.
23796
23797 @item MIME - RFC 2045-2049 etc
23798 @cindex @acronym{MIME}
23799 All the various @acronym{MIME} RFCs are supported.
23800
23801 @item Disposition Notifications - RFC 2298
23802 Message Mode is able to request notifications from the receiver.
23803
23804 @item PGP - RFC 1991 and RFC 2440
23805 @cindex RFC 1991
23806 @cindex RFC 2440
23807 RFC 1991 is the original @acronym{PGP} message specification,
23808 published as an informational RFC.  RFC 2440 was the follow-up, now
23809 called Open PGP, and put on the Standards Track.  Both document a
23810 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23811 encoding (signing and encryption) and decoding (verification and
23812 decryption).
23813
23814 @item PGP/MIME - RFC 2015/3156
23815 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23816 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23817 Gnus supports both encoding and decoding.
23818
23819 @item S/MIME - RFC 2633
23820 RFC 2633 describes the @acronym{S/MIME} format.
23821
23822 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23823 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23824 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23825 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23826 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23827 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23828 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23829 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23830
23831 @end table
23832
23833 If you ever notice Gnus acting non-compliant with regards to the texts
23834 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23835 know.
23836
23837
23838 @node Emacsen
23839 @subsection Emacsen
23840 @cindex Emacsen
23841 @cindex XEmacs
23842 @cindex Mule
23843 @cindex Emacs
23844
23845 Gnus should work on :
23846
23847 @itemize @bullet
23848
23849 @item
23850 Emacs 20.3 and up.
23851
23852 @item
23853 XEmacs 21.1.1 and up.
23854
23855 @end itemize
23856
23857 This Gnus version will absolutely not work on any Emacsen older than
23858 that.  Not reliably, at least.  Older versions of Gnus may work on older
23859 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
23860 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
23861 See the file ``README'' in the T-gnus distribution for more details.
23862
23863 There are some vague differences between Gnus on the various
23864 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23865 other than that, things should look pretty much the same under all
23866 Emacsen.
23867
23868
23869 @node Gnus Development
23870 @subsection Gnus Development
23871
23872 Gnus is developed in a two-phased cycle.  The first phase involves much
23873 discussion on the @samp{ding@@gnus.org} mailing list, where people
23874 propose changes and new features, post patches and new back ends.  This
23875 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23876 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23877 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23878 unstable and should not be used by casual users.  Gnus alpha releases
23879 have names like ``Red Gnus'' and ``Quassia Gnus''.
23880
23881 After futzing around for 50-100 alpha releases, Gnus is declared
23882 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23883 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23884 supposed to be able to use these, and these are mostly discussed on the
23885 @samp{gnu.emacs.gnus} newsgroup.
23886
23887 @cindex Incoming*
23888 @vindex mail-source-delete-incoming
23889 Some variable defaults differ between alpha Gnusae and released Gnusae.
23890 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23891 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23892 lossage of mail if an alpha release hiccups while handling the mail.
23893
23894 The division of discussion between the ding mailing list and the Gnus
23895 newsgroup is not purely based on publicity concerns.  It's true that
23896 having people write about the horrible things that an alpha Gnus release
23897 can do (sometimes) in a public forum may scare people off, but more
23898 importantly, talking about new experimental features that have been
23899 introduced may confuse casual users.  New features are frequently
23900 introduced, fiddled with, and judged to be found wanting, and then
23901 either discarded or totally rewritten.  People reading the mailing list
23902 usually keep up with these rapid changes, while people on the newsgroup
23903 can't be assumed to do so.
23904
23905
23906
23907 @node Contributors
23908 @subsection Contributors
23909 @cindex contributors
23910
23911 The new Gnus version couldn't have been done without the help of all the
23912 people on the (ding) mailing list.  Every day for over a year I have
23913 gotten billions of nice bug reports from them, filling me with joy,
23914 every single one of them.  Smooches.  The people on the list have been
23915 tried beyond endurance, what with my ``oh, that's a neat idea <type
23916 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23917 work at all <type type>, yup, I'll ship that one off right away <ship
23918 off> no, wait, that absolutely does not work'' policy for releases.
23919 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23920 ``worser''? ``much worser''?  ``worsest''?)
23921
23922 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23923 wrong show.
23924
23925 @itemize @bullet
23926
23927 @item
23928 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23929
23930 @item
23931 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23932 nnwarchive and many, many other things connected with @acronym{MIME} and
23933 other types of en/decoding, as well as general bug fixing, new
23934 functionality and stuff.
23935
23936 @item
23937 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23938 well as numerous other things).
23939
23940 @item
23941 Luis Fernandes---design and graphics.
23942
23943 @item
23944 Joe Reiss---creator of the smiley faces.
23945
23946 @item
23947 Justin Sheehy---the @acronym{FAQ} maintainer.
23948
23949 @item
23950 Erik Naggum---help, ideas, support, code and stuff.
23951
23952 @item
23953 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23954 @dfn{picons} (@pxref{Picons}).
23955
23956 @item
23957 Kim-Minh Kaplan---further work on the picon code.
23958
23959 @item
23960 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23961 (@pxref{GroupLens}).
23962
23963 @item
23964 Sudish Joseph---innumerable bug fixes.
23965
23966 @item
23967 Ilja Weis---@file{gnus-topic.el}.
23968
23969 @item
23970 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23971
23972 @item
23973 Vladimir Alexiev---the refcard and reference booklets.
23974
23975 @item
23976 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23977 distribution by Felix Lee and JWZ.
23978
23979 @item
23980 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23981
23982 @item
23983 Peter Mutsaers---orphan article scoring code.
23984
23985 @item
23986 Ken Raeburn---POP mail support.
23987
23988 @item
23989 Hallvard B Furuseth---various bits and pieces, especially dealing with
23990 .newsrc files.
23991
23992 @item
23993 Brian Edmonds---@file{gnus-bbdb.el}.
23994
23995 @item
23996 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23997
23998 @item
23999 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24000
24001 @item
24002 François Pinard---many, many interesting and thorough bug reports, as
24003 well as autoconf support.
24004
24005 @end itemize
24006
24007 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24008 Borges, and Jost Krieger proof-reading parts of the manual.
24009
24010 The following people have contributed many patches and suggestions:
24011
24012 Christopher Davis,
24013 Andrew Eskilsson,
24014 Kai Grossjohann,
24015 Kevin Greiner,
24016 Jesper Harder,
24017 Paul Jarc,
24018 Simon Josefsson,
24019 David KÃ¥gedal,
24020 Richard Pieri,
24021 Fabrice Popineau,
24022 Daniel Quinlan,
24023 Michael Shields,
24024 Reiner Steib,
24025 Jason L. Tibbitts, III,
24026 Jack Vinson,
24027 Katsumi Yamaoka, @c Yamaoka
24028 and
24029 Teodor Zlatanov.
24030
24031 Also thanks to the following for patches and stuff:
24032
24033 Jari Aalto,
24034 Adrian Aichner,
24035 Vladimir Alexiev,
24036 Russ Allbery,
24037 Peter Arius,
24038 Matt Armstrong,
24039 Marc Auslander,
24040 Miles Bader,
24041 Alexei V. Barantsev,
24042 Frank Bennett,
24043 Robert Bihlmeyer,
24044 Chris Bone,
24045 Mark Borges,
24046 Mark Boyns,
24047 Lance A. Brown,
24048 Rob Browning,
24049 Kees de Bruin,
24050 Martin Buchholz,
24051 Joe Buehler,
24052 Kevin Buhr,
24053 Alastair Burt,
24054 Joao Cachopo,
24055 Zlatko Calusic,
24056 Massimo Campostrini,
24057 Castor,
24058 David Charlap,
24059 Dan Christensen,
24060 Kevin Christian,
24061 Jae-you Chung, @c ?
24062 James H. Cloos, Jr.,
24063 Laura Conrad,
24064 Michael R. Cook,
24065 Glenn Coombs,
24066 Andrew J. Cosgriff,
24067 Neil Crellin,
24068 Frank D. Cringle,
24069 Geoffrey T. Dairiki,
24070 Andre Deparade,
24071 Ulrik Dickow,
24072 Dave Disser,
24073 Rui-Tao Dong, @c ?
24074 Joev Dubach,
24075 Michael Welsh Duggan,
24076 Dave Edmondson,
24077 Paul Eggert,
24078 Mark W. Eichin,
24079 Karl Eichwalder,
24080 Enami Tsugutomo, @c Enami
24081 Michael Ernst,
24082 Luc Van Eycken,
24083 Sam Falkner,
24084 Nelson Jose dos Santos Ferreira,
24085 Sigbjorn Finne,
24086 Sven Fischer,
24087 Paul Fisher,
24088 Decklin Foster,
24089 Gary D. Foster,
24090 Paul Franklin,
24091 Guy Geens,
24092 Arne Georg Gleditsch,
24093 David S. Goldberg,
24094 Michelangelo Grigni,
24095 Dale Hagglund,
24096 D. Hall,
24097 Magnus Hammerin,
24098 Kenichi Handa, @c Handa
24099 Raja R. Harinath,
24100 Yoshiki Hayashi, @c Hayashi
24101 P. E. Jareth Hein,
24102 Hisashige Kenji, @c Hisashige
24103 Scott Hofmann,
24104 Marc Horowitz,
24105 Gunnar Horrigmo,
24106 Richard Hoskins,
24107 Brad Howes,
24108 Miguel de Icaza,
24109 François Felix Ingrand,
24110 Tatsuya Ichikawa, @c Ichikawa
24111 Ishikawa Ichiro, @c Ishikawa
24112 Lee Iverson,
24113 Iwamuro Motonori, @c Iwamuro
24114 Rajappa Iyer,
24115 Andreas Jaeger,
24116 Adam P. Jenkins,
24117 Randell Jesup,
24118 Fred Johansen,
24119 Gareth Jones,
24120 Greg Klanderman,
24121 Karl Kleinpaste,
24122 Michael Klingbeil,
24123 Peter Skov Knudsen,
24124 Shuhei Kobayashi, @c Kobayashi
24125 Petr Konecny,
24126 Koseki Yoshinori, @c Koseki
24127 Thor Kristoffersen,
24128 Jens Lautenbacher,
24129 Martin Larose,
24130 Seokchan Lee, @c Lee
24131 Joerg Lenneis,
24132 Carsten Leonhardt,
24133 James LewisMoss,
24134 Christian Limpach,
24135 Markus Linnala,
24136 Dave Love,
24137 Mike McEwan,
24138 Tonny Madsen,
24139 Shlomo Mahlab,
24140 Nat Makarevitch,
24141 Istvan Marko,
24142 David Martin,
24143 Jason R. Mastaler,
24144 Gordon Matzigkeit,
24145 Timo Metzemakers,
24146 Richard Mlynarik,
24147 Lantz Moore,
24148 Morioka Tomohiko, @c Morioka
24149 Erik Toubro Nielsen,
24150 Hrvoje Niksic,
24151 Andy Norman,
24152 Fred Oberhauser,
24153 C. R. Oldham,
24154 Alexandre Oliva,
24155 Ken Olstad,
24156 Masaharu Onishi, @c Onishi
24157 Hideki Ono, @c Ono
24158 Ettore Perazzoli,
24159 William Perry,
24160 Stephen Peters,
24161 Jens-Ulrik Holger Petersen,
24162 Ulrich Pfeifer,
24163 Matt Pharr,
24164 Andy Piper,
24165 John McClary Prevost,
24166 Bill Pringlemeir,
24167 Mike Pullen,
24168 Jim Radford,
24169 Colin Rafferty,
24170 Lasse Rasinen,
24171 Lars Balker Rasmussen,
24172 Joe Reiss,
24173 Renaud Rioboo,
24174 Roland B. Roberts,
24175 Bart Robinson,
24176 Christian von Roques,
24177 Markus Rost,
24178 Jason Rumney,
24179 Wolfgang Rupprecht,
24180 Jay Sachs,
24181 Dewey M. Sasser,
24182 Conrad Sauerwald,
24183 Loren Schall,
24184 Dan Schmidt,
24185 Ralph Schleicher,
24186 Philippe Schnoebelen,
24187 Andreas Schwab,
24188 Randal L. Schwartz,
24189 Danny Siu,
24190 Matt Simmons,
24191 Paul D. Smith,
24192 Jeff Sparkes,
24193 Toby Speight,
24194 Michael Sperber,
24195 Darren Stalder,
24196 Richard Stallman,
24197 Greg Stark,
24198 Sam Steingold,
24199 Paul Stevenson,
24200 Jonas Steverud,
24201 Paul Stodghill,
24202 Kiyokazu Suto, @c Suto
24203 Kurt Swanson,
24204 Samuel Tardieu,
24205 Teddy,
24206 Chuck Thompson,
24207 Tozawa Akihiko, @c Tozawa
24208 Philippe Troin,
24209 James Troup,
24210 Trung Tran-Duc,
24211 Jack Twilley,
24212 Aaron M. Ucko,
24213 Aki Vehtari,
24214 Didier Verna,
24215 Vladimir Volovich,
24216 Jan Vroonhof,
24217 Stefan Waldherr,
24218 Pete Ware,
24219 Barry A. Warsaw,
24220 Christoph Wedler,
24221 Joe Wells,
24222 Lee Willis,
24223 and
24224 Lloyd Zusman.
24225
24226
24227 For a full overview of what each person has done, the ChangeLogs
24228 included in the Gnus alpha distributions should give ample reading
24229 (550kB and counting).
24230
24231 Apologies to everybody that I've forgotten, of which there are many, I'm
24232 sure.
24233
24234 Gee, that's quite a list of people.  I guess that must mean that there
24235 actually are people who are using Gnus.  Who'd'a thunk it!
24236
24237
24238 @node New Features
24239 @subsection New Features
24240 @cindex new features
24241
24242 @menu
24243 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24244 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24245 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24246 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24247 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24248 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24249 @end menu
24250
24251 These lists are, of course, just @emph{short} overviews of the
24252 @emph{most} important new features.  No, really.  There are tons more.
24253 Yes, we have feeping creaturism in full effect.
24254
24255 @node ding Gnus
24256 @subsubsection (ding) Gnus
24257
24258 New features in Gnus 5.0/5.1:
24259
24260 @itemize @bullet
24261
24262 @item
24263 The look of all buffers can be changed by setting format-like variables
24264 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24265
24266 @item
24267 Local spool and several @acronym{NNTP} servers can be used at once
24268 (@pxref{Select Methods}).
24269
24270 @item
24271 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24272
24273 @item
24274 You can read a number of different mail formats (@pxref{Getting Mail}).
24275 All the mail back ends implement a convenient mail expiry scheme
24276 (@pxref{Expiring Mail}).
24277
24278 @item
24279 Gnus can use various strategies for gathering threads that have lost
24280 their roots (thereby gathering loose sub-threads into one thread) or it
24281 can go back and retrieve enough headers to build a complete thread
24282 (@pxref{Customizing Threading}).
24283
24284 @item
24285 Killed groups can be displayed in the group buffer, and you can read
24286 them as well (@pxref{Listing Groups}).
24287
24288 @item
24289 Gnus can do partial group updates---you do not have to retrieve the
24290 entire active file just to check for new articles in a few groups
24291 (@pxref{The Active File}).
24292
24293 @item
24294 Gnus implements a sliding scale of subscribedness to groups
24295 (@pxref{Group Levels}).
24296
24297 @item
24298 You can score articles according to any number of criteria
24299 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24300 articles for you (@pxref{Adaptive Scoring}).
24301
24302 @item
24303 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24304 manner, so it should be difficult to lose much data on what you have
24305 read if your machine should go down (@pxref{Auto Save}).
24306
24307 @item
24308 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24309 cluttering up the @file{.emacs} file.
24310
24311 @item
24312 You can set the process mark on both groups and articles and perform
24313 operations on all the marked items (@pxref{Process/Prefix}).
24314
24315 @item
24316 You can grep through a subset of groups and create a group from the
24317 results (@pxref{Kibozed Groups}).
24318
24319 @item
24320 You can list subsets of groups according to, well, anything
24321 (@pxref{Listing Groups}).
24322
24323 @item
24324 You can browse foreign servers and subscribe to groups from those
24325 servers (@pxref{Browse Foreign Server}).
24326
24327 @item
24328 Gnus can fetch articles, asynchronously, on a second connection to the
24329 server (@pxref{Asynchronous Fetching}).
24330
24331 @item
24332 You can cache articles locally (@pxref{Article Caching}).
24333
24334 @item
24335 The uudecode functions have been expanded and generalized
24336 (@pxref{Decoding Articles}).
24337
24338 @item
24339 You can still post uuencoded articles, which was a little-known feature
24340 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24341
24342 @item
24343 Fetching parents (and other articles) now actually works without
24344 glitches (@pxref{Finding the Parent}).
24345
24346 @item
24347 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24348
24349 @item
24350 Digests (and other files) can be used as the basis for groups
24351 (@pxref{Document Groups}).
24352
24353 @item
24354 Articles can be highlighted and customized (@pxref{Customizing
24355 Articles}).
24356
24357 @item
24358 URLs and other external references can be buttonized (@pxref{Article
24359 Buttons}).
24360
24361 @item
24362 You can do lots of strange stuff with the Gnus window & frame
24363 configuration (@pxref{Window Layout}).
24364
24365 @item
24366 You can click on buttons instead of using the keyboard
24367 (@pxref{Buttons}).
24368
24369 @end itemize
24370
24371
24372 @node September Gnus
24373 @subsubsection September Gnus
24374
24375 @iftex
24376 @iflatex
24377 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24378 @end iflatex
24379 @end iftex
24380
24381 New features in Gnus 5.2/5.3:
24382
24383 @itemize @bullet
24384
24385 @item
24386 A new message composition mode is used.  All old customization variables
24387 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24388 now obsolete.
24389
24390 @item
24391 Gnus is now able to generate @dfn{sparse} threads---threads where
24392 missing articles are represented by empty nodes (@pxref{Customizing
24393 Threading}).
24394
24395 @lisp
24396 (setq gnus-build-sparse-threads 'some)
24397 @end lisp
24398
24399 @item
24400 Outgoing articles are stored on a special archive server
24401 (@pxref{Archived Messages}).
24402
24403 @item
24404 Partial thread regeneration now happens when articles are
24405 referred.
24406
24407 @item
24408 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24409
24410 @item
24411 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24412
24413 @item
24414 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24415
24416 @lisp
24417 (setq gnus-use-trees t)
24418 @end lisp
24419
24420 @item
24421 An @code{nn}-like pick-and-read minor mode is available for the summary
24422 buffers (@pxref{Pick and Read}).
24423
24424 @lisp
24425 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24426 @end lisp
24427
24428 @item
24429 In binary groups you can use a special binary minor mode (@pxref{Binary
24430 Groups}).
24431
24432 @item
24433 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24434 Topics}).
24435
24436 @lisp
24437 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24438 @end lisp
24439
24440 @item
24441 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24442
24443 @item
24444 Groups can now have a score, and bubbling based on entry frequency
24445 is possible (@pxref{Group Score}).
24446
24447 @lisp
24448 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24449 @end lisp
24450
24451 @item
24452 Groups can be process-marked, and commands can be performed on
24453 groups of groups (@pxref{Marking Groups}).
24454
24455 @item
24456 Caching is possible in virtual groups.
24457
24458 @item
24459 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24460 news batches, ClariNet briefs collections, and just about everything
24461 else (@pxref{Document Groups}).
24462
24463 @item
24464 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24465 (@pxref{SOUP}).
24466
24467 @item
24468 The Gnus cache is much faster.
24469
24470 @item
24471 Groups can be sorted according to many criteria (@pxref{Sorting
24472 Groups}).
24473
24474 @item
24475 New group parameters have been introduced to set list-addresses and
24476 expiry times (@pxref{Group Parameters}).
24477
24478 @item
24479 All formatting specs allow specifying faces to be used
24480 (@pxref{Formatting Fonts}).
24481
24482 @item
24483 There are several more commands for setting/removing/acting on process
24484 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24485
24486 @item
24487 The summary buffer can be limited to show parts of the available
24488 articles based on a wide range of criteria.  These commands have been
24489 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24490
24491 @item
24492 Articles can be made persistent with the @kbd{*} command
24493 (@pxref{Persistent Articles}).
24494
24495 @item
24496 All functions for hiding article elements are now toggles.
24497
24498 @item
24499 Article headers can be buttonized (@pxref{Article Washing}).
24500
24501 @item
24502 All mail back ends support fetching articles by @code{Message-ID}.
24503
24504 @item
24505 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24506
24507 @item
24508 All summary mode commands are available directly from the article
24509 buffer (@pxref{Article Keymap}).
24510
24511 @item
24512 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24513 Layout}).
24514
24515 @item
24516 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24517 @iftex
24518 @iflatex
24519 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24520 @end iflatex
24521 @end iftex
24522
24523 @item
24524 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24525
24526 @lisp
24527 (setq gnus-use-nocem t)
24528 @end lisp
24529
24530 @item
24531 Groups can be made permanently visible (@pxref{Listing Groups}).
24532
24533 @lisp
24534 (setq gnus-permanently-visible-groups "^nnml:")
24535 @end lisp
24536
24537 @item
24538 Many new hooks have been introduced to make customizing easier.
24539
24540 @item
24541 Gnus respects the @code{Mail-Copies-To} header.
24542
24543 @item
24544 Threads can be gathered by looking at the @code{References} header
24545 (@pxref{Customizing Threading}).
24546
24547 @lisp
24548 (setq gnus-summary-thread-gathering-function
24549       'gnus-gather-threads-by-references)
24550 @end lisp
24551
24552 @item
24553 Read articles can be stored in a special backlog buffer to avoid
24554 refetching (@pxref{Article Backlog}).
24555
24556 @lisp
24557 (setq gnus-keep-backlog 50)
24558 @end lisp
24559
24560 @item
24561 A clean copy of the current article is always stored in a separate
24562 buffer to allow easier treatment.
24563
24564 @item
24565 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24566
24567 @item
24568 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24569 Articles}).
24570
24571 @lisp
24572 (setq gnus-prompt-before-saving t)
24573 @end lisp
24574
24575 @item
24576 @code{gnus-uu} can view decoded files asynchronously while fetching
24577 articles (@pxref{Other Decode Variables}).
24578
24579 @lisp
24580 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24581 @end lisp
24582
24583 @item
24584 Filling in the article buffer now works properly on cited text
24585 (@pxref{Article Washing}).
24586
24587 @item
24588 Hiding cited text adds buttons to toggle hiding, and how much
24589 cited text to hide is now customizable (@pxref{Article Hiding}).
24590
24591 @lisp
24592 (setq gnus-cited-lines-visible 2)
24593 @end lisp
24594
24595 @item
24596 Boring headers can be hidden (@pxref{Article Hiding}).
24597
24598 @item
24599 Default scoring values can now be set from the menu bar.
24600
24601 @item
24602 Further syntax checking of outgoing articles have been added.
24603
24604 @end itemize
24605
24606
24607 @node Red Gnus
24608 @subsubsection Red Gnus
24609
24610 New features in Gnus 5.4/5.5:
24611
24612 @iftex
24613 @iflatex
24614 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24615 @end iflatex
24616 @end iftex
24617
24618 @itemize @bullet
24619
24620 @item
24621 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24622
24623 @item
24624 Article prefetching functionality has been moved up into
24625 Gnus (@pxref{Asynchronous Fetching}).
24626
24627 @item
24628 Scoring can now be performed with logical operators like @code{and},
24629 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24630 Scoring}).
24631
24632 @item
24633 Article washing status can be displayed in the
24634 article mode line (@pxref{Misc Article}).
24635
24636 @item
24637 @file{gnus.el} has been split into many smaller files.
24638
24639 @item
24640 Suppression of duplicate articles based on Message-ID can be done
24641 (@pxref{Duplicate Suppression}).
24642
24643 @lisp
24644 (setq gnus-suppress-duplicates t)
24645 @end lisp
24646
24647 @item
24648 New variables for specifying what score and adapt files are to be
24649 considered home score and adapt files (@pxref{Home Score File}) have
24650 been added.
24651
24652 @item
24653 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24654 Server Internals}).
24655
24656 @item
24657 Groups can inherit group parameters from parent topics (@pxref{Topic
24658 Parameters}).
24659
24660 @item
24661 Article editing has been revamped and is now actually usable.
24662
24663 @item
24664 Signatures can be recognized in more intelligent fashions
24665 (@pxref{Article Signature}).
24666
24667 @item
24668 Summary pick mode has been made to look more @code{nn}-like.  Line
24669 numbers are displayed and the @kbd{.} command can be used to pick
24670 articles (@code{Pick and Read}).
24671
24672 @item
24673 Commands for moving the @file{.newsrc.eld} from one server to
24674 another have been added (@pxref{Changing Servers}).
24675
24676 @item
24677 There's a way now to specify that ``uninteresting'' fields be suppressed
24678 when generating lines in buffers (@pxref{Advanced Formatting}).
24679
24680 @item
24681 Several commands in the group buffer can be undone with @kbd{C-M-_}
24682 (@pxref{Undo}).
24683
24684 @item
24685 Scoring can be done on words using the new score type @code{w}
24686 (@pxref{Score File Format}).
24687
24688 @item
24689 Adaptive scoring can be done on a Subject word-by-word basis
24690 (@pxref{Adaptive Scoring}).
24691
24692 @lisp
24693 (setq gnus-use-adaptive-scoring '(word))
24694 @end lisp
24695
24696 @item
24697 Scores can be decayed (@pxref{Score Decays}).
24698
24699 @lisp
24700 (setq gnus-decay-scores t)
24701 @end lisp
24702
24703 @item
24704 Scoring can be performed using a regexp on the Date header.  The Date is
24705 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24706
24707 @item
24708 A new command has been added to remove all data on articles from
24709 the native server (@pxref{Changing Servers}).
24710
24711 @item
24712 A new command for reading collections of documents
24713 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24714 (@pxref{Really Various Summary Commands}).
24715
24716 @item
24717 Process mark sets can be pushed and popped (@pxref{Setting Process
24718 Marks}).
24719
24720 @item
24721 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24722 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24723
24724 @item
24725 A new back end for reading searches from Web search engines
24726 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24727 (@pxref{Web Searches}).
24728
24729 @item
24730 Groups inside topics can now be sorted using the standard sorting
24731 functions, and each topic can be sorted independently (@pxref{Topic
24732 Sorting}).
24733
24734 @item
24735 Subsets of the groups can be sorted independently (@code{Sorting
24736 Groups}).
24737
24738 @item
24739 Cached articles can be pulled into the groups (@pxref{Summary Generation
24740 Commands}).
24741 @iftex
24742 @iflatex
24743 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24744 @end iflatex
24745 @end iftex
24746
24747 @item
24748 Score files are now applied in a more reliable order (@pxref{Score
24749 Variables}).
24750
24751 @item
24752 Reports on where mail messages end up can be generated (@pxref{Splitting
24753 Mail}).
24754
24755 @item
24756 More hooks and functions have been added to remove junk from incoming
24757 mail before saving the mail (@pxref{Washing Mail}).
24758
24759 @item
24760 Emphasized text can be properly fontisized:
24761
24762 @end itemize
24763
24764
24765 @node Quassia Gnus
24766 @subsubsection Quassia Gnus
24767
24768 New features in Gnus 5.6:
24769
24770 @itemize @bullet
24771
24772 @item
24773 New functionality for using Gnus as an offline newsreader has been
24774 added.  A plethora of new commands and modes have been added.
24775 @xref{Gnus Unplugged}, for the full story.
24776
24777 @item
24778 The @code{nndraft} back end has returned, but works differently than
24779 before.  All Message buffers are now also articles in the @code{nndraft}
24780 group, which is created automatically.
24781
24782 @item
24783 @code{gnus-alter-header-function} can now be used to alter header
24784 values.
24785
24786 @item
24787 @code{gnus-summary-goto-article} now accept Message-ID's.
24788
24789 @item
24790 A new Message command for deleting text in the body of a message
24791 outside the region: @kbd{C-c C-v}.
24792
24793 @item
24794 You can now post to component group in @code{nnvirtual} groups with
24795 @kbd{C-u C-c C-c}.
24796
24797 @item
24798  @code{nntp-rlogin-program}---new variable to ease customization.
24799
24800 @item
24801 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24802 re-highlighting of the article buffer.
24803
24804 @item
24805 New element in @code{gnus-boring-article-headers}---@code{long-to}.
24806
24807 @item
24808 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
24809 details.
24810
24811 @item
24812 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24813 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24814
24815 @item
24816 @code{gnus-simplify-subject-functions} variable to allow greater
24817 control over simplification.
24818
24819 @item
24820 @kbd{A T}---new command for fetching the current thread.
24821
24822 @item
24823 @kbd{/ T}---new command for including the current thread in the
24824 limit.
24825
24826 @item
24827 @kbd{M-RET} is a new Message command for breaking cited text.
24828
24829 @item
24830 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24831
24832 @item
24833 The @code{custom-face-lookup} function has been removed.
24834 If you used this function in your initialization files, you must
24835 rewrite them to use @code{face-spec-set} instead.
24836
24837 @item
24838 Canceling now uses the current select method.  Symbolic prefix
24839 @kbd{a} forces normal posting method.
24840
24841 @item
24842 New command to translate M******** sm*rtq**t*s into proper
24843 text---@kbd{W d}.
24844
24845 @item
24846 For easier debugging of @code{nntp}, you can set
24847 @code{nntp-record-commands} to a non-@code{nil} value.
24848
24849 @item
24850 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24851 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24852
24853 @item
24854 A command for editing group parameters from the summary buffer
24855 has been added.
24856
24857 @item
24858 A history of where mails have been split is available.
24859
24860 @item
24861 A new article date command has been added---@code{article-date-iso8601}.
24862
24863 @item
24864 Subjects can be simplified when threading by setting
24865 @code{gnus-score-thread-simplify}.
24866
24867 @item
24868 A new function for citing in Message has been
24869 added---@code{message-cite-original-without-signature}.
24870
24871 @item
24872 @code{article-strip-all-blank-lines}---new article command.
24873
24874 @item
24875 A new Message command to kill to the end of the article has
24876 been added.
24877
24878 @item
24879 A minimum adaptive score can be specified by using the
24880 @code{gnus-adaptive-word-minimum} variable.
24881
24882 @item
24883 The ``lapsed date'' article header can be kept continually
24884 updated by the @code{gnus-start-date-timer} command.
24885
24886 @item
24887 Web listserv archives can be read with the @code{nnlistserv} back end.
24888
24889 @item
24890 Old dejanews archives can now be read by @code{nnweb}.
24891
24892 @end itemize
24893
24894 @node Pterodactyl Gnus
24895 @subsubsection Pterodactyl Gnus
24896
24897 New features in Gnus 5.8:
24898
24899 @itemize @bullet
24900
24901 @item
24902 The mail-fetching functions have changed.  See the manual for the
24903 many details.  In particular, all procmail fetching variables are gone.
24904
24905 If you used procmail like in
24906
24907 @lisp
24908 (setq nnmail-use-procmail t)
24909 (setq nnmail-spool-file 'procmail)
24910 (setq nnmail-procmail-directory "~/mail/incoming/")
24911 (setq nnmail-procmail-suffix "\\.in")
24912 @end lisp
24913
24914 this now has changed to
24915
24916 @lisp
24917 (setq mail-sources
24918       '((directory :path "~/mail/incoming/"
24919                    :suffix ".in")))
24920 @end lisp
24921
24922 @xref{Mail Source Specifiers}.
24923
24924 @item
24925 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24926 Gnus, and adds a slew of new commands.  See the manual for details.
24927
24928 @item
24929 Gnus has also been multilingualized.  This also affects too
24930 many parts of Gnus to summarize here, and adds many new variables.
24931
24932 @item
24933 @code{gnus-auto-select-first} can now be a function to be
24934 called to position point.
24935
24936 @item
24937 The user can now decide which extra headers should be included in
24938 summary buffers and @acronym{NOV} files.
24939
24940 @item
24941 @code{gnus-article-display-hook} has been removed.  Instead, a number
24942 of variables starting with @code{gnus-treat-} have been added.
24943
24944 @item
24945 The Gnus posting styles have been redone again and now works in a
24946 subtly different manner.
24947
24948 @item
24949 New web-based back ends have been added: @code{nnslashdot},
24950 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24951 again, to keep up with ever-changing layouts.
24952
24953 @item
24954 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24955
24956 @end itemize
24957
24958 @node Oort Gnus
24959 @subsubsection Oort Gnus
24960 @cindex Oort Gnus
24961
24962 New features in Gnus 5.10:
24963
24964 @itemize @bullet
24965
24966 @item
24967 The revised Gnus @acronym{FAQ} is included in the manual,
24968 @xref{Frequently Asked Questions}.
24969
24970 @item
24971 Upgrading from previous (stable) version if you have used Oort.
24972
24973 If you have tried Oort (the unstable Gnus branch leading to this
24974 release) but went back to a stable version, be careful when upgrading to
24975 this version.  In particular, you will probably want to remove all
24976 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24977 read from your @file{.newsrc.eld} instead of from the
24978 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24979 later entry for more information about marks.  Note that downgrading
24980 isn't save in general.
24981
24982 @item
24983 Article Buttons
24984
24985 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24986 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24987 variables @code{gnus-button-@var{*}-level} can be used to control the
24988 appearance of all article buttons.  @xref{Article Button Levels}.
24989
24990 @item
24991 Dired integration
24992
24993 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24994 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
24995 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24996 (@kbd{C-c P}).  It is enabled with
24997 @lisp
24998 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24999 @end lisp
25000
25001 @item
25002 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25003
25004 @item
25005 Single-part yenc encoded attachments can be decoded.
25006
25007 @item
25008 Picons
25009
25010 The picons code has been reimplemented to work in GNU Emacs---some of
25011 the previous options have been removed or renamed.
25012
25013 Picons are small ``personal icons'' representing users, domain and
25014 newsgroups, which can be displayed in the Article buffer.
25015 @xref{Picons}.
25016
25017 @item
25018 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25019 boundary line is drawn at the end of the headers.
25020
25021 @item
25022 Retrieval of charters and control messages
25023
25024 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25025 control messages (@kbd{H C}).
25026
25027 @item
25028 Delayed articles
25029
25030 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25031 buffer.  The messages are delivered at specified time.  This is useful
25032 for sending yourself reminders.  @xref{Delayed Articles}.
25033
25034 @item
25035 If @code{auto-compression-mode} is enabled, attachments are automatically
25036 decompressed when activated.
25037
25038 @item
25039 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25040 the nnml back end allows compressed message files.
25041
25042 @item
25043 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25044
25045 @item
25046 The Summary Buffer uses an arrow in the fringe to indicate the current
25047 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25048
25049 @item
25050 Warn about email replies to news
25051
25052 Do you often find yourself replying to news by email by mistake?  Then
25053 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25054 you.
25055
25056 @item
25057 If the new option @code{gnus-summary-display-while-building} is
25058 non-@code{nil}, the summary buffer is shown and updated as it's being
25059 built.
25060
25061 @item
25062 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25063 opposed to old but unread messages).
25064
25065 @item
25066 The new option @code{gnus-gcc-mark-as-read} automatically marks
25067 Gcc articles as read.
25068
25069 @item
25070 The nndoc back end now supports mailman digests and exim bounces.
25071
25072 @item
25073 Gnus supports RFC 2369 mailing list headers, and adds a number of
25074 related commands in mailing list groups.  @xref{Mailing List}.
25075
25076 @item
25077 The Date header can be displayed in a format that can be read aloud
25078 in English.  @xref{Article Date}.
25079
25080 @item
25081 The envelope sender address can be customized when using Sendmail.
25082 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25083
25084 @item
25085 diffs are automatically highlighted in groups matching
25086 @code{mm-uu-diff-groups-regexp}
25087
25088 @item
25089 @acronym{TLS} wrapper shipped with Gnus
25090
25091 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25092 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25093 @acronym{TLS}/@acronym{SSL} support via (external third party)
25094 @file{ssl.el} and OpenSSL still works.
25095
25096 @item
25097 New @file{make.bat} for compiling and installing Gnus under MS Windows
25098
25099 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25100 first argument to the batch-program should be the directory where
25101 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25102 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25103 the second parameter.
25104
25105 @file{make.bat} has been rewritten from scratch, it now features
25106 automatic recognition of XEmacs and GNU Emacs, generates
25107 @file{gnus-load.el}, checks if errors occur while compilation and
25108 generation of info files and reports them at the end of the build
25109 process.  It now uses @code{makeinfo} if it is available and falls
25110 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25111 install all files which are necessary to run Gnus and be generally a
25112 complete replacement for the @code{configure; make; make install}
25113 cycle used under Unix systems.
25114
25115 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25116 been removed.
25117
25118 @item
25119 Support for non-@acronym{ASCII} domain names
25120
25121 Message supports non-@acronym{ASCII} domain names in From:, To: and
25122 Cc: and will query you whether to perform encoding when you try to
25123 send a message.  The variable @code{message-use-idna} controls this.
25124 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25125 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25126 controls this.
25127
25128 @item
25129 Better handling of Microsoft citation styles
25130
25131 Gnus now tries to recognize the mangled header block that some Microsoft
25132 mailers use to indicate that the rest of the message is a citation, even
25133 though it is not quoted in any way.  The variable
25134 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25135 citations.
25136
25137 @item
25138 @code{gnus-article-skip-boring}
25139
25140 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25141 not scroll down to show you a page that contains only boring text,
25142 which by default means cited text and signature.  You can customize
25143 what is skippable using @code{gnus-article-boring-faces}.
25144
25145 This feature is especially useful if you read many articles that
25146 consist of a little new content at the top with a long, untrimmed
25147 message cited below.
25148
25149 @item
25150 The format spec @code{%C} for positioning point has changed to @code{%*}.
25151
25152 @item
25153 The new variable @code{gnus-parameters} can be used to set group parameters.
25154
25155 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25156 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25157 enjoy the powers of customize, and simplified backups since you set the
25158 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25159 variable maps regular expressions matching group names to group
25160 parameters, a'la:
25161 @lisp
25162 (setq gnus-parameters
25163       '(("mail\\..*"
25164          (gnus-show-threads nil)
25165          (gnus-use-scoring nil))
25166         ("^nnimap:\\(foo.bar\\)$"
25167          (to-group . "\\1"))))
25168 @end lisp
25169
25170 @item
25171 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25172
25173 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25174 disable it.
25175
25176 @item
25177 Gnus no longer generate the Sender: header automatically.
25178
25179 Earlier it was generated iff the user configurable email address was
25180 different from the Gnus guessed default user address.  As the guessing
25181 algorithm is rarely correct these days, and (more controversially) the
25182 only use of the Sender: header was to check if you are entitled to
25183 cancel/supersede news (which is now solved by Cancel Locks instead,
25184 see another entry), generation of the header has been disabled by
25185 default.  See the variables @code{message-required-headers},
25186 @code{message-required-news-headers}, and
25187 @code{message-required-mail-headers}.
25188
25189 @item
25190 Features from third party @file{message-utils.el} added to @file{message.el}.
25191
25192 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25193 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25194 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25195 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25196 appropriate headers and a note in the body for cross-postings and
25197 followups (see the variables @code{message-cross-post-@var{*}}).
25198
25199 @item
25200 References and X-Draft-Headers are no longer generated when you start
25201 composing messages and @code{message-generate-headers-first} is
25202 @code{nil}.
25203
25204 @item
25205 Improved anti-spam features.
25206
25207 Gnus is now able to take out spam from your mail and news streams
25208 using a wide variety of programs and filter rules.  Among the supported
25209 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25210 for easy use of external packages such as SpamAssassin and Hashcash
25211 are also new.  @xref{Thwarting Email Spam}.
25212
25213 @item
25214 Easy inclusion of X-Faces headers.
25215
25216 @item
25217 Face headers handling.
25218
25219 @item
25220 In the summary buffer, the new command @kbd{/ N} inserts new messages
25221 and @kbd{/ o} inserts old messages.
25222
25223 @item
25224 Gnus decodes morse encoded messages if you press @kbd{W m}.
25225
25226 @item
25227 Unread count correct in nnimap groups.
25228
25229 The estimated number of unread articles in the group buffer should now
25230 be correct for nnimap groups.  This is achieved by calling
25231 @code{nnimap-fixup-unread-after-getting-new-news} from the
25232 @code{gnus-setup-news-hook} (called on startup) and
25233 @code{gnus-after-getting-new-news-hook}. (called after getting new
25234 mail).  If you have modified those variables from the default, you may
25235 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25236 you were happy with the estimate and want to save some (minimal) time
25237 when getting new mail, remove the function.
25238
25239 @item
25240 Group Carbon Copy (GCC) quoting
25241
25242 To support groups that contains SPC and other weird characters, groups
25243 are quoted before they are placed in the Gcc: header.  This means
25244 variables such as @code{gnus-message-archive-group} should no longer
25245 contain quote characters to make groups containing SPC work.  Also, if
25246 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25247 into two groups) you must change it to return the list
25248 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25249 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25250 was incorrect earlier, it just didn't generate any problems since it
25251 was inserted directly.
25252
25253 @item
25254 @file{~/News/overview/} not used.
25255
25256 As a result of the following change, the @file{~/News/overview/}
25257 directory is not used any more.  You can safely delete the entire
25258 hierarchy.
25259
25260 @item
25261 @code{gnus-agent}
25262
25263 The Gnus Agent has seen a major updated and is now enabled by default,
25264 and all nntp and nnimap servers from @code{gnus-select-method} and
25265 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25266 only the server in @code{gnus-select-method} was agentized by the
25267 default, and the agent was disabled by default.  When the agent is
25268 enabled, headers are now also retrieved from the Agent cache instead
25269 of the back ends when possible.  Earlier this only happened in the
25270 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25271 @kbd{J r} in the server buffer.  Gnus will not download articles into
25272 the Agent cache, unless you instruct it to do so, though, by using
25273 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25274 behaviour of having the Agent disabled with @code{(setq gnus-agent
25275 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25276 is not needed any more.
25277
25278 @item
25279 @code{gnus-summary-line-format}
25280
25281 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25282 %s\n}.  Moreover @code{gnus-extra-headers},
25283 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25284 changed their default so that the users name will be replaced by the
25285 recipient's name or the group name posting to for @acronym{NNTP}
25286 groups.
25287
25288 @item
25289 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25290
25291 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25292 broken Outlook (Express) articles.
25293
25294 @item
25295 @code{(require 'gnus-load)}
25296
25297 If you use a stand-alone Gnus distribution, you'd better add
25298 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25299 lisp directory into load-path.
25300
25301 File @file{gnus-load.el} contains autoload commands, functions and variables,
25302 some of which may not be included in distributions of Emacsen.
25303
25304 @item
25305 @code{gnus-slave-unplugged}
25306
25307 A new command which starts Gnus offline in slave mode.
25308
25309 @item
25310 @code{message-insinuate-rmail}
25311
25312 Adding @code{(message-insinuate-rmail)} and @code{(setq
25313 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25314 compose, reply and forward messages in message-mode, where you can
25315 enjoy the power of @acronym{MML}.
25316
25317 @item
25318 @code{message-minibuffer-local-map}
25319
25320 The line below enables BBDB in resending a message:
25321 @lisp
25322 (define-key message-minibuffer-local-map [(tab)]
25323   'bbdb-complete-name)
25324 @end lisp
25325
25326 @item
25327 Externalizing and deleting of attachments.
25328
25329 If @code{gnus-gcc-externalize-attachments} or
25330 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25331 local files as external parts.
25332
25333 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25334 on @acronym{MIME} buttons) saves a part and replaces the part with an
25335 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25336 @acronym{MIME} buttons) removes a part.  It works only on back ends
25337 that support editing.
25338
25339 @item
25340 @code{gnus-default-charset}
25341
25342 The default value is determined from the
25343 @code{current-language-environment} variable, instead of
25344 @code{iso-8859-1}.  Also the @samp{.*} item in
25345 @code{gnus-group-charset-alist} is removed.
25346
25347 @item
25348 @code{gnus-posting-styles}
25349
25350 Add a new format of match like
25351 @lisp
25352 ((header "to" "larsi.*org")
25353  (Organization "Somewhere, Inc."))
25354 @end lisp
25355 The old format like the lines below is obsolete, but still accepted.
25356 @lisp
25357 (header "to" "larsi.*org"
25358         (Organization "Somewhere, Inc."))
25359 @end lisp
25360
25361 @item
25362 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25363
25364 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25365 added into these two variables.  If you customized those, perhaps you
25366 need add those two headers too.
25367
25368 @item
25369 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25370
25371 If one reads an article while plugged, and the article already exists
25372 in the Agent, it won't get downloaded once more.  @code{(setq
25373 gnus-agent-cache nil)} reverts to the old behavior.
25374
25375 @item
25376 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25377 composing messages, it is enabled by @code{use-hard-newlines}.
25378 Decoding format=flowed was present but not documented in earlier
25379 versions.
25380
25381 @item
25382 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25383
25384 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25385
25386 @item
25387 Gnus supports Maildir groups.
25388
25389 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25390
25391 @item
25392 Printing capabilities are enhanced.
25393
25394 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25395 Article buffers.  Also, each individual @acronym{MIME} part can be
25396 printed using @kbd{p} on the @acronym{MIME} button.
25397
25398 @item
25399 Message supports the Importance: (RFC 2156) header.
25400
25401 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25402 the valid values.
25403
25404 @item
25405 Gnus supports Cancel Locks in News.
25406
25407 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25408 used to determine if you wrote an article or not (for cancelling and
25409 superseding).  Gnus generates a random password string the first time
25410 you post a message, and saves it in your @file{~/.emacs} using the Custom
25411 system.  While the variable is called @code{canlock-password}, it is not
25412 security sensitive data.  Publishing your canlock string on the web
25413 will not allow anyone to be able to anything she could not already do.
25414 The behaviour can be changed by customizing @code{message-insert-canlock}.
25415
25416 @item
25417 Gnus supports server-side mail filtering using Sieve.
25418
25419 Sieve rules can be added as Group Parameters for groups, and the
25420 complete Sieve script is generated using @kbd{D g} from the Group
25421 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25422 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25423 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25424
25425 @item
25426 Extended format specs.
25427
25428 Format spec @samp{%&user-date;} is added into
25429 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25430 format specs are supported.  The extended format specs look like
25431 @samp{%u&foo;}, which invokes function
25432 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25433 escape character, old user defined format @samp{%u&} is no longer supported.
25434
25435 @item
25436 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25437
25438 It was aliased to @kbd{Y c}
25439 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25440 out other articles.
25441
25442 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25443
25444 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25445 s}, @kbd{/ a}, and @kbd{/ x}
25446 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25447 result will be to display all articles that do not match the expression.
25448
25449 @item
25450 Group names are treated as UTF-8 by default.
25451
25452 This is supposedly what USEFOR wanted to migrate to.  See
25453 @code{gnus-group-name-charset-group-alist} and
25454 @code{gnus-group-name-charset-method-alist} for customization.
25455
25456 @item
25457 The nnml and nnfolder back ends store marks for each groups.
25458
25459 This makes it possible to take backup of nnml/nnfolder servers/groups
25460 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25461 makes it possible to share articles and marks between users (without
25462 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25463 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25464 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25465 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25466 another machine, Gnus will automatically use the @file{.marks} or
25467 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25468 The new server variables @code{nnml-marks-is-evil} and
25469 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25470
25471 @item
25472 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25473 been renamed to ``Gnus''.
25474
25475 @item
25476 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25477 renamed to ``Attachments''.  Note that this menu also contains security
25478 related stuff, like signing and encryption (@pxref{Security, Security,,
25479 message, Message Manual}).
25480
25481 @item
25482 @code{gnus-group-charset-alist} and
25483 @code{gnus-group-ignored-charsets-alist}.
25484
25485 The regexps in these variables are compared with full group names
25486 instead of real group names in 5.8.  Users who customize these
25487 variables should change those regexps accordingly.  For example:
25488 @lisp
25489 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25490 @end lisp
25491
25492 @item
25493 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25494 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25495
25496 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25497 additional Lisp libraries.  This add several menu items to the
25498 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25499 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25500
25501 @item
25502 Gnus inlines external parts (message/external).
25503
25504 @item
25505 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25506 C-m}.
25507
25508 This change was made to avoid conflict with the standard binding of
25509 @code{back-to-indentation}, which is also useful in message mode.
25510 @end itemize
25511
25512 @iftex
25513
25514 @page
25515 @node The Manual
25516 @section The Manual
25517 @cindex colophon
25518 @cindex manual
25519
25520 This manual was generated from a TeXinfo file and then run through
25521 either @code{texi2dvi}
25522 @iflatex
25523 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25524 and then run through @code{latex} and @code{dvips}
25525 @end iflatex
25526 to get what you hold in your hands now.
25527
25528 The following conventions have been used:
25529
25530 @enumerate
25531
25532 @item
25533 This is a @samp{string}
25534
25535 @item
25536 This is a @kbd{keystroke}
25537
25538 @item
25539 This is a @file{file}
25540
25541 @item
25542 This is a @code{symbol}
25543
25544 @end enumerate
25545
25546 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25547 mean:
25548
25549 @lisp
25550 (setq flargnoze "yes")
25551 @end lisp
25552
25553 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25554
25555 @lisp
25556 (setq flumphel 'yes)
25557 @end lisp
25558
25559 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25560 ever get them confused.
25561
25562 @iflatex
25563 @c @head
25564 Of course, everything in this manual is of vital interest, so you should
25565 read it all.  Several times.  However, if you feel like skimming the
25566 manual, look for that gnu head you should see in the margin over
25567 there---it means that what's being discussed is of more importance than
25568 the rest of the stuff.  (On the other hand, if everything is infinitely
25569 important, how can anything be more important than that?  Just one more
25570 of the mysteries of this world, I guess.)
25571 @end iflatex
25572
25573 @end iftex
25574
25575
25576 @node On Writing Manuals
25577 @section On Writing Manuals
25578
25579 I guess most manuals are written after-the-fact; documenting a program
25580 that's already there.  This is not how this manual is written.  When
25581 implementing something, I write the manual entry for that something
25582 straight away.  I then see that it's difficult to explain the
25583 functionality, so I write how it's supposed to be, and then I change the
25584 implementation.  Writing the documentation and writing the code goes
25585 hand in hand.
25586
25587 This, of course, means that this manual has no, or little, flow.  It
25588 documents absolutely everything in Gnus, but often not where you're
25589 looking for it.  It is a reference manual, and not a guide to how to get
25590 started with Gnus.
25591
25592 That would be a totally different book, that should be written using the
25593 reference manual as source material.  It would look quite differently.
25594
25595
25596 @page
25597 @node Terminology
25598 @section Terminology
25599
25600 @cindex terminology
25601 @table @dfn
25602
25603 @item news
25604 @cindex news
25605 This is what you are supposed to use this thing for---reading news.
25606 News is generally fetched from a nearby @acronym{NNTP} server, and is
25607 generally publicly available to everybody.  If you post news, the entire
25608 world is likely to read just what you have written, and they'll all
25609 snigger mischievously.  Behind your back.
25610
25611 @item mail
25612 @cindex mail
25613 Everything that's delivered to you personally is mail.  Some news/mail
25614 readers (like Gnus) blur the distinction between mail and news, but
25615 there is a difference.  Mail is private.  News is public.  Mailing is
25616 not posting, and replying is not following up.
25617
25618 @item reply
25619 @cindex reply
25620 Send a mail to the person who has written what you are reading.
25621
25622 @item follow up
25623 @cindex follow up
25624 Post an article to the current newsgroup responding to the article you
25625 are reading.
25626
25627 @item back end
25628 @cindex back end
25629 Gnus considers mail and news to be mostly the same, really.  The only
25630 difference is how to access the actual articles.  News articles are
25631 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25632 messages could be read from a file on the local disk.  The internal
25633 architecture of Gnus thus comprises a ``front end'' and a number of
25634 ``back ends''.  Internally, when you enter a group (by hitting
25635 @key{RET}, say), you thereby invoke a function in the front end in
25636 Gnus.  The front end then ``talks'' to a back end and says things like
25637 ``Give me the list of articles in the foo group'' or ``Show me article
25638 number 4711''.
25639
25640 So a back end mainly defines either a protocol (the @code{nntp} back
25641 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25642 accesses mail via @acronym{IMAP}) or a file format and directory
25643 layout (the @code{nnspool} back end accesses news via the common
25644 ``spool directory'' format, the @code{nnml} back end access mail via a
25645 file format and directory layout that's quite similar).
25646
25647 Gnus does not handle the underlying media, so to speak---this is all
25648 done by the back ends.  A back end is a collection of functions to
25649 access the articles.
25650
25651 However, sometimes the term ``back end'' is also used where ``server''
25652 would have been more appropriate.  And then there is the term ``select
25653 method'' which can mean either.  The Gnus terminology can be quite
25654 confusing.
25655
25656 @item native
25657 @cindex native
25658 Gnus will always use one method (and back end) as the @dfn{native}, or
25659 default, way of getting news.
25660
25661 @item foreign
25662 @cindex foreign
25663 You can also have any number of foreign groups active at the same time.
25664 These are groups that use non-native non-secondary back ends for getting
25665 news.
25666
25667 @item secondary
25668 @cindex secondary
25669 Secondary back ends are somewhere half-way between being native and being
25670 foreign, but they mostly act like they are native.
25671
25672 @item article
25673 @cindex article
25674 A message that has been posted as news.
25675
25676 @item mail message
25677 @cindex mail message
25678 A message that has been mailed.
25679
25680 @item message
25681 @cindex message
25682 A mail message or news article
25683
25684 @item head
25685 @cindex head
25686 The top part of a message, where administrative information (etc.) is
25687 put.
25688
25689 @item body
25690 @cindex body
25691 The rest of an article.  Everything not in the head is in the
25692 body.
25693
25694 @item header
25695 @cindex header
25696 A line from the head of an article.
25697
25698 @item headers
25699 @cindex headers
25700 A collection of such lines, or a collection of heads.  Or even a
25701 collection of @acronym{NOV} lines.
25702
25703 @item @acronym{NOV}
25704 @cindex @acronym{NOV}
25705 When Gnus enters a group, it asks the back end for the headers of all
25706 unread articles in the group.  Most servers support the News OverView
25707 format, which is more compact and much faster to read and parse than the
25708 normal @sc{head} format.
25709
25710 @item level
25711 @cindex levels
25712 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25713 that have a lower level are ``more'' subscribed than the groups with a
25714 higher level.  In fact, groups on levels 1-5 are considered
25715 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25716 are @dfn{killed}.  Commands for listing groups and scanning for new
25717 articles will all use the numeric prefix as @dfn{working level}.
25718
25719 @item killed groups
25720 @cindex killed groups
25721 No information on killed groups is stored or updated, which makes killed
25722 groups much easier to handle than subscribed groups.
25723
25724 @item zombie groups
25725 @cindex zombie groups
25726 Just like killed groups, only slightly less dead.
25727
25728 @item active file
25729 @cindex active file
25730 The news server has to keep track of what articles it carries, and what
25731 groups exist.  All this information in stored in the active file, which
25732 is rather large, as you might surmise.
25733
25734 @item bogus groups
25735 @cindex bogus groups
25736 A group that exists in the @file{.newsrc} file, but isn't known to the
25737 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25738 This means that the group probably doesn't exist (any more).
25739
25740 @item activating
25741 @cindex activating groups
25742 The act of asking the server for info on a group and computing the
25743 number of unread articles is called @dfn{activating the group}.
25744 Un-activated groups are listed with @samp{*} in the group buffer.
25745
25746 @item server
25747 @cindex server
25748 A machine one can connect to and get news (or mail) from.
25749
25750 @item select method
25751 @cindex select method
25752 A structure that specifies the back end, the server and the virtual
25753 server settings.
25754
25755 @item virtual server
25756 @cindex virtual server
25757 A named select method.  Since a select method defines all there is to
25758 know about connecting to a (physical) server, taking the thing as a
25759 whole is a virtual server.
25760
25761 @item washing
25762 @cindex washing
25763 Taking a buffer and running it through a filter of some sort.  The
25764 result will (more often than not) be cleaner and more pleasing than the
25765 original.
25766
25767 @item ephemeral groups
25768 @cindex ephemeral groups
25769 @cindex temporary groups
25770 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25771 groups are groups that will have no data stored---when you exit the
25772 group, it'll disappear into the aether.
25773
25774 @item solid groups
25775 @cindex solid groups
25776 This is the opposite of ephemeral groups.  All groups listed in the
25777 group buffer are solid groups.
25778
25779 @item sparse articles
25780 @cindex sparse articles
25781 These are article placeholders shown in the summary buffer when
25782 @code{gnus-build-sparse-threads} has been switched on.
25783
25784 @item threading
25785 @cindex threading
25786 To put responses to articles directly after the articles they respond
25787 to---in a hierarchical fashion.
25788
25789 @item root
25790 @cindex root
25791 @cindex thread root
25792 The first article in a thread is the root.  It is the ancestor of all
25793 articles in the thread.
25794
25795 @item parent
25796 @cindex parent
25797 An article that has responses.
25798
25799 @item child
25800 @cindex child
25801 An article that responds to a different article---its parent.
25802
25803 @item digest
25804 @cindex digest
25805 A collection of messages in one file.  The most common digest format is
25806 specified by RFC 1153.
25807
25808 @item splitting
25809 @cindex splitting, terminolgy
25810 @cindex mail sorting
25811 @cindex mail filtering (splitting)
25812 The action of sorting your emails according to certain rules. Sometimes
25813 incorrectly called mail filtering.
25814
25815 @end table
25816
25817
25818 @page
25819 @node Customization
25820 @section Customization
25821 @cindex general customization
25822
25823 All variables are properly documented elsewhere in this manual.  This
25824 section is designed to give general pointers on how to customize Gnus
25825 for some quite common situations.
25826
25827 @menu
25828 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25829 * Slow Terminal Connection::    You run a remote Emacs.
25830 * Little Disk Space::           You feel that having large setup files is icky.
25831 * Slow Machine::                You feel like buying a faster machine.
25832 @end menu
25833
25834
25835 @node Slow/Expensive Connection
25836 @subsection Slow/Expensive NNTP Connection
25837
25838 If you run Emacs on a machine locally, and get your news from a machine
25839 over some very thin strings, you want to cut down on the amount of data
25840 Gnus has to get from the @acronym{NNTP} server.
25841
25842 @table @code
25843
25844 @item gnus-read-active-file
25845 Set this to @code{nil}, which will inhibit Gnus from requesting the
25846 entire active file from the server.  This file is often v.  large.  You
25847 also have to set @code{gnus-check-new-newsgroups} and
25848 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25849 doesn't suddenly decide to fetch the active file anyway.
25850
25851 @item gnus-nov-is-evil
25852 This one has to be @code{nil}.  If not, grabbing article headers from
25853 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25854 support @sc{xover}; Gnus will detect this by itself.
25855 @end table
25856
25857
25858 @node Slow Terminal Connection
25859 @subsection Slow Terminal Connection
25860
25861 Let's say you use your home computer for dialing up the system that runs
25862 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25863 possible) the amount of data sent over the wires.
25864
25865 @table @code
25866
25867 @item gnus-auto-center-summary
25868 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25869 buffer all the time.  If it is @code{vertical}, do only vertical
25870 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25871 horizontal and vertical recentering.
25872
25873 @item gnus-visible-headers
25874 Cut down on the headers included in the articles to the
25875 minimum.  You can, in fact, make do without them altogether---most of the
25876 useful data is in the summary buffer, anyway.  Set this variable to
25877 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25878
25879 Set this hook to all the available hiding commands:
25880 @lisp
25881 (setq gnus-treat-hide-headers 'head
25882       gnus-treat-hide-signature t
25883       gnus-treat-hide-citation t)
25884 @end lisp
25885
25886 @item gnus-use-full-window
25887 By setting this to @code{nil}, you can make all the windows smaller.
25888 While this doesn't really cut down much generally, it means that you
25889 have to see smaller portions of articles before deciding that you didn't
25890 want to read them anyway.
25891
25892 @item gnus-thread-hide-subtree
25893 If this is non-@code{nil}, all threads in the summary buffer will be
25894 hidden initially.
25895
25896
25897 @item gnus-updated-mode-lines
25898 If this is @code{nil}, Gnus will not put information in the buffer mode
25899 lines, which might save some time.
25900 @end table
25901
25902
25903 @node Little Disk Space
25904 @subsection Little Disk Space
25905 @cindex disk space
25906
25907 The startup files can get rather large, so you may want to cut their
25908 sizes a bit if you are running out of space.
25909
25910 @table @code
25911
25912 @item gnus-save-newsrc-file
25913 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25914 only save @file{.newsrc.eld}.  This means that you will not be able to
25915 use any other newsreaders than Gnus.  This variable is @code{t} by
25916 default.
25917
25918 @item gnus-read-newsrc-file
25919 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25920 only read @file{.newsrc.eld}.  This means that you will not be able to
25921 use any other newsreaders than Gnus.  This variable is @code{t} by
25922 default.
25923
25924 @item gnus-save-killed-list
25925 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25926 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25927 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25928 variable to @code{nil}.  This variable is @code{t} by default.
25929
25930 @end table
25931
25932
25933 @node Slow Machine
25934 @subsection Slow Machine
25935 @cindex slow machine
25936
25937 If you have a slow machine, or are just really impatient, there are a
25938 few things you can do to make Gnus run faster.
25939
25940 Set @code{gnus-check-new-newsgroups} and
25941 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25942
25943 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25944 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25945 summary buffer faster.
25946
25947
25948 @page
25949 @node Troubleshooting
25950 @section Troubleshooting
25951 @cindex troubleshooting
25952
25953 Gnus works @emph{so} well straight out of the box---I can't imagine any
25954 problems, really.
25955
25956 Ahem.
25957
25958 @enumerate
25959
25960 @item
25961 Make sure your computer is switched on.
25962
25963 @item
25964 Make sure that you really load the current Gnus version.  If you have
25965 been running @sc{gnus}, you need to exit Emacs and start it up again before
25966 Gnus will work.
25967
25968 @item
25969 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25970 like @samp{T-gnus 6.16.* (based on Gnus v5.10.*; for SEMI 1.1*, FLIM
25971 1.1*)} you have the right files loaded.  If, on the other hand, you get
25972 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
25973 @file{.el} files lying around.  Delete these.
25974
25975 @item
25976 Read the help group (@kbd{G h} in the group buffer) for a
25977 @acronym{FAQ} and a how-to.
25978
25979 @item
25980 @vindex max-lisp-eval-depth
25981 Gnus works on many recursive structures, and in some extreme (and very
25982 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25983 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25984 something like that.
25985 @end enumerate
25986
25987 If all else fails, report the problem as a bug.
25988
25989 @cindex bugs
25990 @cindex reporting bugs
25991
25992 @kindex M-x gnus-bug
25993 @findex gnus-bug
25994 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25995 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25996 me the backtrace.  I will fix bugs, but I can only fix them if you send
25997 me a precise description as to how to reproduce the bug.
25998
25999 You really can never be too detailed in a bug report.  Always use the
26000 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26001 a 10Kb mail each time you use it, and even if you have sent me your
26002 environment 500 times before.  I don't care.  I want the full info each
26003 time.
26004
26005 It is also important to remember that I have no memory whatsoever.  If
26006 you send a bug report, and I send you a reply, and then you just send
26007 back ``No, it's not! Moron!'', I will have no idea what you are
26008 insulting me about.  Always over-explain everything.  It's much easier
26009 for all of us---if I don't have all the information I need, I will just
26010 mail you and ask for more info, and everything takes more time.
26011
26012 If the problem you're seeing is very visual, and you can't quite explain
26013 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26014 it somewhere it can be reached, and include the URL of the picture in
26015 the bug report.
26016
26017 @cindex patches
26018 If you would like to contribute a patch to fix bugs or make
26019 improvements, please produce the patch using @samp{diff -u}.
26020
26021 @cindex edebug
26022 If you want to debug your problem further before reporting, possibly
26023 in order to solve the problem yourself and send a patch, you can use
26024 edebug.  Debugging Lisp code is documented in the Elisp manual
26025 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26026 Lisp Reference Manual}).  To get you started with edebug, consider if
26027 you discover some weird behaviour when pressing @kbd{c}, the first
26028 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26029 the documentation buffer that leads you to the function definition,
26030 then press @kbd{M-x edebug-defun RET} with point inside that function,
26031 return to Gnus and press @kbd{c} to invoke the code.  You will be
26032 placed in the lisp buffer and can single step using @kbd{SPC} and
26033 evaluate expressions using @kbd{M-:} or inspect variables using
26034 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26035 @kbd{c} or @kbd{g}.
26036
26037 @cindex elp
26038 @cindex profile
26039 @cindex slow
26040 Sometimes, a problem do not directly generate an elisp error but
26041 manifests itself by causing Gnus to be very slow.  In these cases, you
26042 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26043 slow, and then try to analyze the backtrace (repeating the procedure
26044 helps isolating the real problem areas).
26045
26046 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26047 (or should be) fully documented elsewhere, but to get you started
26048 there are a few steps that need to be followed.  First, instrument the
26049 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26050 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26051 RET message}.  Then perform the operation that is slow and press
26052 @kbd{M-x elp-results}.  You will then see which operations that takes
26053 time, and can debug them further.  If the entire operation takes much
26054 longer than the time spent in the slowest function in the profiler
26055 output, you probably profiled the wrong part of Gnus.  To reset
26056 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26057 elp-restore-all} is supposed to remove profiling, but given the
26058 complexities and dynamic code generation in Gnus, it might not always
26059 work perfectly.
26060
26061 @cindex gnu.emacs.gnus
26062 @cindex ding mailing list
26063 If you just need help, you are better off asking on
26064 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26065 @email{ding@@gnus.org, the ding mailing list}.  Write to
26066 @email{ding-request@@gnus.org} to subscribe.
26067
26068
26069 @page
26070 @node Gnus Reference Guide
26071 @section Gnus Reference Guide
26072
26073 It is my hope that other people will figure out smart stuff that Gnus
26074 can do, and that other people will write those smart things as well.  To
26075 facilitate that I thought it would be a good idea to describe the inner
26076 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26077 it.
26078
26079 You can never expect the internals of a program not to change, but I
26080 will be defining (in some details) the interface between Gnus and its
26081 back ends (this is written in stone), the format of the score files
26082 (ditto), data structures (some are less likely to change than others)
26083 and general methods of operation.
26084
26085 @menu
26086 * Gnus Utility Functions::      Common functions and variable to use.
26087 * Back End Interface::          How Gnus communicates with the servers.
26088 * Score File Syntax::           A BNF definition of the score file standard.
26089 * Headers::                     How Gnus stores headers internally.
26090 * Ranges::                      A handy format for storing mucho numbers.
26091 * Group Info::                  The group info format.
26092 * Extended Interactive::        Symbolic prefixes and stuff.
26093 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26094 * Various File Formats::        Formats of files that Gnus use.
26095 @end menu
26096
26097
26098 @node Gnus Utility Functions
26099 @subsection Gnus Utility Functions
26100 @cindex Gnus utility functions
26101 @cindex utility functions
26102 @cindex functions
26103 @cindex internal variables
26104
26105 When writing small functions to be run from hooks (and stuff), it's
26106 vital to have access to the Gnus internal functions and variables.
26107 Below is a list of the most common ones.
26108
26109 @table @code
26110
26111 @item gnus-newsgroup-name
26112 @vindex gnus-newsgroup-name
26113 This variable holds the name of the current newsgroup.
26114
26115 @item gnus-find-method-for-group
26116 @findex gnus-find-method-for-group
26117 A function that returns the select method for @var{group}.
26118
26119 @item gnus-group-real-name
26120 @findex gnus-group-real-name
26121 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26122 name.
26123
26124 @item gnus-group-prefixed-name
26125 @findex gnus-group-prefixed-name
26126 Takes an unprefixed group name and a select method, and returns the full
26127 (prefixed) Gnus group name.
26128
26129 @item gnus-get-info
26130 @findex gnus-get-info
26131 Returns the group info list for @var{group}.
26132
26133 @item gnus-group-unread
26134 @findex gnus-group-unread
26135 The number of unread articles in @var{group}, or @code{t} if that is
26136 unknown.
26137
26138 @item gnus-active
26139 @findex gnus-active
26140 The active entry for @var{group}.
26141
26142 @item gnus-set-active
26143 @findex gnus-set-active
26144 Set the active entry for @var{group}.
26145
26146 @item gnus-add-current-to-buffer-list
26147 @findex gnus-add-current-to-buffer-list
26148 Adds the current buffer to the list of buffers to be killed on Gnus
26149 exit.
26150
26151 @item gnus-continuum-version
26152 @findex gnus-continuum-version
26153 Takes a Gnus version string as a parameter and returns a floating point
26154 number.  Earlier versions will always get a lower number than later
26155 versions.
26156
26157 @item gnus-group-read-only-p
26158 @findex gnus-group-read-only-p
26159 Says whether @var{group} is read-only or not.
26160
26161 @item gnus-news-group-p
26162 @findex gnus-news-group-p
26163 Says whether @var{group} came from a news back end.
26164
26165 @item gnus-ephemeral-group-p
26166 @findex gnus-ephemeral-group-p
26167 Says whether @var{group} is ephemeral or not.
26168
26169 @item gnus-server-to-method
26170 @findex gnus-server-to-method
26171 Returns the select method corresponding to @var{server}.
26172
26173 @item gnus-server-equal
26174 @findex gnus-server-equal
26175 Says whether two virtual servers are equal.
26176
26177 @item gnus-group-native-p
26178 @findex gnus-group-native-p
26179 Says whether @var{group} is native or not.
26180
26181 @item gnus-group-secondary-p
26182 @findex gnus-group-secondary-p
26183 Says whether @var{group} is secondary or not.
26184
26185 @item gnus-group-foreign-p
26186 @findex gnus-group-foreign-p
26187 Says whether @var{group} is foreign or not.
26188
26189 @item gnus-group-find-parameter
26190 @findex gnus-group-find-parameter
26191 Returns the parameter list of @var{group}.  If given a second parameter,
26192 returns the value of that parameter for @var{group}.
26193
26194 @item gnus-group-set-parameter
26195 @findex gnus-group-set-parameter
26196 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26197
26198 @item gnus-narrow-to-body
26199 @findex gnus-narrow-to-body
26200 Narrows the current buffer to the body of the article.
26201
26202 @item gnus-check-backend-function
26203 @findex gnus-check-backend-function
26204 Takes two parameters, @var{function} and @var{group}.  If the back end
26205 @var{group} comes from supports @var{function}, return non-@code{nil}.
26206
26207 @lisp
26208 (gnus-check-backend-function "request-scan" "nnml:misc")
26209 @result{} t
26210 @end lisp
26211
26212 @item gnus-read-method
26213 @findex gnus-read-method
26214 Prompts the user for a select method.
26215
26216 @end table
26217
26218
26219 @node Back End Interface
26220 @subsection Back End Interface
26221
26222 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26223 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26224 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26225 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26226 examples of the latter we have @code{nntp-port-number} and
26227 @code{nnmbox-directory}.
26228
26229 When Gnus asks for information from a back end---say @code{nntp}---on
26230 something, it will normally include a virtual server name in the
26231 function parameters.  (If not, the back end should use the ``current''
26232 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26233 server as its only (optional) parameter.  If this virtual server hasn't
26234 been opened, the function should fail.
26235
26236 Note that a virtual server name has no relation to some physical server
26237 name.  Take this example:
26238
26239 @lisp
26240 (nntp "odd-one"
26241       (nntp-address "ifi.uio.no")
26242       (nntp-port-number 4324))
26243 @end lisp
26244
26245 Here the virtual server name is @samp{odd-one} while the name of
26246 the physical server is @samp{ifi.uio.no}.
26247
26248 The back ends should be able to switch between several virtual servers.
26249 The standard back ends implement this by keeping an alist of virtual
26250 server environments that they pull down/push up when needed.
26251
26252 There are two groups of interface functions: @dfn{required functions},
26253 which must be present, and @dfn{optional functions}, which Gnus will
26254 always check for presence before attempting to call 'em.
26255
26256 All these functions are expected to return data in the buffer
26257 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26258 unfortunately named, but we'll have to live with it.  When I talk about
26259 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26260 talk about @dfn{return value}, I talk about the function value returned by
26261 the function call.  Functions that fail should return @code{nil} as the
26262 return value.
26263
26264 Some back ends could be said to be @dfn{server-forming} back ends, and
26265 some might be said not to be.  The latter are back ends that generally
26266 only operate on one group at a time, and have no concept of ``server''
26267 ---they have a group, and they deliver info on that group and nothing
26268 more.
26269
26270 Gnus identifies each message by way of group name and article number.  A
26271 few remarks about these article numbers might be useful.  First of all,
26272 the numbers are positive integers.  Secondly, it is normally not
26273 possible for later articles to ``re-use'' older article numbers without
26274 confusing Gnus.  That is, if a group has ever contained a message
26275 numbered 42, then no other message may get that number, or Gnus will get
26276 mightily confused.@footnote{See the function
26277 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26278 Third, article numbers must be assigned in order of arrival in the
26279 group; this is not necessarily the same as the date of the message.
26280
26281 The previous paragraph already mentions all the ``hard'' restrictions that
26282 article numbers must fulfill.  But it seems that it might be useful to
26283 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26284 if there are holes in the article numbering sequence.  However, due to
26285 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26286 also useful for the article numbers to start at 1 to avoid running out
26287 of numbers as long as possible.
26288
26289 Note that by convention, back ends are named @code{nnsomething}, but
26290 Gnus also comes with some @code{nnnotbackends}, such as
26291 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26292
26293 In the examples and definitions I will refer to the imaginary back end
26294 @code{nnchoke}.
26295
26296 @cindex @code{nnchoke}
26297
26298 @menu
26299 * Required Back End Functions::  Functions that must be implemented.
26300 * Optional Back End Functions::  Functions that need not be implemented.
26301 * Error Messaging::             How to get messages and report errors.
26302 * Writing New Back Ends::       Extending old back ends.
26303 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26304 * Mail-like Back Ends::         Some tips on mail back ends.
26305 @end menu
26306
26307
26308 @node Required Back End Functions
26309 @subsubsection Required Back End Functions
26310
26311 @table @code
26312
26313 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26314
26315 @var{articles} is either a range of article numbers or a list of
26316 @code{Message-ID}s.  Current back ends do not fully support either---only
26317 sequences (lists) of article numbers, and most back ends do not support
26318 retrieval of @code{Message-ID}s.  But they should try for both.
26319
26320 The result data should either be HEADs or @acronym{NOV} lines, and the result
26321 value should either be @code{headers} or @code{nov} to reflect this.
26322 This might later be expanded to @code{various}, which will be a mixture
26323 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26324
26325 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26326 headers'', in some meaning of the word.  This is generally done by
26327 fetching (at most) @var{fetch-old} extra headers less than the smallest
26328 article number in @code{articles}, and filling the gaps as well.  The
26329 presence of this parameter can be ignored if the back end finds it
26330 cumbersome to follow the request.  If this is non-@code{nil} and not a
26331 number, do maximum fetches.
26332
26333 Here's an example HEAD:
26334
26335 @example
26336 221 1056 Article retrieved.
26337 Path: ifi.uio.no!sturles
26338 From: sturles@@ifi.uio.no (Sturle Sunde)
26339 Newsgroups: ifi.discussion
26340 Subject: Re: Something very droll
26341 Date: 27 Oct 1994 14:02:57 +0100
26342 Organization: Dept. of Informatics, University of Oslo, Norway
26343 Lines: 26
26344 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26345 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26346 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26347 .
26348 @end example
26349
26350 So a @code{headers} return value would imply that there's a number of
26351 these in the data buffer.
26352
26353 Here's a BNF definition of such a buffer:
26354
26355 @example
26356 headers        = *head
26357 head           = error / valid-head
26358 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26359 valid-head     = valid-message *header "." eol
26360 valid-message  = "221 " <number> " Article retrieved." eol
26361 header         = <text> eol
26362 @end example
26363
26364 @cindex BNF
26365 (The version of BNF used here is the one used in RFC822.)
26366
26367 If the return value is @code{nov}, the data buffer should contain
26368 @dfn{network overview database} lines.  These are basically fields
26369 separated by tabs.
26370
26371 @example
26372 nov-buffer = *nov-line
26373 nov-line   = field 7*8[ <TAB> field ] eol
26374 field      = <text except TAB>
26375 @end example
26376
26377 For a closer look at what should be in those fields,
26378 @pxref{Headers}.
26379
26380
26381 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26382
26383 @var{server} is here the virtual server name.  @var{definitions} is a
26384 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26385
26386 If the server can't be opened, no error should be signaled.  The back end
26387 may then choose to refuse further attempts at connecting to this
26388 server.  In fact, it should do so.
26389
26390 If the server is opened already, this function should return a
26391 non-@code{nil} value.  There should be no data returned.
26392
26393
26394 @item (nnchoke-close-server &optional SERVER)
26395
26396 Close connection to @var{server} and free all resources connected
26397 to it.  Return @code{nil} if the server couldn't be closed for some
26398 reason.
26399
26400 There should be no data returned.
26401
26402
26403 @item (nnchoke-request-close)
26404
26405 Close connection to all servers and free all resources that the back end
26406 have reserved.  All buffers that have been created by that back end
26407 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26408 function is generally only called when Gnus is shutting down.
26409
26410 There should be no data returned.
26411
26412
26413 @item (nnchoke-server-opened &optional SERVER)
26414
26415 If @var{server} is the current virtual server, and the connection to the
26416 physical server is alive, then this function should return a
26417 non-@code{nil} value.  This function should under no circumstances
26418 attempt to reconnect to a server we have lost connection to.
26419
26420 There should be no data returned.
26421
26422
26423 @item (nnchoke-status-message &optional SERVER)
26424
26425 This function should return the last error message from @var{server}.
26426
26427 There should be no data returned.
26428
26429
26430 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26431
26432 The result data from this function should be the article specified by
26433 @var{article}.  This might either be a @code{Message-ID} or a number.
26434 It is optional whether to implement retrieval by @code{Message-ID}, but
26435 it would be nice if that were possible.
26436
26437 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26438 in this buffer instead of the normal data buffer.  This is to make it
26439 possible to avoid copying large amounts of data from one buffer to
26440 another, while Gnus mainly requests articles to be inserted directly
26441 into its article buffer.
26442
26443 If it is at all possible, this function should return a cons cell where
26444 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26445 the article number.  This will enable Gnus to find out what the real
26446 group and article numbers are when fetching articles by
26447 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26448 on successful article retrieval.
26449
26450
26451 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26452
26453 Get data on @var{group}.  This function also has the side effect of
26454 making @var{group} the current group.
26455
26456 If @var{fast}, don't bother to return useful data, just make @var{group}
26457 the current group.
26458
26459 Here's an example of some result data and a definition of the same:
26460
26461 @example
26462 211 56 1000 1059 ifi.discussion
26463 @end example
26464
26465 The first number is the status, which should be 211.  Next is the
26466 total number of articles in the group, the lowest article number, the
26467 highest article number, and finally the group name.  Note that the total
26468 number of articles may be less than one might think while just
26469 considering the highest and lowest article numbers, but some articles
26470 may have been canceled.  Gnus just discards the total-number, so
26471 whether one should take the bother to generate it properly (if that is a
26472 problem) is left as an exercise to the reader.  If the group contains no
26473 articles, the lowest article number should be reported as 1 and the
26474 highest as 0.
26475
26476 @example
26477 group-status = [ error / info ] eol
26478 error        = [ "4" / "5" ] 2<number> " " <Error message>
26479 info         = "211 " 3* [ <number> " " ] <string>
26480 @end example
26481
26482
26483 @item (nnchoke-close-group GROUP &optional SERVER)
26484
26485 Close @var{group} and free any resources connected to it.  This will be
26486 a no-op on most back ends.
26487
26488 There should be no data returned.
26489
26490
26491 @item (nnchoke-request-list &optional SERVER)
26492
26493 Return a list of all groups available on @var{server}.  And that means
26494 @emph{all}.
26495
26496 Here's an example from a server that only carries two groups:
26497
26498 @example
26499 ifi.test 0000002200 0000002000 y
26500 ifi.discussion 3324 3300 n
26501 @end example
26502
26503 On each line we have a group name, then the highest article number in
26504 that group, the lowest article number, and finally a flag.  If the group
26505 contains no articles, the lowest article number should be reported as 1
26506 and the highest as 0.
26507
26508 @example
26509 active-file = *active-line
26510 active-line = name " " <number> " " <number> " " flags eol
26511 name        = <string>
26512 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26513 @end example
26514
26515 The flag says whether the group is read-only (@samp{n}), is moderated
26516 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26517 (@samp{=other-group}) or none of the above (@samp{y}).
26518
26519
26520 @item (nnchoke-request-post &optional SERVER)
26521
26522 This function should post the current buffer.  It might return whether
26523 the posting was successful or not, but that's not required.  If, for
26524 instance, the posting is done asynchronously, it has generally not been
26525 completed by the time this function concludes.  In that case, this
26526 function should set up some kind of sentinel to beep the user loud and
26527 clear if the posting could not be completed.
26528
26529 There should be no result data from this function.
26530
26531 @end table
26532
26533
26534 @node Optional Back End Functions
26535 @subsubsection Optional Back End Functions
26536
26537 @table @code
26538
26539 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26540
26541 @var{groups} is a list of groups, and this function should request data
26542 on all those groups.  How it does it is of no concern to Gnus, but it
26543 should attempt to do this in a speedy fashion.
26544
26545 The return value of this function can be either @code{active} or
26546 @code{group}, which says what the format of the result data is.  The
26547 former is in the same format as the data from
26548 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26549 in the same format as @code{nnchoke-request-group} gives.
26550
26551 @example
26552 group-buffer = *active-line / *group-status
26553 @end example
26554
26555
26556 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26557
26558 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26559 alterations.  This comes in handy if the back end really carries all
26560 the information (as is the case with virtual and imap groups).  This
26561 function should destructively alter the info to suit its needs, and
26562 should return a non-@code{nil} value.
26563
26564 There should be no result data from this function.
26565
26566
26567 @item (nnchoke-request-type GROUP &optional ARTICLE)
26568
26569 When the user issues commands for ``sending news'' (@kbd{F} in the
26570 summary buffer, for instance), Gnus has to know whether the article the
26571 user is following up on is news or mail.  This function should return
26572 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26573 is mail and @code{unknown} if the type can't be decided.  (The
26574 @var{article} parameter is necessary in @code{nnvirtual} groups which
26575 might very well combine mail groups and news groups.)  Both @var{group}
26576 and @var{article} may be @code{nil}.
26577
26578 There should be no result data from this function.
26579
26580
26581 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26582
26583 Set/remove/add marks on articles.  Normally Gnus handles the article
26584 marks (such as read, ticked, expired etc) internally, and store them in
26585 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26586 all information about the articles on the server, so Gnus need to
26587 propagate the mark information to the server.
26588
26589 @var{action} is a list of mark setting requests, having this format:
26590
26591 @example
26592 (RANGE ACTION MARK)
26593 @end example
26594
26595 @var{range} is a range of articles you wish to update marks on.
26596 @var{action} is @code{add} or @code{del}, used to add marks or remove
26597 marks (preserving all marks not mentioned).  @var{mark} is a list of
26598 marks; where each mark is a symbol.  Currently used marks are
26599 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26600 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26601 @code{forward} and @code{recent}, but your back end should, if
26602 possible, not limit itself to these.
26603
26604 Given contradictory actions, the last action in the list should be the
26605 effective one.  That is, if your action contains a request to add the
26606 @code{tick} mark on article 1 and, later in the list, a request to
26607 remove the mark on the same article, the mark should in fact be removed.
26608
26609 An example action list:
26610
26611 @example
26612 (((5 12 30) 'del '(tick))
26613  ((10 . 90) 'add '(read expire))
26614  ((92 94) 'del '(read)))
26615 @end example
26616
26617 The function should return a range of articles it wasn't able to set the
26618 mark on (currently not used for anything).
26619
26620 There should be no result data from this function.
26621
26622 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26623
26624 If the user tries to set a mark that the back end doesn't like, this
26625 function may change the mark.  Gnus will use whatever this function
26626 returns as the mark for @var{article} instead of the original
26627 @var{mark}.  If the back end doesn't care, it must return the original
26628 @var{mark}, and not @code{nil} or any other type of garbage.
26629
26630 The only use for this I can see is what @code{nnvirtual} does with
26631 it---if a component group is auto-expirable, marking an article as read
26632 in the virtual group should result in the article being marked as
26633 expirable.
26634
26635 There should be no result data from this function.
26636
26637
26638 @item (nnchoke-request-scan &optional GROUP SERVER)
26639
26640 This function may be called at any time (by Gnus or anything else) to
26641 request that the back end check for incoming articles, in one way or
26642 another.  A mail back end will typically read the spool file or query
26643 the @acronym{POP} server when this function is invoked.  The
26644 @var{group} doesn't have to be heeded---if the back end decides that
26645 it is too much work just scanning for a single group, it may do a
26646 total scan of all groups.  It would be nice, however, to keep things
26647 local if that's practical.
26648
26649 There should be no result data from this function.
26650
26651
26652 @item (nnchoke-request-group-description GROUP &optional SERVER)
26653
26654 The result data from this function should be a description of
26655 @var{group}.
26656
26657 @example
26658 description-line = name <TAB> description eol
26659 name             = <string>
26660 description      = <text>
26661 @end example
26662
26663 @item (nnchoke-request-list-newsgroups &optional SERVER)
26664
26665 The result data from this function should be the description of all
26666 groups available on the server.
26667
26668 @example
26669 description-buffer = *description-line
26670 @end example
26671
26672
26673 @item (nnchoke-request-newgroups DATE &optional SERVER)
26674
26675 The result data from this function should be all groups that were
26676 created after @samp{date}, which is in normal human-readable date format
26677 (i.e., the date format used in mail and news headers, and returned by
26678 the function @code{message-make-date} by default).  The data should be
26679 in the active buffer format.
26680
26681 It is okay for this function to return ``too many'' groups; some back ends
26682 might find it cheaper to return the full list of groups, rather than
26683 just the new groups.  But don't do this for back ends with many groups.
26684 Normally, if the user creates the groups herself, there won't be too
26685 many groups, so @code{nnml} and the like are probably safe.  But for
26686 back ends like @code{nntp}, where the groups have been created by the
26687 server, it is quite likely that there can be many groups.
26688
26689
26690 @item (nnchoke-request-create-group GROUP &optional SERVER)
26691
26692 This function should create an empty group with name @var{group}.
26693
26694 There should be no return data.
26695
26696
26697 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26698
26699 This function should run the expiry process on all articles in the
26700 @var{articles} range (which is currently a simple list of article
26701 numbers.)  It is left up to the back end to decide how old articles
26702 should be before they are removed by this function.  If @var{force} is
26703 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26704 they are.
26705
26706 This function should return a list of articles that it did not/was not
26707 able to delete.
26708
26709 There should be no result data returned.
26710
26711
26712 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26713
26714 This function should move @var{article} (which is a number) from
26715 @var{group} by calling @var{accept-form}.
26716
26717 This function should ready the article in question for moving by
26718 removing any header lines it has added to the article, and generally
26719 should ``tidy up'' the article.  Then it should @code{eval}
26720 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26721 will do the actual copying.  If this @code{eval} returns a
26722 non-@code{nil} value, the article should be removed.
26723
26724 If @var{last} is @code{nil}, that means that there is a high likelihood
26725 that there will be more requests issued shortly, so that allows some
26726 optimizations.
26727
26728 The function should return a cons where the @code{car} is the group name and
26729 the @code{cdr} is the article number that the article was entered as.
26730
26731 The group should exist before the back end is asked to accept the
26732 article for that group.
26733
26734 There should be no data returned.
26735
26736
26737 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26738
26739 This function takes the current buffer and inserts it into @var{group}.
26740 If @var{last} in @code{nil}, that means that there will be more calls to
26741 this function in short order.
26742
26743 The function should return a cons where the @code{car} is the group name and
26744 the @code{cdr} is the article number that the article was entered as.
26745
26746 There should be no data returned.
26747
26748
26749 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26750
26751 This function should remove @var{article} (which is a number) from
26752 @var{group} and insert @var{buffer} there instead.
26753
26754 There should be no data returned.
26755
26756
26757 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26758
26759 This function should delete @var{group}.  If @var{force}, it should
26760 really delete all the articles in the group, and then delete the group
26761 itself.  (If there is such a thing as ``the group itself''.)
26762
26763 There should be no data returned.
26764
26765
26766 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26767
26768 This function should rename @var{group} into @var{new-name}.  All
26769 articles in @var{group} should move to @var{new-name}.
26770
26771 There should be no data returned.
26772
26773 @end table
26774
26775
26776 @node Error Messaging
26777 @subsubsection Error Messaging
26778
26779 @findex nnheader-report
26780 @findex nnheader-get-report
26781 The back ends should use the function @code{nnheader-report} to report
26782 error conditions---they should not raise errors when they aren't able to
26783 perform a request.  The first argument to this function is the back end
26784 symbol, and the rest are interpreted as arguments to @code{format} if
26785 there are multiple of them, or just a string if there is one of them.
26786 This function must always returns @code{nil}.
26787
26788 @lisp
26789 (nnheader-report 'nnchoke "You did something totally bogus")
26790
26791 (nnheader-report 'nnchoke "Could not request group %s" group)
26792 @end lisp
26793
26794 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26795 @code{nil} back from a server, and this function returns the most
26796 recently reported message for the back end in question.  This function
26797 takes one argument---the server symbol.
26798
26799 Internally, these functions access @var{back-end}@code{-status-string},
26800 so the @code{nnchoke} back end will have its error message stored in
26801 @code{nnchoke-status-string}.
26802
26803
26804 @node Writing New Back Ends
26805 @subsubsection Writing New Back Ends
26806
26807 Many back ends are quite similar.  @code{nnml} is just like
26808 @code{nnspool}, but it allows you to edit the articles on the server.
26809 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26810 and it doesn't maintain overview databases.  @code{nndir} is just like
26811 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26812 editing articles.
26813
26814 It would make sense if it were possible to ``inherit'' functions from
26815 back ends when writing new back ends.  And, indeed, you can do that if you
26816 want to.  (You don't have to if you don't want to, of course.)
26817
26818 All the back ends declare their public variables and functions by using a
26819 package called @code{nnoo}.
26820
26821 To inherit functions from other back ends (and allow other back ends to
26822 inherit functions from the current back end), you should use the
26823 following macros:
26824
26825 @table @code
26826
26827 @item nnoo-declare
26828 This macro declares the first parameter to be a child of the subsequent
26829 parameters.  For instance:
26830
26831 @lisp
26832 (nnoo-declare nndir
26833   nnml nnmh)
26834 @end lisp
26835
26836 @code{nndir} has declared here that it intends to inherit functions from
26837 both @code{nnml} and @code{nnmh}.
26838
26839 @item defvoo
26840 This macro is equivalent to @code{defvar}, but registers the variable as
26841 a public server variable.  Most state-oriented variables should be
26842 declared with @code{defvoo} instead of @code{defvar}.
26843
26844 In addition to the normal @code{defvar} parameters, it takes a list of
26845 variables in the parent back ends to map the variable to when executing
26846 a function in those back ends.
26847
26848 @lisp
26849 (defvoo nndir-directory nil
26850   "Where nndir will look for groups."
26851   nnml-current-directory nnmh-current-directory)
26852 @end lisp
26853
26854 This means that @code{nnml-current-directory} will be set to
26855 @code{nndir-directory} when an @code{nnml} function is called on behalf
26856 of @code{nndir}.  (The same with @code{nnmh}.)
26857
26858 @item nnoo-define-basics
26859 This macro defines some common functions that almost all back ends should
26860 have.
26861
26862 @lisp
26863 (nnoo-define-basics nndir)
26864 @end lisp
26865
26866 @item deffoo
26867 This macro is just like @code{defun} and takes the same parameters.  In
26868 addition to doing the normal @code{defun} things, it registers the
26869 function as being public so that other back ends can inherit it.
26870
26871 @item nnoo-map-functions
26872 This macro allows mapping of functions from the current back end to
26873 functions from the parent back ends.
26874
26875 @lisp
26876 (nnoo-map-functions nndir
26877   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26878   (nnmh-request-article 0 nndir-current-group 0 0))
26879 @end lisp
26880
26881 This means that when @code{nndir-retrieve-headers} is called, the first,
26882 third, and fourth parameters will be passed on to
26883 @code{nnml-retrieve-headers}, while the second parameter is set to the
26884 value of @code{nndir-current-group}.
26885
26886 @item nnoo-import
26887 This macro allows importing functions from back ends.  It should be the
26888 last thing in the source file, since it will only define functions that
26889 haven't already been defined.
26890
26891 @lisp
26892 (nnoo-import nndir
26893   (nnmh
26894    nnmh-request-list
26895    nnmh-request-newgroups)
26896   (nnml))
26897 @end lisp
26898
26899 This means that calls to @code{nndir-request-list} should just be passed
26900 on to @code{nnmh-request-list}, while all public functions from
26901 @code{nnml} that haven't been defined in @code{nndir} yet should be
26902 defined now.
26903
26904 @end table
26905
26906 Below is a slightly shortened version of the @code{nndir} back end.
26907
26908 @lisp
26909 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26910 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26911
26912 ;;; @r{Code:}
26913
26914 (require 'nnheader)
26915 (require 'nnmh)
26916 (require 'nnml)
26917 (require 'nnoo)
26918 (eval-when-compile (require 'cl))
26919
26920 (nnoo-declare nndir
26921   nnml nnmh)
26922
26923 (defvoo nndir-directory nil
26924   "Where nndir will look for groups."
26925   nnml-current-directory nnmh-current-directory)
26926
26927 (defvoo nndir-nov-is-evil nil
26928   "*Non-nil means that nndir will never retrieve NOV headers."
26929   nnml-nov-is-evil)
26930
26931 (defvoo nndir-current-group ""
26932   nil
26933   nnml-current-group nnmh-current-group)
26934 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26935 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26936
26937 (defvoo nndir-status-string "" nil nnmh-status-string)
26938 (defconst nndir-version "nndir 1.0")
26939
26940 ;;; @r{Interface functions.}
26941
26942 (nnoo-define-basics nndir)
26943
26944 (deffoo nndir-open-server (server &optional defs)
26945   (setq nndir-directory
26946         (or (cadr (assq 'nndir-directory defs))
26947             server))
26948   (unless (assq 'nndir-directory defs)
26949     (push `(nndir-directory ,server) defs))
26950   (push `(nndir-current-group
26951           ,(file-name-nondirectory
26952             (directory-file-name nndir-directory)))
26953         defs)
26954   (push `(nndir-top-directory
26955           ,(file-name-directory (directory-file-name nndir-directory)))
26956         defs)
26957   (nnoo-change-server 'nndir server defs))
26958
26959 (nnoo-map-functions nndir
26960   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26961   (nnmh-request-article 0 nndir-current-group 0 0)
26962   (nnmh-request-group nndir-current-group 0 0)
26963   (nnmh-close-group nndir-current-group 0))
26964
26965 (nnoo-import nndir
26966   (nnmh
26967    nnmh-status-message
26968    nnmh-request-list
26969    nnmh-request-newgroups))
26970
26971 (provide 'nndir)
26972 @end lisp
26973
26974
26975 @node Hooking New Back Ends Into Gnus
26976 @subsubsection Hooking New Back Ends Into Gnus
26977
26978 @vindex gnus-valid-select-methods
26979 @findex gnus-declare-backend
26980 Having Gnus start using your new back end is rather easy---you just
26981 declare it with the @code{gnus-declare-backend} functions.  This will
26982 enter the back end into the @code{gnus-valid-select-methods} variable.
26983
26984 @code{gnus-declare-backend} takes two parameters---the back end name and
26985 an arbitrary number of @dfn{abilities}.
26986
26987 Here's an example:
26988
26989 @lisp
26990 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26991 @end lisp
26992
26993 The above line would then go in the @file{nnchoke.el} file.
26994
26995 The abilities can be:
26996
26997 @table @code
26998 @item mail
26999 This is a mailish back end---followups should (probably) go via mail.
27000 @item post
27001 This is a newsish back end---followups should (probably) go via news.
27002 @item post-mail
27003 This back end supports both mail and news.
27004 @item none
27005 This is neither a post nor mail back end---it's something completely
27006 different.
27007 @item respool
27008 It supports respooling---or rather, it is able to modify its source
27009 articles and groups.
27010 @item address
27011 The name of the server should be in the virtual server name.  This is
27012 true for almost all back ends.
27013 @item prompt-address
27014 The user should be prompted for an address when doing commands like
27015 @kbd{B} in the group buffer.  This is true for back ends like
27016 @code{nntp}, but not @code{nnmbox}, for instance.
27017 @end table
27018
27019
27020 @node Mail-like Back Ends
27021 @subsubsection Mail-like Back Ends
27022
27023 One of the things that separate the mail back ends from the rest of the
27024 back ends is the heavy dependence by most of the mail back ends on
27025 common functions in @file{nnmail.el}.  For instance, here's the
27026 definition of @code{nnml-request-scan}:
27027
27028 @lisp
27029 (deffoo nnml-request-scan (&optional group server)
27030   (setq nnml-article-file-alist nil)
27031   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27032 @end lisp
27033
27034 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27035 and @code{nnmail} takes care of all the moving and splitting of the
27036 mail.
27037
27038 This function takes four parameters.
27039
27040 @table @var
27041 @item method
27042 This should be a symbol to designate which back end is responsible for
27043 the call.
27044
27045 @item exit-function
27046 This function should be called after the splitting has been performed.
27047
27048 @item temp-directory
27049 Where the temporary files should be stored.
27050
27051 @item group
27052 This optional argument should be a group name if the splitting is to be
27053 performed for one group only.
27054 @end table
27055
27056 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27057 save each article.  @var{back-end}@code{-active-number} will be called to
27058 find the article number assigned to this article.
27059
27060 The function also uses the following variables:
27061 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27062 this back end); and @var{back-end}@code{-group-alist} and
27063 @var{back-end}@code{-active-file} to generate the new active file.
27064 @var{back-end}@code{-group-alist} should be a group-active alist, like
27065 this:
27066
27067 @example
27068 (("a-group" (1 . 10))
27069  ("some-group" (34 . 39)))
27070 @end example
27071
27072
27073 @node Score File Syntax
27074 @subsection Score File Syntax
27075
27076 Score files are meant to be easily parseable, but yet extremely
27077 mallable.  It was decided that something that had the same read syntax
27078 as an Emacs Lisp list would fit that spec.
27079
27080 Here's a typical score file:
27081
27082 @lisp
27083 (("summary"
27084   ("win95" -10000 nil s)
27085   ("Gnus"))
27086  ("from"
27087   ("Lars" -1000))
27088  (mark -100))
27089 @end lisp
27090
27091 BNF definition of a score file:
27092
27093 @example
27094 score-file      = "" / "(" *element ")"
27095 element         = rule / atom
27096 rule            = string-rule / number-rule / date-rule
27097 string-rule     = "(" quote string-header quote space *string-match ")"
27098 number-rule     = "(" quote number-header quote space *number-match ")"
27099 date-rule       = "(" quote date-header quote space *date-match ")"
27100 quote           = <ascii 34>
27101 string-header   = "subject" / "from" / "references" / "message-id" /
27102                   "xref" / "body" / "head" / "all" / "followup"
27103 number-header   = "lines" / "chars"
27104 date-header     = "date"
27105 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27106                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27107 score           = "nil" / <integer>
27108 date            = "nil" / <natural number>
27109 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27110                   "r" / "regex" / "R" / "Regex" /
27111                   "e" / "exact" / "E" / "Exact" /
27112                   "f" / "fuzzy" / "F" / "Fuzzy"
27113 number-match    = "(" <integer> [ "" / [ space score [ "" /
27114                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27115 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27116 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27117                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27118 date-match-t    = "nil" / "at" / "before" / "after"
27119 atom            = "(" [ required-atom / optional-atom ] ")"
27120 required-atom   = mark / expunge / mark-and-expunge / files /
27121                   exclude-files / read-only / touched
27122 optional-atom   = adapt / local / eval
27123 mark            = "mark" space nil-or-number
27124 nil-or-number   = "nil" / <integer>
27125 expunge         = "expunge" space nil-or-number
27126 mark-and-expunge = "mark-and-expunge" space nil-or-number
27127 files           = "files" *[ space <string> ]
27128 exclude-files   = "exclude-files" *[ space <string> ]
27129 read-only       = "read-only" [ space "nil" / space "t" ]
27130 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27131 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27132 local           = "local" *[ space "(" <string> space <form> ")" ]
27133 eval            = "eval" space <form>
27134 space           = *[ " " / <TAB> / <NEWLINE> ]
27135 @end example
27136
27137 Any unrecognized elements in a score file should be ignored, but not
27138 discarded.
27139
27140 As you can see, white space is needed, but the type and amount of white
27141 space is irrelevant.  This means that formatting of the score file is
27142 left up to the programmer---if it's simpler to just spew it all out on
27143 one looong line, then that's ok.
27144
27145 The meaning of the various atoms are explained elsewhere in this
27146 manual (@pxref{Score File Format}).
27147
27148
27149 @node Headers
27150 @subsection Headers
27151
27152 Internally Gnus uses a format for storing article headers that
27153 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27154 almost suspect that the author looked at the @acronym{NOV} specification and
27155 just shamelessly @emph{stole} the entire thing, and one would be right.
27156
27157 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27158 RFC 1036 to talk about lines in the head of an article (e.g.,
27159 @code{From}).  It is used by many people as a synonym for
27160 ``head''---``the header and the body''.  (That should be avoided, in my
27161 opinion.)  And Gnus uses a format internally that it calls ``header'',
27162 which is what I'm talking about here.  This is a 9-element vector,
27163 basically, with each header (ouch) having one slot.
27164
27165 These slots are, in order: @code{number}, @code{subject}, @code{from},
27166 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27167 @code{xref}, and @code{extra}.  There are macros for accessing and
27168 setting these slots---they all have predictable names beginning with
27169 @code{mail-header-} and @code{mail-header-set-}, respectively.
27170
27171 All these slots contain strings, except the @code{extra} slot, which
27172 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27173
27174
27175 @node Ranges
27176 @subsection Ranges
27177
27178 @sc{gnus} introduced a concept that I found so useful that I've started
27179 using it a lot and have elaborated on it greatly.
27180
27181 The question is simple: If you have a large amount of objects that are
27182 identified by numbers (say, articles, to take a @emph{wild} example)
27183 that you want to qualify as being ``included'', a normal sequence isn't
27184 very useful.  (A 200,000 length sequence is a bit long-winded.)
27185
27186 The solution is as simple as the question: You just collapse the
27187 sequence.
27188
27189 @example
27190 (1 2 3 4 5 6 10 11 12)
27191 @end example
27192
27193 is transformed into
27194
27195 @example
27196 ((1 . 6) (10 . 12))
27197 @end example
27198
27199 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27200 lonesome object, a @samp{13} is a valid element:
27201
27202 @example
27203 ((1 . 6) 7 (10 . 12))
27204 @end example
27205
27206 This means that comparing two ranges to find out whether they are equal
27207 is slightly tricky:
27208
27209 @example
27210 ((1 . 5) 7 8 (10 . 12))
27211 @end example
27212
27213 and
27214
27215 @example
27216 ((1 . 5) (7 . 8) (10 . 12))
27217 @end example
27218
27219 are equal.  In fact, any non-descending list is a range:
27220
27221 @example
27222 (1 2 3 4 5)
27223 @end example
27224
27225 is a perfectly valid range, although a pretty long-winded one.  This is
27226 also valid:
27227
27228 @example
27229 (1 . 5)
27230 @end example
27231
27232 and is equal to the previous range.
27233
27234 Here's a BNF definition of ranges.  Of course, one must remember the
27235 semantic requirement that the numbers are non-descending.  (Any number
27236 of repetition of the same number is allowed, but apt to disappear in
27237 range handling.)
27238
27239 @example
27240 range           = simple-range / normal-range
27241 simple-range    = "(" number " . " number ")"
27242 normal-range    = "(" start-contents ")"
27243 contents        = "" / simple-range *[ " " contents ] /
27244                   number *[ " " contents ]
27245 @end example
27246
27247 Gnus currently uses ranges to keep track of read articles and article
27248 marks.  I plan on implementing a number of range operators in C if The
27249 Powers That Be are willing to let me.  (I haven't asked yet, because I
27250 need to do some more thinking on what operators I need to make life
27251 totally range-based without ever having to convert back to normal
27252 sequences.)
27253
27254
27255 @node Group Info
27256 @subsection Group Info
27257
27258 Gnus stores all permanent info on groups in a @dfn{group info} list.
27259 This list is from three to six elements (or more) long and exhaustively
27260 describes the group.
27261
27262 Here are two example group infos; one is a very simple group while the
27263 second is a more complex one:
27264
27265 @example
27266 ("no.group" 5 ((1 . 54324)))
27267
27268 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27269                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27270                 (nnml "")
27271                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27272 @end example
27273
27274 The first element is the @dfn{group name}---as Gnus knows the group,
27275 anyway.  The second element is the @dfn{subscription level}, which
27276 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27277 cons cell where the @code{car} is the level and the @code{cdr} is the
27278 score.)  The third element is a list of ranges of read articles.  The
27279 fourth element is a list of lists of article marks of various kinds.
27280 The fifth element is the select method (or virtual server, if you like).
27281 The sixth element is a list of @dfn{group parameters}, which is what
27282 this section is about.
27283
27284 Any of the last three elements may be missing if they are not required.
27285 In fact, the vast majority of groups will normally only have the first
27286 three elements, which saves quite a lot of cons cells.
27287
27288 Here's a BNF definition of the group info format:
27289
27290 @example
27291 info          = "(" group space ralevel space read
27292                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27293                 space parameters ] ] ] ] ] ")"
27294 group         = quote <string> quote
27295 ralevel       = rank / level
27296 level         = <integer in the range of 1 to inf>
27297 rank          = "(" level "." score ")"
27298 score         = <integer in the range of 1 to inf>
27299 read          = range
27300 marks-lists   = nil / "(" *marks ")"
27301 marks         = "(" <string> range ")"
27302 method        = "(" <string> *elisp-forms ")"
27303 parameters    = "(" *elisp-forms ")"
27304 @end example
27305
27306 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27307 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27308 in pseudo-BNF.
27309
27310 If you have a Gnus info and want to access the elements, Gnus offers a
27311 series of macros for getting/setting these elements.
27312
27313 @table @code
27314 @item gnus-info-group
27315 @itemx gnus-info-set-group
27316 @findex gnus-info-group
27317 @findex gnus-info-set-group
27318 Get/set the group name.
27319
27320 @item gnus-info-rank
27321 @itemx gnus-info-set-rank
27322 @findex gnus-info-rank
27323 @findex gnus-info-set-rank
27324 Get/set the group rank (@pxref{Group Score}).
27325
27326 @item gnus-info-level
27327 @itemx gnus-info-set-level
27328 @findex gnus-info-level
27329 @findex gnus-info-set-level
27330 Get/set the group level.
27331
27332 @item gnus-info-score
27333 @itemx gnus-info-set-score
27334 @findex gnus-info-score
27335 @findex gnus-info-set-score
27336 Get/set the group score (@pxref{Group Score}).
27337
27338 @item gnus-info-read
27339 @itemx gnus-info-set-read
27340 @findex gnus-info-read
27341 @findex gnus-info-set-read
27342 Get/set the ranges of read articles.
27343
27344 @item gnus-info-marks
27345 @itemx gnus-info-set-marks
27346 @findex gnus-info-marks
27347 @findex gnus-info-set-marks
27348 Get/set the lists of ranges of marked articles.
27349
27350 @item gnus-info-method
27351 @itemx gnus-info-set-method
27352 @findex gnus-info-method
27353 @findex gnus-info-set-method
27354 Get/set the group select method.
27355
27356 @item gnus-info-params
27357 @itemx gnus-info-set-params
27358 @findex gnus-info-params
27359 @findex gnus-info-set-params
27360 Get/set the group parameters.
27361 @end table
27362
27363 All the getter functions take one parameter---the info list.  The setter
27364 functions take two parameters---the info list and the new value.
27365
27366 The last three elements in the group info aren't mandatory, so it may be
27367 necessary to extend the group info before setting the element.  If this
27368 is necessary, you can just pass on a non-@code{nil} third parameter to
27369 the three final setter functions to have this happen automatically.
27370
27371
27372 @node Extended Interactive
27373 @subsection Extended Interactive
27374 @cindex interactive
27375 @findex gnus-interactive
27376
27377 Gnus extends the standard Emacs @code{interactive} specification
27378 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27379 Prefixes}).  Here's an example of how this is used:
27380
27381 @lisp
27382 (defun gnus-summary-increase-score (&optional score symp)
27383   (interactive (gnus-interactive "P\ny"))
27384   ...
27385   )
27386 @end lisp
27387
27388 The best thing to do would have been to implement
27389 @code{gnus-interactive} as a macro which would have returned an
27390 @code{interactive} form, but this isn't possible since Emacs checks
27391 whether a function is interactive or not by simply doing an @code{assq}
27392 on the lambda form.  So, instead we have @code{gnus-interactive}
27393 function that takes a string and returns values that are usable to
27394 @code{interactive}.
27395
27396 This function accepts (almost) all normal @code{interactive} specs, but
27397 adds a few more.
27398
27399 @table @samp
27400 @item y
27401 @vindex gnus-current-prefix-symbol
27402 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27403 variable.
27404
27405 @item Y
27406 @vindex gnus-current-prefix-symbols
27407 A list of the current symbolic prefixes---the
27408 @code{gnus-current-prefix-symbol} variable.
27409
27410 @item A
27411 The current article number---the @code{gnus-summary-article-number}
27412 function.
27413
27414 @item H
27415 The current article header---the @code{gnus-summary-article-header}
27416 function.
27417
27418 @item g
27419 The current group name---the @code{gnus-group-group-name}
27420 function.
27421
27422 @end table
27423
27424
27425 @node Emacs/XEmacs Code
27426 @subsection Emacs/XEmacs Code
27427 @cindex XEmacs
27428 @cindex Emacsen
27429
27430 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27431 platforms must be the primary one.  I chose Emacs.  Not because I don't
27432 like XEmacs or Mule, but because it comes first alphabetically.
27433
27434 This means that Gnus will byte-compile under Emacs with nary a warning,
27435 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27436 As I use byte-compilation warnings to help me root out trivial errors in
27437 Gnus, that's very useful.
27438
27439 I've also consistently used Emacs function interfaces, but have used
27440 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27441 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27442 function.  I then define a function called @code{gnus-run-at-time} that
27443 takes the same parameters as the Emacs @code{run-at-time}.  When running
27444 Gnus under Emacs, the former function is just an alias for the latter.
27445 However, when running under XEmacs, the former is an alias for the
27446 following function:
27447
27448 @lisp
27449 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27450   (start-itimer
27451    "gnus-run-at-time"
27452    `(lambda ()
27453       (,function ,@@args))
27454    time repeat))
27455 @end lisp
27456
27457 This sort of thing has been done for bunches of functions.  Gnus does
27458 not redefine any native Emacs functions while running under XEmacs---it
27459 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27460 all over.
27461
27462 In the cases where the XEmacs function interface was obviously cleaner,
27463 I used it instead.  For example @code{gnus-region-active-p} is an alias
27464 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27465
27466 Of course, I could have chosen XEmacs as my native platform and done
27467 mapping functions the other way around.  But I didn't.  The performance
27468 hit these indirections impose on Gnus under XEmacs should be slight.
27469
27470
27471 @node Various File Formats
27472 @subsection Various File Formats
27473
27474 @menu
27475 * Active File Format::          Information on articles and groups available.
27476 * Newsgroups File Format::      Group descriptions.
27477 @end menu
27478
27479
27480 @node Active File Format
27481 @subsubsection Active File Format
27482
27483 The active file lists all groups available on the server in
27484 question.  It also lists the highest and lowest current article numbers
27485 in each group.
27486
27487 Here's an excerpt from a typical active file:
27488
27489 @example
27490 soc.motss 296030 293865 y
27491 alt.binaries.pictures.fractals 3922 3913 n
27492 comp.sources.unix 1605 1593 m
27493 comp.binaries.ibm.pc 5097 5089 y
27494 no.general 1000 900 y
27495 @end example
27496
27497 Here's a pseudo-BNF definition of this file:
27498
27499 @example
27500 active      = *group-line
27501 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27502 group       = <non-white-space string>
27503 spc         = " "
27504 high-number = <non-negative integer>
27505 low-number  = <positive integer>
27506 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27507 @end example
27508
27509 For a full description of this file, see the manual pages for
27510 @samp{innd}, in particular @samp{active(5)}.
27511
27512
27513 @node Newsgroups File Format
27514 @subsubsection Newsgroups File Format
27515
27516 The newsgroups file lists groups along with their descriptions.  Not all
27517 groups on the server have to be listed,  and not all groups in the file
27518 have to exist on the server.  The file is meant purely as information to
27519 the user.
27520
27521 The format is quite simple; a group name, a tab, and the description.
27522 Here's the definition:
27523
27524 @example
27525 newsgroups    = *line
27526 line          = group tab description <NEWLINE>
27527 group         = <non-white-space string>
27528 tab           = <TAB>
27529 description   = <string>
27530 @end example
27531
27532
27533 @page
27534 @node Emacs for Heathens
27535 @section Emacs for Heathens
27536
27537 Believe it or not, but some people who use Gnus haven't really used
27538 Emacs much before they embarked on their journey on the Gnus Love Boat.
27539 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27540 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27541 is a regexp that is used for matching on the group name'' are magical
27542 phrases with little or no meaning, then this appendix is for you.  If
27543 you are already familiar with Emacs, just ignore this and go fondle your
27544 cat instead.
27545
27546 @menu
27547 * Keystrokes::                  Entering text and executing commands.
27548 * Emacs Lisp::                  The built-in Emacs programming language.
27549 @end menu
27550
27551
27552 @node Keystrokes
27553 @subsection Keystrokes
27554
27555 @itemize @bullet
27556 @item
27557 Q: What is an experienced Emacs user?
27558
27559 @item
27560 A: A person who wishes that the terminal had pedals.
27561 @end itemize
27562
27563 Yes, when you use Emacs, you are apt to use the control key, the shift
27564 key and the meta key a lot.  This is very annoying to some people
27565 (notably @code{vi}le users), and the rest of us just love the hell out
27566 of it.  Just give up and submit.  Emacs really does stand for
27567 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27568 may have heard from other disreputable sources (like the Emacs author).
27569
27570 The shift keys are normally located near your pinky fingers, and are
27571 normally used to get capital letters and stuff.  You probably use it all
27572 the time.  The control key is normally marked ``CTRL'' or something like
27573 that.  The meta key is, funnily enough, never marked as such on any
27574 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27575 which is the meta key on this keyboard.  It's usually located somewhere
27576 to the left hand side of the keyboard, usually on the bottom row.
27577
27578 Now, us Emacs people don't say ``press the meta-control-m key'',
27579 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27580 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27581 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27582 down the control key, and hold it down while you press @kbd{k}''.
27583 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27584 the control key and then press @kbd{k}''.  Simple, ay?
27585
27586 This is somewhat complicated by the fact that not all keyboards have a
27587 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27588 means ``press escape, release escape, press @kbd{k}''.  That's much more
27589 work than if you have a meta key, so if that's the case, I respectfully
27590 suggest you get a real keyboard with a meta key.  You can't live without
27591 it.
27592
27593
27594
27595 @node Emacs Lisp
27596 @subsection Emacs Lisp
27597
27598 Emacs is the King of Editors because it's really a Lisp interpreter.
27599 Each and every key you tap runs some Emacs Lisp code snippet, and since
27600 Emacs Lisp is an interpreted language, that means that you can configure
27601 any key to run any arbitrary code.  You just, like, do it.
27602
27603 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27604 functions.  (These are byte-compiled for speed, but it's still
27605 interpreted.)  If you decide that you don't like the way Gnus does
27606 certain things, it's trivial to have it do something a different way.
27607 (Well, at least if you know how to write Lisp code.)  However, that's
27608 beyond the scope of this manual, so we are simply going to talk about
27609 some common constructs that you normally use in your @file{.emacs} file
27610 to customize Gnus.
27611
27612 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27613 write the following:
27614
27615 @lisp
27616 (setq gnus-florgbnize 4)
27617 @end lisp
27618
27619 This function (really ``special form'') @code{setq} is the one that can
27620 set a variable to some value.  This is really all you need to know.  Now
27621 you can go and fill your @file{.emacs} file with lots of these to change
27622 how Gnus works.
27623
27624 If you have put that thing in your @file{.emacs} file, it will be read
27625 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27626 start Emacs.  If you want to change the variable right away, simply say
27627 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27628 previous ``form'', which is a simple @code{setq} statement here.
27629
27630 Go ahead---just try it, if you're located at your Emacs.  After you
27631 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27632 is the return value of the form you @code{eval}ed.
27633
27634 Some pitfalls:
27635
27636 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27637 that means:
27638
27639 @lisp
27640 (setq gnus-read-active-file 'some)
27641 @end lisp
27642
27643 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27644 @samp{nntp.ifi.uio.no}'', that means:
27645
27646 @lisp
27647 (setq gnus-nntp-server "nntp.ifi.uio.no")
27648 @end lisp
27649
27650 So be careful not to mix up strings (the latter) with symbols (the
27651 former).  The manual is unambiguous, but it can be confusing.
27652
27653 @page
27654 @include gnus-faq.texi
27655
27656 @node Index
27657 @chapter Index
27658 @printindex cp
27659
27660 @node Key Index
27661 @chapter Key Index
27662 @printindex ky
27663
27664 @summarycontents
27665 @contents
27666 @bye
27667
27668 @iftex
27669 @iflatex
27670 \end{document}
27671 @end iflatex
27672 @end iftex
27673
27674 @c Local Variables:
27675 @c mode: texinfo
27676 @c coding: iso-8859-1
27677 @c End: