9c59319ddc514f209481518eba257f8457b3d966
[elisp/gnus.git-] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle T-gnus 6.15 Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{Oort Gnus v0.07}
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{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
57 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
58 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
59 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
60 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
61 \newcommand{\gnusdfn}[1]{\textit{#1}}
62 \newcommand{\gnusi}[1]{\textit{#1}}
63 \newcommand{\gnusstrong}[1]{\textbf{#1}}
64 \newcommand{\gnusemph}[1]{\textit{#1}}
65 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
66 \newcommand{\gnussc}[1]{\textsc{#1}}
67 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
68 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
69 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
70 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
71
72 \newcommand{\gnusbullet}{{${\bullet}$}}
73 \newcommand{\gnusdollar}{\$}
74 \newcommand{\gnusampersand}{\&}
75 \newcommand{\gnuspercent}{\%}
76 \newcommand{\gnushash}{\#}
77 \newcommand{\gnushat}{\symbol{"5E}}
78 \newcommand{\gnusunderline}{\symbol{"5F}}
79 \newcommand{\gnusnot}{$\neg$}
80 \newcommand{\gnustilde}{\symbol{"7E}}
81 \newcommand{\gnusless}{{$<$}}
82 \newcommand{\gnusgreater}{{$>$}}
83 \newcommand{\gnusbraceleft}{{$>$}}
84 \newcommand{\gnusbraceright}{{$>$}}
85
86 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
87 \newcommand{\gnusinteresting}{
88 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
89 }
90
91 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
92
93 \newcommand{\gnuspagechapter}[1]{
94 {\mbox{}}
95 }
96
97 \newdimen{\gnusdimen}
98 \gnusdimen 0pt
99
100 \newcommand{\gnuschapter}[2]{
101 \gnuscleardoublepage
102 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
103 \chapter{#2}
104 \renewcommand{\gnussectionname}{}
105 \renewcommand{\gnuschaptername}{#2}
106 \thispagestyle{empty}
107 \hspace*{-2cm}
108 \begin{picture}(500,500)(0,0)
109 \put(480,350){\makebox(0,0)[tr]{#1}}
110 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
111 \end{picture}
112 \clearpage
113 }
114
115 \newcommand{\gnusfigure}[3]{
116 \begin{figure}
117 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
118 #3
119 \end{picture}
120 \caption{#1}
121 \end{figure}
122 }
123
124 \newcommand{\gnusicon}[1]{
125 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
126 }
127
128 \newcommand{\gnuspicon}[1]{
129 \margindex{\epsfig{figure=#1,width=2cm}}
130 }
131
132 \newcommand{\gnusxface}[2]{
133 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
134 }
135
136 \newcommand{\gnussmiley}[2]{
137 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
138 }
139
140 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
141
142 \newcommand{\gnussection}[1]{
143 \renewcommand{\gnussectionname}{#1}
144 \section{#1}
145 }
146
147 \newenvironment{codelist}%
148 {\begin{list}{}{
149 }
150 }{\end{list}}
151
152 \newenvironment{kbdlist}%
153 {\begin{list}{}{
154 \labelwidth=0cm
155 }
156 }{\end{list}}
157
158 \newenvironment{dfnlist}%
159 {\begin{list}{}{
160 }
161 }{\end{list}}
162
163 \newenvironment{stronglist}%
164 {\begin{list}{}{
165 }
166 }{\end{list}}
167
168 \newenvironment{samplist}%
169 {\begin{list}{}{
170 }
171 }{\end{list}}
172
173 \newenvironment{varlist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{emphlist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newlength\gnusheadtextwidth
184 \setlength{\gnusheadtextwidth}{\headtextwidth}
185 \addtolength{\gnusheadtextwidth}{1cm}
186
187 \newpagestyle{gnuspreamble}%
188 {
189 {
190 \ifodd\count0
191 {
192 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
193 }
194 \else
195 {
196 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
197 }
198 }
199 \fi
200 }
201 }
202 {
203 \ifodd\count0
204 \mbox{} \hfill
205 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
206 \else
207 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
208 \hfill \mbox{}
209 \fi
210 }
211
212 \newpagestyle{gnusindex}%
213 {
214 {
215 \ifodd\count0
216 {
217 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
218 }
219 \else
220 {
221 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
222 }
223 \fi
224 }
225 }
226 {
227 \ifodd\count0
228 \mbox{} \hfill
229 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
230 \else
231 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
232 \hfill \mbox{}
233 \fi
234 }
235
236 \newpagestyle{gnus}%
237 {
238 {
239 \ifodd\count0
240 {
241 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
242 }
243 \else
244 {
245 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
246 }
247 \fi
248 }
249 }
250 {
251 \ifodd\count0
252 \mbox{} \hfill
253 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
254 \else
255 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
256 \hfill \mbox{}
257 \fi
258 }
259
260 \pagenumbering{roman}
261 \pagestyle{gnuspreamble}
262
263 @end iflatex
264 @end iftex
265
266 @iftex
267 @iflatex
268 \begin{titlepage}
269 {
270
271 %\addtolength{\oddsidemargin}{-5cm}
272 %\addtolength{\evensidemargin}{-5cm}
273 \parindent=0cm
274 \addtolength{\textheight}{2cm}
275
276 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
277 \rule{15cm}{1mm}\\
278 \vfill
279 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
280 \vfill
281 \rule{15cm}{1mm}\\
282 \gnusauthor{by Lars Magne Ingebrigtsen}
283 \newpage
284 }
285
286 \mbox{}
287 \vfill
288
289 \thispagestyle{empty}
290
291 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
292 Free Software Foundation, Inc.
293
294
295 Permission is granted to copy, distribute and/or modify this document
296 under the terms of the GNU Free Documentation License, Version 1.1 or
297 any later version published by the Free Software Foundation; with no
298 Invariant Sections, with the Front-Cover texts being ``A GNU
299 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
300 license is included in the section entitled ``GNU Free Documentation
301 License'' in the Emacs manual.
302
303 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
304 this GNU Manual, like GNU software.  Copies published by the Free
305 Software Foundation raise funds for GNU development.''
306
307 This document is part of a collection distributed under the GNU Free
308 Documentation License.  If you want to distribute this document
309 separately from the collection, you can do so by adding a copy of the
310 license to the document, as described in section 6 of the license.
311 \newpage
312 \end{titlepage}
313 @end iflatex
314 @end iftex
315
316 @ifnottex
317
318 This file documents gnus, the GNU Emacs newsreader.
319
320 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
321         Free Software Foundation, Inc.
322
323 Permission is granted to copy, distribute and/or modify this document
324 under the terms of the GNU Free Documentation License, Version 1.1 or
325 any later version published by the Free Software Foundation; with the
326 Invariant Sections being none, with the Front-Cover texts being ``A GNU
327 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
328 license is included in the section entitled ``GNU Free Documentation
329 License'' in the Emacs manual.
330
331 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
332 this GNU Manual, like GNU software.  Copies published by the Free
333 Software Foundation raise funds for GNU development.''
334
335 This document is part of a collection distributed under the GNU Free
336 Documentation License.  If you want to distribute this document
337 separately from the collection, you can do so by adding a copy of the
338 license to the document, as described in section 6 of the license.
339 @end ifnottex
340
341 @tex
342
343 @titlepage
344 @title T-gnus 6.15 Manual
345
346 @author by Lars Magne Ingebrigtsen
347 @page
348
349 @vskip 0pt plus 1filll
350 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
351         Free Software Foundation, Inc.
352
353 Permission is granted to copy, distribute and/or modify this document
354 under the terms of the GNU Free Documentation License, Version 1.1 or
355 any later version published by the Free Software Foundation; with no
356 Invariant Sections, with the Front-Cover texts being ``A GNU
357 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
358 license is included in the section entitled ``GNU Free Documentation
359 License'' in the Emacs manual.
360
361 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
362 this GNU Manual, like GNU software.  Copies published by the Free
363 Software Foundation raise funds for GNU development.''
364
365 This document is part of a collection distributed under the GNU Free
366 Documentation License.  If you want to distribute this document
367 separately from the collection, you can do so by adding a copy of the
368 license to the document, as described in section 6 of the license.
369
370 @end titlepage
371 @page
372
373 @end tex
374
375
376 @node Top
377 @top The gnus Newsreader
378
379 @ifinfo
380
381 You can read news (and mail) from within Emacs by using gnus.  The news
382 can be gotten by any nefarious means you can think of---@sc{nntp}, local
383 spool or your mbox file.  All at the same time, if you want to push your
384 luck.
385
386 T-gnus provides @sc{mime} features based on @sc{semi} API.  So T-gnus
387 supports your right to read strange messages including big images or
388 other various kinds of formats.  T-gnus also supports
389 internationalization/localization and multiscript features based on MULE
390 API.  So T-gnus does not discriminate various language communities.
391 Oh, if you are a Klingon, please wait Unicode Next Generation.
392
393 This manual corresponds to T-gnus 6.15.
394
395 @end ifinfo
396
397 @iftex
398
399 @iflatex
400 \tableofcontents
401 \gnuscleardoublepage
402 @end iflatex
403
404 Gnus is the advanced, self-documenting, customizable, extensible
405 unreal-time newsreader for GNU Emacs.
406
407 Oops.  That sounds oddly familiar, so let's start over again to avoid
408 being accused of plagiarism:
409
410 Gnus is a message-reading laboratory.  It will let you look at just
411 about anything as if it were a newsgroup.  You can read mail with it,
412 you can browse directories with it, you can @code{ftp} with it---you
413 can even read news with it!
414
415 Gnus tries to empower people who read news the same way Emacs empowers
416 people who edit text.  Gnus sets no limits to what the user should be
417 allowed to do.  Users are encouraged to extend gnus to make it behave
418 like they want it to behave.  A program should not control people;
419 people should be empowered to do what they want by using (or abusing)
420 the program.
421
422 @end iftex
423
424 @menu
425 * Starting Up::                 Finding news can be a pain.
426 * Group Buffer::                Selecting, subscribing and killing groups.
427 * Summary Buffer::              Reading, saving and posting articles.
428 * Article Buffer::              Displaying and handling articles.
429 * Composing Messages::          Information on sending mail and news.
430 * Select Methods::              Gnus reads all messages from various select methods.
431 * Scoring::                     Assigning values to articles.
432 * Various::                     General purpose settings.
433 * The End::                     Farewell and goodbye.
434 * Appendices::                  Terminology, Emacs intro, FAQ, History, Internals.
435 * Index::                       Variable, function and concept index.
436 * Key Index::                   Key Index.
437
438 @detailmenu
439  --- The Detailed Node Listing ---
440
441 Starting Gnus
442
443 * Finding the News::            Choosing a method for getting news.
444 * The First Time::              What does Gnus do the first time you start it?
445 * The Server is Down::          How can I read my mail then?
446 * Slave Gnusae::                You can have more than one Gnus active at a time.
447 * Fetching a Group::            Starting Gnus just to read a group.
448 * New Groups::                  What is Gnus supposed to do with new groups?
449 * Changing Servers::            You may want to move from one server to another.
450 * Startup Files::               Those pesky startup files---@file{.newsrc}.
451 * Auto Save::                   Recovering from a crash.
452 * The Active File::             Reading the active file over a slow line Takes Time.
453 * Startup Variables::           Other variables you might change.
454
455 New Groups
456
457 * Checking New Groups::         Determining what groups are new.
458 * Subscription Methods::        What Gnus should do with new groups.
459 * Filtering New Groups::        Making Gnus ignore certain new groups.
460
461 Group Buffer
462
463 * Group Buffer Format::         Information listed and how you can change it.
464 * Group Maneuvering::           Commands for moving in the group buffer.
465 * Selecting a Group::           Actually reading news.
466 * Subscription Commands::       Unsubscribing, killing, subscribing.
467 * Group Data::                  Changing the info for a group.
468 * Group Levels::                Levels? What are those, then?
469 * Group Score::                 A mechanism for finding out what groups you like.
470 * Marking Groups::              You can mark groups for later processing.
471 * Foreign Groups::              Creating and editing groups.
472 * Group Parameters::            Each group may have different parameters set.
473 * Listing Groups::              Gnus can list various subsets of the groups.
474 * Sorting Groups::              Re-arrange the group order.
475 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
476 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
477 * Exiting Gnus::                Stop reading news and get some work done.
478 * Group Topics::                A folding group mode divided into topics.
479 * Misc Group Stuff::            Other stuff that you can to do.
480
481 Group Buffer Format
482
483 * Group Line Specification::    Deciding how the group buffer is to look.
484 * Group Modeline Specification::  The group buffer modeline.
485 * Group Highlighting::          Having nice colors in the group buffer.
486
487 Group Topics
488
489 * Topic Commands::              Interactive E-Z commands.
490 * Topic Variables::             How to customize the topics the Lisp Way.
491 * Topic Sorting::               Sorting each topic individually.
492 * Topic Topology::              A map of the world.
493 * Topic Parameters::            Parameters that apply to all groups in a topic.
494
495 Misc Group Stuff
496
497 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
498 * Group Information::           Information and help on groups and Gnus.
499 * Group Timestamp::             Making Gnus keep track of when you last read a group.
500 * File Commands::               Reading and writing the Gnus files.
501 * Sieve Commands::              Managing Sieve scripts.
502
503 Summary Buffer
504
505 * Summary Buffer Format::       Deciding how the summary buffer is to look.
506 * Summary Maneuvering::         Moving around the summary buffer.
507 * Choosing Articles::           Reading articles.
508 * Paging the Article::          Scrolling the current article.
509 * Reply Followup and Post::     Posting articles.
510 * Delayed Articles::            Send articles at a later time.
511 * Marking Articles::            Marking articles as read, expirable, etc.
512 * Limiting::                    You can limit the summary buffer.
513 * Threading::                   How threads are made.
514 * Sorting the Summary Buffer::  How articles and threads are sorted.
515 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
516 * Article Caching::             You may store articles in a cache.
517 * Persistent Articles::         Making articles expiry-resistant.
518 * Article Backlog::             Having already read articles hang around.
519 * Saving Articles::             Ways of customizing article saving.
520 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
521 * Article Treatment::           The article buffer can be mangled at will.
522 * MIME Commands::               Doing MIMEy things with the articles.
523 * Charsets::                    Character set issues.
524 * Article Commands::            Doing various things with the article buffer.
525 * Summary Sorting::             Sorting the summary buffer in various ways.
526 * Finding the Parent::          No child support? Get the parent.
527 * Alternative Approaches::      Reading using non-default summaries.
528 * Tree Display::                A more visual display of threads.
529 * Mail Group Commands::         Some commands can only be used in mail groups.
530 * Various Summary Stuff::       What didn't fit anywhere else.
531 * Exiting the Summary Buffer::  Returning to the Group buffer,
532                                 or reselecting the current group.
533 * Crosspost Handling::          How crossposted articles are dealt with.
534 * Duplicate Suppression::       An alternative when crosspost handling fails.
535 * Security::                    Decrypt and Verify.
536 * Mailing List::                Mailing list minor mode.
537
538 Summary Buffer Format
539
540 * Summary Buffer Lines::        You can specify how summary lines should look.
541 * To From Newsgroups::          How to not display your own name.
542 * Summary Buffer Mode Line::    You can say how the mode line should look.
543 * Summary Highlighting::        Making the summary buffer all pretty and nice.
544
545 Choosing Articles
546
547 * Choosing Commands::           Commands for choosing articles.
548 * Choosing Variables::          Variables that influence these commands.
549
550 Reply, Followup and Post
551
552 * Summary Mail Commands::       Sending mail.
553 * Summary Post Commands::       Sending news.
554 * Summary Message Commands::    Other Message-related commands.
555 * Canceling and Superseding::   
556
557 Marking Articles
558
559 * Unread Articles::             Marks for unread articles.
560 * Read Articles::               Marks for read articles.
561 * Other Marks::                 Marks that do not affect readedness.
562 * Setting Marks::               
563 * Generic Marking Commands::    
564 * Setting Process Marks::       
565
566 Marking Articles
567
568 * Setting Marks::             How to set and remove marks.
569 * Generic Marking Commands::  How to customize the marking.
570 * Setting Process Marks::     How to mark articles for later processing.
571
572 Threading
573
574 * Customizing Threading::       Variables you can change to affect the threading.
575 * Thread Commands::             Thread based commands in the summary buffer.
576
577 Customizing Threading
578
579 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
580 * Filling In Threads::          Making the threads displayed look fuller.
581 * More Threading::              Even more variables for fiddling with threads.
582 * Low-Level Threading::         You thought it was over... but you were wrong!
583
584 Decoding Articles
585
586 * Uuencoded Articles::          Uudecode articles.
587 * Shell Archives::              Unshar articles.
588 * PostScript Files::            Split PostScript.
589 * Other Files::                 Plain save and binhex.
590 * Decoding Variables::          Variables for a happy decoding.
591 * Viewing Files::               You want to look at the result of the decoding?
592
593 Decoding Variables
594
595 * Rule Variables::              Variables that say how a file is to be viewed.
596 * Other Decode Variables::      Other decode variables.
597 * Uuencoding and Posting::      Variables for customizing uuencoding.
598
599 Article Treatment
600
601 * Article Highlighting::        You want to make the article look like fruit salad.
602 * Article Fontisizing::         Making emphasized text look nice.
603 * Article Hiding::              You also want to make certain info go away.
604 * Article Washing::             Lots of way-neat functions to make life better.
605 * Article Header::              Doing various header transformations.
606 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
607 * Article Date::                Grumble, UT!
608 * Article Display::             Display various stuff---X-Face, Picons, Smileys
609 * Article Signature::           What is a signature?
610 * Article Miscellania::         Various other stuff.
611
612 Alternative Approaches
613
614 * Pick and Read::               First mark articles and then read them.
615 * Binary Groups::               Auto-decode all articles.
616
617 Various Summary Stuff
618
619 * Summary Group Information::   Information oriented commands.
620 * Searching for Articles::      Multiple article commands.
621 * Summary Generation Commands::  
622 * Really Various Summary Commands::  Those pesky non-conformant commands.
623
624 Article Buffer
625
626 * Hiding Headers::              Deciding what headers should be displayed.
627 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
628 * Customizing Articles::        Tailoring the look of the articles.
629 * Article Keymap::              Keystrokes available in the article buffer.
630 * Misc Article::                Other stuff.
631
632 Composing Messages
633
634 * Mail::                        Mailing and replying.
635 * Posting Server::              What server should you post and mail via?
636 * Mail and Post::               Mailing and posting at the same time.
637 * Archived Messages::           Where Gnus stores the messages you've sent.
638 * Posting Styles::              An easier way to specify who you are.
639 * Drafts::                      Postponing messages and rejected messages.
640 * Rejected Articles::           What happens if the server doesn't like your article?
641 * Signing and encrypting::      How to compose secure messages.
642
643 Select Methods
644
645 * Server Buffer::               Making and editing virtual servers.
646 * Getting News::                Reading USENET news with Gnus.
647 * Getting Mail::                Reading your personal mail with Gnus.
648 * Browsing the Web::            Getting messages from a plethora of Web sources.
649 * IMAP::                        Using Gnus as a @sc{imap} client.
650 * Other Sources::               Reading directories, files, SOUP packets.
651 * Combined Groups::             Combining groups into one group.
652 * Gnus Unplugged::              Reading news and mail offline.
653
654 Server Buffer
655
656 * Server Buffer Format::        You can customize the look of this buffer.
657 * Server Commands::             Commands to manipulate servers.
658 * Example Methods::             Examples server specifications.
659 * Creating a Virtual Server::   An example session.
660 * Server Variables::            Which variables to set.
661 * Servers and Methods::         You can use server names as select methods.
662 * Unavailable Servers::         Some servers you try to contact may be down.
663
664 Getting News
665
666 * NNTP::                        Reading news from an @sc{nntp} server.
667 * News Spool::                  Reading news from the local spool.
668
669 @sc{nntp}
670
671 * Direct Functions::            Connecting directly to the server.
672 * Indirect Functions::          Connecting indirectly to the server.
673 * Common Variables::            Understood by several connection functions.
674
675 Getting Mail
676
677 * Mail in a Newsreader::        Important introductory notes.
678 * Getting Started Reading Mail::  A simple cookbook example.
679 * Splitting Mail::              How to create mail groups.
680 * Mail Sources::                How to tell Gnus where to get mail from.
681 * Mail Back End Variables::     Variables for customizing mail handling.
682 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
683 * Group Mail Splitting::        Use group customize to drive mail splitting.
684 * Incorporating Old Mail::      What about the old mail you have?
685 * Expiring Mail::               Getting rid of unwanted mail.
686 * Washing Mail::                Removing gruft from the mail you get.
687 * Duplicates::                  Dealing with duplicated mail.
688 * Not Reading Mail::            Using mail back ends for reading other files.
689 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
690
691 Mail Sources
692
693 * Mail Source Specifiers::      How to specify what a mail source is.
694 * Mail Source Customization::   Some variables that influence things.
695 * Fetching Mail::               Using the mail source specifiers.
696
697 Choosing a Mail Back End
698
699 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
700 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
701 * Mail Spool::                  Store your mail in a private spool?
702 * MH Spool::                    An mhspool-like back end.
703 * Mail Folders::                Having one file for each group.
704 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
705
706 Browsing the Web
707
708 * Archiving Mail::              
709 * Web Searches::                Creating groups from articles that match a string.
710 * Slashdot::                    Reading the Slashdot comments.
711 * Ultimate::                    The Ultimate Bulletin Board systems.
712 * Web Archive::                 Reading mailing list archived on web.
713 * RSS::                         Reading RDF site summary.
714 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
715
716 @sc{imap}
717
718 * Splitting in IMAP::           Splitting mail with nnimap.
719 * Expiring in IMAP::            Expiring mail with nnimap.
720 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
721 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
722 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
723
724 Other Sources
725
726 * Directory Groups::            You can read a directory as if it was a newsgroup.
727 * Anything Groups::             Dired?  Who needs dired?
728 * Document Groups::             Single files can be the basis of a group.
729 * SOUP::                        Reading @sc{soup} packets ``offline''.
730 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
731
732 Document Groups
733
734 * Document Server Internals::   How to add your own document types.
735
736 SOUP
737
738 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
739 * SOUP Groups::                 A back end for reading @sc{soup} packets.
740 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
741
742 Combined Groups
743
744 * Virtual Groups::              Combining articles from many groups.
745 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
746
747 Gnus Unplugged
748
749 * Agent Basics::                How it all is supposed to work.
750 * Agent Categories::            How to tell the Gnus Agent what to download.
751 * Agent Commands::              New commands for all the buffers.
752 * Agent as Cache::              The Agent is a big cache too.
753 * Agent Expiry::                How to make old articles go away.
754 * Agent and IMAP::              How to use the Agent with IMAP.
755 * Outgoing Messages::           What happens when you post/mail something?
756 * Agent Variables::             Customizing is fun.
757 * Example Setup::               An example @file{.gnus.el} file for offline people.
758 * Batching Agents::             How to fetch news from a @code{cron} job.
759 * Agent Caveats::               What you think it'll do and what it does.
760
761 Agent Categories
762
763 * Category Syntax::             What a category looks like.
764 * Category Buffer::             A buffer for maintaining categories.
765 * Category Variables::          Customize'r'Us.
766
767 Agent Commands
768
769 * Group Agent Commands::        
770 * Summary Agent Commands::      
771 * Server Agent Commands::       
772
773 Scoring
774
775 * Summary Score Commands::      Adding score entries for the current group.
776 * Group Score Commands::        General score commands.
777 * Score Variables::             Customize your scoring.  (My, what terminology).
778 * Score File Format::           What a score file may contain.
779 * Score File Editing::          You can edit score files by hand as well.
780 * Adaptive Scoring::            Big Sister Gnus knows what you read.
781 * Home Score File::             How to say where new score entries are to go.
782 * Followups To Yourself::       Having Gnus notice when people answer you.
783 * Scoring On Other Headers::    Scoring on non-standard headers.
784 * Scoring Tips::                How to score effectively.
785 * Reverse Scoring::             That problem child of old is not problem.
786 * Global Score Files::          Earth-spanning, ear-splitting score files.
787 * Kill Files::                  They are still here, but they can be ignored.
788 * Converting Kill Files::       Translating kill files to score files.
789 * GroupLens::                   Getting predictions on what you like to read.
790 * Advanced Scoring::            Using logical expressions to build score rules.
791 * Score Decays::                It can be useful to let scores wither away.
792
793 GroupLens
794
795 * Using GroupLens::             How to make Gnus use GroupLens.
796 * Rating Articles::             Letting GroupLens know how you rate articles.
797 * Displaying Predictions::      Displaying predictions given by GroupLens.
798 * GroupLens Variables::         Customizing GroupLens.
799
800 Advanced Scoring
801
802 * Advanced Scoring Syntax::     A definition.
803 * Advanced Scoring Examples::   What they look like.
804 * Advanced Scoring Tips::       Getting the most out of it.
805
806 Various
807
808 * Process/Prefix::              A convention used by many treatment commands.
809 * Interactive::                 Making Gnus ask you many questions.
810 * Symbolic Prefixes::           How to supply some Gnus functions with options.
811 * Formatting Variables::        You can specify what buffers should look like.
812 * Window Layout::               Configuring the Gnus buffer windows.
813 * Faces and Fonts::             How to change how faces look.
814 * Compilation::                 How to speed Gnus up.
815 * Mode Lines::                  Displaying information in the mode lines.
816 * Highlighting and Menus::      Making buffers look all nice and cozy.
817 * Buttons::                     Get tendinitis in ten easy steps!
818 * Daemons::                     Gnus can do things behind your back.
819 * NoCeM::                       How to avoid spam and other fatty foods.
820 * Undo::                        Some actions can be undone.
821 * Predicate Specifiers::        Specifying predicates.
822 * Moderation::                  What to do if you're a moderator.
823 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
824 * Fuzzy Matching::              What's the big fuzz?
825 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
826 * Various Various::             Things that are really various.
827
828 Formatting Variables
829
830 * Formatting Basics::           A formatting variable is basically a format string.
831 * Mode Line Formatting::        Some rules about mode line formatting variables.
832 * Advanced Formatting::         Modifying output in various ways.
833 * User-Defined Specs::          Having Gnus call your own functions.
834 * Formatting Fonts::            Making the formatting look colorful and nice.
835 * Positioning Point::           Moving point to a position after an operation.
836 * Tabulation::                  Tabulating your output.
837 * Wide Characters::             Dealing with wide characters.
838
839 Image Enhancements
840
841 * Picons::                      How to display pictures of what you're reading.
842 * Smileys::                     Show all those happy faces the way they were meant to be shown.
843 * X-Face::                      Display a funky, teensy black-and-white image.
844 * Toolbar::                     Click'n'drool.
845 * XVarious::                    Other XEmacsy Gnusey variables.
846
847 Picons
848
849 * Picon Basics::                What are picons and How do I get them.
850 * Picon Requirements::          Don't go further if you aren't using XEmacs.
851 * Easy Picons::                 Displaying Picons---the easy way.
852 * Hard Picons::                 The way you should do it.  You'll learn something.
853 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
854
855 Thwarting Email Spam
856
857 * The problem of spam::         Some background, and some solutions
858 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
859 * SpamAssassin::                How to use external anti-spam tools.
860 * Hashcash::                    Reduce spam by burning CPU time.
861 * Filtering Spam Using spam.el::  
862 * Filtering Spam Using Statistics (spam-stat.el)::  
863
864 Appendices
865
866 * XEmacs::                      Requirements for installing under XEmacs.
867 * History::                     How Gnus got where it is today.
868 * On Writing Manuals::          Why this is not a beginner's guide.
869 * Terminology::                 We use really difficult, like, words here.
870 * Customization::               Tailoring Gnus to your needs.
871 * Troubleshooting::             What you might try if things do not work.
872 * Gnus Reference Guide::        Rilly, rilly technical stuff.
873 * Emacs for Heathens::          A short introduction to Emacsian terms.
874 * Frequently Asked Questions::
875
876 History
877
878 * Gnus Versions::               What Gnus versions have been released.
879 * Other Gnus Versions::         Other Gnus versions that also have been released.
880 * Why?::                        What's the point of Gnus?
881 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
882 * Conformity::                  Gnus tries to conform to all standards.
883 * Emacsen::                     Gnus can be run on a few modern Emacsen.
884 * Gnus Development::            How Gnus is developed.
885 * Contributors::                Oodles of people.
886 * New Features::                Pointers to some of the new stuff in Gnus.
887
888 New Features
889
890 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
891 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
892 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
893 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
894 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
895
896 Customization
897
898 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
899 * Slow Terminal Connection::    You run a remote Emacs.
900 * Little Disk Space::           You feel that having large setup files is icky.
901 * Slow Machine::                You feel like buying a faster machine.
902
903 Gnus Reference Guide
904
905 * Gnus Utility Functions::      Common functions and variable to use.
906 * Back End Interface::          How Gnus communicates with the servers.
907 * Score File Syntax::           A BNF definition of the score file standard.
908 * Headers::                     How Gnus stores headers internally.
909 * Ranges::                      A handy format for storing mucho numbers.
910 * Group Info::                  The group info format.
911 * Extended Interactive::        Symbolic prefixes and stuff.
912 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
913 * Various File Formats::        Formats of files that Gnus use.
914
915 Back End Interface
916
917 * Required Back End Functions::  Functions that must be implemented.
918 * Optional Back End Functions::  Functions that need not be implemented.
919 * Error Messaging::             How to get messages and report errors.
920 * Writing New Back Ends::       Extending old back ends.
921 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
922 * Mail-like Back Ends::         Some tips on mail back ends.
923
924 Various File Formats
925
926 * Active File Format::          Information on articles and groups available.
927 * Newsgroups File Format::      Group descriptions.
928
929 Emacs for Heathens
930
931 * Keystrokes::                  Entering text and executing commands.
932 * Emacs Lisp::                  The built-in Emacs programming language.
933
934 @end detailmenu
935 @end menu
936
937 @node Starting Up
938 @chapter Starting gnus
939 @cindex starting up
940
941 @kindex M-x gnus
942 @findex gnus
943 If your system administrator has set things up properly, starting gnus
944 and reading news is extremely easy---you just type @kbd{M-x gnus} in
945 your Emacs.
946
947 @findex gnus-other-frame
948 @kindex M-x gnus-other-frame
949 If you want to start gnus in a different frame, you can use the command
950 @kbd{M-x gnus-other-frame} instead.
951
952 If things do not go smoothly at startup, you have to twiddle some
953 variables in your @file{~/.gnus} file.  This file is similar to
954 @file{~/.emacs}, but is read when gnus starts.
955
956 If you puzzle at any terms used in this manual, please refer to the
957 terminology section (@pxref{Terminology}).
958
959 @menu
960 * Finding the News::            Choosing a method for getting news.
961 * The First Time::              What does Gnus do the first time you start it?
962 * The Server is Down::          How can I read my mail then?
963 * Slave Gnusae::                You can have more than one Gnus active at a time.
964 * Fetching a Group::            Starting Gnus just to read a group.
965 * New Groups::                  What is Gnus supposed to do with new groups?
966 * Changing Servers::            You may want to move from one server to another.
967 * Startup Files::               Those pesky startup files---@file{.newsrc}.
968 * Auto Save::                   Recovering from a crash.
969 * The Active File::             Reading the active file over a slow line Takes Time.
970 * Startup Variables::           Other variables you might change.
971 @end menu
972
973
974 @node Finding the News
975 @section Finding the News
976 @cindex finding news
977
978 @vindex gnus-select-method
979 @c @head
980 The @code{gnus-select-method} variable says where gnus should look for
981 news.  This variable should be a list where the first element says
982 @dfn{how} and the second element says @dfn{where}.  This method is your
983 native method.  All groups not fetched with this method are
984 foreign groups.
985
986 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
987 you want to get your daily dosage of news from, you'd say:
988
989 @lisp
990 (setq gnus-select-method '(nntp "news.somewhere.edu"))
991 @end lisp
992
993 If you want to read directly from the local spool, say:
994
995 @lisp
996 (setq gnus-select-method '(nnspool ""))
997 @end lisp
998
999 If you can use a local spool, you probably should, as it will almost
1000 certainly be much faster.  But do not use the local spool if your
1001 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1002
1003 @vindex gnus-nntpserver-file
1004 @cindex NNTPSERVER
1005 @cindex @sc{nntp} server
1006 If this variable is not set, gnus will take a look at the
1007 @code{NNTPSERVER} environment variable.  If that variable isn't set,
1008 gnus will see whether @code{gnus-nntpserver-file}
1009 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
1010 that fails as well, gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
1011
1012 @vindex gnus-nntp-server
1013 If @code{gnus-nntp-server} is set, this variable will override
1014 @code{gnus-select-method}.  You should therefore set
1015 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1016
1017 @vindex gnus-secondary-servers
1018 @vindex gnus-nntp-server
1019 You can also make gnus prompt you interactively for the name of an
1020 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
1021 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1022 in the @code{gnus-secondary-servers} list (if any).  You can also just
1023 type in the name of any server you feel like visiting.  (Note that this
1024 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1025 gnus} later in the same Emacs session, Gnus will contact the same
1026 server.)
1027
1028 @findex gnus-group-browse-foreign-server
1029 @kindex B (Group)
1030 However, if you use one @sc{nntp} server regularly and are just
1031 interested in a couple of groups from a different server, you would be
1032 better served by using the @kbd{B} command in the group buffer.  It will
1033 let you have a look at what groups are available, and you can subscribe
1034 to any of the groups you want to.  This also makes @file{.newsrc}
1035 maintenance much tidier.  @xref{Foreign Groups}.
1036
1037 @vindex gnus-secondary-select-methods
1038 @c @head
1039 A slightly different approach to foreign groups is to set the
1040 @code{gnus-secondary-select-methods} variable.  The select methods
1041 listed in this variable are in many ways just as native as the
1042 @code{gnus-select-method} server.  They will also be queried for active
1043 files during startup (if that's required), and new newsgroups that
1044 appear on these servers will be subscribed (or not) just as native
1045 groups are.
1046
1047 For instance, if you use the @code{nnmbox} back end to read your mail,
1048 you would typically set this variable to
1049
1050 @lisp
1051 (setq gnus-secondary-select-methods '((nnmbox "")))
1052 @end lisp
1053
1054
1055 @node The First Time
1056 @section The First Time
1057 @cindex first time usage
1058
1059 If no startup files exist, gnus will try to determine what groups should
1060 be subscribed by default.
1061
1062 @vindex gnus-default-subscribed-newsgroups
1063 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1064 will subscribe you to just those groups in that list, leaving the rest
1065 killed.  Your system administrator should have set this variable to
1066 something useful.
1067
1068 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1069 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1070 here as @dfn{whatever Lars thinks you should read}.)
1071
1072 You'll also be subscribed to the gnus documentation group, which should
1073 help you with most common problems.
1074
1075 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1076 use the normal functions for handling new groups, and not do anything
1077 special.
1078
1079
1080 @node The Server is Down
1081 @section The Server is Down
1082 @cindex server errors
1083
1084 If the default server is down, gnus will understandably have some
1085 problems starting.  However, if you have some mail groups in addition to
1086 the news groups, you may want to start gnus anyway.
1087
1088 Gnus, being the trusting sort of program, will ask whether to proceed
1089 without a native select method if that server can't be contacted.  This
1090 will happen whether the server doesn't actually exist (i.e., you have
1091 given the wrong address) or the server has just momentarily taken ill
1092 for some reason or other.  If you decide to continue and have no foreign
1093 groups, you'll find it difficult to actually do anything in the group
1094 buffer.  But, hey, that's your problem.  Blllrph!
1095
1096 @findex gnus-no-server
1097 @kindex M-x gnus-no-server
1098 @c @head
1099 If you know that the server is definitely down, or you just want to read
1100 your mail without bothering with the server at all, you can use the
1101 @code{gnus-no-server} command to start gnus.  That might come in handy
1102 if you're in a hurry as well.  This command will not attempt to contact
1103 your primary server---instead, it will just activate all groups on level
1104 1 and 2.  (You should preferably keep no native groups on those two
1105 levels.) Also @pxref{Group Levels}.
1106
1107
1108 @node Slave Gnusae
1109 @section Slave Gnusae
1110 @cindex slave
1111
1112 You might want to run more than one Emacs with more than one gnus at the
1113 same time.  If you are using different @file{.newsrc} files (e.g., if you
1114 are using the two different gnusae to read from two different servers),
1115 that is no problem whatsoever.  You just do it.
1116
1117 The problem appears when you want to run two Gnusae that use the same
1118 @code{.newsrc} file.
1119
1120 To work around that problem some, we here at the Think-Tank at the gnus
1121 Towers have come up with a new concept: @dfn{Masters} and
1122 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1123 taken out a copyright on those words.  If you wish to use those words in
1124 conjunction with each other, you have to send $1 per usage instance to
1125 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1126 Applications}) will be much more expensive, of course.)
1127
1128 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1129 however you do it).  Each subsequent slave gnusae should be started with
1130 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1131 files, but instead save @dfn{slave files} that contain information only
1132 on what groups have been read in the slave session.  When a master gnus
1133 starts, it will read (and delete) these slave files, incorporating all
1134 information from them.  (The slave files will be read in the sequence
1135 they were created, so the latest changes will have precedence.)
1136
1137 Information from the slave files has, of course, precedence over the
1138 information in the normal (i.e., master) @code{.newsrc} file.
1139
1140 If the @code{.newsrc*} files have not been saved in the master when the
1141 slave starts, you may be prompted as to whether to read an auto-save
1142 file.  If you answer "yes", the unsaved changes to the master will be
1143 incorporated into the slave.  If you answer "no", the slave may see some
1144 messages as unread that have been read in the master.
1145
1146 @node Fetching a Group
1147 @section Fetching a Group
1148 @cindex fetching a group
1149
1150 @findex gnus-fetch-group
1151 It is sometimes convenient to be able to just say ``I want to read this
1152 group and I don't care whether gnus has been started or not''.  This is
1153 perhaps more useful for people who write code than for users, but the
1154 command @code{gnus-fetch-group} provides this functionality in any case.
1155 It takes the group name as a parameter.
1156
1157
1158 @node New Groups
1159 @section New Groups
1160 @cindex new groups
1161 @cindex subscription
1162
1163 @vindex gnus-check-new-newsgroups
1164 If you are satisfied that you really never want to see any new groups,
1165 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1166 also save you some time at startup.  Even if this variable is
1167 @code{nil}, you can always subscribe to the new groups just by pressing
1168 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1169 is @code{ask-server} by default.  If you set this variable to
1170 @code{always}, then Gnus will query the back ends for new groups even
1171 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1172
1173 @menu
1174 * Checking New Groups::         Determining what groups are new.
1175 * Subscription Methods::        What Gnus should do with new groups.
1176 * Filtering New Groups::        Making Gnus ignore certain new groups.
1177 @end menu
1178
1179
1180 @node Checking New Groups
1181 @subsection Checking New Groups
1182
1183 Gnus normally determines whether a group is new or not by comparing the
1184 list of groups from the active file(s) with the lists of subscribed and
1185 dead groups.  This isn't a particularly fast method.  If
1186 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1187 server for new groups since the last time.  This is both faster and
1188 cheaper.  This also means that you can get rid of the list of killed
1189 groups altogether, so you may set @code{gnus-save-killed-list} to
1190 @code{nil}, which will save time both at startup, at exit, and all over.
1191 Saves disk space, too.  Why isn't this the default, then?
1192 Unfortunately, not all servers support this command.
1193
1194 I bet I know what you're thinking now: How do I find out whether my
1195 server supports @code{ask-server}?  No?  Good, because I don't have a
1196 fail-safe answer.  I would suggest just setting this variable to
1197 @code{ask-server} and see whether any new groups appear within the next
1198 few days.  If any do, then it works.  If none do, then it doesn't
1199 work.  I could write a function to make gnus guess whether the server
1200 supports @code{ask-server}, but it would just be a guess.  So I won't.
1201 You could @code{telnet} to the server and say @code{HELP} and see
1202 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1203 it does, then it might work.  (But there are servers that lists
1204 @samp{NEWGROUPS} without supporting the function properly.)
1205
1206 This variable can also be a list of select methods.  If so, gnus will
1207 issue an @code{ask-server} command to each of the select methods, and
1208 subscribe them (or not) using the normal methods.  This might be handy
1209 if you are monitoring a few servers for new groups.  A side effect is
1210 that startup will take much longer, so you can meditate while waiting.
1211 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1212
1213
1214 @node Subscription Methods
1215 @subsection Subscription Methods
1216
1217 @vindex gnus-subscribe-newsgroup-method
1218 What gnus does when it encounters a new group is determined by the
1219 @code{gnus-subscribe-newsgroup-method} variable.
1220
1221 This variable should contain a function.  This function will be called
1222 with the name of the new group as the only parameter.
1223
1224 Some handy pre-fab functions are:
1225
1226 @table @code
1227
1228 @item gnus-subscribe-zombies
1229 @vindex gnus-subscribe-zombies
1230 Make all new groups zombies.  This is the default.  You can browse the
1231 zombies later (with @kbd{A z}) and either kill them all off properly
1232 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1233
1234 @item gnus-subscribe-randomly
1235 @vindex gnus-subscribe-randomly
1236 Subscribe all new groups in arbitrary order.  This really means that all
1237 new groups will be added at ``the top'' of the group buffer.
1238
1239 @item gnus-subscribe-alphabetically
1240 @vindex gnus-subscribe-alphabetically
1241 Subscribe all new groups in alphabetical order.
1242
1243 @item gnus-subscribe-hierarchically
1244 @vindex gnus-subscribe-hierarchically
1245 Subscribe all new groups hierarchically.  The difference between this
1246 function and @code{gnus-subscribe-alphabetically} is slight.
1247 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1248 alphabetical fashion, while this function will enter groups into its
1249 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1250 @samp{comp} hierarchy, this function will not mess that configuration
1251 up.  Or something like that.
1252
1253 @item gnus-subscribe-interactively
1254 @vindex gnus-subscribe-interactively
1255 Subscribe new groups interactively.  This means that gnus will ask
1256 you about @strong{all} new groups.  The groups you choose to subscribe
1257 to will be subscribed hierarchically.
1258
1259 @item gnus-subscribe-killed
1260 @vindex gnus-subscribe-killed
1261 Kill all new groups.
1262
1263 @item gnus-subscribe-topics
1264 @vindex gnus-subscribe-topics
1265 Put the groups into the topic that has a matching @code{subscribe} topic
1266 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1267 topic parameter that looks like
1268
1269 @example
1270 "nnslashdot"
1271 @end example
1272
1273 will mean that all groups that match that regex will be subscribed under
1274 that topic.
1275
1276 If no topics match the groups, the groups will be subscribed in the
1277 top-level topic.
1278
1279 @end table
1280
1281 @vindex gnus-subscribe-hierarchical-interactive
1282 A closely related variable is
1283 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1284 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1285 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1286 will ask you for each sub-hierarchy whether you want to descend the
1287 hierarchy or not.
1288
1289 One common mistake is to set the variable a few paragraphs above
1290 (@code{gnus-subscribe-newsgroup-method}) to
1291 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1292 will not work.  This is ga-ga.  So don't do it.
1293
1294
1295 @node Filtering New Groups
1296 @subsection Filtering New Groups
1297
1298 A nice and portable way to control which new newsgroups should be
1299 subscribed (or ignored) is to put an @dfn{options} line at the start of
1300 the @file{.newsrc} file.  Here's an example:
1301
1302 @example
1303 options -n !alt.all !rec.all sci.all
1304 @end example
1305
1306 @vindex gnus-subscribe-options-newsgroup-method
1307 This line obviously belongs to a serious-minded intellectual scientific
1308 person (or she may just be plain old boring), because it says that all
1309 groups that have names beginning with @samp{alt} and @samp{rec} should
1310 be ignored, and all groups with names beginning with @samp{sci} should
1311 be subscribed.  Gnus will not use the normal subscription method for
1312 subscribing these groups.
1313 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1314 variable defaults to @code{gnus-subscribe-alphabetically}.
1315
1316 @vindex gnus-options-not-subscribe
1317 @vindex gnus-options-subscribe
1318 If you don't want to mess with your @file{.newsrc} file, you can just
1319 set the two variables @code{gnus-options-subscribe} and
1320 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1321 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1322 and if the new group matches the former, it will be unconditionally
1323 subscribed, and if it matches the latter, it will be ignored.
1324
1325 @vindex gnus-auto-subscribed-groups
1326 Yet another variable that meddles here is
1327 @code{gnus-auto-subscribed-groups}.  It works exactly like
1328 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1329 thought it would be nice to have two of these.  This variable is more
1330 meant for setting some ground rules, while the other variable is used
1331 more for user fiddling.  By default this variable makes all new groups
1332 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1333 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1334 subscribed.  If you don't like that, just set this variable to
1335 @code{nil}.
1336
1337 New groups that match this regexp are subscribed using
1338 @code{gnus-subscribe-options-newsgroup-method}.
1339
1340
1341 @node Changing Servers
1342 @section Changing Servers
1343 @cindex changing servers
1344
1345 Sometimes it is necessary to move from one @sc{nntp} server to another.
1346 This happens very rarely, but perhaps you change jobs, or one server is
1347 very flaky and you want to use another.
1348
1349 Changing the server is pretty easy, right?  You just change
1350 @code{gnus-select-method} to point to the new server?
1351
1352 @emph{Wrong!}
1353
1354 Article numbers are not (in any way) kept synchronized between different
1355 @sc{nntp} servers, and the only way Gnus keeps track of what articles
1356 you have read is by keeping track of article numbers.  So when you
1357 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1358 worthless.
1359
1360 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1361 file from one server to another.  They all have one thing in
1362 common---they take a looong time to run.  You don't want to use these
1363 functions more than absolutely necessary.
1364
1365 @kindex M-x gnus-change-server
1366 @findex gnus-change-server
1367 If you have access to both servers, Gnus can request the headers for all
1368 the articles you have read and compare @code{Message-ID}s and map the
1369 article numbers of the read articles and article marks.  The @kbd{M-x
1370 gnus-change-server} command will do this for all your native groups.  It
1371 will prompt for the method you want to move to.
1372
1373 @kindex M-x gnus-group-move-group-to-server
1374 @findex gnus-group-move-group-to-server
1375 You can also move individual groups with the @kbd{M-x
1376 gnus-group-move-group-to-server} command.  This is useful if you want to
1377 move a (foreign) group from one server to another.
1378
1379 @kindex M-x gnus-group-clear-data-on-native-groups
1380 @findex gnus-group-clear-data-on-native-groups
1381 If you don't have access to both the old and new server, all your marks
1382 and read ranges have become worthless.  You can use the @kbd{M-x
1383 gnus-group-clear-data-on-native-groups} command to clear out all data
1384 that you have on your native groups.  Use with caution.
1385
1386 @kindex M-x gnus-group-clear-data
1387 @findex gnus-group-clear-data
1388 Clear the data from the current group only---nix out marks and the
1389 list of read articles (@code{gnus-group-clear-data}).
1390
1391 After changing servers, you @strong{must} move the cache hierarchy away,
1392 since the cached articles will have wrong article numbers, which will
1393 affect which articles Gnus thinks are read.
1394 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1395 to have it done automatically; for @code{gnus-group-clear-data}, you
1396 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1397 cache for all groups).
1398
1399
1400 @node Startup Files
1401 @section Startup Files
1402 @cindex startup files
1403 @cindex .newsrc
1404 @cindex .newsrc.el
1405 @cindex .newsrc.eld
1406
1407 Now, you all know about the @file{.newsrc} file.  All subscription
1408 information is traditionally stored in this file.
1409
1410 Things got a bit more complicated with @sc{gnus}.  In addition to
1411 keeping the @file{.newsrc} file updated, it also used a file called
1412 @file{.newsrc.el} for storing all the information that didn't fit into
1413 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1414 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1415 files was the most recently saved, which enabled people to swap between
1416 @sc{gnus} and other newsreaders.
1417
1418 That was kinda silly, so Gnus went one better: In addition to the
1419 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1420 @file{.newsrc.eld}.  It will read whichever of these files that are most
1421 recent, but it will never write a @file{.newsrc.el} file.  You should
1422 never delete the @file{.newsrc.eld} file---it contains much information
1423 not stored in the @file{.newsrc} file.
1424
1425 @vindex gnus-save-newsrc-file
1426 @vindex gnus-read-newsrc-file
1427 You can turn off writing the @file{.newsrc} file by setting
1428 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1429 the file and save some space, as well as exiting from gnus faster.
1430 However, this will make it impossible to use other newsreaders than
1431 gnus.  But hey, who would want to, right?  Similarly, setting
1432 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1433 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1434 convenient if you have a tendency to use Netscape once in a while.
1435
1436 @vindex gnus-save-killed-list
1437 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1438 will not save the list of killed groups to the startup file.  This will
1439 save both time (when starting and quitting) and space (on disk).  It
1440 will also mean that Gnus has no record of what groups are new or old,
1441 so the automatic new groups subscription methods become meaningless.
1442 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1443 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1444 Groups}).  This variable can also be a regular expression.  If that's
1445 the case, remove all groups that do not match this regexp before
1446 saving.  This can be useful in certain obscure situations that involve
1447 several servers where not all servers support @code{ask-server}.
1448
1449 @vindex gnus-startup-file
1450 The @code{gnus-startup-file} variable says where the startup files are.
1451 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1452 file being whatever that one is, with a @samp{.eld} appended.
1453
1454 @vindex gnus-save-newsrc-hook
1455 @vindex gnus-save-quick-newsrc-hook
1456 @vindex gnus-save-standard-newsrc-hook
1457 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1458 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1459 saving the @file{.newsrc.eld} file, and
1460 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1461 @file{.newsrc} file.  The latter two are commonly used to turn version
1462 control on or off.  Version control is on by default when saving the
1463 startup files.  If you want to turn backup creation off, say something like:
1464
1465 @lisp
1466 (defun turn-off-backup ()
1467   (set (make-local-variable 'backup-inhibited) t))
1468
1469 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1470 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1471 @end lisp
1472
1473 @vindex gnus-init-file
1474 When gnus starts, it will read the @code{gnus-site-init-file}
1475 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1476 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1477 and can be used to avoid cluttering your @file{~/.emacs} and
1478 @file{site-init} files with gnus stuff.  Gnus will also check for files
1479 with the same names as these, but with @file{.elc} and @file{.el}
1480 suffixes.  In other words, if you have set @code{gnus-init-file} to
1481 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1482 and finally @file{~/.gnus} (in this order).
1483
1484
1485
1486 @node Auto Save
1487 @section Auto Save
1488 @cindex dribble file
1489 @cindex auto-save
1490
1491 Whenever you do something that changes the gnus data (reading articles,
1492 catching up, killing/subscribing groups), the change is added to a
1493 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1494 Emacs way.  If your Emacs should crash before you have saved the
1495 @file{.newsrc} files, all changes you have made can be recovered from
1496 this file.
1497
1498 If gnus detects this file at startup, it will ask the user whether to
1499 read it.  The auto save file is deleted whenever the real startup file is
1500 saved.
1501
1502 @vindex gnus-use-dribble-file
1503 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1504 maintain a dribble buffer.  The default is @code{t}.
1505
1506 @vindex gnus-dribble-directory
1507 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1508 this variable is @code{nil}, which it is by default, gnus will dribble
1509 into the directory where the @file{.newsrc} file is located.  (This is
1510 normally the user's home directory.)  The dribble file will get the same
1511 file permissions as the @code{.newsrc} file.
1512
1513 @vindex gnus-always-read-dribble-file
1514 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1515 read the dribble file on startup without querying the user.
1516
1517
1518 @node The Active File
1519 @section The Active File
1520 @cindex active file
1521 @cindex ignored groups
1522
1523 When gnus starts, or indeed whenever it tries to determine whether new
1524 articles have arrived, it reads the active file.  This is a very large
1525 file that lists all the active groups and articles on the server.
1526
1527 @vindex gnus-ignored-newsgroups
1528 Before examining the active file, gnus deletes all lines that match the
1529 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1530 any groups with bogus names, but you can use this variable to make gnus
1531 ignore hierarchies you aren't ever interested in.  However, this is not
1532 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1533 Groups} for an overview of other variables that can be used instead.
1534
1535 @c This variable is
1536 @c @code{nil} by default, and will slow down active file handling somewhat
1537 @c if you set it to anything else.
1538
1539 @vindex gnus-read-active-file
1540 @c @head
1541 The active file can be rather Huge, so if you have a slow network, you
1542 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1543 reading the active file.  This variable is @code{some} by default.
1544
1545 Gnus will try to make do by getting information just on the groups that
1546 you actually subscribe to.
1547
1548 Note that if you subscribe to lots and lots of groups, setting this
1549 variable to @code{nil} will probably make gnus slower, not faster.  At
1550 present, having this variable @code{nil} will slow gnus down
1551 considerably, unless you read news over a 2400 baud modem.
1552
1553 This variable can also have the value @code{some}.  Gnus will then
1554 attempt to read active info only on the subscribed groups.  On some
1555 servers this is quite fast (on sparkling, brand new INN servers that
1556 support the @code{LIST ACTIVE group} command), on others this isn't fast
1557 at all.  In any case, @code{some} should be faster than @code{nil}, and
1558 is certainly faster than @code{t} over slow lines.
1559
1560 Some news servers (old versions of Leafnode and old versions of INN, for
1561 instance) do not support the @code{LIST ACTIVE group}.  For these
1562 servers, @code{nil} is probably the most efficient value for this
1563 variable.
1564
1565 If this variable is @code{nil}, gnus will ask for group info in total
1566 lock-step, which isn't very fast.  If it is @code{some} and you use an
1567 @sc{nntp} server, gnus will pump out commands as fast as it can, and
1568 read all the replies in one swoop.  This will normally result in better
1569 performance, but if the server does not support the aforementioned
1570 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1571
1572 If you think that starting up Gnus takes too long, try all the three
1573 different values for this variable and see what works best for you.
1574
1575 In any case, if you use @code{some} or @code{nil}, you should definitely
1576 kill all groups that you aren't interested in to speed things up.
1577
1578 Note that this variable also affects active file retrieval from
1579 secondary select methods.
1580
1581
1582 @node Startup Variables
1583 @section Startup Variables
1584
1585 @table @code
1586
1587 @item gnus-load-hook
1588 @vindex gnus-load-hook
1589 A hook run while gnus is being loaded.  Note that this hook will
1590 normally be run just once in each Emacs session, no matter how many
1591 times you start gnus.
1592
1593 @item gnus-before-startup-hook
1594 @vindex gnus-before-startup-hook
1595 A hook run after starting up gnus successfully.
1596
1597 @item gnus-startup-hook
1598 @vindex gnus-startup-hook
1599 A hook run as the very last thing after starting up gnus
1600
1601 @item gnus-started-hook
1602 @vindex gnus-started-hook
1603 A hook that is run as the very last thing after starting up gnus
1604 successfully.
1605
1606 @item gnus-setup-news-hook
1607 @vindex gnus-setup-news-hook
1608 A hook that is run after reading the @file{.newsrc} file(s), but before
1609 generating the group buffer.
1610
1611 @item gnus-check-bogus-newsgroups
1612 @vindex gnus-check-bogus-newsgroups
1613 If non-@code{nil}, gnus will check for and delete all bogus groups at
1614 startup.  A @dfn{bogus group} is a group that you have in your
1615 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1616 bogus groups can take quite a while, so to save time and resources it's
1617 best to leave this option off, and do the checking for bogus groups once
1618 in a while from the group buffer instead (@pxref{Group Maintenance}).
1619
1620 @item gnus-inhibit-startup-message
1621 @vindex gnus-inhibit-startup-message
1622 If non-@code{nil}, the startup message won't be displayed.  That way,
1623 your boss might not notice as easily that you are reading news instead
1624 of doing your job.  Note that this variable is used before
1625 @file{.gnus.el} is loaded, so it should be set in @code{.emacs} instead.
1626
1627 @item gnus-no-groups-message
1628 @vindex gnus-no-groups-message
1629 Message displayed by gnus when no groups are available.
1630
1631 @item gnus-play-startup-jingle
1632 @vindex gnus-play-startup-jingle
1633 If non-@code{nil}, play the gnus jingle at startup.
1634
1635 @item gnus-startup-jingle
1636 @vindex gnus-startup-jingle
1637 Jingle to be played if the above variable is non-@code{nil}.  The
1638 default is @samp{Tuxedomoon.Jingle4.au}.
1639
1640 @end table
1641
1642
1643 @node Group Buffer
1644 @chapter Group Buffer
1645 @cindex group buffer
1646
1647 @c Alex Schroeder suggests to rearrange this as follows:
1648 @c
1649 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1650 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1651 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1652 @c   7. Group Score, 8. Group Buffer Format
1653 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1654 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1655 @c <kensanata> First, "Gnus considers groups... (default 9)."
1656 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1657 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1658 @c <kensanata> Then expand the next paragraph or add some more to it.
1659 @c    This short one sentence explains levels 1 and 2, therefore I understand
1660 @c    that I should keep important news at 3 and boring news at 4.
1661 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1662 @c    Maybe keep those that you don't want to read temporarily at 6,
1663 @c    those that you never want to read at 8, those that offend your
1664 @c    human rights at 9...
1665
1666
1667 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1668 is the first buffer shown when gnus starts, and will never be killed as
1669 long as gnus is active.
1670
1671 @iftex
1672 @iflatex
1673 \gnusfigure{The Group Buffer}{320}{
1674 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1675 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1676 \put(120,38){\vector(1,2){10}}
1677 \put(40,60){\makebox(0,0)[r]{Mode line}}
1678 \put(40,58){\vector(1,0){30}}
1679 \put(200,28){\makebox(0,0)[t]{Native select method}}
1680 \put(200,26){\vector(-1,2){15}}
1681 }
1682 @end iflatex
1683 @end iftex
1684
1685 @menu
1686 * Group Buffer Format::         Information listed and how you can change it.
1687 * Group Maneuvering::           Commands for moving in the group buffer.
1688 * Selecting a Group::           Actually reading news.
1689 * Subscription Commands::       Unsubscribing, killing, subscribing.
1690 * Group Data::                  Changing the info for a group.
1691 * Group Levels::                Levels? What are those, then?
1692 * Group Score::                 A mechanism for finding out what groups you like.
1693 * Marking Groups::              You can mark groups for later processing.
1694 * Foreign Groups::              Creating and editing groups.
1695 * Group Parameters::            Each group may have different parameters set.
1696 * Listing Groups::              Gnus can list various subsets of the groups.
1697 * Sorting Groups::              Re-arrange the group order.
1698 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1699 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1700 * Exiting Gnus::                Stop reading news and get some work done.
1701 * Group Topics::                A folding group mode divided into topics.
1702 * Misc Group Stuff::            Other stuff that you can to do.
1703 @end menu
1704
1705
1706 @node Group Buffer Format
1707 @section Group Buffer Format
1708
1709 @menu
1710 * Group Line Specification::    Deciding how the group buffer is to look.
1711 * Group Modeline Specification::  The group buffer modeline.
1712 * Group Highlighting::          Having nice colors in the group buffer.
1713 @end menu
1714
1715
1716 @node Group Line Specification
1717 @subsection Group Line Specification
1718 @cindex group buffer format
1719
1720 The default format of the group buffer is nice and dull, but you can
1721 make it as exciting and ugly as you feel like.
1722
1723 Here's a couple of example group lines:
1724
1725 @example
1726      25: news.announce.newusers
1727  *    0: alt.fan.andrea-dworkin
1728 @end example
1729
1730 Quite simple, huh?
1731
1732 You can see that there are 25 unread articles in
1733 @samp{news.announce.newusers}.  There are no unread articles, but some
1734 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1735 asterisk at the beginning of the line?).
1736
1737 @vindex gnus-group-line-format
1738 You can change that format to whatever you want by fiddling with the
1739 @code{gnus-group-line-format} variable.  This variable works along the
1740 lines of a @code{format} specification, which is pretty much the same as
1741 a @code{printf} specifications, for those of you who use (feh!) C.
1742 @xref{Formatting Variables}.
1743
1744 @samp{%M%S%5y: %(%g%)\n} is the value that produced those lines above.
1745
1746 There should always be a colon on the line; the cursor always moves to
1747 the colon after performing an operation.  @xref{Positioning
1748 Point}. Nothing else is required---not even the group name.  All
1749 displayed text is just window dressing, and is never examined by Gnus.
1750 Gnus stores all real information it needs using text properties.
1751
1752 (Note that if you make a really strange, wonderful, spreadsheet-like
1753 layout, everybody will believe you are hard at work with the accounting
1754 instead of wasting time reading news.)
1755
1756 Here's a list of all available format characters:
1757
1758 @table @samp
1759
1760 @item M
1761 An asterisk if the group only has marked articles.
1762
1763 @item S
1764 Whether the group is subscribed.
1765
1766 @item L
1767 Level of subscribedness.
1768
1769 @item N
1770 Number of unread articles.
1771
1772 @item I
1773 Number of dormant articles.
1774
1775 @item T
1776 Number of ticked articles.
1777
1778 @item R
1779 Number of read articles.
1780
1781 @item t
1782 Estimated total number of articles.  (This is really @var{max-number}
1783 minus @var{min-number} plus 1.)
1784
1785 Gnus uses this estimation because the @sc{nntp} protocol provides
1786 efficient access to @var{max-number} and @var{min-number} but getting
1787 the true unread message count is not possible efficiently.  For
1788 hysterical raisins, even the mail back ends, where the true number of
1789 unread messages might be available efficiently, use the same limited
1790 interface.  To remove this restriction from Gnus means that the back
1791 end interface has to be changed, which is not an easy job.  If you
1792 want to work on this, please contact the Gnus mailing list.
1793
1794 @item y
1795 Number of unread, unticked, non-dormant articles.
1796
1797 @item i
1798 Number of ticked and dormant articles.
1799
1800 @item g
1801 Full group name.
1802
1803 @item G
1804 Group name.
1805
1806 @item C
1807 Group comment (@pxref{Group Parameters}) or group name if there is no
1808 comment element in the group parameters.
1809
1810 @item D
1811 Newsgroup description.
1812
1813 @item o
1814 @samp{m} if moderated.
1815
1816 @item O
1817 @samp{(m)} if moderated.
1818
1819 @item s
1820 Select method.
1821
1822 @item n
1823 Select from where.
1824
1825 @item z
1826 A string that looks like @samp{<%s:%n>} if a foreign select method is
1827 used.
1828
1829 @item P
1830 Indentation based on the level of the topic (@pxref{Group Topics}).
1831
1832 @item c
1833 @vindex gnus-group-uncollapsed-levels
1834 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1835 variable says how many levels to leave at the end of the group name.
1836 The default is 1---this will mean that group names like
1837 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1838
1839 @item m
1840 @vindex gnus-new-mail-mark
1841 @cindex %
1842 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1843 the group lately.
1844
1845 @item p
1846 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1847
1848 @item d
1849 A string that says when you last read the group (@pxref{Group
1850 Timestamp}).
1851
1852 @item u
1853 User defined specifier.  The next character in the format string should
1854 be a letter.  Gnus will call the function
1855 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1856 following @samp{%u}.  The function will be passed a single dummy
1857 parameter as argument.  The function should return a string, which will
1858 be inserted into the buffer just like information from any other
1859 specifier.
1860 @end table
1861
1862 @cindex *
1863 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1864 if no info is available---for instance, if it is a non-activated foreign
1865 group, or a bogus native group.
1866
1867
1868 @node Group Modeline Specification
1869 @subsection Group Modeline Specification
1870 @cindex group modeline
1871
1872 @vindex gnus-group-mode-line-format
1873 The mode line can be changed by setting
1874 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1875 doesn't understand that many format specifiers:
1876
1877 @table @samp
1878 @item S
1879 The native news server.
1880 @item M
1881 The native select method.
1882 @end table
1883
1884
1885 @node Group Highlighting
1886 @subsection Group Highlighting
1887 @cindex highlighting
1888 @cindex group highlighting
1889
1890 @vindex gnus-group-highlight
1891 Highlighting in the group buffer is controlled by the
1892 @code{gnus-group-highlight} variable.  This is an alist with elements
1893 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1894 something non-@code{nil}, the @var{face} will be used on the line.
1895
1896 Here's an example value for this variable that might look nice if the
1897 background is dark:
1898
1899 @lisp
1900 (cond (window-system
1901        (setq custom-background-mode 'light)
1902        (defface my-group-face-1
1903          '((t (:foreground "Red" :bold t))) "First group face")
1904        (defface my-group-face-2
1905          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1906        (defface my-group-face-3
1907          '((t (:foreground "Green4" :bold t))) "Third group face")
1908        (defface my-group-face-4
1909          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1910        (defface my-group-face-5
1911          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1912
1913 (setq gnus-group-highlight
1914       '(((> unread 200) . my-group-face-1)
1915         ((and (< level 3) (zerop unread)) . my-group-face-2)
1916         ((< level 3) . my-group-face-3)
1917         ((zerop unread) . my-group-face-4)
1918         (t . my-group-face-5)))
1919 @end lisp
1920
1921 Also @pxref{Faces and Fonts}.
1922
1923 Variables that are dynamically bound when the forms are evaluated
1924 include:
1925
1926 @table @code
1927 @item group
1928 The group name.
1929 @item unread
1930 The number of unread articles in the group.
1931 @item method
1932 The select method.
1933 @item mailp
1934 Whether the group is a mail group.
1935 @item level
1936 The level of the group.
1937 @item score
1938 The score of the group.
1939 @item ticked
1940 The number of ticked articles in the group.
1941 @item total
1942 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1943 MIN-NUMBER plus one.
1944 @item topic
1945 When using the topic minor mode, this variable is bound to the current
1946 topic being inserted.
1947 @end table
1948
1949 When the forms are @code{eval}ed, point is at the beginning of the line
1950 of the group in question, so you can use many of the normal gnus
1951 functions for snarfing info on the group.
1952
1953 @vindex gnus-group-update-hook
1954 @findex gnus-group-highlight-line
1955 @code{gnus-group-update-hook} is called when a group line is changed.
1956 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1957 calls @code{gnus-group-highlight-line} by default.
1958
1959
1960 @node Group Maneuvering
1961 @section Group Maneuvering
1962 @cindex group movement
1963
1964 All movement commands understand the numeric prefix and will behave as
1965 expected, hopefully.
1966
1967 @table @kbd
1968
1969 @item n
1970 @kindex n (Group)
1971 @findex gnus-group-next-unread-group
1972 Go to the next group that has unread articles
1973 (@code{gnus-group-next-unread-group}).
1974
1975 @item p
1976 @itemx DEL
1977 @kindex DEL (Group)
1978 @kindex p (Group)
1979 @findex gnus-group-prev-unread-group
1980 Go to the previous group that has unread articles
1981 (@code{gnus-group-prev-unread-group}).
1982
1983 @item N
1984 @kindex N (Group)
1985 @findex gnus-group-next-group
1986 Go to the next group (@code{gnus-group-next-group}).
1987
1988 @item P
1989 @kindex P (Group)
1990 @findex gnus-group-prev-group
1991 Go to the previous group (@code{gnus-group-prev-group}).
1992
1993 @item M-n
1994 @kindex M-n (Group)
1995 @findex gnus-group-next-unread-group-same-level
1996 Go to the next unread group on the same (or lower) level
1997 (@code{gnus-group-next-unread-group-same-level}).
1998
1999 @item M-p
2000 @kindex M-p (Group)
2001 @findex gnus-group-prev-unread-group-same-level
2002 Go to the previous unread group on the same (or lower) level
2003 (@code{gnus-group-prev-unread-group-same-level}).
2004 @end table
2005
2006 Three commands for jumping to groups:
2007
2008 @table @kbd
2009
2010 @item j
2011 @kindex j (Group)
2012 @findex gnus-group-jump-to-group
2013 Jump to a group (and make it visible if it isn't already)
2014 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2015 like living groups.
2016
2017 @item ,
2018 @kindex , (Group)
2019 @findex gnus-group-best-unread-group
2020 Jump to the unread group with the lowest level
2021 (@code{gnus-group-best-unread-group}).
2022
2023 @item .
2024 @kindex . (Group)
2025 @findex gnus-group-first-unread-group
2026 Jump to the first group with unread articles
2027 (@code{gnus-group-first-unread-group}).
2028 @end table
2029
2030 @vindex gnus-group-goto-unread
2031 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2032 commands will move to the next group, not the next unread group.  Even
2033 the commands that say they move to the next unread group.  The default
2034 is @code{t}.
2035
2036
2037 @node Selecting a Group
2038 @section Selecting a Group
2039 @cindex group selection
2040
2041 @table @kbd
2042
2043 @item SPACE
2044 @kindex SPACE (Group)
2045 @findex gnus-group-read-group
2046 Select the current group, switch to the summary buffer and display the
2047 first unread article (@code{gnus-group-read-group}).  If there are no
2048 unread articles in the group, or if you give a non-numerical prefix to
2049 this command, gnus will offer to fetch all the old articles in this
2050 group from the server.  If you give a numerical prefix @var{N}, @var{N}
2051 determines the number of articles gnus will fetch.  If @var{N} is
2052 positive, gnus fetches the @var{N} newest articles, if @var{N} is
2053 negative, Gnus fetches the @code{abs(@var{N})} oldest articles.
2054
2055 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2056 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2057 - 4 2 SPC} fetches the 42 oldest ones.
2058
2059 When you are in the group (in the Summary buffer), you can type
2060 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2061 ones.
2062
2063 @item RET
2064 @kindex RET (Group)
2065 @findex gnus-group-select-group
2066 Select the current group and switch to the summary buffer
2067 (@code{gnus-group-select-group}).  Takes the same arguments as
2068 @code{gnus-group-read-group}---the only difference is that this command
2069 does not display the first unread article automatically upon group
2070 entry.
2071
2072 @item M-RET
2073 @kindex M-RET (Group)
2074 @findex gnus-group-quick-select-group
2075 This does the same as the command above, but tries to do it with the
2076 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2077 scoring/killing will be performed, there will be no highlights and no
2078 expunging.  This might be useful if you're in a real hurry and have to
2079 enter some humongous group.  If you give a 0 prefix to this command
2080 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2081 which is useful if you want to toggle threading before generating the
2082 summary buffer (@pxref{Summary Generation Commands}).
2083
2084 @item M-SPACE
2085 @kindex M-SPACE (Group)
2086 @findex gnus-group-visible-select-group
2087 This is yet one more command that does the same as the @kbd{RET}
2088 command, but this one does it without expunging and hiding dormants
2089 (@code{gnus-group-visible-select-group}).
2090
2091 @item C-M-RET
2092 @kindex C-M-RET (Group)
2093 @findex gnus-group-select-group-ephemerally
2094 Finally, this command selects the current group ephemerally without
2095 doing any processing of its contents
2096 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2097 turned off.  Everything you do in the group after selecting it in this
2098 manner will have no permanent effects.
2099
2100 @end table
2101
2102 @vindex gnus-large-newsgroup
2103 The @code{gnus-large-newsgroup} variable says what gnus should consider
2104 to be a big group.  This is 200 by default.  If the group has more
2105 (unread and/or ticked) articles than this, gnus will query the user
2106 before entering the group.  The user can then specify how many articles
2107 should be fetched from the server.  If the user specifies a negative
2108 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2109 is positive, the @code{n} articles that have arrived most recently will
2110 be fetched.
2111
2112 @vindex gnus-select-group-hook
2113 @vindex gnus-auto-select-first
2114 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2115 automatically when entering a group with the @kbd{SPACE} command.
2116 Which article this is is controlled by the
2117 @code{gnus-auto-select-subject} variable.  Valid values for this
2118 variable is:
2119
2120 @table @code
2121
2122 @item unread
2123 Place point on the subject line of the first unread article.
2124
2125 @item first
2126 Place point on the subject line of the first article.
2127
2128 @item unseen
2129 Place point on the subject line of the first unseen article.
2130
2131 @item unseen-or-unread
2132 Place point on the subject line of the first unseen article, and if
2133 there is no such article, place point on the subject line of the first
2134 unread article.
2135
2136 @item best
2137 Place point on the subject line of the highest-scored unread article.
2138
2139 @end table
2140
2141 This variable can also be a function.  In that case, that function
2142 will be called to place point on a subject line.
2143
2144 If you want to prevent automatic selection in some group (say, in a
2145 binary group with Huge articles) you can set the
2146 @code{gnus-auto-select-first} variable to @code{nil} in
2147 @code{gnus-select-group-hook}, which is called when a group is
2148 selected.
2149
2150
2151 @node Subscription Commands
2152 @section Subscription Commands
2153 @cindex subscription
2154
2155 @table @kbd
2156
2157 @item S t
2158 @itemx u
2159 @kindex S t (Group)
2160 @kindex u (Group)
2161 @findex gnus-group-unsubscribe-current-group
2162 @c @icon{gnus-group-unsubscribe}
2163 Toggle subscription to the current group
2164 (@code{gnus-group-unsubscribe-current-group}).
2165
2166 @item S s
2167 @itemx U
2168 @kindex S s (Group)
2169 @kindex U (Group)
2170 @findex gnus-group-unsubscribe-group
2171 Prompt for a group to subscribe, and then subscribe it.  If it was
2172 subscribed already, unsubscribe it instead
2173 (@code{gnus-group-unsubscribe-group}).
2174
2175 @item S k
2176 @itemx C-k
2177 @kindex S k (Group)
2178 @kindex C-k (Group)
2179 @findex gnus-group-kill-group
2180 @c @icon{gnus-group-kill-group}
2181 Kill the current group (@code{gnus-group-kill-group}).
2182
2183 @item S y
2184 @itemx C-y
2185 @kindex S y (Group)
2186 @kindex C-y (Group)
2187 @findex gnus-group-yank-group
2188 Yank the last killed group (@code{gnus-group-yank-group}).
2189
2190 @item C-x C-t
2191 @kindex C-x C-t (Group)
2192 @findex gnus-group-transpose-groups
2193 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2194 really a subscription command, but you can use it instead of a
2195 kill-and-yank sequence sometimes.
2196
2197 @item S w
2198 @itemx C-w
2199 @kindex S w (Group)
2200 @kindex C-w (Group)
2201 @findex gnus-group-kill-region
2202 Kill all groups in the region (@code{gnus-group-kill-region}).
2203
2204 @item S z
2205 @kindex S z (Group)
2206 @findex gnus-group-kill-all-zombies
2207 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2208
2209 @item S C-k
2210 @kindex S C-k (Group)
2211 @findex gnus-group-kill-level
2212 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2213 These groups can't be yanked back after killing, so this command should
2214 be used with some caution.  The only time where this command comes in
2215 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2216 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2217 kill off all unsubscribed groups that do not have message numbers in the
2218 @file{.newsrc} file.
2219
2220 @end table
2221
2222 Also @pxref{Group Levels}.
2223
2224
2225 @node Group Data
2226 @section Group Data
2227
2228 @table @kbd
2229
2230 @item c
2231 @kindex c (Group)
2232 @findex gnus-group-catchup-current
2233 @vindex gnus-group-catchup-group-hook
2234 @c @icon{gnus-group-catchup-current}
2235 Mark all unticked articles in this group as read
2236 (@code{gnus-group-catchup-current}).
2237 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2238 the group buffer.
2239
2240 @item C
2241 @kindex C (Group)
2242 @findex gnus-group-catchup-current-all
2243 Mark all articles in this group, even the ticked ones, as read
2244 (@code{gnus-group-catchup-current-all}).
2245
2246 @item M-c
2247 @kindex M-c (Group)
2248 @findex gnus-group-clear-data
2249 Clear the data from the current group---nix out marks and the list of
2250 read articles (@code{gnus-group-clear-data}).
2251
2252 @item M-x gnus-group-clear-data-on-native-groups
2253 @kindex M-x gnus-group-clear-data-on-native-groups
2254 @findex gnus-group-clear-data-on-native-groups
2255 If you have switched from one @sc{nntp} server to another, all your marks
2256 and read ranges have become worthless.  You can use this command to
2257 clear out all data that you have on your native groups.  Use with
2258 caution.
2259
2260 @end table
2261
2262
2263 @node Group Levels
2264 @section Group Levels
2265 @cindex group level
2266 @cindex level
2267
2268 All groups have a level of @dfn{subscribedness}.  For instance, if a
2269 group is on level 2, it is more subscribed than a group on level 5.  You
2270 can ask gnus to just list groups on a given level or lower
2271 (@pxref{Listing Groups}), or to just check for new articles in groups on
2272 a given level or lower (@pxref{Scanning New Messages}).
2273
2274 Remember:  The higher the level of the group, the less important it is.
2275
2276 @table @kbd
2277
2278 @item S l
2279 @kindex S l (Group)
2280 @findex gnus-group-set-current-level
2281 Set the level of the current group.  If a numeric prefix is given, the
2282 next @var{n} groups will have their levels set.  The user will be
2283 prompted for a level.
2284 @end table
2285
2286 @vindex gnus-level-killed
2287 @vindex gnus-level-zombie
2288 @vindex gnus-level-unsubscribed
2289 @vindex gnus-level-subscribed
2290 Gnus considers groups from levels 1 to
2291 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2292 @code{gnus-level-subscribed} (exclusive) and
2293 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2294 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2295 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2296 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2297 same, but zombie and killed groups have no information on what articles
2298 you have read, etc, stored.  This distinction between dead and living
2299 groups isn't done because it is nice or clever, it is done purely for
2300 reasons of efficiency.
2301
2302 It is recommended that you keep all your mail groups (if any) on quite
2303 low levels (e.g. 1 or 2).
2304
2305 Maybe the following description of the default behavior of Gnus helps to
2306 understand what these levels are all about.  By default, Gnus shows you
2307 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2308 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2309 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2310 groups are hidden, in a way.
2311
2312 Zombie and killed groups are similar to unsubscribed groups in that they
2313 are hidden by default.  But they are different from subscribed and
2314 unsubscribed groups in that Gnus doesn't ask the news server for
2315 information (number of messages, number of unread messages) on zombie
2316 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2317 aren't interested in.  If most groups are killed, Gnus is faster.
2318
2319 Why does Gnus distinguish between zombie and killed groups?  Well, when
2320 a new group arrives on the server, Gnus by default makes it a zombie
2321 group.  This means that you are normally not bothered with new groups,
2322 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2323 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2324 list of killed groups.)
2325
2326 If you want to play with the level variables, you should show some care.
2327 Set them once, and don't touch them ever again.  Better yet, don't touch
2328 them at all unless you know exactly what you're doing.
2329
2330 @vindex gnus-level-default-unsubscribed
2331 @vindex gnus-level-default-subscribed
2332 Two closely related variables are @code{gnus-level-default-subscribed}
2333 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2334 which are the levels that new groups will be put on if they are
2335 (un)subscribed.  These two variables should, of course, be inside the
2336 relevant valid ranges.
2337
2338 @vindex gnus-keep-same-level
2339 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2340 will only move to groups of the same level (or lower).  In
2341 particular, going from the last article in one group to the next group
2342 will go to the next group of the same level (or lower).  This might be
2343 handy if you want to read the most important groups before you read the
2344 rest.
2345
2346 If this variable is @code{best}, Gnus will make the next newsgroup the
2347 one with the best level.
2348
2349 @vindex gnus-group-default-list-level
2350 All groups with a level less than or equal to
2351 @code{gnus-group-default-list-level} will be listed in the group buffer
2352 by default.
2353
2354 @vindex gnus-group-list-inactive-groups
2355 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2356 groups will be listed along with the unread groups.  This variable is
2357 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2358 listed.
2359
2360 @vindex gnus-group-use-permanent-levels
2361 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2362 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2363 use this level as the ``work'' level.
2364
2365 @vindex gnus-activate-level
2366 Gnus will normally just activate (i. e., query the server about) groups
2367 on level @code{gnus-activate-level} or less.  If you don't want to
2368 activate unsubscribed groups, for instance, you might set this variable
2369 to 5.  The default is 6.
2370
2371
2372 @node Group Score
2373 @section Group Score
2374 @cindex group score
2375 @cindex group rank
2376 @cindex rank
2377
2378 You would normally keep important groups on high levels, but that scheme
2379 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2380 group buffer according to how often you read groups, perhaps?  Within
2381 reason?
2382
2383 This is what @dfn{group score} is for.  You can have Gnus assign a score
2384 to each group through the mechanism described below.  You can then sort
2385 the group buffer based on this score.  Alternatively, you can sort on
2386 score and then level.  (Taken together, the level and the score is
2387 called the @dfn{rank} of the group.  A group that is on level 4 and has
2388 a score of 1 has a higher rank than a group on level 5 that has a score
2389 of 300.  (The level is the most significant part and the score is the
2390 least significant part.))
2391
2392 @findex gnus-summary-bubble-group
2393 If you want groups you read often to get higher scores than groups you
2394 read seldom you can add the @code{gnus-summary-bubble-group} function to
2395 the @code{gnus-summary-exit-hook} hook.  This will result (after
2396 sorting) in a bubbling sort of action.  If you want to see that in
2397 action after each summary exit, you can add
2398 @code{gnus-group-sort-groups-by-rank} or
2399 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2400 slow things down somewhat.
2401
2402
2403 @node Marking Groups
2404 @section Marking Groups
2405 @cindex marking groups
2406
2407 If you want to perform some command on several groups, and they appear
2408 subsequently in the group buffer, you would normally just give a
2409 numerical prefix to the command.  Most group commands will then do your
2410 bidding on those groups.
2411
2412 However, if the groups are not in sequential order, you can still
2413 perform a command on several groups.  You simply mark the groups first
2414 with the process mark and then execute the command.
2415
2416 @table @kbd
2417
2418 @item #
2419 @kindex # (Group)
2420 @itemx M m
2421 @kindex M m (Group)
2422 @findex gnus-group-mark-group
2423 Set the mark on the current group (@code{gnus-group-mark-group}).
2424
2425 @item M-#
2426 @kindex M-# (Group)
2427 @itemx M u
2428 @kindex M u (Group)
2429 @findex gnus-group-unmark-group
2430 Remove the mark from the current group
2431 (@code{gnus-group-unmark-group}).
2432
2433 @item M U
2434 @kindex M U (Group)
2435 @findex gnus-group-unmark-all-groups
2436 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2437
2438 @item M w
2439 @kindex M w (Group)
2440 @findex gnus-group-mark-region
2441 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2442
2443 @item M b
2444 @kindex M b (Group)
2445 @findex gnus-group-mark-buffer
2446 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2447
2448 @item M r
2449 @kindex M r (Group)
2450 @findex gnus-group-mark-regexp
2451 Mark all groups that match some regular expression
2452 (@code{gnus-group-mark-regexp}).
2453 @end table
2454
2455 Also @pxref{Process/Prefix}.
2456
2457 @findex gnus-group-universal-argument
2458 If you want to execute some command on all groups that have been marked
2459 with the process mark, you can use the @kbd{M-&}
2460 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2461 the command to be executed.
2462
2463
2464 @node Foreign Groups
2465 @section Foreign Groups
2466 @cindex foreign groups
2467
2468 Below are some group mode commands for making and editing general foreign
2469 groups, as well as commands to ease the creation of a few
2470 special-purpose groups.  All these commands insert the newly created
2471 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2472 consulted.
2473
2474 @table @kbd
2475
2476 @item G m
2477 @kindex G m (Group)
2478 @findex gnus-group-make-group
2479 @cindex making groups
2480 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2481 for a name, a method and possibly an @dfn{address}.  For an easier way
2482 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
2483
2484 @item G r
2485 @kindex G r (Group)
2486 @findex gnus-group-rename-group
2487 @cindex renaming groups
2488 Rename the current group to something else
2489 (@code{gnus-group-rename-group}).  This is valid only on some
2490 groups---mail groups mostly.  This command might very well be quite slow
2491 on some back ends.
2492
2493 @item G c
2494 @kindex G c (Group)
2495 @cindex customizing
2496 @findex gnus-group-customize
2497 Customize the group parameters (@code{gnus-group-customize}).
2498
2499 @item G e
2500 @kindex G e (Group)
2501 @findex gnus-group-edit-group-method
2502 @cindex renaming groups
2503 Enter a buffer where you can edit the select method of the current
2504 group (@code{gnus-group-edit-group-method}).
2505
2506 @item G p
2507 @kindex G p (Group)
2508 @findex gnus-group-edit-group-parameters
2509 Enter a buffer where you can edit the group parameters
2510 (@code{gnus-group-edit-group-parameters}).
2511
2512 @item G E
2513 @kindex G E (Group)
2514 @findex gnus-group-edit-group
2515 Enter a buffer where you can edit the group info
2516 (@code{gnus-group-edit-group}).
2517
2518 @item G d
2519 @kindex G d (Group)
2520 @findex gnus-group-make-directory-group
2521 @cindex nndir
2522 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2523 for a directory name (@code{gnus-group-make-directory-group}).
2524
2525 @item G h
2526 @kindex G h (Group)
2527 @cindex help group
2528 @findex gnus-group-make-help-group
2529 Make the gnus help group (@code{gnus-group-make-help-group}).
2530
2531 @item G a
2532 @kindex G a (Group)
2533 @cindex (ding) archive
2534 @cindex archive group
2535 @findex gnus-group-make-archive-group
2536 @vindex gnus-group-archive-directory
2537 @vindex gnus-group-recent-archive-directory
2538 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2539 default a group pointing to the most recent articles will be created
2540 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2541 group will be created from @code{gnus-group-archive-directory}.
2542
2543 @item G k
2544 @kindex G k (Group)
2545 @findex gnus-group-make-kiboze-group
2546 @cindex nnkiboze
2547 Make a kiboze group.  You will be prompted for a name, for a regexp to
2548 match groups to be ``included'' in the kiboze group, and a series of
2549 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2550 @xref{Kibozed Groups}.
2551
2552 @item G D
2553 @kindex G D (Group)
2554 @findex gnus-group-enter-directory
2555 @cindex nneething
2556 Read an arbitrary directory as if it were a newsgroup with the
2557 @code{nneething} back end (@code{gnus-group-enter-directory}).
2558 @xref{Anything Groups}.
2559
2560 @item G f
2561 @kindex G f (Group)
2562 @findex gnus-group-make-doc-group
2563 @cindex ClariNet Briefs
2564 @cindex nndoc
2565 Make a group based on some file or other
2566 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2567 command, you will be prompted for a file name and a file type.
2568 Currently supported types are @code{mbox}, @code{babyl},
2569 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2570 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2571 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2572 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2573 you run this command without a prefix, Gnus will guess at the file
2574 type.  @xref{Document Groups}.
2575
2576 @item G u
2577 @kindex G u (Group)
2578 @vindex gnus-useful-groups
2579 @findex gnus-group-make-useful-group
2580 Create one of the groups mentioned in @code{gnus-useful-groups}
2581 (@code{gnus-group-make-useful-group}).
2582
2583 @item G w
2584 @kindex G w (Group)
2585 @findex gnus-group-make-web-group
2586 @cindex Google
2587 @cindex nnweb
2588 @cindex gmane
2589 Make an ephemeral group based on a web search
2590 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2591 command, make a solid group instead.  You will be prompted for the
2592 search engine type and the search string.  Valid search engine types
2593 include @code{google}, @code{dejanews}, and @code{gmane}.
2594 @xref{Web Searches}.
2595
2596 If you use the @code{google} search engine, you can limit the search
2597 to a particular group by using a match string like
2598 @samp{shaving group:alt.sysadmin.recovery}.
2599
2600 @item G DEL
2601 @kindex G DEL (Group)
2602 @findex gnus-group-delete-group
2603 This function will delete the current group
2604 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2605 actually delete all the articles in the group, and forcibly remove the
2606 group itself from the face of the Earth.  Use a prefix only if you are
2607 absolutely sure of what you are doing.  This command can't be used on
2608 read-only groups (like @code{nntp} group), though.
2609
2610 @item G V
2611 @kindex G V (Group)
2612 @findex gnus-group-make-empty-virtual
2613 Make a new, fresh, empty @code{nnvirtual} group
2614 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2615
2616 @item G v
2617 @kindex G v (Group)
2618 @findex gnus-group-add-to-virtual
2619 Add the current group to an @code{nnvirtual} group
2620 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2621 @end table
2622
2623 @xref{Select Methods}, for more information on the various select
2624 methods.
2625
2626 @vindex gnus-activate-foreign-newsgroups
2627 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2628 gnus will check all foreign groups with this level or lower at startup.
2629 This might take quite a while, especially if you subscribe to lots of
2630 groups from different @sc{nntp} servers.  Also @pxref{Group Levels};
2631 @code{gnus-activate-level} also affects activation of foreign
2632 newsgroups.
2633
2634
2635 @node Group Parameters
2636 @section Group Parameters
2637 @cindex group parameters
2638
2639 The group parameters store information local to a particular group.
2640 Here's an example group parameter list:
2641
2642 @example
2643 ((to-address . "ding@@gnus.org")
2644  (auto-expire . t))
2645 @end example
2646
2647 We see that each element consists of a "dotted pair"---the thing before
2648 the dot is the key, while the thing after the dot is the value.  All the
2649 parameters have this form @emph{except} local variable specs, which are
2650 not dotted pairs, but proper lists.
2651
2652 Some parameters have correspondant customizable variables, each of which
2653 is an alist of regexps and values.
2654
2655 The following group parameters can be used:
2656
2657 @table @code
2658 @item to-address
2659 @cindex to-address
2660 Address used by when doing followups and new posts.
2661
2662 @example
2663 (to-address . "some@@where.com")
2664 @end example
2665
2666 This is primarily useful in mail groups that represent closed mailing
2667 lists---mailing lists where it's expected that everybody that writes to
2668 the mailing list is subscribed to it.  Since using this parameter
2669 ensures that the mail only goes to the mailing list itself, it means
2670 that members won't receive two copies of your followups.
2671
2672 Using @code{to-address} will actually work whether the group is foreign
2673 or not.  Let's say there's a group on the server that is called
2674 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2675 the articles from a mail-to-news gateway.  Posting directly to this
2676 group is therefore impossible---you have to send mail to the mailing
2677 list address instead.
2678
2679 See also @code{gnus-parameter-to-address-alist}.
2680
2681 @item to-list
2682 @cindex to-list
2683 Address used when doing @kbd{a} in that group.
2684
2685 @example
2686 (to-list . "some@@where.com")
2687 @end example
2688
2689 It is totally ignored
2690 when doing a followup---except that if it is present in a news group,
2691 you'll get mail group semantics when doing @kbd{f}.
2692
2693 If you do an @kbd{a} command in a mail group and you have neither a
2694 @code{to-list} group parameter nor a @code{to-address} group parameter,
2695 then a @code{to-list} group parameter will be added automatically upon
2696 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2697 @vindex gnus-add-to-list
2698
2699 If you do an @kbd{a} command in a mail group and you don't have a
2700 @code{to-list} group parameter, one will be added automatically upon
2701 sending the message.
2702
2703 @findex gnus-mailing-list-mode
2704 @cindex Mail List Groups
2705 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2706 entering summary buffer.
2707
2708 See also @code{gnus-parameter-to-list-alist}.
2709
2710 @anchor{subscribed}
2711 @item subscribed
2712 @cindex subscribed
2713 If this parameter is set to @code{t}, Gnus will consider the
2714 to-address and to-list parameters for this group as addresses of
2715 mailing lists you are subscribed to.  Giving Gnus this information is
2716 (only) a first step in getting it to generate correct Mail-Followup-To
2717 headers for your posts to these lists.  Look here @pxref{(message)Mailing
2718 Lists} for a complete treatment of available MFT support.
2719
2720 See also @code{gnus-find-subscribed-addresses}, the function that
2721 directly uses this group parameter.
2722
2723 @item visible
2724 @cindex visible
2725 If the group parameter list has the element @code{(visible . t)},
2726 that group will always be visible in the Group buffer, regardless
2727 of whether it has any unread articles.
2728
2729 @item broken-reply-to
2730 @cindex broken-reply-to
2731 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2732 headers in this group are to be ignored.  This can be useful if you're
2733 reading a mailing list group where the listserv has inserted
2734 @code{Reply-To} headers that point back to the listserv itself.  This is
2735 broken behavior.  So there!
2736
2737 @item to-group
2738 @cindex to-group
2739 Elements like @code{(to-group . "some.group.name")} means that all
2740 posts in that group will be sent to @code{some.group.name}.
2741
2742 @item newsgroup
2743 @cindex newsgroup
2744 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2745 will treat all responses as if they were responses to news articles.
2746 This can be useful if you have a mail group that's really a mirror of a
2747 news group.
2748
2749 @item gcc-self
2750 @cindex gcc-self
2751 If @code{(gcc-self . t)} is present in the group parameter list, newly
2752 composed messages will be @code{Gcc}'d to the current group.  If
2753 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2754 generated, if @code{(gcc-self . "string")} is present, this string will
2755 be inserted literally as a @code{gcc} header.  This parameter takes
2756 precedence over any default @code{Gcc} rules as described later
2757 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2758 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2759 a @code{nntp} server doesn't accept artciles.
2760
2761 @item auto-expire
2762 @cindex auto-expire
2763 If the group parameter has an element that looks like @code{(auto-expire
2764 . t)}, all articles read will be marked as expirable.  For an
2765 alternative approach, @pxref{Expiring Mail}.
2766
2767 See also @code{gnus-auto-expirable-newsgroups}.
2768
2769 @item total-expire
2770 @cindex total-expire
2771 If the group parameter has an element that looks like
2772 @code{(total-expire . t)}, all read articles will be put through the
2773 expiry process, even if they are not marked as expirable.  Use with
2774 caution.  Unread, ticked and dormant articles are not eligible for
2775 expiry.
2776
2777 See also @code{gnus-total-expirable-newsgroups}.
2778
2779 @item expiry-wait
2780 @cindex expiry-wait
2781 @vindex nnmail-expiry-wait-function
2782 If the group parameter has an element that looks like
2783 @code{(expiry-wait . 10)}, this value will override any
2784 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2785 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2786 can either be a number of days (not necessarily an integer) or the
2787 symbols @code{never} or @code{immediate}.
2788
2789 @item score-file
2790 @cindex score file group parameter
2791 Elements that look like @code{(score-file . "file")} will make
2792 @file{file} into the current score file for the group in question.  All
2793 interactive score entries will be put into this file.
2794
2795 @item adapt-file
2796 @cindex adapt file group parameter
2797 Elements that look like @code{(adapt-file . "file")} will make
2798 @file{file} into the current adaptive file for the group in question.
2799 All adaptive score entries will be put into this file.
2800
2801 @item admin-address
2802 @cindex admin-address
2803 When unsubscribing from a mailing list you should never send the
2804 unsubscription notice to the mailing list itself.  Instead, you'd send
2805 messages to the administrative address.  This parameter allows you to
2806 put the admin address somewhere convenient.
2807
2808 @item display
2809 @cindex display
2810 Elements that look like @code{(display . MODE)} say which articles to
2811 display on entering the group.  Valid values are:
2812
2813 @table @code
2814 @item all
2815 Display all articles, both read and unread.
2816
2817 @item an integer
2818 Display the last INTEGER articles in the group.  This is the same as
2819 entering the group with C-u INTEGER.
2820
2821 @item default
2822 Display the default visible articles, which normally includes unread and
2823 ticked articles.
2824
2825 @item an array
2826 Display articles that satisfy a predicate.
2827
2828 Here are some examples:
2829
2830 @table @code
2831 @item [unread]
2832 Display only unread articles.
2833
2834 @item [not expire]
2835 Display everything except expirable articles.
2836
2837 @item [and (not reply) (not expire)]
2838 Display everything except expirable and articles you've already
2839 responded to.
2840 @end table
2841
2842 The available operators are @code{not}, @code{and} and @code{or}.
2843 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2844 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2845 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2846 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2847
2848 @end table
2849
2850 The @code{display} parameter works by limiting the summary buffer to
2851 the subset specified.  You can pop the limit by using the @kbd{/ w}
2852 command (@pxref{Limiting}).
2853
2854 @item comment
2855 @cindex comment
2856 Elements that look like @code{(comment . "This is a comment")} are
2857 arbitrary comments on the group.  You can display comments in the
2858 group line (@pxref{Group Line Specification}).
2859
2860 @item charset
2861 @cindex charset
2862 Elements that look like @code{(charset . iso-8859-1)} will make
2863 @code{iso-8859-1} the default charset; that is, the charset that will be
2864 used for all articles that do not specify a charset.
2865
2866 See also @code{gnus-group-charset-alist}.
2867
2868 @item ignored-charsets
2869 @cindex ignored-charset
2870 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2871 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2872 default charset will be used for decoding articles.
2873
2874 See also @code{gnus-group-ignored-charsets-alist}.
2875
2876 @item posting-style
2877 @cindex posting-style
2878 You can store additional posting style information for this group only
2879 here (@pxref{Posting Styles}).  The format is that of an entry in the
2880 @code{gnus-posting-styles} alist, except that there's no regexp matching
2881 the group name (of course).  Style elements in this group parameter will
2882 take precedence over the ones found in @code{gnus-posting-styles}.
2883
2884 For instance, if you want a funky name and signature in this group only,
2885 instead of hacking @code{gnus-posting-styles}, you could put something
2886 like this in the group parameters:
2887
2888 @example
2889 (posting-style
2890   (name "Funky Name")
2891   (signature "Funky Signature"))
2892 @end example
2893
2894 @item post-method
2895 @cindex post-method
2896 If it is set, the value is used as the method for posting message
2897 instead of @code{gnus-post-method}.
2898
2899 @item banner
2900 @cindex banner
2901 An item like @code{(banner . "regex")} causes any part of an article
2902 that matches the regular expression "regex" to be stripped. Instead of
2903 "regex", you can also use the symbol @code{signature} which strips the
2904 last signature or any of the elements of the alist
2905 @code{gnus-article-banner-alist}.
2906
2907 @item sieve
2908 @cindex sieve
2909 This parameter contains a Sieve test that should match incoming mail
2910 that should be placed in this group.  From this group parameter, a
2911 Sieve @samp{IF} control structure is generated, having the test as the
2912 condition and @samp{fileinto "group.name";} as the body.
2913
2914 For example, if the INBOX.list.sieve group has the @code{(sieve
2915 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2916 translating the group parameter into a Sieve script (@pxref{Sieve
2917 Commands}) the following Sieve code is generated:
2918
2919 @example
2920 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2921         fileinto \"INBOX.list.sieve\";
2922 @}
2923 @end example
2924
2925 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2926 Emacs Sieve}.
2927
2928 @item (@var{variable} @var{form})
2929 You can use the group parameters to set variables local to the group you
2930 are entering.  If you want to turn threading off in @samp{news.answers},
2931 you could put @code{(gnus-show-threads nil)} in the group parameters of
2932 that group.  @code{gnus-show-threads} will be made into a local variable
2933 in the summary buffer you enter, and the form @code{nil} will be
2934 @code{eval}ed there.
2935
2936 @vindex gnus-list-identifiers
2937 A use for this feature, is to remove a mailing list identifier tag in
2938 the subject fields of articles.   E.g. if the news group
2939 @samp{nntp+news.gnus.org:gmane.text.docbook.apps} has the tag
2940 @samp{DOC-BOOK-APPS:} in the subject of all articles, this tag can be
2941 removed from the article subjects in the summary buffer for the group by
2942 putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group
2943 parameters for the group.
2944
2945
2946 This can also be used as a group-specific hook function, if you'd like.
2947 If you want to hear a beep when you enter a group, you could put
2948 something like @code{(dummy-variable (ding))} in the parameters of that
2949 group.  @code{dummy-variable} will be set to the result of the
2950 @code{(ding)} form, but who cares?
2951
2952 @end table
2953
2954 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2955 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2956 presents you with a Customize-like interface.  The latter helps avoid
2957 silly Lisp errors.)  You might also be interested in reading about topic
2958 parameters (@pxref{Topic Parameters}).
2959
2960 Group parameters can be set via the @code{gnus-parameters} variable too.
2961 But some variables, such as @code{visible}, have no effect.  For
2962 example:
2963
2964 @example
2965 (setq gnus-parameters
2966       '(("mail\\..*"
2967          (gnus-show-threads nil)
2968          (gnus-use-scoring nil)
2969          (gnus-summary-line-format
2970           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
2971          (gcc-self . t)
2972          (display . all))
2973
2974         ("^nnimap:\\(foo.bar\\)$"
2975          (to-group . "\\1"))
2976
2977         ("mail\\.me"
2978          (gnus-use-scoring  t))
2979
2980         ("list\\..*"
2981          (total-expire . t)
2982          (broken-reply-to . t))))
2983 @end example
2984
2985 String value of parameters will be subjected to regexp substitution, as
2986 the @code{to-group} example shows.
2987
2988
2989 @node Listing Groups
2990 @section Listing Groups
2991 @cindex group listing
2992
2993 These commands all list various slices of the groups available.
2994
2995 @table @kbd
2996
2997 @item l
2998 @itemx A s
2999 @kindex A s (Group)
3000 @kindex l (Group)
3001 @findex gnus-group-list-groups
3002 List all groups that have unread articles
3003 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3004 command will list only groups of level ARG and lower.  By default, it
3005 only lists groups of level five (i. e.,
3006 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3007 groups).
3008
3009 @item L
3010 @itemx A u
3011 @kindex A u (Group)
3012 @kindex L (Group)
3013 @findex gnus-group-list-all-groups
3014 List all groups, whether they have unread articles or not
3015 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3016 this command will list only groups of level ARG and lower.  By default,
3017 it lists groups of level seven or lower (i.e., just subscribed and
3018 unsubscribed groups).
3019
3020 @item A l
3021 @kindex A l (Group)
3022 @findex gnus-group-list-level
3023 List all unread groups on a specific level
3024 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3025 with no unread articles.
3026
3027 @item A k
3028 @kindex A k (Group)
3029 @findex gnus-group-list-killed
3030 List all killed groups (@code{gnus-group-list-killed}).  If given a
3031 prefix argument, really list all groups that are available, but aren't
3032 currently (un)subscribed.  This could entail reading the active file
3033 from the server.
3034
3035 @item A z
3036 @kindex A z (Group)
3037 @findex gnus-group-list-zombies
3038 List all zombie groups (@code{gnus-group-list-zombies}).
3039
3040 @item A m
3041 @kindex A m (Group)
3042 @findex gnus-group-list-matching
3043 List all unread, subscribed groups with names that match a regexp
3044 (@code{gnus-group-list-matching}).
3045
3046 @item A M
3047 @kindex A M (Group)
3048 @findex gnus-group-list-all-matching
3049 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3050
3051 @item A A
3052 @kindex A A (Group)
3053 @findex gnus-group-list-active
3054 List absolutely all groups in the active file(s) of the
3055 server(s) you are connected to (@code{gnus-group-list-active}).  This
3056 might very well take quite a while.  It might actually be a better idea
3057 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3058 thing to match on.  Also note that this command may list groups that
3059 don't exist (yet)---these will be listed as if they were killed groups.
3060 Take the output with some grains of salt.
3061
3062 @item A a
3063 @kindex A a (Group)
3064 @findex gnus-group-apropos
3065 List all groups that have names that match a regexp
3066 (@code{gnus-group-apropos}).
3067
3068 @item A d
3069 @kindex A d (Group)
3070 @findex gnus-group-description-apropos
3071 List all groups that have names or descriptions that match a regexp
3072 (@code{gnus-group-description-apropos}).
3073
3074 @item A c
3075 @kindex A c (Group)
3076 @findex gnus-group-list-cached
3077 List all groups with cached articles (@code{gnus-group-list-cached}).
3078
3079 @item A ?
3080 @kindex A ? (Group)
3081 @findex gnus-group-list-dormant
3082 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3083
3084 @item A /
3085 @kindex A / (Group)
3086 @findex gnus-group-list-limit
3087 List groups limited within the current selection
3088 (@code{gnus-group-list-limit}).
3089
3090 @item A f
3091 @kindex A f (Group)
3092 @findex gnus-group-list-flush
3093 Flush groups from the current selection (@code{gnus-group-list-flush}).
3094
3095 @item A p
3096 @kindex A p (Group)
3097 @findex gnus-group-list-plus
3098 List groups plus the current selection (@code{gnus-group-list-plus}).
3099
3100 @end table
3101
3102 @vindex gnus-permanently-visible-groups
3103 @cindex visible group parameter
3104 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3105 always be shown, whether they have unread articles or not.  You can also
3106 add the @code{visible} element to the group parameters in question to
3107 get the same effect.
3108
3109 @vindex gnus-list-groups-with-ticked-articles
3110 Groups that have just ticked articles in it are normally listed in the
3111 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3112 @code{nil}, these groups will be treated just like totally empty
3113 groups.  It is @code{t} by default.
3114
3115
3116 @node Sorting Groups
3117 @section Sorting Groups
3118 @cindex sorting groups
3119
3120 @kindex C-c C-s (Group)
3121 @findex gnus-group-sort-groups
3122 @vindex gnus-group-sort-function
3123 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3124 group buffer according to the function(s) given by the
3125 @code{gnus-group-sort-function} variable.  Available sorting functions
3126 include:
3127
3128 @table @code
3129
3130 @item gnus-group-sort-by-alphabet
3131 @findex gnus-group-sort-by-alphabet
3132 Sort the group names alphabetically.  This is the default.
3133
3134 @item gnus-group-sort-by-real-name
3135 @findex gnus-group-sort-by-real-name
3136 Sort the group alphabetically on the real (unprefixed) group names.
3137
3138 @item gnus-group-sort-by-level
3139 @findex gnus-group-sort-by-level
3140 Sort by group level.
3141
3142 @item gnus-group-sort-by-score
3143 @findex gnus-group-sort-by-score
3144 Sort by group score.  @xref{Group Score}.
3145
3146 @item gnus-group-sort-by-rank
3147 @findex gnus-group-sort-by-rank
3148 Sort by group score and then the group level.  The level and the score
3149 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3150
3151 @item gnus-group-sort-by-unread
3152 @findex gnus-group-sort-by-unread
3153 Sort by number of unread articles.
3154
3155 @item gnus-group-sort-by-method
3156 @findex gnus-group-sort-by-method
3157 Sort alphabetically on the select method.
3158
3159 @item gnus-group-sort-by-server
3160 @findex gnus-group-sort-by-server
3161 Sort alphabetically on the Gnus server name.
3162
3163
3164 @end table
3165
3166 @code{gnus-group-sort-function} can also be a list of sorting
3167 functions.  In that case, the most significant sort key function must be
3168 the last one.
3169
3170
3171 There are also a number of commands for sorting directly according to
3172 some sorting criteria:
3173
3174 @table @kbd
3175 @item G S a
3176 @kindex G S a (Group)
3177 @findex gnus-group-sort-groups-by-alphabet
3178 Sort the group buffer alphabetically by group name
3179 (@code{gnus-group-sort-groups-by-alphabet}).
3180
3181 @item G S u
3182 @kindex G S u (Group)
3183 @findex gnus-group-sort-groups-by-unread
3184 Sort the group buffer by the number of unread articles
3185 (@code{gnus-group-sort-groups-by-unread}).
3186
3187 @item G S l
3188 @kindex G S l (Group)
3189 @findex gnus-group-sort-groups-by-level
3190 Sort the group buffer by group level
3191 (@code{gnus-group-sort-groups-by-level}).
3192
3193 @item G S v
3194 @kindex G S v (Group)
3195 @findex gnus-group-sort-groups-by-score
3196 Sort the group buffer by group score
3197 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3198
3199 @item G S r
3200 @kindex G S r (Group)
3201 @findex gnus-group-sort-groups-by-rank
3202 Sort the group buffer by group rank
3203 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3204
3205 @item G S m
3206 @kindex G S m (Group)
3207 @findex gnus-group-sort-groups-by-method
3208 Sort the group buffer alphabetically by back end name
3209 (@code{gnus-group-sort-groups-by-method}).
3210
3211 @item G S n
3212 @kindex G S n (Group)
3213 @findex gnus-group-sort-groups-by-real-name
3214 Sort the group buffer alphabetically by real (unprefixed) group name
3215 (@code{gnus-group-sort-groups-by-real-name}).
3216
3217 @end table
3218
3219 All the commands below obey the process/prefix convention
3220 (@pxref{Process/Prefix}).
3221
3222 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3223 commands will sort in reverse order.
3224
3225 You can also sort a subset of the groups:
3226
3227 @table @kbd
3228 @item G P a
3229 @kindex G P a (Group)
3230 @findex gnus-group-sort-selected-groups-by-alphabet
3231 Sort the groups alphabetically by group name
3232 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3233
3234 @item G P u
3235 @kindex G P u (Group)
3236 @findex gnus-group-sort-selected-groups-by-unread
3237 Sort the groups by the number of unread articles
3238 (@code{gnus-group-sort-selected-groups-by-unread}).
3239
3240 @item G P l
3241 @kindex G P l (Group)
3242 @findex gnus-group-sort-selected-groups-by-level
3243 Sort the groups by group level
3244 (@code{gnus-group-sort-selected-groups-by-level}).
3245
3246 @item G P v
3247 @kindex G P v (Group)
3248 @findex gnus-group-sort-selected-groups-by-score
3249 Sort the groups by group score
3250 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3251
3252 @item G P r
3253 @kindex G P r (Group)
3254 @findex gnus-group-sort-selected-groups-by-rank
3255 Sort the groups by group rank
3256 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3257
3258 @item G P m
3259 @kindex G P m (Group)
3260 @findex gnus-group-sort-selected-groups-by-method
3261 Sort the groups alphabetically by back end name
3262 (@code{gnus-group-sort-selected-groups-by-method}).
3263
3264 @item G P n
3265 @kindex G P n (Group)
3266 @findex gnus-group-sort-selected-groups-by-real-name
3267 Sort the groups alphabetically by real (unprefixed) group name
3268 (@code{gnus-group-sort-selected-groups-by-real-name}).
3269
3270 @item G P s
3271 @kindex G P s (Group)
3272 @findex gnus-group-sort-selected-groups
3273 Sort the groups according to @code{gnus-group-sort-function}.
3274
3275 @end table
3276
3277 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3278 move groups around.
3279
3280
3281 @node Group Maintenance
3282 @section Group Maintenance
3283 @cindex bogus groups
3284
3285 @table @kbd
3286 @item b
3287 @kindex b (Group)
3288 @findex gnus-group-check-bogus-groups
3289 Find bogus groups and delete them
3290 (@code{gnus-group-check-bogus-groups}).
3291
3292 @item F
3293 @kindex F (Group)
3294 @findex gnus-group-find-new-groups
3295 Find new groups and process them (@code{gnus-group-find-new-groups}).
3296 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3297 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3298 to query the server for new groups, and subscribe the new groups as
3299 zombies.
3300
3301 @item C-c C-x
3302 @kindex C-c C-x (Group)
3303 @findex gnus-group-expire-articles
3304 Run all expirable articles in the current group through the expiry
3305 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3306 all expirable articles in the group that have been around for a while.
3307 (@pxref{Expiring Mail}).
3308
3309 @item C-c C-M-x
3310 @kindex C-c C-M-x (Group)
3311 @findex gnus-group-expire-all-groups
3312 Run all expirable articles in all groups through the expiry process
3313 (@code{gnus-group-expire-all-groups}).
3314
3315 @end table
3316
3317
3318 @node Browse Foreign Server
3319 @section Browse Foreign Server
3320 @cindex foreign servers
3321 @cindex browsing servers
3322
3323 @table @kbd
3324 @item B
3325 @kindex B (Group)
3326 @findex gnus-group-browse-foreign-server
3327 You will be queried for a select method and a server name.  Gnus will
3328 then attempt to contact this server and let you browse the groups there
3329 (@code{gnus-group-browse-foreign-server}).
3330 @end table
3331
3332 @findex gnus-browse-mode
3333 A new buffer with a list of available groups will appear.  This buffer
3334 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3335 a lot) like a normal group buffer.
3336
3337 Here's a list of keystrokes available in the browse mode:
3338
3339 @table @kbd
3340 @item n
3341 @kindex n (Browse)
3342 @findex gnus-group-next-group
3343 Go to the next group (@code{gnus-group-next-group}).
3344
3345 @item p
3346 @kindex p (Browse)
3347 @findex gnus-group-prev-group
3348 Go to the previous group (@code{gnus-group-prev-group}).
3349
3350 @item SPACE
3351 @kindex SPACE (Browse)
3352 @findex gnus-browse-read-group
3353 Enter the current group and display the first article
3354 (@code{gnus-browse-read-group}).
3355
3356 @item RET
3357 @kindex RET (Browse)
3358 @findex gnus-browse-select-group
3359 Enter the current group (@code{gnus-browse-select-group}).
3360
3361 @item u
3362 @kindex u (Browse)
3363 @findex gnus-browse-unsubscribe-current-group
3364 Unsubscribe to the current group, or, as will be the case here,
3365 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3366
3367 @item l
3368 @itemx q
3369 @kindex q (Browse)
3370 @kindex l (Browse)
3371 @findex gnus-browse-exit
3372 Exit browse mode (@code{gnus-browse-exit}).
3373
3374 @item d
3375 @kindex d (Browse)
3376 @findex gnus-browse-describe-group
3377 Describe the current group (@code{gnus-browse-describe-group}).
3378
3379 @item ?
3380 @kindex ? (Browse)
3381 @findex gnus-browse-describe-briefly
3382 Describe browse mode briefly (well, there's not much to describe, is
3383 there) (@code{gnus-browse-describe-briefly}).
3384 @end table
3385
3386
3387 @node Exiting Gnus
3388 @section Exiting gnus
3389 @cindex exiting gnus
3390
3391 Yes, gnus is ex(c)iting.
3392
3393 @table @kbd
3394 @item z
3395 @kindex z (Group)
3396 @findex gnus-group-suspend
3397 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3398 but it kills all buffers except the Group buffer.  I'm not sure why this
3399 is a gain, but then who am I to judge?
3400
3401 @item q
3402 @kindex q (Group)
3403 @findex gnus-group-exit
3404 @c @icon{gnus-group-exit}
3405 Quit gnus (@code{gnus-group-exit}).
3406
3407 @item Q
3408 @kindex Q (Group)
3409 @findex gnus-group-quit
3410 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3411 The dribble file will be saved, though (@pxref{Auto Save}).
3412 @end table
3413
3414 @vindex gnus-exit-gnus-hook
3415 @vindex gnus-suspend-gnus-hook
3416 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3417 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3418 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3419 exiting gnus.
3420
3421 @findex gnus-unload
3422 @cindex unloading
3423 If you wish to completely unload gnus and all its adherents, you can use
3424 the @code{gnus-unload} command.  This command is also very handy when
3425 trying to customize meta-variables.
3426
3427 Note:
3428
3429 @quotation
3430 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3431 numbly heavy and herself fall into a hazy trance as the boy sitting
3432 behind her drew repeated lines with his pencil across the back of her
3433 plastic chair.
3434 @end quotation
3435
3436
3437 @node Group Topics
3438 @section Group Topics
3439 @cindex topics
3440
3441 If you read lots and lots of groups, it might be convenient to group
3442 them hierarchically according to topics.  You put your Emacs groups over
3443 here, your sex groups over there, and the rest (what, two groups or so?)
3444 you put in some misc section that you never bother with anyway.  You can
3445 even group the Emacs sex groups as a sub-topic to either the Emacs
3446 groups or the sex groups---or both!  Go wild!
3447
3448 @iftex
3449 @iflatex
3450 \gnusfigure{Group Topics}{400}{
3451 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3452 }
3453 @end iflatex
3454 @end iftex
3455
3456 Here's an example:
3457
3458 @example
3459 Gnus
3460   Emacs -- I wuw it!
3461      3: comp.emacs
3462      2: alt.religion.emacs
3463     Naughty Emacs
3464      452: alt.sex.emacs
3465        0: comp.talk.emacs.recovery
3466   Misc
3467      8: comp.binaries.fractals
3468     13: comp.sources.unix
3469 @end example
3470
3471 @findex gnus-topic-mode
3472 @kindex t (Group)
3473 To get this @emph{fab} functionality you simply turn on (ooh!) the
3474 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3475 is a toggling command.)
3476
3477 Go ahead, just try it.  I'll still be here when you get back.  La de
3478 dum...  Nice tune, that...  la la la...  What, you're back?  Yes, and
3479 now press @kbd{l}.  There.  All your groups are now listed under
3480 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
3481 bothered?
3482
3483 If you want this permanently enabled, you should add that minor mode to
3484 the hook for the group mode.  Put the following line in your
3485 @file{~/.gnus} file:
3486
3487 @lisp
3488 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3489 @end lisp
3490
3491 @menu
3492 * Topic Commands::              Interactive E-Z commands.
3493 * Topic Variables::             How to customize the topics the Lisp Way.
3494 * Topic Sorting::               Sorting each topic individually.
3495 * Topic Topology::              A map of the world.
3496 * Topic Parameters::            Parameters that apply to all groups in a topic.
3497 @end menu
3498
3499
3500 @node Topic Commands
3501 @subsection Topic Commands
3502 @cindex topic commands
3503
3504 When the topic minor mode is turned on, a new @kbd{T} submap will be
3505 available.  In addition, a few of the standard keys change their
3506 definitions slightly.
3507
3508 In general, the following kinds of operations are possible on topics.
3509 First of all, you want to create topics.  Secondly, you want to put
3510 groups in topics and to move them around until you have an order you
3511 like.  The third kind of operation is to show/hide parts of the whole
3512 shebang.  You might want to hide a topic including its subtopics and
3513 groups, to get a better overview of the other groups.
3514
3515 Here is a list of the basic keys that you might need to set up topics
3516 the way you like.
3517
3518 @table @kbd
3519
3520 @item T n
3521 @kindex T n (Topic)
3522 @findex gnus-topic-create-topic
3523 Prompt for a new topic name and create it
3524 (@code{gnus-topic-create-topic}).
3525
3526 @item T TAB
3527 @itemx TAB
3528 @kindex T TAB (Topic)
3529 @kindex TAB (Topic)
3530 @findex gnus-topic-indent
3531 ``Indent'' the current topic so that it becomes a sub-topic of the
3532 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3533 ``un-indent'' the topic instead.
3534
3535 @item M-TAB
3536 @kindex M-TAB (Topic)
3537 @findex gnus-topic-unindent
3538 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3539 parent of its current parent (@code{gnus-topic-unindent}).
3540
3541 @end table
3542
3543 The following two keys can be used to move groups and topics around.
3544 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3545 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3546 kill and yank rather than cut and paste.
3547
3548 @table @kbd
3549
3550 @item C-k
3551 @kindex C-k (Topic)
3552 @findex gnus-topic-kill-group
3553 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3554 topic will be removed along with the topic.
3555
3556 @item C-y
3557 @kindex C-y (Topic)
3558 @findex gnus-topic-yank-group
3559 Yank the previously killed group or topic
3560 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3561 before all groups.
3562
3563 So, to move a topic to the beginning of the list of topics, just hit
3564 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3565 move the cursor to the beginning of the buffer (just below the `Gnus'
3566 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3567 paste.  Like I said -- E-Z.
3568
3569 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3570 you can move topics around as well as groups.
3571
3572 @end table
3573
3574 After setting up the topics the way you like them, you might wish to
3575 hide a topic, or to show it again.  That's why we have the following
3576 key.
3577
3578 @table @kbd
3579
3580 @item RET
3581 @kindex RET (Topic)
3582 @findex gnus-topic-select-group
3583 @itemx SPACE
3584 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3585 When you perform this command on a group, you'll enter the group, as
3586 usual.  When done on a topic line, the topic will be folded (if it was
3587 visible) or unfolded (if it was folded already).  So it's basically a
3588 toggling command on topics.  In addition, if you give a numerical
3589 prefix, group on that level (and lower) will be displayed.
3590
3591 @end table
3592
3593 Now for a list of other commands, in no particular order.
3594
3595 @table @kbd
3596
3597 @item T m
3598 @kindex T m (Topic)
3599 @findex gnus-topic-move-group
3600 Move the current group to some other topic
3601 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3602 convention (@pxref{Process/Prefix}).
3603
3604 @item T j
3605 @kindex T j (Topic)
3606 @findex gnus-topic-jump-to-topic
3607 Go to a topic (@code{gnus-topic-jump-to-topic}).
3608
3609 @item T c
3610 @kindex T c (Topic)
3611 @findex gnus-topic-copy-group
3612 Copy the current group to some other topic
3613 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3614 convention (@pxref{Process/Prefix}).
3615
3616 @item T h
3617 @kindex T h (Topic)
3618 @findex gnus-topic-hide-topic
3619 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3620 a prefix, hide the topic permanently.
3621
3622 @item T s
3623 @kindex T s (Topic)
3624 @findex gnus-topic-show-topic
3625 Show the current topic (@code{gnus-topic-show-topic}).  If given
3626 a prefix, show the topic permanently.
3627
3628 @item T D
3629 @kindex T D (Topic)
3630 @findex gnus-topic-remove-group
3631 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3632 This command is mainly useful if you have the same group in several
3633 topics and wish to remove it from one of the topics.  You may also
3634 remove a group from all topics, but in that case, Gnus will add it to
3635 the root topic the next time you start Gnus.  In fact, all new groups
3636 (which, naturally, don't belong to any topic) will show up in the root
3637 topic.
3638
3639 This command uses the process/prefix convention
3640 (@pxref{Process/Prefix}).
3641
3642 @item T M
3643 @kindex T M (Topic)
3644 @findex gnus-topic-move-matching
3645 Move all groups that match some regular expression to a topic
3646 (@code{gnus-topic-move-matching}).
3647
3648 @item T C
3649 @kindex T C (Topic)
3650 @findex gnus-topic-copy-matching
3651 Copy all groups that match some regular expression to a topic
3652 (@code{gnus-topic-copy-matching}).
3653
3654 @item T H
3655 @kindex T H (Topic)
3656 @findex gnus-topic-toggle-display-empty-topics
3657 Toggle hiding empty topics
3658 (@code{gnus-topic-toggle-display-empty-topics}).
3659
3660 @item T #
3661 @kindex T # (Topic)
3662 @findex gnus-topic-mark-topic
3663 Mark all groups in the current topic with the process mark
3664 (@code{gnus-topic-mark-topic}).
3665
3666 @item T M-#
3667 @kindex T M-# (Topic)
3668 @findex gnus-topic-unmark-topic
3669 Remove the process mark from all groups in the current topic
3670 (@code{gnus-topic-unmark-topic}).
3671
3672 @item C-c C-x
3673 @kindex C-c C-x (Topic)
3674 @findex gnus-topic-expire-articles
3675 Run all expirable articles in the current group or topic through the
3676 expiry process (if any)
3677 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3678
3679 @item T r
3680 @kindex T r (Topic)
3681 @findex gnus-topic-rename
3682 Rename a topic (@code{gnus-topic-rename}).
3683
3684 @item T DEL
3685 @kindex T DEL (Topic)
3686 @findex gnus-topic-delete
3687 Delete an empty topic (@code{gnus-topic-delete}).
3688
3689 @item A T
3690 @kindex A T (Topic)
3691 @findex gnus-topic-list-active
3692 List all groups that gnus knows about in a topics-ified way
3693 (@code{gnus-topic-list-active}).
3694
3695 @item T M-n
3696 @kindex T M-n (Topic)
3697 @findex gnus-topic-goto-next-topic
3698 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3699
3700 @item T M-p
3701 @kindex T M-p (Topic)
3702 @findex gnus-topic-goto-previous-topic
3703 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3704
3705 @item G p
3706 @kindex G p (Topic)
3707 @findex gnus-topic-edit-parameters
3708 @cindex group parameters
3709 @cindex topic parameters
3710 @cindex parameters
3711 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3712 @xref{Topic Parameters}.
3713
3714 @end table
3715
3716
3717 @node Topic Variables
3718 @subsection Topic Variables
3719 @cindex topic variables
3720
3721 The previous section told you how to tell Gnus which topics to display.
3722 This section explains how to tell Gnus what to display about each topic.
3723
3724 @vindex gnus-topic-line-format
3725 The topic lines themselves are created according to the
3726 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3727 Valid elements are:
3728
3729 @table @samp
3730 @item i
3731 Indentation.
3732 @item n
3733 Topic name.
3734 @item v
3735 Visibility.
3736 @item l
3737 Level.
3738 @item g
3739 Number of groups in the topic.
3740 @item a
3741 Number of unread articles in the topic.
3742 @item A
3743 Number of unread articles in the topic and all its subtopics.
3744 @end table
3745
3746 @vindex gnus-topic-indent-level
3747 Each sub-topic (and the groups in the sub-topics) will be indented with
3748 @code{gnus-topic-indent-level} times the topic level number of spaces.
3749 The default is 2.
3750
3751 @vindex gnus-topic-mode-hook
3752 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3753
3754 @vindex gnus-topic-display-empty-topics
3755 The @code{gnus-topic-display-empty-topics} says whether to display even
3756 topics that have no unread articles in them.  The default is @code{t}.
3757
3758
3759 @node Topic Sorting
3760 @subsection Topic Sorting
3761 @cindex topic sorting
3762
3763 You can sort the groups in each topic individually with the following
3764 commands:
3765
3766
3767 @table @kbd
3768 @item T S a
3769 @kindex T S a (Topic)
3770 @findex gnus-topic-sort-groups-by-alphabet
3771 Sort the current topic alphabetically by group name
3772 (@code{gnus-topic-sort-groups-by-alphabet}).
3773
3774 @item T S u
3775 @kindex T S u (Topic)
3776 @findex gnus-topic-sort-groups-by-unread
3777 Sort the current topic by the number of unread articles
3778 (@code{gnus-topic-sort-groups-by-unread}).
3779
3780 @item T S l
3781 @kindex T S l (Topic)
3782 @findex gnus-topic-sort-groups-by-level
3783 Sort the current topic by group level
3784 (@code{gnus-topic-sort-groups-by-level}).
3785
3786 @item T S v
3787 @kindex T S v (Topic)
3788 @findex gnus-topic-sort-groups-by-score
3789 Sort the current topic by group score
3790 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3791
3792 @item T S r
3793 @kindex T S r (Topic)
3794 @findex gnus-topic-sort-groups-by-rank
3795 Sort the current topic by group rank
3796 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3797
3798 @item T S m
3799 @kindex T S m (Topic)
3800 @findex gnus-topic-sort-groups-by-method
3801 Sort the current topic alphabetically by back end name
3802 (@code{gnus-topic-sort-groups-by-method}).
3803
3804 @item T S e
3805 @kindex T S e (Topic)
3806 @findex gnus-topic-sort-groups-by-server
3807 Sort the current topic alphabetically by server name
3808 (@code{gnus-topic-sort-groups-by-server}).
3809
3810 @item T S s
3811 @kindex T S s
3812 @findex gnus-topic-sort-groups
3813 Sort the current topic according to the function(s) given by the
3814 @code{gnus-group-sort-function} variable
3815 (@code{gnus-topic-sort-groups}).
3816
3817 @end table
3818
3819 When given a prefix argument, all these commands will sort in reverse
3820 order.  @xref{Sorting Groups}, for more information about group
3821 sorting.
3822
3823
3824 @node Topic Topology
3825 @subsection Topic Topology
3826 @cindex topic topology
3827 @cindex topology
3828
3829 So, let's have a look at an example group buffer:
3830
3831 @example
3832 Gnus
3833   Emacs -- I wuw it!
3834      3: comp.emacs
3835      2: alt.religion.emacs
3836     Naughty Emacs
3837      452: alt.sex.emacs
3838        0: comp.talk.emacs.recovery
3839   Misc
3840      8: comp.binaries.fractals
3841     13: comp.sources.unix
3842 @end example
3843
3844 So, here we have one top-level topic (@samp{Gnus}), two topics under
3845 that, and one sub-topic under one of the sub-topics.  (There is always
3846 just one (1) top-level topic).  This topology can be expressed as
3847 follows:
3848
3849 @lisp
3850 (("Gnus" visible)
3851  (("Emacs -- I wuw it!" visible)
3852   (("Naughty Emacs" visible)))
3853  (("Misc" visible)))
3854 @end lisp
3855
3856 @vindex gnus-topic-topology
3857 This is in fact how the variable @code{gnus-topic-topology} would look
3858 for the display above.  That variable is saved in the @file{.newsrc.eld}
3859 file, and shouldn't be messed with manually---unless you really want
3860 to.  Since this variable is read from the @file{.newsrc.eld} file,
3861 setting it in any other startup files will have no effect.
3862
3863 This topology shows what topics are sub-topics of what topics (right),
3864 and which topics are visible.  Two settings are currently
3865 allowed---@code{visible} and @code{invisible}.
3866
3867
3868 @node Topic Parameters
3869 @subsection Topic Parameters
3870 @cindex topic parameters
3871
3872 All groups in a topic will inherit group parameters from the parent (and
3873 ancestor) topic parameters.  All valid group parameters are valid topic
3874 parameters (@pxref{Group Parameters}).
3875
3876 In addition, the following parameters are only valid as topic
3877 parameters:
3878
3879 @table @code
3880 @item subscribe
3881 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3882 @code{subscribe} topic parameter says what groups go in what topic.  Its
3883 value should be a regexp to match the groups that should go in that
3884 topic.
3885
3886 @item subscribe-level
3887 When subscribing new groups by topic (see the @code{subscribe} parameter),
3888 the group will be subscribed with the level specified in the
3889 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3890
3891 @end table
3892
3893 Group parameters (of course) override topic parameters, and topic
3894 parameters in sub-topics override topic parameters in super-topics.  You
3895 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3896 verb, although you may feel free to disagree with me here.)
3897
3898 @example
3899 Gnus
3900   Emacs
3901      3: comp.emacs
3902      2: alt.religion.emacs
3903    452: alt.sex.emacs
3904     Relief
3905      452: alt.sex.emacs
3906        0: comp.talk.emacs.recovery
3907   Misc
3908      8: comp.binaries.fractals
3909     13: comp.sources.unix
3910    452: alt.sex.emacs
3911 @end example
3912
3913 The @samp{Emacs} topic has the topic parameter @code{(score-file
3914 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3915 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3916 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3917 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3918 . "religion.SCORE")}.
3919
3920 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3921 will get the @file{relief.SCORE} home score file.  If you enter the same
3922 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3923 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3924 get the @file{religion.SCORE} home score file.
3925
3926 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3927 there are some problems, especially with the @code{total-expiry}
3928 parameter.  Say you have a mail group in two topics; one with
3929 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3930 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3931 of these topics you mean to expire articles from, so anything may
3932 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3933 happens.  You just have to be careful if you do stuff like that.
3934
3935
3936 @node Misc Group Stuff
3937 @section Misc Group Stuff
3938
3939 @menu
3940 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3941 * Group Information::           Information and help on groups and Gnus.
3942 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3943 * File Commands::               Reading and writing the Gnus files.
3944 * Sieve Commands::              Managing Sieve scripts.
3945 @end menu
3946
3947 @table @kbd
3948
3949 @item ^
3950 @kindex ^ (Group)
3951 @findex gnus-group-enter-server-mode
3952 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3953 @xref{Server Buffer}.
3954
3955 @item a
3956 @kindex a (Group)
3957 @findex gnus-group-post-news
3958 Start composing a message (a news by default)
3959 (@code{gnus-group-post-news}).  If given a prefix, post to the group
3960 under the point.  If the prefix is 1, prompt for a group to post to.
3961 Contrary to what the name of this function suggests, the prepared
3962 article might be a mail instead of a news, if a mail group is specified
3963 with the prefix argument.  @xref{Composing Messages}.
3964
3965 @item m
3966 @kindex m (Group)
3967 @findex gnus-group-mail
3968 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
3969 use the posting style of the group under the point.  If the prefix is 1,
3970 prompt for a group name to find the posting style.
3971 @xref{Composing Messages}.
3972
3973 @item i
3974 @kindex i (Group)
3975 @findex gnus-group-news
3976 Start composing a news (@code{gnus-group-news}).  If given a prefix,
3977 post to the group under the point.  If the prefix is 1, prompt
3978 for group to post to.  @xref{Composing Messages}.
3979
3980 This function actually prepares a news even when using mail groups.
3981 This is useful for "posting" messages to mail groups without actually
3982 sending them over the network: they're just saved directly to the group
3983 in question.  The corresponding back end must have a request-post method
3984 for this to work though.
3985
3986 @end table
3987
3988 Variables for the group buffer:
3989
3990 @table @code
3991
3992 @item gnus-group-mode-hook
3993 @vindex gnus-group-mode-hook
3994 is called after the group buffer has been
3995 created.
3996
3997 @item gnus-group-prepare-hook
3998 @vindex gnus-group-prepare-hook
3999 is called after the group buffer is
4000 generated.  It may be used to modify the buffer in some strange,
4001 unnatural way.
4002
4003 @item gnus-group-prepared-hook
4004 @vindex gnus-group-prepare-hook
4005 is called as the very last thing after the group buffer has been
4006 generated.  It may be used to move point around, for instance.
4007
4008 @item gnus-permanently-visible-groups
4009 @vindex gnus-permanently-visible-groups
4010 Groups matching this regexp will always be listed in the group buffer,
4011 whether they are empty or not.
4012
4013 @item gnus-group-name-charset-method-alist
4014 @vindex gnus-group-name-charset-method-alist
4015 An alist of method and the charset for group names. It is used to show
4016 non-ASCII group names.
4017
4018 For example:
4019 @lisp
4020 (setq gnus-group-name-charset-method-alist
4021     '(((nntp "news.com.cn") . cn-gb-2312)))
4022 @end lisp
4023
4024 @item gnus-group-name-charset-group-alist
4025 @cindex UTF-8 group names
4026 @vindex gnus-group-name-charset-group-alist
4027 An alist of regexp of group name and the charset for group names.  It
4028 is used to show non-ASCII group names.  @code{((".*" utf-8))} is the
4029 default value if UTF-8 is supported, otherwise the default is nil.
4030
4031 For example:
4032 @lisp
4033 (setq gnus-group-name-charset-group-alist
4034     '(("\\.com\\.cn:" . cn-gb-2312)))
4035 @end lisp
4036
4037 @end table
4038
4039 @node Scanning New Messages
4040 @subsection Scanning New Messages
4041 @cindex new messages
4042 @cindex scanning new news
4043
4044 @table @kbd
4045
4046 @item g
4047 @kindex g (Group)
4048 @findex gnus-group-get-new-news
4049 @c @icon{gnus-group-get-new-news}
4050 Check the server(s) for new articles.  If the numerical prefix is used,
4051 this command will check only groups of level @var{arg} and lower
4052 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4053 command will force a total re-reading of the active file(s) from the
4054 back end(s).
4055
4056 @item M-g
4057 @kindex M-g (Group)
4058 @findex gnus-group-get-new-news-this-group
4059 @vindex gnus-goto-next-group-when-activating
4060 @c @icon{gnus-group-get-new-news-this-group}
4061 Check whether new articles have arrived in the current group
4062 (@code{gnus-group-get-new-news-this-group}).
4063 @code{gnus-goto-next-group-when-activating} says whether this command is
4064 to move point to the next group or not.  It is @code{t} by default.
4065
4066 @findex gnus-activate-all-groups
4067 @cindex activating groups
4068 @item C-c M-g
4069 @kindex C-c M-g (Group)
4070 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4071
4072 @item R
4073 @kindex R (Group)
4074 @cindex restarting
4075 @findex gnus-group-restart
4076 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4077 file(s), closes the connection to all servers, clears up all run-time
4078 gnus variables, and then starts gnus all over again.
4079
4080 @end table
4081
4082 @vindex gnus-get-new-news-hook
4083 @code{gnus-get-new-news-hook} is run just before checking for new news.
4084
4085 @vindex gnus-after-getting-new-news-hook
4086 @code{gnus-after-getting-new-news-hook} is run after checking for new
4087 news.
4088
4089
4090 @node Group Information
4091 @subsection Group Information
4092 @cindex group information
4093 @cindex information on groups
4094
4095 @table @kbd
4096
4097
4098 @item H f
4099 @kindex H f (Group)
4100 @findex gnus-group-fetch-faq
4101 @vindex gnus-group-faq-directory
4102 @cindex FAQ
4103 @cindex ange-ftp
4104 Try to fetch the FAQ for the current group
4105 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
4106 @code{gnus-group-faq-directory}, which is usually a directory on a
4107 remote machine.  This variable can also be a list of directories.  In
4108 that case, giving a prefix to this command will allow you to choose
4109 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
4110 for fetching the file.
4111
4112 If fetching from the first site is unsuccessful, gnus will attempt to go
4113 through @code{gnus-group-faq-directory} and try to open them one by one.
4114
4115 @item H c
4116 @kindex H c (Group)
4117 @findex gnus-group-fetch-charter
4118 @vindex gnus-group-charter-alist
4119 @cindex charter
4120 Try to open the charter for the current group in a web browser
4121 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4122 prefix argument.
4123
4124 Gnus will use @code{gnus-group-charter-alist} to find the location of
4125 the charter.  If no location is known, Gnus will fetch the control
4126 messages for the group, which in some cases includes the charter.
4127
4128 @item H C
4129 @kindex H C (Group)
4130 @findex gnus-group-fetch-control
4131 @vindex gnus-group-fetch-control-use-browse-url
4132 @cindex control message
4133 Fetch the control messages for the group from the archive at
4134 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4135 group if given a prefix argument.
4136
4137 If @code{gnus-group-fetch-control-use-browse-url} is non-nil, Gnus
4138 will open the control messages in a browser using @code{browse-url}.
4139 Otherwise they are fetched using @code{ange-ftp} and displayed in an
4140 ephemeral group.
4141
4142 Note that the control messages are compressed.  To use this command
4143 you need to turn on @code{auto-compression-mode}
4144 (@pxref{(emacs)Compressed Files}).
4145
4146 @item H d
4147 @itemx C-c C-d
4148 @c @icon{gnus-group-describe-group}
4149 @kindex H d (Group)
4150 @kindex C-c C-d (Group)
4151 @cindex describing groups
4152 @cindex group description
4153 @findex gnus-group-describe-group
4154 Describe the current group (@code{gnus-group-describe-group}).  If given
4155 a prefix, force Gnus to re-read the description from the server.
4156
4157 @item M-d
4158 @kindex M-d (Group)
4159 @findex gnus-group-describe-all-groups
4160 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4161 prefix, force gnus to re-read the description file from the server.
4162
4163 @item H v
4164 @itemx V
4165 @kindex V (Group)
4166 @kindex H v (Group)
4167 @cindex version
4168 @findex gnus-version
4169 Display current gnus version numbers (@code{gnus-version}).
4170
4171 @item ?
4172 @kindex ? (Group)
4173 @findex gnus-group-describe-briefly
4174 Give a very short help message (@code{gnus-group-describe-briefly}).
4175
4176 @item C-c C-i
4177 @kindex C-c C-i (Group)
4178 @cindex info
4179 @cindex manual
4180 @findex gnus-info-find-node
4181 Go to the gnus info node (@code{gnus-info-find-node}).
4182 @end table
4183
4184
4185 @node Group Timestamp
4186 @subsection Group Timestamp
4187 @cindex timestamps
4188 @cindex group timestamps
4189
4190 It can be convenient to let gnus keep track of when you last read a
4191 group.  To set the ball rolling, you should add
4192 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4193
4194 @lisp
4195 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4196 @end lisp
4197
4198 After doing this, each time you enter a group, it'll be recorded.
4199
4200 This information can be displayed in various ways---the easiest is to
4201 use the @samp{%d} spec in the group line format:
4202
4203 @lisp
4204 (setq gnus-group-line-format
4205       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4206 @end lisp
4207
4208 This will result in lines looking like:
4209
4210 @example
4211 *        0: mail.ding                                19961002T012943
4212          0: custom                                   19961002T012713
4213 @end example
4214
4215 As you can see, the date is displayed in compact ISO 8601 format.  This
4216 may be a bit too much, so to just display the date, you could say
4217 something like:
4218
4219 @lisp
4220 (setq gnus-group-line-format
4221       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4222 @end lisp
4223
4224 If you would like greater control of the time format, you can use a
4225 user-defined format spec.  Something like the following should do the
4226 trick:
4227
4228 @lisp
4229 (setq gnus-group-line-format
4230       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4231 (defun gnus-user-format-function-d (headers)
4232   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4233     (if time
4234         (format-time-string "%b %d  %H:%M" time)
4235       "")))
4236 @end lisp
4237
4238
4239 @node File Commands
4240 @subsection File Commands
4241 @cindex file commands
4242
4243 @table @kbd
4244
4245 @item r
4246 @kindex r (Group)
4247 @findex gnus-group-read-init-file
4248 @vindex gnus-init-file
4249 @cindex reading init file
4250 Re-read the init file (@code{gnus-init-file}, which defaults to
4251 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
4252
4253 @item s
4254 @kindex s (Group)
4255 @findex gnus-group-save-newsrc
4256 @cindex saving .newsrc
4257 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4258 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4259 file(s) whether Gnus thinks it is necessary or not.
4260
4261 @c @item Z
4262 @c @kindex Z (Group)
4263 @c @findex gnus-group-clear-dribble
4264 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4265
4266 @end table
4267
4268
4269 @node Sieve Commands
4270 @subsection Sieve Commands
4271 @cindex group sieve commands
4272
4273 Sieve is a server-side mail filtering language.  In Gnus you can use
4274 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4275 sieve rules that should apply to each group.  Gnus provides two
4276 commands to translate all these group parameters into a proper Sieve
4277 script that can be transfered to the server somehow.
4278
4279 @vindex gnus-sieve-file
4280 @vindex gnus-sieve-region-start
4281 @vindex gnus-sieve-region-end
4282 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4283 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4284 between two delimiters, @code{gnus-sieve-region-start} and
4285 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4286 outside these delimiters that will not be removed the next time you
4287 regenerate the Sieve script.
4288
4289 @vindex gnus-sieve-crosspost
4290 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4291 is generated.  If it is non-nil (the default) articles is placed in
4292 all groups that have matching rules, otherwise the article is only
4293 placed in the group with the first matching rule.  For example, the
4294 group parameter @samp{(sieve address "sender"
4295 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4296 code if @code{gnus-sieve-crosspost} is nil. (When
4297 @code{gnus-sieve-crosspost} is non-nil, it looks the same except that
4298 the line containing the call to @code{stop} is removed.)
4299
4300 @example
4301 if address "sender" "owner-ding@@hpc.uh.edu" @{
4302         fileinto "INBOX.ding";
4303         stop;
4304 @}
4305 @end example
4306
4307 @xref{Top, ,Top, sieve, Emacs Sieve}.
4308
4309 @table @kbd
4310
4311 @item D g
4312 @kindex D g (Group)
4313 @findex gnus-sieve-generate
4314 @vindex gnus-sieve-file
4315 @cindex generating sieve script
4316 Regenerate a Sieve script from the @code{sieve} group parameters and
4317 put you into the @code{gnus-sieve-file} without saving it.
4318
4319 @item D u
4320 @kindex D u (Group)
4321 @findex gnus-sieve-update
4322 @vindex gnus-sieve-file
4323 @cindex updating sieve script
4324 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4325 @code{sieve} group parameters, save the file and upload it to the
4326 server using the @code{sieveshell} program.
4327
4328 @end table
4329
4330
4331 @node Summary Buffer
4332 @chapter Summary Buffer
4333 @cindex summary buffer
4334
4335 A line for each article is displayed in the summary buffer.  You can
4336 move around, read articles, post articles and reply to articles.
4337
4338 The most common way to a summary buffer is to select a group from the
4339 group buffer (@pxref{Selecting a Group}).
4340
4341 You can have as many summary buffers open as you wish.
4342
4343 @menu
4344 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4345 * Summary Maneuvering::         Moving around the summary buffer.
4346 * Choosing Articles::           Reading articles.
4347 * Paging the Article::          Scrolling the current article.
4348 * Reply Followup and Post::     Posting articles.
4349 * Delayed Articles::            Send articles at a later time.
4350 * Marking Articles::            Marking articles as read, expirable, etc.
4351 * Limiting::                    You can limit the summary buffer.
4352 * Threading::                   How threads are made.
4353 * Sorting the Summary Buffer::  How articles and threads are sorted.
4354 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4355 * Article Caching::             You may store articles in a cache.
4356 * Persistent Articles::         Making articles expiry-resistant.
4357 * Article Backlog::             Having already read articles hang around.
4358 * Saving Articles::             Ways of customizing article saving.
4359 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4360 * Article Treatment::           The article buffer can be mangled at will.
4361 * MIME Commands::               Doing MIMEy things with the articles.
4362 * Charsets::                    Character set issues.
4363 * Article Commands::            Doing various things with the article buffer.
4364 * Summary Sorting::             Sorting the summary buffer in various ways.
4365 * Finding the Parent::          No child support? Get the parent.
4366 * Alternative Approaches::      Reading using non-default summaries.
4367 * Tree Display::                A more visual display of threads.
4368 * Mail Group Commands::         Some commands can only be used in mail groups.
4369 * Various Summary Stuff::       What didn't fit anywhere else.
4370 * Exiting the Summary Buffer::  Returning to the Group buffer,
4371                                 or reselecting the current group.
4372 * Crosspost Handling::          How crossposted articles are dealt with.
4373 * Duplicate Suppression::       An alternative when crosspost handling fails.
4374 * Security::                    Decrypt and Verify.
4375 * Mailing List::                Mailing list minor mode.
4376 @end menu
4377
4378
4379 @node Summary Buffer Format
4380 @section Summary Buffer Format
4381 @cindex summary buffer format
4382
4383 @iftex
4384 @iflatex
4385 \gnusfigure{The Summary Buffer}{180}{
4386 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4387 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4388 }
4389 @end iflatex
4390 @end iftex
4391
4392 @menu
4393 * Summary Buffer Lines::        You can specify how summary lines should look.
4394 * To From Newsgroups::          How to not display your own name.
4395 * Summary Buffer Mode Line::    You can say how the mode line should look.
4396 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4397 @end menu
4398
4399 @findex mail-extract-address-components
4400 @findex gnus-extract-address-components
4401 @vindex gnus-extract-address-components
4402 Gnus will use the value of the @code{gnus-extract-address-components}
4403 variable as a function for getting the name and address parts of a
4404 @code{From} header.  Three pre-defined functions exist:
4405 @code{gnus-extract-address-components}, which is the default, quite
4406 fast, and too simplistic solution;
4407 @code{mail-extract-address-components}, which works nicely, but is
4408 slower; and @code{std11-extract-address-components}, which works very
4409 nicely, but is slower.  The default function will return the wrong
4410 answer in 5% of the cases.  If this is unacceptable to you, use the
4411 other function instead:
4412
4413 @lisp
4414 (setq gnus-extract-address-components
4415       'mail-extract-address-components)
4416 @end lisp
4417
4418 @vindex gnus-summary-same-subject
4419 @code{gnus-summary-same-subject} is a string indicating that the current
4420 article has the same subject as the previous.  This string will be used
4421 with those specs that require it.  The default is @code{""}.
4422
4423
4424 @node Summary Buffer Lines
4425 @subsection Summary Buffer Lines
4426
4427 @vindex gnus-summary-line-format
4428 You can change the format of the lines in the summary buffer by changing
4429 the @code{gnus-summary-line-format} variable.  It works along the same
4430 lines as a normal @code{format} string, with some extensions
4431 (@pxref{Formatting Variables}).
4432
4433 There should always be a colon or a point position marker on the line;
4434 the cursor always moves to the point position marker or the colon after
4435 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4436 possible to change this.  Just write a new function
4437 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4438 @xref{Positioning Point}.
4439
4440 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4441
4442 The following format specification characters and extended format
4443 specification(s) are understood:
4444
4445 @table @samp
4446 @item N
4447 Article number.
4448 @item S
4449 Subject string.  List identifiers stripped,
4450 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4451 @item s
4452 Subject if the article is the root of the thread or the previous article
4453 had a different subject, @code{gnus-summary-same-subject} otherwise.
4454 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4455 @item F
4456 Full @code{From} header.
4457 @item n
4458 The name (from the @code{From} header).
4459 @item f
4460 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4461 From Newsgroups}).
4462 @item a
4463 The name (from the @code{From} header).  This differs from the @code{n}
4464 spec in that it uses the function designated by the
4465 @code{gnus-extract-address-components} variable, which is slower, but
4466 may be more thorough.
4467 @item A
4468 The address (from the @code{From} header).  This works the same way as
4469 the @code{a} spec.
4470 @item L
4471 Number of lines in the article.
4472 @item c
4473 Number of characters in the article. This specifier is not supported
4474 in some methods (like nnfolder).
4475 @item k
4476 Pretty-printed version of the number of characters in the article;
4477 for example, @samp{1.2k} or @samp{0.4M}.
4478 @item I
4479 Indentation based on thread level (@pxref{Customizing Threading}).
4480 @item B
4481 A complex trn-style thread tree, showing response-connecting trace
4482 lines.
4483 @item T
4484 Nothing if the article is a root and lots of spaces if it isn't (it
4485 pushes everything after it off the screen).
4486 @item [
4487 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4488 for adopted articles (@pxref{Customizing Threading}).
4489 @item ]
4490 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4491 for adopted articles.
4492 @item >
4493 One space for each thread level.
4494 @item <
4495 Twenty minus thread level spaces.
4496 @item U
4497 Unread. @xref{Read Articles}.
4498
4499 @item R
4500 This misleadingly named specifier is the @dfn{secondary mark}.  This
4501 mark will say whether the article has been replied to, has been cached,
4502 or has been saved.  @xref{Other Marks}.
4503
4504 @item i
4505 Score as a number (@pxref{Scoring}).
4506 @item z
4507 @vindex gnus-summary-zcore-fuzz
4508 Zcore, @samp{+} if above the default level and @samp{-} if below the
4509 default level.  If the difference between
4510 @code{gnus-summary-default-score} and the score is less than
4511 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4512 @item V
4513 Total thread score.
4514 @item x
4515 @code{Xref}.
4516 @item D
4517 @code{Date}.
4518 @item d
4519 The @code{Date} in @code{DD-MMM} format.
4520 @item o
4521 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4522 @item M
4523 @code{Message-ID}.
4524 @item r
4525 @code{References}.
4526 @item t
4527 Number of articles in the current sub-thread.  Using this spec will slow
4528 down summary buffer generation somewhat.
4529 @item e
4530 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4531 article has any children.
4532 @item P
4533 The line number.
4534 @item O
4535 Download mark.
4536 @item &user-date;
4537 Age sensitive date format.  Various date format is defined in
4538 @code{gnus-user-date-format-alist}.
4539 @item u
4540 User defined specifier.  The next character in the format string should
4541 be a letter.  Gnus will call the function
4542 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4543 following @samp{%u}.  The function will be passed the current header as
4544 argument.  The function should return a string, which will be inserted
4545 into the summary just like information from any other summary specifier.
4546 @end table
4547
4548 Text between @samp{%(} and @samp{%)} will be highlighted with
4549 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4550 There can only be one such area.
4551
4552 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4553 have to be handled with care.  For reasons of efficiency, gnus will
4554 compute what column these characters will end up in, and ``hard-code''
4555 that.  This means that it is invalid to have these specs after a
4556 variable-length spec.  Well, you might not be arrested, but your summary
4557 buffer will look strange, which is bad enough.
4558
4559 The smart choice is to have these specs as far to the left as possible.
4560 (Isn't that the case with everything, though?  But I digress.)
4561
4562 This restriction may disappear in later versions of gnus.
4563
4564
4565 @node To From Newsgroups
4566 @subsection To From Newsgroups
4567 @cindex To
4568 @cindex Newsgroups
4569
4570 In some groups (particularly in archive groups), the @code{From} header
4571 isn't very interesting, since all the articles there are written by
4572 you.  To display the information in the @code{To} or @code{Newsgroups}
4573 headers instead, you need to decide three things: What information to
4574 gather; where to display it; and when to display it.
4575
4576 @enumerate
4577 @item
4578 @vindex gnus-extra-headers
4579 The reading of extra header information is controlled by the
4580 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4581 instance:
4582
4583 @lisp
4584 (setq gnus-extra-headers
4585       '(To Newsgroups X-Newsreader))
4586 @end lisp
4587
4588 This will result in Gnus trying to obtain these three headers, and
4589 storing it in header structures for later easy retrieval.
4590
4591 @item
4592 @findex gnus-extra-header
4593 The value of these extra headers can be accessed via the
4594 @code{gnus-extra-header} function.  Here's a format line spec that will
4595 access the @code{X-Newsreader} header:
4596
4597 @example
4598 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4599 @end example
4600
4601 @item
4602 @vindex gnus-ignored-from-addresses
4603 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4604 summary line spec returns the @code{To}, @code{Newsreader} or
4605 @code{From} header.  If this regexp matches the contents of the
4606 @code{From} header, the value of the @code{To} or @code{Newsreader}
4607 headers are used instead.
4608
4609 @end enumerate
4610
4611 @vindex nnmail-extra-headers
4612 A related variable is @code{nnmail-extra-headers}, which controls when
4613 to include extra headers when generating overview (@sc{nov}) files.  If
4614 you have old overview files, you should regenerate them after changing
4615 this variable, by entering the server buffer using `^', and then `g' on
4616 the appropriate mail server (e.g. nnml) to cause regeneration.
4617
4618 @vindex gnus-summary-line-format
4619 You also have to instruct Gnus to display the data by changing the
4620 @code{%n} spec to the @code{%f} spec in the
4621 @code{gnus-summary-line-format} variable.
4622
4623 In summary, you'd typically put something like the following in
4624 @file{~/.gnus}:
4625
4626 @lisp
4627 (setq gnus-extra-headers
4628       '(To Newsgroups))
4629 (setq nnmail-extra-headers gnus-extra-headers)
4630 (setq gnus-summary-line-format
4631       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4632 (setq gnus-ignored-from-addresses
4633       "Your Name Here")
4634 @end lisp
4635
4636 (The values listed above are the default values in Gnus.  Alter them
4637 to fit your needs.)
4638
4639 A note for news server administrators, or for users who wish to try to
4640 convince their news server administrator to provide some additional
4641 support:
4642
4643 The above is mostly useful for mail groups, where you have control over
4644 the @sc{nov} files that are created.  However, if you can persuade your
4645 nntp admin to add (in the usual implementation, notably INN):
4646
4647 @example
4648 Newsgroups:full
4649 @end example
4650
4651 to the end of her @file{overview.fmt} file, then you can use that just
4652 as you would the extra headers from the mail groups.
4653
4654
4655 @node Summary Buffer Mode Line
4656 @subsection Summary Buffer Mode Line
4657
4658 @vindex gnus-summary-mode-line-format
4659 You can also change the format of the summary mode bar (@pxref{Mode Line
4660 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4661 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4662
4663 Here are the elements you can play with:
4664
4665 @table @samp
4666 @item G
4667 Group name.
4668 @item p
4669 Unprefixed group name.
4670 @item A
4671 Current article number.
4672 @item z
4673 Current article score.
4674 @item V
4675 Gnus version.
4676 @item U
4677 Number of unread articles in this group.
4678 @item e
4679 Number of unread articles in this group that aren't displayed in the
4680 summary buffer.
4681 @item Z
4682 A string with the number of unread and unselected articles represented
4683 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4684 articles, and just as @samp{<%U more>} if there are just unread articles
4685 and no unselected ones.
4686 @item g
4687 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4688 shortened to @samp{r.a.anime}.
4689 @item S
4690 Subject of the current article.
4691 @item u
4692 User-defined spec (@pxref{User-Defined Specs}).
4693 @item s
4694 Name of the current score file (@pxref{Scoring}).
4695 @item d
4696 Number of dormant articles (@pxref{Unread Articles}).
4697 @item t
4698 Number of ticked articles (@pxref{Unread Articles}).
4699 @item r
4700 Number of articles that have been marked as read in this session.
4701 @item E
4702 Number of articles expunged by the score files.
4703 @end table
4704
4705
4706 @node Summary Highlighting
4707 @subsection Summary Highlighting
4708
4709 @table @code
4710
4711 @item gnus-visual-mark-article-hook
4712 @vindex gnus-visual-mark-article-hook
4713 This hook is run after selecting an article.  It is meant to be used for
4714 highlighting the article in some way.  It is not run if
4715 @code{gnus-visual} is @code{nil}.
4716
4717 @item gnus-summary-update-hook
4718 @vindex gnus-summary-update-hook
4719 This hook is called when a summary line is changed.  It is not run if
4720 @code{gnus-visual} is @code{nil}.
4721
4722 @item gnus-summary-selected-face
4723 @vindex gnus-summary-selected-face
4724 This is the face (or @dfn{font} as some people call it) used to
4725 highlight the current article in the summary buffer.
4726
4727 @item gnus-summary-highlight
4728 @vindex gnus-summary-highlight
4729 Summary lines are highlighted according to this variable, which is a
4730 list where the elements are of the format @code{(@var{form}
4731 . @var{face})}.  If you would, for instance, like ticked articles to be
4732 italic and high-scored articles to be bold, you could set this variable
4733 to something like
4734 @lisp
4735 (((eq mark gnus-ticked-mark) . italic)
4736  ((> score default) . bold))
4737 @end lisp
4738 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4739 @var{face} will be applied to the line.
4740 @end table
4741
4742
4743 @node Summary Maneuvering
4744 @section Summary Maneuvering
4745 @cindex summary movement
4746
4747 All the straight movement commands understand the numeric prefix and
4748 behave pretty much as you'd expect.
4749
4750 None of these commands select articles.
4751
4752 @table @kbd
4753 @item G M-n
4754 @itemx M-n
4755 @kindex M-n (Summary)
4756 @kindex G M-n (Summary)
4757 @findex gnus-summary-next-unread-subject
4758 Go to the next summary line of an unread article
4759 (@code{gnus-summary-next-unread-subject}).
4760
4761 @item G M-p
4762 @itemx M-p
4763 @kindex M-p (Summary)
4764 @kindex G M-p (Summary)
4765 @findex gnus-summary-prev-unread-subject
4766 Go to the previous summary line of an unread article
4767 (@code{gnus-summary-prev-unread-subject}).
4768
4769 @item G g
4770 @kindex G g (Summary)
4771 @findex gnus-summary-goto-subject
4772 Ask for an article number and then go to the summary line of that article
4773 without displaying the article (@code{gnus-summary-goto-subject}).
4774 @end table
4775
4776 If gnus asks you to press a key to confirm going to the next group, you
4777 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4778 buffer, searching for the next group to read without actually returning
4779 to the group buffer.
4780
4781 Variables related to summary movement:
4782
4783 @table @code
4784
4785 @vindex gnus-auto-select-next
4786 @item gnus-auto-select-next
4787 If you issue one of the movement commands (like @kbd{n}) and there are
4788 no more unread articles after the current one, gnus will offer to go to
4789 the next group.  If this variable is @code{t} and the next group is
4790 empty, gnus will exit summary mode and return to the group buffer.  If
4791 this variable is neither @code{t} nor @code{nil}, gnus will select the
4792 next group with unread articles.  As a special case, if this variable
4793 is @code{quietly}, Gnus will select the next group without asking for
4794 confirmation.  If this variable is @code{almost-quietly}, the same
4795 will happen only if you are located on the last article in the group.
4796 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4797 command will go to the next group without confirmation.  Also
4798 @pxref{Group Levels}.
4799
4800 @item gnus-auto-select-same
4801 @vindex gnus-auto-select-same
4802 If non-@code{nil}, all the movement commands will try to go to the next
4803 article with the same subject as the current.  (@dfn{Same} here might
4804 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4805 for details (@pxref{Customizing Threading}).)  If there are no more
4806 articles with the same subject, go to the first unread article.
4807
4808 This variable is not particularly useful if you use a threaded display.
4809
4810 @item gnus-summary-check-current
4811 @vindex gnus-summary-check-current
4812 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4813 to the next (or previous) article if the current article is unread.
4814 Instead, they will choose the current article.
4815
4816 @item gnus-auto-center-summary
4817 @vindex gnus-auto-center-summary
4818 If non-@code{nil}, gnus will keep the point in the summary buffer
4819 centered at all times.  This makes things quite tidy, but if you have a
4820 slow network connection, or simply do not like this un-Emacsism, you can
4821 set this variable to @code{nil} to get the normal Emacs scrolling
4822 action.  This will also inhibit horizontal re-centering of the summary
4823 buffer, which might make it more inconvenient to read extremely long
4824 threads.
4825
4826 This variable can also be a number.  In that case, center the window at
4827 the given number of lines from the top.
4828
4829 @end table
4830
4831
4832 @node Choosing Articles
4833 @section Choosing Articles
4834 @cindex selecting articles
4835
4836 @menu
4837 * Choosing Commands::           Commands for choosing articles.
4838 * Choosing Variables::          Variables that influence these commands.
4839 @end menu
4840
4841
4842 @node Choosing Commands
4843 @subsection Choosing Commands
4844
4845 None of the following movement commands understand the numeric prefix,
4846 and they all select and display an article.
4847
4848 If you want to fetch new articles or redisplay the group, see
4849 @ref{Exiting the Summary Buffer}.
4850
4851 @table @kbd
4852 @item SPACE
4853 @kindex SPACE (Summary)
4854 @findex gnus-summary-next-page
4855 Select the current article, or, if that one's read already, the next
4856 unread article (@code{gnus-summary-next-page}).
4857
4858 @item G n
4859 @itemx n
4860 @kindex n (Summary)
4861 @kindex G n (Summary)
4862 @findex gnus-summary-next-unread-article
4863 @c @icon{gnus-summary-next-unread}
4864 Go to next unread article (@code{gnus-summary-next-unread-article}).
4865
4866 @item G p
4867 @itemx p
4868 @kindex p (Summary)
4869 @findex gnus-summary-prev-unread-article
4870 @c @icon{gnus-summary-prev-unread}
4871 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4872
4873 @item G N
4874 @itemx N
4875 @kindex N (Summary)
4876 @kindex G N (Summary)
4877 @findex gnus-summary-next-article
4878 Go to the next article (@code{gnus-summary-next-article}).
4879
4880 @item G P
4881 @itemx P
4882 @kindex P (Summary)
4883 @kindex G P (Summary)
4884 @findex gnus-summary-prev-article
4885 Go to the previous article (@code{gnus-summary-prev-article}).
4886
4887 @item G C-n
4888 @kindex G C-n (Summary)
4889 @findex gnus-summary-next-same-subject
4890 Go to the next article with the same subject
4891 (@code{gnus-summary-next-same-subject}).
4892
4893 @item G C-p
4894 @kindex G C-p (Summary)
4895 @findex gnus-summary-prev-same-subject
4896 Go to the previous article with the same subject
4897 (@code{gnus-summary-prev-same-subject}).
4898
4899 @item G f
4900 @itemx .
4901 @kindex G f  (Summary)
4902 @kindex .  (Summary)
4903 @findex gnus-summary-first-unread-article
4904 Go to the first unread article
4905 (@code{gnus-summary-first-unread-article}).
4906
4907 @item G b
4908 @itemx ,
4909 @kindex G b (Summary)
4910 @kindex , (Summary)
4911 @findex gnus-summary-best-unread-article
4912 Go to the unread article with the highest score
4913 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
4914 go to the first unread article that has a score over the default score.
4915
4916 @item G l
4917 @itemx l
4918 @kindex l (Summary)
4919 @kindex G l (Summary)
4920 @findex gnus-summary-goto-last-article
4921 Go to the previous article read (@code{gnus-summary-goto-last-article}).
4922
4923 @item G o
4924 @kindex G o (Summary)
4925 @findex gnus-summary-pop-article
4926 @cindex history
4927 @cindex article history
4928 Pop an article off the summary history and go to this article
4929 (@code{gnus-summary-pop-article}).  This command differs from the
4930 command above in that you can pop as many previous articles off the
4931 history as you like, while @kbd{l} toggles the two last read articles.
4932 For a somewhat related issue (if you use these commands a lot),
4933 @pxref{Article Backlog}.
4934
4935 @item G j
4936 @itemx j
4937 @kindex j (Summary)
4938 @kindex G j (Summary)
4939 @findex gnus-summary-goto-article
4940 Ask for an article number or @code{Message-ID}, and then go to that
4941 article (@code{gnus-summary-goto-article}).
4942
4943 @end table
4944
4945
4946 @node Choosing Variables
4947 @subsection Choosing Variables
4948
4949 Some variables relevant for moving and selecting articles:
4950
4951 @table @code
4952 @item gnus-auto-extend-newsgroup
4953 @vindex gnus-auto-extend-newsgroup
4954 All the movement commands will try to go to the previous (or next)
4955 article, even if that article isn't displayed in the Summary buffer if
4956 this variable is non-@code{nil}.  Gnus will then fetch the article from
4957 the server and display it in the article buffer.
4958
4959 @item gnus-select-article-hook
4960 @vindex gnus-select-article-hook
4961 This hook is called whenever an article is selected.  By default it
4962 exposes any threads hidden under the selected article.
4963
4964 @item gnus-mark-article-hook
4965 @vindex gnus-mark-article-hook
4966 @findex gnus-summary-mark-unread-as-read
4967 @findex gnus-summary-mark-read-and-unread-as-read
4968 @findex gnus-unread-mark
4969 This hook is called whenever an article is selected.  It is intended to
4970 be used for marking articles as read.  The default value is
4971 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
4972 mark of almost any article you read to @code{gnus-unread-mark}.  The
4973 only articles not affected by this function are ticked, dormant, and
4974 expirable articles.  If you'd instead like to just have unread articles
4975 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
4976 instead.  It will leave marks like @code{gnus-low-score-mark},
4977 @code{gnus-del-mark} (and so on) alone.
4978
4979 @end table
4980
4981
4982 @node Paging the Article
4983 @section Scrolling the Article
4984 @cindex article scrolling
4985
4986 @table @kbd
4987
4988 @item SPACE
4989 @kindex SPACE (Summary)
4990 @findex gnus-summary-next-page
4991 Pressing @kbd{SPACE} will scroll the current article forward one page,
4992 or, if you have come to the end of the current article, will choose the
4993 next article (@code{gnus-summary-next-page}).
4994
4995 @item DEL
4996 @kindex DEL (Summary)
4997 @findex gnus-summary-prev-page
4998 Scroll the current article back one page (@code{gnus-summary-prev-page}).
4999
5000 @item RET
5001 @kindex RET (Summary)
5002 @findex gnus-summary-scroll-up
5003 Scroll the current article one line forward
5004 (@code{gnus-summary-scroll-up}).
5005
5006 @item M-RET
5007 @kindex M-RET (Summary)
5008 @findex gnus-summary-scroll-down
5009 Scroll the current article one line backward
5010 (@code{gnus-summary-scroll-down}).
5011
5012 @item A g
5013 @itemx g
5014 @kindex A g (Summary)
5015 @kindex g (Summary)
5016 @findex gnus-summary-show-article
5017 @vindex gnus-summary-show-article-charset-alist
5018 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5019 given a prefix, fetch the current article, but don't run any of the
5020 article treatment functions.  This will give you a ``raw'' article, just
5021 the way it came from the server.
5022
5023 If given a numerical prefix, you can do semi-manual charset stuff.
5024 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5025 encoded in the @code{cn-gb-2312} charset.  If you have
5026
5027 @lisp
5028 (setq gnus-summary-show-article-charset-alist
5029       '((1 . cn-gb-2312)
5030         (2 . big5)))
5031 @end lisp
5032
5033 then you can say @kbd{C-u 1 g} to get the same effect.
5034
5035 @item A <
5036 @itemx <
5037 @kindex < (Summary)
5038 @kindex A < (Summary)
5039 @findex gnus-summary-beginning-of-article
5040 Scroll to the beginning of the article
5041 (@code{gnus-summary-beginning-of-article}).
5042
5043 @item A >
5044 @itemx >
5045 @kindex > (Summary)
5046 @kindex A > (Summary)
5047 @findex gnus-summary-end-of-article
5048 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5049
5050 @item A s
5051 @itemx s
5052 @kindex A s (Summary)
5053 @kindex s (Summary)
5054 @findex gnus-summary-isearch-article
5055 Perform an isearch in the article buffer
5056 (@code{gnus-summary-isearch-article}).
5057
5058 @item h
5059 @kindex h (Summary)
5060 @findex gnus-summary-select-article-buffer
5061 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5062
5063 @end table
5064
5065
5066 @node Reply Followup and Post
5067 @section Reply, Followup and Post
5068
5069 @menu
5070 * Summary Mail Commands::       Sending mail.
5071 * Summary Post Commands::       Sending news.
5072 * Summary Message Commands::    Other Message-related commands.
5073 * Canceling and Superseding::   
5074 @end menu
5075
5076
5077 @node Summary Mail Commands
5078 @subsection Summary Mail Commands
5079 @cindex mail
5080 @cindex composing mail
5081
5082 Commands for composing a mail message:
5083
5084 @table @kbd
5085
5086 @item S r
5087 @itemx r
5088 @kindex S r (Summary)
5089 @kindex r (Summary)
5090 @findex gnus-summary-reply
5091 @c @icon{gnus-summary-mail-reply}
5092 @c @icon{gnus-summary-reply}
5093 Mail a reply to the author of the current article
5094 (@code{gnus-summary-reply}).
5095
5096 @item S R
5097 @itemx R
5098 @kindex R (Summary)
5099 @kindex S R (Summary)
5100 @findex gnus-summary-reply-with-original
5101 @c @icon{gnus-summary-reply-with-original}
5102 Mail a reply to the author of the current article and include the
5103 original message (@code{gnus-summary-reply-with-original}).  This
5104 command uses the process/prefix convention.
5105
5106 @item S w
5107 @kindex S w (Summary)
5108 @findex gnus-summary-wide-reply
5109 Mail a wide reply to the author of the current article
5110 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5111 goes out to all people listed in the @code{To}, @code{From} (or
5112 @code{Reply-to}) and @code{Cc} headers.
5113
5114 @item S W
5115 @kindex S W (Summary)
5116 @findex gnus-summary-wide-reply-with-original
5117 Mail a wide reply to the current article and include the original
5118 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5119 the process/prefix convention.
5120
5121 @item S v
5122 @kindex S v (Summary)
5123 @findex gnus-summary-very-wide-reply
5124 Mail a very wide reply to the author of the current article
5125 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5126 that goes out to all people listed in the @code{To}, @code{From} (or
5127 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5128 articles.  This command uses the process/prefix convention.
5129
5130 @item S V
5131 @kindex S V (Summary)
5132 @findex gnus-summary-very-wide-reply-with-original
5133 Mail a very wide reply to the author of the current article and include the
5134 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5135 command uses the process/prefix convention.
5136
5137 @item S B r
5138 @kindex S B r (Summary)
5139 @findex gnus-summary-reply-broken-reply-to
5140 Mail a reply to the author of the current article but ignore the
5141 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5142
5143 @item S B R
5144 @kindex S B R (Summary)
5145 @findex gnus-summary-reply-broken-reply-to-with-original
5146 Mail a reply to the author of the current article and include the
5147 original message but ignore the @code{Reply-To} field
5148 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5149
5150 @item S o m
5151 @itemx C-c C-f
5152 @kindex S o m (Summary)
5153 @kindex C-c C-f (Summary)
5154 @findex gnus-summary-mail-forward
5155 @c @icon{gnus-summary-mail-forward}
5156 Forward the current article to some other person
5157 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5158 headers of the forwarded article.
5159
5160 @item S m
5161 @itemx m
5162 @kindex m (Summary)
5163 @kindex S m (Summary)
5164 @findex gnus-summary-mail-other-window
5165 @c @icon{gnus-summary-mail-originate}
5166 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5167 the posting style of the current group.  If given a prefix, disable that.
5168 If the prefix is 1, prompt for a group name to find the posting style.
5169
5170 @item S i
5171 @itemx i
5172 @kindex i (Summary)
5173 @kindex S i (Summary)
5174 @findex gnus-summary-news-other-window
5175 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5176 post to the current group.  If given a prefix, disable that.  If the
5177 prefix is 1, prompt for a group to post to.
5178
5179 This function actually prepares a news even when using mail groups.
5180 This is useful for "posting" messages to mail groups without actually
5181 sending them over the network: they're just saved directly to the group
5182 in question.  The corresponding back end must have a request-post method
5183 for this to work though.
5184
5185 @item S D b
5186 @kindex S D b (Summary)
5187 @findex gnus-summary-resend-bounced-mail
5188 @cindex bouncing mail
5189 If you have sent a mail, but the mail was bounced back to you for some
5190 reason (wrong address, transient failure), you can use this command to
5191 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5192 will be popped into a mail buffer where you can edit the headers before
5193 sending the mail off again.  If you give a prefix to this command, and
5194 the bounced mail is a reply to some other mail, gnus will try to fetch
5195 that mail and display it for easy perusal of its headers.  This might
5196 very well fail, though.
5197
5198 @item S D r
5199 @kindex S D r (Summary)
5200 @findex gnus-summary-resend-message
5201 Not to be confused with the previous command,
5202 @code{gnus-summary-resend-message} will prompt you for an address to
5203 send the current message off to, and then send it to that place.  The
5204 headers of the message won't be altered---but lots of headers that say
5205 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5206 means that you actually send a mail to someone that has a @code{To}
5207 header that (probably) points to yourself.  This will confuse people.
5208 So, natcherly you'll only do that if you're really eVIl.
5209
5210 This command is mainly used if you have several accounts and want to
5211 ship a mail to a different account of yours.  (If you're both
5212 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5213 to the @code{root} account, you may want to resend it to
5214 @code{postmaster}.  Ordnung muss sein!
5215
5216 This command understands the process/prefix convention
5217 (@pxref{Process/Prefix}).
5218
5219 @item S O m
5220 @kindex S O m (Summary)
5221 @findex gnus-summary-digest-mail-forward
5222 Digest the current series (@pxref{Decoding Articles}) and forward the
5223 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5224 command uses the process/prefix convention (@pxref{Process/Prefix}).
5225
5226 @item S M-c
5227 @kindex S M-c (Summary)
5228 @findex gnus-summary-mail-crosspost-complaint
5229 @cindex crossposting
5230 @cindex excessive crossposting
5231 Send a complaint about excessive crossposting to the author of the
5232 current article (@code{gnus-summary-mail-crosspost-complaint}).
5233
5234 @findex gnus-crosspost-complaint
5235 This command is provided as a way to fight back against the current
5236 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5237 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5238 command understands the process/prefix convention
5239 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5240
5241 @end table
5242
5243 Also @xref{Header Commands, ,Header Commands, message, The Message
5244 Manual}, for more information.
5245
5246
5247 @node Summary Post Commands
5248 @subsection Summary Post Commands
5249 @cindex post
5250 @cindex composing news
5251
5252 Commands for posting a news article:
5253
5254 @table @kbd
5255 @item S p
5256 @itemx a
5257 @kindex a (Summary)
5258 @kindex S p (Summary)
5259 @findex gnus-summary-post-news
5260 @c @icon{gnus-summary-post-news}
5261 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5262 default, post to the current group.  If given a prefix, disable that.
5263 If the prefix is 1, prompt for another group instead.
5264
5265 @item S f
5266 @itemx f
5267 @kindex f (Summary)
5268 @kindex S f (Summary)
5269 @findex gnus-summary-followup
5270 @c @icon{gnus-summary-followup}
5271 Post a followup to the current article (@code{gnus-summary-followup}).
5272
5273 @item S F
5274 @itemx F
5275 @kindex S F (Summary)
5276 @kindex F (Summary)
5277 @c @icon{gnus-summary-followup-with-original}
5278 @findex gnus-summary-followup-with-original
5279 Post a followup to the current article and include the original message
5280 (@code{gnus-summary-followup-with-original}).   This command uses the
5281 process/prefix convention.
5282
5283 @item S n
5284 @kindex S n (Summary)
5285 @findex gnus-summary-followup-to-mail
5286 Post a followup to the current article via news, even if you got the
5287 message through mail (@code{gnus-summary-followup-to-mail}).
5288
5289 @item S N
5290 @kindex S N (Summary)
5291 @findex gnus-summary-followup-to-mail-with-original
5292 Post a followup to the current article via news, even if you got the
5293 message through mail and include the original message
5294 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5295 the process/prefix convention.
5296
5297 @item S o p
5298 @kindex S o p (Summary)
5299 @findex gnus-summary-post-forward
5300 Forward the current article to a newsgroup
5301 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5302 headers of the forwarded article.
5303
5304 @item S O p
5305 @kindex S O p (Summary)
5306 @findex gnus-summary-digest-post-forward
5307 @cindex digests
5308 @cindex making digests
5309 Digest the current series and forward the result to a newsgroup
5310 (@code{gnus-summary-digest-post-forward}).  This command uses the
5311 process/prefix convention.
5312
5313 @item S u
5314 @kindex S u (Summary)
5315 @findex gnus-uu-post-news
5316 @c @icon{gnus-uu-post-news}
5317 Uuencode a file, split it into parts, and post it as a series
5318 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5319 @end table
5320
5321 Also @xref{Header Commands, ,Header Commands, message, The Message
5322 Manual}, for more information.
5323
5324
5325 @node Summary Message Commands
5326 @subsection Summary Message Commands
5327
5328 @table @kbd
5329 @item S y
5330 @kindex S y (Summary)
5331 @findex gnus-summary-yank-message
5332 Yank the current article into an already existing Message composition
5333 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5334 what message buffer you want to yank into, and understands the
5335 process/prefix convention (@pxref{Process/Prefix}).
5336
5337 @end table
5338
5339
5340 @node Canceling and Superseding
5341 @subsection Canceling Articles
5342 @cindex canceling articles
5343 @cindex superseding articles
5344
5345 Have you ever written something, and then decided that you really,
5346 really, really wish you hadn't posted that?
5347
5348 Well, you can't cancel mail, but you can cancel posts.
5349
5350 @findex gnus-summary-cancel-article
5351 @kindex C (Summary)
5352 @c @icon{gnus-summary-cancel-article}
5353 Find the article you wish to cancel (you can only cancel your own
5354 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5355 c} (@code{gnus-summary-cancel-article}).  Your article will be
5356 canceled---machines all over the world will be deleting your article.
5357 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5358
5359 Be aware, however, that not all sites honor cancels, so your article may
5360 live on here and there, while most sites will delete the article in
5361 question.
5362
5363 Gnus will use the ``current'' select method when canceling.  If you
5364 want to use the standard posting method, use the @samp{a} symbolic
5365 prefix (@pxref{Symbolic Prefixes}).
5366
5367 If you discover that you have made some mistakes and want to do some
5368 corrections, you can post a @dfn{superseding} article that will replace
5369 your original article.
5370
5371 @findex gnus-summary-supersede-article
5372 @kindex S (Summary)
5373 Go to the original article and press @kbd{S s}
5374 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5375 where you can edit the article all you want before sending it off the
5376 usual way.
5377
5378 The same goes for superseding as for canceling, only more so: Some
5379 sites do not honor superseding.  On those sites, it will appear that you
5380 have posted almost the same article twice.
5381
5382 If you have just posted the article, and change your mind right away,
5383 there is a trick you can use to cancel/supersede the article without
5384 waiting for the article to appear on your site first.  You simply return
5385 to the post buffer (which is called @code{*sent ...*}).  There you will
5386 find the article you just posted, with all the headers intact.  Change
5387 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5388 header by substituting one of those words for the word
5389 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5390 you would do normally.  The previous article will be
5391 canceled/superseded.
5392
5393 Just remember, kids: There is no 'c' in 'supersede'.
5394
5395 @node Delayed Articles
5396 @section Delayed Articles
5397 @cindex delayed sending
5398 @cindex send delayed
5399
5400 Sometimes, you might wish to delay the sending of a message.  For
5401 example, you might wish to arrange for a message to turn up just in time
5402 to remind your about the birthday of your Significant Other.  For this,
5403 there is the @code{gnus-delay} package.  Setup is simple:
5404
5405 @lisp
5406 (gnus-delay-initialize)
5407 @end lisp
5408
5409 @findex gnus-delay-article
5410 Normally, to send a message you use the @kbd{C-c C-c} command from
5411 Message mode.  To delay a message, use @kbd{C-c C-j}
5412 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5413 message should be delayed.  Possible answers are:
5414
5415 @itemize @bullet
5416 @item
5417 A time span.  Consists of an integer and a letter.  For example,
5418 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5419 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5420 (months) and @code{Y} (years).
5421
5422 @item
5423 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5424 delayed until that day, at a specific time (eight o'clock by default).
5425 See also @code{gnus-delay-default-hour}.
5426
5427 @item
5428 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5429 stuff.  The deadline will be at that time today, except if that time has
5430 already passed, then it's at the given time tomorrow.  So if it's ten
5431 o'clock in the morning and you specify @code{11:15}, then the deadline
5432 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5433 that means a time tomorrow.
5434 @end itemize
5435
5436 The action of the @code{gnus-delay-article} command is influenced by a
5437 couple of variables:
5438
5439 @table @code
5440 @item gnus-delay-default-hour
5441 @vindex gnus-delay-default-hour
5442 When you specify a specific date, the message will be due on that hour
5443 on the given date.  Possible values are integers 0 through 23.
5444
5445 @item gnus-delay-default-delay
5446 @vindex gnus-delay-default-delay
5447 This is a string and gives the default delay.  It can be of any of the
5448 formats described above.
5449
5450 @item gnus-delay-group
5451 @vindex gnus-delay-group
5452 Delayed articles will be kept in this group on the drafts server until
5453 they are due.  You probably don't need to change this.  The default
5454 value is @code{"delayed"}.
5455
5456 @item gnus-delay-header
5457 @vindex gnus-delay-header
5458 The deadline for each article will be stored in a header.  This variable
5459 is a string and gives the header name.  You probably don't need to
5460 change this.  The default value is @code{"X-Gnus-Delayed"}.
5461 @end table
5462
5463 The way delaying works is like this: when you use the
5464 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5465 calculates the deadline of the message and stores it in the
5466 @code{X-Gnus-Delayed} header and puts the message in the
5467 @code{nndraft:delayed} group.
5468
5469 And whenever you get new news, Gnus looks through the group for articles
5470 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5471 function for this.  By default, this function is added to the hook
5472 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5473 Maybe you want to use the demon to send drafts?  Just tell the demon to
5474 execute the @code{gnus-delay-send-queue} function.
5475
5476 @table @code
5477 @item gnus-delay-initialize
5478 @findex gnus-delay-initialize
5479
5480 By default, this function installs @code{gnus-delay-send-queue} in
5481 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5482 argument @code{no-check}.  If it is non-nil,
5483 @code{gnus-get-new-news-hook} is not changed.  The optional first
5484 argument is ignored.
5485
5486 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5487 Presumably, you want to use the demon for sending due delayed articles.
5488 Just don't forget to set that up :-)
5489 @end table
5490
5491
5492 @node Marking Articles
5493 @section Marking Articles
5494 @cindex article marking
5495 @cindex article ticking
5496 @cindex marks
5497
5498 There are several marks you can set on an article.
5499
5500 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5501 neologism ohoy!) of the article.  Alphabetic marks generally mean
5502 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5503
5504 In addition, you also have marks that do not affect readedness.
5505
5506 @menu
5507 * Unread Articles::             Marks for unread articles.
5508 * Read Articles::               Marks for read articles.
5509 * Other Marks::                 Marks that do not affect readedness.
5510 @end menu
5511
5512 @ifinfo
5513 There's a plethora of commands for manipulating these marks:
5514 @end ifinfo
5515
5516 @menu
5517 * Setting Marks::             How to set and remove marks.
5518 * Generic Marking Commands::  How to customize the marking.
5519 * Setting Process Marks::     How to mark articles for later processing.
5520 @end menu
5521
5522
5523 @node Unread Articles
5524 @subsection Unread Articles
5525
5526 The following marks mark articles as (kinda) unread, in one form or
5527 other.
5528
5529 @table @samp
5530 @item !
5531 @vindex gnus-ticked-mark
5532 Marked as ticked (@code{gnus-ticked-mark}).
5533
5534 @dfn{Ticked articles} are articles that will remain visible always.  If
5535 you see an article that you find interesting, or you want to put off
5536 reading it, or replying to it, until sometime later, you'd typically
5537 tick it.  However, articles can be expired (from news servers by the
5538 news server software, Gnus itself never expires ticked messages), so if
5539 you want to keep an article forever, you'll have to make it persistent
5540 (@pxref{Persistent Articles}).
5541
5542 @item ?
5543 @vindex gnus-dormant-mark
5544 Marked as dormant (@code{gnus-dormant-mark}).
5545
5546 @dfn{Dormant articles} will only appear in the summary buffer if there
5547 are followups to it.  If you want to see them even if they don't have
5548 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5549 Otherwise (except for the visibility issue), they are just like ticked
5550 messages.
5551
5552 @item SPACE
5553 @vindex gnus-unread-mark
5554 Marked as unread (@code{gnus-unread-mark}).
5555
5556 @dfn{Unread articles} are articles that haven't been read at all yet.
5557 @end table
5558
5559
5560 @node Read Articles
5561 @subsection Read Articles
5562 @cindex expirable mark
5563
5564 All the following marks mark articles as read.
5565
5566 @table @samp
5567
5568 @item r
5569 @vindex gnus-del-mark
5570 These are articles that the user has marked as read with the @kbd{d}
5571 command manually, more or less (@code{gnus-del-mark}).
5572
5573 @item R
5574 @vindex gnus-read-mark
5575 Articles that have actually been read (@code{gnus-read-mark}).
5576
5577 @item O
5578 @vindex gnus-ancient-mark
5579 Articles that were marked as read in previous sessions and are now
5580 @dfn{old} (@code{gnus-ancient-mark}).
5581
5582 @item K
5583 @vindex gnus-killed-mark
5584 Marked as killed (@code{gnus-killed-mark}).
5585
5586 @item X
5587 @vindex gnus-kill-file-mark
5588 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5589
5590 @item Y
5591 @vindex gnus-low-score-mark
5592 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5593
5594 @item C
5595 @vindex gnus-catchup-mark
5596 Marked as read by a catchup (@code{gnus-catchup-mark}).
5597
5598 @item G
5599 @vindex gnus-canceled-mark
5600 Canceled article (@code{gnus-canceled-mark})
5601
5602 @item F
5603 @vindex gnus-souped-mark
5604 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5605
5606 @item Q
5607 @vindex gnus-sparse-mark
5608 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5609 Threading}.
5610
5611 @item M
5612 @vindex gnus-duplicate-mark
5613 Article marked as read by duplicate suppression
5614 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5615
5616 @end table
5617
5618 All these marks just mean that the article is marked as read, really.
5619 They are interpreted differently when doing adaptive scoring, though.
5620
5621 One more special mark, though:
5622
5623 @table @samp
5624 @item E
5625 @vindex gnus-expirable-mark
5626 Marked as expirable (@code{gnus-expirable-mark}).
5627
5628 Marking articles as @dfn{expirable} (or have them marked as such
5629 automatically) doesn't make much sense in normal groups---a user doesn't
5630 control expiring of news articles, but in mail groups, for instance,
5631 articles marked as @dfn{expirable} can be deleted by gnus at
5632 any time.
5633 @end table
5634
5635
5636 @node Other Marks
5637 @subsection Other Marks
5638 @cindex process mark
5639 @cindex bookmarks
5640
5641 There are some marks that have nothing to do with whether the article is
5642 read or not.
5643
5644 @itemize @bullet
5645
5646 @item
5647 You can set a bookmark in the current article.  Say you are reading a
5648 long thesis on cats' urinary tracts, and have to go home for dinner
5649 before you've finished reading the thesis.  You can then set a bookmark
5650 in the article, and gnus will jump to this bookmark the next time it
5651 encounters the article.  @xref{Setting Marks}.
5652
5653 @item
5654 @vindex gnus-replied-mark
5655 All articles that you have replied to or made a followup to (i.e., have
5656 answered) will be marked with an @samp{A} in the second column
5657 (@code{gnus-replied-mark}).
5658
5659 @item
5660 @vindex gnus-forwarded-mark
5661 All articles that you have forwarded will be marked with an @samp{F} in
5662 the second column (@code{gnus-forwarded-mark}).
5663
5664 @item
5665 @vindex gnus-cached-mark
5666 Articles stored in the article cache will be marked with an @samp{*} in
5667 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5668
5669 @item
5670 @vindex gnus-saved-mark
5671 Articles ``saved'' (in some manner or other; not necessarily
5672 religiously) are marked with an @samp{S} in the second column
5673 (@code{gnus-saved-mark}).
5674
5675 @item
5676 @vindex gnus-recent-mark
5677 Articles that according to the server haven't been shown to the user
5678 before are marked with a @samp{N} in the second column
5679 (@code{gnus-recent-mark}).  Note that not all servers support this
5680 mark, in which case it simply never appears. Compare with
5681 @code{gnus-unseen-mark}.
5682
5683 @item
5684 @vindex gnus-unseen-mark
5685 Articles that haven't been seen before in Gnus by the user are marked
5686 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5687 Compare with @code{gnus-recent-mark}.
5688
5689 @item
5690 @vindex gnus-undownloaded-mark
5691 When using the Gnus agent @pxref{Agent Basics}, some articles might not
5692 have been downloaded.  Such articles cannot be viewed while you are
5693 offline (unplugged).  These articles get the @samp{@@} mark in the
5694 first column.  (The variable @code{gnus-undownloaded-mark} controls
5695 which character to use.)
5696
5697 @item
5698 @vindex gnus-downloadable-mark
5699 The Gnus agent @pxref{Agent Basics} downloads some articles
5700 automatically, but it is also possible to explicitly mark articles for
5701 download, even if they would not be downloaded automatically.  Such
5702 explicitly-marked articles get the @samp{%} mark in the first column.
5703 (The variable @code{gnus-downloadable-mark} controls which character to
5704 use.)
5705
5706 @item
5707 @vindex gnus-not-empty-thread-mark
5708 @vindex gnus-empty-thread-mark
5709 If the @samp{%e} spec is used, the presence of threads or not will be
5710 marked with @code{gnus-not-empty-thread-mark} and
5711 @code{gnus-empty-thread-mark} in the third column, respectively.
5712
5713 @item
5714 @vindex gnus-process-mark
5715 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5716 variety of commands react to the presence of the process mark.  For
5717 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5718 all articles that have been marked with the process mark.  Articles
5719 marked with the process mark have a @samp{#} in the second column.
5720
5721 @end itemize
5722
5723 You might have noticed that most of these ``non-readedness'' marks
5724 appear in the second column by default.  So if you have a cached, saved,
5725 replied article that you have process-marked, what will that look like?
5726
5727 Nothing much.  The precedence rules go as follows: process -> cache ->
5728 replied -> saved.  So if the article is in the cache and is replied,
5729 you'll only see the cache mark and not the replied mark.
5730
5731
5732 @node Setting Marks
5733 @subsection Setting Marks
5734 @cindex setting marks
5735
5736 All the marking commands understand the numeric prefix.
5737
5738 @table @kbd
5739 @item M c
5740 @itemx M-u
5741 @kindex M c (Summary)
5742 @kindex M-u (Summary)
5743 @findex gnus-summary-clear-mark-forward
5744 @cindex mark as unread
5745 Clear all readedness-marks from the current article
5746 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5747 article as unread.
5748
5749 @item M t
5750 @itemx !
5751 @kindex ! (Summary)
5752 @kindex M t (Summary)
5753 @findex gnus-summary-tick-article-forward
5754 Tick the current article (@code{gnus-summary-tick-article-forward}).
5755 @xref{Article Caching}.
5756
5757 @item M ?
5758 @itemx ?
5759 @kindex ? (Summary)
5760 @kindex M ? (Summary)
5761 @findex gnus-summary-mark-as-dormant
5762 Mark the current article as dormant
5763 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5764
5765 @item M d
5766 @itemx d
5767 @kindex M d (Summary)
5768 @kindex d (Summary)
5769 @findex gnus-summary-mark-as-read-forward
5770 Mark the current article as read
5771 (@code{gnus-summary-mark-as-read-forward}).
5772
5773 @item D
5774 @kindex D (Summary)
5775 @findex gnus-summary-mark-as-read-backward
5776 Mark the current article as read and move point to the previous line
5777 (@code{gnus-summary-mark-as-read-backward}).
5778
5779 @item M k
5780 @itemx k
5781 @kindex k (Summary)
5782 @kindex M k (Summary)
5783 @findex gnus-summary-kill-same-subject-and-select
5784 Mark all articles that have the same subject as the current one as read,
5785 and then select the next unread article
5786 (@code{gnus-summary-kill-same-subject-and-select}).
5787
5788 @item M K
5789 @itemx C-k
5790 @kindex M K (Summary)
5791 @kindex C-k (Summary)
5792 @findex gnus-summary-kill-same-subject
5793 Mark all articles that have the same subject as the current one as read
5794 (@code{gnus-summary-kill-same-subject}).
5795
5796 @item M C
5797 @kindex M C (Summary)
5798 @findex gnus-summary-catchup
5799 @c @icon{gnus-summary-catchup}
5800 Mark all unread articles as read (@code{gnus-summary-catchup}).
5801
5802 @item M C-c
5803 @kindex M C-c (Summary)
5804 @findex gnus-summary-catchup-all
5805 Mark all articles in the group as read---even the ticked and dormant
5806 articles (@code{gnus-summary-catchup-all}).
5807
5808 @item M H
5809 @kindex M H (Summary)
5810 @findex gnus-summary-catchup-to-here
5811 Catchup the current group to point (before the point)
5812 (@code{gnus-summary-catchup-to-here}).
5813
5814 @item M h
5815 @kindex M h (Summary)
5816 @findex gnus-summary-catchup-from-here
5817 Catchup the current group from point (after the point)
5818 (@code{gnus-summary-catchup-from-here}).
5819
5820 @item C-w
5821 @kindex C-w (Summary)
5822 @findex gnus-summary-mark-region-as-read
5823 Mark all articles between point and mark as read
5824 (@code{gnus-summary-mark-region-as-read}).
5825
5826 @item M V k
5827 @kindex M V k (Summary)
5828 @findex gnus-summary-kill-below
5829 Kill all articles with scores below the default score (or below the
5830 numeric prefix) (@code{gnus-summary-kill-below}).
5831
5832 @item M e
5833 @itemx E
5834 @kindex M e (Summary)
5835 @kindex E (Summary)
5836 @findex gnus-summary-mark-as-expirable
5837 Mark the current article as expirable
5838 (@code{gnus-summary-mark-as-expirable}).
5839
5840 @item M b
5841 @kindex M b (Summary)
5842 @findex gnus-summary-set-bookmark
5843 Set a bookmark in the current article
5844 (@code{gnus-summary-set-bookmark}).
5845
5846 @item M B
5847 @kindex M B (Summary)
5848 @findex gnus-summary-remove-bookmark
5849 Remove the bookmark from the current article
5850 (@code{gnus-summary-remove-bookmark}).
5851
5852 @item M V c
5853 @kindex M V c (Summary)
5854 @findex gnus-summary-clear-above
5855 Clear all marks from articles with scores over the default score (or
5856 over the numeric prefix) (@code{gnus-summary-clear-above}).
5857
5858 @item M V u
5859 @kindex M V u (Summary)
5860 @findex gnus-summary-tick-above
5861 Tick all articles with scores over the default score (or over the
5862 numeric prefix) (@code{gnus-summary-tick-above}).
5863
5864 @item M V m
5865 @kindex M V m (Summary)
5866 @findex gnus-summary-mark-above
5867 Prompt for a mark, and mark all articles with scores over the default
5868 score (or over the numeric prefix) with this mark
5869 (@code{gnus-summary-clear-above}).
5870 @end table
5871
5872 @vindex gnus-summary-goto-unread
5873 The @code{gnus-summary-goto-unread} variable controls what action should
5874 be taken after setting a mark.  If non-@code{nil}, point will move to
5875 the next/previous unread article.  If @code{nil}, point will just move
5876 one line up or down.  As a special case, if this variable is
5877 @code{never}, all the marking commands as well as other commands (like
5878 @kbd{SPACE}) will move to the next article, whether it is unread or not.
5879 The default is @code{t}.
5880
5881
5882 @node Generic Marking Commands
5883 @subsection Generic Marking Commands
5884
5885 Some people would like the command that ticks an article (@kbd{!}) go to
5886 the next article.  Others would like it to go to the next unread
5887 article.  Yet others would like it to stay on the current article.  And
5888 even though I haven't heard of anybody wanting it to go to the
5889 previous (unread) article, I'm sure there are people that want that as
5890 well.
5891
5892 Multiply these five behaviors with five different marking commands, and
5893 you get a potentially complex set of variable to control what each
5894 command should do.
5895
5896 To sidestep that mess, Gnus provides commands that do all these
5897 different things.  They can be found on the @kbd{M M} map in the summary
5898 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
5899 to list in this manual.
5900
5901 While you can use these commands directly, most users would prefer
5902 altering the summary mode keymap.  For instance, if you would like the
5903 @kbd{!} command to go to the next article instead of the next unread
5904 article, you could say something like:
5905
5906 @lisp
5907 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
5908 (defun my-alter-summary-map ()
5909   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
5910 @end lisp
5911
5912 or
5913
5914 @lisp
5915 (defun my-alter-summary-map ()
5916   (local-set-key "!" "MM!n"))
5917 @end lisp
5918
5919
5920 @node Setting Process Marks
5921 @subsection Setting Process Marks
5922 @cindex setting process marks
5923
5924 @table @kbd
5925
5926 @item M P p
5927 @itemx #
5928 @kindex # (Summary)
5929 @kindex M P p (Summary)
5930 @findex gnus-summary-mark-as-processable
5931 Mark the current article with the process mark
5932 (@code{gnus-summary-mark-as-processable}).
5933 @findex gnus-summary-unmark-as-processable
5934
5935 @item M P u
5936 @itemx M-#
5937 @kindex M P u (Summary)
5938 @kindex M-# (Summary)
5939 Remove the process mark, if any, from the current article
5940 (@code{gnus-summary-unmark-as-processable}).
5941
5942 @item M P U
5943 @kindex M P U (Summary)
5944 @findex gnus-summary-unmark-all-processable
5945 Remove the process mark from all articles
5946 (@code{gnus-summary-unmark-all-processable}).
5947
5948 @item M P i
5949 @kindex M P i (Summary)
5950 @findex gnus-uu-invert-processable
5951 Invert the list of process marked articles
5952 (@code{gnus-uu-invert-processable}).
5953
5954 @item M P R
5955 @kindex M P R (Summary)
5956 @findex gnus-uu-mark-by-regexp
5957 Mark articles that have a @code{Subject} header that matches a regular
5958 expression (@code{gnus-uu-mark-by-regexp}).
5959
5960 @item M P G
5961 @kindex M P G (Summary)
5962 @findex gnus-uu-unmark-by-regexp
5963 Unmark articles that have a @code{Subject} header that matches a regular
5964 expression (@code{gnus-uu-unmark-by-regexp}).
5965
5966 @item M P r
5967 @kindex M P r (Summary)
5968 @findex gnus-uu-mark-region
5969 Mark articles in region (@code{gnus-uu-mark-region}).
5970
5971 @item M P g
5972 @kindex M P g
5973 @findex gnus-uu-unmark-region
5974 Unmark articles in region (@code{gnus-uu-unmark-region}).
5975
5976 @item M P t
5977 @kindex M P t (Summary)
5978 @findex gnus-uu-mark-thread
5979 Mark all articles in the current (sub)thread
5980 (@code{gnus-uu-mark-thread}).
5981
5982 @item M P T
5983 @kindex M P T (Summary)
5984 @findex gnus-uu-unmark-thread
5985 Unmark all articles in the current (sub)thread
5986 (@code{gnus-uu-unmark-thread}).
5987
5988 @item M P v
5989 @kindex M P v (Summary)
5990 @findex gnus-uu-mark-over
5991 Mark all articles that have a score above the prefix argument
5992 (@code{gnus-uu-mark-over}).
5993
5994 @item M P s
5995 @kindex M P s (Summary)
5996 @findex gnus-uu-mark-series
5997 Mark all articles in the current series (@code{gnus-uu-mark-series}).
5998
5999 @item M P S
6000 @kindex M P S (Summary)
6001 @findex gnus-uu-mark-sparse
6002 Mark all series that have already had some articles marked
6003 (@code{gnus-uu-mark-sparse}).
6004
6005 @item M P a
6006 @kindex M P a (Summary)
6007 @findex gnus-uu-mark-all
6008 Mark all articles in series order (@code{gnus-uu-mark-series}).
6009
6010 @item M P b
6011 @kindex M P b (Summary)
6012 @findex gnus-uu-mark-buffer
6013 Mark all articles in the buffer in the order they appear
6014 (@code{gnus-uu-mark-buffer}).
6015
6016 @item M P k
6017 @kindex M P k (Summary)
6018 @findex gnus-summary-kill-process-mark
6019 Push the current process mark set onto the stack and unmark all articles
6020 (@code{gnus-summary-kill-process-mark}).
6021
6022 @item M P y
6023 @kindex M P y (Summary)
6024 @findex gnus-summary-yank-process-mark
6025 Pop the previous process mark set from the stack and restore it
6026 (@code{gnus-summary-yank-process-mark}).
6027
6028 @item M P w
6029 @kindex M P w (Summary)
6030 @findex gnus-summary-save-process-mark
6031 Push the current process mark set onto the stack
6032 (@code{gnus-summary-save-process-mark}).
6033
6034 @end table
6035
6036 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6037 set process marks based on article body contents.
6038
6039
6040 @node Limiting
6041 @section Limiting
6042 @cindex limiting
6043
6044 It can be convenient to limit the summary buffer to just show some
6045 subset of the articles currently in the group.  The effect most limit
6046 commands have is to remove a few (or many) articles from the summary
6047 buffer.
6048
6049 All limiting commands work on subsets of the articles already fetched
6050 from the servers.  None of these commands query the server for
6051 additional articles.
6052
6053 @table @kbd
6054
6055 @item / /
6056 @itemx / s
6057 @kindex / / (Summary)
6058 @findex gnus-summary-limit-to-subject
6059 Limit the summary buffer to articles that match some subject
6060 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6061 matching articles.
6062
6063 @item / a
6064 @kindex / a (Summary)
6065 @findex gnus-summary-limit-to-author
6066 Limit the summary buffer to articles that match some author
6067 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6068 matching articles.
6069
6070 @item / x
6071 @kindex / x (Summary)
6072 @findex gnus-summary-limit-to-extra
6073 Limit the summary buffer to articles that match one of the ``extra''
6074 headers (@pxref{To From Newsgroups})
6075 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6076 matching articles.
6077
6078 @item / u
6079 @itemx x
6080 @kindex / u (Summary)
6081 @kindex x (Summary)
6082 @findex gnus-summary-limit-to-unread
6083 Limit the summary buffer to articles not marked as read
6084 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6085 buffer to articles strictly unread.  This means that ticked and
6086 dormant articles will also be excluded.
6087
6088 @item / m
6089 @kindex / m (Summary)
6090 @findex gnus-summary-limit-to-marks
6091 Ask for a mark and then limit to all articles that have been marked
6092 with that mark (@code{gnus-summary-limit-to-marks}).
6093
6094 @item / t
6095 @kindex / t (Summary)
6096 @findex gnus-summary-limit-to-age
6097 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6098 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6099 articles younger than that number of days.
6100
6101 @item / n
6102 @kindex / n (Summary)
6103 @findex gnus-summary-limit-to-articles
6104 Limit the summary buffer to the current article
6105 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6106 convention (@pxref{Process/Prefix}).
6107
6108 @item / w
6109 @kindex / w (Summary)
6110 @findex gnus-summary-pop-limit
6111 Pop the previous limit off the stack and restore it
6112 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6113 the stack.
6114
6115 @item / .
6116 @kindex / . (Summary)
6117 @findex gnus-summary-limit-to-unseen
6118 Limit the summary buffer to the unseen articles
6119 (@code{gnus-summary-limit-to-unseen}).
6120
6121 @item / v
6122 @kindex / v (Summary)
6123 @findex gnus-summary-limit-to-score
6124 Limit the summary buffer to articles that have a score at or above some
6125 score (@code{gnus-summary-limit-to-score}).
6126
6127 @item / p
6128 @kindex / p (Summary)
6129 @findex gnus-summary-limit-to-display-predicate
6130 Limit the summary buffer to articles that satisfy the @code{display}
6131 group parameter predicate
6132 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6133 Parameters} for more on this predicate.
6134
6135 @item / E
6136 @itemx M S
6137 @kindex M S (Summary)
6138 @kindex / E (Summary)
6139 @findex gnus-summary-limit-include-expunged
6140 Include all expunged articles in the limit
6141 (@code{gnus-summary-limit-include-expunged}).
6142
6143 @item / D
6144 @kindex / D (Summary)
6145 @findex gnus-summary-limit-include-dormant
6146 Include all dormant articles in the limit
6147 (@code{gnus-summary-limit-include-dormant}).
6148
6149 @item / *
6150 @kindex / * (Summary)
6151 @findex gnus-summary-limit-include-cached
6152 Include all cached articles in the limit
6153 (@code{gnus-summary-limit-include-cached}).
6154
6155 @item / d
6156 @kindex / d (Summary)
6157 @findex gnus-summary-limit-exclude-dormant
6158 Exclude all dormant articles from the limit
6159 (@code{gnus-summary-limit-exclude-dormant}).
6160
6161 @item / M
6162 @kindex / M (Summary)
6163 @findex gnus-summary-limit-exclude-marks
6164 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6165
6166 @item / T
6167 @kindex / T (Summary)
6168 @findex gnus-summary-limit-include-thread
6169 Include all the articles in the current thread in the limit.
6170
6171 @item / c
6172 @kindex / c (Summary)
6173 @findex gnus-summary-limit-exclude-childless-dormant
6174 Exclude all dormant articles that have no children from the limit
6175 (@code{gnus-summary-limit-exclude-childless-dormant}).
6176
6177 @item / C
6178 @kindex / C (Summary)
6179 @findex gnus-summary-limit-mark-excluded-as-read
6180 Mark all excluded unread articles as read
6181 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6182 also mark excluded ticked and dormant articles as read.
6183
6184 @item / N
6185 @kindex / N (Summary)
6186 @findex gnus-summary-insert-new-articles
6187 Insert all new articles in the summary buffer. It scans for new emails
6188 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6189
6190 @item / o
6191 @kindex / o (Summary)
6192 @findex gnus-summary-insert-old-articles
6193 Insert all old articles in the summary buffer. If given a numbered
6194 prefix, fetch this number of articles.
6195
6196 @end table
6197
6198
6199 @node Threading
6200 @section Threading
6201 @cindex threading
6202 @cindex article threading
6203
6204 Gnus threads articles by default.  @dfn{To thread} is to put responses
6205 to articles directly after the articles they respond to---in a
6206 hierarchical fashion.
6207
6208 Threading is done by looking at the @code{References} headers of the
6209 articles.  In a perfect world, this would be enough to build pretty
6210 trees, but unfortunately, the @code{References} header is often broken
6211 or simply missing.  Weird news propagation exacerbates the problem,
6212 so one has to employ other heuristics to get pleasing results.  A
6213 plethora of approaches exists, as detailed in horrible detail in
6214 @pxref{Customizing Threading}.
6215
6216 First, a quick overview of the concepts:
6217
6218 @table @dfn
6219 @item root
6220 The top-most article in a thread; the first article in the thread.
6221
6222 @item thread
6223 A tree-like article structure.
6224
6225 @item sub-thread
6226 A small(er) section of this tree-like structure.
6227
6228 @item loose threads
6229 Threads often lose their roots due to article expiry, or due to the root
6230 already having been read in a previous session, and not displayed in the
6231 summary buffer.  We then typically have many sub-threads that really
6232 belong to one thread, but are without connecting roots.  These are
6233 called loose threads.
6234
6235 @item thread gathering
6236 An attempt to gather loose threads into bigger threads.
6237
6238 @item sparse threads
6239 A thread where the missing articles have been ``guessed'' at, and are
6240 displayed as empty lines in the summary buffer.
6241
6242 @end table
6243
6244
6245 @menu
6246 * Customizing Threading::       Variables you can change to affect the threading.
6247 * Thread Commands::             Thread based commands in the summary buffer.
6248 @end menu
6249
6250
6251 @node Customizing Threading
6252 @subsection Customizing Threading
6253 @cindex customizing threading
6254
6255 @menu
6256 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6257 * Filling In Threads::          Making the threads displayed look fuller.
6258 * More Threading::              Even more variables for fiddling with threads.
6259 * Low-Level Threading::         You thought it was over... but you were wrong!
6260 @end menu
6261
6262
6263 @node Loose Threads
6264 @subsubsection Loose Threads
6265 @cindex <
6266 @cindex >
6267 @cindex loose threads
6268
6269 @table @code
6270 @item gnus-summary-make-false-root
6271 @vindex gnus-summary-make-false-root
6272 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6273 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6274 Yup.)  Loose subtrees occur when the real root has expired, or you've
6275 read or killed the root in a previous session.
6276
6277 When there is no real root of a thread, gnus will have to fudge
6278 something.  This variable says what fudging method gnus should use.
6279 There are four possible values:
6280
6281 @iftex
6282 @iflatex
6283 \gnusfigure{The Summary Buffer}{390}{
6284 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6285 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6286 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6287 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6288 }
6289 @end iflatex
6290 @end iftex
6291
6292 @cindex adopting articles
6293
6294 @table @code
6295
6296 @item adopt
6297 Gnus will make the first of the orphaned articles the parent.  This
6298 parent will adopt all the other articles.  The adopted articles will be
6299 marked as such by pointy brackets (@samp{<>}) instead of the standard
6300 square brackets (@samp{[]}).  This is the default method.
6301
6302 @item dummy
6303 @vindex gnus-summary-dummy-line-format
6304 @vindex gnus-summary-make-false-root-always
6305 Gnus will create a dummy summary line that will pretend to be the
6306 parent.  This dummy line does not correspond to any real article, so
6307 selecting it will just select the first real article after the dummy
6308 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6309 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6310 which is the subject of the article.  @xref{Formatting Variables}.
6311 If you want all threads to have a dummy root, even the non-gathered
6312 ones, set @code{gnus-summary-make-false-root-always} to t.
6313
6314 @item empty
6315 Gnus won't actually make any article the parent, but simply leave the
6316 subject field of all orphans except the first empty.  (Actually, it will
6317 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6318 Buffer Format}).)
6319
6320 @item none
6321 Don't make any article parent at all.  Just gather the threads and
6322 display them after one another.
6323
6324 @item nil
6325 Don't gather loose threads.
6326 @end table
6327
6328 @item gnus-summary-gather-subject-limit
6329 @vindex gnus-summary-gather-subject-limit
6330 Loose threads are gathered by comparing subjects of articles.  If this
6331 variable is @code{nil}, gnus requires an exact match between the
6332 subjects of the loose threads before gathering them into one big
6333 super-thread.  This might be too strict a requirement, what with the
6334 presence of stupid newsreaders that chop off long subject lines.  If
6335 you think so, set this variable to, say, 20 to require that only the
6336 first 20 characters of the subjects have to match.  If you set this
6337 variable to a really low number, you'll find that gnus will gather
6338 everything in sight into one thread, which isn't very helpful.
6339
6340 @cindex fuzzy article gathering
6341 If you set this variable to the special value @code{fuzzy}, gnus will
6342 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6343 Matching}).
6344
6345 @item gnus-simplify-subject-fuzzy-regexp
6346 @vindex gnus-simplify-subject-fuzzy-regexp
6347 This can either be a regular expression or list of regular expressions
6348 that match strings that will be removed from subjects if fuzzy subject
6349 simplification is used.
6350
6351 @item gnus-simplify-ignored-prefixes
6352 @vindex gnus-simplify-ignored-prefixes
6353 If you set @code{gnus-summary-gather-subject-limit} to something as low
6354 as 10, you might consider setting this variable to something sensible:
6355
6356 @c Written by Michael Ernst <mernst@cs.rice.edu>
6357 @lisp
6358 (setq gnus-simplify-ignored-prefixes
6359       (concat
6360        "\\`\\[?\\("
6361        (mapconcat
6362         'identity
6363         '("looking"
6364           "wanted" "followup" "summary\\( of\\)?"
6365           "help" "query" "problem" "question"
6366           "answer" "reference" "announce"
6367           "How can I" "How to" "Comparison of"
6368           ;; ...
6369           )
6370         "\\|")
6371        "\\)\\s *\\("
6372        (mapconcat 'identity
6373                   '("for" "for reference" "with" "about")
6374                   "\\|")
6375        "\\)?\\]?:?[ \t]*"))
6376 @end lisp
6377
6378 All words that match this regexp will be removed before comparing two
6379 subjects.
6380
6381 @item gnus-simplify-subject-functions
6382 @vindex gnus-simplify-subject-functions
6383 If non-@code{nil}, this variable overrides
6384 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6385 list of functions to apply to the @code{Subject} string iteratively to
6386 arrive at the simplified version of the string.
6387
6388 Useful functions to put in this list include:
6389
6390 @table @code
6391 @item gnus-simplify-subject-re
6392 @findex gnus-simplify-subject-re
6393 Strip the leading @samp{Re:}.
6394
6395 @item gnus-simplify-subject-fuzzy
6396 @findex gnus-simplify-subject-fuzzy
6397 Simplify fuzzily.
6398
6399 @item gnus-simplify-whitespace
6400 @findex gnus-simplify-whitespace
6401 Remove excessive whitespace.
6402
6403 @item gnus-simplify-all-whitespace
6404 @findex gnus-simplify-all-whitespace
6405 Remove all whitespace.
6406 @end table
6407
6408 You may also write your own functions, of course.
6409
6410
6411 @item gnus-summary-gather-exclude-subject
6412 @vindex gnus-summary-gather-exclude-subject
6413 Since loose thread gathering is done on subjects only, that might lead
6414 to many false hits, especially with certain common subjects like
6415 @samp{} and @samp{(none)}.  To make the situation slightly better,
6416 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6417 what subjects should be excluded from the gathering process.@*
6418 The default is @samp{^ *$\\|^(none)$}.
6419
6420 @item gnus-summary-thread-gathering-function
6421 @vindex gnus-summary-thread-gathering-function
6422 Gnus gathers threads by looking at @code{Subject} headers.  This means
6423 that totally unrelated articles may end up in the same ``thread'', which
6424 is confusing.  An alternate approach is to look at all the
6425 @code{Message-ID}s in all the @code{References} headers to find matches.
6426 This will ensure that no gathered threads ever include unrelated
6427 articles, but it also means that people who have posted with broken
6428 newsreaders won't be gathered properly.  The choice is yours---plague or
6429 cholera:
6430
6431 @table @code
6432 @item gnus-gather-threads-by-subject
6433 @findex gnus-gather-threads-by-subject
6434 This function is the default gathering function and looks at
6435 @code{Subject}s exclusively.
6436
6437 @item gnus-gather-threads-by-references
6438 @findex gnus-gather-threads-by-references
6439 This function looks at @code{References} headers exclusively.
6440 @end table
6441
6442 If you want to test gathering by @code{References}, you could say
6443 something like:
6444
6445 @lisp
6446 (setq gnus-summary-thread-gathering-function
6447       'gnus-gather-threads-by-references)
6448 @end lisp
6449
6450 @end table
6451
6452
6453 @node Filling In Threads
6454 @subsubsection Filling In Threads
6455
6456 @table @code
6457 @item gnus-fetch-old-headers
6458 @vindex gnus-fetch-old-headers
6459 If non-@code{nil}, gnus will attempt to build old threads by fetching
6460 more old headers---headers to articles marked as read.  If you
6461 would like to display as few summary lines as possible, but still
6462 connect as many loose threads as possible, you should set this variable
6463 to @code{some} or a number.  If you set it to a number, no more than
6464 that number of extra old headers will be fetched.  In either case,
6465 fetching old headers only works if the back end you are using carries
6466 overview files---this would normally be @code{nntp}, @code{nnspool},
6467 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6468 the thread has been expired by the server, there's not much Gnus can do
6469 about that.
6470
6471 This variable can also be set to @code{invisible}.  This won't have any
6472 visible effects, but is useful if you use the @kbd{A T} command a lot
6473 (@pxref{Finding the Parent}).
6474
6475 @item gnus-build-sparse-threads
6476 @vindex gnus-build-sparse-threads
6477 Fetching old headers can be slow.  A low-rent similar effect can be
6478 gotten by setting this variable to @code{some}.  Gnus will then look at
6479 the complete @code{References} headers of all articles and try to string
6480 together articles that belong in the same thread.  This will leave
6481 @dfn{gaps} in the threading display where gnus guesses that an article
6482 is missing from the thread.  (These gaps appear like normal summary
6483 lines.  If you select a gap, gnus will try to fetch the article in
6484 question.)  If this variable is @code{t}, gnus will display all these
6485 ``gaps'' without regard for whether they are useful for completing the
6486 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6487 off sparse leaf nodes that don't lead anywhere.  This variable is
6488 @code{nil} by default.
6489
6490 @item gnus-read-all-available-headers
6491 @vindex gnus-read-all-available-headers
6492 This is a rather obscure variable that few will find useful.  It's
6493 intended for those non-news newsgroups where the back end has to fetch
6494 quite a lot to present the summary buffer, and where it's impossible to
6495 go back to parents of articles.  This is mostly the case in the
6496 web-based groups, like the @code{nnultimate} groups.
6497
6498 If you don't use those, then it's safe to leave this as the default
6499 @code{nil}.  If you want to use this variable, it should be a regexp
6500 that matches the group name, or @code{t} for all groups.
6501
6502 @end table
6503
6504
6505 @node More Threading
6506 @subsubsection More Threading
6507
6508 @table @code
6509 @item gnus-show-threads
6510 @vindex gnus-show-threads
6511 If this variable is @code{nil}, no threading will be done, and all of
6512 the rest of the variables here will have no effect.  Turning threading
6513 off will speed group selection up a bit, but it is sure to make reading
6514 slower and more awkward.
6515
6516 @item gnus-thread-hide-subtree
6517 @vindex gnus-thread-hide-subtree
6518 If non-@code{nil}, all threads will be hidden when the summary buffer is
6519 generated.
6520
6521 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6522 Avaliable predicates are @code{gnus-article-unread-p} and
6523 @code{gnus-article-unseen-p}).
6524
6525 Here's an example:
6526
6527 @lisp
6528 (setq gnus-thread-hide-subtree
6529       '(or gnus-article-unread-p
6530            gnus-article-unseen-p))
6531 @end lisp
6532
6533 (It's a pretty nonsensical example, since all unseen articles are also
6534 unread, but you get my drift.)
6535
6536
6537 @item gnus-thread-expunge-below
6538 @vindex gnus-thread-expunge-below
6539 All threads that have a total score (as defined by
6540 @code{gnus-thread-score-function}) less than this number will be
6541 expunged.  This variable is @code{nil} by default, which means that no
6542 threads are expunged.
6543
6544 @item gnus-thread-hide-killed
6545 @vindex gnus-thread-hide-killed
6546 if you kill a thread and this variable is non-@code{nil}, the subtree
6547 will be hidden.
6548
6549 @item gnus-thread-ignore-subject
6550 @vindex gnus-thread-ignore-subject
6551 Sometimes somebody changes the subject in the middle of a thread.  If
6552 this variable is non-@code{nil}, which is the default, the subject
6553 change is ignored.  If it is @code{nil}, a change in the subject will
6554 result in a new thread.
6555
6556 @item gnus-thread-indent-level
6557 @vindex gnus-thread-indent-level
6558 This is a number that says how much each sub-thread should be indented.
6559 The default is 4.
6560
6561 @item gnus-sort-gathered-threads-function
6562 @vindex gnus-sort-gathered-threads-function
6563 Sometimes, particularly with mailing lists, the order in which mails
6564 arrive locally is not necessarily the same as the order in which they
6565 arrived on the mailing list.  Consequently, when sorting sub-threads
6566 using the default @code{gnus-thread-sort-by-number}, responses can end
6567 up appearing before the article to which they are responding to.
6568 Setting this variable to an alternate value
6569 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6570 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6571 more logical sub-thread ordering in such instances.
6572
6573 @end table
6574
6575
6576 @node Low-Level Threading
6577 @subsubsection Low-Level Threading
6578
6579 @table @code
6580
6581 @item gnus-parse-headers-hook
6582 @vindex gnus-parse-headers-hook
6583 Hook run before parsing any headers.  The default value is
6584 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6585 @code{default-mime-charset} in summary buffer based on variable
6586 @code{gnus-newsgroup-default-charset-alist}.
6587
6588 @item gnus-alter-header-function
6589 @vindex gnus-alter-header-function
6590 If non-@code{nil}, this function will be called to allow alteration of
6591 article header structures.  The function is called with one parameter,
6592 the article header vector, which it may alter in any way.  For instance,
6593 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6594 in systematic ways (by adding prefixes and such), you can use this
6595 variable to un-scramble the @code{Message-ID}s so that they are more
6596 meaningful.  Here's one example:
6597
6598 @lisp
6599 (setq gnus-alter-header-function 'my-alter-message-id)
6600
6601 (defun my-alter-message-id (header)
6602   (let ((id (mail-header-id header)))
6603     (when (string-match
6604            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6605       (mail-header-set-id
6606        (concat (match-string 1 id) "@@" (match-string 2 id))
6607        header))))
6608 @end lisp
6609
6610 @end table
6611
6612
6613 @node Thread Commands
6614 @subsection Thread Commands
6615 @cindex thread commands
6616
6617 @table @kbd
6618
6619 @item T k
6620 @itemx C-M-k
6621 @kindex T k (Summary)
6622 @kindex C-M-k (Summary)
6623 @findex gnus-summary-kill-thread
6624 Mark all articles in the current (sub-)thread as read
6625 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6626 remove all marks instead.  If the prefix argument is negative, tick
6627 articles instead.
6628
6629 @item T l
6630 @itemx C-M-l
6631 @kindex T l (Summary)
6632 @kindex C-M-l (Summary)
6633 @findex gnus-summary-lower-thread
6634 Lower the score of the current (sub-)thread
6635 (@code{gnus-summary-lower-thread}).
6636
6637 @item T i
6638 @kindex T i (Summary)
6639 @findex gnus-summary-raise-thread
6640 Increase the score of the current (sub-)thread
6641 (@code{gnus-summary-raise-thread}).
6642
6643 @item T #
6644 @kindex T # (Summary)
6645 @findex gnus-uu-mark-thread
6646 Set the process mark on the current (sub-)thread
6647 (@code{gnus-uu-mark-thread}).
6648
6649 @item T M-#
6650 @kindex T M-# (Summary)
6651 @findex gnus-uu-unmark-thread
6652 Remove the process mark from the current (sub-)thread
6653 (@code{gnus-uu-unmark-thread}).
6654
6655 @item T T
6656 @kindex T T (Summary)
6657 @findex gnus-summary-toggle-threads
6658 Toggle threading (@code{gnus-summary-toggle-threads}).
6659
6660 @item T s
6661 @kindex T s (Summary)
6662 @findex gnus-summary-show-thread
6663 Expose the (sub-)thread hidden under the current article, if any
6664 (@code{gnus-summary-show-thread}).
6665
6666 @item T h
6667 @kindex T h (Summary)
6668 @findex gnus-summary-hide-thread
6669 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6670
6671 @item T S
6672 @kindex T S (Summary)
6673 @findex gnus-summary-show-all-threads
6674 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6675
6676 @item T H
6677 @kindex T H (Summary)
6678 @findex gnus-summary-hide-all-threads
6679 Hide all threads (@code{gnus-summary-hide-all-threads}).
6680
6681 @item T t
6682 @kindex T t (Summary)
6683 @findex gnus-summary-rethread-current
6684 Re-thread the current article's thread
6685 (@code{gnus-summary-rethread-current}).  This works even when the
6686 summary buffer is otherwise unthreaded.
6687
6688 @item T ^
6689 @kindex T ^ (Summary)
6690 @findex gnus-summary-reparent-thread
6691 Make the current article the child of the marked (or previous) article
6692 (@code{gnus-summary-reparent-thread}).
6693
6694 @end table
6695
6696 The following commands are thread movement commands.  They all
6697 understand the numeric prefix.
6698
6699 @table @kbd
6700
6701 @item T n
6702 @kindex T n (Summary)
6703 @itemx C-M-f
6704 @kindex C-M-n (Summary)
6705 @itemx M-down
6706 @kindex M-down (Summary)
6707 @findex gnus-summary-next-thread
6708 Go to the next thread (@code{gnus-summary-next-thread}).
6709
6710 @item T p
6711 @kindex T p (Summary)
6712 @itemx C-M-b
6713 @kindex C-M-p (Summary)
6714 @itemx M-up
6715 @kindex M-up (Summary)
6716 @findex gnus-summary-prev-thread
6717 Go to the previous thread (@code{gnus-summary-prev-thread}).
6718
6719 @item T d
6720 @kindex T d (Summary)
6721 @findex gnus-summary-down-thread
6722 Descend the thread (@code{gnus-summary-down-thread}).
6723
6724 @item T u
6725 @kindex T u (Summary)
6726 @findex gnus-summary-up-thread
6727 Ascend the thread (@code{gnus-summary-up-thread}).
6728
6729 @item T o
6730 @kindex T o (Summary)
6731 @findex gnus-summary-top-thread
6732 Go to the top of the thread (@code{gnus-summary-top-thread}).
6733 @end table
6734
6735 @vindex gnus-thread-operation-ignore-subject
6736 If you ignore subject while threading, you'll naturally end up with
6737 threads that have several different subjects in them.  If you then issue
6738 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
6739 wish to kill the entire thread, but just those parts of the thread that
6740 have the same subject as the current article.  If you like this idea,
6741 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6742 is non-@code{nil} (which it is by default), subjects will be ignored
6743 when doing thread commands.  If this variable is @code{nil}, articles in
6744 the same thread with different subjects will not be included in the
6745 operation in question.  If this variable is @code{fuzzy}, only articles
6746 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6747 Matching}).
6748
6749
6750 @node Sorting the Summary Buffer
6751 @section Sorting the Summary Buffer
6752
6753 @findex gnus-thread-sort-by-total-score
6754 @findex gnus-thread-sort-by-date
6755 @findex gnus-thread-sort-by-score
6756 @findex gnus-thread-sort-by-subject
6757 @findex gnus-thread-sort-by-author
6758 @findex gnus-thread-sort-by-number
6759 @findex gnus-thread-sort-by-random
6760 @vindex gnus-thread-sort-functions
6761 @findex gnus-thread-sort-by-most-recent-thread
6762 If you are using a threaded summary display, you can sort the threads by
6763 setting @code{gnus-thread-sort-functions}, which can be either a single
6764 function, a list of functions, or a list containing functions and
6765 @code{(not some-function)} elements.
6766
6767 By default, sorting is done on article numbers.  Ready-made sorting
6768 predicate functions include @code{gnus-thread-sort-by-number},
6769 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6770 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6771 @code{gnus-thread-sort-by-most-recent-number},
6772 @code{gnus-thread-sort-by-most-recent-date},
6773 @code{gnus-thread-sort-by-random} and
6774 @code{gnus-thread-sort-by-total-score}.
6775
6776 Each function takes two threads and returns non-@code{nil} if the first
6777 thread should be sorted before the other.  Note that sorting really is
6778 normally done by looking only at the roots of each thread.
6779
6780 If you use more than one function, the primary sort key should be the
6781 last function in the list.  You should probably always include
6782 @code{gnus-thread-sort-by-number} in the list of sorting
6783 functions---preferably first.  This will ensure that threads that are
6784 equal with respect to the other sort criteria will be displayed in
6785 ascending article order.
6786
6787 If you would like to sort by reverse score, then by subject, and finally
6788 by number, you could do something like:
6789
6790 @lisp
6791 (setq gnus-thread-sort-functions
6792       '(gnus-thread-sort-by-number
6793         gnus-thread-sort-by-subject
6794         (not gnus-thread-sort-by-total-score)))
6795 @end lisp
6796
6797 The threads that have highest score will be displayed first in the
6798 summary buffer.  When threads have the same score, they will be sorted
6799 alphabetically.  The threads that have the same score and the same
6800 subject will be sorted by number, which is (normally) the sequence in
6801 which the articles arrived.
6802
6803 If you want to sort by score and then reverse arrival order, you could
6804 say something like:
6805
6806 @lisp
6807 (setq gnus-thread-sort-functions
6808       '((lambda (t1 t2)
6809           (not (gnus-thread-sort-by-number t1 t2)))
6810         gnus-thread-sort-by-score))
6811 @end lisp
6812
6813 @vindex gnus-thread-score-function
6814 The function in the @code{gnus-thread-score-function} variable (default
6815 @code{+}) is used for calculating the total score of a thread.  Useful
6816 functions might be @code{max}, @code{min}, or squared means, or whatever
6817 tickles your fancy.
6818
6819 @findex gnus-article-sort-functions
6820 @findex gnus-article-sort-by-date
6821 @findex gnus-article-sort-by-score
6822 @findex gnus-article-sort-by-subject
6823 @findex gnus-article-sort-by-author
6824 @findex gnus-article-sort-by-random
6825 @findex gnus-article-sort-by-number
6826 If you are using an unthreaded display for some strange reason or
6827 other, you have to fiddle with the @code{gnus-article-sort-functions}
6828 variable.  It is very similar to the
6829 @code{gnus-thread-sort-functions}, except that it uses slightly
6830 different functions for article comparison.  Available sorting
6831 predicate functions are @code{gnus-article-sort-by-number},
6832 @code{gnus-article-sort-by-author},
6833 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6834 @code{gnus-article-sort-by-random}, and
6835 @code{gnus-article-sort-by-score}.
6836
6837 If you want to sort an unthreaded summary display by subject, you could
6838 say something like:
6839
6840 @lisp
6841 (setq gnus-article-sort-functions
6842       '(gnus-article-sort-by-number
6843         gnus-article-sort-by-subject))
6844 @end lisp
6845
6846
6847
6848 @node Asynchronous Fetching
6849 @section Asynchronous Article Fetching
6850 @cindex asynchronous article fetching
6851 @cindex article pre-fetch
6852 @cindex pre-fetch
6853
6854 If you read your news from an @sc{nntp} server that's far away, the
6855 network latencies may make reading articles a chore.  You have to wait
6856 for a while after pressing @kbd{n} to go to the next article before the
6857 article appears.  Why can't gnus just go ahead and fetch the article
6858 while you are reading the previous one?  Why not, indeed.
6859
6860 First, some caveats.  There are some pitfalls to using asynchronous
6861 article fetching, especially the way gnus does it.
6862
6863 Let's say you are reading article 1, which is short, and article 2 is
6864 quite long, and you are not interested in reading that.  Gnus does not
6865 know this, so it goes ahead and fetches article 2.  You decide to read
6866 article 3, but since gnus is in the process of fetching article 2, the
6867 connection is blocked.
6868
6869 To avoid these situations, gnus will open two (count 'em two)
6870 connections to the server.  Some people may think this isn't a very nice
6871 thing to do, but I don't see any real alternatives.  Setting up that
6872 extra connection takes some time, so gnus startup will be slower.
6873
6874 Gnus will fetch more articles than you will read.  This will mean that
6875 the link between your machine and the @sc{nntp} server will become more
6876 loaded than if you didn't use article pre-fetch.  The server itself will
6877 also become more loaded---both with the extra article requests, and the
6878 extra connection.
6879
6880 Ok, so now you know that you shouldn't really use this thing...  unless
6881 you really want to.
6882
6883 @vindex gnus-asynchronous
6884 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
6885 happen automatically.
6886
6887 @vindex gnus-use-article-prefetch
6888 You can control how many articles are to be pre-fetched by setting
6889 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
6890 that when you read an article in the group, the back end will pre-fetch
6891 the next 30 articles.  If this variable is @code{t}, the back end will
6892 pre-fetch all the articles it can without bound.  If it is
6893 @code{nil}, no pre-fetching will be done.
6894
6895 @vindex gnus-async-prefetch-article-p
6896 @findex gnus-async-read-p
6897 There are probably some articles that you don't want to pre-fetch---read
6898 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
6899 return non-@code{nil} when the article in question is to be
6900 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
6901 @code{nil} on read articles.  The function is called with an article
6902 data structure as the only parameter.
6903
6904 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
6905
6906 @lisp
6907 (defun my-async-short-unread-p (data)
6908   "Return non-nil for short, unread articles."
6909   (and (gnus-data-unread-p data)
6910        (< (mail-header-lines (gnus-data-header data))
6911           100)))
6912
6913 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
6914 @end lisp
6915
6916 These functions will be called many, many times, so they should
6917 preferably be short and sweet to avoid slowing down gnus too much.
6918 It's probably a good idea to byte-compile things like this.
6919
6920 @vindex gnus-prefetched-article-deletion-strategy
6921 Articles have to be removed from the asynch buffer sooner or later.  The
6922 @code{gnus-prefetched-article-deletion-strategy} says when to remove
6923 articles.  This is a list that may contain the following elements:
6924
6925 @table @code
6926 @item read
6927 Remove articles when they are read.
6928
6929 @item exit
6930 Remove articles when exiting the group.
6931 @end table
6932
6933 The default value is @code{(read exit)}.
6934
6935 @c @vindex gnus-use-header-prefetch
6936 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
6937 @c from the next group.
6938
6939
6940 @node Article Caching
6941 @section Article Caching
6942 @cindex article caching
6943 @cindex caching
6944
6945 If you have an @emph{extremely} slow @sc{nntp} connection, you may
6946 consider turning article caching on.  Each article will then be stored
6947 locally under your home directory.  As you may surmise, this could
6948 potentially use @emph{huge} amounts of disk space, as well as eat up all
6949 your inodes so fast it will make your head swim.  In vodka.
6950
6951 Used carefully, though, it could be just an easier way to save articles.
6952
6953 @vindex gnus-use-long-file-name
6954 @vindex gnus-cache-directory
6955 @vindex gnus-use-cache
6956 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
6957 all articles ticked or marked as dormant will then be copied
6958 over to your local cache (@code{gnus-cache-directory}).  Whether this
6959 cache is flat or hierarchical is controlled by the
6960 @code{gnus-use-long-file-name} variable, as usual.
6961
6962 When re-selecting a ticked or dormant article, it will be fetched from the
6963 cache instead of from the server.  As articles in your cache will never
6964 expire, this might serve as a method of saving articles while still
6965 keeping them where they belong.  Just mark all articles you want to save
6966 as dormant, and don't worry.
6967
6968 When an article is marked as read, is it removed from the cache.
6969
6970 @vindex gnus-cache-remove-articles
6971 @vindex gnus-cache-enter-articles
6972 The entering/removal of articles from the cache is controlled by the
6973 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
6974 variables.  Both are lists of symbols.  The first is @code{(ticked
6975 dormant)} by default, meaning that ticked and dormant articles will be
6976 put in the cache.  The latter is @code{(read)} by default, meaning that
6977 articles marked as read are removed from the cache.  Possibly
6978 symbols in these two lists are @code{ticked}, @code{dormant},
6979 @code{unread} and @code{read}.
6980
6981 @findex gnus-jog-cache
6982 So where does the massive article-fetching and storing come into the
6983 picture?  The @code{gnus-jog-cache} command will go through all
6984 subscribed newsgroups, request all unread articles, score them, and
6985 store them in the cache.  You should only ever, ever ever ever, use this
6986 command if 1) your connection to the @sc{nntp} server is really, really,
6987 really slow and 2) you have a really, really, really huge disk.
6988 Seriously.  One way to cut down on the number of articles downloaded is
6989 to score unwanted articles down and have them marked as read.  They will
6990 not then be downloaded by this command.
6991
6992 @vindex gnus-uncacheable-groups
6993 @vindex gnus-cacheable-groups
6994 It is likely that you do not want caching on all groups.  For instance,
6995 if your @code{nnml} mail is located under your home directory, it makes no
6996 sense to cache it somewhere else under your home directory.  Unless you
6997 feel that it's neat to use twice as much space.
6998
6999 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7000 regexp of groups to cache, @samp{^nntp} for instance, or set the
7001 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7002 Both variables are @code{nil} by default.  If a group matches both
7003 variables, the group is not cached.
7004
7005 @findex gnus-cache-generate-nov-databases
7006 @findex gnus-cache-generate-active
7007 @vindex gnus-cache-active-file
7008 The cache stores information on what articles it contains in its active
7009 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7010 of the cache) becomes all messed up for some reason or other, gnus
7011 offers two functions that will try to set things right.  @kbd{M-x
7012 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
7013 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7014 file.
7015
7016 @findex gnus-cache-move-cache
7017 @code{gnus-cache-move-cache} will move your whole
7018 @code{gnus-cache-directory} to some other location. You get asked to
7019 where, isn't that cool?
7020
7021 @node Persistent Articles
7022 @section Persistent Articles
7023 @cindex persistent articles
7024
7025 Closely related to article caching, we have @dfn{persistent articles}.
7026 In fact, it's just a different way of looking at caching, and much more
7027 useful in my opinion.
7028
7029 Say you're reading a newsgroup, and you happen on to some valuable gem
7030 that you want to keep and treasure forever.  You'd normally just save it
7031 (using one of the many saving commands) in some file.  The problem with
7032 that is that it's just, well, yucky.  Ideally you'd prefer just having
7033 the article remain in the group where you found it forever; untouched by
7034 the expiry going on at the news server.
7035
7036 This is what a @dfn{persistent article} is---an article that just won't
7037 be deleted.  It's implemented using the normal cache functions, but
7038 you use two explicit commands for managing persistent articles:
7039
7040 @table @kbd
7041
7042 @item *
7043 @kindex * (Summary)
7044 @findex gnus-cache-enter-article
7045 Make the current article persistent (@code{gnus-cache-enter-article}).
7046
7047 @item M-*
7048 @kindex M-* (Summary)
7049 @findex gnus-cache-remove-article
7050 Remove the current article from the persistent articles
7051 (@code{gnus-cache-remove-article}).  This will normally delete the
7052 article.
7053 @end table
7054
7055 Both these commands understand the process/prefix convention.
7056
7057 To avoid having all ticked articles (and stuff) entered into the cache,
7058 you should set @code{gnus-use-cache} to @code{passive} if you're just
7059 interested in persistent articles:
7060
7061 @lisp
7062 (setq gnus-use-cache 'passive)
7063 @end lisp
7064
7065
7066 @node Article Backlog
7067 @section Article Backlog
7068 @cindex backlog
7069 @cindex article backlog
7070
7071 If you have a slow connection, but the idea of using caching seems
7072 unappealing to you (and it is, really), you can help the situation some
7073 by switching on the @dfn{backlog}.  This is where gnus will buffer
7074 already read articles so that it doesn't have to re-fetch articles
7075 you've already read.  This only helps if you are in the habit of
7076 re-selecting articles you've recently read, of course.  If you never do
7077 that, turning the backlog on will slow gnus down a little bit, and
7078 increase memory usage some.
7079
7080 @vindex gnus-keep-backlog
7081 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7082 at most @var{n} old articles in a buffer for later re-fetching.  If this
7083 variable is non-@code{nil} and is not a number, gnus will store
7084 @emph{all} read articles, which means that your Emacs will grow without
7085 bound before exploding and taking your machine down with you.  I put
7086 that in there just to keep y'all on your toes.
7087
7088 This variable is @code{nil} by default.
7089
7090
7091 @node Saving Articles
7092 @section Saving Articles
7093 @cindex saving articles
7094
7095 Gnus can save articles in a number of ways.  Below is the documentation
7096 for saving articles in a fairly straight-forward fashion (i.e., little
7097 processing of the article is done before it is saved).  For a different
7098 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7099 (@pxref{Decoding Articles}).
7100
7101 For the commands listed here, the target is a file.  If you want to
7102 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7103 command (@pxref{Mail Group Commands}).
7104
7105 @vindex gnus-save-all-headers
7106 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7107 unwanted headers before saving the article.
7108
7109 @vindex gnus-saved-headers
7110 If the preceding variable is @code{nil}, all headers that match the
7111 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7112 deleted before saving.
7113
7114 @table @kbd
7115
7116 @item O o
7117 @itemx o
7118 @kindex O o (Summary)
7119 @kindex o (Summary)
7120 @findex gnus-summary-save-article
7121 @c @icon{gnus-summary-save-article}
7122 Save the current article using the default article saver
7123 (@code{gnus-summary-save-article}).
7124
7125 @item O m
7126 @kindex O m (Summary)
7127 @findex gnus-summary-save-article-mail
7128 Save the current article in mail format
7129 (@code{gnus-summary-save-article-mail}).
7130
7131 @item O r
7132 @kindex O r (Summary)
7133 @findex gnus-summary-save-article-rmail
7134 Save the current article in rmail format
7135 (@code{gnus-summary-save-article-rmail}).
7136
7137 @item O f
7138 @kindex O f (Summary)
7139 @findex gnus-summary-save-article-file
7140 @c @icon{gnus-summary-save-article-file}
7141 Save the current article in plain file format
7142 (@code{gnus-summary-save-article-file}).
7143
7144 @item O F
7145 @kindex O F (Summary)
7146 @findex gnus-summary-write-article-file
7147 Write the current article in plain file format, overwriting any previous
7148 file contents (@code{gnus-summary-write-article-file}).
7149
7150 @item O b
7151 @kindex O b (Summary)
7152 @findex gnus-summary-save-article-body-file
7153 Save the current article body in plain file format
7154 (@code{gnus-summary-save-article-body-file}).
7155
7156 @item O h
7157 @kindex O h (Summary)
7158 @findex gnus-summary-save-article-folder
7159 Save the current article in mh folder format
7160 (@code{gnus-summary-save-article-folder}).
7161
7162 @item O v
7163 @kindex O v (Summary)
7164 @findex gnus-summary-save-article-vm
7165 Save the current article in a VM folder
7166 (@code{gnus-summary-save-article-vm}).
7167
7168 @item O p
7169 @itemx |
7170 @kindex O p (Summary)
7171 @kindex | (Summary)
7172 @findex gnus-summary-pipe-output
7173 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7174 the current article to a process (@code{gnus-summary-pipe-output}).
7175 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7176 complete headers in the piped output.
7177
7178 @item O P
7179 @kindex O P (Summary)
7180 @findex gnus-summary-muttprint
7181 @vindex gnus-summary-muttprint-program
7182 Save the current article into muttprint. That is, print it using the
7183 external program Muttprint (see
7184 @uref{http://muttprint.sourceforge.net/}). The program name and
7185 options to use is controlled by the variable
7186 @code{gnus-summary-muttprint-program}. (@code{gnus-summary-muttprint}).
7187
7188 @end table
7189
7190 @vindex gnus-prompt-before-saving
7191 All these commands use the process/prefix convention
7192 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7193 functions, you might get tired of being prompted for files to save each
7194 and every article in.  The prompting action is controlled by
7195 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7196 default, giving you that excessive prompting action you know and
7197 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7198 just once for each series of articles you save.  If you like to really
7199 have Gnus do all your thinking for you, you can even set this variable
7200 to @code{nil}, which means that you will never be prompted for files to
7201 save articles in.  Gnus will simply save all the articles in the default
7202 files.
7203
7204
7205 @vindex gnus-default-article-saver
7206 You can customize the @code{gnus-default-article-saver} variable to make
7207 gnus do what you want it to.  You can use any of the six ready-made
7208 functions below, or you can create your own.
7209
7210 @table @code
7211
7212 @item gnus-summary-save-in-rmail
7213 @findex gnus-summary-save-in-rmail
7214 @vindex gnus-rmail-save-name
7215 @findex gnus-plain-save-name
7216 This is the default format, @dfn{babyl}.  Uses the function in the
7217 @code{gnus-rmail-save-name} variable to get a file name to save the
7218 article in.  The default is @code{gnus-plain-save-name}.
7219
7220 @item gnus-summary-save-in-mail
7221 @findex gnus-summary-save-in-mail
7222 @vindex gnus-mail-save-name
7223 Save in a Unix mail (mbox) file.  Uses the function in the
7224 @code{gnus-mail-save-name} variable to get a file name to save the
7225 article in.  The default is @code{gnus-plain-save-name}.
7226
7227 @item gnus-summary-save-in-file
7228 @findex gnus-summary-save-in-file
7229 @vindex gnus-file-save-name
7230 @findex gnus-numeric-save-name
7231 Append the article straight to an ordinary file.  Uses the function in
7232 the @code{gnus-file-save-name} variable to get a file name to save the
7233 article in.  The default is @code{gnus-numeric-save-name}.
7234
7235 @item gnus-summary-write-to-file
7236 @findex gnus-summary-write-to-file
7237 Write the article straight to an ordinary file.  The file is
7238 overwritten if it exists.  Uses the function in the
7239 @code{gnus-file-save-name} variable to get a file name to save the
7240 article in.  The default is @code{gnus-numeric-save-name}.
7241
7242 @item gnus-summary-save-body-in-file
7243 @findex gnus-summary-save-body-in-file
7244 Append the article body to an ordinary file.  Uses the function in the
7245 @code{gnus-file-save-name} variable to get a file name to save the
7246 article in.  The default is @code{gnus-numeric-save-name}.
7247
7248 @item gnus-summary-save-in-folder
7249 @findex gnus-summary-save-in-folder
7250 @findex gnus-folder-save-name
7251 @findex gnus-Folder-save-name
7252 @vindex gnus-folder-save-name
7253 @cindex rcvstore
7254 @cindex MH folders
7255 Save the article to an MH folder using @code{rcvstore} from the MH
7256 library.  Uses the function in the @code{gnus-folder-save-name} variable
7257 to get a file name to save the article in.  The default is
7258 @code{gnus-folder-save-name}, but you can also use
7259 @code{gnus-Folder-save-name}, which creates capitalized names.
7260
7261 @item gnus-summary-save-in-vm
7262 @findex gnus-summary-save-in-vm
7263 Save the article in a VM folder.  You have to have the VM mail
7264 reader to use this setting.
7265 @end table
7266
7267 @vindex gnus-article-save-directory
7268 All of these functions, except for the last one, will save the article
7269 in the @code{gnus-article-save-directory}, which is initialized from the
7270 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
7271 default.
7272
7273 As you can see above, the functions use different functions to find a
7274 suitable name of a file to save the article in.  Below is a list of
7275 available functions that generate names:
7276
7277 @table @code
7278
7279 @item gnus-Numeric-save-name
7280 @findex gnus-Numeric-save-name
7281 File names like @file{~/News/Alt.andrea-dworkin/45}.
7282
7283 @item gnus-numeric-save-name
7284 @findex gnus-numeric-save-name
7285 File names like @file{~/News/alt.andrea-dworkin/45}.
7286
7287 @item gnus-Plain-save-name
7288 @findex gnus-Plain-save-name
7289 File names like @file{~/News/Alt.andrea-dworkin}.
7290
7291 @item gnus-plain-save-name
7292 @findex gnus-plain-save-name
7293 File names like @file{~/News/alt.andrea-dworkin}.
7294
7295 @item gnus-sender-save-name
7296 @findex gnus-sender-save-name
7297 File names like @file{~/News/larsi}.
7298 @end table
7299
7300 @vindex gnus-split-methods
7301 You can have gnus suggest where to save articles by plonking a regexp into
7302 the @code{gnus-split-methods} alist.  For instance, if you would like to
7303 save articles related to gnus in the file @file{gnus-stuff}, and articles
7304 related to VM in @code{vm-stuff}, you could set this variable to something
7305 like:
7306
7307 @lisp
7308 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7309  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7310  (my-choosing-function "../other-dir/my-stuff")
7311  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7312 @end lisp
7313
7314 We see that this is a list where each element is a list that has two
7315 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7316 a string (in which case it is used as a regexp to match on the article
7317 head); it can be a symbol (which will be called as a function with the
7318 group name as a parameter); or it can be a list (which will be
7319 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7320 the @dfn{file} will be used as a default prompt.  In addition, the
7321 result of the operation itself will be used if the function or form
7322 called returns a string or a list of strings.
7323
7324 You basically end up with a list of file names that might be used when
7325 saving the current article.  (All ``matches'' will be used.)  You will
7326 then be prompted for what you really want to use as a name, with file
7327 name completion over the results from applying this variable.
7328
7329 This variable is @code{((gnus-article-archive-name))} by default, which
7330 means that gnus will look at the articles it saves for an
7331 @code{Archive-name} line and use that as a suggestion for the file
7332 name.
7333
7334 Here's an example function to clean up file names somewhat.  If you have
7335 lots of mail groups called things like
7336 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7337 these group names before creating the file name to save to.  The
7338 following will do just that:
7339
7340 @lisp
7341 (defun my-save-name (group)
7342   (when (string-match "^nnml:mail." group)
7343     (substring group (match-end 0))))
7344
7345 (setq gnus-split-methods
7346       '((gnus-article-archive-name)
7347         (my-save-name)))
7348 @end lisp
7349
7350
7351 @vindex gnus-use-long-file-name
7352 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7353 @code{nil}, all the preceding functions will replace all periods
7354 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7355 the functions will generate hierarchies of directories instead of having
7356 all the files in the top level directory
7357 (@file{~/News/alt/andrea-dworkin} instead of
7358 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7359 on most systems.  However, for historical reasons, this is @code{nil} on
7360 Xenix and usg-unix-v machines by default.
7361
7362 This function also affects kill and score file names.  If this variable
7363 is a list, and the list contains the element @code{not-score}, long file
7364 names will not be used for score files, if it contains the element
7365 @code{not-save}, long file names will not be used for saving, and if it
7366 contains the element @code{not-kill}, long file names will not be used
7367 for kill files.
7368
7369 If you'd like to save articles in a hierarchy that looks something like
7370 a spool, you could
7371
7372 @lisp
7373 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
7374 (setq gnus-default-article-saver
7375       'gnus-summary-save-in-file) ; no encoding
7376 @end lisp
7377
7378 Then just save with @kbd{o}.  You'd then read this hierarchy with
7379 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7380 the top level directory as the argument (@file{~/News/}).  Then just walk
7381 around to the groups/directories with @code{nneething}.
7382
7383
7384 @node Decoding Articles
7385 @section Decoding Articles
7386 @cindex decoding articles
7387
7388 Sometime users post articles (or series of articles) that have been
7389 encoded in some way or other.  Gnus can decode them for you.
7390
7391 @menu
7392 * Uuencoded Articles::          Uudecode articles.
7393 * Shell Archives::              Unshar articles.
7394 * PostScript Files::            Split PostScript.
7395 * Other Files::                 Plain save and binhex.
7396 * Decoding Variables::          Variables for a happy decoding.
7397 * Viewing Files::               You want to look at the result of the decoding?
7398 @end menu
7399
7400 @cindex series
7401 @cindex article series
7402 All these functions use the process/prefix convention
7403 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7404 the extension that a ``single article'' means ``a single series''.  Gnus
7405 can find out by itself what articles belong to a series, decode all the
7406 articles and unpack/view/save the resulting file(s).
7407
7408 Gnus guesses what articles are in the series according to the following
7409 simplish rule: The subjects must be (nearly) identical, except for the
7410 last two numbers of the line.  (Spaces are largely ignored, however.)
7411
7412 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7413 will find all the articles that match the regexp @samp{^cat.gif
7414 ([0-9]+/[0-9]+).*$}.
7415
7416 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7417 series}, will not be properly recognized by any of the automatic viewing
7418 commands, and you have to mark the articles manually with @kbd{#}.
7419
7420
7421 @node Uuencoded Articles
7422 @subsection Uuencoded Articles
7423 @cindex uudecode
7424 @cindex uuencoded articles
7425
7426 @table @kbd
7427
7428 @item X u
7429 @kindex X u (Summary)
7430 @findex gnus-uu-decode-uu
7431 @c @icon{gnus-uu-decode-uu}
7432 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7433
7434 @item X U
7435 @kindex X U (Summary)
7436 @findex gnus-uu-decode-uu-and-save
7437 Uudecodes and saves the current series
7438 (@code{gnus-uu-decode-uu-and-save}).
7439
7440 @item X v u
7441 @kindex X v u (Summary)
7442 @findex gnus-uu-decode-uu-view
7443 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7444
7445 @item X v U
7446 @kindex X v U (Summary)
7447 @findex gnus-uu-decode-uu-and-save-view
7448 Uudecodes, views and saves the current series
7449 (@code{gnus-uu-decode-uu-and-save-view}).
7450
7451 @end table
7452
7453 Remember that these all react to the presence of articles marked with
7454 the process mark.  If, for instance, you'd like to decode and save an
7455 entire newsgroup, you'd typically do @kbd{M P a}
7456 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7457 (@code{gnus-uu-decode-uu-and-save}).
7458
7459 All this is very much different from how @code{gnus-uu} worked with
7460 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7461 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7462 articles in some way (@pxref{Setting Process Marks}) and then press
7463 @kbd{X u}.
7464
7465 @vindex gnus-uu-notify-files
7466 Note: When trying to decode articles that have names matching
7467 @code{gnus-uu-notify-files}, which is hard-coded to
7468 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7469 automatically post an article on @samp{comp.unix.wizards} saying that
7470 you have just viewed the file in question.  This feature can't be turned
7471 off.
7472
7473
7474 @node Shell Archives
7475 @subsection Shell Archives
7476 @cindex unshar
7477 @cindex shell archives
7478 @cindex shared articles
7479
7480 Shell archives (``shar files'') used to be a popular way to distribute
7481 sources, but it isn't used all that much today.  In any case, we have
7482 some commands to deal with these:
7483
7484 @table @kbd
7485
7486 @item X s
7487 @kindex X s (Summary)
7488 @findex gnus-uu-decode-unshar
7489 Unshars the current series (@code{gnus-uu-decode-unshar}).
7490
7491 @item X S
7492 @kindex X S (Summary)
7493 @findex gnus-uu-decode-unshar-and-save
7494 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7495
7496 @item X v s
7497 @kindex X v s (Summary)
7498 @findex gnus-uu-decode-unshar-view
7499 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7500
7501 @item X v S
7502 @kindex X v S (Summary)
7503 @findex gnus-uu-decode-unshar-and-save-view
7504 Unshars, views and saves the current series
7505 (@code{gnus-uu-decode-unshar-and-save-view}).
7506 @end table
7507
7508
7509 @node PostScript Files
7510 @subsection PostScript Files
7511 @cindex PostScript
7512
7513 @table @kbd
7514
7515 @item X p
7516 @kindex X p (Summary)
7517 @findex gnus-uu-decode-postscript
7518 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7519
7520 @item X P
7521 @kindex X P (Summary)
7522 @findex gnus-uu-decode-postscript-and-save
7523 Unpack and save the current PostScript series
7524 (@code{gnus-uu-decode-postscript-and-save}).
7525
7526 @item X v p
7527 @kindex X v p (Summary)
7528 @findex gnus-uu-decode-postscript-view
7529 View the current PostScript series
7530 (@code{gnus-uu-decode-postscript-view}).
7531
7532 @item X v P
7533 @kindex X v P (Summary)
7534 @findex gnus-uu-decode-postscript-and-save-view
7535 View and save the current PostScript series
7536 (@code{gnus-uu-decode-postscript-and-save-view}).
7537 @end table
7538
7539
7540 @node Other Files
7541 @subsection Other Files
7542
7543 @table @kbd
7544 @item X o
7545 @kindex X o (Summary)
7546 @findex gnus-uu-decode-save
7547 Save the current series
7548 (@code{gnus-uu-decode-save}).
7549
7550 @item X b
7551 @kindex X b (Summary)
7552 @findex gnus-uu-decode-binhex
7553 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7554 doesn't really work yet.
7555 @end table
7556
7557
7558 @node Decoding Variables
7559 @subsection Decoding Variables
7560
7561 Adjective, not verb.
7562
7563 @menu
7564 * Rule Variables::              Variables that say how a file is to be viewed.
7565 * Other Decode Variables::      Other decode variables.
7566 * Uuencoding and Posting::      Variables for customizing uuencoding.
7567 @end menu
7568
7569
7570 @node Rule Variables
7571 @subsubsection Rule Variables
7572 @cindex rule variables
7573
7574 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7575 variables are of the form
7576
7577 @lisp
7578       (list '(regexp1 command2)
7579             '(regexp2 command2)
7580             ...)
7581 @end lisp
7582
7583 @table @code
7584
7585 @item gnus-uu-user-view-rules
7586 @vindex gnus-uu-user-view-rules
7587 @cindex sox
7588 This variable is consulted first when viewing files.  If you wish to use,
7589 for instance, @code{sox} to convert an @samp{.au} sound file, you could
7590 say something like:
7591 @lisp
7592 (setq gnus-uu-user-view-rules
7593       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7594 @end lisp
7595
7596 @item gnus-uu-user-view-rules-end
7597 @vindex gnus-uu-user-view-rules-end
7598 This variable is consulted if gnus couldn't make any matches from the
7599 user and default view rules.
7600
7601 @item gnus-uu-user-archive-rules
7602 @vindex gnus-uu-user-archive-rules
7603 This variable can be used to say what commands should be used to unpack
7604 archives.
7605 @end table
7606
7607
7608 @node Other Decode Variables
7609 @subsubsection Other Decode Variables
7610
7611 @table @code
7612 @vindex gnus-uu-grabbed-file-functions
7613
7614 @item gnus-uu-grabbed-file-functions
7615 All functions in this list will be called right after each file has been
7616 successfully decoded---so that you can move or view files right away,
7617 and don't have to wait for all files to be decoded before you can do
7618 anything.  Ready-made functions you can put in this list are:
7619
7620 @table @code
7621
7622 @item gnus-uu-grab-view
7623 @findex gnus-uu-grab-view
7624 View the file.
7625
7626 @item gnus-uu-grab-move
7627 @findex gnus-uu-grab-move
7628 Move the file (if you're using a saving function.)
7629 @end table
7630
7631 @item gnus-uu-be-dangerous
7632 @vindex gnus-uu-be-dangerous
7633 Specifies what to do if unusual situations arise during decoding.  If
7634 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7635 that didn't work, and overwrite existing files.  Otherwise, ask each
7636 time.
7637
7638 @item gnus-uu-ignore-files-by-name
7639 @vindex gnus-uu-ignore-files-by-name
7640 Files with name matching this regular expression won't be viewed.
7641
7642 @item gnus-uu-ignore-files-by-type
7643 @vindex gnus-uu-ignore-files-by-type
7644 Files with a @sc{mime} type matching this variable won't be viewed.
7645 Note that Gnus tries to guess what type the file is based on the name.
7646 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
7647 kludgey.
7648
7649 @item gnus-uu-tmp-dir
7650 @vindex gnus-uu-tmp-dir
7651 Where @code{gnus-uu} does its work.
7652
7653 @item gnus-uu-do-not-unpack-archives
7654 @vindex gnus-uu-do-not-unpack-archives
7655 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7656 looking for files to display.
7657
7658 @item gnus-uu-view-and-save
7659 @vindex gnus-uu-view-and-save
7660 Non-@code{nil} means that the user will always be asked to save a file
7661 after viewing it.
7662
7663 @item gnus-uu-ignore-default-view-rules
7664 @vindex gnus-uu-ignore-default-view-rules
7665 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7666 rules.
7667
7668 @item gnus-uu-ignore-default-archive-rules
7669 @vindex gnus-uu-ignore-default-archive-rules
7670 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7671 unpacking commands.
7672
7673 @item gnus-uu-kill-carriage-return
7674 @vindex gnus-uu-kill-carriage-return
7675 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7676 from articles.
7677
7678 @item gnus-uu-unmark-articles-not-decoded
7679 @vindex gnus-uu-unmark-articles-not-decoded
7680 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7681 decoded articles as unread.
7682
7683 @item gnus-uu-correct-stripped-uucode
7684 @vindex gnus-uu-correct-stripped-uucode
7685 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7686 uuencoded files that have had trailing spaces deleted.
7687
7688 @item gnus-uu-pre-uudecode-hook
7689 @vindex gnus-uu-pre-uudecode-hook
7690 Hook run before sending a message to @code{uudecode}.
7691
7692 @item gnus-uu-view-with-metamail
7693 @vindex gnus-uu-view-with-metamail
7694 @cindex metamail
7695 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7696 commands defined by the rule variables and just fudge a @sc{mime}
7697 content type based on the file name.  The result will be fed to
7698 @code{metamail} for viewing.
7699
7700 @item gnus-uu-save-in-digest
7701 @vindex gnus-uu-save-in-digest
7702 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7703 decoding, will save in digests.  If this variable is @code{nil},
7704 @code{gnus-uu} will just save everything in a file without any
7705 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7706 to specify any meaningful volume and issue numbers were found, so I
7707 simply dropped them.
7708
7709 @end table
7710
7711
7712 @node Uuencoding and Posting
7713 @subsubsection Uuencoding and Posting
7714
7715 @table @code
7716
7717 @item gnus-uu-post-include-before-composing
7718 @vindex gnus-uu-post-include-before-composing
7719 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7720 before you compose the article.  If this variable is @code{t}, you can
7721 either include an encoded file with @kbd{C-c C-i} or have one included
7722 for you when you post the article.
7723
7724 @item gnus-uu-post-length
7725 @vindex gnus-uu-post-length
7726 Maximum length of an article.  The encoded file will be split into how
7727 many articles it takes to post the entire file.
7728
7729 @item gnus-uu-post-threaded
7730 @vindex gnus-uu-post-threaded
7731 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7732 thread.  This may not be smart, as no other decoder I have seen is able
7733 to follow threads when collecting uuencoded articles.  (Well, I have
7734 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7735 think that counts...) Default is @code{nil}.
7736
7737 @item gnus-uu-post-separate-description
7738 @vindex gnus-uu-post-separate-description
7739 Non-@code{nil} means that the description will be posted in a separate
7740 article.  The first article will typically be numbered (0/x).  If this
7741 variable is @code{nil}, the description the user enters will be included
7742 at the beginning of the first article, which will be numbered (1/x).
7743 Default is @code{t}.
7744
7745 @end table
7746
7747
7748 @node Viewing Files
7749 @subsection Viewing Files
7750 @cindex viewing files
7751 @cindex pseudo-articles
7752
7753 After decoding, if the file is some sort of archive, gnus will attempt
7754 to unpack the archive and see if any of the files in the archive can be
7755 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7756 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7757 uncompress and de-tar the main file, and then view the two pictures.
7758 This unpacking process is recursive, so if the archive contains archives
7759 of archives, it'll all be unpacked.
7760
7761 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7762 extracted file into the summary buffer.  If you go to these
7763 ``articles'', you will be prompted for a command to run (usually Gnus
7764 will make a suggestion), and then the command will be run.
7765
7766 @vindex gnus-view-pseudo-asynchronously
7767 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7768 until the viewing is done before proceeding.
7769
7770 @vindex gnus-view-pseudos
7771 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7772 the pseudo-articles into the summary buffer, but view them
7773 immediately.  If this variable is @code{not-confirm}, the user won't even
7774 be asked for a confirmation before viewing is done.
7775
7776 @vindex gnus-view-pseudos-separately
7777 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7778 pseudo-article will be created for each file to be viewed.  If
7779 @code{nil}, all files that use the same viewing command will be given as
7780 a list of parameters to that command.
7781
7782 @vindex gnus-insert-pseudo-articles
7783 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7784 pseudo-articles when decoding.  It is @code{t} by default.
7785
7786 So; there you are, reading your @emph{pseudo-articles} in your
7787 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7788 Why isn't anything real anymore? How did we get here?
7789
7790
7791 @node Article Treatment
7792 @section Article Treatment
7793
7794 Reading through this huge manual, you may have quite forgotten that the
7795 object of newsreaders is to actually, like, read what people have
7796 written.  Reading articles.  Unfortunately, people are quite bad at
7797 writing, so there are tons of functions and variables to make reading
7798 these articles easier.
7799
7800 @menu
7801 * Article Highlighting::        You want to make the article look like fruit salad.
7802 * Article Fontisizing::         Making emphasized text look nice.
7803 * Article Hiding::              You also want to make certain info go away.
7804 * Article Washing::             Lots of way-neat functions to make life better.
7805 * Article Header::              Doing various header transformations.
7806 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7807 * Article Date::                Grumble, UT!
7808 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7809 * Article Signature::           What is a signature?
7810 * Article Miscellania::         Various other stuff.
7811 @end menu
7812
7813
7814 @node Article Highlighting
7815 @subsection Article Highlighting
7816 @cindex highlighting
7817
7818 Not only do you want your article buffer to look like fruit salad, but
7819 you want it to look like technicolor fruit salad.
7820
7821 @table @kbd
7822
7823 @item W H a
7824 @kindex W H a (Summary)
7825 @findex gnus-article-highlight
7826 @findex gnus-article-maybe-highlight
7827 Do much highlighting of the current article
7828 (@code{gnus-article-highlight}).  This function highlights header, cited
7829 text, the signature, and adds buttons to the body and the head.
7830
7831 @item W H h
7832 @kindex W H h (Summary)
7833 @findex gnus-article-highlight-headers
7834 @vindex gnus-header-face-alist
7835 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7836 highlighting will be done according to the @code{gnus-header-face-alist}
7837 variable, which is a list where each element has the form
7838 @code{(@var{regexp} @var{name} @var{content})}.
7839 @var{regexp} is a regular expression for matching the
7840 header, @var{name} is the face used for highlighting the header name
7841 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7842 the header value.  The first match made will be used.  Note that
7843 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7844
7845 @item W H c
7846 @kindex W H c (Summary)
7847 @findex gnus-article-highlight-citation
7848 Highlight cited text (@code{gnus-article-highlight-citation}).
7849
7850 Some variables to customize the citation highlights:
7851
7852 @table @code
7853 @vindex gnus-cite-parse-max-size
7854
7855 @item gnus-cite-parse-max-size
7856 If the article size if bigger than this variable (which is 25000 by
7857 default), no citation highlighting will be performed.
7858
7859 @item gnus-cite-max-prefix
7860 @vindex gnus-cite-max-prefix
7861 Maximum possible length for a citation prefix (default 20).
7862
7863 @item gnus-cite-face-list
7864 @vindex gnus-cite-face-list
7865 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
7866 When there are citations from multiple articles in the same message,
7867 gnus will try to give each citation from each article its own face.
7868 This should make it easier to see who wrote what.
7869
7870 @item gnus-supercite-regexp
7871 @vindex gnus-supercite-regexp
7872 Regexp matching normal Supercite attribution lines.
7873
7874 @item gnus-supercite-secondary-regexp
7875 @vindex gnus-supercite-secondary-regexp
7876 Regexp matching mangled Supercite attribution lines.
7877
7878 @item gnus-cite-minimum-match-count
7879 @vindex gnus-cite-minimum-match-count
7880 Minimum number of identical prefixes we have to see before we believe
7881 that it's a citation.
7882
7883 @item gnus-cite-attribution-prefix
7884 @vindex gnus-cite-attribution-prefix
7885 Regexp matching the beginning of an attribution line.
7886
7887 @item gnus-cite-attribution-suffix
7888 @vindex gnus-cite-attribution-suffix
7889 Regexp matching the end of an attribution line.
7890
7891 @item gnus-cite-attribution-face
7892 @vindex gnus-cite-attribution-face
7893 Face used for attribution lines.  It is merged with the face for the
7894 cited text belonging to the attribution.
7895
7896 @end table
7897
7898
7899 @item W H s
7900 @kindex W H s (Summary)
7901 @vindex gnus-signature-separator
7902 @vindex gnus-signature-face
7903 @findex gnus-article-highlight-signature
7904 Highlight the signature (@code{gnus-article-highlight-signature}).
7905 Everything after @code{gnus-signature-separator} (@pxref{Article
7906 Signature}) in an article will be considered a signature and will be
7907 highlighted with @code{gnus-signature-face}, which is @code{italic} by
7908 default.
7909
7910 @end table
7911
7912 @xref{Customizing Articles}, for how to highlight articles automatically.
7913
7914
7915 @node Article Fontisizing
7916 @subsection Article Fontisizing
7917 @cindex emphasis
7918 @cindex article emphasis
7919
7920 @findex gnus-article-emphasize
7921 @kindex W e (Summary)
7922 People commonly add emphasis to words in news articles by writing things
7923 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
7924 this look nicer by running the article through the @kbd{W e}
7925 (@code{gnus-article-emphasize}) command.
7926
7927 @vindex gnus-emphasis-alist
7928 How the emphasis is computed is controlled by the
7929 @code{gnus-emphasis-alist} variable.  This is an alist where the first
7930 element is a regular expression to be matched.  The second is a number
7931 that says what regular expression grouping is used to find the entire
7932 emphasized word.  The third is a number that says what regexp grouping
7933 should be displayed and highlighted.  (The text between these two
7934 groupings will be hidden.)  The fourth is the face used for
7935 highlighting.
7936
7937 @lisp
7938 (setq gnus-emphasis-alist
7939       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
7940         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
7941 @end lisp
7942
7943 @cindex slash
7944 @cindex asterisk
7945 @cindex underline
7946 @cindex /
7947 @cindex *
7948
7949 @vindex gnus-emphasis-underline
7950 @vindex gnus-emphasis-bold
7951 @vindex gnus-emphasis-italic
7952 @vindex gnus-emphasis-underline-bold
7953 @vindex gnus-emphasis-underline-italic
7954 @vindex gnus-emphasis-bold-italic
7955 @vindex gnus-emphasis-underline-bold-italic
7956 By default, there are seven rules, and they use the following faces:
7957 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
7958 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
7959 @code{gnus-emphasis-underline-italic},
7960 @code{gnus-emphasis-underline-bold}, and
7961 @code{gnus-emphasis-underline-bold-italic}.
7962
7963 If you want to change these faces, you can either use @kbd{M-x
7964 customize}, or you can use @code{copy-face}.  For instance, if you want
7965 to make @code{gnus-emphasis-italic} use a red face instead, you could
7966 say something like:
7967
7968 @lisp
7969 (copy-face 'red 'gnus-emphasis-italic)
7970 @end lisp
7971
7972 @vindex gnus-group-highlight-words-alist
7973
7974 If you want to highlight arbitrary words, you can use the
7975 @code{gnus-group-highlight-words-alist} variable, which uses the same
7976 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
7977 parameter (@pxref{Group Parameters}) can also be used.
7978
7979 @xref{Customizing Articles}, for how to fontize articles automatically.
7980
7981
7982 @node Article Hiding
7983 @subsection Article Hiding
7984 @cindex article hiding
7985
7986 Or rather, hiding certain things in each article.  There usually is much
7987 too much cruft in most articles.
7988
7989 @table @kbd
7990
7991 @item W W a
7992 @kindex W W a (Summary)
7993 @findex gnus-article-hide
7994 Do quite a lot of hiding on the article buffer
7995 (@kbd{gnus-article-hide}).  In particular, this function will hide
7996 headers, PGP, cited text and the signature.
7997
7998 @item W W h
7999 @kindex W W h (Summary)
8000 @findex gnus-article-hide-headers
8001 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8002 Headers}.
8003
8004 @item W W b
8005 @kindex W W b (Summary)
8006 @findex gnus-article-hide-boring-headers
8007 Hide headers that aren't particularly interesting
8008 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8009
8010 @item W W s
8011 @kindex W W s (Summary)
8012 @findex gnus-article-hide-signature
8013 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8014 Signature}.
8015
8016 @item W W l
8017 @kindex W W l (Summary)
8018 @findex gnus-article-hide-list-identifiers
8019 @vindex gnus-list-identifiers
8020 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8021 are strings some mailing list servers add to the beginning of all
8022 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8023 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8024 may not contain @code{\\(..\\)}.
8025
8026 @table @code
8027
8028 @item gnus-list-identifiers
8029 @vindex gnus-list-identifiers
8030 A regular expression that matches list identifiers to be removed from
8031 subject.  This can also be a list of regular expressions.
8032
8033 @end table
8034
8035 @item W W p
8036 @kindex W W p (Summary)
8037 @findex gnus-article-hide-pgp
8038 @vindex gnus-article-hide-pgp-hook
8039 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}).  The
8040 @code{gnus-article-hide-pgp-hook} hook will be run after a @sc{pgp}
8041 signature has been hidden.  For example, to automatically verify
8042 articles that have signatures in them do:
8043 @lisp
8044 ;;; Hide pgp cruft if any.
8045
8046 (setq gnus-treat-strip-pgp t)
8047
8048 ;;; After hiding pgp, verify the message;
8049 ;;; only happens if pgp signature is found.
8050
8051 (add-hook 'gnus-article-hide-pgp-hook
8052           (lambda ()
8053             (save-excursion
8054               (set-buffer gnus-original-article-buffer)
8055               (mc-verify))))
8056 @end lisp
8057
8058 @item W W P
8059 @kindex W W P (Summary)
8060 @findex gnus-article-hide-pem
8061 Hide @sc{pem} (privacy enhanced messages) cruft
8062 (@code{gnus-article-hide-pem}).
8063
8064 @item W W B
8065 @kindex W W B (Summary)
8066 @findex gnus-article-strip-banner
8067 @vindex gnus-article-banner-alist
8068 @vindex gnus-article-address-banner-alist
8069 @cindex banner
8070 @cindex OneList
8071 @cindex stripping advertisements
8072 @cindex advertisements
8073 Strip the banner specified by the @code{banner} group parameter
8074 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8075 annoying banners and/or signatures that some mailing lists and moderated
8076 groups adds to all the messages.  The way to use this function is to add
8077 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8078 group you want banners stripped from.  The parameter either be a string,
8079 which will be interpreted as a regular expression matching text to be
8080 removed, or the symbol @code{signature}, meaning that the (last)
8081 signature should be removed, or other symbol, meaning that the
8082 corresponding regular expression in @code{gnus-article-banner-alist} is
8083 used.
8084
8085 Regardless of a group, you can hide things like advertisements only when
8086 the sender of an article has a certain mail address specified in
8087 @code{gnus-article-address-banner-alist}.
8088
8089 @table @code
8090
8091 @item gnus-article-address-banner-alist
8092 @vindex gnus-article-address-banner-alist
8093 Alist of mail addresses and banners.  Each element has the form
8094 @code{(ADDRESS . BANNER)}, where ADDRESS is a regexp matching a mail
8095 address in the From header, BANNER is one of a symbol @code{signature},
8096 an item in @code{gnus-article-banner-alist}, a regexp and @code{nil}.
8097 If ADDRESS matches author's mail address, it will remove things like
8098 advertisements.  For example, if a sender has the mail address
8099 @samp{hail@@yoo-hoo.co.jp} and there is a banner something like
8100 @samp{Do You Yoo-hoo!?} in all articles he sends, you can use the
8101 following element to remove them:
8102
8103 @lisp
8104 ("@@yoo-hoo\\.co\\.jp\\'" . "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8105 @end lisp
8106
8107 @end table
8108
8109 @item W W c
8110 @kindex W W c (Summary)
8111 @findex gnus-article-hide-citation
8112 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8113 customizing the hiding:
8114
8115 @table @code
8116
8117 @item gnus-cited-opened-text-button-line-format
8118 @itemx gnus-cited-closed-text-button-line-format
8119 @vindex gnus-cited-closed-text-button-line-format
8120 @vindex gnus-cited-opened-text-button-line-format
8121 Gnus adds buttons to show where the cited text has been hidden, and to
8122 allow toggle hiding the text.  The format of the variable is specified
8123 by these format-like variable (@pxref{Formatting Variables}).  These
8124 specs are valid:
8125
8126 @table @samp
8127 @item b
8128 Starting point of the hidden text.
8129 @item e
8130 Ending point of the hidden text.
8131 @item l
8132 Number of characters in the hidden region.
8133 @item n
8134 Number of lines of hidden text.
8135 @end table
8136
8137 @item gnus-cited-lines-visible
8138 @vindex gnus-cited-lines-visible
8139 The number of lines at the beginning of the cited text to leave
8140 shown. This can also be a cons cell with the number of lines at the top
8141 and bottom of the text, respectively, to remain visible.
8142
8143 @end table
8144
8145 @item W W C-c
8146 @kindex W W C-c (Summary)
8147 @findex gnus-article-hide-citation-maybe
8148
8149 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8150 following two variables:
8151
8152 @table @code
8153 @item gnus-cite-hide-percentage
8154 @vindex gnus-cite-hide-percentage
8155 If the cited text is of a bigger percentage than this variable (default
8156 50), hide the cited text.
8157
8158 @item gnus-cite-hide-absolute
8159 @vindex gnus-cite-hide-absolute
8160 The cited text must have at least this length (default 10) before it
8161 is hidden.
8162 @end table
8163
8164 @item W W C
8165 @kindex W W C (Summary)
8166 @findex gnus-article-hide-citation-in-followups
8167 Hide cited text in articles that aren't roots
8168 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8169 useful as an interactive command, but might be a handy function to stick
8170 have happen automatically (@pxref{Customizing Articles}).
8171
8172 @end table
8173
8174 All these ``hiding'' commands are toggles, but if you give a negative
8175 prefix to these commands, they will show what they have previously
8176 hidden.  If you give a positive prefix, they will always hide.
8177
8178 Also @pxref{Article Highlighting} for further variables for
8179 citation customization.
8180
8181 @xref{Customizing Articles}, for how to hide article elements
8182 automatically.
8183
8184
8185 @node Article Washing
8186 @subsection Article Washing
8187 @cindex washing
8188 @cindex article washing
8189
8190 We call this ``article washing'' for a really good reason.  Namely, the
8191 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8192
8193 @dfn{Washing} is defined by us as ``changing something from something to
8194 something else'', but normally results in something looking better.
8195 Cleaner, perhaps.
8196
8197 @xref{Customizing Articles}, if you want to change how Gnus displays
8198 articles by default.
8199
8200 @table @kbd
8201
8202 @item C-u g
8203 This is not really washing, it's sort of the opposite of washing.  If
8204 you type this, you see the article exactly as it exists on disk or on
8205 the server.
8206
8207 @item W l
8208 @kindex W l (Summary)
8209 @findex gnus-summary-stop-page-breaking
8210 Remove page breaks from the current article
8211 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8212 delimiters.
8213
8214 @item W r
8215 @kindex W r (Summary)
8216 @findex gnus-summary-caesar-message
8217 @c @icon{gnus-summary-caesar-message}
8218 Do a Caesar rotate (rot13) on the article buffer
8219 (@code{gnus-summary-caesar-message}).
8220 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8221 (Typically offensive jokes and such.)
8222
8223 It's commonly called ``rot13'' because each letter is rotated 13
8224 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8225 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8226 is rumored to have employed this form of, uh, somewhat weak encryption.
8227
8228 @item W m
8229 @kindex W m (Summary)
8230 @findex gnus-summary-morse-message
8231 @c @icon{gnus-summary-morse-message}
8232 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8233
8234 @item W t
8235 @item t
8236 @kindex W t (Summary)
8237 @kindex t (Summary)
8238 @findex gnus-summary-toggle-header
8239 Toggle whether to display all headers in the article buffer
8240 (@code{gnus-summary-toggle-header}).
8241
8242 @item W v
8243 @kindex W v (Summary)
8244 @findex gnus-summary-verbose-headers
8245 Toggle whether to display all headers in the article buffer permanently
8246 (@code{gnus-summary-verbose-headers}).
8247
8248 @item W m
8249 @kindex W m (Summary)
8250 @findex gnus-summary-toggle-mime
8251 Toggle whether to run the article through @sc{mime} before displaying
8252 (@code{gnus-summary-toggle-mime}).
8253
8254 @item W o
8255 @kindex W o (Summary)
8256 @findex gnus-article-treat-overstrike
8257 Treat overstrike (@code{gnus-article-treat-overstrike}).
8258
8259 @item W d
8260 @kindex W d (Summary)
8261 @findex gnus-article-treat-dumbquotes
8262 @vindex gnus-article-dumbquotes-map
8263 @cindex Smartquotes
8264 @cindex M****s*** sm*rtq**t*s
8265 @cindex Latin 1
8266 Treat M****s*** sm*rtq**t*s according to
8267 @code{gnus-article-dumbquotes-map}
8268 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8269 whether a character is a sm*rtq**t* or not, so it should only be used
8270 interactively.
8271
8272 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8273 an attempt to provide more quoting characters.  If you see something
8274 like @code{\222} or @code{\264} where you're expecting some kind of
8275 apostrophe or quotation mark, then try this wash.
8276
8277 @item W k
8278 @kindex W k (Summary)
8279 @findex gnus-article-outlook-deuglify-article
8280 @cindex Outlook Express
8281 Deuglify broken Outlook (Express) articles and redisplay
8282 (@code{gnus-article-outlook-deuglify-article}).
8283
8284 @item W w
8285 @kindex W w (Summary)
8286 @findex gnus-article-fill-cited-article
8287 Do word wrap (@code{gnus-article-fill-cited-article}).
8288
8289 You can give the command a numerical prefix to specify the width to use
8290 when filling.
8291
8292 @item W Q
8293 @kindex W Q (Summary)
8294 @findex gnus-article-fill-long-lines
8295 Fill long lines (@code{gnus-article-fill-long-lines}).
8296
8297 @item W C
8298 @kindex W C (Summary)
8299 @findex gnus-article-capitalize-sentences
8300 Capitalize the first word in each sentence
8301 (@code{gnus-article-capitalize-sentences}).
8302
8303 @item W c
8304 @kindex W c (Summary)
8305 @findex gnus-article-remove-cr
8306 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8307 (this takes care of DOS line endings), and then translate any remaining
8308 CRs into LF (this takes care of Mac line endings)
8309 (@code{gnus-article-remove-cr}).
8310
8311 @item W 6
8312 @kindex W 6 (Summary)
8313 @findex gnus-article-de-base64-unreadable
8314 Treat base64 (@code{gnus-article-de-base64-unreadable}).
8315 Base64 is one common @sc{mime} encoding employed when sending non-ASCII
8316 (i. e., 8-bit) articles.  Note that this is usually done
8317 automatically by Gnus if the message in question has a
8318 @code{Content-Transfer-Encoding} header that says that this encoding has
8319 been done.
8320 If a prefix is given, a charset will be asked for.
8321
8322 @item W Z
8323 @kindex W Z (Summary)
8324 @findex gnus-article-decode-HZ
8325 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8326 common encoding employed when sending Chinese articles.  It typically
8327 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8328
8329 @item W u
8330 @kindex W u (Summary)
8331 @findex gnus-article-unsplit-urls
8332 Remove newlines from within URLs.  Some mailers insert newlines into
8333 outgoing email messages to keep lines short.  This reformatting can
8334 split long URLs onto multiple lines.  Repair those URLs by removing
8335 the newlines (@code{gnus-article-unsplit-urls}).
8336
8337 @item W h
8338 @kindex W h (Summary)
8339 @findex gnus-article-wash-html
8340 Treat @sc{html} (@code{gnus-article-wash-html}).  Note that this is
8341 usually done automatically by Gnus if the message in question has a
8342 @code{Content-Type} header that says that the message is @sc{html}.
8343
8344 If a prefix is given, a charset will be asked for.
8345
8346 @vindex gnus-article-wash-function
8347 The default is to use the function specified by
8348 @code{mm-inline-text-html-renderer} (@pxref{Customization, , , emacs-mime})
8349 to convert the @sc{html}, but this is controlled by the
8350 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8351 can use include:
8352
8353 @table @code
8354 @item w3
8355 Use Emacs/w3.
8356
8357 @item w3m
8358 Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
8359 information).
8360
8361 @item links
8362 Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}).
8363
8364 @item lynx
8365 Use Lynx (see @uref{http://lynx.browser.org/}).
8366
8367 @item html2text
8368 Use html2text -- a simple @sc{html} converter included with Gnus.
8369
8370 @end table
8371
8372 @item W b
8373 @kindex W b (Summary)
8374 @findex gnus-article-add-buttons
8375 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8376 @xref{Article Buttons}.
8377
8378 @item W B
8379 @kindex W B (Summary)
8380 @findex gnus-article-add-buttons-to-head
8381 Add clickable buttons to the article headers
8382 (@code{gnus-article-add-buttons-to-head}).
8383
8384 @item W p
8385 @kindex W p (Summary)
8386 @findex gnus-article-verify-x-pgp-sig
8387 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
8388 Control messages such as @code{newgroup} and @code{checkgroups} are
8389 usually signed by the hierarchy maintainer.  You need to add the PGP
8390 public key of the maintainer to your keyring to verify the
8391 message.@footnote{PGP keys for many hierarchies are available at
8392 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8393
8394 @item W s
8395 @kindex W s (Summary)
8396 @findex gnus-summary-force-verify-and-decrypt
8397 Verify a signed (PGP, @sc{pgp/mime} or @sc{s/mime}) message
8398 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8399
8400 @item W a
8401 @kindex W a (Summary)
8402 @findex gnus-article-strip-headers-in-body
8403 Strip headers like the @code{X-No-Archive} header from the beginning of
8404 article bodies (@code{gnus-article-strip-headers-in-body}).
8405
8406 @item W E l
8407 @kindex W E l (Summary)
8408 @findex gnus-article-strip-leading-blank-lines
8409 Remove all blank lines from the beginning of the article
8410 (@code{gnus-article-strip-leading-blank-lines}).
8411
8412 @item W E m
8413 @kindex W E m (Summary)
8414 @findex gnus-article-strip-multiple-blank-lines
8415 Replace all blank lines with empty lines and then all multiple empty
8416 lines with a single empty line.
8417 (@code{gnus-article-strip-multiple-blank-lines}).
8418
8419 @item W E t
8420 @kindex W E t (Summary)
8421 @findex gnus-article-remove-trailing-blank-lines
8422 Remove all blank lines at the end of the article
8423 (@code{gnus-article-remove-trailing-blank-lines}).
8424
8425 @item W E a
8426 @kindex W E a (Summary)
8427 @findex gnus-article-strip-blank-lines
8428 Do all the three commands above
8429 (@code{gnus-article-strip-blank-lines}).
8430
8431 @item W E A
8432 @kindex W E A (Summary)
8433 @findex gnus-article-strip-all-blank-lines
8434 Remove all blank lines
8435 (@code{gnus-article-strip-all-blank-lines}).
8436
8437 @item W E s
8438 @kindex W E s (Summary)
8439 @findex gnus-article-strip-leading-space
8440 Remove all white space from the beginning of all lines of the article
8441 body (@code{gnus-article-strip-leading-space}).
8442
8443 @item W E e
8444 @kindex W E e (Summary)
8445 @findex gnus-article-strip-trailing-space
8446 Remove all white space from the end of all lines of the article
8447 body (@code{gnus-article-strip-trailing-space}).
8448
8449 @end table
8450
8451 @xref{Customizing Articles}, for how to wash articles automatically.
8452
8453
8454 @node Article Header
8455 @subsection Article Header
8456
8457 These commands perform various transformations of article header.
8458
8459 @table @kbd
8460
8461 @item W G u
8462 @kindex W G u (Summary)
8463 @findex gnus-article-treat-unfold-headers
8464 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8465
8466 @item W G n
8467 @kindex W G n (Summary)
8468 @findex gnus-article-treat-fold-newsgroups
8469 Fold the @code{Newsgroups} and @code{Followup-To} headers
8470 (@code{gnus-article-treat-fold-newsgroups}).
8471
8472 @item W G f
8473 @kindex W G f (Summary)
8474 @findex gnus-article-treat-fold-headers
8475 Fold all the message headers
8476 (@code{gnus-article-treat-fold-headers}).
8477
8478 @item W E w
8479 @kindex W E w
8480 @findex gnus-article-remove-leading-whitespace
8481 Remove excessive whitespace from all headers
8482 (@code{gnus-article-remove-leading-whitespace}).
8483
8484 @end table
8485
8486
8487 @node Article Buttons
8488 @subsection Article Buttons
8489 @cindex buttons
8490
8491 People often include references to other stuff in articles, and it would
8492 be nice if Gnus could just fetch whatever it is that people talk about
8493 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8494 button on these references.
8495
8496 @vindex gnus-button-man-handler
8497 Gnus adds @dfn{buttons} to certain standard references by default:
8498 Well-formed URLs, mail addresses, Message-IDs, Info links and man pages.
8499 This is controlled by two variables, one that handles article bodies and
8500 one that handles article heads:
8501
8502 @table @code
8503
8504 @item gnus-button-alist
8505 @vindex gnus-button-alist
8506 This is an alist where each entry has this form:
8507
8508 @lisp
8509 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8510 @end lisp
8511
8512 @table @var
8513
8514 @item regexp
8515 All text that match this regular expression will be considered an
8516 external reference.  Here's a typical regexp that matches embedded URLs:
8517 @samp{<URL:\\([^\n\r>]*\\)>}. This can also be a variable containing a
8518 regexp, useful variables to use include @code{gnus-button-url-regexp}.
8519
8520 @item button-par
8521 Gnus has to know which parts of the matches is to be highlighted.  This
8522 is a number that says what sub-expression of the regexp is to be
8523 highlighted.  If you want it all highlighted, you use 0 here.
8524
8525 @item use-p
8526 This form will be @code{eval}ed, and if the result is non-@code{nil},
8527 this is considered a match.  This is useful if you want extra sifting to
8528 avoid false matches.
8529
8530 @item function
8531 This function will be called when you click on this button.
8532
8533 @item data-par
8534 As with @var{button-par}, this is a sub-expression number, but this one
8535 says which part of the match is to be sent as data to @var{function}.
8536
8537 @end table
8538
8539 So the full entry for buttonizing URLs is then
8540
8541 @lisp
8542 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8543 @end lisp
8544
8545 @item gnus-header-button-alist
8546 @vindex gnus-header-button-alist
8547 This is just like the other alist, except that it is applied to the
8548 article head only, and that each entry has an additional element that is
8549 used to say what headers to apply the buttonize coding to:
8550
8551 @lisp
8552 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8553 @end lisp
8554
8555 @var{header} is a regular expression.
8556
8557 @item gnus-button-url-regexp
8558 @vindex gnus-button-url-regexp
8559 A regular expression that matches embedded URLs.  It is used in the
8560 default values of the variables above.
8561
8562 @item gnus-article-button-face
8563 @vindex gnus-article-button-face
8564 Face used on buttons.
8565
8566 @item gnus-article-mouse-face
8567 @vindex gnus-article-mouse-face
8568 Face used when the mouse cursor is over a button.
8569
8570 @end table
8571
8572 @xref{Customizing Articles}, for how to buttonize articles automatically.
8573
8574
8575 @node Article Date
8576 @subsection Article Date
8577
8578 The date is most likely generated in some obscure timezone you've never
8579 heard of, so it's quite nice to be able to find out what the time was
8580 when the article was sent.
8581
8582 @table @kbd
8583
8584 @item W T u
8585 @kindex W T u (Summary)
8586 @findex gnus-article-date-ut
8587 Display the date in UT (aka. GMT, aka ZULU)
8588 (@code{gnus-article-date-ut}).
8589
8590 @item W T i
8591 @kindex W T i (Summary)
8592 @findex gnus-article-date-iso8601
8593 @cindex ISO 8601
8594 Display the date in international format, aka. ISO 8601
8595 (@code{gnus-article-date-iso8601}).
8596
8597 @item W T l
8598 @kindex W T l (Summary)
8599 @findex gnus-article-date-local
8600 Display the date in the local timezone (@code{gnus-article-date-local}).
8601
8602 @item W T p
8603 @kindex W T p (Summary)
8604 @findex gnus-article-date-english
8605 Display the date in a format that's easily pronounceable in English
8606 (@code{gnus-article-date-english}).
8607
8608 @item W T s
8609 @kindex W T s (Summary)
8610 @vindex gnus-article-time-format
8611 @findex gnus-article-date-user
8612 @findex format-time-string
8613 Display the date using a user-defined format
8614 (@code{gnus-article-date-user}).  The format is specified by the
8615 @code{gnus-article-time-format} variable, and is a string that's passed
8616 to @code{format-time-string}.  See the documentation of that variable
8617 for a list of possible format specs.
8618
8619 @item W T e
8620 @kindex W T e (Summary)
8621 @findex gnus-article-date-lapsed
8622 @findex gnus-start-date-timer
8623 @findex gnus-stop-date-timer
8624 Say how much time has elapsed between the article was posted and now
8625 (@code{gnus-article-date-lapsed}).  It looks something like:
8626
8627 @example
8628 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8629 @end example
8630
8631 The value of @code{gnus-article-date-lapsed-new-header} determines
8632 whether this header will just be added below the old Date one, or will
8633 replace it.
8634
8635 An advantage of using Gnus to read mail is that it converts simple bugs
8636 into wonderful absurdities.
8637
8638 If you want to have this line updated continually, you can put
8639
8640 @lisp
8641 (gnus-start-date-timer)
8642 @end lisp
8643
8644 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8645 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8646 command.
8647
8648 @item W T o
8649 @kindex W T o (Summary)
8650 @findex gnus-article-date-original
8651 Display the original date (@code{gnus-article-date-original}).  This can
8652 be useful if you normally use some other conversion function and are
8653 worried that it might be doing something totally wrong.  Say, claiming
8654 that the article was posted in 1854.  Although something like that is
8655 @emph{totally} impossible.  Don't you trust me? *titter*
8656
8657 @end table
8658
8659 @xref{Customizing Articles}, for how to display the date in your
8660 preferred format automatically.
8661
8662
8663 @node Article Display
8664 @subsection Article Display
8665 @cindex picons
8666 @cindex x-face
8667 @cindex smileys
8668
8669 These commands add various frivolous display gimmics to the article
8670 buffer in Emacs versions that support them.
8671
8672 @code{X-Face} headers are small black-and-white images supplied by the
8673 message headers (@pxref{X-Face}).
8674
8675 Picons, on the other hand, reside on your own system, and Gnus will
8676 try to match the headers to what you have (@pxref{Picons}).
8677
8678 Smileys are those little @samp{:-)} symbols that people like to litter
8679 their messages with (@pxref{Smileys}).
8680
8681 All these functions are toggles--if the elements already exist,
8682 they'll be removed.
8683
8684 @table @kbd
8685 @item W D x
8686 @kindex W D x (Summary)
8687 @findex gnus-article-display-x-face
8688 Display an @code{X-Face} in the @code{From} header.
8689 (@code{gnus-article-display-x-face}).
8690
8691 @item W D s
8692 @kindex W D s (Summary)
8693 @findex gnus-treat-smiley
8694 Display smileys (@code{gnus-treat-smiley}).
8695
8696 @item W D f
8697 @kindex W D f (Summary)
8698 @findex gnus-treat-from-picon
8699 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8700
8701 @item W D m
8702 @kindex W D m (Summary)
8703 @findex gnus-treat-mail-picon
8704 Piconify all mail headers (i. e., @code{Cc}, @code{To})
8705 (@code{gnus-treat-mail-picon}).
8706
8707 @item W D n
8708 @kindex W D n (Summary)
8709 @findex gnus-treat-newsgroups-picon
8710 Piconify all news headers (i. e., @code{Newsgroups} and
8711 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
8712
8713 @item W D D
8714 @kindex W D D (Summary)
8715 @findex gnus-article-remove-images
8716 Remove all images from the article buffer
8717 (@code{gnus-article-remove-images}).
8718
8719 @end table
8720
8721
8722
8723 @node Article Signature
8724 @subsection Article Signature
8725 @cindex signatures
8726 @cindex article signature
8727
8728 @vindex gnus-signature-separator
8729 Each article is divided into two parts---the head and the body.  The
8730 body can be divided into a signature part and a text part.  The variable
8731 that says what is to be considered a signature is
8732 @code{gnus-signature-separator}.  This is normally the standard
8733 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8734 non-standard signature separators, so this variable can also be a list
8735 of regular expressions to be tested, one by one.  (Searches are done
8736 from the end of the body towards the beginning.)  One likely value is:
8737
8738 @lisp
8739 (setq gnus-signature-separator
8740       '("^-- $"         ; The standard
8741         "^-- *$"        ; A common mangling
8742         "^-------*$"    ; Many people just use a looong
8743                         ; line of dashes.  Shame!
8744         "^ *--------*$" ; Double-shame!
8745         "^________*$"   ; Underscores are also popular
8746         "^========*$")) ; Pervert!
8747 @end lisp
8748
8749 The more permissive you are, the more likely it is that you'll get false
8750 positives.
8751
8752 @vindex gnus-signature-limit
8753 @code{gnus-signature-limit} provides a limit to what is considered a
8754 signature when displaying articles.
8755
8756 @enumerate
8757 @item
8758 If it is an integer, no signature may be longer (in characters) than
8759 that integer.
8760 @item
8761 If it is a floating point number, no signature may be longer (in lines)
8762 than that number.
8763 @item
8764 If it is a function, the function will be called without any parameters,
8765 and if it returns @code{nil}, there is no signature in the buffer.
8766 @item
8767 If it is a string, it will be used as a regexp.  If it matches, the text
8768 in question is not a signature.
8769 @end enumerate
8770
8771 This variable can also be a list where the elements may be of the types
8772 listed above.  Here's an example:
8773
8774 @lisp
8775 (setq gnus-signature-limit
8776       '(200.0 "^---*Forwarded article"))
8777 @end lisp
8778
8779 This means that if there are more than 200 lines after the signature
8780 separator, or the text after the signature separator is matched by
8781 the regular expression @samp{^---*Forwarded article}, then it isn't a
8782 signature after all.
8783
8784
8785 @node Article Miscellania
8786 @subsection Article Miscellania
8787
8788 @table @kbd
8789 @item A t
8790 @kindex A t (Summary)
8791 @findex gnus-article-babel
8792 Translate the article from one language to another
8793 (@code{gnus-article-babel}).
8794
8795 @end table
8796
8797
8798 @node MIME Commands
8799 @section MIME Commands
8800 @cindex MIME decoding
8801 @cindex attachments
8802 @cindex viewing attachments
8803
8804 The following commands all understand the numerical prefix.  For
8805 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8806
8807 @table @kbd
8808 @item b
8809 @itemx K v
8810 @kindex b (Summary)
8811 @kindex K v (Summary)
8812 View the @sc{mime} part.
8813
8814 @item K o
8815 @kindex K o (Summary)
8816 Save the @sc{mime} part.
8817
8818 @item K c
8819 @kindex K c (Summary)
8820 Copy the @sc{mime} part.
8821
8822 @item K e
8823 @kindex K e (Summary)
8824 View the @sc{mime} part externally.
8825
8826 @item K i
8827 @kindex K i (Summary)
8828 View the @sc{mime} part internally.
8829
8830 @item K |
8831 @kindex K | (Summary)
8832 Pipe the @sc{mime} part to an external command.
8833 @end table
8834
8835 The rest of these @sc{mime} commands do not use the numerical prefix in
8836 the same manner:
8837
8838 @table @kbd
8839 @item K b
8840 @kindex K b (Summary)
8841 Make all the @sc{mime} parts have buttons in front of them.  This is
8842 mostly useful if you wish to save (or perform other actions) on inlined
8843 parts.
8844
8845 @item K m
8846 @kindex K m (Summary)
8847 @findex gnus-summary-repair-multipart
8848 Some multipart messages are transmitted with missing or faulty headers.
8849 This command will attempt to ``repair'' these messages so that they can
8850 be viewed in a more pleasant manner
8851 (@code{gnus-summary-repair-multipart}).
8852
8853 @item X m
8854 @kindex X m (Summary)
8855 @findex gnus-summary-save-parts
8856 Save all parts matching a @sc{mime} type to a directory
8857 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8858 convention (@pxref{Process/Prefix}).
8859
8860 @item M-t
8861 @kindex M-t (Summary)
8862 @findex gnus-summary-toggle-display-buttonized
8863 Toggle the buttonized display of the article buffer
8864 (@code{gnus-summary-toggle-display-buttonized}).
8865
8866 @item W M w
8867 @kindex W M w (Summary)
8868 @findex gnus-article-decode-mime-words
8869 Decode RFC 2047-encoded words in the article headers
8870 (@code{gnus-article-decode-mime-words}).
8871
8872 @item W M c
8873 @kindex W M c (Summary)
8874 @findex gnus-article-decode-charset
8875 Decode encoded article bodies as well as charsets
8876 (@code{gnus-article-decode-charset}).
8877
8878 This command looks in the @code{Content-Type} header to determine the
8879 charset.  If there is no such header in the article, you can give it a
8880 prefix, which will prompt for the charset to decode as.  In regional
8881 groups where people post using some common encoding (but do not
8882 include @sc{mime} headers), you can set the @code{charset} group/topic
8883 parameter to the required charset (@pxref{Group Parameters}).
8884
8885 @item W M v
8886 @kindex W M v (Summary)
8887 @findex gnus-mime-view-all-parts
8888 View all the @sc{mime} parts in the current article
8889 (@code{gnus-mime-view-all-parts}).
8890
8891 @end table
8892
8893 Relevant variables:
8894
8895 @table @code
8896 @item gnus-ignored-mime-types
8897 @vindex gnus-ignored-mime-types
8898 This is a list of regexps.  @sc{mime} types that match a regexp from
8899 this list will be completely ignored by Gnus.  The default value is
8900 @code{nil}.
8901
8902 To have all Vcards be ignored, you'd say something like this:
8903
8904 @lisp
8905 (setq gnus-ignored-mime-types
8906       '("text/x-vcard"))
8907 @end lisp
8908
8909 @item gnus-unbuttonized-mime-types
8910 @vindex gnus-unbuttonized-mime-types
8911 This is a list of regexps.  @sc{mime} types that match a regexp from
8912 this list won't have @sc{mime} buttons inserted unless they aren't
8913 displayed or this variable is overriden by
8914 @code{gnus-buttonized-mime-types}.  The default value is
8915 @code{(".*/.*")}.
8916
8917 @item gnus-buttonized-mime-types
8918 @vindex gnus-buttonized-mime-types
8919 This is a list of regexps.  @sc{mime} types that match a regexp from
8920 this list will have @sc{mime} buttons inserted unless they aren't
8921 displayed.  This variable overrides
8922 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
8923
8924 To see e.g. security buttons but no other buttons, you could set this
8925 variable to @code{("multipart/signed")} and leave
8926 @code{gnus-unbuttonized-mime-types} at the default value.
8927
8928 @item gnus-inhibit-mime-unbuttonizing
8929 @vindex gnus-inhibit-mime-unbuttonizing
8930 If this is non-nil, then all @sc{mime} parts get buttons.  The default
8931 value is @code{nil}.
8932
8933 @item gnus-article-mime-part-function
8934 @vindex gnus-article-mime-part-function
8935 For each @sc{mime} part, this function will be called with the @sc{mime}
8936 handle as the parameter.  The function is meant to be used to allow
8937 users to gather information from the article (e. g., add Vcard info to
8938 the bbdb database) or to do actions based on parts (e. g., automatically
8939 save all jpegs into some directory).
8940
8941 Here's an example function the does the latter:
8942
8943 @lisp
8944 (defun my-save-all-jpeg-parts (handle)
8945   (when (equal (car (mm-handle-type handle)) "image/jpeg")
8946     (with-temp-buffer
8947       (insert (mm-get-part handle))
8948       (write-region (point-min) (point-max)
8949                     (read-file-name "Save jpeg to: ")))))
8950 (setq gnus-article-mime-part-function
8951       'my-save-all-jpeg-parts)
8952 @end lisp
8953
8954 @vindex gnus-mime-multipart-functions
8955 @item gnus-mime-multipart-functions
8956 Alist of @sc{mime} multipart types and functions to handle them.
8957
8958 @vindex mm-file-name-rewrite-functions
8959 @item mm-file-name-rewrite-functions
8960 List of functions used for rewriting file names of @sc{mime} parts.
8961 Each function takes a file name as input and returns a file name.
8962
8963 Ready-made functions include@*
8964 @code{mm-file-name-delete-whitespace},
8965 @code{mm-file-name-trim-whitespace},
8966 @code{mm-file-name-collapse-whitespace}, and
8967 @code{mm-file-name-replace-whitespace}.  The later uses the value of
8968 the variable @code{mm-file-name-replace-whitespace} to replace each
8969 whitespace character in a file name with that string; default value
8970 is @code{"_"} (a single underscore).
8971 @findex mm-file-name-delete-whitespace
8972 @findex mm-file-name-trim-whitespace
8973 @findex mm-file-name-collapse-whitespace
8974 @findex mm-file-name-replace-whitespace
8975 @vindex mm-file-name-replace-whitespace
8976
8977 The standard functions @code{capitalize}, @code{downcase},
8978 @code{upcase}, and @code{upcase-initials} may be useful, too.
8979
8980 Everybody knows that whitespace characters in file names are evil,
8981 except those who don't know.  If you receive lots of attachments from
8982 such unenlightened users, you can make live easier by adding
8983
8984 @lisp
8985 (setq mm-file-name-rewrite-functions
8986       '(mm-file-name-trim-whitespace
8987         mm-file-name-collapse-whitespace
8988         mm-file-name-replace-whitespace))
8989 @end lisp
8990
8991 @noindent
8992 to your @file{.gnus} file.
8993
8994 @end table
8995
8996
8997 @node Charsets
8998 @section Charsets
8999 @cindex charsets
9000
9001 People use different charsets, and we have @sc{mime} to let us know what
9002 charsets they use.  Or rather, we wish we had.  Many people use
9003 newsreaders and mailers that do not understand or use @sc{mime}, and
9004 just send out messages without saying what character sets they use.  To
9005 help a bit with this, some local news hierarchies have policies that say
9006 what character set is the default.  For instance, the @samp{fj}
9007 hierarchy uses @code{iso-2022-jp-2}.
9008
9009 @vindex gnus-group-charset-alist
9010 This knowledge is encoded in the @code{gnus-group-charset-alist}
9011 variable, which is an alist of regexps (use the first item to match full
9012 group names) and default charsets to be used when reading these groups.
9013
9014 In addition, some people do use soi-disant @sc{mime}-aware agents that
9015 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9016 even if they really are in @code{koi-8}.  To help here, the
9017 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9018 charsets that are listed here will be ignored.  The variable can be
9019 set on a group-by-group basis using the group parameters (@pxref{Group
9020 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9021 which includes values some agents insist on having in there.
9022
9023 @vindex gnus-group-posting-charset-alist
9024 When posting, @code{gnus-group-posting-charset-alist} is used to
9025 determine which charsets should not be encoded using the @sc{mime}
9026 encodings.  For instance, some hierarchies discourage using
9027 quoted-printable header encoding.
9028
9029 This variable is an alist of regexps and permitted unencoded charsets
9030 for posting.  Each element of the alist has the form @code{(}@var{test
9031 header body-list}@code{)}, where:
9032
9033 @table @var
9034 @item test
9035 is either a regular expression matching the newsgroup header or a
9036 variable to query,
9037 @item header
9038 is the charset which may be left unencoded in the header (@code{nil}
9039 means encode all charsets),
9040 @item body-list
9041 is a list of charsets which may be encoded using 8bit content-transfer
9042 encoding in the body, or one of the special values @code{nil} (always
9043 encode using quoted-printable) or @code{t} (always use 8bit).
9044 @end table
9045
9046 @cindex Russian
9047 @cindex koi8-r
9048 @cindex koi8-u
9049 @cindex iso-8859-5
9050 @cindex coding system aliases
9051 @cindex preferred charset
9052
9053 Other charset tricks that may be useful, although not Gnus-specific:
9054
9055 If there are several @sc{mime} charsets that encode the same Emacs
9056 charset, you can choose what charset to use by saying the following:
9057
9058 @lisp
9059 (put-charset-property 'cyrillic-iso8859-5
9060                       'preferred-coding-system 'koi8-r)
9061 @end lisp
9062
9063 This means that Russian will be encoded using @code{koi8-r} instead of
9064 the default @code{iso-8859-5} @sc{mime} charset.
9065
9066 If you want to read messages in @code{koi8-u}, you can cheat and say
9067
9068 @lisp
9069 (define-coding-system-alias 'koi8-u 'koi8-r)
9070 @end lisp
9071
9072 This will almost do the right thing.
9073
9074 And finally, to read charsets like @code{windows-1251}, you can say
9075 something like
9076
9077 @lisp
9078 (codepage-setup 1251)
9079 (define-coding-system-alias 'windows-1251 'cp1251)
9080 @end lisp
9081
9082
9083 @node Article Commands
9084 @section Article Commands
9085
9086 @table @kbd
9087
9088 @item A P
9089 @cindex PostScript
9090 @cindex printing
9091 @kindex A P (Summary)
9092 @vindex gnus-ps-print-hook
9093 @findex gnus-summary-print-article
9094 Generate and print a PostScript image of the article buffer
9095 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9096 be run just before printing the buffer.  An alternative way to print
9097 article is to use Muttprint (@pxref{Saving Articles}).
9098
9099 @end table
9100
9101
9102 @node Summary Sorting
9103 @section Summary Sorting
9104 @cindex summary sorting
9105
9106 You can have the summary buffer sorted in various ways, even though I
9107 can't really see why you'd want that.
9108
9109 @table @kbd
9110
9111 @item C-c C-s C-n
9112 @kindex C-c C-s C-n (Summary)
9113 @findex gnus-summary-sort-by-number
9114 Sort by article number (@code{gnus-summary-sort-by-number}).
9115
9116 @item C-c C-s C-a
9117 @kindex C-c C-s C-a (Summary)
9118 @findex gnus-summary-sort-by-author
9119 Sort by author (@code{gnus-summary-sort-by-author}).
9120
9121 @item C-c C-s C-s
9122 @kindex C-c C-s C-s (Summary)
9123 @findex gnus-summary-sort-by-subject
9124 Sort by subject (@code{gnus-summary-sort-by-subject}).
9125
9126 @item C-c C-s C-d
9127 @kindex C-c C-s C-d (Summary)
9128 @findex gnus-summary-sort-by-date
9129 Sort by date (@code{gnus-summary-sort-by-date}).
9130
9131 @item C-c C-s C-l
9132 @kindex C-c C-s C-l (Summary)
9133 @findex gnus-summary-sort-by-lines
9134 Sort by lines (@code{gnus-summary-sort-by-lines}).
9135
9136 @item C-c C-s C-c
9137 @kindex C-c C-s C-c (Summary)
9138 @findex gnus-summary-sort-by-chars
9139 Sort by article length (@code{gnus-summary-sort-by-chars}).
9140
9141 @item C-c C-s C-i
9142 @kindex C-c C-s C-i (Summary)
9143 @findex gnus-summary-sort-by-score
9144 Sort by score (@code{gnus-summary-sort-by-score}).
9145
9146 @item C-c C-s C-r
9147 @kindex C-c C-s C-r (Summary)
9148 @findex gnus-summary-sort-by-random
9149 Randomize (@code{gnus-summary-sort-by-random}).
9150
9151 @item C-c C-s C-o
9152 @kindex C-c C-s C-o (Summary)
9153 @findex gnus-summary-sort-by-original
9154 Sort using the default sorting method
9155 (@code{gnus-summary-sort-by-original}).
9156 @end table
9157
9158 These functions will work both when you use threading and when you don't
9159 use threading.  In the latter case, all summary lines will be sorted,
9160 line by line.  In the former case, sorting will be done on a
9161 root-by-root basis, which might not be what you were looking for.  To
9162 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9163 Commands}).
9164
9165
9166 @node Finding the Parent
9167 @section Finding the Parent
9168 @cindex parent articles
9169 @cindex referring articles
9170
9171 @table @kbd
9172 @item ^
9173 @kindex ^ (Summary)
9174 @findex gnus-summary-refer-parent-article
9175 If you'd like to read the parent of the current article, and it is not
9176 displayed in the summary buffer, you might still be able to.  That is,
9177 if the current group is fetched by @sc{nntp}, the parent hasn't expired
9178 and the @code{References} in the current article are not mangled, you
9179 can just press @kbd{^} or @kbd{A r}
9180 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9181 you'll get the parent.  If the parent is already displayed in the
9182 summary buffer, point will just move to this article.
9183
9184 If given a positive numerical prefix, fetch that many articles back into
9185 the ancestry.  If given a negative numerical prefix, fetch just that
9186 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9187 grandparent and the grandgrandparent of the current article.  If you say
9188 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9189 article.
9190
9191 @item A R (Summary)
9192 @findex gnus-summary-refer-references
9193 @kindex A R (Summary)
9194 Fetch all articles mentioned in the @code{References} header of the
9195 article (@code{gnus-summary-refer-references}).
9196
9197 @item A T (Summary)
9198 @findex gnus-summary-refer-thread
9199 @kindex A T (Summary)
9200 Display the full thread where the current article appears
9201 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9202 headers in the current group to work, so it usually takes a while.  If
9203 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9204 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9205 visible effects normally, but it'll make this command work a whole lot
9206 faster.  Of course, it'll make group entry somewhat slow.
9207
9208 @vindex gnus-refer-thread-limit
9209 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9210 articles before the first displayed in the current group) headers to
9211 fetch when doing this command.  The default is 200.  If @code{t}, all
9212 the available headers will be fetched.  This variable can be overridden
9213 by giving the @kbd{A T} command a numerical prefix.
9214
9215 @item M-^ (Summary)
9216 @findex gnus-summary-refer-article
9217 @kindex M-^ (Summary)
9218 @cindex Message-ID
9219 @cindex fetching by Message-ID
9220 You can also ask the @sc{nntp} server for an arbitrary article, no
9221 matter what group it belongs to.  @kbd{M-^}
9222 (@code{gnus-summary-refer-article}) will ask you for a
9223 @code{Message-ID}, which is one of those long, hard-to-read thingies
9224 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9225 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9226 @end table
9227
9228 The current select method will be used when fetching by
9229 @code{Message-ID} from non-news select method, but you can override this
9230 by giving this command a prefix.
9231
9232 @vindex gnus-refer-article-method
9233 If the group you are reading is located on a back end that does not
9234 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9235 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
9236 would, perhaps, be best if the @sc{nntp} server you consult is the one
9237 updating the spool you are reading from, but that's not really
9238 necessary.
9239
9240 It can also be a list of select methods, as well as the special symbol
9241 @code{current}, which means to use the current select method.  If it
9242 is a list, Gnus will try all the methods in the list until it finds a
9243 match.
9244
9245 Here's an example setting that will first try the current method, and
9246 then ask Google if that fails:
9247
9248 @lisp
9249 (setq gnus-refer-article-method
9250       '(current
9251         (nnweb "google" (nnweb-type google))))
9252 @end lisp
9253
9254 Most of the mail back ends support fetching by @code{Message-ID}, but
9255 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9256 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9257 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9258 only able to locate articles that have been posted to the current group.
9259 (Anything else would be too time consuming.)  @code{nnmh} does not
9260 support this at all.
9261
9262
9263 @node Alternative Approaches
9264 @section Alternative Approaches
9265
9266 Different people like to read news using different methods.  This being
9267 gnus, we offer a small selection of minor modes for the summary buffers.
9268
9269 @menu
9270 * Pick and Read::               First mark articles and then read them.
9271 * Binary Groups::               Auto-decode all articles.
9272 @end menu
9273
9274
9275 @node Pick and Read
9276 @subsection Pick and Read
9277 @cindex pick and read
9278
9279 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9280 a two-phased reading interface.  The user first marks in a summary
9281 buffer the articles she wants to read.  Then she starts reading the
9282 articles with just an article buffer displayed.
9283
9284 @findex gnus-pick-mode
9285 @kindex M-x gnus-pick-mode
9286 Gnus provides a summary buffer minor mode that allows
9287 this---@code{gnus-pick-mode}.  This basically means that a few process
9288 mark commands become one-keystroke commands to allow easy marking, and
9289 it provides one additional command for switching to the summary buffer.
9290
9291 Here are the available keystrokes when using pick mode:
9292
9293 @table @kbd
9294 @item .
9295 @kindex . (Pick)
9296 @findex gnus-pick-article-or-thread
9297 Pick the article or thread on the current line
9298 (@code{gnus-pick-article-or-thread}).  If the variable
9299 @code{gnus-thread-hide-subtree} is true, then this key selects the
9300 entire thread when used at the first article of the thread.  Otherwise,
9301 it selects just the article.  If given a numerical prefix, go to that
9302 thread or article and pick it.  (The line number is normally displayed
9303 at the beginning of the summary pick lines.)
9304
9305 @item SPACE
9306 @kindex SPACE (Pick)
9307 @findex gnus-pick-next-page
9308 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9309 at the end of the buffer, start reading the picked articles.
9310
9311 @item u
9312 @kindex u (Pick)
9313 @findex gnus-pick-unmark-article-or-thread.
9314 Unpick the thread or article
9315 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9316 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9317 thread if used at the first article of the thread.  Otherwise it unpicks
9318 just the article.  You can give this key a numerical prefix to unpick
9319 the thread or article at that line.
9320
9321 @item RET
9322 @kindex RET (Pick)
9323 @findex gnus-pick-start-reading
9324 @vindex gnus-pick-display-summary
9325 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9326 given a prefix, mark all unpicked articles as read first.  If
9327 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9328 will still be visible when you are reading.
9329
9330 @end table
9331
9332 All the normal summary mode commands are still available in the
9333 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9334 which is mapped to the same function
9335 @code{gnus-summary-tick-article-forward}.
9336
9337 If this sounds like a good idea to you, you could say:
9338
9339 @lisp
9340 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9341 @end lisp
9342
9343 @vindex gnus-pick-mode-hook
9344 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9345
9346 @vindex gnus-mark-unpicked-articles-as-read
9347 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9348 all unpicked articles as read.  The default is @code{nil}.
9349
9350 @vindex gnus-summary-pick-line-format
9351 The summary line format in pick mode is slightly different from the
9352 standard format.  At the beginning of each line the line number is
9353 displayed.  The pick mode line format is controlled by the
9354 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9355 Variables}).  It accepts the same format specs that
9356 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9357
9358
9359 @node Binary Groups
9360 @subsection Binary Groups
9361 @cindex binary groups
9362
9363 @findex gnus-binary-mode
9364 @kindex M-x gnus-binary-mode
9365 If you spend much time in binary groups, you may grow tired of hitting
9366 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9367 is a minor mode for summary buffers that makes all ordinary Gnus article
9368 selection functions uudecode series of articles and display the result
9369 instead of just displaying the articles the normal way.
9370
9371 @kindex g (Binary)
9372 @findex gnus-binary-show-article
9373 The only way, in fact, to see the actual articles is the @kbd{g}
9374 command, when you have turned on this mode
9375 (@code{gnus-binary-show-article}).
9376
9377 @vindex gnus-binary-mode-hook
9378 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9379
9380
9381 @node Tree Display
9382 @section Tree Display
9383 @cindex trees
9384
9385 @vindex gnus-use-trees
9386 If you don't like the normal gnus summary display, you might try setting
9387 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9388 additional @dfn{tree buffer}.  You can execute all summary mode commands
9389 in the tree buffer.
9390
9391 There are a few variables to customize the tree display, of course:
9392
9393 @table @code
9394 @item gnus-tree-mode-hook
9395 @vindex gnus-tree-mode-hook
9396 A hook called in all tree mode buffers.
9397
9398 @item gnus-tree-mode-line-format
9399 @vindex gnus-tree-mode-line-format
9400 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9401 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9402 of valid specs, @pxref{Summary Buffer Mode Line}.
9403
9404 @item gnus-selected-tree-face
9405 @vindex gnus-selected-tree-face
9406 Face used for highlighting the selected article in the tree buffer.  The
9407 default is @code{modeline}.
9408
9409 @item gnus-tree-line-format
9410 @vindex gnus-tree-line-format
9411 A format string for the tree nodes.  The name is a bit of a misnomer,
9412 though---it doesn't define a line, but just the node.  The default value
9413 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9414 the name of the poster.  It is vital that all nodes are of the same
9415 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9416
9417 Valid specs are:
9418
9419 @table @samp
9420 @item n
9421 The name of the poster.
9422 @item f
9423 The @code{From} header.
9424 @item N
9425 The number of the article.
9426 @item [
9427 The opening bracket.
9428 @item ]
9429 The closing bracket.
9430 @item s
9431 The subject.
9432 @end table
9433
9434 @xref{Formatting Variables}.
9435
9436 Variables related to the display are:
9437
9438 @table @code
9439 @item gnus-tree-brackets
9440 @vindex gnus-tree-brackets
9441 This is used for differentiating between ``real'' articles and
9442 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9443 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9444 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9445
9446 @item gnus-tree-parent-child-edges
9447 @vindex gnus-tree-parent-child-edges
9448 This is a list that contains the characters used for connecting parent
9449 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9450
9451 @end table
9452
9453 @item gnus-tree-minimize-window
9454 @vindex gnus-tree-minimize-window
9455 If this variable is non-@code{nil}, gnus will try to keep the tree
9456 buffer as small as possible to allow more room for the other gnus
9457 windows.  If this variable is a number, the tree buffer will never be
9458 higher than that number.  The default is @code{t}.  Note that if you
9459 have several windows displayed side-by-side in a frame and the tree
9460 buffer is one of these, minimizing the tree window will also resize all
9461 other windows displayed next to it.
9462
9463 You may also wish to add the following hook to keep the window minimized
9464 at all times:
9465
9466 @lisp
9467 (add-hook 'gnus-configure-windows-hook
9468           'gnus-tree-perhaps-minimize)
9469 @end lisp
9470
9471 @item gnus-generate-tree-function
9472 @vindex gnus-generate-tree-function
9473 @findex gnus-generate-horizontal-tree
9474 @findex gnus-generate-vertical-tree
9475 The function that actually generates the thread tree.  Two predefined
9476 functions are available: @code{gnus-generate-horizontal-tree} and
9477 @code{gnus-generate-vertical-tree} (which is the default).
9478
9479 @end table
9480
9481 Here's an example from a horizontal tree buffer:
9482
9483 @example
9484 @{***@}-(***)-[odd]-[Gun]
9485      |      \[Jan]
9486      |      \[odd]-[Eri]
9487      |      \(***)-[Eri]
9488      |            \[odd]-[Paa]
9489      \[Bjo]
9490      \[Gun]
9491      \[Gun]-[Jor]
9492 @end example
9493
9494 Here's the same thread displayed in a vertical tree buffer:
9495
9496 @example
9497 @{***@}
9498   |--------------------------\-----\-----\
9499 (***)                         [Bjo] [Gun] [Gun]
9500   |--\-----\-----\                          |
9501 [odd] [Jan] [odd] (***)                   [Jor]
9502   |           |     |--\
9503 [Gun]       [Eri] [Eri] [odd]
9504                           |
9505                         [Paa]
9506 @end example
9507
9508 If you're using horizontal trees, it might be nice to display the trees
9509 side-by-side with the summary buffer.  You could add something like the
9510 following to your @file{.gnus.el} file:
9511
9512 @lisp
9513 (setq gnus-use-trees t
9514       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9515       gnus-tree-minimize-window nil)
9516 (gnus-add-configuration
9517  '(article
9518    (vertical 1.0
9519              (horizontal 0.25
9520                          (summary 0.75 point)
9521                          (tree 1.0))
9522              (article 1.0))))
9523 @end lisp
9524
9525 @xref{Window Layout}.
9526
9527
9528 @node Mail Group Commands
9529 @section Mail Group Commands
9530 @cindex mail group commands
9531
9532 Some commands only make sense in mail groups.  If these commands are
9533 invalid in the current group, they will raise a hell and let you know.
9534
9535 All these commands (except the expiry and edit commands) use the
9536 process/prefix convention (@pxref{Process/Prefix}).
9537
9538 @table @kbd
9539
9540 @item B e
9541 @kindex B e (Summary)
9542 @findex gnus-summary-expire-articles
9543 Run all expirable articles in the current group through the expiry
9544 process (@code{gnus-summary-expire-articles}).  That is, delete all
9545 expirable articles in the group that have been around for a while.
9546 (@pxref{Expiring Mail}).
9547
9548 @item B C-M-e
9549 @kindex B C-M-e (Summary)
9550 @findex gnus-summary-expire-articles-now
9551 Delete all the expirable articles in the group
9552 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9553 articles eligible for expiry in the current group will
9554 disappear forever into that big @file{/dev/null} in the sky.
9555
9556 @item B DEL
9557 @kindex B DEL (Summary)
9558 @findex gnus-summary-delete-article
9559 @c @icon{gnus-summary-mail-delete}
9560 Delete the mail article.  This is ``delete'' as in ``delete it from your
9561 disk forever and ever, never to return again.'' Use with caution.
9562 (@code{gnus-summary-delete-article}).
9563
9564 @item B m
9565 @kindex B m (Summary)
9566 @cindex move mail
9567 @findex gnus-summary-move-article
9568 @vindex gnus-preserve-marks
9569 Move the article from one mail group to another
9570 (@code{gnus-summary-move-article}).  Marks will be preserved if
9571 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9572
9573 @item B c
9574 @kindex B c (Summary)
9575 @cindex copy mail
9576 @findex gnus-summary-copy-article
9577 @c @icon{gnus-summary-mail-copy}
9578 Copy the article from one group (mail group or not) to a mail group
9579 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9580 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9581
9582 @item B B
9583 @kindex B B (Summary)
9584 @cindex crosspost mail
9585 @findex gnus-summary-crosspost-article
9586 Crosspost the current article to some other group
9587 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9588 the article in the other group, and the Xref headers of the article will
9589 be properly updated.
9590
9591 @item B i
9592 @kindex B i (Summary)
9593 @findex gnus-summary-import-article
9594 Import an arbitrary file into the current mail newsgroup
9595 (@code{gnus-summary-import-article}).  You will be prompted for a file
9596 name, a @code{From} header and a @code{Subject} header.
9597
9598 @item B I
9599 @kindex B I (Summary)
9600 @findex gnus-summary-create-article
9601 Create an empty article in the current mail newsgroups
9602 (@code{gnus-summary-create-article}).  You will be prompted for a
9603 @code{From} header and a @code{Subject} header.
9604
9605 @item B r
9606 @kindex B r (Summary)
9607 @findex gnus-summary-respool-article
9608 Respool the mail article (@code{gnus-summary-respool-article}).
9609 @code{gnus-summary-respool-default-method} will be used as the default
9610 select method when respooling.  This variable is @code{nil} by default,
9611 which means that the current group select method will be used instead.
9612 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9613 (which is the default).
9614
9615 @item B w
9616 @itemx e
9617 @kindex B w (Summary)
9618 @kindex e (Summary)
9619 @findex gnus-summary-edit-article
9620 @kindex C-c C-c (Article)
9621 @findex gnus-summary-edit-article-done
9622 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9623 editing and make the changes permanent, type @kbd{C-c C-c}
9624 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9625 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9626
9627 @item B q
9628 @kindex B q (Summary)
9629 @findex gnus-summary-respool-query
9630 If you want to re-spool an article, you might be curious as to what group
9631 the article will end up in before you do the re-spooling.  This command
9632 will tell you (@code{gnus-summary-respool-query}).
9633
9634 @item B t
9635 @kindex B t (Summary)
9636 @findex gnus-summary-respool-trace
9637 Similarly, this command will display all fancy splitting patterns used
9638 when repooling, if any (@code{gnus-summary-respool-trace}).
9639
9640 @item B p
9641 @kindex B p (Summary)
9642 @findex gnus-summary-article-posted-p
9643 Some people have a tendency to send you "courtesy" copies when they
9644 follow up to articles you have posted.  These usually have a
9645 @code{Newsgroups} header in them, but not always.  This command
9646 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9647 article from your news server (or rather, from
9648 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9649 report back whether it found the article or not.  Even if it says that
9650 it didn't find the article, it may have been posted anyway---mail
9651 propagation is much faster than news propagation, and the news copy may
9652 just not have arrived yet.
9653
9654 @item K E
9655 @kindex K E (Summary)
9656 @findex gnus-article-encrypt-body
9657 @vindex gnus-article-encrypt-protocol
9658 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9659 The body is encrypted with the encryption protocol specified by the
9660 variable @code{gnus-article-encrypt-protocol}.
9661
9662 @end table
9663
9664 @vindex gnus-move-split-methods
9665 @cindex moving articles
9666 If you move (or copy) articles regularly, you might wish to have gnus
9667 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9668 variable that uses the same syntax as @code{gnus-split-methods}
9669 (@pxref{Saving Articles}).  You may customize that variable to create
9670 suggestions you find reasonable.  (Note that
9671 @code{gnus-move-split-methods} uses group names where
9672 @code{gnus-split-methods} uses file names.)
9673
9674 @lisp
9675 (setq gnus-move-split-methods
9676       '(("^From:.*Lars Magne" "nnml:junk")
9677         ("^Subject:.*gnus" "nnfolder:important")
9678         (".*" "nnml:misc")))
9679 @end lisp
9680
9681
9682 @node Various Summary Stuff
9683 @section Various Summary Stuff
9684
9685 @menu
9686 * Summary Group Information::   Information oriented commands.
9687 * Searching for Articles::      Multiple article commands.
9688 * Summary Generation Commands::  
9689 * Really Various Summary Commands::  Those pesky non-conformant commands.
9690 @end menu
9691
9692 @table @code
9693 @vindex gnus-summary-mode-hook
9694 @item gnus-summary-mode-hook
9695 This hook is called when creating a summary mode buffer.
9696
9697 @vindex gnus-summary-generate-hook
9698 @item gnus-summary-generate-hook
9699 This is called as the last thing before doing the threading and the
9700 generation of the summary buffer.  It's quite convenient for customizing
9701 the threading variables based on what data the newsgroup has.  This hook
9702 is called from the summary buffer after most summary buffer variables
9703 have been set.
9704
9705 @vindex gnus-summary-prepare-hook
9706 @item gnus-summary-prepare-hook
9707 It is called after the summary buffer has been generated.  You might use
9708 it to, for instance, highlight lines or modify the look of the buffer in
9709 some other ungodly manner.  I don't care.
9710
9711 @vindex gnus-summary-prepared-hook
9712 @item gnus-summary-prepared-hook
9713 A hook called as the very last thing after the summary buffer has been
9714 generated.
9715
9716 @vindex gnus-summary-ignore-duplicates
9717 @item gnus-summary-ignore-duplicates
9718 When gnus discovers two articles that have the same @code{Message-ID},
9719 it has to do something drastic.  No articles are allowed to have the
9720 same @code{Message-ID}, but this may happen when reading mail from some
9721 sources.  Gnus allows you to customize what happens with this variable.
9722 If it is @code{nil} (which is the default), gnus will rename the
9723 @code{Message-ID} (for display purposes only) and display the article as
9724 any other article.  If this variable is @code{t}, it won't display the
9725 article---it'll be as if it never existed.
9726
9727 @vindex gnus-alter-articles-to-read-function
9728 @item gnus-alter-articles-to-read-function
9729 This function, which takes two parameters (the group name and the list
9730 of articles to be selected), is called to allow the user to alter the
9731 list of articles to be selected.
9732
9733 For instance, the following function adds the list of cached articles to
9734 the list in one particular group:
9735
9736 @lisp
9737 (defun my-add-cached-articles (group articles)
9738   (if (string= group "some.group")
9739       (append gnus-newsgroup-cached articles)
9740     articles))
9741 @end lisp
9742
9743 @vindex gnus-newsgroup-variables
9744 @item gnus-newsgroup-variables
9745 A list of newsgroup (summary buffer) local variables, or cons of
9746 variables and their default values (when the default values are not
9747 nil), that should be made global while the summary buffer is active.
9748 These variables can be used to set variables in the group parameters
9749 while still allowing them to affect operations done in other
9750 buffers. For example:
9751
9752 @lisp
9753 (setq gnus-newsgroup-variables
9754      '(message-use-followup-to
9755        (gnus-visible-headers .
9756          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
9757 @end lisp
9758
9759 @end table
9760
9761
9762 @node Summary Group Information
9763 @subsection Summary Group Information
9764
9765 @table @kbd
9766
9767 @item H f
9768 @kindex H f (Summary)
9769 @findex gnus-summary-fetch-faq
9770 @vindex gnus-group-faq-directory
9771 Try to fetch the FAQ (list of frequently asked questions) for the
9772 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9773 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9774 on a remote machine.  This variable can also be a list of directories.
9775 In that case, giving a prefix to this command will allow you to choose
9776 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9777 be used for fetching the file.
9778
9779 @item H d
9780 @kindex H d (Summary)
9781 @findex gnus-summary-describe-group
9782 Give a brief description of the current group
9783 (@code{gnus-summary-describe-group}).  If given a prefix, force
9784 rereading the description from the server.
9785
9786 @item H h
9787 @kindex H h (Summary)
9788 @findex gnus-summary-describe-briefly
9789 Give an extremely brief description of the most important summary
9790 keystrokes (@code{gnus-summary-describe-briefly}).
9791
9792 @item H i
9793 @kindex H i (Summary)
9794 @findex gnus-info-find-node
9795 Go to the gnus info node (@code{gnus-info-find-node}).
9796 @end table
9797
9798
9799 @node Searching for Articles
9800 @subsection Searching for Articles
9801
9802 @table @kbd
9803
9804 @item M-s
9805 @kindex M-s (Summary)
9806 @findex gnus-summary-search-article-forward
9807 Search through all subsequent (raw) articles for a regexp
9808 (@code{gnus-summary-search-article-forward}).
9809
9810 @item M-r
9811 @kindex M-r (Summary)
9812 @findex gnus-summary-search-article-backward
9813 Search through all previous (raw) articles for a regexp
9814 (@code{gnus-summary-search-article-backward}).
9815
9816 @item &
9817 @kindex & (Summary)
9818 @findex gnus-summary-execute-command
9819 This command will prompt you for a header, a regular expression to match
9820 on this field, and a command to be executed if the match is made
9821 (@code{gnus-summary-execute-command}).  If the header is an empty
9822 string, the match is done on the entire article.  If given a prefix,
9823 search backward instead.
9824
9825 For instance, @kbd{& RET some.*string #} will put the process mark on
9826 all articles that have heads or bodies that match @samp{some.*string}.
9827
9828 @item M-&
9829 @kindex M-& (Summary)
9830 @findex gnus-summary-universal-argument
9831 Perform any operation on all articles that have been marked with
9832 the process mark (@code{gnus-summary-universal-argument}).
9833 @end table
9834
9835 @node Summary Generation Commands
9836 @subsection Summary Generation Commands
9837
9838 @table @kbd
9839
9840 @item Y g
9841 @kindex Y g (Summary)
9842 @findex gnus-summary-prepare
9843 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9844
9845 @item Y c
9846 @kindex Y c (Summary)
9847 @findex gnus-summary-insert-cached-articles
9848 Pull all cached articles (for the current group) into the summary buffer
9849 (@code{gnus-summary-insert-cached-articles}).
9850
9851 @end table
9852
9853
9854 @node Really Various Summary Commands
9855 @subsection Really Various Summary Commands
9856
9857 @table @kbd
9858
9859 @item A D
9860 @itemx C-d
9861 @kindex C-d (Summary)
9862 @kindex A D (Summary)
9863 @findex gnus-summary-enter-digest-group
9864 If the current article is a collection of other articles (for instance,
9865 a digest), you might use this command to enter a group based on the that
9866 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9867 guess what article type is currently displayed unless you give a prefix
9868 to this command, which forces a ``digest'' interpretation.  Basically,
9869 whenever you see a message that is a collection of other messages of
9870 some format, you @kbd{C-d} and read these messages in a more convenient
9871 fashion.
9872
9873 @item C-M-d
9874 @kindex C-M-d (Summary)
9875 @findex gnus-summary-read-document
9876 This command is very similar to the one above, but lets you gather
9877 several documents into one biiig group
9878 (@code{gnus-summary-read-document}).  It does this by opening several
9879 @code{nndoc} groups for each document, and then opening an
9880 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
9881 command understands the process/prefix convention
9882 (@pxref{Process/Prefix}).
9883
9884 @item C-t
9885 @kindex C-t (Summary)
9886 @findex gnus-summary-toggle-truncation
9887 Toggle truncation of summary lines
9888 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
9889 line centering function in the summary buffer, so it's not a good idea
9890 to have truncation switched off while reading articles.
9891
9892 @item =
9893 @kindex = (Summary)
9894 @findex gnus-summary-expand-window
9895 Expand the summary buffer window (@code{gnus-summary-expand-window}).
9896 If given a prefix, force an @code{article} window configuration.
9897
9898 @item C-M-e
9899 @kindex C-M-e (Summary)
9900 @findex gnus-summary-edit-parameters
9901 Edit the group parameters (@pxref{Group Parameters}) of the current
9902 group (@code{gnus-summary-edit-parameters}).
9903
9904 @item C-M-a
9905 @kindex C-M-a (Summary)
9906 @findex gnus-summary-customize-parameters
9907 Customize the group parameters (@pxref{Group Parameters}) of the current
9908 group (@code{gnus-summary-customize-parameters}).
9909
9910 @end table
9911
9912
9913 @node Exiting the Summary Buffer
9914 @section Exiting the Summary Buffer
9915 @cindex summary exit
9916 @cindex exiting groups
9917
9918 Exiting from the summary buffer will normally update all info on the
9919 group and return you to the group buffer.
9920
9921 @table @kbd
9922
9923 @item Z Z
9924 @itemx q
9925 @kindex Z Z (Summary)
9926 @kindex q (Summary)
9927 @findex gnus-summary-exit
9928 @vindex gnus-summary-exit-hook
9929 @vindex gnus-summary-prepare-exit-hook
9930 @c @icon{gnus-summary-exit}
9931 Exit the current group and update all information on the group
9932 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
9933 called before doing much of the exiting, which calls
9934 @code{gnus-summary-expire-articles} by default.
9935 @code{gnus-summary-exit-hook} is called after finishing the exit
9936 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
9937 group mode having no more (unread) groups.
9938
9939 @item Z E
9940 @itemx Q
9941 @kindex Z E (Summary)
9942 @kindex Q (Summary)
9943 @findex gnus-summary-exit-no-update
9944 Exit the current group without updating any information on the group
9945 (@code{gnus-summary-exit-no-update}).
9946
9947 @item Z c
9948 @itemx c
9949 @kindex Z c (Summary)
9950 @kindex c (Summary)
9951 @findex gnus-summary-catchup-and-exit
9952 @c @icon{gnus-summary-catchup-and-exit}
9953 Mark all unticked articles in the group as read and then exit
9954 (@code{gnus-summary-catchup-and-exit}).
9955
9956 @item Z C
9957 @kindex Z C (Summary)
9958 @findex gnus-summary-catchup-all-and-exit
9959 Mark all articles, even the ticked ones, as read and then exit
9960 (@code{gnus-summary-catchup-all-and-exit}).
9961
9962 @item Z n
9963 @kindex Z n (Summary)
9964 @findex gnus-summary-catchup-and-goto-next-group
9965 Mark all articles as read and go to the next group
9966 (@code{gnus-summary-catchup-and-goto-next-group}).
9967
9968 @item Z R
9969 @kindex Z R (Summary)
9970 @findex gnus-summary-reselect-current-group
9971 Exit this group, and then enter it again
9972 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
9973 all articles, both read and unread.
9974
9975 @item Z G
9976 @itemx M-g
9977 @kindex Z G (Summary)
9978 @kindex M-g (Summary)
9979 @findex gnus-summary-rescan-group
9980 @c @icon{gnus-summary-mail-get}
9981 Exit the group, check for new articles in the group, and select the
9982 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
9983 articles, both read and unread.
9984
9985 @item Z N
9986 @kindex Z N (Summary)
9987 @findex gnus-summary-next-group
9988 Exit the group and go to the next group
9989 (@code{gnus-summary-next-group}).
9990
9991 @item Z P
9992 @kindex Z P (Summary)
9993 @findex gnus-summary-prev-group
9994 Exit the group and go to the previous group
9995 (@code{gnus-summary-prev-group}).
9996
9997 @item Z s
9998 @kindex Z s (Summary)
9999 @findex gnus-summary-save-newsrc
10000 Save the current number of read/marked articles in the dribble buffer
10001 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10002 given a prefix, also save the @file{.newsrc} file(s).  Using this
10003 command will make exit without updating (the @kbd{Q} command) worthless.
10004 @end table
10005
10006 @vindex gnus-exit-group-hook
10007 @code{gnus-exit-group-hook} is called when you exit the current group
10008 with an ``updating'' exit.  For instance @kbd{Q}
10009 (@code{gnus-summary-exit-no-update}) does not call this hook.
10010
10011 @findex gnus-summary-wake-up-the-dead
10012 @findex gnus-dead-summary-mode
10013 @vindex gnus-kill-summary-on-exit
10014 If you're in the habit of exiting groups, and then changing your mind
10015 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10016 If you do that, gnus won't kill the summary buffer when you exit it.
10017 (Quelle surprise!)  Instead it will change the name of the buffer to
10018 something like @samp{*Dead Summary ... *} and install a minor mode
10019 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10020 buffer, you'll find that all keys are mapped to a function called
10021 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10022 summary buffer will result in a live, normal summary buffer.
10023
10024 There will never be more than one dead summary buffer at any one time.
10025
10026 @vindex gnus-use-cross-reference
10027 The data on the current group will be updated (which articles you have
10028 read, which articles you have replied to, etc.) when you exit the
10029 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10030 @code{t} (which is the default), articles that are cross-referenced to
10031 this group and are marked as read, will also be marked as read in the
10032 other subscribed groups they were cross-posted to.  If this variable is
10033 neither @code{nil} nor @code{t}, the article will be marked as read in
10034 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10035
10036
10037 @node Crosspost Handling
10038 @section Crosspost Handling
10039
10040 @cindex velveeta
10041 @cindex spamming
10042 Marking cross-posted articles as read ensures that you'll never have to
10043 read the same article more than once.  Unless, of course, somebody has
10044 posted it to several groups separately.  Posting the same article to
10045 several groups (not cross-posting) is called @dfn{spamming}, and you are
10046 by law required to send nasty-grams to anyone who perpetrates such a
10047 heinous crime.  You may want to try NoCeM handling to filter out spam
10048 (@pxref{NoCeM}).
10049
10050 Remember: Cross-posting is kinda ok, but posting the same article
10051 separately to several groups is not.  Massive cross-posting (aka.
10052 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10053 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10054 excessive crossposting (@pxref{Summary Mail Commands}).
10055
10056 @cindex cross-posting
10057 @cindex Xref
10058 @cindex @sc{nov}
10059 One thing that may cause Gnus to not do the cross-posting thing
10060 correctly is if you use an @sc{nntp} server that supports @sc{xover}
10061 (which is very nice, because it speeds things up considerably) which
10062 does not include the @code{Xref} header in its @sc{nov} lines.  This is
10063 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10064 even with @sc{xover} by registering the @code{Xref} lines of all
10065 articles you actually read, but if you kill the articles, or just mark
10066 them as read without reading them, Gnus will not get a chance to snoop
10067 the @code{Xref} lines out of these articles, and will be unable to use
10068 the cross reference mechanism.
10069
10070 @cindex LIST overview.fmt
10071 @cindex overview.fmt
10072 To check whether your @sc{nntp} server includes the @code{Xref} header
10073 in its overview files, try @samp{telnet your.nntp.server nntp},
10074 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10075 overview.fmt}.  This may not work, but if it does, and the last line you
10076 get does not read @samp{Xref:full}, then you should shout and whine at
10077 your news admin until she includes the @code{Xref} header in the
10078 overview files.
10079
10080 @vindex gnus-nov-is-evil
10081 If you want Gnus to get the @code{Xref}s right all the time, you have to
10082 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10083 considerably.
10084
10085 C'est la vie.
10086
10087 For an alternative approach, @pxref{Duplicate Suppression}.
10088
10089
10090 @node Duplicate Suppression
10091 @section Duplicate Suppression
10092
10093 By default, gnus tries to make sure that you don't have to read the same
10094 article more than once by utilizing the crossposting mechanism
10095 (@pxref{Crosspost Handling}).  However, that simple and efficient
10096 approach may not work satisfactory for some users for various
10097 reasons.
10098
10099 @enumerate
10100 @item
10101 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
10102 is evil and not very common.
10103
10104 @item
10105 The @sc{nntp} server may fail to include the @code{Xref} header in the
10106 @file{.overview} data bases.  This is evil and all too common, alas.
10107
10108 @item
10109 You may be reading the same group (or several related groups) from
10110 different @sc{nntp} servers.
10111
10112 @item
10113 You may be getting mail that duplicates articles posted to groups.
10114 @end enumerate
10115
10116 I'm sure there are other situations where @code{Xref} handling fails as
10117 well, but these four are the most common situations.
10118
10119 If, and only if, @code{Xref} handling fails for you, then you may
10120 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10121 will remember the @code{Message-ID}s of all articles you have read or
10122 otherwise marked as read, and then, as if by magic, mark them as read
10123 all subsequent times you see them---in @emph{all} groups.  Using this
10124 mechanism is quite likely to be somewhat inefficient, but not overly
10125 so.  It's certainly preferable to reading the same articles more than
10126 once.
10127
10128 Duplicate suppression is not a very subtle instrument.  It's more like a
10129 sledge hammer than anything else.  It works in a very simple
10130 fashion---if you have marked an article as read, it adds this Message-ID
10131 to a cache.  The next time it sees this Message-ID, it will mark the
10132 article as read with the @samp{M} mark.  It doesn't care what group it
10133 saw the article in.
10134
10135 @table @code
10136 @item gnus-suppress-duplicates
10137 @vindex gnus-suppress-duplicates
10138 If non-@code{nil}, suppress duplicates.
10139
10140 @item gnus-save-duplicate-list
10141 @vindex gnus-save-duplicate-list
10142 If non-@code{nil}, save the list of duplicates to a file.  This will
10143 make startup and shutdown take longer, so the default is @code{nil}.
10144 However, this means that only duplicate articles read in a single gnus
10145 session are suppressed.
10146
10147 @item gnus-duplicate-list-length
10148 @vindex gnus-duplicate-list-length
10149 This variable says how many @code{Message-ID}s to keep in the duplicate
10150 suppression list.  The default is 10000.
10151
10152 @item gnus-duplicate-file
10153 @vindex gnus-duplicate-file
10154 The name of the file to store the duplicate suppression list in.  The
10155 default is @file{~/News/suppression}.
10156 @end table
10157
10158 If you have a tendency to stop and start gnus often, setting
10159 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10160 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10161 the other hand, saving the list makes startup and shutdown much slower,
10162 so that means that if you stop and start gnus often, you should set
10163 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10164 to you to figure out, I think.
10165
10166 @node Security
10167 @section Security
10168
10169 Gnus is able to verify signed messages or decrypt encrypted messages.
10170 The formats that are supported are PGP, @sc{pgp/mime} and @sc{s/mime},
10171 however you need some external programs to get things to work:
10172
10173 @enumerate
10174 @item
10175 To handle PGP messages, you have to install mailcrypt or gpg.el as
10176 well as a OpenPGP implementation (such as GnuPG).
10177
10178 @item
10179 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
10180 or newer is recommended.
10181
10182 @end enumerate
10183
10184 More information on how to set things up can be found in the message
10185 manual (@pxref{Security, ,Security, message, Message Manual}).
10186
10187 @table @code
10188 @item mm-verify-option
10189 @vindex mm-verify-option
10190 Option of verifying signed parts.  @code{never}, not verify;
10191 @code{always}, always verify; @code{known}, only verify known
10192 protocols. Otherwise, ask user.
10193
10194 @item mm-decrypt-option
10195 @vindex mm-decrypt-option
10196 Option of decrypting encrypted parts.  @code{never}, no decryption;
10197 @code{always}, always decrypt; @code{known}, only decrypt known
10198 protocols. Otherwise, ask user.
10199
10200 @end table
10201
10202 @node Mailing List
10203 @section Mailing List
10204
10205 @kindex A M (summary)
10206 @findex gnus-mailing-list-insinuate
10207 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10208 either add a `to-list' group parameter (@pxref{Group Parameters}),
10209 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10210 summary buffer, or say:
10211
10212 @lisp
10213 (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
10214 @end lisp
10215
10216 That enables the following commands to the summary buffer:
10217
10218 @table @kbd
10219
10220 @item C-c C-n h
10221 @kindex C-c C-n h (Summary)
10222 @findex gnus-mailing-list-help
10223 Send a message to fetch mailing list help, if List-Help field exists.
10224
10225 @item C-c C-n s
10226 @kindex C-c C-n s (Summary)
10227 @findex gnus-mailing-list-subscribe
10228 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10229
10230 @item C-c C-n u
10231 @kindex C-c C-n u (Summary)
10232 @findex gnus-mailing-list-unsubscribe
10233 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10234 field exists.
10235
10236 @item C-c C-n p
10237 @kindex C-c C-n p (Summary)
10238 @findex gnus-mailing-list-post
10239 Post to the mailing list, if List-Post field exists.
10240
10241 @item C-c C-n o
10242 @kindex C-c C-n o (Summary)
10243 @findex gnus-mailing-list-owner
10244 Send a message to the mailing list owner, if List-Owner field exists.
10245
10246 @item C-c C-n a
10247 @kindex C-c C-n a (Summary)
10248 @findex gnus-mailing-list-owner
10249 Browse the mailing list archive, if List-Archive field exists.
10250
10251 @end table
10252
10253 @node Article Buffer
10254 @chapter Article Buffer
10255 @cindex article buffer
10256
10257 The articles are displayed in the article buffer, of which there is only
10258 one.  All the summary buffers share the same article buffer unless you
10259 tell gnus otherwise.
10260
10261 @menu
10262 * Hiding Headers::              Deciding what headers should be displayed.
10263 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
10264 * Customizing Articles::        Tailoring the look of the articles.
10265 * Article Keymap::              Keystrokes available in the article buffer.
10266 * Misc Article::                Other stuff.
10267 @end menu
10268
10269
10270 @node Hiding Headers
10271 @section Hiding Headers
10272 @cindex hiding headers
10273 @cindex deleting headers
10274
10275 The top section of each article is the @dfn{head}.  (The rest is the
10276 @dfn{body}, but you may have guessed that already.)
10277
10278 @vindex gnus-show-all-headers
10279 There is a lot of useful information in the head: the name of the person
10280 who wrote the article, the date it was written and the subject of the
10281 article.  That's well and nice, but there's also lots of information
10282 most people do not want to see---what systems the article has passed
10283 through before reaching you, the @code{Message-ID}, the
10284 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10285 of some of those lines.  If you want to keep all those lines in the
10286 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10287
10288 Gnus provides you with two variables for sifting headers:
10289
10290 @table @code
10291
10292 @item gnus-visible-headers
10293 @vindex gnus-visible-headers
10294 If this variable is non-@code{nil}, it should be a regular expression
10295 that says what headers you wish to keep in the article buffer.  All
10296 headers that do not match this variable will be hidden.
10297
10298 For instance, if you only want to see the name of the person who wrote
10299 the article and the subject, you'd say:
10300
10301 @lisp
10302 (setq gnus-visible-headers "^From:\\|^Subject:")
10303 @end lisp
10304
10305 This variable can also be a list of regexps to match headers to
10306 remain visible.
10307
10308 @item gnus-ignored-headers
10309 @vindex gnus-ignored-headers
10310 This variable is the reverse of @code{gnus-visible-headers}.  If this
10311 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10312 should be a regular expression that matches all lines that you want to
10313 hide.  All lines that do not match this variable will remain visible.
10314
10315 For instance, if you just want to get rid of the @code{References} field
10316 and the @code{Xref} field, you might say:
10317
10318 @lisp
10319 (setq gnus-ignored-headers "^References:\\|^Xref:")
10320 @end lisp
10321
10322 This variable can also be a list of regexps to match headers to
10323 be removed.
10324
10325 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10326 variable will have no effect.
10327
10328 @end table
10329
10330 @vindex gnus-sorted-header-list
10331 Gnus can also sort the headers for you.  (It does this by default.)  You
10332 can control the sorting by setting the @code{gnus-sorted-header-list}
10333 variable.  It is a list of regular expressions that says in what order
10334 the headers are to be displayed.
10335
10336 For instance, if you want the name of the author of the article first,
10337 and then the subject, you might say something like:
10338
10339 @lisp
10340 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10341 @end lisp
10342
10343 Any headers that are to remain visible, but are not listed in this
10344 variable, will be displayed in random order after all the headers listed in this variable.
10345
10346 @findex gnus-article-hide-boring-headers
10347 @vindex gnus-boring-article-headers
10348 You can hide further boring headers by setting
10349 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10350 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10351 list, but this list doesn't actually contain header names.  Instead is
10352 lists various @dfn{boring conditions} that Gnus can check and remove
10353 from sight.
10354
10355 These conditions are:
10356 @table @code
10357 @item empty
10358 Remove all empty headers.
10359 @item followup-to
10360 Remove the @code{Followup-To} header if it is identical to the
10361 @code{Newsgroups} header.
10362 @item reply-to
10363 Remove the @code{Reply-To} header if it lists the same address as the
10364 @code{From} header.
10365 @item newsgroups
10366 Remove the @code{Newsgroups} header if it only contains the current group
10367 name.
10368 @item to-address
10369 Remove the @code{To} header if it only contains the address identical to
10370 the current groups's @code{to-address} parameter.
10371 @item date
10372 Remove the @code{Date} header if the article is less than three days
10373 old.
10374 @item long-to
10375 Remove the @code{To} header if it is very long.
10376 @item many-to
10377 Remove all @code{To} headers if there are more than one.
10378 @end table
10379
10380 To include these three elements, you could say something like:
10381
10382 @lisp
10383 (setq gnus-boring-article-headers
10384       '(empty followup-to reply-to))
10385 @end lisp
10386
10387 This is also the default value for this variable.
10388
10389
10390 @node Using MIME
10391 @section Using MIME
10392 @cindex @sc{mime}
10393
10394 Mime is a standard for waving your hands through the air, aimlessly,
10395 while people stand around yawning.
10396
10397 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
10398 while all newsreaders die of fear.
10399
10400 @sc{mime} may specify what character set the article uses, the encoding
10401 of the characters, and it also makes it possible to embed pictures and
10402 other naughty stuff in innocent-looking articles.
10403
10404 @vindex gnus-show-mime
10405 @vindex gnus-article-display-method-for-mime
10406 @findex gnus-article-display-mime-message
10407 Gnus handles @sc{mime} by pushing the articles through
10408 @code{gnus-article-display-method-for-mime}, which is
10409 @code{gnus-article-display-mime-message} by default.  This function
10410 calls the @sc{semi} MIME-View program to actually do the work.  For more
10411 information on @sc{semi} MIME-View, see its manual page (however it is
10412 not existed yet, sorry).
10413
10414 Set @code{gnus-show-mime} to @code{t} if you want to use
10415 @sc{mime} all the time.  If you have @code{gnus-show-mime} set, then
10416 you'll see some unfortunate display glitches in the article buffer.
10417 These can't be avoided.
10418
10419 In GNUS or Gnus, it might be best to just use the toggling functions
10420 from the summary buffer to avoid getting nasty surprises. (For instance,
10421 you enter the group @samp{alt.sing-a-long} and, before you know it,
10422 @sc{mime} has decoded the sound file in the article and some horrible
10423 sing-a-long song comes screaming out your speakers, and you can't find
10424 the volume button, because there isn't one, and people are starting to
10425 look at you, and you try to stop the program, but you can't, and you
10426 can't find the program to control the volume, and everybody else in the
10427 room suddenly decides to look at you disdainfully, and you'll feel
10428 rather stupid.)
10429
10430 Any similarity to real events and people is purely coincidental.  Ahem.
10431
10432 To avoid such kind of situation, gnus stops to use
10433 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10434 non-@code{nil} every-time, then you can push button in the article
10435 buffer when there are nobody else.
10436
10437 Also see @pxref{MIME Commands}.
10438
10439
10440 @node Customizing Articles
10441 @section Customizing Articles
10442 @cindex article customization
10443
10444 A slew of functions for customizing how the articles are to look like
10445 exist.  You can call these functions interactively, or you can have them
10446 called automatically when you select the articles.
10447
10448 To have them called automatically, you should set the corresponding
10449 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10450 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10451 be set, but first we discuss the values these variables can have.
10452
10453 Note: Some values, while valid, make little sense.  Check the list below
10454 for sensible values.
10455
10456 @enumerate
10457 @item
10458 @code{nil}: Don't do this treatment.
10459
10460 @item
10461 @code{t}: Do this treatment on all body parts.
10462
10463 @item
10464 @code{head}: Do the treatment on the headers.
10465
10466 @item
10467 @code{last}: Do this treatment on the last part.
10468
10469 @item
10470 An integer: Do this treatment on all body parts that have a length less
10471 than this number.
10472
10473 @item
10474 A list of strings: Do this treatment on all body parts that are in
10475 articles that are read in groups that have names that match one of the
10476 regexps in the list.
10477
10478 @item
10479 A list where the first element is not a string:
10480
10481 The list is evaluated recursively.  The first element of the list is a
10482 predicate.  The following predicates are recognized: @code{or},
10483 @code{and}, @code{not} and @code{typep}.  Here's an example:
10484
10485 @lisp
10486 (or last
10487     (typep "text/x-vcard"))
10488 @end lisp
10489
10490 @item
10491 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10492 non-nil.
10493
10494 @end enumerate
10495
10496 You may have noticed that the word @dfn{part} is used here.  This refers
10497 to the fact that some messages are @sc{mime} multipart articles that may
10498 be divided into several parts.  Articles that are not multiparts are
10499 considered to contain just a single part.
10500
10501 @vindex gnus-article-treat-types
10502 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10503 want to, but by default, only @samp{text/plain} parts are given the
10504 treatment.  This is controlled by the @code{gnus-article-treat-types}
10505 variable, which is a list of regular expressions that are matched to the
10506 type of the part.  This variable is ignored if the value of the
10507 controlling variable is a predicate list, as described above.
10508
10509 The following treatment options are available.  The easiest way to
10510 customize this is to examine the @code{gnus-article-treat} customization
10511 group.  Values in parenthesis are suggested sensible values.  Others are
10512 possible but those listed are probably sufficient for most people.
10513
10514 @table @code
10515 @item gnus-treat-buttonize (t, integer)
10516 @item gnus-treat-buttonize-head (head)
10517
10518 @xref{Article Buttons}.
10519
10520 @item gnus-treat-capitalize-sentences (t, integer)
10521 @item gnus-treat-overstrike (t, integer)
10522 @item gnus-treat-strip-cr (t, integer)
10523 @item gnus-treat-strip-headers-in-body (t, integer)
10524 @item gnus-treat-strip-leading-blank-lines (t, integer)
10525 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10526 @item gnus-treat-strip-pem (t, last, integer)
10527 @item gnus-treat-strip-pgp (t, last, integer)
10528 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10529 @item gnus-treat-unsplit-urls (t, integer)
10530 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10531
10532 @xref{Article Washing}.
10533
10534 @item gnus-treat-date-english (head)
10535 @item gnus-treat-date-iso8601 (head)
10536 @item gnus-treat-date-lapsed (head)
10537 @item gnus-treat-date-local (head)
10538 @item gnus-treat-date-original (head)
10539 @item gnus-treat-date-user-defined (head)
10540 @item gnus-treat-date-ut (head)
10541
10542 @xref{Article Date}.
10543
10544 @item gnus-treat-from-picon (head)
10545 @item gnus-treat-mail-picon (head)
10546 @item gnus-treat-newsgroups-picon (head)
10547
10548 @xref{Picons}.
10549
10550 @item gnus-treat-display-smileys (t, integer)
10551
10552 @item gnus-treat-body-boundary (head)
10553
10554 @vindex gnus-body-boundary-delimiter
10555 Adds a delimiter between header and body, the string used as delimiter
10556 is controlled by @code{gnus-body-boundary-delimiter}.
10557
10558 @xref{Smileys}.
10559
10560 @item gnus-treat-display-xface (head)
10561
10562 @xref{X-Face}.
10563
10564 @item gnus-treat-emphasize (t, head, integer)
10565 @item gnus-treat-fill-article (t, integer)
10566 @item gnus-treat-fill-long-lines (t, integer)
10567 @item gnus-treat-hide-boring-headers (head)
10568 @item gnus-treat-hide-citation (t, integer)
10569 @item gnus-treat-hide-citation-maybe (t, integer)
10570 @item gnus-treat-hide-headers (head)
10571 @item gnus-treat-hide-signature (t, last)
10572
10573 @xref{Article Hiding}.
10574
10575 @item gnus-treat-highlight-citation (t, integer)
10576 @item gnus-treat-highlight-headers (head)
10577 @item gnus-treat-highlight-signature (t, last, integer)
10578
10579 @xref{Article Highlighting}.
10580
10581 @item gnus-treat-play-sounds
10582 @item gnus-treat-translate
10583 @item gnus-treat-x-pgp-sig (head)
10584
10585 @item gnus-treat-unfold-headers (head)
10586 @item gnus-treat-fold-headers (head)
10587 @item gnus-treat-fold-newsgroups (head)
10588 @item gnus-treat-leading-whitespace (head)
10589
10590 @xref{Article Header}.
10591
10592
10593 @end table
10594
10595 @vindex gnus-part-display-hook
10596 You can, of course, write your own functions to be called from
10597 @code{gnus-part-display-hook}.  The functions are called narrowed to the
10598 part, and you can do anything you like, pretty much.  There is no
10599 information that you have to keep in the buffer---you can change
10600 everything.
10601
10602
10603 @node Article Keymap
10604 @section Article Keymap
10605
10606 Most of the keystrokes in the summary buffer can also be used in the
10607 article buffer.  They should behave as if you typed them in the summary
10608 buffer, which means that you don't actually have to have a summary
10609 buffer displayed while reading.  You can do it all from the article
10610 buffer.
10611
10612 A few additional keystrokes are available:
10613
10614 @table @kbd
10615
10616 @item SPACE
10617 @kindex SPACE (Article)
10618 @findex gnus-article-next-page
10619 Scroll forwards one page (@code{gnus-article-next-page}).
10620
10621 @item DEL
10622 @kindex DEL (Article)
10623 @findex gnus-article-prev-page
10624 Scroll backwards one page (@code{gnus-article-prev-page}).
10625
10626 @item C-c ^
10627 @kindex C-c ^ (Article)
10628 @findex gnus-article-refer-article
10629 If point is in the neighborhood of a @code{Message-ID} and you press
10630 @kbd{C-c ^}, Gnus will try to get that article from the server
10631 (@code{gnus-article-refer-article}).
10632
10633 @item C-c C-m
10634 @kindex C-c C-m (Article)
10635 @findex gnus-article-mail
10636 Send a reply to the address near point (@code{gnus-article-mail}).  If
10637 given a prefix, include the mail.
10638
10639 @item s
10640 @kindex s (Article)
10641 @findex gnus-article-show-summary
10642 Reconfigure the buffers so that the summary buffer becomes visible
10643 (@code{gnus-article-show-summary}).
10644
10645 @item ?
10646 @kindex ? (Article)
10647 @findex gnus-article-describe-briefly
10648 Give a very brief description of the available keystrokes
10649 (@code{gnus-article-describe-briefly}).
10650
10651 @item TAB
10652 @kindex TAB (Article)
10653 @findex gnus-article-next-button
10654 Go to the next button, if any (@code{gnus-article-next-button}).  This
10655 only makes sense if you have buttonizing turned on.
10656
10657 @item M-TAB
10658 @kindex M-TAB (Article)
10659 @findex gnus-article-prev-button
10660 Go to the previous button, if any (@code{gnus-article-prev-button}).
10661
10662 @item R
10663 @kindex R (Article)
10664 @findex gnus-article-reply-with-original
10665 Send a reply to the current article and yank the current article
10666 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
10667 wide reply.  If the region is active, only yank the text in the
10668 region.
10669
10670 @item F
10671 @kindex F (Article)
10672 @findex gnus-article-followup-with-original
10673 Send a followup to the current article and yank the current article
10674 (@code{gnus-article-followup-with-original}).  If given a prefix, make
10675 a wide reply.  If the region is active, only yank the text in the
10676 region.
10677
10678
10679 @end table
10680
10681
10682 @node Misc Article
10683 @section Misc Article
10684
10685 @table @code
10686
10687 @item gnus-single-article-buffer
10688 @vindex gnus-single-article-buffer
10689 If non-@code{nil}, use the same article buffer for all the groups.
10690 (This is the default.)  If @code{nil}, each group will have its own
10691 article buffer.
10692
10693 @vindex gnus-article-decode-hook
10694 @item gnus-article-decode-hook
10695 @cindex MIME
10696 Hook used to decode @sc{mime} articles.  The default value is
10697 @code{(article-decode-charset article-decode-encoded-words)}
10698
10699 @vindex gnus-article-prepare-hook
10700 @item gnus-article-prepare-hook
10701 This hook is called right after the article has been inserted into the
10702 article buffer.  It is mainly intended for functions that do something
10703 depending on the contents; it should probably not be used for changing
10704 the contents of the article buffer.
10705
10706 @item gnus-article-mode-hook
10707 @vindex gnus-article-mode-hook
10708 Hook called in article mode buffers.
10709
10710 @item gnus-article-mode-syntax-table
10711 @vindex gnus-article-mode-syntax-table
10712 Syntax table used in article buffers.  It is initialized from
10713 @code{text-mode-syntax-table}.
10714
10715 @vindex gnus-article-mode-line-format
10716 @item gnus-article-mode-line-format
10717 This variable is a format string along the same lines as
10718 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
10719 accepts the same format specifications as that variable, with two
10720 extensions:
10721
10722 @table @samp
10723
10724 @item w
10725 The @dfn{wash status} of the article.  This is a short string with one
10726 character for each possible article wash operation that may have been
10727 performed.  The characters and their meaning:
10728
10729 @table @samp
10730
10731 @item c
10732 Displayed when cited text may be hidden in the article buffer.
10733
10734 @item h
10735 Displayed when headers are hidden in the article buffer.
10736
10737 @item p
10738 Displayed when article is digitally signed or encrypted, and Gnus has
10739 hidden the security headers.  (N.B. does not tell anything about
10740 security status, i.e. good or bad signature.)
10741
10742 @item s
10743 Displayed when the signature has been hidden in the Article buffer.
10744
10745 @item o
10746 Displayed when Gnus has treated overstrike characters in the article buffer.
10747
10748 @item e
10749 Displayed when Gnus has treated emphasised strings in the article buffer.
10750
10751 @end table
10752
10753 @item m
10754 The number of @sc{mime} parts in the article.
10755
10756 @end table
10757
10758 @vindex gnus-break-pages
10759
10760 @item gnus-break-pages
10761 Controls whether @dfn{page breaking} is to take place.  If this variable
10762 is non-@code{nil}, the articles will be divided into pages whenever a
10763 page delimiter appears in the article.  If this variable is @code{nil},
10764 paging will not be done.
10765
10766 @item gnus-page-delimiter
10767 @vindex gnus-page-delimiter
10768 This is the delimiter mentioned above.  By default, it is @samp{^L}
10769 (formfeed).
10770 @end table
10771
10772
10773 @node Composing Messages
10774 @chapter Composing Messages
10775 @cindex composing messages
10776 @cindex messages
10777 @cindex mail
10778 @cindex sending mail
10779 @cindex reply
10780 @cindex followup
10781 @cindex post
10782 @cindex using gpg
10783 @cindex using s/mime
10784 @cindex using smime
10785
10786 @kindex C-c C-c (Post)
10787 All commands for posting and mailing will put you in a message buffer
10788 where you can edit the article all you like, before you send the
10789 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
10790 Message Manual}.  Where the message will be posted/mailed to depends
10791 on your setup (@pxref{Posting Server}).
10792
10793 @menu
10794 * Mail::                        Mailing and replying.
10795 * Posting Server::              What server should you post and mail via?
10796 * Mail and Post::               Mailing and posting at the same time.
10797 * Archived Messages::           Where Gnus stores the messages you've sent.
10798 * Posting Styles::              An easier way to specify who you are.
10799 * Drafts::                      Postponing messages and rejected messages.
10800 * Rejected Articles::           What happens if the server doesn't like your article?
10801 * Signing and encrypting::      How to compose secure messages.
10802 @end menu
10803
10804 Also see @pxref{Canceling and Superseding} for information on how to
10805 remove articles you shouldn't have posted.
10806
10807
10808 @node Mail
10809 @section Mail
10810
10811 Variables for customizing outgoing mail:
10812
10813 @table @code
10814 @item gnus-uu-digest-headers
10815 @vindex gnus-uu-digest-headers
10816 List of regexps to match headers included in digested messages.  The
10817 headers will be included in the sequence they are matched.  If
10818 @code{nil} include all headers.
10819
10820 @item gnus-add-to-list
10821 @vindex gnus-add-to-list
10822 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
10823 that have none when you do a @kbd{a}.
10824
10825 @item gnus-confirm-mail-reply-to-news
10826 @vindex gnus-confirm-mail-reply-to-news
10827 If non-@code{nil}, Gnus requests confirmation when replying to news.
10828 If you find yourself never wanting to reply to mail, but occasionally
10829 press R anyway, this variable might be for you.
10830
10831 @end table
10832
10833
10834 @node Posting Server
10835 @section Posting Server
10836
10837 When you press those magical @kbd{C-c C-c} keys to ship off your latest
10838 (extremely intelligent, of course) article, where does it go?
10839
10840 Thank you for asking.  I hate you.
10841
10842 It can be quite complicated.
10843
10844 @vindex gnus-post-method
10845 When posting news, Message usually invokes @code{message-send-news}
10846 (@pxref{News Variables, , News Variables, message, Message Manual}).
10847 Normally, Gnus will post using the same select method as you're
10848 reading from (which might be convenient if you're reading lots of
10849 groups from different private servers).  However.  If the server
10850 you're reading from doesn't allow posting, just reading, you probably
10851 want to use some other server to post your (extremely intelligent and
10852 fabulously interesting) articles.  You can then set the
10853 @code{gnus-post-method} to some other method:
10854
10855 @lisp
10856 (setq gnus-post-method '(nnspool ""))
10857 @end lisp
10858
10859 Now, if you've done this, and then this server rejects your article, or
10860 this server is down, what do you do then?  To override this variable you
10861 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
10862 the ``current'' server, to get back the default behavior, for posting.
10863
10864 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
10865 gnus will prompt you for what method to use for posting.
10866
10867 You can also set @code{gnus-post-method} to a list of select methods.
10868 If that's the case, gnus will always prompt you for what method to use
10869 for posting.
10870
10871 Finally, if you want to always post using the native select method,
10872 you can set this variable to @code{native}.
10873
10874 When sending mail, Message invokes @code{message-send-mail-function}.
10875 The default function, @code{message-send-mail-with-sendmail}, pipes
10876 your article to the @code{sendmail} binary for further queuing and
10877 sending.  When your local system is not configured for sending mail
10878 using @code{sendmail}, and you have access to a remote @sc{smtp}
10879 server, you can set @code{message-send-mail-function} to
10880 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
10881 package correctly.  An example:
10882
10883 @lisp
10884 (setq message-send-mail-function 'smtpmail-send-it
10885       smtpmail-default-smtp-server "YOUR SMTP HOST")
10886 @end lisp
10887
10888 To the thing similar to this, there is @code{message-smtpmail-send-it}.
10889 It is useful if your ISP requires the POP-before-SMTP authentication.
10890 See the documentation for the function @code{mail-source-touch-pop}.
10891
10892 Other possible choises for @code{message-send-mail-function} includes
10893 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
10894 and @code{feedmail-send-it}.
10895
10896 @node Mail and Post
10897 @section Mail and Post
10898
10899 Here's a list of variables relevant to both mailing and
10900 posting:
10901
10902 @table @code
10903 @item gnus-mailing-list-groups
10904 @findex gnus-mailing-list-groups
10905 @cindex mailing lists
10906
10907 If your news server offers groups that are really mailing lists
10908 gatewayed to the @sc{nntp} server, you can read those groups without
10909 problems, but you can't post/followup to them without some difficulty.
10910 One solution is to add a @code{to-address} to the group parameters
10911 (@pxref{Group Parameters}).  An easier thing to do is set the
10912 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
10913 really are mailing lists.  Then, at least, followups to the mailing
10914 lists will work most of the time.  Posting to these groups (@kbd{a}) is
10915 still a pain, though.
10916
10917 @end table
10918
10919 You may want to do spell-checking on messages that you send out.  Or, if
10920 you don't want to spell-check by hand, you could add automatic
10921 spell-checking via the @code{ispell} package:
10922
10923 @cindex ispell
10924 @findex ispell-message
10925 @lisp
10926 (add-hook 'message-send-hook 'ispell-message)
10927 @end lisp
10928
10929 If you want to change the @code{ispell} dictionary based on what group
10930 you're in, you could say something like the following:
10931
10932 @lisp
10933 (add-hook 'gnus-select-group-hook
10934           (lambda ()
10935             (cond
10936              ((string-match
10937                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
10938               (ispell-change-dictionary "deutsch"))
10939              (t
10940               (ispell-change-dictionary "english")))))
10941 @end lisp
10942
10943 Modify to suit your needs.
10944
10945
10946 @node Archived Messages
10947 @section Archived Messages
10948 @cindex archived messages
10949 @cindex sent messages
10950
10951 Gnus provides a few different methods for storing the mail and news you
10952 send.  The default method is to use the @dfn{archive virtual server} to
10953 store the messages.  If you want to disable this completely, the
10954 @code{gnus-message-archive-group} variable should be @code{nil}, which
10955 is the default.
10956
10957 For archiving interesting messages in a group you read, see the
10958 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
10959 Group Commands}).
10960
10961 @vindex gnus-message-archive-method
10962 @code{gnus-message-archive-method} says what virtual server gnus is to
10963 use to store sent messages.  The default is:
10964
10965 @lisp
10966 (nnfolder "archive"
10967           (nnfolder-directory   "~/Mail/archive")
10968           (nnfolder-active-file "~/Mail/archive/active")
10969           (nnfolder-get-new-mail nil)
10970           (nnfolder-inhibit-expiry t))
10971 @end lisp
10972
10973 You can, however, use any mail select method (@code{nnml},
10974 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
10975 for doing this sort of thing, though.  If you don't like the default
10976 directory chosen, you could say something like:
10977
10978 @lisp
10979 (setq gnus-message-archive-method
10980       '(nnfolder "archive"
10981                  (nnfolder-inhibit-expiry t)
10982                  (nnfolder-active-file "~/News/sent-mail/active")
10983                  (nnfolder-directory "~/News/sent-mail/")))
10984 @end lisp
10985
10986 @vindex gnus-message-archive-group
10987 @cindex Gcc
10988 Gnus will insert @code{Gcc} headers in all outgoing messages that point
10989 to one or more group(s) on that server.  Which group to use is
10990 determined by the @code{gnus-message-archive-group} variable.
10991
10992 This variable can be used to do the following:
10993
10994 @itemize @bullet
10995 @item
10996 a string
10997 Messages will be saved in that group.
10998
10999 Note that you can include a select method in the group name, then the
11000 message will not be stored in the select method given by
11001 @code{gnus-message-archive-method}, but in the select method specified
11002 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11003 has the default value shown above.  Then setting
11004 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11005 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11006 value @code{"nnml:foo"}, then outgoing messages will be stored in
11007 @samp{nnml:foo}.
11008 @item
11009 a list of strings
11010 Messages will be saved in all those groups.
11011 @item
11012 an alist of regexps, functions and forms
11013 When a key ``matches'', the result is used.
11014 @item
11015 @code{nil}
11016 No message archiving will take place.  This is the default.
11017 @end itemize
11018
11019 Let's illustrate:
11020
11021 Just saving to a single group called @samp{MisK}:
11022 @lisp
11023 (setq gnus-message-archive-group "MisK")
11024 @end lisp
11025
11026 Saving to two groups, @samp{MisK} and @samp{safe}:
11027 @lisp
11028 (setq gnus-message-archive-group '("MisK" "safe"))
11029 @end lisp
11030
11031 Save to different groups based on what group you are in:
11032 @lisp
11033 (setq gnus-message-archive-group
11034       '(("^alt" "sent-to-alt")
11035         ("mail" "sent-to-mail")
11036         (".*" "sent-to-misc")))
11037 @end lisp
11038
11039 More complex stuff:
11040 @lisp
11041 (setq gnus-message-archive-group
11042       '((if (message-news-p)
11043             "misc-news"
11044           "misc-mail")))
11045 @end lisp
11046
11047 How about storing all news messages in one file, but storing all mail
11048 messages in one file per month:
11049
11050 @lisp
11051 (setq gnus-message-archive-group
11052       '((if (message-news-p)
11053             "misc-news"
11054           (concat "mail." (format-time-string "%Y-%m")))))
11055 @end lisp
11056
11057 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11058 @c use a different value for @code{gnus-message-archive-group} there.)
11059
11060 Now, when you send a message off, it will be stored in the appropriate
11061 group.  (If you want to disable storing for just one particular message,
11062 you can just remove the @code{Gcc} header that has been inserted.)  The
11063 archive group will appear in the group buffer the next time you start
11064 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11065 enter it and read the articles in it just like you'd read any other
11066 group.  If the group gets really big and annoying, you can simply rename
11067 if (using @kbd{G r} in the group buffer) to something
11068 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11069 continue to be stored in the old (now empty) group.
11070
11071 That's the default method of archiving sent messages.  Gnus offers a
11072 different way for the people who don't like the default method.  In that
11073 case you should set @code{gnus-message-archive-group} to @code{nil};
11074 this will disable archiving.
11075
11076 @table @code
11077 @item gnus-outgoing-message-group
11078 @vindex gnus-outgoing-message-group
11079 All outgoing messages will be put in this group.  If you want to store
11080 all your outgoing mail and articles in the group @samp{nnml:archive},
11081 you set this variable to that value.  This variable can also be a list of
11082 group names.
11083
11084 If you want to have greater control over what group to put each
11085 message in, you can set this variable to a function that checks the
11086 current newsgroup name and then returns a suitable group name (or list
11087 of names).
11088
11089 This variable can be used instead of @code{gnus-message-archive-group},
11090 but the latter is the preferred method.
11091
11092 @item gnus-gcc-mark-as-read
11093 @vindex gnus-gcc-mark-as-read
11094 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11095
11096 @item gnus-gcc-externalize-attachments
11097 @vindex gnus-gcc-externalize-attachments
11098 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11099 and matches the Gcc group name, attach files as external parts; if it is
11100 @code{all}, attach local files as external parts; if it is other
11101 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11102 changed in the future.
11103
11104 @end table
11105
11106
11107 @node Posting Styles
11108 @section Posting Styles
11109 @cindex posting styles
11110 @cindex styles
11111
11112 All them variables, they make my head swim.
11113
11114 So what if you want a different @code{Organization} and signature based
11115 on what groups you post to?  And you post both from your home machine
11116 and your work machine, and you want different @code{From} lines, and so
11117 on?
11118
11119 @vindex gnus-posting-styles
11120 One way to do stuff like that is to write clever hooks that change the
11121 variables you need to have changed.  That's a bit boring, so somebody
11122 came up with the bright idea of letting the user specify these things in
11123 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11124 variable:
11125
11126 @lisp
11127 ((".*"
11128   (signature "Peace and happiness")
11129   (organization "What me?"))
11130  ("^comp"
11131   (signature "Death to everybody"))
11132  ("comp.emacs.i-love-it"
11133   (organization "Emacs is it")))
11134 @end lisp
11135
11136 As you might surmise from this example, this alist consists of several
11137 @dfn{styles}.  Each style will be applicable if the first element
11138 ``matches'', in some form or other.  The entire alist will be iterated
11139 over, from the beginning towards the end, and each match will be
11140 applied, which means that attributes in later styles that match override
11141 the same attributes in earlier matching styles.  So
11142 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11143 signature and the @samp{What me?} @code{Organization} header.
11144
11145 The first element in each style is called the @code{match}.  If it's a
11146 string, then Gnus will try to regexp match it against the group name.
11147 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
11148 the original article for a header whose name is MATCH and compare that
11149 REGEXP.  MATCH and REGEXP are strings.  (There original article is the
11150 one you are replying or following up to.  If you are not composing a
11151 reply or a followup, then there is nothing to match against.)  If the
11152 @code{match} is a function symbol, that function will be called with no
11153 arguments.  If it's a variable symbol, then the variable will be
11154 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11155 any case, if this returns a non-@code{nil} value, then the style is said
11156 to @dfn{match}.
11157
11158 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11159 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11160 attribute name can be one of @code{signature}, @code{signature-file},
11161 @code{x-face-file}, @code{address} (overriding
11162 @code{user-mail-address}), @code{name} (overriding
11163 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11164 be a string or a symbol.  In that case, this will be used as a header
11165 name, and the value will be inserted in the headers of the article; if
11166 the value is @code{nil}, the header name will be removed.  If the
11167 attribute name is @code{eval}, the form is evaluated, and the result
11168 is thrown away.
11169
11170 The attribute value can be a string (used verbatim), a function with
11171 zero arguments (the return value will be used), a variable (its value
11172 will be used) or a list (it will be @code{eval}ed and the return value
11173 will be used).  The functions and sexps are called/@code{eval}ed in the
11174 message buffer that is being set up.  The headers of the current article
11175 are available through the @code{message-reply-headers} variable, which
11176 is a vector of the following headers: number subject from date id
11177 references chars lines xref extra.
11178
11179 @vindex message-reply-headers
11180
11181 If you wish to check whether the message you are about to compose is
11182 meant to be a news article or a mail message, you can check the values
11183 of the @code{message-news-p} and @code{message-mail-p} functions.
11184
11185 @findex message-mail-p
11186 @findex message-news-p
11187
11188 So here's a new example:
11189
11190 @lisp
11191 (setq gnus-posting-styles
11192       '((".*"
11193          (signature-file "~/.signature")
11194          (name "User Name")
11195          ("X-Home-Page" (getenv "WWW_HOME"))
11196          (organization "People's Front Against MWM"))
11197         ("^rec.humor"
11198          (signature my-funny-signature-randomizer))
11199         ((equal (system-name) "gnarly")  ;; A form
11200          (signature my-quote-randomizer))
11201         (message-news-p        ;; A function symbol
11202          (signature my-news-signature))
11203         (window-system         ;; A value symbol
11204          ("X-Window-System" (format "%s" window-system)))
11205         ;; If I'm replying to Larsi, set the Organization header.
11206         ((header "from" "larsi.*org")
11207          (Organization "Somewhere, Inc."))
11208         ((posting-from-work-p) ;; A user defined function
11209          (signature-file "~/.work-signature")
11210          (address "user@@bar.foo")
11211          (body "You are fired.\n\nSincerely, your boss.")
11212          (organization "Important Work, Inc"))
11213         ("nnml:.*"
11214          (From (save-excursion
11215                  (set-buffer gnus-article-buffer)
11216                  (message-fetch-field "to"))))
11217         ("^nn.+:"
11218          (signature-file "~/.mail-signature"))))
11219 @end lisp
11220
11221 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11222 @code{From} address in all your outgoing replies, which might be handy
11223 if you fill many roles.
11224
11225 Setting the @code{gnus-named-posting-styles} variable will make
11226 posting-styles allow to have distinctive names.  You can specify an
11227 arbitrary posting-style when article posting with @kbd{S P} in the
11228 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11229 the names to styles.  Once a posting-style is added to the alist, we can
11230 import it from @code{gnus-posting-styles}.  If an attribute whose name
11231 is @code{import} is found, Gnus will look for the attribute value in
11232 @code{gnus-named-posting-styles} and expand it in place.
11233
11234 Here's an example:
11235
11236 @lisp
11237 (setq gnus-named-posting-styles
11238       '(("Default"
11239          (signature-file "~/.signature")
11240          (name "User Name")
11241          ("X-Home-Page" (getenv "WWW_HOME"))
11242          (organization "People's Front Against MWM"))
11243         ("Emacs"
11244          (import "Default")
11245          (organization "The Church of Emacs"))))
11246 @end lisp
11247
11248 The posting-style named "Emacs" will inherit all the attributes from
11249 "Default" except @code{organization}.
11250
11251
11252 @node Drafts
11253 @section Drafts
11254 @cindex drafts
11255
11256 If you are writing a message (mail or news) and suddenly remember that
11257 you have a steak in the oven (or some pesto in the food processor, you
11258 craaazy vegetarians), you'll probably wish there was a method to save
11259 the message you are writing so that you can continue editing it some
11260 other day, and send it when you feel its finished.
11261
11262 Well, don't worry about it.  Whenever you start composing a message of
11263 some sort using the gnus mail and post commands, the buffer you get will
11264 automatically associate to an article in a special @dfn{draft} group.
11265 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11266 article will be saved there.  (Auto-save files also go to the draft
11267 group.)
11268
11269 @cindex nndraft
11270 @vindex nndraft-directory
11271 The draft group is a special group (which is implemented as an
11272 @code{nndraft} group, if you absolutely have to know) called
11273 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11274 @code{nndraft} is to store its files.  What makes this group special is
11275 that you can't tick any articles in it or mark any articles as
11276 read---all articles in the group are permanently unread.
11277
11278 If the group doesn't exist, it will be created and you'll be subscribed
11279 to it.  The only way to make it disappear from the Group buffer is to
11280 unsubscribe it.
11281
11282 @c @findex gnus-dissociate-buffer-from-draft
11283 @c @kindex C-c M-d (Mail)
11284 @c @kindex C-c M-d (Post)
11285 @c @findex gnus-associate-buffer-with-draft
11286 @c @kindex C-c C-d (Mail)
11287 @c @kindex C-c C-d (Post)
11288 @c If you're writing some super-secret message that you later want to
11289 @c encode with PGP before sending, you may wish to turn the auto-saving
11290 @c (and association with the draft group) off.  You never know who might be
11291 @c interested in reading all your extremely valuable and terribly horrible
11292 @c and interesting secrets.  The @kbd{C-c M-d}
11293 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11294 @c If you change your mind and want to turn the auto-saving back on again,
11295 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11296 @c
11297 @c @vindex gnus-use-draft
11298 @c To leave association with the draft group off by default, set
11299 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11300
11301 @findex gnus-draft-edit-message
11302 @kindex D e (Draft)
11303 When you want to continue editing the article, you simply enter the
11304 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11305 that.  You will be placed in a buffer where you left off.
11306
11307 Rejected articles will also be put in this draft group (@pxref{Rejected
11308 Articles}).
11309
11310 @findex gnus-draft-send-all-messages
11311 @findex gnus-draft-send-message
11312 If you have lots of rejected messages you want to post (or mail) without
11313 doing further editing, you can use the @kbd{D s} command
11314 (@code{gnus-draft-send-message}).  This command understands the
11315 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11316 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11317 in the buffer.
11318
11319 If you have some messages that you wish not to send, you can use the
11320 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11321 as unsendable.  This is a toggling command.
11322
11323
11324 @node Rejected Articles
11325 @section Rejected Articles
11326 @cindex rejected articles
11327
11328 Sometimes a news server will reject an article.  Perhaps the server
11329 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11330 @emph{there be demons}.  Perhaps you have included too much cited text.
11331 Perhaps the disk is full.  Perhaps the server is down.
11332
11333 These situations are, of course, totally beyond the control of gnus.
11334 (Gnus, of course, loves the way you look, always feels great, has angels
11335 fluttering around inside of it, doesn't care about how much cited text
11336 you include, never runs full and never goes down.)  So gnus saves these
11337 articles until some later time when the server feels better.
11338
11339 The rejected articles will automatically be put in a special draft group
11340 (@pxref{Drafts}).  When the server comes back up again, you'd then
11341 typically enter that group and send all the articles off.
11342
11343 @node Signing and encrypting
11344 @section Signing and encrypting
11345 @cindex using gpg
11346 @cindex using s/mime
11347 @cindex using smime
11348
11349 Gnus can digitally sign and encrypt your messages, using vanilla PGP
11350 format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
11351 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
11352 (@pxref{Security}).
11353
11354 For PGP, Gnus supports two external libraries, @sc{gpg.el} and
11355 @sc{Mailcrypt}, you need to install at least one of them.  The
11356 @sc{s/mime} support in Gnus requires the external program OpenSSL.
11357
11358 Often, you would like to sign replies to people who send you signed
11359 messages.  Even more often, you might want to encrypt messages which
11360 are in reply to encrypted messages.  Gnus offers
11361 @code{gnus-message-replysign} to enable the former, and
11362 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11363 @code{gnus-message-replysignencrypted} (on by default) will sign
11364 automatically encrypted messages.
11365
11366 Instructing MML to perform security operations on a @sc{mime} part is
11367 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11368 C-m c} key map for encryption, as follows.
11369
11370 @table @kbd
11371
11372 @item C-c C-m s s
11373 @kindex C-c C-m s s
11374 @findex mml-secure-message-sign-smime
11375
11376 Digitally sign current message using @sc{s/mime}.
11377
11378 @item C-c C-m s o
11379 @kindex C-c C-m s o
11380 @findex mml-secure-message-sign-pgp
11381
11382 Digitally sign current message using PGP.
11383
11384 @item C-c C-m s p
11385 @kindex C-c C-m s p
11386 @findex mml-secure-message-sign-pgp
11387
11388 Digitally sign current message using @sc{pgp/mime}.
11389
11390 @item C-c C-m c s
11391 @kindex C-c C-m c s
11392 @findex mml-secure-message-encrypt-smime
11393
11394 Digitally encrypt current message using @sc{s/mime}.
11395
11396 @item C-c C-m c o
11397 @kindex C-c C-m c o
11398 @findex mml-secure-message-encrypt-pgp
11399
11400 Digitally encrypt current message using PGP.
11401
11402 @item C-c C-m c p
11403 @kindex C-c C-m c p
11404 @findex mml-secure-message-encrypt-pgpmime
11405
11406 Digitally encrypt current message using @sc{pgp/mime}.
11407
11408 @item C-c C-m C-n
11409 @kindex C-c C-m C-n
11410 @findex mml-unsecure-message
11411 Remove security related MML tags from message.
11412
11413 @end table
11414
11415 Also @xref{Security, ,Security, message, Message Manual}.
11416
11417 @node Select Methods
11418 @chapter Select Methods
11419 @cindex foreign groups
11420 @cindex select methods
11421
11422 A @dfn{foreign group} is a group not read by the usual (or
11423 default) means.  It could be, for instance, a group from a different
11424 @sc{nntp} server, it could be a virtual group, or it could be your own
11425 personal mail group.
11426
11427 A foreign group (or any group, really) is specified by a @dfn{name} and
11428 a @dfn{select method}.  To take the latter first, a select method is a
11429 list where the first element says what back end to use (e.g. @code{nntp},
11430 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11431 name}.  There may be additional elements in the select method, where the
11432 value may have special meaning for the back end in question.
11433
11434 One could say that a select method defines a @dfn{virtual server}---so
11435 we do just that (@pxref{Server Buffer}).
11436
11437 The @dfn{name} of the group is the name the back end will recognize the
11438 group as.
11439
11440 For instance, the group @samp{soc.motss} on the @sc{nntp} server
11441 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11442 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11443 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11444 back end just knows this group as @samp{soc.motss}.
11445
11446 The different methods all have their peculiarities, of course.
11447
11448 @menu
11449 * Server Buffer::               Making and editing virtual servers.
11450 * Getting News::                Reading USENET news with Gnus.
11451 * Getting Mail::                Reading your personal mail with Gnus.
11452 * Browsing the Web::            Getting messages from a plethora of Web sources.
11453 * IMAP::                        Using Gnus as a @sc{imap} client.
11454 * Other Sources::               Reading directories, files, SOUP packets.
11455 * Combined Groups::             Combining groups into one group.
11456 * Gnus Unplugged::              Reading news and mail offline.
11457 @end menu
11458
11459
11460 @node Server Buffer
11461 @section Server Buffer
11462
11463 Traditionally, a @dfn{server} is a machine or a piece of software that
11464 one connects to, and then requests information from.  Gnus does not
11465 connect directly to any real servers, but does all transactions through
11466 one back end or other.  But that's just putting one layer more between
11467 the actual media and Gnus, so we might just as well say that each
11468 back end represents a virtual server.
11469
11470 For instance, the @code{nntp} back end may be used to connect to several
11471 different actual @sc{nntp} servers, or, perhaps, to many different ports
11472 on the same actual @sc{nntp} server.  You tell Gnus which back end to
11473 use, and what parameters to set by specifying a @dfn{select method}.
11474
11475 These select method specifications can sometimes become quite
11476 complicated---say, for instance, that you want to read from the
11477 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
11478 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
11479 Anyway, if you had to specify that for each group that used this
11480 server, that would be too much work, so Gnus offers a way of naming
11481 select methods, which is what you do in the server buffer.
11482
11483 To enter the server buffer, use the @kbd{^}
11484 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11485
11486 @menu
11487 * Server Buffer Format::        You can customize the look of this buffer.
11488 * Server Commands::             Commands to manipulate servers.
11489 * Example Methods::             Examples server specifications.
11490 * Creating a Virtual Server::   An example session.
11491 * Server Variables::            Which variables to set.
11492 * Servers and Methods::         You can use server names as select methods.
11493 * Unavailable Servers::         Some servers you try to contact may be down.
11494 @end menu
11495
11496 @vindex gnus-server-mode-hook
11497 @code{gnus-server-mode-hook} is run when creating the server buffer.
11498
11499
11500 @node Server Buffer Format
11501 @subsection Server Buffer Format
11502 @cindex server buffer format
11503
11504 @vindex gnus-server-line-format
11505 You can change the look of the server buffer lines by changing the
11506 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11507 variable, with some simple extensions:
11508
11509 @table @samp
11510
11511 @item h
11512 How the news is fetched---the back end name.
11513
11514 @item n
11515 The name of this server.
11516
11517 @item w
11518 Where the news is to be fetched from---the address.
11519
11520 @item s
11521 The opened/closed/denied status of the server.
11522 @end table
11523
11524 @vindex gnus-server-mode-line-format
11525 The mode line can also be customized by using the
11526 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11527 Formatting}).  The following specs are understood:
11528
11529 @table @samp
11530 @item S
11531 Server name.
11532
11533 @item M
11534 Server method.
11535 @end table
11536
11537 Also @pxref{Formatting Variables}.
11538
11539
11540 @node Server Commands
11541 @subsection Server Commands
11542 @cindex server commands
11543
11544 @table @kbd
11545
11546 @item a
11547 @kindex a (Server)
11548 @findex gnus-server-add-server
11549 Add a new server (@code{gnus-server-add-server}).
11550
11551 @item e
11552 @kindex e (Server)
11553 @findex gnus-server-edit-server
11554 Edit a server (@code{gnus-server-edit-server}).
11555
11556 @item SPACE
11557 @kindex SPACE (Server)
11558 @findex gnus-server-read-server
11559 Browse the current server (@code{gnus-server-read-server}).
11560
11561 @item q
11562 @kindex q (Server)
11563 @findex gnus-server-exit
11564 Return to the group buffer (@code{gnus-server-exit}).
11565
11566 @item k
11567 @kindex k (Server)
11568 @findex gnus-server-kill-server
11569 Kill the current server (@code{gnus-server-kill-server}).
11570
11571 @item y
11572 @kindex y (Server)
11573 @findex gnus-server-yank-server
11574 Yank the previously killed server (@code{gnus-server-yank-server}).
11575
11576 @item c
11577 @kindex c (Server)
11578 @findex gnus-server-copy-server
11579 Copy the current server (@code{gnus-server-copy-server}).
11580
11581 @item l
11582 @kindex l (Server)
11583 @findex gnus-server-list-servers
11584 List all servers (@code{gnus-server-list-servers}).
11585
11586 @item s
11587 @kindex s (Server)
11588 @findex gnus-server-scan-server
11589 Request that the server scan its sources for new articles
11590 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
11591 servers.
11592
11593 @item g
11594 @kindex g (Server)
11595 @findex gnus-server-regenerate-server
11596 Request that the server regenerate all its data structures
11597 (@code{gnus-server-regenerate-server}).  This can be useful if you have
11598 a mail back end that has gotten out of sync.
11599
11600 @end table
11601
11602
11603 @node Example Methods
11604 @subsection Example Methods
11605
11606 Most select methods are pretty simple and self-explanatory:
11607
11608 @lisp
11609 (nntp "news.funet.fi")
11610 @end lisp
11611
11612 Reading directly from the spool is even simpler:
11613
11614 @lisp
11615 (nnspool "")
11616 @end lisp
11617
11618 As you can see, the first element in a select method is the name of the
11619 back end, and the second is the @dfn{address}, or @dfn{name}, if you
11620 will.
11621
11622 After these two elements, there may be an arbitrary number of
11623 @code{(@var{variable} @var{form})} pairs.
11624
11625 To go back to the first example---imagine that you want to read from
11626 port 15 on that machine.  This is what the select method should
11627 look like then:
11628
11629 @lisp
11630 (nntp "news.funet.fi" (nntp-port-number 15))
11631 @end lisp
11632
11633 You should read the documentation to each back end to find out what
11634 variables are relevant, but here's an @code{nnmh} example:
11635
11636 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
11637 you have two structures that you wish to access: One is your private
11638 mail spool, and the other is a public one.  Here's the possible spec for
11639 your private mail:
11640
11641 @lisp
11642 (nnmh "private" (nnmh-directory "~/private/mail/"))
11643 @end lisp
11644
11645 (This server is then called @samp{private}, but you may have guessed
11646 that.)
11647
11648 Here's the method for a public spool:
11649
11650 @lisp
11651 (nnmh "public"
11652       (nnmh-directory "/usr/information/spool/")
11653       (nnmh-get-new-mail nil))
11654 @end lisp
11655
11656 @cindex proxy
11657 @cindex firewall
11658
11659 If you are behind a firewall and only have access to the @sc{nntp}
11660 server from the firewall machine, you can instruct Gnus to @code{rlogin}
11661 on the firewall machine and telnet from there to the @sc{nntp} server.
11662 Doing this can be rather fiddly, but your virtual server definition
11663 should probably look something like this:
11664
11665 @lisp
11666 (nntp "firewall"
11667       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
11668       (nntp-via-address "the.firewall.machine")
11669       (nntp-address "the.real.nntp.host")
11670       (nntp-end-of-line "\n"))
11671 @end lisp
11672
11673 If you want to use the wonderful @code{ssh} program to provide a
11674 compressed connection over the modem line, you could add the following
11675 configuration to the example above:
11676
11677 @lisp
11678       (nntp-via-rlogin-command "ssh")
11679 @end lisp
11680
11681 See also @code{nntp-via-rlogin-command-switches}.
11682
11683 If you're behind a firewall, but have direct access to the outside world
11684 through a wrapper command like "runsocks", you could open a socksified
11685 telnet connection to the news server as follows:
11686
11687 @lisp
11688 (nntp "outside"
11689       (nntp-pre-command "runsocks")
11690       (nntp-open-connection-function nntp-open-via-telnet)
11691       (nntp-address "the.news.server")
11692       (nntp-end-of-line "\n"))
11693 @end lisp
11694
11695 This means that you have to have set up @code{ssh-agent} correctly to
11696 provide automatic authorization, of course.  And to get a compressed
11697 connection, you have to have the @samp{Compression} option in the
11698 @code{ssh} @file{config} file.
11699
11700
11701 @node Creating a Virtual Server
11702 @subsection Creating a Virtual Server
11703
11704 If you're saving lots of articles in the cache by using persistent
11705 articles, you may want to create a virtual server to read the cache.
11706
11707 First you need to add a new server.  The @kbd{a} command does that.  It
11708 would probably be best to use @code{nnspool} to read the cache.  You
11709 could also use @code{nnml} or @code{nnmh}, though.
11710
11711 Type @kbd{a nnspool RET cache RET}.
11712
11713 You should now have a brand new @code{nnspool} virtual server called
11714 @samp{cache}.  You now need to edit it to have the right definitions.
11715 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
11716 will contain the following:
11717
11718 @lisp
11719 (nnspool "cache")
11720 @end lisp
11721
11722 Change that to:
11723
11724 @lisp
11725 (nnspool "cache"
11726          (nnspool-spool-directory "~/News/cache/")
11727          (nnspool-nov-directory "~/News/cache/")
11728          (nnspool-active-file "~/News/cache/active"))
11729 @end lisp
11730
11731 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
11732 @kbd{RET} over this virtual server, you should be entered into a browse
11733 buffer, and you should be able to enter any of the groups displayed.
11734
11735
11736 @node Server Variables
11737 @subsection Server Variables
11738
11739 One sticky point when defining variables (both on back ends and in Emacs
11740 in general) is that some variables are typically initialized from other
11741 variables when the definition of the variables is being loaded.  If you
11742 change the "base" variable after the variables have been loaded, you
11743 won't change the "derived" variables.
11744
11745 This typically affects directory and file variables.  For instance,
11746 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
11747 directory variables are initialized from that variable, so
11748 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
11749 new virtual @code{nnml} server, it will @emph{not} suffice to set just
11750 @code{nnml-directory}---you have to explicitly set all the file
11751 variables to be what you want them to be.  For a complete list of
11752 variables for each back end, see each back end's section later in this
11753 manual, but here's an example @code{nnml} definition:
11754
11755 @lisp
11756 (nnml "public"
11757       (nnml-directory "~/my-mail/")
11758       (nnml-active-file "~/my-mail/active")
11759       (nnml-newsgroups-file "~/my-mail/newsgroups"))
11760 @end lisp
11761
11762
11763 @node Servers and Methods
11764 @subsection Servers and Methods
11765
11766 Wherever you would normally use a select method
11767 (e.g. @code{gnus-secondary-select-method}, in the group select method,
11768 when browsing a foreign server) you can use a virtual server name
11769 instead.  This could potentially save lots of typing.  And it's nice all
11770 over.
11771
11772
11773 @node Unavailable Servers
11774 @subsection Unavailable Servers
11775
11776 If a server seems to be unreachable, Gnus will mark that server as
11777 @code{denied}.  That means that any subsequent attempt to make contact
11778 with that server will just be ignored.  ``It can't be opened,'' Gnus
11779 will tell you, without making the least effort to see whether that is
11780 actually the case or not.
11781
11782 That might seem quite naughty, but it does make sense most of the time.
11783 Let's say you have 10 groups subscribed to on server
11784 @samp{nephelococcygia.com}.  This server is located somewhere quite far
11785 away from you and the machine is quite slow, so it takes 1 minute just
11786 to find out that it refuses connection to you today.  If Gnus were to
11787 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
11788 attempt to do that.  Once it has gotten a single ``connection refused'',
11789 it will regard that server as ``down''.
11790
11791 So, what happens if the machine was only feeling unwell temporarily?
11792 How do you test to see whether the machine has come up again?
11793
11794 You jump to the server buffer (@pxref{Server Buffer}) and poke it
11795 with the following commands:
11796
11797 @table @kbd
11798
11799 @item O
11800 @kindex O (Server)
11801 @findex gnus-server-open-server
11802 Try to establish connection to the server on the current line
11803 (@code{gnus-server-open-server}).
11804
11805 @item C
11806 @kindex C (Server)
11807 @findex gnus-server-close-server
11808 Close the connection (if any) to the server
11809 (@code{gnus-server-close-server}).
11810
11811 @item D
11812 @kindex D (Server)
11813 @findex gnus-server-deny-server
11814 Mark the current server as unreachable
11815 (@code{gnus-server-deny-server}).
11816
11817 @item M-o
11818 @kindex M-o (Server)
11819 @findex gnus-server-open-all-servers
11820 Open the connections to all servers in the buffer
11821 (@code{gnus-server-open-all-servers}).
11822
11823 @item M-c
11824 @kindex M-c (Server)
11825 @findex gnus-server-close-all-servers
11826 Close the connections to all servers in the buffer
11827 (@code{gnus-server-close-all-servers}).
11828
11829 @item R
11830 @kindex R (Server)
11831 @findex gnus-server-remove-denials
11832 Remove all marks to whether Gnus was denied connection from any servers
11833 (@code{gnus-server-remove-denials}).
11834
11835 @item L
11836 @kindex L (Server)
11837 @findex gnus-server-offline-server
11838 Set server status to offline (@code{gnus-server-offline-server}).
11839
11840 @end table
11841
11842
11843 @node Getting News
11844 @section Getting News
11845 @cindex reading news
11846 @cindex news back ends
11847
11848 A newsreader is normally used for reading news.  Gnus currently provides
11849 only two methods of getting news---it can read from an @sc{nntp} server,
11850 or it can read from a local spool.
11851
11852 @menu
11853 * NNTP::                        Reading news from an @sc{nntp} server.
11854 * News Spool::                  Reading news from the local spool.
11855 @end menu
11856
11857
11858 @node NNTP
11859 @subsection NNTP
11860 @cindex nntp
11861
11862 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
11863 You just specify @code{nntp} as method and the address of the @sc{nntp}
11864 server as the, uhm, address.
11865
11866 If the @sc{nntp} server is located at a non-standard port, setting the
11867 third element of the select method to this port number should allow you
11868 to connect to the right port.  You'll have to edit the group info for
11869 that (@pxref{Foreign Groups}).
11870
11871 The name of the foreign group can be the same as a native group.  In
11872 fact, you can subscribe to the same group from as many different servers
11873 you feel like.  There will be no name collisions.
11874
11875 The following variables can be used to create a virtual @code{nntp}
11876 server:
11877
11878 @table @code
11879
11880 @item nntp-server-opened-hook
11881 @vindex nntp-server-opened-hook
11882 @cindex @sc{mode reader}
11883 @cindex authinfo
11884 @cindex authentification
11885 @cindex nntp authentification
11886 @findex nntp-send-authinfo
11887 @findex nntp-send-mode-reader
11888 is run after a connection has been made.  It can be used to send
11889 commands to the @sc{nntp} server after it has been contacted.  By
11890 default it sends the command @code{MODE READER} to the server with the
11891 @code{nntp-send-mode-reader} function.  This function should always be
11892 present in this hook.
11893
11894 @item nntp-authinfo-function
11895 @vindex nntp-authinfo-function
11896 @findex nntp-send-authinfo
11897 @vindex nntp-authinfo-file
11898 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
11899 server.  The default function is @code{nntp-send-authinfo}, which looks
11900 through your @file{~/.authinfo} (or whatever you've set the
11901 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
11902 are found, it will prompt you for a login name and a password.  The
11903 format of the @file{~/.authinfo} file is (almost) the same as the
11904 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
11905 manual page, but here are the salient facts:
11906
11907 @enumerate
11908 @item
11909 The file contains one or more line, each of which define one server.
11910
11911 @item
11912 Each line may contain an arbitrary number of token/value pairs.
11913
11914 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
11915 @samp{default}.  In addition Gnus introduces two new tokens, not present
11916 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
11917 @samp{force}.  (This is the only way the @file{.authinfo} file format
11918 deviates from the @file{.netrc} file format.)  @samp{port} is used to
11919 indicate what port on the server the credentials apply to and
11920 @samp{force} is explained below.
11921
11922 @end enumerate
11923
11924 Here's an example file:
11925
11926 @example
11927 machine news.uio.no login larsi password geheimnis
11928 machine nntp.ifi.uio.no login larsi force yes
11929 @end example
11930
11931 The token/value pairs may appear in any order; @samp{machine} doesn't
11932 have to be first, for instance.
11933
11934 In this example, both login name and password have been supplied for the
11935 former server, while the latter has only the login name listed, and the
11936 user will be prompted for the password.  The latter also has the
11937 @samp{force} tag, which means that the authinfo will be sent to the
11938 @var{nntp} server upon connection; the default (i.e., when there is not
11939 @samp{force} tag) is to not send authinfo to the @var{nntp} server
11940 until the @var{nntp} server asks for it.
11941
11942 You can also add @samp{default} lines that will apply to all servers
11943 that don't have matching @samp{machine} lines.
11944
11945 @example
11946 default force yes
11947 @end example
11948
11949 This will force sending @samp{AUTHINFO} commands to all servers not
11950 previously mentioned.
11951
11952 Remember to not leave the @file{~/.authinfo} file world-readable.
11953
11954 @item nntp-server-action-alist
11955 @vindex nntp-server-action-alist
11956 This is a list of regexps to match on server types and actions to be
11957 taken when matches are made.  For instance, if you want Gnus to beep
11958 every time you connect to innd, you could say something like:
11959
11960 @lisp
11961 (setq nntp-server-action-alist
11962       '(("innd" (ding))))
11963 @end lisp
11964
11965 You probably don't want to do that, though.
11966
11967 The default value is
11968
11969 @lisp
11970 '(("nntpd 1\\.5\\.11t"
11971    (remove-hook 'nntp-server-opened-hook
11972                 'nntp-send-mode-reader)))
11973 @end lisp
11974
11975 This ensures that Gnus doesn't send the @code{MODE READER} command to
11976 nntpd 1.5.11t, since that command chokes that server, I've been told.
11977
11978 @item nntp-maximum-request
11979 @vindex nntp-maximum-request
11980 If the @sc{nntp} server doesn't support @sc{nov} headers, this back end
11981 will collect headers by sending a series of @code{head} commands.  To
11982 speed things up, the back end sends lots of these commands without
11983 waiting for reply, and then reads all the replies.  This is controlled
11984 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
11985 your network is buggy, you should set this to 1.
11986
11987 @item nntp-connection-timeout
11988 @vindex nntp-connection-timeout
11989 If you have lots of foreign @code{nntp} groups that you connect to
11990 regularly, you're sure to have problems with @sc{nntp} servers not
11991 responding properly, or being too loaded to reply within reasonable
11992 time.  This is can lead to awkward problems, which can be helped
11993 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
11994 that says how many seconds the @code{nntp} back end should wait for a
11995 connection before giving up.  If it is @code{nil}, which is the default,
11996 no timeouts are done.
11997
11998 @c @item nntp-command-timeout
11999 @c @vindex nntp-command-timeout
12000 @c @cindex PPP connections
12001 @c @cindex dynamic IP addresses
12002 @c If you're running Gnus on a machine that has a dynamically assigned
12003 @c address, Gnus may become confused.  If the address of your machine
12004 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
12005 @c waiting forever for replies from the server.  To help with this
12006 @c unfortunate problem, you can set this command to a number.  Gnus will
12007 @c then, if it sits waiting for a reply from the server longer than that
12008 @c number of seconds, shut down the connection, start a new one, and resend
12009 @c the command.  This should hopefully be transparent to the user.  A
12010 @c likely number is 30 seconds.
12011 @c
12012 @c @item nntp-retry-on-break
12013 @c @vindex nntp-retry-on-break
12014 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12015 @c hangs.  This will have much the same effect as the command timeout
12016 @c described above.
12017
12018 @item nntp-server-hook
12019 @vindex nntp-server-hook
12020 This hook is run as the last step when connecting to an @sc{nntp}
12021 server.
12022
12023 @item nntp-buggy-select
12024 @vindex nntp-buggy-select
12025 Set this to non-@code{nil} if your select routine is buggy.
12026
12027 @item nntp-nov-is-evil
12028 @vindex nntp-nov-is-evil
12029 If the @sc{nntp} server does not support @sc{nov}, you could set this
12030 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
12031 can be used.
12032
12033 @item nntp-xover-commands
12034 @vindex nntp-xover-commands
12035 @cindex nov
12036 @cindex XOVER
12037 List of strings used as commands to fetch @sc{nov} lines from a
12038 server.  The default value of this variable is @code{("XOVER"
12039 "XOVERVIEW")}.
12040
12041 @item nntp-nov-gap
12042 @vindex nntp-nov-gap
12043 @code{nntp} normally sends just one big request for @sc{nov} lines to
12044 the server.  The server responds with one huge list of lines.  However,
12045 if you have read articles 2-5000 in the group, and only want to read
12046 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
12047 lines that you will not need.  This variable says how
12048 big a gap between two consecutive articles is allowed to be before the
12049 @code{XOVER} request is split into several request.  Note that if your
12050 network is fast, setting this variable to a really small number means
12051 that fetching will probably be slower.  If this variable is @code{nil},
12052 @code{nntp} will never split requests.  The default is 5.
12053
12054 @item nntp-prepare-server-hook
12055 @vindex nntp-prepare-server-hook
12056 A hook run before attempting to connect to an @sc{nntp} server.
12057
12058 @item nntp-warn-about-losing-connection
12059 @vindex nntp-warn-about-losing-connection
12060 If this variable is non-@code{nil}, some noise will be made when a
12061 server closes connection.
12062
12063 @item nntp-record-commands
12064 @vindex nntp-record-commands
12065 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12066 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
12067 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
12068 that doesn't seem to work.
12069
12070 @item nntp-open-connection-function
12071 @vindex nntp-open-connection-function
12072 It is possible to customize how the connection to the nntp server will
12073 be opened.  If you specify an @code{nntp-open-connection-function}
12074 parameter, Gnus will use that function to establish the connection.
12075 Five pre-made functions are supplied.  These functions can be grouped in
12076 two categories: direct connection functions (three pre-made), and
12077 indirect ones (two pre-made).
12078
12079 @item nntp-prepare-post-hook
12080 @vindex nntp-prepare-post-hook
12081 A hook run just before posting an article.  If there is no
12082 @code{Message-ID} header in the article and the news server provides the
12083 recommended ID, it will be added to the article before running this
12084 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12085 inhibit Gnus to add a @code{Message-ID} header, you could say:
12086
12087 @lisp
12088 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12089 @end lisp
12090
12091 Note that not all servers support the recommended ID.  This works for
12092 INN versions 2.3.0 and later, for instance.
12093
12094 @item nntp-list-options
12095 @vindex nntp-list-options
12096 List of newsgroup name used for a option of the LIST command to restrict
12097 the listing output to only the specified newsgroups.  Each newsgroup name
12098 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12099 etc.  Fortunately, if the server can accept such a option, it will
12100 probably make gnus run faster.  You may use it as a server variable as
12101 follows:
12102
12103 @lisp
12104 (setq gnus-select-method
12105       '(nntp "news.somewhere.edu"
12106              (nntp-list-options ("fj.*" "japan.*"))))
12107 @end lisp
12108
12109 @item nntp-options-subscribe
12110 @vindex nntp-options-subscribe
12111 Regexp matching the newsgroup names which will be subscribed
12112 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12113 It may be effective as well as @code{nntp-list-options} even though the
12114 server could not accept a shell-style wildcard as a option of the LIST
12115 command.  You may use it as a server variable as follows:
12116
12117 @lisp
12118 (setq gnus-select-method
12119       '(nntp "news.somewhere.edu"
12120              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12121 @end lisp
12122
12123 @item nntp-options-not-subscribe
12124 @vindex nntp-options-not-subscribe
12125 Regexp matching the newsgroup names which will not be subscribed
12126 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12127 It may be effective as well as @code{nntp-list-options} even though the
12128 server could not accept a shell-style wildcard as a option of the LIST
12129 command.  You may use it as a server variable as follows:
12130
12131 @lisp
12132 (setq gnus-select-method
12133       '(nntp "news.somewhere.edu"
12134              (nntp-options-not-subscribe "\\.binaries\\.")))
12135 @end lisp
12136 @end table
12137
12138 @menu
12139 * Direct Functions::            Connecting directly to the server.
12140 * Indirect Functions::          Connecting indirectly to the server.
12141 * Common Variables::            Understood by several connection functions.
12142 @end menu
12143
12144
12145 @node Direct Functions
12146 @subsubsection Direct Functions
12147 @cindex direct connection functions
12148
12149 These functions are called direct because they open a direct connection
12150 between your machine and the @sc{nntp} server.  The behavior of these
12151 functions is also affected by commonly understood variables
12152 (@pxref{Common Variables}).
12153
12154 @table @code
12155 @findex nntp-open-network-stream
12156 @item nntp-open-network-stream
12157 This is the default, and simply connects to some port or other on the
12158 remote system.
12159
12160 @findex nntp-open-ssl-stream
12161 @item nntp-open-ssl-stream
12162 Opens a connection to a server over a @dfn{secure} channel.  To use
12163 this you must have OpenSSL (@uref{http://www.openssl.org}) or SSLeay
12164 installed (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also
12165 need @file{ssl.el} (from the W3 distribution, for instance).  You then
12166 define a server as follows:
12167
12168 @lisp
12169 ;; Type `C-c C-c' after you've finished editing.
12170 ;;
12171 ;; "snews" is port 563 and is predefined in our /etc/services
12172 ;; however, openssl s_client -port doesn't like named ports
12173 ;;
12174 (nntp "snews.bar.com"
12175       (nntp-open-connection-function nntp-open-ssl-stream)
12176       (nntp-port-number 563)
12177       (nntp-address "snews.bar.com"))
12178 @end lisp
12179
12180 @findex nntp-open-telnet-stream
12181 @item nntp-open-telnet-stream
12182 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
12183 it.  You might wonder why this function exists, since we have the
12184 default @code{nntp-open-network-stream} which would do the job.  (One
12185 of) the reason(s) is that if you are behind a firewall but have direct
12186 connections to the outside world thanks to a command wrapper like
12187 @code{runsocks}, you can use it like this:
12188
12189 @lisp
12190 (nntp "socksified"
12191       (nntp-pre-command "runsocks")
12192       (nntp-open-connection-function nntp-open-telnet-stream)
12193       (nntp-address "the.news.server"))
12194 @end lisp
12195
12196 With the default method, you would need to wrap your whole Emacs
12197 session, which is not a good idea.
12198 @end table
12199
12200
12201 @node Indirect Functions
12202 @subsubsection Indirect Functions
12203 @cindex indirect connection functions
12204
12205 These functions are called indirect because they connect to an
12206 intermediate host before actually connecting to the @sc{nntp} server.
12207 All of these functions and related variables are also said to belong to
12208 the "via" family of connection: they're all prefixed with "via" to make
12209 things cleaner.  The behavior of these functions is also affected by
12210 commonly understood variables (@pxref{Common Variables}).
12211
12212 @table @code
12213 @item nntp-open-via-rlogin-and-telnet
12214 @findex nntp-open-via-rlogin-and-telnet
12215 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12216 to the real @sc{nntp} server from there.  This is useful for instance if
12217 you need to connect to a firewall machine first.
12218
12219 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12220
12221 @table @code
12222 @item nntp-via-rlogin-command
12223 @vindex nntp-via-rlogin-command
12224 Command used to log in on the intermediate host.  The default is
12225 @samp{rsh}, but @samp{ssh} is a popular alternative.
12226
12227 @item nntp-via-rlogin-command-switches
12228 @vindex nntp-via-rlogin-command-switches
12229 List of strings to be used as the switches to
12230 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12231 @samp{ssh} for `nntp-via-rlogin-command', you may set this to
12232 @samp{("-C")} in order to compress all data connections, otherwise set
12233 this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command
12234 requires a pseudo-tty allocation on an intermediate host.
12235 @end table
12236
12237 @item nntp-open-via-telnet-and-telnet
12238 @findex nntp-open-via-telnet-and-telnet
12239 Does essentially the same, but uses @samp{telnet} instead of
12240 @samp{rlogin} to connect to the intermediate host.
12241
12242 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12243
12244 @table @code
12245 @item nntp-via-telnet-command
12246 @vindex nntp-via-telnet-command
12247 Command used to @code{telnet} the intermediate host.  The default is
12248 @samp{telnet}.
12249
12250 @item nntp-via-telnet-switches
12251 @vindex nntp-via-telnet-switches
12252 List of strings to be used as the switches to the
12253 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12254
12255 @item nntp-via-user-password
12256 @vindex nntp-via-user-password
12257 Password to use when logging in on the intermediate host.
12258
12259 @item nntp-via-envuser
12260 @vindex nntp-via-envuser
12261 If non-@code{nil}, the intermediate @code{telnet} session (client and
12262 server both) will support the @code{ENVIRON} option and not prompt for
12263 login name. This works for Solaris @code{telnet}, for instance.
12264
12265 @item nntp-via-shell-prompt
12266 @vindex nntp-via-shell-prompt
12267 Regexp matching the shell prompt on the intermediate host.  The default
12268 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12269
12270 @end table
12271
12272 @end table
12273
12274
12275 Here are some additional variables that are understood by all the above
12276 functions:
12277
12278 @table @code
12279
12280 @item nntp-via-user-name
12281 @vindex nntp-via-user-name
12282 User name to use when connecting to the intermediate host.
12283
12284 @item nntp-via-address
12285 @vindex nntp-via-address
12286 Address of the intermediate host to connect to.
12287
12288 @end table
12289
12290
12291 @node Common Variables
12292 @subsubsection Common Variables
12293
12294 The following variables affect the behavior of all, or several of the
12295 pre-made connection functions. When not specified, all functions are
12296 affected.
12297
12298 @table @code
12299
12300 @item nntp-pre-command
12301 @vindex nntp-pre-command
12302 A command wrapper to use when connecting through a non native connection
12303 function (all except @code{nntp-open-network-stream} and
12304 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
12305 wrapper for instance.
12306
12307 @item nntp-address
12308 @vindex nntp-address
12309 The address of the @sc{nntp} server.
12310
12311 @item nntp-port-number
12312 @vindex nntp-port-number
12313 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
12314 If you use @sc{nntp} over @sc{ssl}, you may want to use integer ports rather
12315 than named ports (i.e, use @samp{563} instead of @samp{snews}), because
12316 external SSL tools may not work with named ports.
12317
12318 @item nntp-end-of-line
12319 @vindex nntp-end-of-line
12320 String to use as end-of-line marker when talking to the @sc{nntp}
12321 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12322 using a non native connection function.
12323
12324 @item nntp-telnet-command
12325 @vindex nntp-telnet-command
12326 Command to use when connecting to the @sc{nntp} server through
12327 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
12328 the real @sc{nntp} server.  The default is @samp{telnet}.
12329
12330 @item nntp-telnet-switches
12331 @vindex nntp-telnet-switches
12332 A list of switches to pass to @code{nntp-telnet-command}.  The default
12333 is @samp{("-8")}.
12334
12335 @end table
12336
12337
12338 @node News Spool
12339 @subsection News Spool
12340 @cindex nnspool
12341 @cindex news spool
12342
12343 Subscribing to a foreign group from the local spool is extremely easy,
12344 and might be useful, for instance, to speed up reading groups that
12345 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12346 instance.
12347
12348 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12349 anything else) as the address.
12350
12351 If you have access to a local spool, you should probably use that as the
12352 native select method (@pxref{Finding the News}).  It is normally faster
12353 than using an @code{nntp} select method, but might not be.  It depends.
12354 You just have to try to find out what's best at your site.
12355
12356 @table @code
12357
12358 @item nnspool-inews-program
12359 @vindex nnspool-inews-program
12360 Program used to post an article.
12361
12362 @item nnspool-inews-switches
12363 @vindex nnspool-inews-switches
12364 Parameters given to the inews program when posting an article.
12365
12366 @item nnspool-spool-directory
12367 @vindex nnspool-spool-directory
12368 Where @code{nnspool} looks for the articles.  This is normally
12369 @file{/usr/spool/news/}.
12370
12371 @item nnspool-nov-directory
12372 @vindex nnspool-nov-directory
12373 Where @code{nnspool} will look for @sc{nov} files.  This is normally
12374 @file{/usr/spool/news/over.view/}.
12375
12376 @item nnspool-lib-dir
12377 @vindex nnspool-lib-dir
12378 Where the news lib dir is (@file{/usr/lib/news/} by default).
12379
12380 @item nnspool-active-file
12381 @vindex nnspool-active-file
12382 The path to the active file.
12383
12384 @item nnspool-newsgroups-file
12385 @vindex nnspool-newsgroups-file
12386 The path to the group descriptions file.
12387
12388 @item nnspool-history-file
12389 @vindex nnspool-history-file
12390 The path to the news history file.
12391
12392 @item nnspool-active-times-file
12393 @vindex nnspool-active-times-file
12394 The path to the active date file.
12395
12396 @item nnspool-nov-is-evil
12397 @vindex nnspool-nov-is-evil
12398 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
12399 that it finds.
12400
12401 @item nnspool-sift-nov-with-sed
12402 @vindex nnspool-sift-nov-with-sed
12403 @cindex sed
12404 If non-@code{nil}, which is the default, use @code{sed} to get the
12405 relevant portion from the overview file.  If nil, @code{nnspool} will
12406 load the entire file into a buffer and process it there.
12407
12408 @end table
12409
12410
12411 @node Getting Mail
12412 @section Getting Mail
12413 @cindex reading mail
12414 @cindex mail
12415
12416 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12417 course.
12418
12419 @menu
12420 * Mail in a Newsreader::        Important introductory notes.
12421 * Getting Started Reading Mail::  A simple cookbook example.
12422 * Splitting Mail::              How to create mail groups.
12423 * Mail Sources::                How to tell Gnus where to get mail from.
12424 * Mail Back End Variables::     Variables for customizing mail handling.
12425 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12426 * Group Mail Splitting::        Use group customize to drive mail splitting.
12427 * Incorporating Old Mail::      What about the old mail you have?
12428 * Expiring Mail::               Getting rid of unwanted mail.
12429 * Washing Mail::                Removing gruft from the mail you get.
12430 * Duplicates::                  Dealing with duplicated mail.
12431 * Not Reading Mail::            Using mail back ends for reading other files.
12432 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12433 @end menu
12434
12435
12436 @node Mail in a Newsreader
12437 @subsection Mail in a Newsreader
12438
12439 If you are used to traditional mail readers, but have decided to switch
12440 to reading mail with Gnus, you may find yourself experiencing something
12441 of a culture shock.
12442
12443 Gnus does not behave like traditional mail readers.  If you want to make
12444 it behave that way, you can, but it's an uphill battle.
12445
12446 Gnus, by default, handles all its groups using the same approach.  This
12447 approach is very newsreaderly---you enter a group, see the new/unread
12448 messages, and when you read the messages, they get marked as read, and
12449 you don't see them any more.  (Unless you explicitly ask for them.)
12450
12451 In particular, you do not do anything explicitly to delete messages.
12452
12453 Does this mean that all the messages that have been marked as read are
12454 deleted?  How awful!
12455
12456 But, no, it means that old messages are @dfn{expired} according to some
12457 scheme or other.  For news messages, the expire process is controlled by
12458 the news administrator; for mail, the expire process is controlled by
12459 you.  The expire process for mail is covered in depth in @pxref{Expiring
12460 Mail}.
12461
12462 What many Gnus users find, after using it a while for both news and
12463 mail, is that the transport mechanism has very little to do with how
12464 they want to treat a message.
12465
12466 Many people subscribe to several mailing lists.  These are transported
12467 via @sc{smtp}, and are therefore mail.  But we might go for weeks without
12468 answering, or even reading these messages very carefully.  We may not
12469 need to save them because if we should need to read one again, they are
12470 archived somewhere else.
12471
12472 Some people have local news groups which have only a handful of readers.
12473 These are transported via @sc{nntp}, and are therefore news.  But we may need
12474 to read and answer a large fraction of the messages very carefully in
12475 order to do our work.  And there may not be an archive, so we may need
12476 to save the interesting messages the same way we would personal mail.
12477
12478 The important distinction turns out to be not the transport mechanism,
12479 but other factors such as how interested we are in the subject matter,
12480 or how easy it is to retrieve the message if we need to read it again.
12481
12482 Gnus provides many options for sorting mail into ``groups'' which behave
12483 like newsgroups, and for treating each group (whether mail or news)
12484 differently.
12485
12486 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12487 that Gnus should grow up and be a male, er, mail reader.  It is possible
12488 to whip Gnus into a more mailreaderly being, but, as said before, it's
12489 not easy.  People who prefer proper mail readers should try @sc{vm}
12490 instead, which is an excellent, and proper, mail reader.
12491
12492 I don't mean to scare anybody off, but I want to make it clear that you
12493 may be required to learn a new way of thinking about messages.  After
12494 you've been subjected to The Gnus Way, you will come to love it.  I can
12495 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12496 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12497 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12498 You Do.)
12499
12500
12501 @node Getting Started Reading Mail
12502 @subsection Getting Started Reading Mail
12503
12504 It's quite easy to use Gnus to read your new mail.  You just plonk the
12505 mail back end of your choice into @code{gnus-secondary-select-methods},
12506 and things will happen automatically.
12507
12508 For instance, if you want to use @code{nnml} (which is a "one file per
12509 mail" back end), you could put the following in your @file{.gnus} file:
12510
12511 @lisp
12512 (setq gnus-secondary-select-methods '((nnml "")))
12513 @end lisp
12514
12515 Now, the next time you start Gnus, this back end will be queried for new
12516 articles, and it will move all the messages in your spool file to its
12517 directory, which is @code{~/Mail/} by default.  The new group that will
12518 be created (@samp{mail.misc}) will be subscribed, and you can read it
12519 like any other group.
12520
12521 You will probably want to split the mail into several groups, though:
12522
12523 @lisp
12524 (setq nnmail-split-methods
12525       '(("junk" "^From:.*Lars Ingebrigtsen")
12526         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
12527         ("other" "")))
12528 @end lisp
12529
12530 This will result in three new @code{nnml} mail groups being created:
12531 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
12532 mail that doesn't fit into the first two groups will be placed in the
12533 last group.
12534
12535 This should be sufficient for reading mail with Gnus.  You might want to
12536 give the other sections in this part of the manual a perusal, though.
12537 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
12538
12539
12540 @node Splitting Mail
12541 @subsection Splitting Mail
12542 @cindex splitting mail
12543 @cindex mail splitting
12544
12545 @vindex nnmail-split-methods
12546 The @code{nnmail-split-methods} variable says how the incoming mail is
12547 to be split into groups.
12548
12549 @lisp
12550 (setq nnmail-split-methods
12551   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
12552     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
12553     ("mail.other" "")))
12554 @end lisp
12555
12556 This variable is a list of lists, where the first element of each of
12557 these lists is the name of the mail group (they do not have to be called
12558 something beginning with @samp{mail}, by the way), and the second
12559 element is a regular expression used on the header of each mail to
12560 determine if it belongs in this mail group.  The first string may
12561 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
12562 insert sub-expressions from the matched text.  For instance:
12563
12564 @lisp
12565 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
12566 @end lisp
12567
12568 The second element can also be a function.  In that case, it will be
12569 called narrowed to the headers with the first element of the rule as the
12570 argument.  It should return a non-@code{nil} value if it thinks that the
12571 mail belongs in that group.
12572
12573 The last of these groups should always be a general one, and the regular
12574 expression should @emph{always} be @samp{} so that it matches any mails
12575 that haven't been matched by any of the other regexps.  (These rules are
12576 processed from the beginning of the alist toward the end.  The first
12577 rule to make a match will "win", unless you have crossposting enabled.
12578 In that case, all matching rules will "win".)
12579
12580 If you like to tinker with this yourself, you can set this variable to a
12581 function of your choice.  This function will be called without any
12582 arguments in a buffer narrowed to the headers of an incoming mail
12583 message.  The function should return a list of group names that it
12584 thinks should carry this mail message.
12585
12586 Note that the mail back ends are free to maul the poor, innocent,
12587 incoming headers all they want to.  They all add @code{Lines} headers;
12588 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
12589 @code{From<SPACE>} line to something else.
12590
12591 @vindex nnmail-crosspost
12592 The mail back ends all support cross-posting.  If several regexps match,
12593 the mail will be ``cross-posted'' to all those groups.
12594 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
12595 that no articles are crossposted to the general (@samp{}) group.
12596
12597 @vindex nnmail-crosspost-link-function
12598 @cindex crosspost
12599 @cindex links
12600 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
12601 the crossposted articles.  However, not all file systems support hard
12602 links.  If that's the case for you, set
12603 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
12604 variable is @code{add-name-to-file} by default.)
12605
12606 @kindex M-x nnmail-split-history
12607 @kindex nnmail-split-history
12608 If you wish to see where the previous mail split put the messages, you
12609 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
12610 where re-spooling messages would put the messages, you can use
12611 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
12612 Group Commands}).
12613
12614 @vindex nnmail-split-header-length-limit
12615 Header lines longer than the value of
12616 @code{nnmail-split-header-length-limit} are excluded from the split
12617 function.
12618
12619 @vindex nnmail-mail-splitting-charset
12620 @vindex nnmail-mail-splitting-decodes
12621 By default the splitting codes MIME decodes headers so you can match
12622 on non-ASCII strings.  The @code{nnmail-mail-splitting-charset}
12623 variable specifies the default charset for decoding.  The behaviour
12624 can be turned off completely by binding
12625 @code{nnmail-mail-splitting-decodes} to nil, which is useful if you
12626 want to match articles based on the raw header data.
12627
12628 @vindex nnmail-resplit-incoming
12629 By default, splitting is performed on all incoming messages.  If
12630 you specify a @code{directory} entry for the variable
12631 @code{mail-sources} @pxref{Mail Source Specifiers}, however, then
12632 splitting does @emph{not} happen by default.  You can set the variable
12633 @code{nnmail-resplit-incoming} to a non-nil value to make splitting
12634 happen even in this case.  (This variable has no effect on other kinds
12635 of entries.)
12636
12637 Gnus gives you all the opportunity you could possibly want for shooting
12638 yourself in the foot.  Let's say you create a group that will contain
12639 all the mail you get from your boss.  And then you accidentally
12640 unsubscribe from the group.  Gnus will still put all the mail from your
12641 boss in the unsubscribed group, and so, when your boss mails you ``Have
12642 that report ready by Monday or you're fired!'', you'll never see it and,
12643 come Tuesday, you'll still believe that you're gainfully employed while
12644 you really should be out collecting empty bottles to save up for next
12645 month's rent money.
12646
12647
12648 @node Mail Sources
12649 @subsection Mail Sources
12650
12651 Mail can be gotten from many different sources---the mail spool, from a
12652 POP mail server, from a procmail directory, or from a maildir, for
12653 instance.
12654
12655 @menu
12656 * Mail Source Specifiers::      How to specify what a mail source is.
12657 * Mail Source Customization::   Some variables that influence things.
12658 * Fetching Mail::               Using the mail source specifiers.
12659 @end menu
12660
12661
12662 @node Mail Source Specifiers
12663 @subsubsection Mail Source Specifiers
12664 @cindex POP
12665 @cindex mail server
12666 @cindex procmail
12667 @cindex mail spool
12668 @cindex mail source
12669
12670 You tell Gnus how to fetch mail by setting @code{mail-sources}
12671 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
12672
12673 Here's an example:
12674
12675 @lisp
12676 (pop :server "pop3.mailserver.com" :user "myname")
12677 @end lisp
12678
12679 As can be observed, a mail source specifier is a list where the first
12680 element is a @dfn{mail source type}, followed by an arbitrary number of
12681 @dfn{keywords}.  Keywords that are not explicitly specified are given
12682 default values.
12683
12684 The following mail source types are available:
12685
12686 @table @code
12687 @item file
12688 Get mail from a single file; typically from the mail spool.
12689
12690 Keywords:
12691
12692 @table @code
12693 @item :path
12694 The path of the file.  Defaults to the value of the @code{MAIL}
12695 environment variable or the value of @code{rmail-spool-directory}
12696 (usually something like @file{/usr/mail/spool/user-name}).
12697 @end table
12698
12699 An example file mail source:
12700
12701 @lisp
12702 (file :path "/usr/spool/mail/user-name")
12703 @end lisp
12704
12705 Or using the default path:
12706
12707 @lisp
12708 (file)
12709 @end lisp
12710
12711 If the mail spool file is not located on the local machine, it's best to
12712 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
12713 file names here---it has no way to lock the mail spool while moving the
12714 mail.
12715
12716 If it's impossible to set up a proper server, you can use ssh instead.
12717
12718 @lisp
12719 (setq mail-sources
12720       '((file :prescript "ssh host bin/getmail >%t")))
12721 @end lisp
12722
12723 The @samp{getmail} script would look something like the following:
12724
12725 @example
12726 #!/bin/sh
12727 #  getmail - move mail from spool to stdout
12728 #  flu@@iki.fi
12729
12730 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
12731 TMP=$HOME/Mail/tmp
12732 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
12733 @end example
12734
12735 Alter this script to fit find the @samp{movemail} you want to use.
12736
12737
12738 @item directory
12739 @vindex nnmail-scan-directory-mail-source-once
12740 Get mail from several files in a directory.  This is typically used when
12741 you have procmail split the incoming mail into several files.  That is,
12742 there is a one-to-one correspondence between files in that directory and
12743 groups, so that mail from the file @file{foo.bar.spool} will be put in
12744 the group @code{foo.bar}.  (You can change the suffix to be used instead
12745 of @code{.spool}.)  Setting
12746 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus to
12747 scan the mail source only once.  This is particularly useful if you want
12748 to scan mail groups at a specified level.
12749
12750 @vindex nnmail-resplit-incoming
12751 There is also the variable @code{nnmail-resplit-incoming}, if you set
12752 that to a non-nil value, then the normal splitting process is applied
12753 to all the files from the directory, @ref{Splitting Mail}.
12754
12755 Keywords:
12756
12757 @table @code
12758 @item :path
12759 The path of the directory where the files are.  There is no default
12760 value.
12761
12762 @item :suffix
12763 Only files ending with this suffix are used.  The default is
12764 @samp{.spool}.
12765
12766 @item :predicate
12767 Only files that have this predicate return non-@code{nil} are returned.
12768 The default is @code{identity}.  This is used as an additional
12769 filter---only files that have the right suffix @emph{and} satisfy this
12770 predicate are considered.
12771
12772 @item :prescript
12773 @itemx :postscript
12774 Script run before/after fetching mail.
12775
12776 @end table
12777
12778 An example directory mail source:
12779
12780 @lisp
12781 (directory :path "/home/user-name/procmail-dir/"
12782            :suffix ".prcml")
12783 @end lisp
12784
12785 @item pop
12786 Get mail from a POP server.
12787
12788 Keywords:
12789
12790 @table @code
12791 @item :server
12792 The name of the POP server.  The default is taken from the
12793 @code{MAILHOST} environment variable.
12794
12795 @item :port
12796 The port number of the POP server.  This can be a number (eg,
12797 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
12798 string, it should be a service name as listed in @file{/etc/services} on
12799 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
12800 need to specify it as @samp{"pop-3"} instead.
12801
12802 @item :user
12803 The user name to give to the POP server.  The default is the login
12804 name.
12805
12806 @item :password
12807 The password to give to the POP server.  If not specified, the user is
12808 prompted.
12809
12810 @item :program
12811 The program to use to fetch mail from the POP server.  This should be
12812 a @code{format}-like string.  Here's an example:
12813
12814 @example
12815 fetchmail %u@@%s -P %p %t
12816 @end example
12817
12818 The valid format specifier characters are:
12819
12820 @table @samp
12821 @item t
12822 The name of the file the mail is to be moved to.  This must always be
12823 included in this string.
12824
12825 @item s
12826 The name of the server.
12827
12828 @item P
12829 The port number of the server.
12830
12831 @item u
12832 The user name to use.
12833
12834 @item p
12835 The password to use.
12836 @end table
12837
12838 The values used for these specs are taken from the values you give the
12839 corresponding keywords.
12840
12841 @item :prescript
12842 A script to be run before fetching the mail.  The syntax is the same as
12843 the @code{:program} keyword.  This can also be a function to be run.
12844
12845 @item :postscript
12846 A script to be run after fetching the mail.  The syntax is the same as
12847 the @code{:program} keyword.  This can also be a function to be run.
12848
12849 @item :function
12850 The function to use to fetch mail from the POP server.  The function is
12851 called with one parameter---the name of the file where the mail should
12852 be moved to.
12853
12854 @item :authentication
12855 This can be either the symbol @code{password} or the symbol @code{apop}
12856 and says what authentication scheme to use.  The default is
12857 @code{password}.
12858
12859 @item :connection
12860 What stream to use for connecting to the server, this can be the symbol
12861 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
12862 and use insecure connections.  Note that for SSL/TLS, you need external
12863 programs and libraries:
12864
12865 @itemize @bullet
12866 @item
12867 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
12868 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
12869 library @samp{ssl.el}.
12870 @item
12871 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
12872 Requires the external library @samp{starttls.el} and program
12873 @samp{starttls}.
12874 @end itemize
12875
12876 @item :leave
12877 Non-@code{nil} if mail is to be left on the server and UIDL used for
12878 message retrieval.  The default is @code{nil}.
12879
12880 @end table
12881
12882 If the @code{:program} and @code{:function} keywords aren't specified,
12883 @code{pop3-movemail} will be used.
12884
12885 Here are some examples.  Fetch from the default POP server, using the
12886 default user name, and default fetcher:
12887
12888 @lisp
12889 (pop)
12890 @end lisp
12891
12892 Fetch from a named server with a named user and password:
12893
12894 @lisp
12895 (pop :server "my.pop.server"
12896      :user "user-name" :password "secret")
12897 @end lisp
12898
12899 Use @samp{movemail} to move the mail:
12900
12901 @lisp
12902 (pop :program "movemail po:%u %t %p")
12903 @end lisp
12904
12905 @item maildir
12906 Get mail from a maildir.  This is a type of mailbox that is supported by
12907 at least qmail and postfix, where each file in a special directory
12908 contains exactly one mail.
12909
12910 Keywords:
12911
12912 @table @code
12913 @item :path
12914 The path of the directory where the mails are stored.  The default is
12915 taken from the @code{MAILDIR} environment variable or
12916 @samp{~/Maildir/}.
12917 @item :subdirs
12918 The subdirectories of the Maildir.  The default is
12919 @samp{("new" "cur")}.
12920
12921 @c If you sometimes look at your mail through a pop3 daemon before fetching
12922 @c them with Gnus, you may also have to fetch your mails from the
12923 @c @code{cur} directory inside the maildir, like in the first example
12924 @c below.
12925
12926 You can also get mails from remote hosts (because maildirs don't suffer
12927 from locking problems).
12928
12929 @end table
12930
12931 Two example maildir mail sources:
12932
12933 @lisp
12934 (maildir :path "/home/user-name/Maildir/"
12935          :subdirs ("cur" "new"))
12936 @end lisp
12937
12938 @lisp
12939 (maildir :path "/user@@remotehost.org:~/Maildir/"
12940          :subdirs ("new"))
12941 @end lisp
12942
12943 @item imap
12944 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
12945 as intended, as a network mail reading protocol (ie with nnimap), for
12946 some reason or other, Gnus let you treat it similar to a POP server
12947 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
12948 more information.
12949
12950 Note that for the Kerberos, GSSAPI, SSL/TLS and STARTTLS support you
12951 may need external programs and libraries, @xref{IMAP}.
12952
12953 Keywords:
12954
12955 @table @code
12956 @item :server
12957 The name of the @sc{imap} server.  The default is taken from the
12958 @code{MAILHOST} environment variable.
12959
12960 @item :port
12961 The port number of the @sc{imap} server.  The default is @samp{143}, or
12962 @samp{993} for SSL/TLS connections.
12963
12964 @item :user
12965 The user name to give to the @sc{imap} server.  The default is the login
12966 name.
12967
12968 @item :password
12969 The password to give to the @sc{imap} server.  If not specified, the user is
12970 prompted.
12971
12972 @item :stream
12973 What stream to use for connecting to the server, this is one of the
12974 symbols in @code{imap-stream-alist}.  Right now, this means
12975 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{ssl},
12976 @samp{shell} or the default @samp{network}.
12977
12978 @item :authentication
12979 Which authenticator to use for authenticating to the server, this is
12980 one of the symbols in @code{imap-authenticator-alist}.  Right now,
12981 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
12982 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
12983
12984 @item :program
12985 When using the `shell' :stream, the contents of this variable is
12986 mapped into the `imap-shell-program' variable.  This should be a
12987 @code{format}-like string (or list of strings).  Here's an example:
12988
12989 @example
12990 ssh %s imapd
12991 @end example
12992
12993 The valid format specifier characters are:
12994
12995 @table @samp
12996 @item s
12997 The name of the server.
12998
12999 @item l
13000 User name from `imap-default-user'.
13001
13002 @item p
13003 The port number of the server.
13004 @end table
13005
13006 The values used for these specs are taken from the values you give the
13007 corresponding keywords.
13008
13009 @item :mailbox
13010 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13011 which normally is the mailbox which receive incoming mail.
13012
13013 @item :predicate
13014 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13015 UNDELETED}, is probably the best choice for most people, but if you
13016 sometimes peek in your mailbox with a @sc{imap} client and mark some
13017 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13018 Then all articles in the mailbox is fetched, no matter what.  For a
13019 complete list of predicates, see RFC 2060 section 6.4.4.
13020
13021 @item :fetchflag
13022 How to flag fetched articles on the server, the default @samp{\Deleted}
13023 will mark them as deleted, an alternative would be @samp{\Seen} which
13024 would simply mark them as read.  These are the two most likely choices,
13025 but more flags are defined in RFC 2060 section 2.3.2.
13026
13027 @item :dontexpunge
13028 If non-nil, don't remove all articles marked as deleted in the mailbox
13029 after finishing the fetch.
13030
13031 @end table
13032
13033 An example @sc{imap} mail source:
13034
13035 @lisp
13036 (imap :server "mail.mycorp.com"
13037       :stream kerberos4
13038       :fetchflag "\\Seen")
13039 @end lisp
13040
13041 @item webmail
13042 Get mail from a webmail server, such as @uref{www.hotmail.com},
13043 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13044 @uref{mail.yahoo..com}.
13045
13046 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13047 required for url "4.0pre.46".
13048
13049 WARNING: Mails may be lost.  NO WARRANTY.
13050
13051 Keywords:
13052
13053 @table @code
13054 @item :subtype
13055 The type of the webmail server.  The default is @code{hotmail}.  The
13056 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13057
13058 @item :user
13059 The user name to give to the webmail server.  The default is the login
13060 name.
13061
13062 @item :password
13063 The password to give to the webmail server.  If not specified, the user is
13064 prompted.
13065
13066 @item :dontexpunge
13067 If non-nil, only fetch unread articles and don't move them to trash
13068 folder after finishing the fetch.
13069
13070 @end table
13071
13072 An example webmail source:
13073
13074 @lisp
13075 (webmail :subtype 'hotmail
13076          :user "user-name"
13077          :password "secret")
13078 @end lisp
13079 @end table
13080
13081 @table @dfn
13082 @item Common Keywords
13083 Common keywords can be used in any type of mail source.
13084
13085 Keywords:
13086
13087 @table @code
13088 @item :plugged
13089 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
13090 directory source to get mail, you can specify it as in this example:
13091
13092 @lisp
13093 (setq mail-sources
13094       '((directory :path "/home/pavel/.Spool/"
13095                    :suffix ""
13096                    :plugged t)))
13097 @end lisp
13098
13099 Gnus will then fetch your mail even when you are unplugged.  This is
13100 useful when you use local mail and news.
13101
13102 @end table
13103 @end table
13104
13105 @subsubsection Function Interface
13106
13107 Some of the above keywords specify a Lisp function to be executed.
13108 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13109 the value of the keyword while the function is executing.  For example,
13110 consider the following mail-source setting:
13111
13112 @lisp
13113 (setq mail-sources '((pop :user "jrl"
13114                           :server "pophost" :function fetchfunc)))
13115 @end lisp
13116
13117 While the function @code{fetchfunc} is executing, the symbol @code{user}
13118 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13119 @code{"pophost"}.  The symbols @code{port}, @code{password},
13120 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13121 and @code{authentication} are also bound (to their default values).
13122
13123 See above for a list of keywords for each type of mail source.
13124
13125
13126 @node Mail Source Customization
13127 @subsubsection Mail Source Customization
13128
13129 The following is a list of variables that influence how the mail is
13130 fetched.  You would normally not need to set or change any of these
13131 variables.
13132
13133 @table @code
13134 @item mail-source-crash-box
13135 @vindex mail-source-crash-box
13136 File where mail will be stored while processing it.  The default is
13137 @file{~/.emacs-mail-crash-box}.
13138
13139 @item mail-source-delete-incoming
13140 @vindex mail-source-delete-incoming
13141 If non-@code{nil}, delete incoming files after handling them.
13142
13143 @item mail-source-directory
13144 @vindex mail-source-directory
13145 Directory where files (if any) will be stored.  The default is
13146 @file{~/Mail/}.  At present, the only thing this is used for is to say
13147 where the incoming files will be stored if the previous variable is
13148 @code{nil}.
13149
13150 @item mail-source-incoming-file-prefix
13151 @vindex mail-source-incoming-file-prefix
13152 Prefix for file name for storing incoming mail.  The default is
13153 @file{Incoming}, in which case files will end up with names like
13154 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13155 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13156
13157 @item mail-source-default-file-modes
13158 @vindex mail-source-default-file-modes
13159 All new mail files will get this file mode.  The default is 384.
13160
13161 @item mail-source-movemail-program
13162 @vindex mail-source-movemail-program
13163 If non-nil, name of program for fetching new mail.  If nil,
13164 @code{movemail} in @var{exec-directory}.
13165
13166 @end table
13167
13168
13169 @node Fetching Mail
13170 @subsubsection Fetching Mail
13171
13172 @vindex mail-sources
13173 @vindex nnmail-spool-file
13174 The way to actually tell Gnus where to get new mail from is to set
13175 @code{mail-sources} to a list of mail source specifiers
13176 (@pxref{Mail Source Specifiers}).
13177
13178 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13179 @code{nil}, the mail back ends will never attempt to fetch mail by
13180 themselves.
13181
13182 If you want to fetch mail both from your local spool as well as a POP
13183 mail server, you'd say something like:
13184
13185 @lisp
13186 (setq mail-sources
13187       '((file)
13188         (pop :server "pop3.mail.server"
13189              :password "secret")))
13190 @end lisp
13191
13192 Or, if you don't want to use any of the keyword defaults:
13193
13194 @lisp
13195 (setq mail-sources
13196       '((file :path "/var/spool/mail/user-name")
13197         (pop :server "pop3.mail.server"
13198              :user "user-name"
13199              :port "pop3"
13200              :password "secret")))
13201 @end lisp
13202
13203
13204 When you use a mail back end, Gnus will slurp all your mail from your
13205 inbox and plonk it down in your home directory.  Gnus doesn't move any
13206 mail if you're not using a mail back end---you have to do a lot of magic
13207 invocations first.  At the time when you have finished drawing the
13208 pentagram, lightened the candles, and sacrificed the goat, you really
13209 shouldn't be too surprised when Gnus moves your mail.
13210
13211
13212
13213 @node Mail Back End Variables
13214 @subsection Mail Back End Variables
13215
13216 These variables are (for the most part) pertinent to all the various
13217 mail back ends.
13218
13219 @table @code
13220 @vindex nnmail-read-incoming-hook
13221 @item nnmail-read-incoming-hook
13222 The mail back ends all call this hook after reading new mail.  You can
13223 use this hook to notify any mail watch programs, if you want to.
13224
13225 @vindex nnmail-split-hook
13226 @item nnmail-split-hook
13227 @findex article-decode-encoded-words
13228 @findex RFC 1522 decoding
13229 @findex RFC 2047 decoding
13230 Hook run in the buffer where the mail headers of each message is kept
13231 just before the splitting based on these headers is done.  The hook is
13232 free to modify the buffer contents in any way it sees fit---the buffer
13233 is discarded after the splitting has been done, and no changes performed
13234 in the buffer will show up in any files.
13235 @code{gnus-article-decode-encoded-words} is one likely function to add
13236 to this hook.
13237
13238 @vindex nnmail-pre-get-new-mail-hook
13239 @vindex nnmail-post-get-new-mail-hook
13240 @item nnmail-pre-get-new-mail-hook
13241 @itemx nnmail-post-get-new-mail-hook
13242 These are two useful hooks executed when treating new incoming
13243 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13244 starting to handle the new mail) and
13245 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13246 is done).  Here's and example of using these two hooks to change the
13247 default file modes the new mail files get:
13248
13249 @lisp
13250 (add-hook 'nnmail-pre-get-new-mail-hook
13251           (lambda () (set-default-file-modes 511)))
13252
13253 (add-hook 'nnmail-post-get-new-mail-hook
13254           (lambda () (set-default-file-modes 551)))
13255 @end lisp
13256
13257 @item nnmail-use-long-file-names
13258 @vindex nnmail-use-long-file-names
13259 If non-@code{nil}, the mail back ends will use long file and directory
13260 names.  Groups like @samp{mail.misc} will end up in directories
13261 (assuming use of @code{nnml} back end) or files (assuming use of
13262 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13263 the same group will end up in @file{mail/misc}.
13264
13265 @item nnmail-delete-file-function
13266 @vindex nnmail-delete-file-function
13267 @findex delete-file
13268 Function called to delete files.  It is @code{delete-file} by default.
13269
13270 @item nnmail-cache-accepted-message-ids
13271 @vindex nnmail-cache-accepted-message-ids
13272 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13273 the back end (via @code{Gcc}, for instance) into the mail duplication
13274 discovery cache.  The default is @code{nil}.
13275
13276 @item nnmail-cache-ignore-groups
13277 @vindex nnmail-cache-ignore-groups
13278 This can be a regular expression or a list of regular expressions.
13279 Group names that match any of the regular expressions will never be
13280 recorded in the @code{Message-ID} cache.
13281
13282 This can be useful, for example, when using Fancy Splitting
13283 (@pxref{Fancy Mail Splitting}) together with the function
13284 @code{nnmail-split-fancy-with-parent}.
13285
13286 @end table
13287
13288
13289 @node Fancy Mail Splitting
13290 @subsection Fancy Mail Splitting
13291 @cindex mail splitting
13292 @cindex fancy mail splitting
13293
13294 @vindex nnmail-split-fancy
13295 @findex nnmail-split-fancy
13296 If the rather simple, standard method for specifying how to split mail
13297 doesn't allow you to do what you want, you can set
13298 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13299 play with the @code{nnmail-split-fancy} variable.
13300
13301 Let's look at an example value of this variable first:
13302
13303 @lisp
13304 ;; Messages from the mailer daemon are not crossposted to any of
13305 ;; the ordinary groups.  Warnings are put in a separate group
13306 ;; from real errors.
13307 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13308                    "mail.misc"))
13309    ;; Non-error messages are crossposted to all relevant
13310    ;; groups, but we don't crosspost between the group for the
13311    ;; (ding) list and the group for other (ding) related mail.
13312    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13313          ("subject" "ding" "ding.misc"))
13314       ;; Other mailing lists...
13315       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13316       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13317       ;; Both lists below have the same suffix, so prevent
13318       ;; cross-posting to mkpkg.list of messages posted only to
13319       ;; the bugs- list, but allow cross-posting when the
13320       ;; message was really cross-posted.
13321       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13322       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13323       ;; People...
13324       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13325    ;; Unmatched mail goes to the catch all group.
13326    "misc.misc")
13327 @end lisp
13328
13329 This variable has the format of a @dfn{split}.  A split is a (possibly)
13330 recursive structure where each split may contain other splits.  Here are
13331 the five possible split syntaxes:
13332
13333 @enumerate
13334
13335 @item
13336 @samp{group}: If the split is a string, that will be taken as a group
13337 name.  Normal regexp match expansion will be done.  See below for
13338 examples.
13339
13340 @item
13341 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13342 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13343 first element of which is a string, then store the message as
13344 specified by @var{split}, if header @var{field} (a regexp) contains
13345 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13346 matches some string after @var{field} and before the end of the
13347 matched @var{value}, the @var{split} is ignored.  If none of the
13348 @var{restrict} clauses match, @var{split} is processed.
13349
13350 @item
13351 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13352 element is @code{|} (vertical bar), then process each @var{split} until
13353 one of them matches.  A @var{split} is said to match if it will cause
13354 the mail message to be stored in one or more groups.
13355
13356 @item
13357 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13358 element is @code{&}, then process all @var{split}s in the list.
13359
13360 @item
13361 @code{junk}: If the split is the symbol @code{junk}, then don't save
13362 (i.e., delete) this message.  Use with extreme caution.
13363
13364 @item
13365 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13366 a list, and the first element is @code{:}, then the second element will
13367 be called as a function with @var{args} given as arguments.  The
13368 function should return a @var{split}.
13369
13370 @cindex body split
13371 For instance, the following function could be used to split based on the
13372 body of the messages:
13373
13374 @lisp
13375 (defun split-on-body ()
13376   (save-excursion
13377     (set-buffer " *nnmail incoming*")
13378     (goto-char (point-min))
13379     (when (re-search-forward "Some.*string" nil t)
13380       "string.group")))
13381 @end lisp
13382
13383 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13384 when the @code{:} function is run.
13385
13386 @item
13387 @code{(! @var{func} @var{split})}: If the split is a list, and the first
13388 element is @code{!}, then SPLIT will be processed, and FUNC will be
13389 called as a function with the result of SPLIT as argument.  FUNC should
13390 return a split.
13391
13392 @item
13393 @code{nil}: If the split is @code{nil}, it is ignored.
13394
13395 @end enumerate
13396
13397 In these splits, @var{field} must match a complete field name.
13398 @var{value} must match a complete word according to the fundamental mode
13399 syntax table.  You can use @code{.*} in the regexps to match partial
13400 field names or words.  In other words, all @var{value}'s are wrapped in
13401 @samp{\<} and @samp{\>} pairs.
13402
13403 @vindex nnmail-split-abbrev-alist
13404 @var{field} and @var{value} can also be lisp symbols, in that case they
13405 are expanded as specified by the variable
13406 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13407 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13408 value.
13409
13410 @vindex nnmail-split-fancy-syntax-table
13411 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13412 when all this splitting is performed.
13413
13414 If you want to have Gnus create groups dynamically based on some
13415 information in the headers (i.e., do @code{replace-match}-like
13416 substitutions in the group names), you can say things like:
13417
13418 @example
13419 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13420 @end example
13421
13422 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13423 will be filed in @samp{mail.debian.foo}.
13424
13425 If the string contains the element @samp{\&}, then the previously
13426 matched string will be substituted.  Similarly, the elements @samp{\\1}
13427 up to @samp{\\9} will be substituted with the text matched by the
13428 groupings 1 through 9.
13429
13430 @findex nnmail-split-fancy-with-parent
13431 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13432 split followups into the same groups their parents are in.  Sometimes
13433 you can't make splitting rules for all your mail.  For example, your
13434 boss might send you personal mail regarding different projects you are
13435 working on, and as you can't tell your boss to put a distinguishing
13436 string into the subject line, you have to resort to manually moving the
13437 messages into the right group.  With this function, you only have to do
13438 it once per thread.
13439
13440 To use this feature, you have to set @code{nnmail-treat-duplicates} and
13441 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
13442 you can include @code{nnmail-split-fancy-with-parent} using the colon
13443 feature, like so:
13444 @lisp
13445 (setq nnmail-treat-duplicates 'warn     ; or 'delete
13446       nnmail-cache-accepted-message-ids t
13447       nnmail-split-fancy
13448       '(| (: nnmail-split-fancy-with-parent)
13449           ;; other splits go here
13450         ))
13451 @end lisp
13452
13453 This feature works as follows: when @code{nnmail-treat-duplicates} is
13454 non-nil, Gnus records the message id of every message it sees in the
13455 file specified by the variable @code{nnmail-message-id-cache-file},
13456 together with the group it is in (the group is omitted for non-mail
13457 messages).  When mail splitting is invoked, the function
13458 @code{nnmail-split-fancy-with-parent} then looks at the References (and
13459 In-Reply-To) header of each message to split and searches the file
13460 specified by @code{nnmail-message-id-cache-file} for the message ids.
13461 When it has found a parent, it returns the corresponding group name
13462 unless the group name matches the regexp
13463 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
13464 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
13465 number than the default so that the message ids are still in the cache.
13466 (A value of 5000 appears to create a file some 300 kBytes in size.)
13467 @vindex nnmail-cache-accepted-message-ids
13468 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13469 also records the message ids of moved articles, so that the followup
13470 messages goes into the new group.
13471
13472 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13473 want certain groups to be recorded in the cache.  For example, if all
13474 outgoing messages are written to an `outgoing' group, you could set
13475 @code{nnmail-cache-ignore-groups} to match that group name.
13476 Otherwise, answers to all your messages would end up in the
13477 `outgoing' group.
13478
13479
13480 @node Group Mail Splitting
13481 @subsection Group Mail Splitting
13482 @cindex mail splitting
13483 @cindex group mail splitting
13484
13485 @findex gnus-group-split
13486 If you subscribe to dozens of mailing lists but you don't want to
13487 maintain mail splitting rules manually, group mail splitting is for you.
13488 You just have to set @var{to-list} and/or @var{to-address} in group
13489 parameters or group customization and set @code{nnmail-split-methods} to
13490 @code{gnus-group-split}.  This splitting function will scan all groups
13491 for those parameters and split mail accordingly, i.e., messages posted
13492 from or to the addresses specified in the parameters @var{to-list} or
13493 @var{to-address} of a mail group will be stored in that group.
13494
13495 Sometimes, mailing lists have multiple addresses, and you may want mail
13496 splitting to recognize them all: just set the @var{extra-aliases} group
13497 parameter to the list of additional addresses and it's done.  If you'd
13498 rather use a regular expression, set @var{split-regexp}.
13499
13500 All these parameters in a group will be used to create an
13501 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13502 the @var{value} is a single regular expression that matches
13503 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13504 matches of @var{split-regexp}, and the @var{split} is the name of the
13505 group.  @var{restrict}s are also supported: just set the
13506 @var{split-exclude} parameter to a list of regular expressions.
13507
13508 If you can't get the right split to be generated using all these
13509 parameters, or you just need something fancier, you can set the
13510 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13511 this case, all other aforementioned parameters will be ignored by
13512 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13513 @code{nil}, in which case the group will be ignored by
13514 @code{gnus-group-split}.
13515
13516 @vindex gnus-group-split-default-catch-all-group
13517 @code{gnus-group-split} will do cross-posting on all groups that match,
13518 by defining a single @code{&} fancy split containing one split for each
13519 group.  If a message doesn't match any split, it will be stored in the
13520 group named in @code{gnus-group-split-default-catch-all-group}, unless
13521 some group has @var{split-spec} set to @code{catch-all}, in which case
13522 that group is used as the catch-all group.  Even though this variable is
13523 often used just to name a group, it may also be set to an arbitrarily
13524 complex fancy split (after all, a group name is a fancy split), and this
13525 may be useful to split mail that doesn't go to any mailing list to
13526 personal mail folders.  Note that this fancy split is added as the last
13527 element of a @code{|} split list that also contains a @code{&} split
13528 with the rules extracted from group parameters.
13529
13530 It's time for an example.  Assume the following group parameters have
13531 been defined:
13532
13533 @example
13534 nnml:mail.bar:
13535 ((to-address . "bar@@femail.com")
13536  (split-regexp . ".*@@femail\\.com"))
13537 nnml:mail.foo:
13538 ((to-list . "foo@@nowhere.gov")
13539  (extra-aliases "foo@@localhost" "foo-redist@@home")
13540  (split-exclude "bugs-foo" "rambling-foo")
13541  (admin-address . "foo-request@@nowhere.gov"))
13542 nnml:mail.others:
13543 ((split-spec . catch-all))
13544 @end example
13545
13546 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
13547 behave as if @code{nnmail-split-fancy} had been selected and variable
13548 @code{nnmail-split-fancy} had been set as follows:
13549
13550 @lisp
13551 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
13552       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
13553            - "bugs-foo" - "rambling-foo" "mail.foo"))
13554    "mail.others")
13555 @end lisp
13556
13557 @findex gnus-group-split-fancy
13558 If you'd rather not use group splitting for all your mail groups, you
13559 may use it for only some of them, by using @code{nnmail-split-fancy}
13560 splits like this:
13561
13562 @lisp
13563 (: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL)
13564 @end lisp
13565
13566 @var{groups} may be a regular expression or a list of group names whose
13567 parameters will be scanned to generate the output split.
13568 @var{no-crosspost} can be used to disable cross-posting; in this case, a
13569 single @code{|} split will be output.  @var{catch-all} is the fallback
13570 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
13571 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
13572 empty string in any selected group, no catch-all split will be issued.
13573 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
13574 this group will override the value of the @var{catch-all} argument.
13575
13576 @findex gnus-group-split-setup
13577 Unfortunately, scanning all groups and their parameters can be quite
13578 slow, especially considering that it has to be done for every message.
13579 But don't despair!  The function @code{gnus-group-split-setup} can be
13580 used to enable @code{gnus-group-split} in a much more efficient way.  It
13581 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
13582 @code{nnmail-split-fancy} to the split produced by
13583 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
13584 scanned once, no matter how many messages are split.
13585
13586 @findex gnus-group-split-update
13587 However, if you change group parameters, you'd have to update
13588 @code{nnmail-split-fancy} manually.  You can do it by running
13589 @code{gnus-group-split-update}.  If you'd rather have it updated
13590 automatically, just tell @code{gnus-group-split-setup} to do it for
13591 you.  For example, add to your @file{.gnus}:
13592
13593 @lisp
13594 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
13595 @end lisp
13596
13597 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
13598 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
13599 have to worry about updating @code{nnmail-split-fancy} again.  If you
13600 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
13601 @code{gnus-group-split-default-catch-all-group} will be set to its
13602 value.
13603
13604 @vindex gnus-group-split-updated-hook
13605 Because you may want to change @code{nnmail-split-fancy} after it is set
13606 by @code{gnus-group-split-update}, this function will run
13607 @code{gnus-group-split-updated-hook} just before finishing.
13608
13609 @node Incorporating Old Mail
13610 @subsection Incorporating Old Mail
13611 @cindex incorporating old mail
13612 @cindex import old mail
13613
13614 Most people have lots of old mail stored in various file formats.  If
13615 you have set up Gnus to read mail using one of the spiffy Gnus mail
13616 back ends, you'll probably wish to have that old mail incorporated into
13617 your mail groups.
13618
13619 Doing so can be quite easy.
13620
13621 To take an example: You're reading mail using @code{nnml}
13622 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
13623 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
13624 file filled with important, but old, mail.  You want to move it into
13625 your @code{nnml} groups.
13626
13627 Here's how:
13628
13629 @enumerate
13630 @item
13631 Go to the group buffer.
13632
13633 @item
13634 Type `G f' and give the path to the mbox file when prompted to create an
13635 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
13636
13637 @item
13638 Type `SPACE' to enter the newly created group.
13639
13640 @item
13641 Type `M P b' to process-mark all articles in this group's buffer
13642 (@pxref{Setting Process Marks}).
13643
13644 @item
13645 Type `B r' to respool all the process-marked articles, and answer
13646 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
13647 @end enumerate
13648
13649 All the mail messages in the mbox file will now also be spread out over
13650 all your @code{nnml} groups.  Try entering them and check whether things
13651 have gone without a glitch.  If things look ok, you may consider
13652 deleting the mbox file, but I wouldn't do that unless I was absolutely
13653 sure that all the mail has ended up where it should be.
13654
13655 Respooling is also a handy thing to do if you're switching from one mail
13656 back end to another.  Just respool all the mail in the old mail groups
13657 using the new mail back end.
13658
13659
13660 @node Expiring Mail
13661 @subsection Expiring Mail
13662 @cindex article expiry
13663
13664 Traditional mail readers have a tendency to remove mail articles when
13665 you mark them as read, in some way.  Gnus takes a fundamentally
13666 different approach to mail reading.
13667
13668 Gnus basically considers mail just to be news that has been received in
13669 a rather peculiar manner.  It does not think that it has the power to
13670 actually change the mail, or delete any mail messages.  If you enter a
13671 mail group, and mark articles as ``read'', or kill them in some other
13672 fashion, the mail articles will still exist on the system.  I repeat:
13673 Gnus will not delete your old, read mail.  Unless you ask it to, of
13674 course.
13675
13676 To make Gnus get rid of your unwanted mail, you have to mark the
13677 articles as @dfn{expirable}.  (With the default keybindings, this means
13678 that you have to type @kbd{E}.)  This does not mean that the articles
13679 will disappear right away, however.  In general, a mail article will be
13680 deleted from your system if, 1) it is marked as expirable, AND 2) it is
13681 more than one week old.  If you do not mark an article as expirable, it
13682 will remain on your system until hell freezes over.  This bears
13683 repeating one more time, with some spurious capitalizations: IF you do
13684 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
13685
13686 You do not have to mark articles as expirable by hand.  Gnus provides
13687 two features, called `auto-expire' and `total-expire', that can help you
13688 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
13689 for you when you select an article.  And `total-expire' means that Gnus
13690 considers all articles as expirable that are read.  So, in addition to
13691 the articles marked @samp{E}, also the articles marked @samp{r},
13692 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
13693 expirable.
13694
13695 When should either auto-expire or total-expire be used?  Most people
13696 who are subscribed to mailing lists split each list into its own group
13697 and then turn on auto-expire or total-expire for those groups.
13698 (@xref{Splitting Mail}, for more information on splitting each list
13699 into its own group.)
13700
13701 Which one is better, auto-expire or total-expire?  It's not easy to
13702 answer.  Generally speaking, auto-expire is probably faster.  Another
13703 advantage of auto-expire is that you get more marks to work with: for
13704 the articles that are supposed to stick around, you can still choose
13705 between tick and dormant and read marks.  But with total-expire, you
13706 only have dormant and ticked to choose from.  The advantage of
13707 total-expire is that it works well with adaptive scoring @pxref{Adaptive
13708 Scoring}.  Auto-expire works with normal scoring but not with adaptive
13709 scoring.
13710
13711 @vindex gnus-auto-expirable-newsgroups
13712 Groups that match the regular expression
13713 @code{gnus-auto-expirable-newsgroups} will have all articles that you
13714 read marked as expirable automatically.  All articles marked as
13715 expirable have an @samp{E} in the first column in the summary buffer.
13716
13717 By default, if you have auto expiry switched on, Gnus will mark all the
13718 articles you read as expirable, no matter if they were read or unread
13719 before.  To avoid having articles marked as read marked as expirable
13720 automatically, you can put something like the following in your
13721 @file{.gnus} file:
13722
13723 @vindex gnus-mark-article-hook
13724 @lisp
13725 (remove-hook 'gnus-mark-article-hook
13726              'gnus-summary-mark-read-and-unread-as-read)
13727 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
13728 @end lisp
13729
13730 Note that making a group auto-expirable doesn't mean that all read
13731 articles are expired---only the articles marked as expirable
13732 will be expired.  Also note that using the @kbd{d} command won't make
13733 articles expirable---only semi-automatic marking of articles as read will
13734 mark the articles as expirable in auto-expirable groups.
13735
13736 Let's say you subscribe to a couple of mailing lists, and you want the
13737 articles you have read to disappear after a while:
13738
13739 @lisp
13740 (setq gnus-auto-expirable-newsgroups
13741       "mail.nonsense-list\\|mail.nice-list")
13742 @end lisp
13743
13744 Another way to have auto-expiry happen is to have the element
13745 @code{auto-expire} in the group parameters of the group.
13746
13747 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
13748 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
13749 don't really mix very well.
13750
13751 @vindex nnmail-expiry-wait
13752 The @code{nnmail-expiry-wait} variable supplies the default time an
13753 expirable article has to live.  Gnus starts counting days from when the
13754 message @emph{arrived}, not from when it was sent.  The default is seven
13755 days.
13756
13757 Gnus also supplies a function that lets you fine-tune how long articles
13758 are to live, based on what group they are in.  Let's say you want to
13759 have one month expiry period in the @samp{mail.private} group, a one day
13760 expiry period in the @samp{mail.junk} group, and a six day expiry period
13761 everywhere else:
13762
13763 @vindex nnmail-expiry-wait-function
13764 @lisp
13765 (setq nnmail-expiry-wait-function
13766       (lambda (group)
13767        (cond ((string= group "mail.private")
13768                31)
13769              ((string= group "mail.junk")
13770                1)
13771              ((string= group "important")
13772                'never)
13773              (t
13774                6))))
13775 @end lisp
13776
13777 The group names this function is fed are ``unadorned'' group
13778 names---no @samp{nnml:} prefixes and the like.
13779
13780 The @code{nnmail-expiry-wait} variable and
13781 @code{nnmail-expiry-wait-function} function can either be a number (not
13782 necessarily an integer) or one of the symbols @code{immediate} or
13783 @code{never}.
13784
13785 You can also use the @code{expiry-wait} group parameter to selectively
13786 change the expiry period (@pxref{Group Parameters}).
13787
13788 @vindex nnmail-expiry-target
13789 The normal action taken when expiring articles is to delete them.
13790 However, in some circumstances it might make more sense to move them
13791 to other groups instead of deleting them.  The variable
13792 @code{nnmail-expiry-target} (and the @code{expiry-target} group
13793 parameter) controls this.  The variable supplies a default value for
13794 all groups, which can be overridden for specific groups by the group
13795 parameter.  default value is @code{delete}, but this can also be a
13796 string (which should be the name of the group the message should be
13797 moved to), or a function (which will be called in a buffer narrowed to
13798 the message in question, and with the name of the group being moved
13799 from as its parameter) which should return a target -- either a group
13800 name or @code{delete}.
13801
13802 Here's an example for specifying a group name:
13803 @lisp
13804 (setq nnmail-expiry-target "nnml:expired")
13805 @end lisp
13806
13807 @findex nnmail-fancy-expiry-target
13808 @vindex nnmail-fancy-expiry-targets
13809 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
13810 expire mail to groups according to the variable
13811 @code{nnmail-fancy-expiry-targets}.  Here's an example:
13812
13813 @lisp
13814  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
13815        nnmail-fancy-expiry-targets
13816        '((to-from "boss" "nnfolder:Work")
13817          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
13818          ("from" ".*" "nnfolder:Archive-%Y")))
13819 @end lisp
13820
13821 With this setup, any mail that has @code{IMPORTANT} in its Subject
13822 header and was sent in the year @code{YYYY} and month @code{MMM}, will
13823 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
13824 From or To header contains the string @code{boss}, it will get expired
13825 to @code{nnfolder:Work}. All other mail will get expired to
13826 @code{nnfolder:Archive-YYYY}.
13827
13828 @vindex nnmail-keep-last-article
13829 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
13830 expire the final article in a mail newsgroup.  This is to make life
13831 easier for procmail users.
13832
13833 @vindex gnus-total-expirable-newsgroups
13834 By the way: That line up there, about Gnus never expiring non-expirable
13835 articles, is a lie.  If you put @code{total-expire} in the group
13836 parameters, articles will not be marked as expirable, but all read
13837 articles will be put through the expiry process.  Use with extreme
13838 caution.  Even more dangerous is the
13839 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
13840 this regexp will have all read articles put through the expiry process,
13841 which means that @emph{all} old mail articles in the groups in question
13842 will be deleted after a while.  Use with extreme caution, and don't come
13843 crying to me when you discover that the regexp you used matched the
13844 wrong group and all your important mail has disappeared.  Be a
13845 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
13846 with!  So there!
13847
13848 Most people make most of their mail groups total-expirable, though.
13849
13850 @vindex gnus-inhibit-user-auto-expire
13851 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
13852 commands will not mark an article as expirable, even if the group has
13853 auto-expire turned on.
13854
13855
13856 @node Washing Mail
13857 @subsection Washing Mail
13858 @cindex mail washing
13859 @cindex list server brain damage
13860 @cindex incoming mail treatment
13861
13862 Mailers and list servers are notorious for doing all sorts of really,
13863 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
13864 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
13865 end of all lines passing through our server, so let's do that!!!!1!''
13866 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
13867 considered to be self-evident were not discussed.  So.  Here we are.
13868
13869 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
13870 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
13871 be shocked and dismayed by this, but I haven't got the energy.  It is to
13872 laugh.
13873
13874 Gnus provides a plethora of functions for washing articles while
13875 displaying them, but it might be nicer to do the filtering before
13876 storing the mail to disc.  For that purpose, we have three hooks and
13877 various functions that can be put in these hooks.
13878
13879 @table @code
13880 @item nnmail-prepare-incoming-hook
13881 @vindex nnmail-prepare-incoming-hook
13882 This hook is called before doing anything with the mail and is meant for
13883 grand, sweeping gestures.  It is called in a buffer that contains all
13884 the new, incoming mail.  Functions to be used include:
13885
13886 @table @code
13887 @item nnheader-ms-strip-cr
13888 @findex nnheader-ms-strip-cr
13889 Remove trailing carriage returns from each line.  This is default on
13890 Emacs running on MS machines.
13891
13892 @end table
13893
13894 @item nnmail-prepare-incoming-header-hook
13895 @vindex nnmail-prepare-incoming-header-hook
13896 This hook is called narrowed to each header.  It can be used when
13897 cleaning up the headers.  Functions that can be used include:
13898
13899 @table @code
13900 @item nnmail-remove-leading-whitespace
13901 @findex nnmail-remove-leading-whitespace
13902 Clear leading white space that ``helpful'' listservs have added to the
13903 headers to make them look nice.  Aaah.
13904
13905 (Note that this function works on both the header on the body of all
13906 messages, so it is a potentially dangerous function to use (if a body
13907 of a message contains something that looks like a header line).  So
13908 rather than fix the bug, it is of course the right solution to make it
13909 into a feature by documenting it.)
13910
13911 @item nnmail-remove-list-identifiers
13912 @findex nnmail-remove-list-identifiers
13913 Some list servers add an identifier---for example, @samp{(idm)}---to the
13914 beginning of all @code{Subject} headers.  I'm sure that's nice for
13915 people who use stone age mail readers.  This function will remove
13916 strings that match the @code{nnmail-list-identifiers} regexp, which can
13917 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
13918 @code{\\(..\\)}.
13919
13920 For instance, if you want to remove the @samp{(idm)} and the
13921 @samp{nagnagnag} identifiers:
13922
13923 @lisp
13924 (setq nnmail-list-identifiers
13925       '("(idm)" "nagnagnag"))
13926 @end lisp
13927
13928 This can also be done non-destructively with
13929 @code{gnus-list-identifiers}, @xref{Article Hiding}.
13930
13931 @item nnmail-remove-tabs
13932 @findex nnmail-remove-tabs
13933 Translate all @samp{TAB} characters into @samp{SPACE} characters.
13934
13935 @item nnmail-fix-eudora-headers
13936 @findex nnmail-fix-eudora-headers
13937 @cindex Eudora
13938 Eudora produces broken @code{References} headers, but OK
13939 @code{In-Reply-To} headers.  This function will get rid of the
13940 @code{References} headers.
13941
13942 @end table
13943
13944 @item nnmail-prepare-incoming-message-hook
13945 @vindex nnmail-prepare-incoming-message-hook
13946 This hook is called narrowed to each message.  Functions to be used
13947 include:
13948
13949 @table @code
13950 @item article-de-quoted-unreadable
13951 @findex article-de-quoted-unreadable
13952 Decode Quoted Readable encoding.
13953
13954 @end table
13955 @end table
13956
13957
13958 @node Duplicates
13959 @subsection Duplicates
13960
13961 @vindex nnmail-treat-duplicates
13962 @vindex nnmail-message-id-cache-length
13963 @vindex nnmail-message-id-cache-file
13964 @cindex duplicate mails
13965 If you are a member of a couple of mailing lists, you will sometimes
13966 receive two copies of the same mail.  This can be quite annoying, so
13967 @code{nnmail} checks for and treats any duplicates it might find.  To do
13968 this, it keeps a cache of old @code{Message-ID}s---
13969 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
13970 default.  The approximate maximum number of @code{Message-ID}s stored
13971 there is controlled by the @code{nnmail-message-id-cache-length}
13972 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
13973 stored.) If all this sounds scary to you, you can set
13974 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
13975 default), and @code{nnmail} won't delete duplicate mails.  Instead it
13976 will insert a warning into the head of the mail saying that it thinks
13977 that this is a duplicate of a different message.
13978
13979 This variable can also be a function.  If that's the case, the function
13980 will be called from a buffer narrowed to the message in question with
13981 the @code{Message-ID} as a parameter.  The function must return either
13982 @code{nil}, @code{warn}, or @code{delete}.
13983
13984 You can turn this feature off completely by setting the variable to
13985 @code{nil}.
13986
13987 If you want all the duplicate mails to be put into a special
13988 @dfn{duplicates} group, you could do that using the normal mail split
13989 methods:
13990
13991 @lisp
13992 (setq nnmail-split-fancy
13993       '(| ;; Messages duplicates go to a separate group.
13994           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
13995           ;; Message from daemons, postmaster, and the like to another.
13996           (any mail "mail.misc")
13997           ;; Other rules.
13998           [ ... ] ))
13999 @end lisp
14000
14001 Or something like:
14002 @lisp
14003 (setq nnmail-split-methods
14004       '(("duplicates" "^Gnus-Warning:.*duplicate")
14005         ;; Other rules.
14006         [...]))
14007 @end lisp
14008
14009 Here's a neat feature: If you know that the recipient reads her mail
14010 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14011 @code{delete}, you can send her as many insults as you like, just by
14012 using a @code{Message-ID} of a mail that you know that she's already
14013 received.  Think of all the fun!  She'll never see any of it!  Whee!
14014
14015
14016 @node Not Reading Mail
14017 @subsection Not Reading Mail
14018
14019 If you start using any of the mail back ends, they have the annoying
14020 habit of assuming that you want to read mail with them.  This might not
14021 be unreasonable, but it might not be what you want.
14022
14023 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14024 @code{nil}, none of the back ends will ever attempt to read incoming
14025 mail, which should help.
14026
14027 @vindex nnbabyl-get-new-mail
14028 @vindex nnmbox-get-new-mail
14029 @vindex nnml-get-new-mail
14030 @vindex nnmh-get-new-mail
14031 @vindex nnfolder-get-new-mail
14032 This might be too much, if, for instance, you are reading mail quite
14033 happily with @code{nnml} and just want to peek at some old @sc{rmail}
14034 file you have stashed away with @code{nnbabyl}.  All back ends have
14035 variables called back-end-@code{get-new-mail}.  If you want to disable
14036 the @code{nnbabyl} mail reading, you edit the virtual server for the
14037 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14038
14039 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14040 narrowed to the article to be saved before saving it when reading
14041 incoming mail.
14042
14043
14044 @node Choosing a Mail Back End
14045 @subsection Choosing a Mail Back End
14046
14047 Gnus will read the mail spool when you activate a mail group.  The mail
14048 file is first copied to your home directory.  What happens after that
14049 depends on what format you want to store your mail in.
14050
14051 There are six different mail back ends in the standard Gnus, and more
14052 back ends are available separately.  The mail back end most people use
14053 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14054 Spool}).  You might notice that only five back ends are listed below;
14055 @code{nnmaildir}'s documentation has not yet been completely
14056 incorporated into this manual.  Until it is, you can find it at
14057 @uref{http://multivac.cwru.edu./nnmaildir/}.
14058
14059 @menu
14060 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14061 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
14062 * Mail Spool::                  Store your mail in a private spool?
14063 * MH Spool::                    An mhspool-like back end.
14064 * Mail Folders::                Having one file for each group.
14065 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14066 @end menu
14067
14068
14069 @node Unix Mail Box
14070 @subsubsection Unix Mail Box
14071 @cindex nnmbox
14072 @cindex unix mail box
14073
14074 @vindex nnmbox-active-file
14075 @vindex nnmbox-mbox-file
14076 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14077 mail.  @code{nnmbox} will add extra headers to each mail article to say
14078 which group it belongs in.
14079
14080 Virtual server settings:
14081
14082 @table @code
14083 @item nnmbox-mbox-file
14084 @vindex nnmbox-mbox-file
14085 The name of the mail box in the user's home directory.  Default is
14086 @file{~/mbox}.
14087
14088 @item nnmbox-active-file
14089 @vindex nnmbox-active-file
14090 The name of the active file for the mail box.  Default is
14091 @file{~/.mbox-active}.
14092
14093 @item nnmbox-get-new-mail
14094 @vindex nnmbox-get-new-mail
14095 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14096 into groups.  Default is @code{t}.
14097 @end table
14098
14099
14100 @node Rmail Babyl
14101 @subsubsection Rmail Babyl
14102 @cindex nnbabyl
14103 @cindex rmail mbox
14104
14105 @vindex nnbabyl-active-file
14106 @vindex nnbabyl-mbox-file
14107 The @dfn{nnbabyl} back end will use a babyl mail box (aka. @dfn{rmail
14108 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14109 mail article to say which group it belongs in.
14110
14111 Virtual server settings:
14112
14113 @table @code
14114 @item nnbabyl-mbox-file
14115 @vindex nnbabyl-mbox-file
14116 The name of the rmail mbox file.  The default is @file{~/RMAIL}
14117
14118 @item nnbabyl-active-file
14119 @vindex nnbabyl-active-file
14120 The name of the active file for the rmail box.  The default is
14121 @file{~/.rmail-active}
14122
14123 @item nnbabyl-get-new-mail
14124 @vindex nnbabyl-get-new-mail
14125 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14126 @code{t}
14127 @end table
14128
14129
14130 @node Mail Spool
14131 @subsubsection Mail Spool
14132 @cindex nnml
14133 @cindex mail @sc{nov} spool
14134
14135 The @dfn{nnml} spool mail format isn't compatible with any other known
14136 format.  It should be used with some caution.
14137
14138 @vindex nnml-directory
14139 If you use this back end, Gnus will split all incoming mail into files,
14140 one file for each mail, and put the articles into the corresponding
14141 directories under the directory specified by the @code{nnml-directory}
14142 variable.  The default value is @file{~/Mail/}.
14143
14144 You do not have to create any directories beforehand; Gnus will take
14145 care of all that.
14146
14147 If you have a strict limit as to how many files you are allowed to store
14148 in your account, you should not use this back end.  As each mail gets its
14149 own file, you might very well occupy thousands of inodes within a few
14150 weeks.  If this is no problem for you, and it isn't a problem for you
14151 having your friendly systems administrator walking around, madly,
14152 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14153 know that this is probably the fastest format to use.  You do not have
14154 to trudge through a big mbox file just to read your new mail.
14155
14156 @code{nnml} is probably the slowest back end when it comes to article
14157 splitting.  It has to create lots of files, and it also generates
14158 @sc{nov} databases for the incoming mails.  This makes it possibly the
14159 fastest back end when it comes to reading mail.
14160
14161 @cindex self contained nnml servers
14162 @cindex marks
14163 When the marks file is used (which it is by default), @code{nnml}
14164 servers have the property that you may backup them using @code{tar} or
14165 similar, and later be able to restore them into Gnus (by adding the
14166 proper @code{nnml} server) and have all your marks be preserved.  Marks
14167 for a group is usually stored in the @code{.marks} file (but see
14168 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14169 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14170 to restore the group (after restoring the backup into the nnml
14171 directory).
14172
14173 If for some reason you believe your @file{.marks} files are screwed
14174 up, you can just delete them all.  Gnus will then correctly regenerate
14175 them next time it starts.
14176
14177 Virtual server settings:
14178
14179 @table @code
14180 @item nnml-directory
14181 @vindex nnml-directory
14182 All @code{nnml} directories will be placed under this directory.
14183 The default is the value of `message-directory' (whose default value is
14184 @file{~/Mail}).
14185
14186 @item nnml-active-file
14187 @vindex nnml-active-file
14188 The active file for the @code{nnml} server.  The default is
14189 @file{~/Mail/active"}.
14190
14191 @item nnml-newsgroups-file
14192 @vindex nnml-newsgroups-file
14193 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14194 Format}.  The default is @file{~/Mail/newsgroups"}.
14195
14196 @item nnml-get-new-mail
14197 @vindex nnml-get-new-mail
14198 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14199 @code{t}.
14200
14201 @item nnml-nov-is-evil
14202 @vindex nnml-nov-is-evil
14203 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14204 default is @code{nil}.
14205
14206 @item nnml-nov-file-name
14207 @vindex nnml-nov-file-name
14208 The name of the @sc{nov} files.  The default is @file{.overview}.
14209
14210 @item nnml-prepare-save-mail-hook
14211 @vindex nnml-prepare-save-mail-hook
14212 Hook run narrowed to an article before saving.
14213
14214 @item nnml-marks-is-evil
14215 @vindex nnml-marks-is-evil
14216 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14217 default is @code{nil}.
14218
14219 @item nnml-marks-file-name
14220 @vindex nnml-marks-file-name
14221 The name of the @dfn{marks} files.  The default is @file{.marks}.
14222
14223 @item nnml-use-compressed-files
14224 @vindex nnml-use-compressed-files
14225 If non-@code{nil}, @code{nnml} will allow using compressed message
14226 files.
14227
14228 @end table
14229
14230 @findex nnml-generate-nov-databases
14231 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
14232 you can do a complete update by typing @kbd{M-x
14233 nnml-generate-nov-databases}.  This command will trawl through the
14234 entire @code{nnml} hierarchy, looking at each and every article, so it
14235 might take a while to complete.  A better interface to this
14236 functionality can be found in the server buffer (@pxref{Server
14237 Commands}).
14238
14239
14240 @node MH Spool
14241 @subsubsection MH Spool
14242 @cindex nnmh
14243 @cindex mh-e mail spool
14244
14245 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14246 @sc{nov} databases and it doesn't keep an active file or marks file.
14247 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14248 but it also makes it easier to write procmail scripts for.
14249
14250 Virtual server settings:
14251
14252 @table @code
14253 @item nnmh-directory
14254 @vindex nnmh-directory
14255 All @code{nnmh} directories will be located under this directory.  The
14256 default is the value of @code{message-directory} (whose default is
14257 @file{~/Mail})
14258
14259 @item nnmh-get-new-mail
14260 @vindex nnmh-get-new-mail
14261 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14262 @code{t}.
14263
14264 @item nnmh-be-safe
14265 @vindex nnmh-be-safe
14266 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14267 sure that the articles in the folder are actually what Gnus thinks they
14268 are.  It will check date stamps and stat everything in sight, so
14269 setting this to @code{t} will mean a serious slow-down.  If you never
14270 use anything but Gnus to read the @code{nnmh} articles, you do not have
14271 to set this variable to @code{t}.  The default is @code{nil}.
14272 @end table
14273
14274
14275 @node Mail Folders
14276 @subsubsection Mail Folders
14277 @cindex nnfolder
14278 @cindex mbox folders
14279 @cindex mail folders
14280
14281 @code{nnfolder} is a back end for storing each mail group in a separate
14282 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
14283 will add extra headers to keep track of article numbers and arrival
14284 dates.
14285
14286 @cindex self contained nnfolder servers
14287 @cindex marks
14288 When the marks file is used (which it is by default), @code{nnfolder}
14289 servers have the property that you may backup them using @code{tar} or
14290 similar, and later be able to restore them into Gnus (by adding the
14291 proper @code{nnfolder} server) and have all your marks be preserved.
14292 Marks for a group is usually stored in a file named as the mbox file
14293 with @code{.mrk} concatenated to it (but see
14294 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
14295 Individual @code{nnfolder} groups are also possible to backup, use
14296 @kbd{G m} to restore the group (after restoring the backup into the
14297 @code{nnfolder} directory).
14298
14299 Virtual server settings:
14300
14301 @table @code
14302 @item nnfolder-directory
14303 @vindex nnfolder-directory
14304 All the @code{nnfolder} mail boxes will be stored under this directory.
14305 The default is the value of @code{message-directory} (whose default is
14306 @file{~/Mail})
14307
14308 @item nnfolder-active-file
14309 @vindex nnfolder-active-file
14310 The name of the active file.  The default is @file{~/Mail/active}.
14311
14312 @item nnfolder-newsgroups-file
14313 @vindex nnfolder-newsgroups-file
14314 The name of the group descriptions file.  @xref{Newsgroups File
14315 Format}.  The default is @file{~/Mail/newsgroups"}
14316
14317 @item nnfolder-get-new-mail
14318 @vindex nnfolder-get-new-mail
14319 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
14320 is @code{t}
14321
14322 @item nnfolder-save-buffer-hook
14323 @vindex nnfolder-save-buffer-hook
14324 @cindex backup files
14325 Hook run before saving the folders.  Note that Emacs does the normal
14326 backup renaming of files even with the @code{nnfolder} buffers.  If you
14327 wish to switch this off, you could say something like the following in
14328 your @file{.emacs} file:
14329
14330 @lisp
14331 (defun turn-off-backup ()
14332   (set (make-local-variable 'backup-inhibited) t))
14333
14334 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
14335 @end lisp
14336
14337 @item nnfolder-delete-mail-hook
14338 @vindex nnfolder-delete-mail-hook
14339 Hook run in a buffer narrowed to the message that is to be deleted.
14340 This function can be used to copy the message to somewhere else, or to
14341 extract some information from it before removing it.
14342
14343 @item nnfolder-nov-is-evil
14344 @vindex nnfolder-nov-is-evil
14345 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14346 default is @code{nil}.
14347
14348 @item nnfolder-nov-file-suffix
14349 @vindex nnfolder-nov-file-suffix
14350 The extension for @sc{nov} files.  The default is @file{.nov}.
14351
14352 @item nnfolder-nov-directory
14353 @vindex nnfolder-nov-directory
14354 The directory where the @sc{nov} files should be stored.  If nil,
14355 @code{nnfolder-directory} is used.
14356
14357 @item nnfolder-marks-is-evil
14358 @vindex nnfolder-marks-is-evil
14359 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14360 default is @code{nil}.
14361
14362 @item nnfolder-marks-file-suffix
14363 @vindex nnfolder-marks-file-suffix
14364 The extension for @sc{marks} files.  The default is @file{.mrk}.
14365
14366 @item nnfolder-marks-directory
14367 @vindex nnfolder-marks-directory
14368 The directory where the @sc{marks} files should be stored.  If nil,
14369 @code{nnfolder-directory} is used.
14370
14371 @end table
14372
14373
14374 @findex nnfolder-generate-active-file
14375 @kindex M-x nnfolder-generate-active-file
14376 If you have lots of @code{nnfolder}-like files you'd like to read with
14377 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
14378 command to make @code{nnfolder} aware of all likely files in
14379 @code{nnfolder-directory}.  This only works if you use long file names,
14380 though.
14381
14382 @node Comparing Mail Back Ends
14383 @subsubsection Comparing Mail Back Ends
14384
14385 First, just for terminology, the @dfn{back end} is the common word for a
14386 low-level access method---a transport, if you will, by which something
14387 is acquired.  The sense is that one's mail has to come from somewhere,
14388 and so selection of a suitable back end is required in order to get that
14389 mail within spitting distance of Gnus.
14390
14391 The same concept exists for Usenet itself: Though access to articles is
14392 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
14393 in the world got at Usenet by running a reader on the machine where the
14394 articles lay (the machine which today we call an @sc{nntp} server), and
14395 access was by the reader stepping into the articles' directory spool
14396 area directly.  One can still select between either the @code{nntp} or
14397 @code{nnspool} back ends, to select between these methods, if one happens
14398 actually to live on the server (or can see its spool directly, anyway,
14399 via NFS).
14400
14401 The goal in selecting a mail back end is to pick one which
14402 simultaneously represents a suitable way of dealing with the original
14403 format plus leaving mail in a form that is convenient to use in the
14404 future.  Here are some high and low points on each:
14405
14406 @table @code
14407 @item nnmbox
14408
14409 UNIX systems have historically had a single, very common, and well-
14410 defined format.  All messages arrive in a single @dfn{spool file}, and
14411 they are delineated by a line whose regular expression matches
14412 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
14413 to make it clear in this instance that this is not the RFC-specified
14414 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
14415 historically from the Unix environment, it is simplest if one does not
14416 mess a great deal with the original mailbox format, so if one chooses
14417 this back end, Gnus' primary activity in getting mail from the real spool
14418 area to Gnus' preferred directory is simply to copy it, with no
14419 (appreciable) format change in the process.  It is the ``dumbest'' way
14420 to move mail into availability in the Gnus environment.  This makes it
14421 fast to move into place, but slow to parse, when Gnus has to look at
14422 what's where.
14423
14424 @item nnbabyl
14425
14426 Once upon a time, there was the DEC-10 and DEC-20, running operating
14427 systems called TOPS and related things, and the usual (only?) mail
14428 reading environment was a thing called Babyl.  I don't know what format
14429 was used for mail landing on the system, but Babyl had its own internal
14430 format to which mail was converted, primarily involving creating a
14431 spool-file-like entity with a scheme for inserting Babyl-specific
14432 headers and status bits above the top of each message in the file.
14433 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
14434 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
14435 to understand the mail files folks already had in existence.  Gnus (and
14436 VM, for that matter) continue to support this format because it's
14437 perceived as having some good qualities in those mailer-specific
14438 headers/status bits stuff.  RMAIL itself still exists as well, of
14439 course, and is still maintained by Stallman.
14440
14441 Both of the above forms leave your mail in a single file on your
14442 filesystem, and they must parse that entire file each time you take a
14443 look at your mail.
14444
14445 @item nnml
14446
14447 @code{nnml} is the back end which smells the most as though you were
14448 actually operating with an @code{nnspool}-accessed Usenet system.  (In
14449 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
14450 lo these years ago.)  One's mail is taken from the original spool file,
14451 and is then cut up into individual message files, 1:1.  It maintains a
14452 Usenet-style active file (analogous to what one finds in an INN- or
14453 CNews-based news system in (for instance) @file{/var/lib/news/active},
14454 or what is returned via the @samp{NNTP LIST} verb) and also creates
14455 @dfn{overview} files for efficient group entry, as has been defined for
14456 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
14457 due to the creation of lots of files, updates to the @code{nnml} active
14458 file, and additions to overview files on a per-message basis, but it is
14459 extremely fast on access because of what amounts to the indexing support
14460 provided by the active file and overviews.
14461
14462 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
14463 resource which defines available places in the filesystem to put new
14464 files.  Sysadmins take a dim view of heavy inode occupation within
14465 tight, shared filesystems.  But if you live on a personal machine where
14466 the filesystem is your own and space is not at a premium, @code{nnml}
14467 wins big.
14468
14469 It is also problematic using this back end if you are living in a
14470 FAT16-based Windows world, since much space will be wasted on all these
14471 tiny files.
14472
14473 @item nnmh
14474
14475 The Rand MH mail-reading system has been around UNIX systems for a very
14476 long time; it operates by splitting one's spool file of messages into
14477 individual files, but with little or no indexing support -- @code{nnmh}
14478 is considered to be semantically equivalent to ``@code{nnml} without
14479 active file or overviews''.  This is arguably the worst choice, because
14480 one gets the slowness of individual file creation married to the
14481 slowness of access parsing when learning what's new in one's groups.
14482
14483 @item nnfolder
14484
14485 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
14486 method described above) on a per-group basis.  That is, @code{nnmbox}
14487 itself puts *all* one's mail in one file; @code{nnfolder} provides a
14488 little bit of optimization to this so that each of one's mail groups has
14489 a Unix mail box file.  It's faster than @code{nnmbox} because each group
14490 can be parsed separately, and still provides the simple Unix mail box
14491 format requiring minimal effort in moving the mail around.  In addition,
14492 it maintains an ``active'' file making it much faster for Gnus to figure
14493 out how many messages there are in each separate group.
14494
14495 If you have groups that are expected to have a massive amount of
14496 messages, @code{nnfolder} is not the best choice, but if you receive
14497 only a moderate amount of mail, @code{nnfolder} is probably the most
14498 friendly mail back end all over.
14499
14500 @item nnmaildir
14501
14502 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
14503 differences.  Each message is stored in a separate file, but the
14504 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
14505 also stores the equivalent of @code{nnml}'s overview files in one file
14506 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
14507 @code{df -i} to see how plentiful your inode supply is.)  If this slows
14508 you down or takes up very much space, consider switching to ReiserFS
14509 (@uref{http://www.namesys.com/}) or another non-block-structured
14510 filesystem.
14511
14512 Since maildirs don't require locking for delivery, the maildirs you use
14513 as groups can also be the maildirs your mail is directly delivered to.
14514 This means you can skip Gnus's mail splitting if your mail is already
14515 organized into different mailboxes during delivery.  A @code{directory}
14516 entry in @code{mail-sources} would have a similar effect, but would
14517 require one set of mailboxes for spooling deliveries (in mbox format,
14518 thus damaging message bodies), and another set to be used as groups (in
14519 whatever format you like).  A maildir has a built-in spool, in the
14520 @code{new/} subdirectory.  Beware that currently, mail moved from
14521 @code{new/} to @code{cur/} instead of via mail splitting will undergo
14522 treatment such as duplicate checking.
14523
14524 An article will not necessarily keep the same number across Gnus
14525 sessions; articles are renumbered starting from 1 for each Gnus session
14526 (more precisely, each time you open the @code{nnmaildir} server).  This
14527 way, you don't get gaps in your article number ranges, and when entering
14528 large groups, Gnus is likely to give a more accurate article count.  The
14529 price is that @code{nnmaildir} doesn't work with the cache or agent.
14530 This will probably be changed in the future.
14531
14532 @code{nnmaildir} stores article marks for a given group in the
14533 corresponding maildir, in a way designed so that it's easy to manipulate
14534 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
14535 else, and still have your marks.  @code{nnml} also stores marks, but
14536 it's not as easy to work with them from outside Gnus as with
14537 @code{nnmaildir}.
14538
14539 For configuring expiry and other things, @code{nnmaildir} uses group
14540 parameters slightly different from those of other mail back ends.
14541
14542 @code{nnmaildir} uses a significant amount of memory to speed things up.
14543 (It keeps in memory some of the things that @code{nnml} stores in files
14544 and that @code{nnmh} repeatedly parses out of message files.)  If this
14545 is a problem for you, you can set the @code{nov-cache-size} group
14546 parameter to somthing small (0 would probably not work, but 1 probably
14547 would) to make it use less memory.
14548
14549 Startup and shutdown are likely to be slower with @code{nnmaildir} than
14550 with other back ends.  Everything in between is likely to be faster,
14551 depending in part on your filesystem.
14552
14553 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
14554 to write an @code{nnmaildir}-derived back end.
14555
14556 @end table
14557
14558
14559 @node Browsing the Web
14560 @section Browsing the Web
14561 @cindex web
14562 @cindex browsing the web
14563 @cindex www
14564 @cindex http
14565
14566 Web-based discussion forums are getting more and more popular.  On many
14567 subjects, the web-based forums have become the most important forums,
14568 eclipsing the importance of mailing lists and news groups.  The reason
14569 is easy to understand---they are friendly to new users; you just point
14570 and click, and there's the discussion.  With mailing lists, you have to
14571 go through a cumbersome subscription procedure, and most people don't
14572 even know what a news group is.
14573
14574 The problem with this scenario is that web browsers are not very good at
14575 being newsreaders.  They do not keep track of what articles you've read;
14576 they do not allow you to score on subjects you're interested in; they do
14577 not allow off-line browsing; they require you to click around and drive
14578 you mad in the end.
14579
14580 So---if web browsers suck at reading discussion forums, why not use Gnus
14581 to do it instead?
14582
14583 Gnus has been getting a bit of a collection of back ends for providing
14584 interfaces to these sources.
14585
14586 @menu
14587 * Archiving Mail::              
14588 * Web Searches::                Creating groups from articles that match a string.
14589 * Slashdot::                    Reading the Slashdot comments.
14590 * Ultimate::                    The Ultimate Bulletin Board systems.
14591 * Web Archive::                 Reading mailing list archived on web.
14592 * RSS::                         Reading RDF site summary.
14593 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
14594 @end menu
14595
14596 All the web sources require Emacs/w3 and the url library to work.
14597
14598 The main caveat with all these web sources is that they probably won't
14599 work for a very long time.  Gleaning information from the @sc{html} data
14600 is guesswork at best, and when the layout is altered, the Gnus back end
14601 will fail.  If you have reasonably new versions of these back ends,
14602 though, you should be ok.
14603
14604 One thing all these Web methods have in common is that the Web sources
14605 are often down, unavailable or just plain too slow to be fun.  In those
14606 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
14607 Unplugged}) handle downloading articles, and then you can read them at
14608 leisure from your local disk.  No more World Wide Wait for you.
14609
14610 @node Archiving Mail
14611 @subsection Archiving Mail
14612 @cindex archiving mail
14613 @cindex backup of mail
14614
14615 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
14616 @code{nnmaildir}, now actually store the article marks with each group.
14617 For these servers, archiving and restoring a group while preserving
14618 marks is fairly simple.
14619
14620 (Preserving the group level and group parameters as well still
14621 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
14622 though.)
14623
14624 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
14625 server, take a recursive copy of the server directory.  There is no need
14626 to shut down Gnus, so archiving may be invoked by @code{cron} or
14627 similar.  You restore the data by restoring the directory tree, and
14628 adding a server definition pointing to that directory in Gnus. The
14629 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
14630 might interfer with overwriting data, so you may want to shut down Gnus
14631 before you restore the data.
14632
14633 It is also possible to archive individual @code{nnml},
14634 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
14635 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
14636 directory.  For @code{nnfolder} you need to copy both the base folder
14637 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
14638 this example). Restoring the group is done with @kbd{G m} from the Group
14639 buffer.  The last step makes Gnus notice the new directory.
14640 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
14641 is unnecessary in that case.
14642
14643 @node Web Searches
14644 @subsection Web Searches
14645 @cindex nnweb
14646 @cindex Google
14647 @cindex dejanews
14648 @cindex gmane
14649 @cindex Usenet searches
14650 @cindex searching the Usenet
14651
14652 It's, like, too neat to search the Usenet for articles that match a
14653 string, but it, like, totally @emph{sucks}, like, totally, to use one of
14654 those, like, Web browsers, and you, like, have to, rilly, like, look at
14655 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
14656 searches without having to use a browser.
14657
14658 The @code{nnweb} back end allows an easy interface to the mighty search
14659 engine.  You create an @code{nnweb} group, enter a search pattern, and
14660 then enter the group and read the articles like you would any normal
14661 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
14662 Groups}) will do this in an easy-to-use fashion.
14663
14664 @code{nnweb} groups don't really lend themselves to being solid
14665 groups---they have a very fleeting idea of article numbers.  In fact,
14666 each time you enter an @code{nnweb} group (not even changing the search
14667 pattern), you are likely to get the articles ordered in a different
14668 manner.  Not even using duplicate suppression (@pxref{Duplicate
14669 Suppression}) will help, since @code{nnweb} doesn't even know the
14670 @code{Message-ID} of the articles before reading them using some search
14671 engines (Google, for instance).  The only possible way to keep track
14672 of which articles you've read is by scoring on the @code{Date}
14673 header---mark all articles posted before the last date you read the
14674 group as read.
14675
14676 If the search engine changes its output substantially, @code{nnweb}
14677 won't be able to parse it and will fail.  One could hardly fault the Web
14678 providers if they were to do this---their @emph{raison d'être} is to
14679 make money off of advertisements, not to provide services to the
14680 community.  Since @code{nnweb} washes the ads off all the articles, one
14681 might think that the providers might be somewhat miffed.  We'll see.
14682
14683 You must have the @code{url} and @code{w3} package installed to be able
14684 to use @code{nnweb}.
14685
14686 Virtual server variables:
14687
14688 @table @code
14689 @item nnweb-type
14690 @vindex nnweb-type
14691 What search engine type is being used.  The currently supported types
14692 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
14693 @code{dejanews} is an alias to @code{google}.
14694
14695 @item nnweb-search
14696 @vindex nnweb-search
14697 The search string to feed to the search engine.
14698
14699 @item nnweb-max-hits
14700 @vindex nnweb-max-hits
14701 Advisory maximum number of hits per search to display.  The default is
14702 999.
14703
14704 @item nnweb-type-definition
14705 @vindex nnweb-type-definition
14706 Type-to-definition alist.  This alist says what @code{nnweb} should do
14707 with the various search engine types.  The following elements must be
14708 present:
14709
14710 @table @code
14711 @item article
14712 Function to decode the article and provide something that Gnus
14713 understands.
14714
14715 @item map
14716 Function to create an article number to message header and URL alist.
14717
14718 @item search
14719 Function to send the search string to the search engine.
14720
14721 @item address
14722 The address the aforementioned function should send the search string
14723 to.
14724
14725 @item id
14726 Format string URL to fetch an article by @code{Message-ID}.
14727 @end table
14728
14729 @end table
14730
14731
14732 @node Slashdot
14733 @subsection Slashdot
14734 @cindex Slashdot
14735 @cindex nnslashdot
14736
14737 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
14738 lively discussion following the news articles.  @code{nnslashdot} will
14739 let you read this forum in a convenient manner.
14740
14741 The easiest way to read this source is to put something like the
14742 following in your @file{.gnus.el} file:
14743
14744 @lisp
14745 (setq gnus-secondary-select-methods
14746       '((nnslashdot "")))
14747 @end lisp
14748
14749 This will make Gnus query the @code{nnslashdot} back end for new comments
14750 and groups.  The @kbd{F} command will subscribe each new news article as
14751 a new Gnus group, and you can read the comments by entering these
14752 groups.  (Note that the default subscription method is to subscribe new
14753 groups as zombies.  Other methods are available (@pxref{Subscription
14754 Methods}).
14755
14756 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
14757 command is the most handy tool (@pxref{Foreign Groups}).
14758
14759 When following up to @code{nnslashdot} comments (or posting new
14760 comments), some light @sc{html}izations will be performed.  In
14761 particular, text quoted with @samp{> } will be quoted with
14762 @code{blockquote} instead, and signatures will have @code{br} added to
14763 the end of each line.  Other than that, you can just write @sc{html}
14764 directly into the message buffer.  Note that Slashdot filters out some
14765 @sc{html} forms.
14766
14767 The following variables can be altered to change its behavior:
14768
14769 @table @code
14770 @item nnslashdot-threaded
14771 Whether @code{nnslashdot} should display threaded groups or not.  The
14772 default is @code{t}.  To be able to display threads, @code{nnslashdot}
14773 has to retrieve absolutely all comments in a group upon entry.  If a
14774 threaded display is not required, @code{nnslashdot} will only retrieve
14775 the comments that are actually wanted by the user.  Threading is nicer,
14776 but much, much slower than untreaded.
14777
14778 @item nnslashdot-login-name
14779 @vindex nnslashdot-login-name
14780 The login name to use when posting.
14781
14782 @item nnslashdot-password
14783 @vindex nnslashdot-password
14784 The password to use when posting.
14785
14786 @item nnslashdot-directory
14787 @vindex nnslashdot-directory
14788 Where @code{nnslashdot} will store its files.  The default is
14789 @samp{~/News/slashdot/}.
14790
14791 @item nnslashdot-active-url
14792 @vindex nnslashdot-active-url
14793 The @sc{url} format string that will be used to fetch the information on
14794 news articles and comments.  The default is
14795 @samp{http://slashdot.org/search.pl?section=&min=%d}.
14796
14797 @item nnslashdot-comments-url
14798 @vindex nnslashdot-comments-url
14799 The @sc{url} format string that will be used to fetch comments.  The
14800 default is
14801 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
14802
14803 @item nnslashdot-article-url
14804 @vindex nnslashdot-article-url
14805 The @sc{url} format string that will be used to fetch the news article.  The
14806 default is
14807 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
14808
14809 @item nnslashdot-threshold
14810 @vindex nnslashdot-threshold
14811 The score threshold.  The default is -1.
14812
14813 @item nnslashdot-group-number
14814 @vindex nnslashdot-group-number
14815 The number of old groups, in addition to the ten latest, to keep
14816 updated.  The default is 0.
14817
14818 @end table
14819
14820
14821
14822 @node Ultimate
14823 @subsection Ultimate
14824 @cindex nnultimate
14825 @cindex Ultimate Bulletin Board
14826
14827 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
14828 probably the most popular Web bulletin board system used.  It has a
14829 quite regular and nice interface, and it's possible to get the
14830 information Gnus needs to keep groups updated.
14831
14832 The easiest way to get started with @code{nnultimate} is to say
14833 something like the following in the group buffer:  @kbd{B nnultimate RET
14834 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
14835 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
14836 you're interested in; there's quite a list of them on the Ultimate web
14837 site.)  Then subscribe to the groups you're interested in from the
14838 server buffer, and read them from the group buffer.
14839
14840 The following @code{nnultimate} variables can be altered:
14841
14842 @table @code
14843 @item nnultimate-directory
14844 @vindex nnultimate-directory
14845 The directory where @code{nnultimate} stores its files.  The default is
14846 @samp{~/News/ultimate/}.
14847 @end table
14848
14849
14850 @node Web Archive
14851 @subsection Web Archive
14852 @cindex nnwarchive
14853 @cindex Web Archive
14854
14855 Some mailing lists only have archives on Web servers, such as
14856 @uref{http://www.egroups.com/} and
14857 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
14858 interface, and it's possible to get the information Gnus needs to keep
14859 groups updated.
14860
14861 The easiest way to get started with @code{nnwarchive} is to say
14862 something like the following in the group buffer: @kbd{M-x
14863 gnus-group-make-warchive-group RET an_egroup RET egroups RET
14864 www.egroups.com RET your@@email.address RET}.  (Substitute the
14865 @sc{an_egroup} with the mailing list you subscribed, the
14866 @sc{your@@email.address} with your email address.), or to browse the
14867 back end by @kbd{B nnwarchive RET mail-archive RET}.
14868
14869 The following @code{nnwarchive} variables can be altered:
14870
14871 @table @code
14872 @item nnwarchive-directory
14873 @vindex nnwarchive-directory
14874 The directory where @code{nnwarchive} stores its files.  The default is
14875 @samp{~/News/warchive/}.
14876
14877 @item nnwarchive-login
14878 @vindex nnwarchive-login
14879 The account name on the web server.
14880
14881 @item nnwarchive-passwd
14882 @vindex nnwarchive-passwd
14883 The password for your account on the web server.
14884 @end table
14885
14886 @node RSS
14887 @subsection RSS
14888 @cindex nnrss
14889 @cindex RSS
14890
14891 Some sites have RDF site summary (RSS)
14892 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
14893 interface, and it's possible to get the information Gnus needs to keep
14894 groups updated.
14895
14896 The easiest way to get started with @code{nnrss} is to say something
14897 like the following in the group buffer: @kbd{B nnrss RET RET}, then
14898 subscribe groups.
14899
14900 The following @code{nnrss} variables can be altered:
14901
14902 @table @code
14903 @item nnrss-directory
14904 @vindex nnrss-directory
14905 The directory where @code{nnrss} stores its files.  The default is
14906 @samp{~/News/rss/}.
14907
14908 @end table
14909
14910 The following code may be helpful, if you want to show the description in
14911 the summary buffer.
14912
14913 @lisp
14914 (add-to-list 'nnmail-extra-headers nnrss-description-field)
14915 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
14916
14917 (defun gnus-user-format-function-X (header)
14918   (let ((descr
14919          (assq nnrss-description-field (mail-header-extra header))))
14920     (if descr (concat "\n\t" (cdr descr)) "")))
14921 @end lisp
14922
14923 The following code may be useful to open an nnrss url directly from the
14924 summary buffer.
14925 @lisp
14926 (require 'browse-url)
14927
14928 (defun browse-nnrss-url( arg )
14929   (interactive "p")
14930   (let ((url (assq nnrss-url-field
14931                    (mail-header-extra
14932                     (gnus-data-header
14933                      (assq (gnus-summary-article-number)
14934                            gnus-newsgroup-data))))))
14935     (if url
14936         (progn
14937           (browse-url (cdr url))
14938           (gnus-summary-mark-as-read-forward 1))
14939       (gnus-summary-scroll-up arg))))
14940
14941 (eval-after-load "gnus"
14942   #'(define-key gnus-summary-mode-map
14943       (kbd "<RET>") 'browse-nnrss-url))
14944 (add-to-list 'nnmail-extra-headers nnrss-url-field)
14945 @end lisp
14946
14947 @node Customizing w3
14948 @subsection Customizing w3
14949 @cindex w3
14950 @cindex html
14951 @cindex url
14952 @cindex Netscape
14953
14954 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
14955 pages.  Emacs/w3 is documented in its own manual, but there are some
14956 things that may be more relevant for Gnus users.
14957
14958 For instance, a common question is how to make Emacs/w3 follow links
14959 using the @code{browse-url} functions (which will call some external web
14960 browser like Netscape).  Here's one way:
14961
14962 @lisp
14963 (eval-after-load "w3"
14964   '(progn
14965     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
14966     (defun w3-fetch (&optional url target)
14967       (interactive (list (w3-read-url-with-default)))
14968       (if (eq major-mode 'gnus-article-mode)
14969           (browse-url url)
14970         (w3-fetch-orig url target)))))
14971 @end lisp
14972
14973 Put that in your @file{.emacs} file, and hitting links in w3-rendered
14974 @sc{html} in the Gnus article buffers will use @code{browse-url} to
14975 follow the link.
14976
14977
14978 @node IMAP
14979 @section IMAP
14980 @cindex nnimap
14981 @cindex @sc{imap}
14982
14983 @sc{imap} is a network protocol for reading mail (or news, or ...),
14984 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
14985 server is much similar to connecting to a news server, you just
14986 specify the network address of the server.
14987
14988 @sc{imap} has two properties.  First, @sc{imap} can do everything that
14989 POP can, it can hence be viewed as a POP++.  Secondly, @sc{imap} is a
14990 mail storage protocol, similar to @sc{nntp} being a news storage
14991 protocol -- however, @sc{imap} offers more features than @sc{nntp}
14992 because news is more or less read-only whereas mail is read-write.
14993
14994 If you want to use @sc{imap} as a POP++, use an imap entry in
14995 @code{mail-sources}.  With this, Gnus will fetch mails from the
14996 @sc{imap} server and store them on the local disk.  This is not the
14997 usage described in this section--@xref{Mail Sources}.
14998
14999 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
15000 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15001 manipulate mails stored on the @sc{imap} server.  This is the kind of
15002 usage explained in this section.
15003
15004 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
15005 might look something like the following. (Note that for SSL/TLS, you
15006 need external programs and libraries, see below.)
15007
15008 @lisp
15009 (setq gnus-secondary-select-methods
15010       '((nnimap "simpleserver") ; no special configuration
15011         ; perhaps a ssh port forwarded server:
15012         (nnimap "dolk"
15013                 (nnimap-address "localhost")
15014                 (nnimap-server-port 1430))
15015         ; a UW server running on localhost
15016         (nnimap "barbar"
15017                 (nnimap-server-port 143)
15018                 (nnimap-address "localhost")
15019                 (nnimap-list-pattern ("INBOX" "mail/*")))
15020         ; anonymous public cyrus server:
15021         (nnimap "cyrus.andrew.cmu.edu"
15022                 (nnimap-authenticator anonymous)
15023                 (nnimap-list-pattern "archive.*")
15024                 (nnimap-stream network))
15025         ; a ssl server on a non-standard port:
15026         (nnimap "vic20"
15027                 (nnimap-address "vic20.somewhere.com")
15028                 (nnimap-server-port 9930)
15029                 (nnimap-stream ssl))))
15030 @end lisp
15031
15032 The following variables can be used to create a virtual @code{nnimap}
15033 server:
15034
15035 @table @code
15036
15037 @item nnimap-address
15038 @vindex nnimap-address
15039
15040 The address of the remote @sc{imap} server.  Defaults to the virtual
15041 server name if not specified.
15042
15043 @item nnimap-server-port
15044 @vindex nnimap-server-port
15045 Port on server to contact.  Defaults to port 143, or 993 for SSL.
15046
15047 Note that this should be an integer, example server specification:
15048
15049 @lisp
15050 (nnimap "mail.server.com"
15051         (nnimap-server-port 4711))
15052 @end lisp
15053
15054 @item nnimap-list-pattern
15055 @vindex nnimap-list-pattern
15056 String or list of strings of mailboxes to limit available groups to.
15057 This is used when the server has very many mailboxes and you're only
15058 interested in a few -- some servers export your home directory via
15059 @sc{imap}, you'll probably want to limit the mailboxes to those in
15060 @file{~/Mail/*} then.
15061
15062 The string can also be a cons of REFERENCE and the string as above, what
15063 REFERENCE is used for is server specific, but on the University of
15064 Washington server it's a directory that will be concatenated with the
15065 mailbox.
15066
15067 Example server specification:
15068
15069 @lisp
15070 (nnimap "mail.server.com"
15071         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15072                                ("~friend/Mail/" . "list/*"))))
15073 @end lisp
15074
15075 @item nnimap-stream
15076 @vindex nnimap-stream
15077 The type of stream used to connect to your server.  By default, nnimap
15078 will detect and automatically use all of the below, with the exception
15079 of SSL/TLS. (@sc{imap} over SSL/TLS is being replaced by STARTTLS, which
15080 can be automatically detected, but it's not widely deployed yet.)
15081
15082 Example server specification:
15083
15084 @lisp
15085 (nnimap "mail.server.com"
15086         (nnimap-stream ssl))
15087 @end lisp
15088
15089 Please note that the value of @code{nnimap-stream} is a symbol!
15090
15091 @itemize @bullet
15092 @item
15093 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15094 @samp{imtest} program.
15095 @item
15096 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15097 @item
15098 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15099 SSL).  Requires the external library @samp{starttls.el} and program
15100 @samp{starttls}.
15101 @item
15102 @dfn{ssl:} Connect through SSL.  Requires OpenSSL (the program
15103 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
15104 library @samp{ssl.el}.
15105 @item
15106 @dfn{shell:} Use a shell command to start @sc{imap} connection.
15107 @item
15108 @dfn{network:} Plain, TCP/IP network connection.
15109 @end itemize
15110
15111 @vindex imap-kerberos4-program
15112 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15113 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15114 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15115 to make @code{imap.el} use a pty instead of a pipe when communicating
15116 with @samp{imtest}.  You will then suffer from a line length
15117 restrictions on @sc{imap} commands, which might make Gnus seem to hang
15118 indefinitely if you have many articles in a mailbox.  The variable
15119 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15120 program.
15121
15122 @vindex imap-ssl-program
15123 For SSL connections, the OpenSSL program is available from
15124 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15125 and nnimap support it too - altough the most recent versions of
15126 SSLeay, 0.9.x, are known to have serious bugs making it
15127 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15128 work. The variable @code{imap-ssl-program} contain parameters to pass
15129 to OpenSSL/SSLeay.  You also need @samp{ssl.el} (from the W3
15130 distribution, for instance).
15131
15132 @vindex imap-shell-program
15133 @vindex imap-shell-host
15134 For @sc{imap} connections using the @code{shell} stream, the variable
15135 @code{imap-shell-program} specify what program to call.
15136
15137 @item nnimap-authenticator
15138 @vindex nnimap-authenticator
15139
15140 The authenticator used to connect to the server.  By default, nnimap
15141 will use the most secure authenticator your server is capable of.
15142
15143 Example server specification:
15144
15145 @lisp
15146 (nnimap "mail.server.com"
15147         (nnimap-authenticator anonymous))
15148 @end lisp
15149
15150 Please note that the value of @code{nnimap-authenticator} is a symbol!
15151
15152 @itemize @bullet
15153 @item
15154 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15155 external program @code{imtest}.
15156 @item
15157 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15158 @code{imtest}.
15159 @item
15160 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15161 external library @code{digest-md5.el}.
15162 @item
15163 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15164 @item
15165 @dfn{login:} Plain-text username/password via LOGIN.
15166 @item
15167 @dfn{anonymous:} Login as `anonymous', supplying your emailadress as password.
15168 @end itemize
15169
15170 @item nnimap-expunge-on-close
15171 @cindex Expunging
15172 @vindex nnimap-expunge-on-close
15173 Unlike Parmenides the @sc{imap} designers has decided that things that
15174 doesn't exist actually does exist.  More specifically, @sc{imap} has
15175 this concept of marking articles @code{Deleted} which doesn't actually
15176 delete them, and this (marking them @code{Deleted}, that is) is what
15177 nnimap does when you delete a article in Gnus (with @kbd{B DEL} or
15178 similar).
15179
15180 Since the articles aren't really removed when we mark them with the
15181 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15182 running in circles yet?
15183
15184 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15185 when closing a mailbox but this is now configurable by this server
15186 variable.
15187
15188 The possible options are:
15189
15190 @table @code
15191
15192 @item always
15193 The default behavior, delete all articles marked as "Deleted" when
15194 closing a mailbox.
15195 @item never
15196 Never actually delete articles.  Currently there is no way of showing
15197 the articles marked for deletion in nnimap, but other @sc{imap} clients
15198 may allow you to do this.  If you ever want to run the EXPUNGE command
15199 manually, @xref{Expunging mailboxes}.
15200 @item ask
15201 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15202 articles or not.
15203
15204 @end table
15205
15206 @item nnimap-importantize-dormant
15207 @vindex nnimap-importantize-dormant
15208
15209 If non-nil (the default), marks dormant articles as ticked (as well),
15210 for other @sc{imap} clients. Within Gnus, dormant articles will
15211 naturally still (only) be marked as dormant.  This is to make dormant
15212 articles stand out, just like ticked articles, in other @sc{imap}
15213 clients. (In other words, Gnus has two ``Tick'' marks and @sc{imap}
15214 has only one.)
15215
15216 Probably the only reason for frobing this would be if you're trying
15217 enable per-user persistant dormant flags, using something like:
15218
15219 @lisp
15220 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15221         (format "gnus-dormant-%s" (user-login-name)))
15222 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
15223         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
15224 @end lisp
15225
15226 In this case, you would not want the per-user dormant flag showing up
15227 as ticked for other users.
15228
15229 @item nnimap-expunge-search-string
15230 @cindex Expunging
15231 @vindex nnimap-expunge-search-string
15232
15233 This variable contain the @sc{imap} search command sent to server when
15234 searching for articles eligible for expiring.  The default is
15235 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
15236 UID set and the second @code{%s} is replaced by a date.
15237
15238 Probably the only useful value to change this to is
15239 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
15240 messages instead of the internal article date. See section 6.4.4 of
15241 RFC 2060 for more information on valid strings.
15242
15243 @item nnimap-authinfo-file
15244 @vindex nnimap-authinfo-file
15245
15246 A file containing credentials used to log in on servers.  The format is
15247 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
15248 variable @code{nntp-authinfo-file} for exact syntax; also see
15249 @ref{NNTP}.
15250
15251 @end table
15252
15253 @menu
15254 * Splitting in IMAP::           Splitting mail with nnimap.
15255 * Expiring in IMAP::            Expiring mail with nnimap.
15256 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
15257 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
15258 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
15259 @end menu
15260
15261
15262
15263 @node Splitting in IMAP
15264 @subsection Splitting in IMAP
15265 @cindex splitting imap mail
15266
15267 Splitting is something Gnus users has loved and used for years, and now
15268 the rest of the world is catching up.  Yeah, dream on, not many
15269 @sc{imap} server has server side splitting and those that have splitting
15270 seem to use some non-standard protocol.  This means that @sc{imap}
15271 support for Gnus has to do it's own splitting.
15272
15273 And it does.
15274
15275 Here are the variables of interest:
15276
15277 @table @code
15278
15279 @item nnimap-split-crosspost
15280 @cindex splitting, crosspost
15281 @cindex crosspost
15282 @vindex nnimap-split-crosspost
15283
15284 If non-nil, do crossposting if several split methods match the mail.  If
15285 nil, the first match in @code{nnimap-split-rule} found will be used.
15286
15287 Nnmail equivalent: @code{nnmail-crosspost}.
15288
15289 @item nnimap-split-inbox
15290 @cindex splitting, inbox
15291 @cindex inbox
15292 @vindex nnimap-split-inbox
15293
15294 A string or a list of strings that gives the name(s) of @sc{imap}
15295 mailboxes to split from.  Defaults to nil, which means that splitting is
15296 disabled!
15297
15298 @lisp
15299 (setq nnimap-split-inbox
15300       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
15301 @end lisp
15302
15303 No nnmail equivalent.
15304
15305 @item nnimap-split-rule
15306 @cindex Splitting, rules
15307 @vindex nnimap-split-rule
15308
15309 New mail found in @code{nnimap-split-inbox} will be split according to
15310 this variable.
15311
15312 This variable contains a list of lists, where the first element in the
15313 sublist gives the name of the @sc{imap} mailbox to move articles
15314 matching the regexp in the second element in the sublist.  Got that?
15315 Neither did I, we need examples.
15316
15317 @lisp
15318 (setq nnimap-split-rule
15319       '(("INBOX.nnimap"
15320          "^Sender: owner-nnimap@@vic20.globalcom.se")
15321         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
15322         ("INBOX.private" "")))
15323 @end lisp
15324
15325 This will put all articles from the nnimap mailing list into mailbox
15326 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
15327 into INBOX.junk and everything else in INBOX.private.
15328
15329 The first string may contain `\\1' forms, like the ones used by
15330 replace-match to insert sub-expressions from the matched text.  For
15331 instance:
15332
15333 @lisp
15334 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
15335 @end lisp
15336
15337 The first element can also be the symbol @code{junk} to indicate that
15338 matching messages should simply be deleted.  Use with care.
15339
15340 The second element can also be a function.  In that case, it will be
15341 called with the first element of the rule as the argument, in a buffer
15342 containing the headers of the article.  It should return a non-nil value
15343 if it thinks that the mail belongs in that group.
15344
15345 Nnmail users might recollect that the last regexp had to be empty to
15346 match all articles (like in the example above).  This is not required in
15347 nnimap.  Articles not matching any of the regexps will not be moved out
15348 of your inbox.  (This might affect performance if you keep lots of
15349 unread articles in your inbox, since the splitting code would go over
15350 them every time you fetch new mail.)
15351
15352 These rules are processed from the beginning of the alist toward the
15353 end.  The first rule to make a match will "win", unless you have
15354 crossposting enabled.  In that case, all matching rules will "win".
15355
15356 This variable can also have a function as its value, the function will
15357 be called with the headers narrowed and should return a group where it
15358 thinks the article should be split to.  See @code{nnimap-split-fancy}.
15359
15360 The splitting code tries to create mailboxes if it needs to.
15361
15362 To allow for different split rules on different virtual servers, and
15363 even different split rules in different inboxes on the same server,
15364 the syntax of this variable have been extended along the lines of:
15365
15366 @lisp
15367 (setq nnimap-split-rule
15368       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
15369                                   ("junk"    "From:.*Simon")))
15370         ("my2server"    ("INBOX" nnimap-split-fancy))
15371         ("my[34]server" (".*"    (("private" "To:.*Simon")
15372                                   ("junk"    my-junk-func)))))
15373 @end lisp
15374
15375 The virtual server name is in fact a regexp, so that the same rules
15376 may apply to several servers.  In the example, the servers
15377 @code{my3server} and @code{my4server} both use the same rules.
15378 Similarly, the inbox string is also a regexp.  The actual splitting
15379 rules are as before, either a function, or a list with group/regexp or
15380 group/function elements.
15381
15382 Nnmail equivalent: @code{nnmail-split-methods}.
15383
15384 @item nnimap-split-predicate
15385 @cindex splitting
15386 @vindex nnimap-split-predicate
15387
15388 Mail matching this predicate in @code{nnimap-split-inbox} will be
15389 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
15390
15391 This might be useful if you use another @sc{imap} client to read mail in
15392 your inbox but would like Gnus to split all articles in the inbox
15393 regardless of readedness. Then you might change this to
15394 @samp{UNDELETED}.
15395
15396 @item nnimap-split-fancy
15397 @cindex splitting, fancy
15398 @findex nnimap-split-fancy
15399 @vindex nnimap-split-fancy
15400
15401 It's possible to set @code{nnimap-split-rule} to
15402 @code{nnmail-split-fancy} if you want to use fancy
15403 splitting. @xref{Fancy Mail Splitting}.
15404
15405 However, to be able to have different fancy split rules for nnmail and
15406 nnimap back ends you can set @code{nnimap-split-rule} to
15407 @code{nnimap-split-fancy} and define the nnimap specific fancy split
15408 rule in @code{nnimap-split-fancy}.
15409
15410 Example:
15411
15412 @lisp
15413 (setq nnimap-split-rule 'nnimap-split-fancy
15414       nnimap-split-fancy ...)
15415 @end lisp
15416
15417 Nnmail equivalent: @code{nnmail-split-fancy}.
15418
15419 @end table
15420
15421 @node Expiring in IMAP
15422 @subsection Expiring in IMAP
15423 @cindex expiring imap mail
15424
15425 Even though @sc{nnimap} is not a proper @sc{nnmail} derived back end,
15426 it supports most features in regular expiring (@pxref{Expiring Mail}).
15427 Unlike splitting in IMAP (@pxref{Splitting in IMAP}) it do not clone
15428 the @sc{nnmail} variables (i.e., creating @var{nnimap-expiry-wait})
15429 but reuse the @sc{nnmail} variables.  What follows below are the
15430 variables used by the @sc{nnimap} expiry process.
15431
15432 A note on how the expire mark is stored on the @sc{imap} server is
15433 appropriate here as well.  The expire mark is translated into a
15434 @sc{imap} client specific mark, @code{gnus-expire}, and stored on the
15435 message.  This means that likely only Gnus will understand and treat
15436 the @code{gnus-expire} mark properly, although other clients may allow
15437 you to view client specific flags on the message.  It also means that
15438 your server must support permanent storage of client specific flags on
15439 messages.  Most do, fortunately.
15440
15441 @table @code
15442
15443 @item nnmail-expiry-wait
15444 @item nnmail-expiry-wait-function
15445
15446 These variables are fully supported.  The expire value can be a
15447 number, the symbol @var{immediate} or @var{never}.
15448
15449 @item nnmail-expiry-target
15450
15451 This variable is supported, and internally implemented by calling the
15452 @sc{nnmail} functions that handle this.  It contains an optimization
15453 that if the destination is a IMAP group on the same server, the
15454 article is copied instead of appended (that is, uploaded again).
15455
15456 @end table
15457
15458 @node Editing IMAP ACLs
15459 @subsection Editing IMAP ACLs
15460 @cindex editing imap acls
15461 @cindex Access Control Lists
15462 @cindex Editing @sc{imap} ACLs
15463 @kindex G l
15464 @findex gnus-group-nnimap-edit-acl
15465
15466 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
15467 limiting (or enabling) other users access to your mail boxes.  Not all
15468 @sc{imap} servers support this, this function will give an error if it
15469 doesn't.
15470
15471 To edit a ACL for a mailbox, type @kbd{G l}
15472 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
15473 editing window with detailed instructions.
15474
15475 Some possible uses:
15476
15477 @itemize @bullet
15478 @item
15479 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
15480 on your mailing list mailboxes enables other users on the same server to
15481 follow the list without subscribing to it.
15482 @item
15483 At least with the Cyrus server, you are required to give the user
15484 "anyone" posting ("p") capabilities to have "plussing" work (that is,
15485 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
15486 INBOX.mailbox).
15487 @end itemize
15488
15489 @node Expunging mailboxes
15490 @subsection Expunging mailboxes
15491 @cindex expunging
15492
15493 @cindex Expunge
15494 @cindex Manual expunging
15495 @kindex G x
15496 @findex gnus-group-nnimap-expunge
15497
15498 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
15499 you may want the option of expunging all deleted articles in a mailbox
15500 manually.  This is exactly what @kbd{G x} does.
15501
15502 Currently there is no way of showing deleted articles, you can just
15503 delete them.
15504
15505 @node A note on namespaces
15506 @subsection A note on namespaces
15507 @cindex IMAP namespace
15508 @cindex namespaces
15509
15510 The IMAP protocol has a concept called namespaces, described by the
15511 following text in the RFC:
15512
15513 @example
15514 5.1.2.  Mailbox Namespace Naming Convention
15515
15516    By convention, the first hierarchical element of any mailbox name
15517    which begins with "#" identifies the "namespace" of the remainder of
15518    the name.  This makes it possible to disambiguate between different
15519    types of mailbox stores, each of which have their own namespaces.
15520
15521       For example, implementations which offer access to USENET
15522       newsgroups MAY use the "#news" namespace to partition the USENET
15523       newsgroup namespace from that of other mailboxes.  Thus, the
15524       comp.mail.misc newsgroup would have an mailbox name of
15525       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
15526       to a different object (e.g. a user's private mailbox).
15527 @end example
15528
15529 While there is nothing in this text that warrants concern for the IMAP
15530 implementation in Gnus, some servers use namespace prefixes in a way
15531 that does not work with how Gnus uses mailbox names.
15532
15533 Specifically, University of Washington's IMAP server uses mailbox
15534 names like @code{#driver.mbx/read-mail} which are valid only in the
15535 @sc{create} and @sc{append} commands.  After the mailbox is created
15536 (or a messages is appended to a mailbox), it must be accessed without
15537 the namespace prefix, i.e @code{read-mail}.  Since Gnus do not make it
15538 possible for the user to guarantee that user entered mailbox names
15539 will only be used with the CREATE and APPEND commands, you should
15540 simply not use the namespace prefixed mailbox names in Gnus.
15541
15542 See the UoW @sc{imapd} documentation for the @code{#driver.*/} prefix
15543 for more information on how to use the prefixes.  They are a power
15544 tool and should be used only if you are sure what the effects are.
15545
15546 @node Other Sources
15547 @section Other Sources
15548
15549 Gnus can do more than just read news or mail.  The methods described
15550 below allow Gnus to view directories and files as if they were
15551 newsgroups.
15552
15553 @menu
15554 * Directory Groups::            You can read a directory as if it was a newsgroup.
15555 * Anything Groups::             Dired?  Who needs dired?
15556 * Document Groups::             Single files can be the basis of a group.
15557 * SOUP::                        Reading @sc{soup} packets ``offline''.
15558 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
15559 @end menu
15560
15561
15562 @node Directory Groups
15563 @subsection Directory Groups
15564 @cindex nndir
15565 @cindex directory groups
15566
15567 If you have a directory that has lots of articles in separate files in
15568 it, you might treat it as a newsgroup.  The files have to have numerical
15569 names, of course.
15570
15571 This might be an opportune moment to mention @code{ange-ftp} (and its
15572 successor @code{efs}), that most wonderful of all wonderful Emacs
15573 packages.  When I wrote @code{nndir}, I didn't think much about it---a
15574 back end to read directories.  Big deal.
15575
15576 @code{ange-ftp} changes that picture dramatically.  For instance, if you
15577 enter the @code{ange-ftp} file name
15578 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
15579 @code{ange-ftp} or @code{efs} will actually allow you to read this
15580 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
15581
15582 @code{nndir} will use @sc{nov} files if they are present.
15583
15584 @code{nndir} is a ``read-only'' back end---you can't delete or expire
15585 articles with this method.  You can use @code{nnmh} or @code{nnml} for
15586 whatever you use @code{nndir} for, so you could switch to any of those
15587 methods if you feel the need to have a non-read-only @code{nndir}.
15588
15589
15590 @node Anything Groups
15591 @subsection Anything Groups
15592 @cindex nneething
15593
15594 From the @code{nndir} back end (which reads a single spool-like
15595 directory), it's just a hop and a skip to @code{nneething}, which
15596 pretends that any arbitrary directory is a newsgroup.  Strange, but
15597 true.
15598
15599 When @code{nneething} is presented with a directory, it will scan this
15600 directory and assign article numbers to each file.  When you enter such
15601 a group, @code{nneething} must create ``headers'' that Gnus can use.
15602 After all, Gnus is a newsreader, in case you're forgetting.
15603 @code{nneething} does this in a two-step process.  First, it snoops each
15604 file in question.  If the file looks like an article (i.e., the first
15605 few lines look like headers), it will use this as the head.  If this is
15606 just some arbitrary file without a head (e.g. a C source file),
15607 @code{nneething} will cobble up a header out of thin air.  It will use
15608 file ownership, name and date and do whatever it can with these
15609 elements.
15610
15611 All this should happen automatically for you, and you will be presented
15612 with something that looks very much like a newsgroup.  Totally like a
15613 newsgroup, to be precise.  If you select an article, it will be displayed
15614 in the article buffer, just as usual.
15615
15616 If you select a line that represents a directory, Gnus will pop you into
15617 a new summary buffer for this @code{nneething} group.  And so on.  You can
15618 traverse the entire disk this way, if you feel like, but remember that
15619 Gnus is not dired, really, and does not intend to be, either.
15620
15621 There are two overall modes to this action---ephemeral or solid.  When
15622 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
15623 will not store information on what files you have read, and what files
15624 are new, and so on.  If you create a solid @code{nneething} group the
15625 normal way with @kbd{G m}, Gnus will store a mapping table between
15626 article numbers and file names, and you can treat this group like any
15627 other groups.  When you activate a solid @code{nneething} group, you will
15628 be told how many unread articles it contains, etc., etc.
15629
15630 Some variables:
15631
15632 @table @code
15633 @item nneething-map-file-directory
15634 @vindex nneething-map-file-directory
15635 All the mapping files for solid @code{nneething} groups will be stored
15636 in this directory, which defaults to @file{~/.nneething/}.
15637
15638 @item nneething-exclude-files
15639 @vindex nneething-exclude-files
15640 All files that match this regexp will be ignored.  Nice to use to exclude
15641 auto-save files and the like, which is what it does by default.
15642
15643 @item nneething-include-files
15644 @vindex nneething-include-files
15645 Regexp saying what files to include in the group.  If this variable is
15646 non-@code{nil}, only files matching this regexp will be included.
15647
15648 @item nneething-map-file
15649 @vindex nneething-map-file
15650 Name of the map files.
15651 @end table
15652
15653
15654 @node Document Groups
15655 @subsection Document Groups
15656 @cindex nndoc
15657 @cindex documentation group
15658 @cindex help group
15659
15660 @code{nndoc} is a cute little thing that will let you read a single file
15661 as a newsgroup.  Several files types are supported:
15662
15663 @table @code
15664 @cindex babyl
15665 @cindex rmail mbox
15666
15667 @item babyl
15668 The babyl (rmail) mail box.
15669 @cindex mbox
15670 @cindex Unix mbox
15671
15672 @item mbox
15673 The standard Unix mbox file.
15674
15675 @cindex MMDF mail box
15676 @item mmdf
15677 The MMDF mail box format.
15678
15679 @item news
15680 Several news articles appended into a file.
15681
15682 @item rnews
15683 @cindex rnews batch files
15684 The rnews batch transport format.
15685 @cindex forwarded messages
15686
15687 @item forward
15688 Forwarded articles.
15689
15690 @item nsmail
15691 Netscape mail boxes.
15692
15693 @item mime-parts
15694 @sc{mime} multipart messages.
15695
15696 @item standard-digest
15697 The standard (RFC 1153) digest format.
15698
15699 @item mime-digest
15700 A @sc{mime} digest of messages.
15701
15702 @item lanl-gov-announce
15703 Announcement messages from LANL Gov Announce.
15704
15705 @item rfc822-forward
15706 A message forwarded according to RFC822.
15707
15708 @item outlook
15709 The Outlook mail box.
15710
15711 @item oe-dbx
15712 The Outlook Express dbx mail box.
15713
15714 @item exim-bounce
15715 A bounce message from the Exim MTA.
15716
15717 @item forward
15718 A message forwarded according to informal rules.
15719
15720 @item rfc934
15721 An RFC934-forwarded message.
15722
15723 @item mailman
15724 A mailman digest.
15725
15726 @item clari-briefs
15727 A digest of Clarinet brief news items.
15728
15729 @item slack-digest
15730 Non-standard digest format---matches most things, but does it badly.
15731
15732 @item mail-in-mail
15733 The last resort.
15734 @end table
15735
15736 You can also use the special ``file type'' @code{guess}, which means
15737 that @code{nndoc} will try to guess what file type it is looking at.
15738 @code{digest} means that @code{nndoc} should guess what digest type the
15739 file is.
15740
15741 @code{nndoc} will not try to change the file or insert any extra headers into
15742 it---it will simply, like, let you use the file as the basis for a
15743 group.  And that's it.
15744
15745 If you have some old archived articles that you want to insert into your
15746 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
15747 that.  Say you have an old @file{RMAIL} file with mail that you now want
15748 to split into your new @code{nnml} groups.  You look at that file using
15749 @code{nndoc} (using the @kbd{G f} command in the group buffer
15750 (@pxref{Foreign Groups})), set the process mark on all the articles in
15751 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
15752 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
15753 file is now also stored in lots of @code{nnml} directories, and you can
15754 delete that pesky @file{RMAIL} file.  If you have the guts!
15755
15756 Virtual server variables:
15757
15758 @table @code
15759 @item nndoc-article-type
15760 @vindex nndoc-article-type
15761 This should be one of @code{mbox}, @code{babyl}, @code{digest},
15762 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
15763 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
15764 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
15765 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
15766
15767 @item nndoc-post-type
15768 @vindex nndoc-post-type
15769 This variable says whether Gnus is to consider the group a news group or
15770 a mail group.  There are two valid values:  @code{mail} (the default)
15771 and @code{news}.
15772 @end table
15773
15774 @menu
15775 * Document Server Internals::   How to add your own document types.
15776 @end menu
15777
15778
15779 @node Document Server Internals
15780 @subsubsection Document Server Internals
15781
15782 Adding new document types to be recognized by @code{nndoc} isn't
15783 difficult.  You just have to whip up a definition of what the document
15784 looks like, write a predicate function to recognize that document type,
15785 and then hook into @code{nndoc}.
15786
15787 First, here's an example document type definition:
15788
15789 @example
15790 (mmdf
15791  (article-begin .  "^\^A\^A\^A\^A\n")
15792  (body-end .  "^\^A\^A\^A\^A\n"))
15793 @end example
15794
15795 The definition is simply a unique @dfn{name} followed by a series of
15796 regexp pseudo-variable settings.  Below are the possible
15797 variables---don't be daunted by the number of variables; most document
15798 types can be defined with very few settings:
15799
15800 @table @code
15801 @item first-article
15802 If present, @code{nndoc} will skip past all text until it finds
15803 something that match this regexp.  All text before this will be
15804 totally ignored.
15805
15806 @item article-begin
15807 This setting has to be present in all document type definitions.  It
15808 says what the beginning of each article looks like.
15809
15810 @item head-begin-function
15811 If present, this should be a function that moves point to the head of
15812 the article.
15813
15814 @item nndoc-head-begin
15815 If present, this should be a regexp that matches the head of the
15816 article.
15817
15818 @item nndoc-head-end
15819 This should match the end of the head of the article.  It defaults to
15820 @samp{^$}---the empty line.
15821
15822 @item body-begin-function
15823 If present, this function should move point to the beginning of the body
15824 of the article.
15825
15826 @item body-begin
15827 This should match the beginning of the body of the article.  It defaults
15828 to @samp{^\n}.
15829
15830 @item body-end-function
15831 If present, this function should move point to the end of the body of
15832 the article.
15833
15834 @item body-end
15835 If present, this should match the end of the body of the article.
15836
15837 @item file-end
15838 If present, this should match the end of the file.  All text after this
15839 regexp will be totally ignored.
15840
15841 @end table
15842
15843 So, using these variables @code{nndoc} is able to dissect a document
15844 file into a series of articles, each with a head and a body.  However, a
15845 few more variables are needed since not all document types are all that
15846 news-like---variables needed to transform the head or the body into
15847 something that's palatable for Gnus:
15848
15849 @table @code
15850 @item prepare-body-function
15851 If present, this function will be called when requesting an article.  It
15852 will be called with point at the start of the body, and is useful if the
15853 document has encoded some parts of its contents.
15854
15855 @item article-transform-function
15856 If present, this function is called when requesting an article.  It's
15857 meant to be used for more wide-ranging transformation of both head and
15858 body of the article.
15859
15860 @item generate-head-function
15861 If present, this function is called to generate a head that Gnus can
15862 understand.  It is called with the article number as a parameter, and is
15863 expected to generate a nice head for the article in question.  It is
15864 called when requesting the headers of all articles.
15865
15866 @end table
15867
15868 Let's look at the most complicated example I can come up with---standard
15869 digests:
15870
15871 @example
15872 (standard-digest
15873  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
15874  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
15875  (prepare-body-function . nndoc-unquote-dashes)
15876  (body-end-function . nndoc-digest-body-end)
15877  (head-end . "^ ?$")
15878  (body-begin . "^ ?\n")
15879  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
15880  (subtype digest guess))
15881 @end example
15882
15883 We see that all text before a 70-width line of dashes is ignored; all
15884 text after a line that starts with that @samp{^End of} is also ignored;
15885 each article begins with a 30-width line of dashes; the line separating
15886 the head from the body may contain a single space; and that the body is
15887 run through @code{nndoc-unquote-dashes} before being delivered.
15888
15889 To hook your own document definition into @code{nndoc}, use the
15890 @code{nndoc-add-type} function.  It takes two parameters---the first is
15891 the definition itself and the second (optional) parameter says where in
15892 the document type definition alist to put this definition.  The alist is
15893 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for a given type @code{TYPE}.  So @code{nndoc-mmdf-type-p} is called to see whether a document
15894 is of @code{mmdf} type, and so on.  These type predicates should return
15895 @code{nil} if the document is not of the correct type; @code{t} if it is
15896 of the correct type; and a number if the document might be of the
15897 correct type.  A high number means high probability; a low number means
15898 low probability with @samp{0} being the lowest valid number.
15899
15900
15901 @node SOUP
15902 @subsection SOUP
15903 @cindex SOUP
15904 @cindex offline
15905
15906 In the PC world people often talk about ``offline'' newsreaders.  These
15907 are thingies that are combined reader/news transport monstrosities.
15908 With built-in modem programs.  Yecchh!
15909
15910 Of course, us Unix Weenie types of human beans use things like
15911 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
15912 transport things like Ghod intended.  And then we just use normal
15913 newsreaders.
15914
15915 However, it can sometimes be convenient to do something that's a bit
15916 easier on the brain if you have a very slow modem, and you're not really
15917 that interested in doing things properly.
15918
15919 A file format called @sc{soup} has been developed for transporting news
15920 and mail from servers to home machines and back again.  It can be a bit
15921 fiddly.
15922
15923 First some terminology:
15924
15925 @table @dfn
15926
15927 @item server
15928 This is the machine that is connected to the outside world and where you
15929 get news and/or mail from.
15930
15931 @item home machine
15932 This is the machine that you want to do the actual reading and responding
15933 on.  It is typically not connected to the rest of the world in any way.
15934
15935 @item packet
15936 Something that contains messages and/or commands.  There are two kinds
15937 of packets:
15938
15939 @table @dfn
15940 @item message packets
15941 These are packets made at the server, and typically contain lots of
15942 messages for you to read.  These are called @file{SoupoutX.tgz} by
15943 default, where @var{x} is a number.
15944
15945 @item response packets
15946 These are packets made at the home machine, and typically contains
15947 replies that you've written.  These are called @file{SoupinX.tgz} by
15948 default, where @var{x} is a number.
15949
15950 @end table
15951
15952 @end table
15953
15954
15955 @enumerate
15956
15957 @item
15958 You log in on the server and create a @sc{soup} packet.  You can either
15959 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
15960 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
15961 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
15962
15963 @item
15964 You transfer the packet home.  Rail, boat, car or modem will do fine.
15965
15966 @item
15967 You put the packet in your home directory.
15968
15969 @item
15970 You fire up Gnus on your home machine using the @code{nnsoup} back end as
15971 the native or secondary server.
15972
15973 @item
15974 You read articles and mail and answer and followup to the things you
15975 want (@pxref{SOUP Replies}).
15976
15977 @item
15978 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
15979 packet.
15980
15981 @item
15982 You transfer this packet to the server.
15983
15984 @item
15985 You use Gnus to mail this packet out with the @kbd{G s s} command.
15986
15987 @item
15988 You then repeat until you die.
15989
15990 @end enumerate
15991
15992 So you basically have a bipartite system---you use @code{nnsoup} for
15993 reading and Gnus for packing/sending these @sc{soup} packets.
15994
15995 @menu
15996 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
15997 * SOUP Groups::                 A back end for reading @sc{soup} packets.
15998 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
15999 @end menu
16000
16001
16002 @node SOUP Commands
16003 @subsubsection SOUP Commands
16004
16005 These are commands for creating and manipulating @sc{soup} packets.
16006
16007 @table @kbd
16008 @item G s b
16009 @kindex G s b (Group)
16010 @findex gnus-group-brew-soup
16011 Pack all unread articles in the current group
16012 (@code{gnus-group-brew-soup}).  This command understands the
16013 process/prefix convention.
16014
16015 @item G s w
16016 @kindex G s w (Group)
16017 @findex gnus-soup-save-areas
16018 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16019
16020 @item G s s
16021 @kindex G s s (Group)
16022 @findex gnus-soup-send-replies
16023 Send all replies from the replies packet
16024 (@code{gnus-soup-send-replies}).
16025
16026 @item G s p
16027 @kindex G s p (Group)
16028 @findex gnus-soup-pack-packet
16029 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16030
16031 @item G s r
16032 @kindex G s r (Group)
16033 @findex nnsoup-pack-replies
16034 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16035
16036 @item O s
16037 @kindex O s (Summary)
16038 @findex gnus-soup-add-article
16039 This summary-mode command adds the current article to a @sc{soup} packet
16040 (@code{gnus-soup-add-article}).  It understands the process/prefix
16041 convention (@pxref{Process/Prefix}).
16042
16043 @end table
16044
16045
16046 There are a few variables to customize where Gnus will put all these
16047 thingies:
16048
16049 @table @code
16050
16051 @item gnus-soup-directory
16052 @vindex gnus-soup-directory
16053 Directory where Gnus will save intermediate files while composing
16054 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16055
16056 @item gnus-soup-replies-directory
16057 @vindex gnus-soup-replies-directory
16058 This is what Gnus will use as a temporary directory while sending our
16059 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16060
16061 @item gnus-soup-prefix-file
16062 @vindex gnus-soup-prefix-file
16063 Name of the file where Gnus stores the last used prefix.  The default is
16064 @samp{gnus-prefix}.
16065
16066 @item gnus-soup-packer
16067 @vindex gnus-soup-packer
16068 A format string command for packing a @sc{soup} packet.  The default is
16069 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16070
16071 @item gnus-soup-unpacker
16072 @vindex gnus-soup-unpacker
16073 Format string command for unpacking a @sc{soup} packet.  The default is
16074 @samp{gunzip -c %s | tar xvf -}.
16075
16076 @item gnus-soup-packet-directory
16077 @vindex gnus-soup-packet-directory
16078 Where Gnus will look for reply packets.  The default is @file{~/}.
16079
16080 @item gnus-soup-packet-regexp
16081 @vindex gnus-soup-packet-regexp
16082 Regular expression matching @sc{soup} reply packets in
16083 @code{gnus-soup-packet-directory}.
16084
16085 @end table
16086
16087
16088 @node SOUP Groups
16089 @subsubsection SOUP Groups
16090 @cindex nnsoup
16091
16092 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16093 read incoming packets, unpack them, and put them in a directory where
16094 you can read them at leisure.
16095
16096 These are the variables you can use to customize its behavior:
16097
16098 @table @code
16099
16100 @item nnsoup-tmp-directory
16101 @vindex nnsoup-tmp-directory
16102 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16103 directory.  (@file{/tmp/} by default.)
16104
16105 @item nnsoup-directory
16106 @vindex nnsoup-directory
16107 @code{nnsoup} then moves each message and index file to this directory.
16108 The default is @file{~/SOUP/}.
16109
16110 @item nnsoup-replies-directory
16111 @vindex nnsoup-replies-directory
16112 All replies will be stored in this directory before being packed into a
16113 reply packet.  The default is @file{~/SOUP/replies/"}.
16114
16115 @item nnsoup-replies-format-type
16116 @vindex nnsoup-replies-format-type
16117 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16118 (rnews), and I don't think you should touch that variable.  I probably
16119 shouldn't even have documented it.  Drats!  Too late!
16120
16121 @item nnsoup-replies-index-type
16122 @vindex nnsoup-replies-index-type
16123 The index type of the replies packet.  The default is @samp{?n}, which
16124 means ``none''.  Don't fiddle with this one either!
16125
16126 @item nnsoup-active-file
16127 @vindex nnsoup-active-file
16128 Where @code{nnsoup} stores lots of information.  This is not an ``active
16129 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16130 this file or mess it up in any way, you're dead.  The default is
16131 @file{~/SOUP/active}.
16132
16133 @item nnsoup-packer
16134 @vindex nnsoup-packer
16135 Format string command for packing a reply @sc{soup} packet.  The default
16136 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16137
16138 @item nnsoup-unpacker
16139 @vindex nnsoup-unpacker
16140 Format string command for unpacking incoming @sc{soup} packets.  The
16141 default is @samp{gunzip -c %s | tar xvf -}.
16142
16143 @item nnsoup-packet-directory
16144 @vindex nnsoup-packet-directory
16145 Where @code{nnsoup} will look for incoming packets.  The default is
16146 @file{~/}.
16147
16148 @item nnsoup-packet-regexp
16149 @vindex nnsoup-packet-regexp
16150 Regular expression matching incoming @sc{soup} packets.  The default is
16151 @samp{Soupout}.
16152
16153 @item nnsoup-always-save
16154 @vindex nnsoup-always-save
16155 If non-@code{nil}, save the replies buffer after each posted message.
16156
16157 @end table
16158
16159
16160 @node SOUP Replies
16161 @subsubsection SOUP Replies
16162
16163 Just using @code{nnsoup} won't mean that your postings and mailings end
16164 up in @sc{soup} reply packets automagically.  You have to work a bit
16165 more for that to happen.
16166
16167 @findex nnsoup-set-variables
16168 The @code{nnsoup-set-variables} command will set the appropriate
16169 variables to ensure that all your followups and replies end up in the
16170 @sc{soup} system.
16171
16172 In specific, this is what it does:
16173
16174 @lisp
16175 (setq message-send-news-function 'nnsoup-request-post)
16176 (setq message-send-mail-function 'nnsoup-request-mail)
16177 @end lisp
16178
16179 And that's it, really.  If you only want news to go into the @sc{soup}
16180 system you just use the first line.  If you only want mail to be
16181 @sc{soup}ed you use the second.
16182
16183
16184 @node Mail-To-News Gateways
16185 @subsection Mail-To-News Gateways
16186 @cindex mail-to-news gateways
16187 @cindex gateways
16188
16189 If your local @code{nntp} server doesn't allow posting, for some reason
16190 or other, you can post using one of the numerous mail-to-news gateways.
16191 The @code{nngateway} back end provides the interface.
16192
16193 Note that you can't read anything from this back end---it can only be
16194 used to post with.
16195
16196 Server variables:
16197
16198 @table @code
16199 @item nngateway-address
16200 @vindex nngateway-address
16201 This is the address of the mail-to-news gateway.
16202
16203 @item nngateway-header-transformation
16204 @vindex nngateway-header-transformation
16205 News headers often have to be transformed in some odd way or other
16206 for the mail-to-news gateway to accept it.  This variable says what
16207 transformation should be called, and defaults to
16208 @code{nngateway-simple-header-transformation}.  The function is called
16209 narrowed to the headers to be transformed and with one parameter---the
16210 gateway address.
16211
16212 This default function just inserts a new @code{To} header based on the
16213 @code{Newsgroups} header and the gateway address.
16214 For instance, an article with this @code{Newsgroups} header:
16215
16216 @example
16217 Newsgroups: alt.religion.emacs
16218 @end example
16219
16220 will get this @code{To} header inserted:
16221
16222 @example
16223 To: alt-religion-emacs@@GATEWAY
16224 @end example
16225
16226 The following pre-defined functions exist:
16227
16228 @findex nngateway-simple-header-transformation
16229 @table @code
16230
16231 @item nngateway-simple-header-transformation
16232 Creates a @code{To} header that looks like
16233 @var{newsgroup}@@@code{nngateway-address}.
16234
16235 @findex nngateway-mail2news-header-transformation
16236
16237 @item nngateway-mail2news-header-transformation
16238 Creates a @code{To} header that looks like
16239 @code{nngateway-address}.
16240
16241 Here's an example:
16242
16243 @lisp
16244 (setq gnus-post-method
16245       '(nngateway
16246         "mail2news@@replay.com"
16247         (nngateway-header-transformation
16248          nngateway-mail2news-header-transformation)))
16249 @end lisp
16250
16251 @end table
16252
16253
16254 @end table
16255
16256 So, to use this, simply say something like:
16257
16258 @lisp
16259 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
16260 @end lisp
16261
16262
16263
16264 @node Combined Groups
16265 @section Combined Groups
16266
16267 Gnus allows combining a mixture of all the other group types into bigger
16268 groups.
16269
16270 @menu
16271 * Virtual Groups::              Combining articles from many groups.
16272 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
16273 @end menu
16274
16275
16276 @node Virtual Groups
16277 @subsection Virtual Groups
16278 @cindex nnvirtual
16279 @cindex virtual groups
16280 @cindex merging groups
16281
16282 An @dfn{nnvirtual group} is really nothing more than a collection of
16283 other groups.
16284
16285 For instance, if you are tired of reading many small groups, you can
16286 put them all in one big group, and then grow tired of reading one
16287 big, unwieldy group.  The joys of computing!
16288
16289 You specify @code{nnvirtual} as the method.  The address should be a
16290 regexp to match component groups.
16291
16292 All marks in the virtual group will stick to the articles in the
16293 component groups.  So if you tick an article in a virtual group, the
16294 article will also be ticked in the component group from whence it
16295 came.  (And vice versa---marks from the component groups will also be
16296 shown in the virtual group.). To create an empty virtual group, run
16297 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
16298 and edit the method regexp with @kbd{M-e}
16299 (@code{gnus-group-edit-group-method})
16300
16301 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
16302 newsgroups into one, big, happy newsgroup:
16303
16304 @lisp
16305 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
16306 @end lisp
16307
16308 The component groups can be native or foreign; everything should work
16309 smoothly, but if your computer explodes, it was probably my fault.
16310
16311 Collecting the same group from several servers might actually be a good
16312 idea if users have set the Distribution header to limit distribution.
16313 If you would like to read @samp{soc.motss} both from a server in Japan
16314 and a server in Norway, you could use the following as the group regexp:
16315
16316 @example
16317 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
16318 @end example
16319
16320 (Remember, though, that if you're creating the group with @kbd{G m}, you
16321 shouldn't double the backslashes, and you should leave off the quote
16322 characters at the beginning and the end of the string.)
16323
16324 This should work kinda smoothly---all articles from both groups should
16325 end up in this one, and there should be no duplicates.  Threading (and
16326 the rest) will still work as usual, but there might be problems with the
16327 sequence of articles.  Sorting on date might be an option here
16328 (@pxref{Selecting a Group}).
16329
16330 One limitation, however---all groups included in a virtual
16331 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
16332 zombie groups can't be component groups for @code{nnvirtual} groups.
16333
16334 @vindex nnvirtual-always-rescan
16335 If the @code{nnvirtual-always-rescan} is non-@code{nil},
16336 @code{nnvirtual} will always scan groups for unread articles when
16337 entering a virtual group.  If this variable is @code{nil} (which is the
16338 default) and you read articles in a component group after the virtual
16339 group has been activated, the read articles from the component group
16340 will show up when you enter the virtual group.  You'll also see this
16341 effect if you have two virtual groups that have a component group in
16342 common.  If that's the case, you should set this variable to @code{t}.
16343 Or you can just tap @code{M-g} on the virtual group every time before
16344 you enter it---it'll have much the same effect.
16345
16346 @code{nnvirtual} can have both mail and news groups as component groups.
16347 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
16348 has to ask the back end of the component group the article comes from
16349 whether it is a news or mail back end.  However, when you do a @kbd{^},
16350 there is typically no sure way for the component back end to know this,
16351 and in that case @code{nnvirtual} tells Gnus that the article came from a
16352 not-news back end.  (Just to be on the safe side.)
16353
16354 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
16355 line from the article you respond to in these cases.
16356
16357 @code{nnvirtual} groups do not inherit anything but articles and marks
16358 from component groups---group parameters, for instance, are not
16359 inherited.
16360
16361
16362 @node Kibozed Groups
16363 @subsection Kibozed Groups
16364 @cindex nnkiboze
16365 @cindex kibozing
16366
16367 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
16368 the news feed''.  @code{nnkiboze} is a back end that will do this for
16369 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
16370 with useless requests!  Oh happiness!
16371
16372 @kindex G k (Group)
16373 To create a kibozed group, use the @kbd{G k} command in the group
16374 buffer.
16375
16376 The address field of the @code{nnkiboze} method is, as with
16377 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
16378 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
16379 and @code{nnvirtual} end.
16380
16381 In addition to this regexp detailing component groups, an @code{nnkiboze} group
16382 must have a score file to say what articles are to be included in
16383 the group (@pxref{Scoring}).
16384
16385 @kindex M-x nnkiboze-generate-groups
16386 @findex nnkiboze-generate-groups
16387 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
16388 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
16389 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
16390 all the articles in all the component groups and run them through the
16391 scoring process to determine if there are any articles in the groups
16392 that are to be part of the @code{nnkiboze} groups.
16393
16394 Please limit the number of component groups by using restrictive
16395 regexps.  Otherwise your sysadmin may become annoyed with you, and the
16396 @sc{nntp} site may throw you off and never let you back in again.
16397 Stranger things have happened.
16398
16399 @code{nnkiboze} component groups do not have to be alive---they can be dead,
16400 and they can be foreign.  No restrictions.
16401
16402 @vindex nnkiboze-directory
16403 The generation of an @code{nnkiboze} group means writing two files in
16404 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
16405 contains the @sc{nov} header lines for all the articles in the group,
16406 and the other is an additional @file{.newsrc} file to store information
16407 on what groups have been searched through to find component articles.
16408
16409 Articles marked as read in the @code{nnkiboze} group will have
16410 their @sc{nov} lines removed from the @sc{nov} file.
16411
16412
16413 @node Gnus Unplugged
16414 @section Gnus Unplugged
16415 @cindex offline
16416 @cindex unplugged
16417 @cindex Agent
16418 @cindex Gnus Agent
16419 @cindex Gnus Unplugged
16420
16421 In olden times (ca. February '88), people used to run their newsreaders
16422 on big machines with permanent connections to the net.  News transport
16423 was dealt with by news servers, and all the newsreaders had to do was to
16424 read news.  Believe it or not.
16425
16426 Nowadays most people read news and mail at home, and use some sort of
16427 modem to connect to the net.  To avoid running up huge phone bills, it
16428 would be nice to have a way to slurp down all the news and mail, hang up
16429 the phone, read for several hours, and then upload any responses you
16430 have to make.  And then you repeat the procedure.
16431
16432 Of course, you can use news servers for doing this as well.  I've used
16433 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
16434 for some years, but doing that's a bore.  Moving the news server
16435 functionality up to the newsreader makes sense if you're the only person
16436 reading news on a machine.
16437
16438 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
16439 fact, you don't even have to configure anything.
16440
16441 Of course, to use it as such, you have to learn a few new commands.
16442
16443 @menu
16444 * Agent Basics::                How it all is supposed to work.
16445 * Agent Categories::            How to tell the Gnus Agent what to download.
16446 * Agent Commands::              New commands for all the buffers.
16447 * Agent as Cache::              The Agent is a big cache too.
16448 * Agent Expiry::                How to make old articles go away.
16449 * Agent and IMAP::              How to use the Agent with IMAP.
16450 * Outgoing Messages::           What happens when you post/mail something?
16451 * Agent Variables::             Customizing is fun.
16452 * Example Setup::               An example @file{.gnus.el} file for offline people.
16453 * Batching Agents::             How to fetch news from a @code{cron} job.
16454 * Agent Caveats::               What you think it'll do and what it does.
16455 @end menu
16456
16457
16458 @node Agent Basics
16459 @subsection Agent Basics
16460
16461 First, let's get some terminology out of the way.
16462
16463 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
16464 connection to the net (and notified the Agent that this is the case).
16465 When the connection to the net is up again (and Gnus knows this), the
16466 Agent is @dfn{plugged}.
16467
16468 The @dfn{local} machine is the one you're running on, and which isn't
16469 connected to the net continuously.
16470
16471 @dfn{Downloading} means fetching things from the net to your local
16472 machine.  @dfn{Uploading} is doing the opposite.
16473
16474 Let's take a typical Gnus session using the Agent.
16475
16476 @itemize @bullet
16477
16478 @item
16479 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
16480 Agent in a disconnected state.  You can read all the news that you have
16481 already fetched while in this mode.
16482
16483 @item
16484 You then decide to see whether any new news has arrived.  You connect
16485 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
16486 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
16487 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
16488 Source Specifiers}).
16489
16490 @item
16491 You can then read the new news immediately, or you can download the news
16492 onto your local machine.  If you want to do the latter, you press @kbd{g}
16493 to check if there are any new news and then @kbd{J
16494 s} to fetch all the eligible articles in all the groups.  (To let Gnus
16495 know which articles you want to download, @pxref{Agent Categories}.)
16496
16497 @item
16498 After fetching the articles, you press @kbd{J j} to make Gnus become
16499 unplugged again, and you shut down the PPP thing (or whatever).  And
16500 then you read the news offline.
16501
16502 @item
16503 And then you go to step 2.
16504 @end itemize
16505
16506 Here are some things you should do the first time (or so) that you use
16507 the Agent.
16508
16509 @itemize @bullet
16510
16511 @item
16512 Decide which servers should be covered by the Agent.  If you have a mail
16513 back end, it would probably be nonsensical to have it covered by the
16514 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
16515 @kbd{J a} on the server (or servers) that you wish to have covered by the
16516 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
16517 added servers you do not wish to have covered by the Agent.  By default,
16518 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
16519 @code{gnus-secondary-select-methods} are agentized.
16520
16521 @item
16522 Decide on download policy.  @xref{Agent Categories}.
16523
16524 @item
16525 Uhm... that's it.
16526 @end itemize
16527
16528
16529 @node Agent Categories
16530 @subsection Agent Categories
16531
16532 One of the main reasons to integrate the news transport layer into the
16533 newsreader is to allow greater control over what articles to download.
16534 There's not much point in downloading huge amounts of articles, just to
16535 find out that you're not interested in reading any of them.  It's better
16536 to be somewhat more conservative in choosing what to download, and then
16537 mark the articles for downloading manually if it should turn out that
16538 you're interested in the articles anyway.
16539
16540 The main way to control what is to be downloaded is to create a
16541 @dfn{category} and then assign some (or all) groups to this category.
16542 Groups that do not belong in any other category belong to the
16543 @code{default} category.  Gnus has its own buffer for creating and
16544 managing categories.
16545
16546 @menu
16547 * Category Syntax::             What a category looks like.
16548 * Category Buffer::             A buffer for maintaining categories.
16549 * Category Variables::          Customize'r'Us.
16550 @end menu
16551
16552
16553 @node Category Syntax
16554 @subsubsection Category Syntax
16555
16556 A category consists of two things.
16557
16558 @enumerate
16559 @item
16560 A predicate which (generally) gives a rough outline of which articles
16561 are eligible for downloading; and
16562
16563 @item
16564 a score rule which (generally) gives you a finer granularity when
16565 deciding what articles to download.  (Note that this @dfn{download
16566 score} is not necessarily related to normal scores.)
16567 @end enumerate
16568
16569 A predicate in its simplest form can be a single predicate such as
16570 @code{true} or @code{false}.  These two will download every available
16571 article or nothing respectively.  In the case of these two special
16572 predicates an additional score rule is superfluous.
16573
16574 Predicates of @code{high} or @code{low} download articles in respect of
16575 their scores in relationship to @code{gnus-agent-high-score} and
16576 @code{gnus-agent-low-score} as described below.
16577
16578 To gain even finer control of what is to be regarded eligible for
16579 download a predicate can consist of a number of predicates with logical
16580 operators sprinkled in between.
16581
16582 Perhaps some examples are in order.
16583
16584 Here's a simple predicate.  (It's the default predicate, in fact, used
16585 for all groups that don't belong to any other category.)
16586
16587 @lisp
16588 short
16589 @end lisp
16590
16591 Quite simple, eh?  This predicate is true if and only if the article is
16592 short (for some value of ``short'').
16593
16594 Here's a more complex predicate:
16595
16596 @lisp
16597 (or high
16598     (and
16599      (not low)
16600      (not long)))
16601 @end lisp
16602
16603 This means that an article should be downloaded if it has a high score,
16604 or if the score is not low and the article is not long.  You get the
16605 drift.
16606
16607 The available logical operators are @code{or}, @code{and} and
16608 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
16609 @samp{|}, @code{&} and @code{!} instead.)
16610
16611 The following predicates are pre-defined, but if none of these fit what
16612 you want to do, you can write your own.
16613
16614 @table @code
16615 @item short
16616 True iff the article is shorter than @code{gnus-agent-short-article}
16617 lines; default 100.
16618
16619 @item long
16620 True iff the article is longer than @code{gnus-agent-long-article}
16621 lines; default 200.
16622
16623 @item low
16624 True iff the article has a download score less than
16625 @code{gnus-agent-low-score}; default 0.
16626
16627 @item high
16628 True iff the article has a download score greater than
16629 @code{gnus-agent-high-score}; default 0.
16630
16631 @item spam
16632 True iff the Gnus Agent guesses that the article is spam.  The
16633 heuristics may change over time, but at present it just computes a
16634 checksum and sees whether articles match.
16635
16636 @item true
16637 Always true.
16638
16639 @item false
16640 Always false.
16641 @end table
16642
16643 If you want to create your own predicate function, here's what you have
16644 to know:  The functions are called with no parameters, but the
16645 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
16646 useful values.
16647
16648 For example, you could decide that you don't want to download articles
16649 that were posted more than a certain number of days ago (e.g. posted
16650 more than @code{gnus-agent-expire-days} ago) you might write a function
16651 something along the lines of the following:
16652
16653 @lisp
16654 (defun my-article-old-p ()
16655   "Say whether an article is old."
16656   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
16657      (- (time-to-days (current-time)) gnus-agent-expire-days)))
16658 @end lisp
16659
16660 with the predicate then defined as:
16661
16662 @lisp
16663 (not my-article-old-p)
16664 @end lisp
16665
16666 or you could append your predicate to the predefined
16667 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
16668 wherever.
16669
16670 @lisp
16671 (require 'gnus-agent)
16672 (setq  gnus-category-predicate-alist
16673   (append gnus-category-predicate-alist
16674          '((old . my-article-old-p))))
16675 @end lisp
16676
16677 and simply specify your predicate as:
16678
16679 @lisp
16680 (not old)
16681 @end lisp
16682
16683 If/when using something like the above, be aware that there are many
16684 misconfigured systems/mailers out there and so an article's date is not
16685 always a reliable indication of when it was posted.  Hell, some people
16686 just don't give a damn.
16687
16688 The above predicates apply to *all* the groups which belong to the
16689 category.  However, if you wish to have a specific predicate for an
16690 individual group within a category, or you're just too lazy to set up a
16691 new category, you can enter a group's individual predicate in it's group
16692 parameters like so:
16693
16694 @lisp
16695 (agent-predicate . short)
16696 @end lisp
16697
16698 This is the group parameter equivalent of the agent category default.
16699 Note that when specifying a single word predicate like this, the
16700 @code{agent-predicate} specification must be in dotted pair notation.
16701
16702 The equivalent of the longer example from above would be:
16703
16704 @lisp
16705 (agent-predicate or high (and (not low) (not long)))
16706 @end lisp
16707
16708 The outer parenthesis required in the category specification are not
16709 entered here as, not being in dotted pair notation, the value of the
16710 predicate is assumed to be a list.
16711
16712
16713 Now, the syntax of the download score is the same as the syntax of
16714 normal score files, except that all elements that require actually
16715 seeing the article itself are verboten.  This means that only the
16716 following headers can be scored on: @code{Subject}, @code{From},
16717 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
16718 @code{Lines}, and @code{Xref}.
16719
16720 As with predicates, the specification of the @code{download score rule}
16721 to use in respect of a group can be in either the category definition if
16722 it's to be applicable to all groups in therein, or a group's parameters
16723 if it's to be specific to that group.
16724
16725 In both of these places the @code{download score rule} can take one of
16726 three forms:
16727
16728 @enumerate
16729 @item
16730 Score rule
16731
16732 This has the same syntax as a normal gnus score file except only a
16733 subset of scoring keywords are available as mentioned above.
16734
16735 example:
16736
16737 @itemize @bullet
16738 @item
16739 Category specification
16740
16741 @lisp
16742 (("from"
16743        ("Lars Ingebrigtsen" 1000000 nil s))
16744 ("lines"
16745        (500 -100 nil <)))
16746 @end lisp
16747
16748 @item
16749 Group Parameter specification
16750
16751 @lisp
16752 (agent-score ("from"
16753                    ("Lars Ingebrigtsen" 1000000 nil s))
16754              ("lines"
16755                    (500 -100 nil <)))
16756 @end lisp
16757
16758 Again, note the omission of the outermost parenthesis here.
16759 @end itemize
16760
16761 @item
16762 Agent score file
16763
16764 These score files must *only* contain the permitted scoring keywords
16765 stated above.
16766
16767 example:
16768
16769 @itemize @bullet
16770 @item
16771 Category specification
16772
16773 @lisp
16774 ("~/News/agent.SCORE")
16775 @end lisp
16776
16777 or perhaps
16778
16779 @lisp
16780 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
16781 @end lisp
16782
16783 @item
16784 Group Parameter specification
16785
16786 @lisp
16787 (agent-score "~/News/agent.SCORE")
16788 @end lisp
16789
16790 Additional score files can be specified as above.  Need I say anything
16791 about parenthesis?
16792 @end itemize
16793
16794 @item
16795 Use @code{normal} score files
16796
16797 If you don't want to maintain two sets of scoring rules for a group, and
16798 your desired @code{downloading} criteria for a group are the same as your
16799 @code{reading} criteria then you can tell the agent to refer to your
16800 @code{normal} score files when deciding what to download.
16801
16802 These directives in either the category definition or a group's
16803 parameters will cause the agent to read in all the applicable score
16804 files for a group, *filtering out* those sections that do not
16805 relate to one of the permitted subset of scoring keywords.
16806
16807 @itemize @bullet
16808 @item
16809 Category Specification
16810
16811 @lisp
16812 file
16813 @end lisp
16814
16815 @item
16816 Group Parameter specification
16817
16818 @lisp
16819 (agent-score . file)
16820 @end lisp
16821 @end itemize
16822 @end enumerate
16823
16824 @node Category Buffer
16825 @subsubsection Category Buffer
16826
16827 You'd normally do all category maintenance from the category buffer.
16828 When you enter it for the first time (with the @kbd{J c} command from
16829 the group buffer), you'll only see the @code{default} category.
16830
16831 The following commands are available in this buffer:
16832
16833 @table @kbd
16834 @item q
16835 @kindex q (Category)
16836 @findex gnus-category-exit
16837 Return to the group buffer (@code{gnus-category-exit}).
16838
16839 @item k
16840 @kindex k (Category)
16841 @findex gnus-category-kill
16842 Kill the current category (@code{gnus-category-kill}).
16843
16844 @item c
16845 @kindex c (Category)
16846 @findex gnus-category-copy
16847 Copy the current category (@code{gnus-category-copy}).
16848
16849 @item a
16850 @kindex a (Category)
16851 @findex gnus-category-add
16852 Add a new category (@code{gnus-category-add}).
16853
16854 @item p
16855 @kindex p (Category)
16856 @findex gnus-category-edit-predicate
16857 Edit the predicate of the current category
16858 (@code{gnus-category-edit-predicate}).
16859
16860 @item g
16861 @kindex g (Category)
16862 @findex gnus-category-edit-groups
16863 Edit the list of groups belonging to the current category
16864 (@code{gnus-category-edit-groups}).
16865
16866 @item s
16867 @kindex s (Category)
16868 @findex gnus-category-edit-score
16869 Edit the download score rule of the current category
16870 (@code{gnus-category-edit-score}).
16871
16872 @item l
16873 @kindex l (Category)
16874 @findex gnus-category-list
16875 List all the categories (@code{gnus-category-list}).
16876 @end table
16877
16878
16879 @node Category Variables
16880 @subsubsection Category Variables
16881
16882 @table @code
16883 @item gnus-category-mode-hook
16884 @vindex gnus-category-mode-hook
16885 Hook run in category buffers.
16886
16887 @item gnus-category-line-format
16888 @vindex gnus-category-line-format
16889 Format of the lines in the category buffer (@pxref{Formatting
16890 Variables}).  Valid elements are:
16891
16892 @table @samp
16893 @item c
16894 The name of the category.
16895
16896 @item g
16897 The number of groups in the category.
16898 @end table
16899
16900 @item gnus-category-mode-line-format
16901 @vindex gnus-category-mode-line-format
16902 Format of the category mode line (@pxref{Mode Line Formatting}).
16903
16904 @item gnus-agent-short-article
16905 @vindex gnus-agent-short-article
16906 Articles that have fewer lines than this are short.  Default 100.
16907
16908 @item gnus-agent-long-article
16909 @vindex gnus-agent-long-article
16910 Articles that have more lines than this are long.  Default 200.
16911
16912 @item gnus-agent-low-score
16913 @vindex gnus-agent-low-score
16914 Articles that have a score lower than this have a low score.  Default
16915 0.
16916
16917 @item gnus-agent-high-score
16918 @vindex gnus-agent-high-score
16919 Articles that have a score higher than this have a high score.  Default
16920 0.
16921
16922 @end table
16923
16924
16925 @node Agent Commands
16926 @subsection Agent Commands
16927
16928 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
16929 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
16930 toggles the plugged/unplugged state of the Gnus Agent.
16931
16932
16933 @menu
16934 * Group Agent Commands::        
16935 * Summary Agent Commands::      
16936 * Server Agent Commands::       
16937 @end menu
16938
16939 You can run a complete batch command from the command line with the
16940 following incantation:
16941
16942 @cindex gnus-agent-batch
16943 @example
16944 $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
16945 @end example
16946
16947
16948
16949 @node Group Agent Commands
16950 @subsubsection Group Agent Commands
16951
16952 @table @kbd
16953 @item J u
16954 @kindex J u (Agent Group)
16955 @findex gnus-agent-fetch-groups
16956 Fetch all eligible articles in the current group
16957 (@code{gnus-agent-fetch-groups}).
16958
16959 @item J c
16960 @kindex J c (Agent Group)
16961 @findex gnus-enter-category-buffer
16962 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
16963
16964 @item J s
16965 @kindex J s (Agent Group)
16966 @findex gnus-agent-fetch-session
16967 Fetch all eligible articles in all groups
16968 (@code{gnus-agent-fetch-session}).
16969
16970 @item J S
16971 @kindex J S (Agent Group)
16972 @findex gnus-group-send-queue
16973 Send all sendable messages in the queue group
16974 (@code{gnus-group-send-queue}).  @xref{Drafts}.
16975
16976 @item J a
16977 @kindex J a (Agent Group)
16978 @findex gnus-agent-add-group
16979 Add the current group to an Agent category
16980 (@code{gnus-agent-add-group}).  This command understands the
16981 process/prefix convention (@pxref{Process/Prefix}).
16982
16983 @item J r
16984 @kindex J r (Agent Group)
16985 @findex gnus-agent-remove-group
16986 Remove the current group from its category, if any
16987 (@code{gnus-agent-remove-group}).  This command understands the
16988 process/prefix convention (@pxref{Process/Prefix}).
16989
16990 @item J Y
16991 @kindex J Y (Agent Group)
16992 @findex gnus-agent-synchronize-flags
16993 Synchronize flags changed while unplugged with remote server, if any.
16994
16995
16996 @end table
16997
16998
16999 @node Summary Agent Commands
17000 @subsubsection Summary Agent Commands
17001
17002 @table @kbd
17003 @item J #
17004 @kindex J # (Agent Summary)
17005 @findex gnus-agent-mark-article
17006 Mark the article for downloading (@code{gnus-agent-mark-article}).
17007
17008 @item J M-#
17009 @kindex J M-# (Agent Summary)
17010 @findex gnus-agent-unmark-article
17011 Remove the downloading mark from the article
17012 (@code{gnus-agent-unmark-article}).
17013
17014 @item @@
17015 @kindex @@ (Agent Summary)
17016 @findex gnus-agent-toggle-mark
17017 Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
17018
17019 @item J c
17020 @kindex J c (Agent Summary)
17021 @findex gnus-agent-catchup
17022 Mark all undownloaded articles as read (@code{gnus-agent-catchup}).
17023
17024 @item J u
17025 @kindex J u (Agent Summary)
17026 @findex gnus-agent-summary-fetch-group
17027 Download all downloadable articles in the current group
17028 (@code{gnus-agent-summary-fetch-group}).
17029
17030 @end table
17031
17032
17033 @node Server Agent Commands
17034 @subsubsection Server Agent Commands
17035
17036 @table @kbd
17037 @item J a
17038 @kindex J a (Agent Server)
17039 @findex gnus-agent-add-server
17040 Add the current server to the list of servers covered by the Gnus Agent
17041 (@code{gnus-agent-add-server}).
17042
17043 @item J r
17044 @kindex J r (Agent Server)
17045 @findex gnus-agent-remove-server
17046 Remove the current server from the list of servers covered by the Gnus
17047 Agent (@code{gnus-agent-remove-server}).
17048
17049 @end table
17050
17051
17052 @node Agent as Cache
17053 @subsection Agent as Cache
17054
17055 When Gnus is plugged, it is not efficient to download headers or
17056 articles from the server again, if they are already stored in the
17057 Agent.  So, Gnus normally only downloads headers once, and stores them
17058 in the Agent.  These headers are later used when generating the summary
17059 buffer, regardless of whether you are plugged or unplugged.  Articles
17060 are not cached in the Agent by default though (that would potentially
17061 consume lots of disk space), but if you have already downloaded an
17062 article into the Agent, Gnus will not download the article from the
17063 server again but use the locally stored copy instead.
17064
17065 This behaviour can be controlled by @code{gnus-agent-cache}
17066 (@pxref{Agent Variables}).
17067
17068 @node Agent Expiry
17069 @subsection Agent Expiry
17070
17071 @vindex gnus-agent-expire-days
17072 @findex gnus-agent-expire
17073 @kindex M-x gnus-agent-expire
17074 @cindex Agent expiry
17075 @cindex Gnus Agent expiry
17076 @cindex expiry
17077
17078 @code{nnagent} doesn't handle expiry.  Instead, there's a special
17079 @code{gnus-agent-expire} command that will expire all read articles that
17080 are older than @code{gnus-agent-expire-days} days.  It can be run
17081 whenever you feel that you're running out of space.  It's not
17082 particularly fast or efficient, and it's not a particularly good idea to
17083 interrupt it (with @kbd{C-g} or anything else) once you've started it.
17084
17085 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
17086 The regexps will be matched against group names to allow differing
17087 expiry in different groups.
17088
17089 @lisp
17090 (setq gnus-agent-expire-days
17091       '(("alt\\." 7)
17092         (".*binary" 1)
17093         ("." 21)))
17094 @end lisp
17095
17096 If you use the list form, the last element must always be the default
17097 method---it must always match all groups.
17098
17099 @vindex gnus-agent-expire-all
17100 If @code{gnus-agent-expire-all} is non-@code{nil}, this command will
17101 expire all articles---unread, read, ticked and dormant.  If @code{nil}
17102 (which is the default), only read articles are eligible for expiry, and
17103 unread, ticked and dormant articles will be kept indefinitely.
17104
17105 @findex gnus-agent-regenerate
17106 If you find that some articles eligible for expiry are never expired,
17107 perhaps some Gnus Agent files are corrupted.  There's a special
17108 @code{gnus-agent-regenerate} command to fix possible problems.
17109
17110 @node Agent and IMAP
17111 @subsection Agent and IMAP
17112
17113 The Agent work with any Gnus back end, including nnimap.  However,
17114 since there are some conceptual differences between @sc{nntp} and
17115 @sc{imap}, this section (should) provide you with some information to
17116 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
17117
17118 The first thing to keep in mind is that all flags (read, ticked, etc)
17119 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
17120 case for nntp.  Thus Gnus need to remember flag changes when
17121 disconnected, and synchronize these flags when you plug back in.
17122
17123 Gnus keeps track of flag changes when reading nnimap groups under the
17124 Agent.  When you plug back in, Gnus will check if you have any changed
17125 any flags and ask if you wish to synchronize these with the server.
17126 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
17127
17128 @vindex gnus-agent-synchronize-flags
17129 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
17130 never automatically synchronize flags.  If it is @code{ask}, which is
17131 the default, the Agent will check if you made any changes and if so
17132 ask if you wish to synchronize these when you re-connect.  If it has
17133 any other value, all flags will be synchronized automatically.
17134
17135 If you do not wish to synchronize flags automatically when you
17136 re-connect, you can do it manually with the
17137 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
17138 in the group buffer.
17139
17140 Some things are currently not implemented in the Agent that you'd might
17141 expect from a disconnected @sc{imap} client, including:
17142
17143 @itemize @bullet
17144
17145 @item
17146 Copying/moving articles into nnimap groups when unplugged.
17147
17148 @item
17149 Creating/deleting nnimap groups when unplugged.
17150
17151 @end itemize
17152
17153 Technical note: the synchronization algorithm does not work by "pushing"
17154 all local flags to the server, but rather incrementally update the
17155 server view of flags by changing only those flags that were changed by
17156 the user.  Thus, if you set one flag on a article, quit the group and
17157 re-select the group and remove the flag; the flag will be set and
17158 removed from the server when you "synchronize".  The queued flag
17159 operations can be found in the per-server @code{flags} file in the Agent
17160 directory.  It's emptied when you synchronize flags.
17161
17162
17163 @node Outgoing Messages
17164 @subsection Outgoing Messages
17165
17166 When Gnus is unplugged, all outgoing messages (both mail and news) are
17167 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
17168 them there after posting, and edit them at will.
17169
17170 When Gnus is plugged again, you can send the messages either from the
17171 draft group with the special commands available there, or you can use
17172 the @kbd{J S} command in the group buffer to send all the sendable
17173 messages in the draft group.
17174
17175
17176
17177 @node Agent Variables
17178 @subsection Agent Variables
17179
17180 @table @code
17181 @item gnus-agent-directory
17182 @vindex gnus-agent-directory
17183 Where the Gnus Agent will store its files.  The default is
17184 @file{~/News/agent/}.
17185
17186 @item gnus-agent-handle-level
17187 @vindex gnus-agent-handle-level
17188 Groups on levels (@pxref{Group Levels}) higher than this variable will
17189 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
17190 which means that only subscribed group will be considered by the Agent
17191 by default.
17192
17193 @item gnus-agent-plugged-hook
17194 @vindex gnus-agent-plugged-hook
17195 Hook run when connecting to the network.
17196
17197 @item gnus-agent-unplugged-hook
17198 @vindex gnus-agent-unplugged-hook
17199 Hook run when disconnecting from the network.
17200
17201 @item gnus-agent-fetched-hook
17202 @vindex gnus-agent-fetched-hook
17203 Hook run when after finishing fetching articles.
17204
17205 @item gnus-agent-cache
17206 @vindex gnus-agent-cache
17207 Variable to control whether use the locally stored @sc{nov} and
17208 articles when plugged, e.g. essentially using the Agent as a cache.
17209 The default is non-nil, which means to use the Agent as a cache.
17210
17211 @item gnus-agent-go-online
17212 @vindex gnus-agent-go-online
17213 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
17214 automatically switch offline servers into online status.  If it is
17215 @code{ask}, the default, the Agent will ask if you wish to switch
17216 offline servers into online status when you re-connect.  If it has any
17217 other value, all offline servers will be automatically switched into
17218 online status.
17219
17220 @item gnus-server-unopen-status
17221 @vindex gnus-server-unopen-status
17222 Perhaps not a Agent variable, but closely related to the Agent, this
17223 variable says what will happen if Gnus cannot open a server.  If the
17224 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
17225 whether to deny the server or whether to unplug the agent.  If the
17226 Agent is disabled, Gnus always simply deny the server.  Other choices
17227 for this variable include @code{denied} and @code{offline} the latter
17228 is only valid if the Agent is used.
17229
17230 @end table
17231
17232
17233 @node Example Setup
17234 @subsection Example Setup
17235
17236 If you don't want to read this manual, and you have a fairly standard
17237 setup, you may be able to use something like the following as your
17238 @file{.gnus.el} file to get started.
17239
17240 @lisp
17241 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
17242 ;;; from your ISP's server.
17243 (setq gnus-select-method '(nntp "news.your-isp.com"))
17244
17245 ;;; Define how Gnus is to read your mail.  We read mail from
17246 ;;; your ISP's POP server.
17247 (setq mail-sources '((pop :server "pop.your-isp.com")))
17248
17249 ;;; Say how Gnus is to store the mail.  We use nnml groups.
17250 (setq gnus-secondary-select-methods '((nnml "")))
17251
17252 ;;; Make Gnus into an offline newsreader.
17253 ;;; (gnus-agentize) ; The obsolete setting.
17254 ;;; (setq gnus-agent t) ; Now the default.
17255 @end lisp
17256
17257 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
17258 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
17259 gnus}.
17260
17261 If this is the first time you've run Gnus, you will be subscribed
17262 automatically to a few default newsgroups.  You'll probably want to
17263 subscribe to more groups, and to do that, you have to query the
17264 @sc{nntp} server for a complete list of groups with the @kbd{A A}
17265 command.  This usually takes quite a while, but you only have to do it
17266 once.
17267
17268 After reading and parsing a while, you'll be presented with a list of
17269 groups.  Subscribe to the ones you want to read with the @kbd{u}
17270 command.  @kbd{l} to make all the killed groups disappear after you've
17271 subscribe to all the groups you want to read.  (@kbd{A k} will bring
17272 back all the killed groups.)
17273
17274 You can now read the groups at once, or you can download the articles
17275 with the @kbd{J s} command.  And then read the rest of this manual to
17276 find out which of the other gazillion things you want to customize.
17277
17278
17279 @node Batching Agents
17280 @subsection Batching Agents
17281
17282 Having the Gnus Agent fetch articles (and post whatever messages you've
17283 written) is quite easy once you've gotten things set up properly.  The
17284 following shell script will do everything that is necessary:
17285
17286 @example
17287 #!/bin/sh
17288 emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
17289 @end example
17290
17291
17292 @node Agent Caveats
17293 @subsection Agent Caveats
17294
17295 The Gnus Agent doesn't seem to work like most other offline
17296 newsreaders.  Here are some common questions that some imaginary people
17297 may ask:
17298
17299 @table @dfn
17300 @item If I read an article while plugged, do they get entered into the Agent?
17301
17302 @strong{No}.
17303
17304 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
17305
17306 @strong{No}, unless @code{gnus-agent-cache} is `nil'.
17307
17308 @end table
17309
17310 In short, when Gnus is unplugged, it only looks into the locally stored
17311 articles; when it's plugged, it only talks to your ISP and also uses the
17312 locally stored articles.
17313
17314
17315 @node Scoring
17316 @chapter Scoring
17317 @cindex scoring
17318
17319 Other people use @dfn{kill files}, but we here at Gnus Towers like
17320 scoring better than killing, so we'd rather switch than fight.  They do
17321 something completely different as well, so sit up straight and pay
17322 attention!
17323
17324 @vindex gnus-summary-mark-below
17325 All articles have a default score (@code{gnus-summary-default-score}),
17326 which is 0 by default.  This score may be raised or lowered either
17327 interactively or by score files.  Articles that have a score lower than
17328 @code{gnus-summary-mark-below} are marked as read.
17329
17330 Gnus will read any @dfn{score files} that apply to the current group
17331 before generating the summary buffer.
17332
17333 There are several commands in the summary buffer that insert score
17334 entries based on the current article.  You can, for instance, ask Gnus to
17335 lower or increase the score of all articles with a certain subject.
17336
17337 There are two sorts of scoring entries: Permanent and temporary.
17338 Temporary score entries are self-expiring entries.  Any entries that are
17339 temporary and have not been used for, say, a week, will be removed
17340 silently to help keep the sizes of the score files down.
17341
17342 @menu
17343 * Summary Score Commands::      Adding score entries for the current group.
17344 * Group Score Commands::        General score commands.
17345 * Score Variables::             Customize your scoring.  (My, what terminology).
17346 * Score File Format::           What a score file may contain.
17347 * Score File Editing::          You can edit score files by hand as well.
17348 * Adaptive Scoring::            Big Sister Gnus knows what you read.
17349 * Home Score File::             How to say where new score entries are to go.
17350 * Followups To Yourself::       Having Gnus notice when people answer you.
17351 * Scoring On Other Headers::    Scoring on non-standard headers.
17352 * Scoring Tips::                How to score effectively.
17353 * Reverse Scoring::             That problem child of old is not problem.
17354 * Global Score Files::          Earth-spanning, ear-splitting score files.
17355 * Kill Files::                  They are still here, but they can be ignored.
17356 * Converting Kill Files::       Translating kill files to score files.
17357 * GroupLens::                   Getting predictions on what you like to read.
17358 * Advanced Scoring::            Using logical expressions to build score rules.
17359 * Score Decays::                It can be useful to let scores wither away.
17360 @end menu
17361
17362
17363 @node Summary Score Commands
17364 @section Summary Score Commands
17365 @cindex score commands
17366
17367 The score commands that alter score entries do not actually modify real
17368 score files.  That would be too inefficient.  Gnus maintains a cache of
17369 previously loaded score files, one of which is considered the
17370 @dfn{current score file alist}.  The score commands simply insert
17371 entries into this list, and upon group exit, this list is saved.
17372
17373 The current score file is by default the group's local score file, even
17374 if no such score file actually exists.  To insert score commands into
17375 some other score file (e.g. @file{all.SCORE}), you must first make this
17376 score file the current one.
17377
17378 General score commands that don't actually change the score file:
17379
17380 @table @kbd
17381
17382 @item V s
17383 @kindex V s (Summary)
17384 @findex gnus-summary-set-score
17385 Set the score of the current article (@code{gnus-summary-set-score}).
17386
17387 @item V S
17388 @kindex V S (Summary)
17389 @findex gnus-summary-current-score
17390 Display the score of the current article
17391 (@code{gnus-summary-current-score}).
17392
17393 @item V t
17394 @kindex V t (Summary)
17395 @findex gnus-score-find-trace
17396 Display all score rules that have been used on the current article
17397 (@code{gnus-score-find-trace}).
17398
17399 @item V w
17400 @kindex V w (Summary)
17401 @findex gnus-score-find-favourite-words
17402 List words used in scoring (@code{gnus-score-find-favourite-words}).
17403
17404 @item V R
17405 @kindex V R (Summary)
17406 @findex gnus-summary-rescore
17407 Run the current summary through the scoring process
17408 (@code{gnus-summary-rescore}).  This might be useful if you're playing
17409 around with your score files behind Gnus' back and want to see the
17410 effect you're having.
17411
17412 @item V c
17413 @kindex V c (Summary)
17414 @findex gnus-score-change-score-file
17415 Make a different score file the current
17416 (@code{gnus-score-change-score-file}).
17417
17418 @item V e
17419 @kindex V e (Summary)
17420 @findex gnus-score-edit-current-scores
17421 Edit the current score file (@code{gnus-score-edit-current-scores}).
17422 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
17423 File Editing}).
17424
17425 @item V f
17426 @kindex V f (Summary)
17427 @findex gnus-score-edit-file
17428 Edit a score file and make this score file the current one
17429 (@code{gnus-score-edit-file}).
17430
17431 @item V F
17432 @kindex V F (Summary)
17433 @findex gnus-score-flush-cache
17434 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
17435 after editing score files.
17436
17437 @item V C
17438 @kindex V C (Summary)
17439 @findex gnus-score-customize
17440 Customize a score file in a visually pleasing manner
17441 (@code{gnus-score-customize}).
17442
17443 @end table
17444
17445 The rest of these commands modify the local score file.
17446
17447 @table @kbd
17448
17449 @item V m
17450 @kindex V m (Summary)
17451 @findex gnus-score-set-mark-below
17452 Prompt for a score, and mark all articles with a score below this as
17453 read (@code{gnus-score-set-mark-below}).
17454
17455 @item V x
17456 @kindex V x (Summary)
17457 @findex gnus-score-set-expunge-below
17458 Prompt for a score, and add a score rule to the current score file to
17459 expunge all articles below this score
17460 (@code{gnus-score-set-expunge-below}).
17461 @end table
17462
17463 The keystrokes for actually making score entries follow a very regular
17464 pattern, so there's no need to list all the commands.  (Hundreds of
17465 them.)
17466
17467 @findex gnus-summary-increase-score
17468 @findex gnus-summary-lower-score
17469
17470 @enumerate
17471 @item
17472 The first key is either @kbd{I} (upper case i) for increasing the score
17473 or @kbd{L} for lowering the score.
17474 @item
17475 The second key says what header you want to score on.  The following
17476 keys are available:
17477 @table @kbd
17478
17479 @item a
17480 Score on the author name.
17481
17482 @item s
17483 Score on the subject line.
17484
17485 @item x
17486 Score on the @code{Xref} line---i.e., the cross-posting line.
17487
17488 @item r
17489 Score on the @code{References} line.
17490
17491 @item d
17492 Score on the date.
17493
17494 @item l
17495 Score on the number of lines.
17496
17497 @item i
17498 Score on the @code{Message-ID} header.
17499
17500 @item e
17501 Score on an "extra" header, that is, one of those in gnus-extra-headers,
17502 if your @sc{nntp} server tracks additional header data in overviews.
17503
17504 @item f
17505 Score on followups---this matches the author name, and adds scores to
17506 the followups to this author.  (Using this key leads to the creation of
17507 @file{ADAPT} files.)
17508
17509 @item b
17510 Score on the body.
17511
17512 @item h
17513 Score on the head.
17514
17515 @item t
17516 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
17517 files.)
17518
17519 @end table
17520
17521 @item
17522 The third key is the match type.  Which match types are valid depends on
17523 what headers you are scoring on.
17524
17525 @table @code
17526
17527 @item strings
17528
17529 @table @kbd
17530
17531 @item e
17532 Exact matching.
17533
17534 @item s
17535 Substring matching.
17536
17537 @item f
17538 Fuzzy matching (@pxref{Fuzzy Matching}).
17539
17540 @item r
17541 Regexp matching
17542 @end table
17543
17544 @item date
17545 @table @kbd
17546
17547 @item b
17548 Before date.
17549
17550 @item a
17551 After date.
17552
17553 @item n
17554 This date.
17555 @end table
17556
17557 @item number
17558 @table @kbd
17559
17560 @item <
17561 Less than number.
17562
17563 @item =
17564 Equal to number.
17565
17566 @item >
17567 Greater than number.
17568 @end table
17569 @end table
17570
17571 @item
17572 The fourth and usually final key says whether this is a temporary (i.e.,
17573 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
17574 or whether it is to be done immediately, without adding to the score
17575 file.
17576 @table @kbd
17577
17578 @item t
17579 Temporary score entry.
17580
17581 @item p
17582 Permanent score entry.
17583
17584 @item i
17585 Immediately scoring.
17586 @end table
17587
17588 @item
17589 If you are scoring on `e' (extra) headers, you will then be prompted for
17590 the header name on which you wish to score.  This must be a header named
17591 in gnus-extra-headers, and @samp{TAB} completion is available.
17592
17593 @end enumerate
17594
17595 So, let's say you want to increase the score on the current author with
17596 exact matching permanently: @kbd{I a e p}.  If you want to lower the
17597 score based on the subject line, using substring matching, and make a
17598 temporary score entry: @kbd{L s s t}.  Pretty easy.
17599
17600 To make things a bit more complicated, there are shortcuts.  If you use
17601 a capital letter on either the second or third keys, Gnus will use
17602 defaults for the remaining one or two keystrokes.  The defaults are
17603 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
17604 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
17605
17606 These functions take both the numerical prefix and the symbolic prefix
17607 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
17608 (or increase) the score of the article.  A symbolic prefix of @code{a}
17609 says to use the @file{all.SCORE} file for the command instead of the
17610 current score file.
17611
17612 @vindex gnus-score-mimic-keymap
17613 The @code{gnus-score-mimic-keymap} says whether these commands will
17614 pretend they are keymaps or not.
17615
17616
17617 @node Group Score Commands
17618 @section Group Score Commands
17619 @cindex group score commands
17620
17621 There aren't many of these as yet, I'm afraid.
17622
17623 @table @kbd
17624
17625 @item W f
17626 @kindex W f (Group)
17627 @findex gnus-score-flush-cache
17628 Gnus maintains a cache of score alists to avoid having to reload them
17629 all the time.  This command will flush the cache
17630 (@code{gnus-score-flush-cache}).
17631
17632 @end table
17633
17634 You can do scoring from the command line by saying something like:
17635
17636 @findex gnus-batch-score
17637 @cindex batch scoring
17638 @example
17639 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
17640 @end example
17641
17642
17643 @node Score Variables
17644 @section Score Variables
17645 @cindex score variables
17646
17647 @table @code
17648
17649 @item gnus-use-scoring
17650 @vindex gnus-use-scoring
17651 If @code{nil}, Gnus will not check for score files, and will not, in
17652 general, do any score-related work.  This is @code{t} by default.
17653
17654 @item gnus-kill-killed
17655 @vindex gnus-kill-killed
17656 If this variable is @code{nil}, Gnus will never apply score files to
17657 articles that have already been through the kill process.  While this
17658 may save you lots of time, it also means that if you apply a kill file
17659 to a group, and then change the kill file and want to run it over you
17660 group again to kill more articles, it won't work.  You have to set this
17661 variable to @code{t} to do that.  (It is @code{t} by default.)
17662
17663 @item gnus-kill-files-directory
17664 @vindex gnus-kill-files-directory
17665 All kill and score files will be stored in this directory, which is
17666 initialized from the @code{SAVEDIR} environment variable by default.
17667 This is @file{~/News/} by default.
17668
17669 @item gnus-score-file-suffix
17670 @vindex gnus-score-file-suffix
17671 Suffix to add to the group name to arrive at the score file name
17672 (@samp{SCORE} by default.)
17673
17674 @item gnus-score-uncacheable-files
17675 @vindex gnus-score-uncacheable-files
17676 @cindex score cache
17677 All score files are normally cached to avoid excessive re-loading of
17678 score files.  However, if this might make your Emacs grow big and
17679 bloated, so this regexp can be used to weed out score files unlikely to be needed again.  It would be a bad idea to deny caching of
17680 @file{all.SCORE}, while it might be a good idea to not cache
17681 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
17682 variable is @samp{ADAPT$} by default, so no adaptive score files will
17683 be cached.
17684
17685 @item gnus-save-score
17686 @vindex gnus-save-score
17687 If you have really complicated score files, and do lots of batch
17688 scoring, then you might set this variable to @code{t}.  This will make
17689 Gnus save the scores into the @file{.newsrc.eld} file.
17690
17691 If you do not set this to @code{t}, then manual scores (like those set
17692 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
17693 across group visits.
17694
17695 @item gnus-score-interactive-default-score
17696 @vindex gnus-score-interactive-default-score
17697 Score used by all the interactive raise/lower commands to raise/lower
17698 score with.  Default is 1000, which may seem excessive, but this is to
17699 ensure that the adaptive scoring scheme gets enough room to play with.
17700 We don't want the small changes from the adaptive scoring to overwrite
17701 manually entered data.
17702
17703 @item gnus-summary-default-score
17704 @vindex gnus-summary-default-score
17705 Default score of an article, which is 0 by default.
17706
17707 @item gnus-summary-expunge-below
17708 @vindex gnus-summary-expunge-below
17709 Don't display the summary lines of articles that have scores lower than
17710 this variable.  This is @code{nil} by default, which means that no
17711 articles will be hidden.  This variable is local to the summary buffers,
17712 and has to be set from @code{gnus-summary-mode-hook}.
17713
17714 @item gnus-score-over-mark
17715 @vindex gnus-score-over-mark
17716 Mark (in the third column) used for articles with a score over the
17717 default.  Default is @samp{+}.
17718
17719 @item gnus-score-below-mark
17720 @vindex gnus-score-below-mark
17721 Mark (in the third column) used for articles with a score below the
17722 default.  Default is @samp{-}.
17723
17724 @item gnus-score-find-score-files-function
17725 @vindex gnus-score-find-score-files-function
17726 Function used to find score files for the current group.  This function
17727 is called with the name of the group as the argument.
17728
17729 Predefined functions available are:
17730 @table @code
17731
17732 @item gnus-score-find-single
17733 @findex gnus-score-find-single
17734 Only apply the group's own score file.
17735
17736 @item gnus-score-find-bnews
17737 @findex gnus-score-find-bnews
17738 Apply all score files that match, using bnews syntax.  This is the
17739 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
17740 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
17741 @file{gnu.all.SCORE} would all apply.  In short, the instances of
17742 @samp{all} in the score file names are translated into @samp{.*}, and
17743 then a regexp match is done.
17744
17745 This means that if you have some score entries that you want to apply to
17746 all groups, then you put those entries in the @file{all.SCORE} file.
17747
17748 The score files are applied in a semi-random order, although Gnus will
17749 try to apply the more general score files before the more specific score
17750 files.  It does this by looking at the number of elements in the score
17751 file names---discarding the @samp{all} elements.
17752
17753 @item gnus-score-find-hierarchical
17754 @findex gnus-score-find-hierarchical
17755 Apply all score files from all the parent groups.  This means that you
17756 can't have score files like @file{all.SCORE}, but you can have
17757 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
17758 server.
17759
17760 @end table
17761 This variable can also be a list of functions.  In that case, all
17762 these functions will be called with the group name as argument, and
17763 all the returned lists of score files will be applied.  These
17764 functions can also return lists of lists of score alists directly.  In
17765 that case, the functions that return these non-file score alists
17766 should probably be placed before the ``real'' score file functions, to
17767 ensure that the last score file returned is the local score file.
17768 Phu.
17769
17770 For example, to do hierarchical scoring but use a non-server-specific
17771 overall score file, you could use the value
17772 @example
17773 (list (lambda (group) ("all.SCORE"))
17774       'gnus-score-find-hierarchical)
17775 @end example
17776
17777 @item gnus-score-expiry-days
17778 @vindex gnus-score-expiry-days
17779 This variable says how many days should pass before an unused score file
17780 entry is expired.  If this variable is @code{nil}, no score file entries
17781 are expired.  It's 7 by default.
17782
17783 @item gnus-update-score-entry-dates
17784 @vindex gnus-update-score-entry-dates
17785 If this variable is non-@code{nil}, temporary score entries that have
17786 been triggered (matched) will have their dates updated.  (This is how Gnus
17787 controls expiry---all non-matched-entries will become too old while
17788 matched entries will stay fresh and young.)  However, if you set this
17789 variable to @code{nil}, even matched entries will grow old and will
17790 have to face that oh-so grim reaper.
17791
17792 @item gnus-score-after-write-file-function
17793 @vindex gnus-score-after-write-file-function
17794 Function called with the name of the score file just written.
17795
17796 @item gnus-score-thread-simplify
17797 @vindex gnus-score-thread-simplify
17798 If this variable is non-@code{nil}, article subjects will be simplified
17799 for subject scoring purposes in the same manner as with
17800 threading---according to the current value of
17801 gnus-simplify-subject-functions.  If the scoring entry uses
17802 @code{substring} or @code{exact} matching, the match will also be
17803 simplified in this manner.
17804
17805 @end table
17806
17807
17808 @node Score File Format
17809 @section Score File Format
17810 @cindex score file format
17811
17812 A score file is an @code{emacs-lisp} file that normally contains just a
17813 single form.  Casual users are not expected to edit these files;
17814 everything can be changed from the summary buffer.
17815
17816 Anyway, if you'd like to dig into it yourself, here's an example:
17817
17818 @lisp
17819 (("from"
17820   ("Lars Ingebrigtsen" -10000)
17821   ("Per Abrahamsen")
17822   ("larsi\\|lmi" -50000 nil R))
17823  ("subject"
17824   ("Ding is Badd" nil 728373))
17825  ("xref"
17826   ("alt.politics" -1000 728372 s))
17827  ("lines"
17828   (2 -100 nil <))
17829  (mark 0)
17830  (expunge -1000)
17831  (mark-and-expunge -10)
17832  (read-only nil)
17833  (orphan -10)
17834  (adapt t)
17835  (files "/hom/larsi/News/gnu.SCORE")
17836  (exclude-files "all.SCORE")
17837  (local (gnus-newsgroup-auto-expire t)
17838         (gnus-summary-make-false-root empty))
17839  (eval (ding)))
17840 @end lisp
17841
17842 This example demonstrates most score file elements.  For a different
17843 approach, see @pxref{Advanced Scoring}.
17844
17845 Even though this looks much like lisp code, nothing here is actually
17846 @code{eval}ed.  The lisp reader is used to read this form, though, so it
17847 has to be valid syntactically, if not semantically.
17848
17849 Six keys are supported by this alist:
17850
17851 @table @code
17852
17853 @item STRING
17854 If the key is a string, it is the name of the header to perform the
17855 match on.  Scoring can only be performed on these eight headers:
17856 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
17857 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
17858 these headers, there are three strings to tell Gnus to fetch the entire
17859 article and do the match on larger parts of the article: @code{Body}
17860 will perform the match on the body of the article, @code{Head} will
17861 perform the match on the head of the article, and @code{All} will
17862 perform the match on the entire article.  Note that using any of these
17863 last three keys will slow down group entry @emph{considerably}.  The
17864 final ``header'' you can score on is @code{Followup}.  These score
17865 entries will result in new score entries being added for all follow-ups
17866 to articles that matches these score entries.
17867
17868 Following this key is a arbitrary number of score entries, where each
17869 score entry has one to four elements.
17870 @enumerate
17871
17872 @item
17873 The first element is the @dfn{match element}.  On most headers this will
17874 be a string, but on the Lines and Chars headers, this must be an
17875 integer.
17876
17877 @item
17878 If the second element is present, it should be a number---the @dfn{score
17879 element}.  This number should be an integer in the neginf to posinf
17880 interval.  This number is added to the score of the article if the match
17881 is successful.  If this element is not present, the
17882 @code{gnus-score-interactive-default-score} number will be used
17883 instead.  This is 1000 by default.
17884
17885 @item
17886 If the third element is present, it should be a number---the @dfn{date
17887 element}.  This date says when the last time this score entry matched,
17888 which provides a mechanism for expiring the score entries.  It this
17889 element is not present, the score entry is permanent.  The date is
17890 represented by the number of days since December 31, 1 BCE.
17891
17892 @item
17893 If the fourth element is present, it should be a symbol---the @dfn{type
17894 element}.  This element specifies what function should be used to see
17895 whether this score entry matches the article.  What match types that can
17896 be used depends on what header you wish to perform the match on.
17897 @table @dfn
17898
17899 @item From, Subject, References, Xref, Message-ID
17900 For most header types, there are the @code{r} and @code{R} (regexp), as
17901 well as @code{s} and @code{S} (substring) types, and @code{e} and
17902 @code{E} (exact match), and @code{w} (word match) types.  If this
17903 element is not present, Gnus will assume that substring matching should
17904 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
17905 that the matches will be done in a case-sensitive manner.  All these
17906 one-letter types are really just abbreviations for the @code{regexp},
17907 @code{string}, @code{exact}, and @code{word} types, which you can use
17908 instead, if you feel like.
17909
17910 @item Extra
17911 Just as for the standard string overview headers, if you are using
17912 gnus-extra-headers, you can score on these headers' values.  In this
17913 case, there is a 5th element in the score entry, being the name of the
17914 header to be scored.  The following entry is useful in your
17915 @file{all.SCORE} file in case of spam attacks from a single origin host,
17916 if your @sc{nntp} server tracks NNTP-Posting-Host in overviews:
17917
17918 @lisp
17919 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
17920 @end lisp
17921
17922 @item Lines, Chars
17923 These two headers use different match types: @code{<}, @code{>},
17924 @code{=}, @code{>=} and @code{<=}.
17925
17926 These predicates are true if
17927
17928 @example
17929 (PREDICATE HEADER MATCH)
17930 @end example
17931
17932 evaluates to non-@code{nil}.  For instance, the advanced match
17933 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
17934 following form:
17935
17936 @lisp
17937 (< header-value 4)
17938 @end lisp
17939
17940 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
17941 the match, we get the score added if the article has less than 4 lines.
17942 (It's easy to get confused and think it's the other way around.  But
17943 it's not.  I think.)
17944
17945 When matching on @code{Lines}, be careful because some back ends (like
17946 @code{nndir}) do not generate @code{Lines} header, so every article ends
17947 up being marked as having 0 lines.  This can lead to strange results if
17948 you happen to lower score of the articles with few lines.
17949
17950 @item Date
17951 For the Date header we have three kinda silly match types:
17952 @code{before}, @code{at} and @code{after}.  I can't really imagine this
17953 ever being useful, but, like, it would feel kinda silly not to provide
17954 this function.  Just in case.  You never know.  Better safe than sorry.
17955 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
17956 sex on a first date.  (I have been told that at least one person, and I
17957 quote, ``found this function indispensable'', however.)
17958
17959 @cindex ISO8601
17960 @cindex date
17961 A more useful match type is @code{regexp}.  With it, you can match the
17962 date string using a regular expression.  The date is normalized to
17963 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
17964 you want to match all articles that have been posted on April 1st in
17965 every year, you could use @samp{....0401.........} as a match string,
17966 for instance.  (Note that the date is kept in its original time zone, so
17967 this will match articles that were posted when it was April 1st where
17968 the article was posted from.  Time zones are such wholesome fun for the
17969 whole family, eh?)
17970
17971 @item Head, Body, All
17972 These three match keys use the same match types as the @code{From} (etc)
17973 header uses.
17974
17975 @item Followup
17976 This match key is somewhat special, in that it will match the
17977 @code{From} header, and affect the score of not only the matching
17978 articles, but also all followups to the matching articles.  This allows
17979 you e.g. increase the score of followups to your own articles, or
17980 decrease the score of followups to the articles of some known
17981 trouble-maker.  Uses the same match types as the @code{From} header
17982 uses.  (Using this match key will lead to creation of @file{ADAPT}
17983 files.)
17984
17985 @item Thread
17986 This match key works along the same lines as the @code{Followup} match
17987 key.  If you say that you want to score on a (sub-)thread started by an
17988 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
17989 match.  This will add a new @samp{thread} match for each article that
17990 has @var{x} in its @code{References} header.  (These new @samp{thread}
17991 matches will use the @code{Message-ID}s of these matching articles.)
17992 This will ensure that you can raise/lower the score of an entire thread,
17993 even though some articles in the thread may not have complete
17994 @code{References} headers.  Note that using this may lead to
17995 undeterministic scores of the articles in the thread.  (Using this match
17996 key will lead to creation of @file{ADAPT} files.)
17997 @end table
17998 @end enumerate
17999
18000 @cindex Score File Atoms
18001 @item mark
18002 The value of this entry should be a number.  Any articles with a score
18003 lower than this number will be marked as read.
18004
18005 @item expunge
18006 The value of this entry should be a number.  Any articles with a score
18007 lower than this number will be removed from the summary buffer.
18008
18009 @item mark-and-expunge
18010 The value of this entry should be a number.  Any articles with a score
18011 lower than this number will be marked as read and removed from the
18012 summary buffer.
18013
18014 @item thread-mark-and-expunge
18015 The value of this entry should be a number.  All articles that belong to
18016 a thread that has a total score below this number will be marked as read
18017 and removed from the summary buffer.  @code{gnus-thread-score-function}
18018 says how to compute the total score for a thread.
18019
18020 @item files
18021 The value of this entry should be any number of file names.  These files
18022 are assumed to be score files as well, and will be loaded the same way
18023 this one was.
18024
18025 @item exclude-files
18026 The clue of this entry should be any number of files.  These files will
18027 not be loaded, even though they would normally be so, for some reason or
18028 other.
18029
18030 @item eval
18031 The value of this entry will be @code{eval}el.  This element will be
18032 ignored when handling global score files.
18033
18034 @item read-only
18035 Read-only score files will not be updated or saved.  Global score files
18036 should feature this atom (@pxref{Global Score Files}).  (Note:
18037 @dfn{Global} here really means @dfn{global}; not your personal
18038 apply-to-all-groups score files.)
18039
18040 @item orphan
18041 The value of this entry should be a number.  Articles that do not have
18042 parents will get this number added to their scores.  Imagine you follow
18043 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
18044 will only follow a few of the threads, also want to see any new threads.
18045
18046 You can do this with the following two score file entries:
18047
18048 @example
18049         (orphan -500)
18050         (mark-and-expunge -100)
18051 @end example
18052
18053 When you enter the group the first time, you will only see the new
18054 threads.  You then raise the score of the threads that you find
18055 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
18056 rest.  Next time you enter the group, you will see new articles in the
18057 interesting threads, plus any new threads.
18058
18059 I.e.---the orphan score atom is for high-volume groups where a few
18060 interesting threads which can't be found automatically by ordinary
18061 scoring rules exist.
18062
18063 @item adapt
18064 This entry controls the adaptive scoring.  If it is @code{t}, the
18065 default adaptive scoring rules will be used.  If it is @code{ignore}, no
18066 adaptive scoring will be performed on this group.  If it is a list, this
18067 list will be used as the adaptive scoring rules.  If it isn't present,
18068 or is something other than @code{t} or @code{ignore}, the default
18069 adaptive scoring rules will be used.  If you want to use adaptive
18070 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
18071 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
18072 not want adaptive scoring.  If you only want adaptive scoring in a few
18073 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
18074 insert @code{(adapt t)} in the score files of the groups where you want
18075 it.
18076
18077 @item adapt-file
18078 All adaptive score entries will go to the file named by this entry.  It
18079 will also be applied when entering the group.  This atom might be handy
18080 if you want to adapt on several groups at once, using the same adaptive
18081 file for a number of groups.
18082
18083 @item local
18084 @cindex local variables
18085 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
18086 Each @var{var} will be made buffer-local to the current summary buffer,
18087 and set to the value specified.  This is a convenient, if somewhat
18088 strange, way of setting variables in some groups if you don't like hooks
18089 much.  Note that the @var{value} won't be evaluated.
18090 @end table
18091
18092
18093 @node Score File Editing
18094 @section Score File Editing
18095
18096 You normally enter all scoring commands from the summary buffer, but you
18097 might feel the urge to edit them by hand as well, so we've supplied you
18098 with a mode for that.
18099
18100 It's simply a slightly customized @code{emacs-lisp} mode, with these
18101 additional commands:
18102
18103 @table @kbd
18104
18105 @item C-c C-c
18106 @kindex C-c C-c (Score)
18107 @findex gnus-score-edit-done
18108 Save the changes you have made and return to the summary buffer
18109 (@code{gnus-score-edit-done}).
18110
18111 @item C-c C-d
18112 @kindex C-c C-d (Score)
18113 @findex gnus-score-edit-insert-date
18114 Insert the current date in numerical format
18115 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
18116 you were wondering.
18117
18118 @item C-c C-p
18119 @kindex C-c C-p (Score)
18120 @findex gnus-score-pretty-print
18121 The adaptive score files are saved in an unformatted fashion.  If you
18122 intend to read one of these files, you want to @dfn{pretty print} it
18123 first.  This command (@code{gnus-score-pretty-print}) does that for
18124 you.
18125
18126 @end table
18127
18128 Type @kbd{M-x gnus-score-mode} to use this mode.
18129
18130 @vindex gnus-score-mode-hook
18131 @code{gnus-score-menu-hook} is run in score mode buffers.
18132
18133 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
18134 e} to begin editing score files.
18135
18136
18137 @node Adaptive Scoring
18138 @section Adaptive Scoring
18139 @cindex adaptive scoring
18140
18141 If all this scoring is getting you down, Gnus has a way of making it all
18142 happen automatically---as if by magic.  Or rather, as if by artificial
18143 stupidity, to be precise.
18144
18145 @vindex gnus-use-adaptive-scoring
18146 When you read an article, or mark an article as read, or kill an
18147 article, you leave marks behind.  On exit from the group, Gnus can sniff
18148 these marks and add score elements depending on what marks it finds.
18149 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
18150 @code{t} or @code{(line)}.  If you want score adaptively on separate
18151 words appearing in the subjects, you should set this variable to
18152 @code{(word)}.  If you want to use both adaptive methods, set this
18153 variable to @code{(word line)}.
18154
18155 @vindex gnus-default-adaptive-score-alist
18156 To give you complete control over the scoring process, you can customize
18157 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
18158 might look something like this:
18159
18160 @lisp
18161 (setq gnus-default-adaptive-score-alist
18162   '((gnus-unread-mark)
18163     (gnus-ticked-mark (from 4))
18164     (gnus-dormant-mark (from 5))
18165     (gnus-del-mark (from -4) (subject -1))
18166     (gnus-read-mark (from 4) (subject 2))
18167     (gnus-expirable-mark (from -1) (subject -1))
18168     (gnus-killed-mark (from -1) (subject -3))
18169     (gnus-kill-file-mark)
18170     (gnus-ancient-mark)
18171     (gnus-low-score-mark)
18172     (gnus-catchup-mark (from -1) (subject -1))))
18173 @end lisp
18174
18175 As you see, each element in this alist has a mark as a key (either a
18176 variable name or a ``real'' mark---a character).  Following this key is
18177 a arbitrary number of header/score pairs.  If there are no header/score
18178 pairs following the key, no adaptive scoring will be done on articles
18179 that have that key as the article mark.  For instance, articles with
18180 @code{gnus-unread-mark} in the example above will not get adaptive score
18181 entries.
18182
18183 Each article can have only one mark, so just a single of these rules
18184 will be applied to each article.
18185
18186 To take @code{gnus-del-mark} as an example---this alist says that all
18187 articles that have that mark (i.e., are marked with @samp{D}) will have a
18188 score entry added to lower based on the @code{From} header by -4, and
18189 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
18190
18191 If you have marked 10 articles with the same subject with
18192 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
18193 That means that that subject will get a score of ten times -1, which
18194 should be, unless I'm much mistaken, -10.
18195
18196 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
18197 the read articles will be marked with the @samp{E} mark.  This'll
18198 probably make adaptive scoring slightly impossible, so auto-expiring and
18199 adaptive scoring doesn't really mix very well.
18200
18201 The headers you can score on are @code{from}, @code{subject},
18202 @code{message-id}, @code{references}, @code{xref}, @code{lines},
18203 @code{chars} and @code{date}.  In addition, you can score on
18204 @code{followup}, which will create an adaptive score entry that matches
18205 on the @code{References} header using the @code{Message-ID} of the
18206 current article, thereby matching the following thread.
18207
18208 You can also score on @code{thread}, which will try to score all
18209 articles that appear in a thread.  @code{thread} matches uses a
18210 @code{Message-ID} to match on the @code{References} header of the
18211 article.  If the match is made, the @code{Message-ID} of the article is
18212 added to the @code{thread} rule.  (Think about it.  I'd recommend two
18213 aspirins afterwards.)
18214
18215 If you use this scheme, you should set the score file atom @code{mark}
18216 to something small---like -300, perhaps, to avoid having small random
18217 changes result in articles getting marked as read.
18218
18219 After using adaptive scoring for a week or so, Gnus should start to
18220 become properly trained and enhance the authors you like best, and kill
18221 the authors you like least, without you having to say so explicitly.
18222
18223 You can control what groups the adaptive scoring is to be performed on
18224 by using the score files (@pxref{Score File Format}).  This will also
18225 let you use different rules in different groups.
18226
18227 @vindex gnus-adaptive-file-suffix
18228 The adaptive score entries will be put into a file where the name is the
18229 group name with @code{gnus-adaptive-file-suffix} appended.  The default
18230 is @samp{ADAPT}.
18231
18232 @vindex gnus-score-exact-adapt-limit
18233 When doing adaptive scoring, substring or fuzzy matching would probably
18234 give you the best results in most cases.  However, if the header one
18235 matches is short, the possibility for false positives is great, so if
18236 the length of the match is less than
18237 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
18238 this variable is @code{nil}, exact matching will always be used to avoid
18239 this problem.
18240
18241 @vindex gnus-default-adaptive-word-score-alist
18242 As mentioned above, you can adapt either on individual words or entire
18243 headers.  If you adapt on words, the
18244 @code{gnus-default-adaptive-word-score-alist} variable says what score
18245 each instance of a word should add given a mark.
18246
18247 @lisp
18248 (setq gnus-default-adaptive-word-score-alist
18249       `((,gnus-read-mark . 30)
18250         (,gnus-catchup-mark . -10)
18251         (,gnus-killed-mark . -20)
18252         (,gnus-del-mark . -15)))
18253 @end lisp
18254
18255 This is the default value.  If you have adaption on words enabled, every
18256 word that appears in subjects of articles marked with
18257 @code{gnus-read-mark} will result in a score rule that increase the
18258 score with 30 points.
18259
18260 @vindex gnus-default-ignored-adaptive-words
18261 @vindex gnus-ignored-adaptive-words
18262 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
18263 will be ignored.  If you wish to add more words to be ignored, use the
18264 @code{gnus-ignored-adaptive-words} list instead.
18265
18266 @vindex gnus-adaptive-word-length-limit
18267 Some may feel that short words shouldn't count when doing adaptive
18268 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
18269 an integer.  Words shorter than this number will be ignored.  This
18270 variable defaults til @code{nil}.
18271
18272 @vindex gnus-adaptive-word-syntax-table
18273 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
18274 syntax table in effect.  It is similar to the standard syntax table, but
18275 it considers numbers to be non-word-constituent characters.
18276
18277 @vindex gnus-adaptive-word-minimum
18278 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
18279 word scoring process will never bring down the score of an article to
18280 below this number.  The default is @code{nil}.
18281
18282 @vindex gnus-adaptive-word-no-group-words
18283 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
18284 won't adaptively word score any of the words in the group name.  Useful
18285 for groups like @samp{comp.editors.emacs}, where most of the subject
18286 lines contain the word @samp{emacs}.
18287
18288 After using this scheme for a while, it might be nice to write a
18289 @code{gnus-psychoanalyze-user} command to go through the rules and see
18290 what words you like and what words you don't like.  Or perhaps not.
18291
18292 Note that the adaptive word scoring thing is highly experimental and is
18293 likely to change in the future.  Initial impressions seem to indicate
18294 that it's totally useless as it stands.  Some more work (involving more
18295 rigorous statistical methods) will have to be done to make this useful.
18296
18297
18298 @node Home Score File
18299 @section Home Score File
18300
18301 The score file where new score file entries will go is called the
18302 @dfn{home score file}.  This is normally (and by default) the score file
18303 for the group itself.  For instance, the home score file for
18304 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
18305
18306 However, this may not be what you want.  It is often convenient to share
18307 a common home score file among many groups---all @samp{emacs} groups
18308 could perhaps use the same home score file.
18309
18310 @vindex gnus-home-score-file
18311 The variable that controls this is @code{gnus-home-score-file}.  It can
18312 be:
18313
18314 @enumerate
18315 @item
18316 A string.  Then this file will be used as the home score file for all
18317 groups.
18318
18319 @item
18320 A function.  The result of this function will be used as the home score
18321 file.  The function will be called with the name of the group as the
18322 parameter.
18323
18324 @item
18325 A list.  The elements in this list can be:
18326
18327 @enumerate
18328 @item
18329 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
18330 group name, the @var{file-name} will be used as the home score file.
18331
18332 @item
18333 A function.  If the function returns non-nil, the result will be used as
18334 the home score file.
18335
18336 @item
18337 A string.  Use the string as the home score file.
18338 @end enumerate
18339
18340 The list will be traversed from the beginning towards the end looking
18341 for matches.
18342
18343 @end enumerate
18344
18345 So, if you want to use just a single score file, you could say:
18346
18347 @lisp
18348 (setq gnus-home-score-file
18349       "my-total-score-file.SCORE")
18350 @end lisp
18351
18352 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
18353 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
18354
18355 @findex gnus-hierarchial-home-score-file
18356 @lisp
18357 (setq gnus-home-score-file
18358       'gnus-hierarchial-home-score-file)
18359 @end lisp
18360
18361 This is a ready-made function provided for your convenience.
18362 Other functions include
18363
18364 @table @code
18365 @item gnus-current-home-score-file
18366 @findex gnus-current-home-score-file
18367 Return the ``current'' regular score file.  This will make scoring
18368 commands add entry to the ``innermost'' matching score file.
18369
18370 @end table
18371
18372 If you want to have one score file for the @samp{emacs} groups and
18373 another for the @samp{comp} groups, while letting all other groups use
18374 their own home score files:
18375
18376 @lisp
18377 (setq gnus-home-score-file
18378       ;; All groups that match the regexp "\\.emacs"
18379       '(("\\.emacs" "emacs.SCORE")
18380         ;; All the comp groups in one score file
18381         ("^comp" "comp.SCORE")))
18382 @end lisp
18383
18384 @vindex gnus-home-adapt-file
18385 @code{gnus-home-adapt-file} works exactly the same way as
18386 @code{gnus-home-score-file}, but says what the home adaptive score file
18387 is instead.  All new adaptive file entries will go into the file
18388 specified by this variable, and the same syntax is allowed.
18389
18390 In addition to using @code{gnus-home-score-file} and
18391 @code{gnus-home-adapt-file}, you can also use group parameters
18392 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
18393 Parameters}) to achieve much the same.  Group and topic parameters take
18394 precedence over this variable.
18395
18396
18397 @node Followups To Yourself
18398 @section Followups To Yourself
18399
18400 Gnus offers two commands for picking out the @code{Message-ID} header in
18401 the current buffer.  Gnus will then add a score rule that scores using
18402 this @code{Message-ID} on the @code{References} header of other
18403 articles.  This will, in effect, increase the score of all articles that
18404 respond to the article in the current buffer.  Quite useful if you want
18405 to easily note when people answer what you've said.
18406
18407 @table @code
18408
18409 @item gnus-score-followup-article
18410 @findex gnus-score-followup-article
18411 This will add a score to articles that directly follow up your own
18412 article.
18413
18414 @item gnus-score-followup-thread
18415 @findex gnus-score-followup-thread
18416 This will add a score to all articles that appear in a thread ``below''
18417 your own article.
18418 @end table
18419
18420 @vindex message-sent-hook
18421 These two functions are both primarily meant to be used in hooks like
18422 @code{message-sent-hook}, like this:
18423 @lisp
18424 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
18425 @end lisp
18426
18427
18428 If you look closely at your own @code{Message-ID}, you'll notice that
18429 the first two or three characters are always the same.  Here's two of
18430 mine:
18431
18432 @example
18433 <x6u3u47icf.fsf@@eyesore.no>
18434 <x6sp9o7ibw.fsf@@eyesore.no>
18435 @end example
18436
18437 So ``my'' ident on this machine is @samp{x6}.  This can be
18438 exploited---the following rule will raise the score on all followups to
18439 myself:
18440
18441 @lisp
18442 ("references"
18443  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
18444   1000 nil r))
18445 @end lisp
18446
18447 Whether it's the first two or first three characters that are ``yours''
18448 is system-dependent.
18449
18450
18451 @node Scoring On Other Headers
18452 @section Scoring On Other Headers
18453 @cindex scoring on other headers
18454
18455 Gnus is quite fast when scoring the ``traditional''
18456 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
18457 other headers requires writing a @code{head} scoring rule, which means
18458 that Gnus has to request every single article from the back end to find
18459 matches.  This takes a long time in big groups.
18460
18461 Now, there's not much you can do about this for news groups, but for
18462 mail groups, you have greater control.  In the @pxref{To From
18463 Newsgroups} section of the manual, it's explained in greater detail what
18464 this mechanism does, but here's a cookbook example for @code{nnml} on
18465 how to allow scoring on the @samp{To} and @samp{Cc} headers.
18466
18467 Put the following in your @file{.gnus.el} file.
18468
18469 @lisp
18470 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
18471       nnmail-extra-headers gnus-extra-headers)
18472 @end lisp
18473
18474 Restart Gnus and rebuild your @code{nnml} overview files with the
18475 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
18476 time if you have much mail.
18477
18478 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
18479 so: @kbd{I e s p To RET <your name> RET}.
18480
18481 See?  Simple.
18482
18483
18484 @node Scoring Tips
18485 @section Scoring Tips
18486 @cindex scoring tips
18487
18488 @table @dfn
18489
18490 @item Crossposts
18491 @cindex crossposts
18492 @cindex scoring crossposts
18493 If you want to lower the score of crossposts, the line to match on is
18494 the @code{Xref} header.
18495 @lisp
18496 ("xref" (" talk.politics.misc:" -1000))
18497 @end lisp
18498
18499 @item Multiple crossposts
18500 If you want to lower the score of articles that have been crossposted to
18501 more than, say, 3 groups:
18502 @lisp
18503 ("xref"
18504   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
18505    -1000 nil r))
18506 @end lisp
18507
18508 @item Matching on the body
18509 This is generally not a very good idea---it takes a very long time.
18510 Gnus actually has to fetch each individual article from the server.  But
18511 you might want to anyway, I guess.  Even though there are three match
18512 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
18513 and stick with it in each score file.  If you use any two, each article
18514 will be fetched @emph{twice}.  If you want to match a bit on the
18515 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
18516 the matches.
18517
18518 @item Marking as read
18519 You will probably want to mark articles that have scores below a certain
18520 number as read.  This is most easily achieved by putting the following
18521 in your @file{all.SCORE} file:
18522 @lisp
18523 ((mark -100))
18524 @end lisp
18525 You may also consider doing something similar with @code{expunge}.
18526
18527 @item Negated character classes
18528 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
18529 That will match newlines, which might lead to, well, The Unknown.  Say
18530 @code{[^abcd\n]*} instead.
18531 @end table
18532
18533
18534 @node Reverse Scoring
18535 @section Reverse Scoring
18536 @cindex reverse scoring
18537
18538 If you want to keep just articles that have @samp{Sex with Emacs} in the
18539 subject header, and expunge all other articles, you could put something
18540 like this in your score file:
18541
18542 @lisp
18543 (("subject"
18544   ("Sex with Emacs" 2))
18545  (mark 1)
18546  (expunge 1))
18547 @end lisp
18548
18549 So, you raise all articles that match @samp{Sex with Emacs} and mark the
18550 rest as read, and expunge them to boot.
18551
18552
18553 @node Global Score Files
18554 @section Global Score Files
18555 @cindex global score files
18556
18557 Sure, other newsreaders have ``global kill files''.  These are usually
18558 nothing more than a single kill file that applies to all groups, stored
18559 in the user's home directory.  Bah!  Puny, weak newsreaders!
18560
18561 What I'm talking about here are Global Score Files.  Score files from
18562 all over the world, from users everywhere, uniting all nations in one
18563 big, happy score file union!  Ange-score!  New and untested!
18564
18565 @vindex gnus-global-score-files
18566 All you have to do to use other people's score files is to set the
18567 @code{gnus-global-score-files} variable.  One entry for each score file,
18568 or each score file directory.  Gnus will decide by itself what score
18569 files are applicable to which group.
18570
18571 To use the score file
18572 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
18573 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
18574 say this:
18575
18576 @lisp
18577 (setq gnus-global-score-files
18578       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
18579         "/ftp@@ftp.some-where:/pub/score/"))
18580 @end lisp
18581
18582 @findex gnus-score-search-global-directories
18583 @noindent
18584 Simple, eh?  Directory names must end with a @samp{/}.  These
18585 directories are typically scanned only once during each Gnus session.
18586 If you feel the need to manually re-scan the remote directories, you can
18587 use the @code{gnus-score-search-global-directories} command.
18588
18589 Note that, at present, using this option will slow down group entry
18590 somewhat.  (That is---a lot.)
18591
18592 If you want to start maintaining score files for other people to use,
18593 just put your score file up for anonymous ftp and announce it to the
18594 world.  Become a retro-moderator!  Participate in the retro-moderator
18595 wars sure to ensue, where retro-moderators battle it out for the
18596 sympathy of the people, luring them to use their score files on false
18597 premises!  Yay!  The net is saved!
18598
18599 Here are some tips for the would-be retro-moderator, off the top of my
18600 head:
18601
18602 @itemize @bullet
18603
18604 @item
18605 Articles heavily crossposted are probably junk.
18606 @item
18607 To lower a single inappropriate article, lower by @code{Message-ID}.
18608 @item
18609 Particularly brilliant authors can be raised on a permanent basis.
18610 @item
18611 Authors that repeatedly post off-charter for the group can safely be
18612 lowered out of existence.
18613 @item
18614 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
18615 articles completely.
18616
18617 @item
18618 Use expiring score entries to keep the size of the file down.  You
18619 should probably have a long expiry period, though, as some sites keep
18620 old articles for a long time.
18621 @end itemize
18622
18623 ... I wonder whether other newsreaders will support global score files
18624 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
18625 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
18626 holding our breath yet?
18627
18628
18629 @node Kill Files
18630 @section Kill Files
18631 @cindex kill files
18632
18633 Gnus still supports those pesky old kill files.  In fact, the kill file
18634 entries can now be expiring, which is something I wrote before Daniel
18635 Quinlan thought of doing score files, so I've left the code in there.
18636
18637 In short, kill processing is a lot slower (and I do mean @emph{a lot})
18638 than score processing, so it might be a good idea to rewrite your kill
18639 files into score files.
18640
18641 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
18642 forms into this file, which means that you can use kill files as some
18643 sort of primitive hook function to be run on group entry, even though
18644 that isn't a very good idea.
18645
18646 Normal kill files look like this:
18647
18648 @lisp
18649 (gnus-kill "From" "Lars Ingebrigtsen")
18650 (gnus-kill "Subject" "ding")
18651 (gnus-expunge "X")
18652 @end lisp
18653
18654 This will mark every article written by me as read, and remove the
18655 marked articles from the summary buffer.  Very useful, you'll agree.
18656
18657 Other programs use a totally different kill file syntax.  If Gnus
18658 encounters what looks like a @code{rn} kill file, it will take a stab at
18659 interpreting it.
18660
18661 Two summary functions for editing a GNUS kill file:
18662
18663 @table @kbd
18664
18665 @item M-k
18666 @kindex M-k (Summary)
18667 @findex gnus-summary-edit-local-kill
18668 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
18669
18670 @item M-K
18671 @kindex M-K (Summary)
18672 @findex gnus-summary-edit-global-kill
18673 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
18674 @end table
18675
18676 Two group mode functions for editing the kill files:
18677
18678 @table @kbd
18679
18680 @item M-k
18681 @kindex M-k (Group)
18682 @findex gnus-group-edit-local-kill
18683 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
18684
18685 @item M-K
18686 @kindex M-K (Group)
18687 @findex gnus-group-edit-global-kill
18688 Edit the general kill file (@code{gnus-group-edit-global-kill}).
18689 @end table
18690
18691 Kill file variables:
18692
18693 @table @code
18694 @item gnus-kill-file-name
18695 @vindex gnus-kill-file-name
18696 A kill file for the group @samp{soc.motss} is normally called
18697 @file{soc.motss.KILL}.  The suffix appended to the group name to get
18698 this file name is detailed by the @code{gnus-kill-file-name} variable.
18699 The ``global'' kill file (not in the score file sense of ``global'', of
18700 course) is just called @file{KILL}.
18701
18702 @vindex gnus-kill-save-kill-file
18703 @item gnus-kill-save-kill-file
18704 If this variable is non-@code{nil}, Gnus will save the
18705 kill file after processing, which is necessary if you use expiring
18706 kills.
18707
18708 @item gnus-apply-kill-hook
18709 @vindex gnus-apply-kill-hook
18710 @findex gnus-apply-kill-file-unless-scored
18711 @findex gnus-apply-kill-file
18712 A hook called to apply kill files to a group.  It is
18713 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
18714 kill file if you have a score file for the same group, you can set this
18715 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
18716 kill files to be processed, you should set this variable to @code{nil}.
18717
18718 @item gnus-kill-file-mode-hook
18719 @vindex gnus-kill-file-mode-hook
18720 A hook called in kill-file mode buffers.
18721
18722 @end table
18723
18724
18725 @node Converting Kill Files
18726 @section Converting Kill Files
18727 @cindex kill files
18728 @cindex converting kill files
18729
18730 If you have loads of old kill files, you may want to convert them into
18731 score files.  If they are ``regular'', you can use
18732 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
18733 by hand.
18734
18735 The kill to score conversion package isn't included in Gnus by default.
18736 You can fetch it from
18737 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
18738
18739 If your old kill files are very complex---if they contain more
18740 non-@code{gnus-kill} forms than not, you'll have to convert them by
18741 hand.  Or just let them be as they are.  Gnus will still use them as
18742 before.
18743
18744
18745 @node GroupLens
18746 @section GroupLens
18747 @cindex GroupLens
18748
18749 GroupLens (@uref{http://www.cs.umn.edu/Research/GroupLens/}) is a
18750 collaborative filtering system that helps you work together with other
18751 people to find the quality news articles out of the huge volume of
18752 news articles generated every day.
18753
18754 To accomplish this the GroupLens system combines your opinions about
18755 articles you have already read with the opinions of others who have done
18756 likewise and gives you a personalized prediction for each unread news
18757 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
18758 rate articles, and finds other people that rate articles the same way.
18759 Once it has found some people you agree with it tells you, in the form
18760 of a prediction, what they thought of the article.  You can use this
18761 prediction to help you decide whether or not you want to read the
18762 article.
18763
18764 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
18765 so this section is mostly of historical interest.
18766
18767 @menu
18768 * Using GroupLens::             How to make Gnus use GroupLens.
18769 * Rating Articles::             Letting GroupLens know how you rate articles.
18770 * Displaying Predictions::      Displaying predictions given by GroupLens.
18771 * GroupLens Variables::         Customizing GroupLens.
18772 @end menu
18773
18774
18775 @node Using GroupLens
18776 @subsection Using GroupLens
18777
18778 To use GroupLens you must register a pseudonym with your local Better
18779 Bit Bureau (BBB).
18780 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
18781 better bit in town at the moment.
18782
18783 Once you have registered you'll need to set a couple of variables.
18784
18785 @table @code
18786
18787 @item gnus-use-grouplens
18788 @vindex gnus-use-grouplens
18789 Setting this variable to a non-@code{nil} value will make Gnus hook into
18790 all the relevant GroupLens functions.
18791
18792 @item grouplens-pseudonym
18793 @vindex grouplens-pseudonym
18794 This variable should be set to the pseudonym you got when registering
18795 with the Better Bit Bureau.
18796
18797 @item grouplens-newsgroups
18798 @vindex grouplens-newsgroups
18799 A list of groups that you want to get GroupLens predictions for.
18800
18801 @end table
18802
18803 That's the minimum of what you need to get up and running with GroupLens.
18804 Once you've registered, GroupLens will start giving you scores for
18805 articles based on the average of what other people think.  But, to get
18806 the real benefit of GroupLens you need to start rating articles
18807 yourself.  Then the scores GroupLens gives you will be personalized for
18808 you, based on how the people you usually agree with have already rated.
18809
18810
18811 @node Rating Articles
18812 @subsection Rating Articles
18813
18814 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
18815 Where 1 means something like this article is a waste of bandwidth and 5
18816 means that the article was really good.  The basic question to ask
18817 yourself is, "on a scale from 1 to 5 would I like to see more articles
18818 like this one?"
18819
18820 There are four ways to enter a rating for an article in GroupLens.
18821
18822 @table @kbd
18823
18824 @item r
18825 @kindex r (GroupLens)
18826 @findex bbb-summary-rate-article
18827 This function will prompt you for a rating on a scale of one to five.
18828
18829 @item k
18830 @kindex k (GroupLens)
18831 @findex grouplens-score-thread
18832 This function will prompt you for a rating, and rate all the articles in
18833 the thread.  This is really useful for some of those long running giant
18834 threads in rec.humor.
18835
18836 @end table
18837
18838 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
18839 the score of the article you're reading.
18840
18841 @table @kbd
18842
18843 @item 1-5 n
18844 @kindex n (GroupLens)
18845 @findex grouplens-next-unread-article
18846 Rate the article and go to the next unread article.
18847
18848 @item 1-5 ,
18849 @kindex , (GroupLens)
18850 @findex grouplens-best-unread-article
18851 Rate the article and go to the next unread article with the highest score.
18852
18853 @end table
18854
18855 If you want to give the current article a score of 4 and then go to the
18856 next article, just type @kbd{4 n}.
18857
18858
18859 @node Displaying Predictions
18860 @subsection Displaying Predictions
18861
18862 GroupLens makes a prediction for you about how much you will like a
18863 news article.  The predictions from GroupLens are on a scale from 1 to
18864 5, where 1 is the worst and 5 is the best.  You can use the predictions
18865 from GroupLens in one of three ways controlled by the variable
18866 @code{gnus-grouplens-override-scoring}.
18867
18868 @vindex gnus-grouplens-override-scoring
18869 There are three ways to display predictions in grouplens.  You may
18870 choose to have the GroupLens scores contribute to, or override the
18871 regular gnus scoring mechanism.  override is the default; however, some
18872 people prefer to see the Gnus scores plus the grouplens scores.  To get
18873 the separate scoring behavior you need to set
18874 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
18875 GroupLens predictions combined with the grouplens scores set it to
18876 @code{'override} and to combine the scores set
18877 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
18878 the combine option you will also want to set the values for
18879 @code{grouplens-prediction-offset} and
18880 @code{grouplens-score-scale-factor}.
18881
18882 @vindex grouplens-prediction-display
18883 In either case, GroupLens gives you a few choices for how you would like
18884 to see your predictions displayed.  The display of predictions is
18885 controlled by the @code{grouplens-prediction-display} variable.
18886
18887 The following are valid values for that variable.
18888
18889 @table @code
18890 @item prediction-spot
18891 The higher the prediction, the further to the right an @samp{*} is
18892 displayed.
18893
18894 @item confidence-interval
18895 A numeric confidence interval.
18896
18897 @item prediction-bar
18898 The higher the prediction, the longer the bar.
18899
18900 @item confidence-bar
18901 Numerical confidence.
18902
18903 @item confidence-spot
18904 The spot gets bigger with more confidence.
18905
18906 @item prediction-num
18907 Plain-old numeric value.
18908
18909 @item confidence-plus-minus
18910 Prediction +/- confidence.
18911
18912 @end table
18913
18914
18915 @node GroupLens Variables
18916 @subsection GroupLens Variables
18917
18918 @table @code
18919
18920 @item gnus-summary-grouplens-line-format
18921 The summary line format used in GroupLens-enhanced summary buffers.  It
18922 accepts the same specs as the normal summary line format (@pxref{Summary
18923 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
18924 %s\n}.
18925
18926 @item grouplens-bbb-host
18927 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
18928 default.
18929
18930 @item grouplens-bbb-port
18931 Port of the host running the bbbd server.  The default is 9000.
18932
18933 @item grouplens-score-offset
18934 Offset the prediction by this value.  In other words, subtract the
18935 prediction value by this number to arrive at the effective score.  The
18936 default is 0.
18937
18938 @item grouplens-score-scale-factor
18939 This variable allows the user to magnify the effect of GroupLens scores.
18940 The scale factor is applied after the offset.  The default is 1.
18941
18942 @end table
18943
18944
18945 @node Advanced Scoring
18946 @section Advanced Scoring
18947
18948 Scoring on Subjects and From headers is nice enough, but what if you're
18949 really interested in what a person has to say only when she's talking
18950 about a particular subject?  Or what if you really don't want to
18951 read what person A has to say when she's following up to person B, but
18952 want to read what she says when she's following up to person C?
18953
18954 By using advanced scoring rules you may create arbitrarily complex
18955 scoring patterns.
18956
18957 @menu
18958 * Advanced Scoring Syntax::     A definition.
18959 * Advanced Scoring Examples::   What they look like.
18960 * Advanced Scoring Tips::       Getting the most out of it.
18961 @end menu
18962
18963
18964 @node Advanced Scoring Syntax
18965 @subsection Advanced Scoring Syntax
18966
18967 Ordinary scoring rules have a string as the first element in the rule.
18968 Advanced scoring rules have a list as the first element.  The second
18969 element is the score to be applied if the first element evaluated to a
18970 non-@code{nil} value.
18971
18972 These lists may consist of three logical operators, one redirection
18973 operator, and various match operators.
18974
18975 Logical operators:
18976
18977 @table @code
18978 @item &
18979 @itemx and
18980 This logical operator will evaluate each of its arguments until it finds
18981 one that evaluates to @code{false}, and then it'll stop.  If all arguments
18982 evaluate to @code{true} values, then this operator will return
18983 @code{true}.
18984
18985 @item |
18986 @itemx or
18987 This logical operator will evaluate each of its arguments until it finds
18988 one that evaluates to @code{true}.  If no arguments are @code{true},
18989 then this operator will return @code{false}.
18990
18991 @item !
18992 @itemx not
18993 @itemx Â¬
18994 This logical operator only takes a single argument.  It returns the
18995 logical negation of the value of its argument.
18996
18997 @end table
18998
18999 There is an @dfn{indirection operator} that will make its arguments
19000 apply to the ancestors of the current article being scored.  For
19001 instance, @code{1-} will make score rules apply to the parent of the
19002 current article.  @code{2-} will make score rules apply to the
19003 grandparent of the current article.  Alternatively, you can write
19004 @code{^^}, where the number of @code{^}s (carets) says how far back into
19005 the ancestry you want to go.
19006
19007 Finally, we have the match operators.  These are the ones that do the
19008 real work.  Match operators are header name strings followed by a match
19009 and a match type.  A typical match operator looks like @samp{("from"
19010 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
19011 simple scoring, and the match types are also the same.
19012
19013
19014 @node Advanced Scoring Examples
19015 @subsection Advanced Scoring Examples
19016
19017 Please note that the following examples are score file rules.  To
19018 make a complete score file from them, surround them with another pair
19019 of parentheses.
19020
19021 Let's say you want to increase the score of articles written by Lars
19022 when he's talking about Gnus:
19023
19024 @example
19025 ((&
19026   ("from" "Lars Ingebrigtsen")
19027   ("subject" "Gnus"))
19028  1000)
19029 @end example
19030
19031 Quite simple, huh?
19032
19033 When he writes long articles, he sometimes has something nice to say:
19034
19035 @example
19036 ((&
19037   ("from" "Lars Ingebrigtsen")
19038   (|
19039    ("subject" "Gnus")
19040    ("lines" 100 >)))
19041  1000)
19042 @end example
19043
19044 However, when he responds to things written by Reig Eigil Logge, you
19045 really don't want to read what he's written:
19046
19047 @example
19048 ((&
19049   ("from" "Lars Ingebrigtsen")
19050   (1- ("from" "Reig Eigir Logge")))
19051  -100000)
19052 @end example
19053
19054 Everybody that follows up Redmondo when he writes about disappearing
19055 socks should have their scores raised, but only when they talk about
19056 white socks.  However, when Lars talks about socks, it's usually not
19057 very interesting:
19058
19059 @example
19060 ((&
19061   (1-
19062    (&
19063     ("from" "redmondo@@.*no" r)
19064     ("body" "disappearing.*socks" t)))
19065   (! ("from" "Lars Ingebrigtsen"))
19066   ("body" "white.*socks"))
19067  1000)
19068 @end example
19069
19070 The possibilities are endless.
19071
19072
19073 @node Advanced Scoring Tips
19074 @subsection Advanced Scoring Tips
19075
19076 The @code{&} and @code{|} logical operators do short-circuit logic.
19077 That is, they stop processing their arguments when it's clear what the
19078 result of the operation will be.  For instance, if one of the arguments
19079 of an @code{&} evaluates to @code{false}, there's no point in evaluating
19080 the rest of the arguments.  This means that you should put slow matches
19081 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
19082 @samp{subject}) first.
19083
19084 The indirection arguments (@code{1-} and so on) will make their
19085 arguments work on previous generations of the thread.  If you say
19086 something like:
19087
19088 @example
19089 ...
19090 (1-
19091  (1-
19092   ("from" "lars")))
19093 ...
19094 @end example
19095
19096 Then that means "score on the from header of the grandparent of the
19097 current article".  An indirection is quite fast, but it's better to say:
19098
19099 @example
19100 (1-
19101  (&
19102   ("from" "Lars")
19103   ("subject" "Gnus")))
19104 @end example
19105
19106 than it is to say:
19107
19108 @example
19109 (&
19110  (1- ("from" "Lars"))
19111  (1- ("subject" "Gnus")))
19112 @end example
19113
19114
19115 @node Score Decays
19116 @section Score Decays
19117 @cindex score decays
19118 @cindex decays
19119
19120 You may find that your scores have a tendency to grow without
19121 bounds, especially if you're using adaptive scoring.  If scores get too
19122 big, they lose all meaning---they simply max out and it's difficult to
19123 use them in any sensible way.
19124
19125 @vindex gnus-decay-scores
19126 @findex gnus-decay-score
19127 @vindex gnus-decay-score-function
19128 Gnus provides a mechanism for decaying scores to help with this problem.
19129 When score files are loaded and @code{gnus-decay-scores} is
19130 non-@code{nil}, Gnus will run the score files through the decaying
19131 mechanism thereby lowering the scores of all non-permanent score rules.
19132 The decay itself if performed by the @code{gnus-decay-score-function}
19133 function, which is @code{gnus-decay-score} by default.  Here's the
19134 definition of that function:
19135
19136 @lisp
19137 (defun gnus-decay-score (score)
19138   "Decay SCORE.
19139 This is done according to `gnus-score-decay-constant'
19140 and `gnus-score-decay-scale'."
19141   (floor
19142    (- score
19143       (* (if (< score 0) 1 -1)
19144          (min (abs score)
19145               (max gnus-score-decay-constant
19146                    (* (abs score)
19147                       gnus-score-decay-scale)))))))
19148 @end lisp
19149
19150 @vindex gnus-score-decay-scale
19151 @vindex gnus-score-decay-constant
19152 @code{gnus-score-decay-constant} is 3 by default and
19153 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
19154
19155 @enumerate
19156 @item
19157 Scores between -3 and 3 will be set to 0 when this function is called.
19158
19159 @item
19160 Scores with magnitudes between 3 and 60 will be shrunk by 3.
19161
19162 @item
19163 Scores with magnitudes greater than 60 will be shrunk by 5% of the
19164 score.
19165 @end enumerate
19166
19167 If you don't like this decay function, write your own.  It is called
19168 with the score to be decayed as its only parameter, and it should return
19169 the new score, which should be an integer.
19170
19171 Gnus will try to decay scores once a day.  If you haven't run Gnus for
19172 four days, Gnus will decay the scores four times, for instance.
19173
19174 @iftex
19175 @iflatex
19176 @chapter Message
19177 @include message.texi
19178 @chapter Emacs MIME
19179 @include emacs-mime.texi
19180 @chapter Sieve
19181 @include sieve.texi
19182 @c @chapter PGG
19183 @c @include pgg.texi
19184 @end iflatex
19185 @end iftex
19186
19187 @node Various
19188 @chapter Various
19189
19190 @menu
19191 * Process/Prefix::              A convention used by many treatment commands.
19192 * Interactive::                 Making Gnus ask you many questions.
19193 * Symbolic Prefixes::           How to supply some Gnus functions with options.
19194 * Formatting Variables::        You can specify what buffers should look like.
19195 * Window Layout::               Configuring the Gnus buffer windows.
19196 * Faces and Fonts::             How to change how faces look.
19197 * Compilation::                 How to speed Gnus up.
19198 * Mode Lines::                  Displaying information in the mode lines.
19199 * Highlighting and Menus::      Making buffers look all nice and cozy.
19200 * Buttons::                     Get tendinitis in ten easy steps!
19201 * Daemons::                     Gnus can do things behind your back.
19202 * NoCeM::                       How to avoid spam and other fatty foods.
19203 * Undo::                        Some actions can be undone.
19204 * Predicate Specifiers::        Specifying predicates.
19205 * Moderation::                  What to do if you're a moderator.
19206 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
19207 * Fuzzy Matching::              What's the big fuzz?
19208 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
19209 * Various Various::             Things that are really various.
19210 @end menu
19211
19212
19213 @node Process/Prefix
19214 @section Process/Prefix
19215 @cindex process/prefix convention
19216
19217 Many functions, among them functions for moving, decoding and saving
19218 articles, use what is known as the @dfn{Process/Prefix convention}.
19219
19220 This is a method for figuring out what articles the user wants the
19221 command to be performed on.
19222
19223 It goes like this:
19224
19225 If the numeric prefix is N, perform the operation on the next N
19226 articles, starting with the current one.  If the numeric prefix is
19227 negative, perform the operation on the previous N articles, starting
19228 with the current one.
19229
19230 @vindex transient-mark-mode
19231 If @code{transient-mark-mode} in non-@code{nil} and the region is
19232 active, all articles in the region will be worked upon.
19233
19234 If there is no numeric prefix, but some articles are marked with the
19235 process mark, perform the operation on the articles marked with
19236 the process mark.
19237
19238 If there is neither a numeric prefix nor any articles marked with the
19239 process mark, just perform the operation on the current article.
19240
19241 Quite simple, really, but it needs to be made clear so that surprises
19242 are avoided.
19243
19244 Commands that react to the process mark will push the current list of
19245 process marked articles onto a stack and will then clear all process
19246 marked articles.  You can restore the previous configuration with the
19247 @kbd{M P y} command (@pxref{Setting Process Marks}).
19248
19249 @vindex gnus-summary-goto-unread
19250 One thing that seems to shock & horrify lots of people is that, for
19251 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
19252 Since each @kbd{d} (which marks the current article as read) by default
19253 goes to the next unread article after marking, this means that @kbd{3 d}
19254 will mark the next three unread articles as read, no matter what the
19255 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
19256 @code{nil} for a more straightforward action.
19257
19258 Many commands do not use the process/prefix convention.  All commands
19259 that do explicitly say so in this manual.  To apply the process/prefix
19260 convention to commands that do not use it, you can use the @kbd{M-&}
19261 command.  For instance, to mark all the articles in the group as
19262 expirable, you could say `M P b M-& E'.
19263
19264
19265 @node Interactive
19266 @section Interactive
19267 @cindex interaction
19268
19269 @table @code
19270
19271 @item gnus-novice-user
19272 @vindex gnus-novice-user
19273 If this variable is non-@code{nil}, you are either a newcomer to the
19274 World of Usenet, or you are very cautious, which is a nice thing to be,
19275 really.  You will be given questions of the type ``Are you sure you want
19276 to do this?'' before doing anything dangerous.  This is @code{t} by
19277 default.
19278
19279 @item gnus-expert-user
19280 @vindex gnus-expert-user
19281 If this variable is non-@code{nil}, you will seldom be asked any
19282 questions by Gnus.  It will simply assume you know what you're doing, no
19283 matter how strange.
19284
19285 @item gnus-interactive-catchup
19286 @vindex gnus-interactive-catchup
19287 Require confirmation before catching up a group if non-@code{nil}.  It
19288 is @code{t} by default.
19289
19290 @item gnus-interactive-exit
19291 @vindex gnus-interactive-exit
19292 Require confirmation before exiting Gnus.  This variable is @code{t} by
19293 default.
19294 @end table
19295
19296
19297 @node Symbolic Prefixes
19298 @section Symbolic Prefixes
19299 @cindex symbolic prefixes
19300
19301 Quite a lot of Emacs commands react to the (numeric) prefix.  For
19302 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
19303 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
19304 rule of 900 to the current article.
19305
19306 This is all nice and well, but what if you want to give a command some
19307 additional information?  Well, what most commands do is interpret the
19308 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
19309 doesn't want a backup file to be created when saving the current buffer,
19310 for instance.  But what if you want to save without making a backup
19311 file, and you want Emacs to flash lights and play a nice tune at the
19312 same time?  You can't, and you're probably perfectly happy that way.
19313
19314 @kindex M-i (Summary)
19315 @findex gnus-symbolic-argument
19316 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
19317 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
19318 character typed in is the value.  You can stack as many @kbd{M-i}
19319 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
19320 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
19321 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
19322 @code{b}''.  You get the drift.
19323
19324 Typing in symbolic prefixes to commands that don't accept them doesn't
19325 hurt, but it doesn't do any good either.  Currently not many Gnus
19326 functions make use of the symbolic prefix.
19327
19328 If you're interested in how Gnus implements this, @pxref{Extended
19329 Interactive}.
19330
19331
19332 @node Formatting Variables
19333 @section Formatting Variables
19334 @cindex formatting variables
19335
19336 Throughout this manual you've probably noticed lots of variables called
19337 things like @code{gnus-group-line-format} and
19338 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
19339 output lines in the various buffers.  There's quite a lot of them.
19340 Fortunately, they all use the same syntax, so there's not that much to
19341 be annoyed by.
19342
19343 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
19344 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
19345 lots of percentages everywhere.
19346
19347 @menu
19348 * Formatting Basics::           A formatting variable is basically a format string.
19349 * Mode Line Formatting::        Some rules about mode line formatting variables.
19350 * Advanced Formatting::         Modifying output in various ways.
19351 * User-Defined Specs::          Having Gnus call your own functions.
19352 * Formatting Fonts::            Making the formatting look colorful and nice.
19353 * Positioning Point::           Moving point to a position after an operation.
19354 * Tabulation::                  Tabulating your output.
19355 * Wide Characters::             Dealing with wide characters.
19356 @end menu
19357
19358 Currently Gnus uses the following formatting variables:
19359 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
19360 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
19361 @code{gnus-group-mode-line-format},
19362 @code{gnus-summary-mode-line-format},
19363 @code{gnus-article-mode-line-format},
19364 @code{gnus-server-mode-line-format}, and
19365 @code{gnus-summary-pick-line-format}.
19366
19367 All these format variables can also be arbitrary elisp forms.  In that
19368 case, they will be @code{eval}ed to insert the required lines.
19369
19370 @kindex M-x gnus-update-format
19371 @findex gnus-update-format
19372 Gnus includes a command to help you while creating your own format
19373 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
19374 update the spec in question and pop you to a buffer where you can
19375 examine the resulting lisp code to be run to generate the line.
19376
19377
19378
19379 @node Formatting Basics
19380 @subsection Formatting Basics
19381
19382 Each @samp{%} element will be replaced by some string or other when the
19383 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
19384 spec, and pad with spaces to get a 5-character field''.
19385
19386 As with normal C and Emacs Lisp formatting strings, the numerical
19387 modifier between the @samp{%} and the formatting type character will
19388 @dfn{pad} the output so that it is always at least that long.
19389 @samp{%5y} will make the field always (at least) five characters wide by
19390 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
19391 the right instead.
19392
19393 You may also wish to limit the length of the field to protect against
19394 particularly wide values.  For that you can say @samp{%4,6y}, which
19395 means that the field will never be more than 6 characters wide and never
19396 less than 4 characters wide.
19397
19398 Also Gnus supports some extended format specifications, such as
19399 @samp{%&user-date;}.
19400
19401
19402 @node Mode Line Formatting
19403 @subsection Mode Line Formatting
19404
19405 Mode line formatting variables (e.g.,
19406 @code{gnus-summary-mode-line-format}) follow the same rules as other,
19407 buffer line oriented formatting variables (@pxref{Formatting Basics})
19408 with the following two differences:
19409
19410 @enumerate
19411
19412 @item
19413 There must be no newline (@samp{\n}) at the end.
19414
19415 @item
19416 The special @samp{%%b} spec can be used to display the buffer name.
19417 Well, it's no spec at all, really---@samp{%%} is just a way to quote
19418 @samp{%} to allow it to pass through the formatting machinery unmangled,
19419 so that Emacs receives @samp{%b}, which is something the Emacs mode line
19420 display interprets to mean ``show the buffer name''.  For a full list of
19421 mode line specs Emacs understands, see the documentation of the
19422 @code{mode-line-format} variable.
19423
19424 @end enumerate
19425
19426
19427 @node Advanced Formatting
19428 @subsection Advanced Formatting
19429
19430 It is frequently useful to post-process the fields in some way.
19431 Padding, limiting, cutting off parts and suppressing certain values can
19432 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
19433 look like @samp{%~(cut 3)~(ignore "0")y}.
19434
19435 These are the valid modifiers:
19436
19437 @table @code
19438 @item pad
19439 @itemx pad-left
19440 Pad the field to the left with spaces until it reaches the required
19441 length.
19442
19443 @item pad-right
19444 Pad the field to the right with spaces until it reaches the required
19445 length.
19446
19447 @item max
19448 @itemx max-left
19449 Cut off characters from the left until it reaches the specified length.
19450
19451 @item max-right
19452 Cut off characters from the right until it reaches the specified
19453 length.
19454
19455 @item cut
19456 @itemx cut-left
19457 Cut off the specified number of characters from the left.
19458
19459 @item cut-right
19460 Cut off the specified number of characters from the right.
19461
19462 @item ignore
19463 Return an empty string if the field is equal to the specified value.
19464
19465 @item form
19466 Use the specified form as the field value when the @samp{@@} spec is
19467 used.
19468
19469 Here's an example:
19470
19471 @lisp
19472 "~(form (current-time-string))@@"
19473 @end lisp
19474
19475 @end table
19476
19477 Let's take an example.  The @samp{%o} spec in the summary mode lines
19478 will return a date in compact ISO8601 format---@samp{19960809T230410}.
19479 This is quite a mouthful, so we want to shave off the century number and
19480 the time, leaving us with a six-character date.  That would be
19481 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
19482 maxing, and we need the padding to ensure that the date is never less
19483 than 6 characters to make it look nice in columns.)
19484
19485 Ignoring is done first; then cutting; then maxing; and then as the very
19486 last operation, padding.
19487
19488 @vindex gnus-compile-user-specs
19489 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
19490 default) with your strong personality, and use a lots of these advanced
19491 thingies, you'll find that Gnus gets quite slow.  This can be helped
19492 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
19493 the look of your lines.
19494 @xref{Compilation}.
19495
19496
19497 @node User-Defined Specs
19498 @subsection User-Defined Specs
19499
19500 All the specs allow for inserting user defined specifiers---@samp{u}.
19501 The next character in the format string should be a letter.  Gnus
19502 will call the function @code{gnus-user-format-function-}@samp{X}, where
19503 @samp{X} is the letter following @samp{%u}.  The function will be passed
19504 a single parameter---what the parameter means depends on what buffer
19505 it's being called from.  The function should return a string, which will
19506 be inserted into the buffer just like information from any other
19507 specifier.  This function may also be called with dummy values, so it
19508 should protect against that.
19509
19510 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
19511 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
19512
19513 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
19514 much the same without defining new functions.  Here's an example:
19515 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
19516 given here will be evaluated to yield the current line number, and then
19517 inserted.
19518
19519
19520 @node Formatting Fonts
19521 @subsection Formatting Fonts
19522
19523 There are specs for highlighting, and these are shared by all the format
19524 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
19525 the special @code{mouse-face} property set, which means that it will be
19526 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
19527 over it.
19528
19529 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
19530 normal faces set using @code{gnus-face-0}, which is @code{bold} by
19531 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
19532 and so on.  Create as many faces as you wish.  The same goes for the
19533 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
19534 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
19535
19536 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
19537 special @code{balloon-help} property set to @code{gnus-balloon-face-0}.
19538 If you say @samp{%1<<}, you'll get @code{gnus-balloon-face-1} and so on.
19539 The @code{gnus-balloon-face-*} variables should be either strings or
19540 symbols naming functions that return a string.  When the mouse passes
19541 over text with this property set, a balloon window will appear and
19542 display the string.  Please refer to @ref{(emacs)Help Echo} (in GNU
19543 Emacs) or the doc string of @code{balloon-help-mode} (in XEmacs) for
19544 more information on this.  (For technical reasons, the guillemets have
19545 been approximated as @samp{<<} and @samp{>>} in this paragraph.)
19546
19547 Here's an alternative recipe for the group buffer:
19548
19549 @lisp
19550 ;; Create three face types.
19551 (setq gnus-face-1 'bold)
19552 (setq gnus-face-3 'italic)
19553
19554 ;; We want the article count to be in
19555 ;; a bold and green face.  So we create
19556 ;; a new face called `my-green-bold'.
19557 (copy-face 'bold 'my-green-bold)
19558 ;; Set the color.
19559 (set-face-foreground 'my-green-bold "ForestGreen")
19560 (setq gnus-face-2 'my-green-bold)
19561
19562 ;; Set the new & fancy format.
19563 (setq gnus-group-line-format
19564       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
19565 @end lisp
19566
19567 I'm sure you'll be able to use this scheme to create totally unreadable
19568 and extremely vulgar displays.  Have fun!
19569
19570 Note that the @samp{%(} specs (and friends) do not make any sense on the
19571 mode-line variables.
19572
19573 @node Positioning Point
19574 @subsection Positioning Point
19575
19576 Gnus usually moves point to a pre-defined place on each line in most
19577 buffers.  By default, point move to the first colon character on the
19578 line.  You can customize this behaviour in three different ways.
19579
19580 You can move the colon character to somewhere else on the line.
19581
19582 @findex gnus-goto-colon
19583 You can redefine the function that moves the point to the colon.  The
19584 function is called @code{gnus-goto-colon}.
19585
19586 But perhaps the most convenient way to deal with this, if you don't want
19587 to have a colon in your line, is to use the @samp{%C} specifier.  If you
19588 put a @samp{%C} somewhere in your format line definition, Gnus will
19589 place point there.
19590
19591
19592 @node Tabulation
19593 @subsection Tabulation
19594
19595 You can usually line up your displays by padding and cutting your
19596 strings.  However, when combining various strings of different size, it
19597 can often be more convenient to just output the strings, and then worry
19598 about lining up the following text afterwards.
19599
19600 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
19601 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
19602
19603 @samp{%50=} will insert space characters to pad the line up to column
19604 50.  If the text is already past column 50, nothing will be inserted.
19605 This is the soft tabulator.
19606
19607 @samp{%-50=} will insert space characters to pad the line up to column
19608 50.  If the text is already past column 50, the excess text past column
19609 50 will be removed.  This is the hard tabulator.
19610
19611
19612 @node Wide Characters
19613 @subsection Wide Characters
19614
19615 Proportional fonts in most countries have characters of the same width.
19616 Some countries, however, use Latin characters mixed with wider
19617 characters---most notable East Asian countries.
19618
19619 The problem is that when formatting, Gnus assumes that if a string is 10
19620 characters wide, it'll be 10 Latin characters wide on the screen.  In
19621 these coutries, that's not true.
19622
19623 @vindex gnus-use-correct-string-widths
19624 To help fix this, you can set @code{gnus-use-correct-string-widths} to
19625 @code{t}.  This makes buffer generation slower, but the results will be
19626 prettieer.  The default value under XEmacs is @code{t} but @code{nil}
19627 for Emacs.
19628
19629
19630 @node Window Layout
19631 @section Window Layout
19632 @cindex window layout
19633
19634 No, there's nothing here about X, so be quiet.
19635
19636 @vindex gnus-use-full-window
19637 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
19638 other windows and occupy the entire Emacs screen by itself.  It is
19639 @code{t} by default.
19640
19641 Setting this variable to @code{nil} kinda works, but there are
19642 glitches.  Use at your own peril.
19643
19644 @vindex gnus-buffer-configuration
19645 @code{gnus-buffer-configuration} describes how much space each Gnus
19646 buffer should be given.  Here's an excerpt of this variable:
19647
19648 @lisp
19649 ((group (vertical 1.0 (group 1.0 point)
19650                       (if gnus-carpal (group-carpal 4))))
19651  (article (vertical 1.0 (summary 0.25 point)
19652                         (article 1.0))))
19653 @end lisp
19654
19655 This is an alist.  The @dfn{key} is a symbol that names some action or
19656 other.  For instance, when displaying the group buffer, the window
19657 configuration function will use @code{group} as the key.  A full list of
19658 possible names is listed below.
19659
19660 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
19661 should occupy.  To take the @code{article} split as an example -
19662
19663 @lisp
19664 (article (vertical 1.0 (summary 0.25 point)
19665                        (article 1.0)))
19666 @end lisp
19667
19668 This @dfn{split} says that the summary buffer should occupy 25% of upper
19669 half of the screen, and that it is placed over the article buffer.  As
19670 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
19671 reaching for that calculator there).  However, the special number
19672 @code{1.0} is used to signal that this buffer should soak up all the
19673 rest of the space available after the rest of the buffers have taken
19674 whatever they need.  There should be only one buffer with the @code{1.0}
19675 size spec per split.
19676
19677 Point will be put in the buffer that has the optional third element
19678 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
19679 split where the tag @code{frame-focus} is a member (i.e. is the third or
19680 fourth element in the list, depending on whether the @code{point} tag is
19681 present) gets focus.
19682
19683 Here's a more complicated example:
19684
19685 @lisp
19686 (article (vertical 1.0 (group 4)
19687                        (summary 0.25 point)
19688                        (if gnus-carpal (summary-carpal 4))
19689                        (article 1.0)))
19690 @end lisp
19691
19692 If the size spec is an integer instead of a floating point number,
19693 then that number will be used to say how many lines a buffer should
19694 occupy, not a percentage.
19695
19696 If the @dfn{split} looks like something that can be @code{eval}ed (to be
19697 precise---if the @code{car} of the split is a function or a subr), this
19698 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
19699 be used as a split.  This means that there will be three buffers if
19700 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
19701 is non-@code{nil}.
19702
19703 Not complicated enough for you?  Well, try this on for size:
19704
19705 @lisp
19706 (article (horizontal 1.0
19707              (vertical 0.5
19708                  (group 1.0)
19709                  (gnus-carpal 4))
19710              (vertical 1.0
19711                  (summary 0.25 point)
19712                  (summary-carpal 4)
19713                  (article 1.0))))
19714 @end lisp
19715
19716 Whoops.  Two buffers with the mystery 100% tag.  And what's that
19717 @code{horizontal} thingie?
19718
19719 If the first element in one of the split is @code{horizontal}, Gnus will
19720 split the window horizontally, giving you two windows side-by-side.
19721 Inside each of these strips you may carry on all you like in the normal
19722 fashion.  The number following @code{horizontal} says what percentage of
19723 the screen is to be given to this strip.
19724
19725 For each split, there @emph{must} be one element that has the 100% tag.
19726 The splitting is never accurate, and this buffer will eat any leftover
19727 lines from the splits.
19728
19729 To be slightly more formal, here's a definition of what a valid split
19730 may look like:
19731
19732 @example
19733 split      = frame | horizontal | vertical | buffer | form
19734 frame      = "(frame " size *split ")"
19735 horizontal = "(horizontal " size *split ")"
19736 vertical   = "(vertical " size *split ")"
19737 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
19738 size       = number | frame-params
19739 buf-name   = group | article | summary ...
19740 @end example
19741
19742 The limitations are that the @code{frame} split can only appear as the
19743 top-level split.  @var{form} should be an Emacs Lisp form that should
19744 return a valid split.  We see that each split is fully recursive, and
19745 may contain any number of @code{vertical} and @code{horizontal} splits.
19746
19747 @vindex gnus-window-min-width
19748 @vindex gnus-window-min-height
19749 @cindex window height
19750 @cindex window width
19751 Finding the right sizes can be a bit complicated.  No window may be less
19752 than @code{gnus-window-min-height} (default 1) characters high, and all
19753 windows must be at least @code{gnus-window-min-width} (default 1)
19754 characters wide.  Gnus will try to enforce this before applying the
19755 splits.  If you want to use the normal Emacs window width/height limit,
19756 you can just set these two variables to @code{nil}.
19757
19758 If you're not familiar with Emacs terminology, @code{horizontal} and
19759 @code{vertical} splits may work the opposite way of what you'd expect.
19760 Windows inside a @code{horizontal} split are shown side-by-side, and
19761 windows within a @code{vertical} split are shown above each other.
19762
19763 @findex gnus-configure-frame
19764 If you want to experiment with window placement, a good tip is to call
19765 @code{gnus-configure-frame} directly with a split.  This is the function
19766 that does all the real work when splitting buffers.  Below is a pretty
19767 nonsensical configuration with 5 windows; two for the group buffer and
19768 three for the article buffer.  (I said it was nonsensical.)  If you
19769 @code{eval} the statement below, you can get an idea of how that would
19770 look straight away, without going through the normal Gnus channels.
19771 Play with it until you're satisfied, and then use
19772 @code{gnus-add-configuration} to add your new creation to the buffer
19773 configuration list.
19774
19775 @lisp
19776 (gnus-configure-frame
19777  '(horizontal 1.0
19778     (vertical 10
19779       (group 1.0)
19780       (article 0.3 point))
19781     (vertical 1.0
19782       (article 1.0)
19783       (horizontal 4
19784         (group 1.0)
19785         (article 10)))))
19786 @end lisp
19787
19788 You might want to have several frames as well.  No prob---just use the
19789 @code{frame} split:
19790
19791 @lisp
19792 (gnus-configure-frame
19793  '(frame 1.0
19794          (vertical 1.0
19795                    (summary 0.25 point frame-focus)
19796                    (article 1.0))
19797          (vertical ((height . 5) (width . 15)
19798                     (user-position . t)
19799                     (left . -1) (top . 1))
19800                    (picon 1.0))))
19801
19802 @end lisp
19803
19804 This split will result in the familiar summary/article window
19805 configuration in the first (or ``main'') frame, while a small additional
19806 frame will be created where picons will be shown.  As you can see,
19807 instead of the normal @code{1.0} top-level spec, each additional split
19808 should have a frame parameter alist as the size spec.
19809 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
19810 Reference Manual}.  Under XEmacs, a frame property list will be
19811 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
19812 is such a plist.
19813 The list of all possible keys for @code{gnus-buffer-configuration} can
19814 be found in its default value.
19815
19816 Note that the @code{message} key is used for both
19817 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
19818 it is desirable to distinguish between the two, something like this
19819 might be used:
19820
19821 @lisp
19822 (message (horizontal 1.0
19823                      (vertical 1.0 (message 1.0 point))
19824                      (vertical 0.24
19825                                (if (buffer-live-p gnus-summary-buffer)
19826                                    '(summary 0.5))
19827                                (group 1.0)))))
19828 @end lisp
19829
19830 One common desire for a multiple frame split is to have a separate frame
19831 for composing mail and news while leaving the original frame intact.  To
19832 accomplish that, something like the following can be done:
19833
19834 @lisp
19835 (message
19836   (frame 1.0
19837          (if (not (buffer-live-p gnus-summary-buffer))
19838              (car (cdr (assoc 'group gnus-buffer-configuration)))
19839            (car (cdr (assoc 'summary gnus-buffer-configuration))))
19840          (vertical ((user-position . t) (top . 1) (left . 1)
19841                     (name . "Message"))
19842                    (message 1.0 point))))
19843 @end lisp
19844
19845 @findex gnus-add-configuration
19846 Since the @code{gnus-buffer-configuration} variable is so long and
19847 complicated, there's a function you can use to ease changing the config
19848 of a single setting: @code{gnus-add-configuration}.  If, for instance,
19849 you want to change the @code{article} setting, you could say:
19850
19851 @lisp
19852 (gnus-add-configuration
19853  '(article (vertical 1.0
19854                (group 4)
19855                (summary .25 point)
19856                (article 1.0))))
19857 @end lisp
19858
19859 You'd typically stick these @code{gnus-add-configuration} calls in your
19860 @file{.gnus.el} file or in some startup hook---they should be run after
19861 Gnus has been loaded.
19862
19863 @vindex gnus-always-force-window-configuration
19864 If all windows mentioned in the configuration are already visible, Gnus
19865 won't change the window configuration.  If you always want to force the
19866 ``right'' window configuration, you can set
19867 @code{gnus-always-force-window-configuration} to non-@code{nil}.
19868
19869 If you're using tree displays (@pxref{Tree Display}), and the tree
19870 window is displayed vertically next to another window, you may also want
19871 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
19872 windows resized.
19873
19874 @subsection Example Window Configurations
19875
19876 @itemize @bullet
19877 @item
19878 Narrow left hand side occupied by group buffer.  Right hand side split
19879 between summary buffer (top one-sixth) and article buffer (bottom).
19880
19881 @ifinfo
19882 @example
19883 +---+---------+
19884 | G | Summary |
19885 | r +---------+
19886 | o |         |
19887 | u | Article |
19888 | p |         |
19889 +---+---------+
19890 @end example
19891 @end ifinfo
19892
19893 @lisp
19894 (gnus-add-configuration
19895  '(article
19896    (horizontal 1.0
19897                (vertical 25 (group 1.0))
19898                (vertical 1.0
19899                          (summary 0.16 point)
19900                          (article 1.0)))))
19901
19902 (gnus-add-configuration
19903  '(summary
19904    (horizontal 1.0
19905                (vertical 25 (group 1.0))
19906                (vertical 1.0 (summary 1.0 point)))))
19907 @end lisp
19908
19909 @end itemize
19910
19911
19912 @node Faces and Fonts
19913 @section Faces and Fonts
19914 @cindex faces
19915 @cindex fonts
19916 @cindex colors
19917
19918 Fiddling with fonts and faces used to be very difficult, but these days
19919 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
19920 the face you want to alter, and alter it via the standard Customize
19921 interface.
19922
19923
19924 @node Compilation
19925 @section Compilation
19926 @cindex compilation
19927 @cindex byte-compilation
19928
19929 @findex gnus-compile
19930
19931 Remember all those line format specification variables?
19932 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
19933 on.  By default, T-gnus will use the byte-compiled codes of these
19934 variables and we can keep a slow-down to a minimum.  However, if you set
19935 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
19936 unfortunately, changing them will mean a quite significant slow-down.
19937 (The default values of these variables have byte-compiled functions
19938 associated with them, while the user-generated versions do not, of
19939 course.)
19940
19941 To help with this, you can run @kbd{M-x gnus-compile} after you've
19942 fiddled around with the variables and feel that you're (kind of)
19943 satisfied.  This will result in the new specs being byte-compiled, and
19944 you'll get top speed again.  Note that T-gnus will not save these
19945 compiled specs in the @file{.newsrc.eld} file.
19946
19947 @table @code
19948 @item gnus-compile-user-specs
19949 @vindex gnus-compile-user-specs
19950 If it is non-nil, the user-defined format specs will be byte-compiled
19951 automatically.  The default value of this variable is @code{t}.  It has
19952 an effect on the values of @code{gnus-*-line-format-spec}.
19953 @end table
19954
19955
19956 @node Mode Lines
19957 @section Mode Lines
19958 @cindex mode lines
19959
19960 @vindex gnus-updated-mode-lines
19961 @code{gnus-updated-mode-lines} says what buffers should keep their mode
19962 lines updated.  It is a list of symbols.  Supported symbols include
19963 @code{group}, @code{article}, @code{summary}, @code{server},
19964 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
19965 Gnus will keep that mode line updated with information that may be
19966 pertinent.  If this variable is @code{nil}, screen refresh may be
19967 quicker.
19968
19969 @cindex display-time
19970
19971 @vindex gnus-mode-non-string-length
19972 By default, Gnus displays information on the current article in the mode
19973 lines of the summary and article buffers.  The information Gnus wishes
19974 to display (e.g. the subject of the article) is often longer than the
19975 mode lines, and therefore have to be cut off at some point.  The
19976 @code{gnus-mode-non-string-length} variable says how long the other
19977 elements on the line is (i.e., the non-info part).  If you put
19978 additional elements on the mode line (e.g. a clock), you should modify
19979 this variable:
19980
19981 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
19982 @lisp
19983 (add-hook 'display-time-hook
19984           (lambda () (setq gnus-mode-non-string-length
19985                            (+ 21
19986                               (if line-number-mode 5 0)
19987                               (if column-number-mode 4 0)
19988                               (length display-time-string)))))
19989 @end lisp
19990
19991 If this variable is @code{nil} (which is the default), the mode line
19992 strings won't be chopped off, and they won't be padded either.  Note
19993 that the default is unlikely to be desirable, as even the percentage
19994 complete in the buffer may be crowded off the mode line; the user should
19995 configure this variable appropriately for her configuration.
19996
19997
19998 @node Highlighting and Menus
19999 @section Highlighting and Menus
20000 @cindex visual
20001 @cindex highlighting
20002 @cindex menus
20003
20004 @vindex gnus-visual
20005 The @code{gnus-visual} variable controls most of the Gnus-prettifying
20006 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
20007 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
20008 file.
20009
20010 This variable can be a list of visual properties that are enabled.  The
20011 following elements are valid, and are all included by default:
20012
20013 @table @code
20014 @item group-highlight
20015 Do highlights in the group buffer.
20016 @item summary-highlight
20017 Do highlights in the summary buffer.
20018 @item article-highlight
20019 Do highlights in the article buffer.
20020 @item highlight
20021 Turn on highlighting in all buffers.
20022 @item group-menu
20023 Create menus in the group buffer.
20024 @item summary-menu
20025 Create menus in the summary buffers.
20026 @item article-menu
20027 Create menus in the article buffer.
20028 @item browse-menu
20029 Create menus in the browse buffer.
20030 @item server-menu
20031 Create menus in the server buffer.
20032 @item score-menu
20033 Create menus in the score buffers.
20034 @item menu
20035 Create menus in all buffers.
20036 @end table
20037
20038 So if you only want highlighting in the article buffer and menus in all
20039 buffers, you could say something like:
20040
20041 @lisp
20042 (setq gnus-visual '(article-highlight menu))
20043 @end lisp
20044
20045 If you want highlighting only and no menus whatsoever, you'd say:
20046
20047 @lisp
20048 (setq gnus-visual '(highlight))
20049 @end lisp
20050
20051 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
20052 in all Gnus buffers.
20053
20054 Other general variables that influence the look of all buffers include:
20055
20056 @table @code
20057 @item gnus-mouse-face
20058 @vindex gnus-mouse-face
20059 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
20060 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
20061
20062 @end table
20063
20064 There are hooks associated with the creation of all the different menus:
20065
20066 @table @code
20067
20068 @item gnus-article-menu-hook
20069 @vindex gnus-article-menu-hook
20070 Hook called after creating the article mode menu.
20071
20072 @item gnus-group-menu-hook
20073 @vindex gnus-group-menu-hook
20074 Hook called after creating the group mode menu.
20075
20076 @item gnus-summary-menu-hook
20077 @vindex gnus-summary-menu-hook
20078 Hook called after creating the summary mode menu.
20079
20080 @item gnus-server-menu-hook
20081 @vindex gnus-server-menu-hook
20082 Hook called after creating the server mode menu.
20083
20084 @item gnus-browse-menu-hook
20085 @vindex gnus-browse-menu-hook
20086 Hook called after creating the browse mode menu.
20087
20088 @item gnus-score-menu-hook
20089 @vindex gnus-score-menu-hook
20090 Hook called after creating the score mode menu.
20091
20092 @end table
20093
20094
20095 @node Buttons
20096 @section Buttons
20097 @cindex buttons
20098 @cindex mouse
20099 @cindex click
20100
20101 Those new-fangled @dfn{mouse} contraptions is very popular with the
20102 young, hep kids who don't want to learn the proper way to do things
20103 these days.  Why, I remember way back in the summer of '89, when I was
20104 using Emacs on a Tops 20 system.  Three hundred users on one single
20105 machine, and every user was running Simula compilers.  Bah!
20106
20107 Right.
20108
20109 @vindex gnus-carpal
20110 Well, you can make Gnus display bufferfuls of buttons you can click to
20111 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
20112 really.  Tell the chiropractor I sent you.
20113
20114
20115 @table @code
20116
20117 @item gnus-carpal-mode-hook
20118 @vindex gnus-carpal-mode-hook
20119 Hook run in all carpal mode buffers.
20120
20121 @item gnus-carpal-button-face
20122 @vindex gnus-carpal-button-face
20123 Face used on buttons.
20124
20125 @item gnus-carpal-header-face
20126 @vindex gnus-carpal-header-face
20127 Face used on carpal buffer headers.
20128
20129 @item gnus-carpal-group-buffer-buttons
20130 @vindex gnus-carpal-group-buffer-buttons
20131 Buttons in the group buffer.
20132
20133 @item gnus-carpal-summary-buffer-buttons
20134 @vindex gnus-carpal-summary-buffer-buttons
20135 Buttons in the summary buffer.
20136
20137 @item gnus-carpal-server-buffer-buttons
20138 @vindex gnus-carpal-server-buffer-buttons
20139 Buttons in the server buffer.
20140
20141 @item gnus-carpal-browse-buffer-buttons
20142 @vindex gnus-carpal-browse-buffer-buttons
20143 Buttons in the browse buffer.
20144 @end table
20145
20146 All the @code{buttons} variables are lists.  The elements in these list
20147 are either cons cells where the @code{car} contains a text to be displayed and
20148 the @code{cdr} contains a function symbol, or a simple string.
20149
20150
20151 @node Daemons
20152 @section Daemons
20153 @cindex demons
20154 @cindex daemons
20155
20156 Gnus, being larger than any program ever written (allegedly), does lots
20157 of strange stuff that you may wish to have done while you're not
20158 present.  For instance, you may want it to check for new mail once in a
20159 while.  Or you may want it to close down all connections to all servers
20160 when you leave Emacs idle.  And stuff like that.
20161
20162 Gnus will let you do stuff like that by defining various
20163 @dfn{handlers}.  Each handler consists of three elements:  A
20164 @var{function}, a @var{time}, and an @var{idle} parameter.
20165
20166 Here's an example of a handler that closes connections when Emacs has
20167 been idle for thirty minutes:
20168
20169 @lisp
20170 (gnus-demon-close-connections nil 30)
20171 @end lisp
20172
20173 Here's a handler that scans for PGP headers every hour when Emacs is
20174 idle:
20175
20176 @lisp
20177 (gnus-demon-scan-pgp 60 t)
20178 @end lisp
20179
20180 This @var{time} parameter and than @var{idle} parameter work together
20181 in a strange, but wonderful fashion.  Basically, if @var{idle} is
20182 @code{nil}, then the function will be called every @var{time} minutes.
20183
20184 If @var{idle} is @code{t}, then the function will be called after
20185 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
20186 the function will never be called.  But once Emacs goes idle, the
20187 function will be called every @var{time} minutes.
20188
20189 If @var{idle} is a number and @var{time} is a number, the function will
20190 be called every @var{time} minutes only when Emacs has been idle for
20191 @var{idle} minutes.
20192
20193 If @var{idle} is a number and @var{time} is @code{nil}, the function
20194 will be called once every time Emacs has been idle for @var{idle}
20195 minutes.
20196
20197 And if @var{time} is a string, it should look like @samp{07:31}, and
20198 the function will then be called once every day somewhere near that
20199 time.  Modified by the @var{idle} parameter, of course.
20200
20201 @vindex gnus-demon-timestep
20202 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
20203 seconds.  This is 60 by default.  If you change that variable,
20204 all the timings in the handlers will be affected.)
20205
20206 So, if you want to add a handler, you could put something like this in
20207 your @file{.gnus} file:
20208
20209 @findex gnus-demon-add-handler
20210 @lisp
20211 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
20212 @end lisp
20213
20214 @findex gnus-demon-add-nocem
20215 @findex gnus-demon-add-scanmail
20216 @findex gnus-demon-add-rescan
20217 @findex gnus-demon-add-scan-timestamps
20218 @findex gnus-demon-add-disconnection
20219 Some ready-made functions to do this have been created:
20220 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
20221 @code{gnus-demon-add-nntp-close-connection},
20222 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
20223 @code{gnus-demon-add-scanmail}.  Just put those functions in your
20224 @file{.gnus} if you want those abilities.
20225
20226 @findex gnus-demon-init
20227 @findex gnus-demon-cancel
20228 @vindex gnus-demon-handlers
20229 If you add handlers to @code{gnus-demon-handlers} directly, you should
20230 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
20231 daemons, you can use the @code{gnus-demon-cancel} function.
20232
20233 Note that adding daemons can be pretty naughty if you over do it.  Adding
20234 functions that scan all news and mail from all servers every two seconds
20235 is a sure-fire way of getting booted off any respectable system.  So
20236 behave.
20237
20238
20239 @node NoCeM
20240 @section NoCeM
20241 @cindex nocem
20242 @cindex spam
20243
20244 @dfn{Spamming} is posting the same article lots and lots of times.
20245 Spamming is bad.  Spamming is evil.
20246
20247 Spamming is usually canceled within a day or so by various anti-spamming
20248 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
20249 NoCeM is pronounced ``no see-'em'', and means what the name
20250 implies---these are messages that make the offending articles, like, go
20251 away.
20252
20253 What use are these NoCeM messages if the articles are canceled anyway?
20254 Some sites do not honor cancel messages and some sites just honor cancels
20255 from a select few people.  Then you may wish to make use of the NoCeM
20256 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
20257
20258 Gnus can read and parse the messages in this group automatically, and
20259 this will make spam disappear.
20260
20261 There are some variables to customize, of course:
20262
20263 @table @code
20264 @item gnus-use-nocem
20265 @vindex gnus-use-nocem
20266 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
20267 by default.
20268
20269 @item gnus-nocem-groups
20270 @vindex gnus-nocem-groups
20271 Gnus will look for NoCeM messages in the groups in this list.  The
20272 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
20273 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
20274
20275 @item gnus-nocem-issuers
20276 @vindex gnus-nocem-issuers
20277 There are many people issuing NoCeM messages.  This list says what
20278 people you want to listen to.  The default is @code{("Automoose-1"
20279 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
20280 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
20281
20282 Known despammers that you can put in this list are listed at
20283 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
20284
20285 You do not have to heed NoCeM messages from all these people---just the
20286 ones you want to listen to.  You also don't have to accept all NoCeM
20287 messages from the people you like.  Each NoCeM message has a @dfn{type}
20288 header that gives the message a (more or less, usually less) rigorous
20289 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
20290 @samp{binary}, and @samp{troll}.  To specify this, you have to use
20291 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
20292 Each condition is either a string (which is a regexp that matches types
20293 you want to use) or a list on the form @code{(not @var{string})}, where
20294 @var{string} is a regexp that matches types you don't want to use.
20295
20296 For instance, if you want all NoCeM messages from Chris Lewis except his
20297 @samp{troll} messages, you'd say:
20298
20299 @lisp
20300 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
20301 @end lisp
20302
20303 On the other hand, if you just want nothing but his @samp{spam} and
20304 @samp{spew} messages, you'd say:
20305
20306 @lisp
20307 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
20308 @end lisp
20309
20310 The specs are applied left-to-right.
20311
20312
20313 @item gnus-nocem-verifyer
20314 @vindex gnus-nocem-verifyer
20315 @findex mc-verify
20316 This should be a function for verifying that the NoCeM issuer is who she
20317 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
20318 function.  If this is too slow and you don't care for verification
20319 (which may be dangerous), you can set this variable to @code{nil}.
20320
20321 If you want signed NoCeM messages to be verified and unsigned messages
20322 not to be verified (but used anyway), you could do something like:
20323
20324 @lisp
20325 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
20326
20327 (defun my-gnus-mc-verify ()
20328   (not (eq 'forged
20329            (ignore-errors
20330              (if (mc-verify)
20331                  t
20332                'forged)))))
20333 @end lisp
20334
20335 This might be dangerous, though.
20336
20337 @item gnus-nocem-directory
20338 @vindex gnus-nocem-directory
20339 This is where Gnus will store its NoCeM cache files.  The default is
20340 @file{~/News/NoCeM/}.
20341
20342 @item gnus-nocem-expiry-wait
20343 @vindex gnus-nocem-expiry-wait
20344 The number of days before removing old NoCeM entries from the cache.
20345 The default is 15.  If you make it shorter Gnus will be faster, but you
20346 might then see old spam.
20347
20348 @item gnus-nocem-check-from
20349 @vindex gnus-nocem-check-from
20350 Non-@code{nil} means check for valid issuers in message bodies.
20351 Otherwise don't bother fetching articles unless their author matches a
20352 valid issuer; that is much faster if you are selective about the
20353 issuers.
20354
20355 @item gnus-nocem-check-article-limit
20356 @vindex gnus-nocem-check-article-limit
20357 If non-@code{nil}, the maximum number of articles to check in any NoCeM
20358 group.  NoCeM groups can be huge and very slow to process.
20359
20360 @end table
20361
20362 Using NoCeM could potentially be a memory hog.  If you have many living
20363 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
20364 big.  If this is a problem, you should kill off all (or most) of your
20365 unsubscribed groups (@pxref{Subscription Commands}).
20366
20367
20368 @node Undo
20369 @section Undo
20370 @cindex undo
20371
20372 It is very useful to be able to undo actions one has done.  In normal
20373 Emacs buffers, it's easy enough---you just push the @code{undo} button.
20374 In Gnus buffers, however, it isn't that simple.
20375
20376 The things Gnus displays in its buffer is of no value whatsoever to
20377 Gnus---it's all just data designed to look nice to the user.
20378 Killing a group in the group buffer with @kbd{C-k} makes the line
20379 disappear, but that's just a side-effect of the real action---the
20380 removal of the group in question from the internal Gnus structures.
20381 Undoing something like that can't be done by the normal Emacs
20382 @code{undo} function.
20383
20384 Gnus tries to remedy this somewhat by keeping track of what the user
20385 does and coming up with actions that would reverse the actions the user
20386 takes.  When the user then presses the @code{undo} key, Gnus will run
20387 the code to reverse the previous action, or the previous actions.
20388 However, not all actions are easily reversible, so Gnus currently offers
20389 a few key functions to be undoable.  These include killing groups,
20390 yanking groups, and changing the list of read articles of groups.
20391 That's it, really.  More functions may be added in the future, but each
20392 added function means an increase in data to be stored, so Gnus will
20393 never be totally undoable.
20394
20395 @findex gnus-undo-mode
20396 @vindex gnus-use-undo
20397 @findex gnus-undo
20398 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
20399 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
20400 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
20401 command, which should feel kinda like the normal Emacs @code{undo}
20402 command.
20403
20404
20405 @node Predicate Specifiers
20406 @section Predicate Specifiers
20407 @cindex predicate specifiers
20408
20409 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
20410 form that allows flexible specification of predicates without having
20411 to type all that much.
20412
20413 These specifiers are lists consisting of functions, symbols and lists.
20414
20415 Here's an example:
20416
20417 @lisp
20418 (or gnus-article-unseen-p
20419     gnus-article-unread-p)
20420 @end lisp
20421
20422 The available symbols are @code{or}, @code{and} and @code{not}.  The
20423 functions all take one parameter.
20424
20425 @findex gnus-make-predicate
20426 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
20427 to create a function that can be called.  This input parameter to this
20428 function will be passed along to all the functions in the predicate
20429 specifier.
20430
20431
20432 @node Moderation
20433 @section Moderation
20434 @cindex moderation
20435
20436 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
20437 It is not included in the standard Gnus package.  Write a mail to
20438 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
20439 get a copy.
20440
20441 The moderation package is implemented as a minor mode for summary
20442 buffers.  Put
20443
20444 @lisp
20445 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
20446 @end lisp
20447
20448 in your @file{.gnus.el} file.
20449
20450 If you are the moderator of @samp{rec.zoofle}, this is how it's
20451 supposed to work:
20452
20453 @enumerate
20454 @item
20455 You split your incoming mail by matching on
20456 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
20457 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
20458
20459 @item
20460 You enter that group once in a while and post articles using the @kbd{e}
20461 (edit-and-post) or @kbd{s} (just send unedited) commands.
20462
20463 @item
20464 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
20465 articles that weren't approved by you, you can cancel them with the
20466 @kbd{c} command.
20467 @end enumerate
20468
20469 To use moderation mode in these two groups, say:
20470
20471 @lisp
20472 (setq gnus-moderated-list
20473       "^nnml:rec.zoofle$\\|^rec.zoofle$")
20474 @end lisp
20475
20476
20477 @node Image Enhancements
20478 @section Image Enhancements
20479
20480 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
20481 Gnus has taken advantage of that.
20482
20483 @menu
20484 * Picons::                      How to display pictures of what you're reading.
20485 * Smileys::                     Show all those happy faces the way they were meant to be shown.
20486 * X-Face::                      Display a funky, teensy black-and-white image.
20487 * Toolbar::                     Click'n'drool.
20488 * XVarious::                    Other XEmacsy Gnusey variables.
20489 @end menu
20490
20491
20492 @node Picons
20493 @subsection Picons
20494
20495 @iftex
20496 @iflatex
20497 \include{picons}
20498 @end iflatex
20499 @end iftex
20500
20501 So@dots{}  You want to slow down your news reader even more!  This is a
20502 good way to do so.  Its also a great way to impress people staring
20503 over your shoulder as you read news.
20504
20505 @menu
20506 * Picon Basics::                What are picons and How do I get them.
20507 * Picon Requirements::          Don't go further if you aren't using XEmacs.
20508 * Easy Picons::                 Displaying Picons---the easy way.
20509 * Hard Picons::                 The way you should do it.  You'll learn something.
20510 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
20511 @end menu
20512
20513
20514 @node Picon Basics
20515 @subsubsection Picon Basics
20516
20517 What are Picons?  To quote directly from the Picons Web site:
20518
20519 @iftex
20520 @iflatex
20521 \margindex{}
20522 @end iflatex
20523 @end iftex
20524
20525 @quotation
20526 @dfn{Picons} is short for ``personal icons''.  They're small,
20527 constrained images used to represent users and domains on the net,
20528 organized into databases so that the appropriate image for a given
20529 e-mail address can be found.  Besides users and domains, there are picon
20530 databases for Usenet newsgroups and weather forecasts.  The picons are
20531 in either monochrome @code{XBM} format or color @code{XPM} and
20532 @code{GIF} formats.
20533 @end quotation
20534
20535 @vindex gnus-picons-piconsearch-url
20536 If you have a permanent connection to the Internet you can use Steve
20537 Kinzler's Picons Search engine by setting
20538 @code{gnus-picons-piconsearch-url} to the string @*
20539 @uref{http://www.cs.indiana.edu/picons/search.html}.
20540
20541 @vindex gnus-picons-database
20542 Otherwise you need a local copy of his database.  For instructions on
20543 obtaining and installing the picons databases, point your Web browser at @*
20544 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.  Gnus expects
20545 picons to be installed into a location pointed to by
20546 @code{gnus-picons-database}.
20547
20548 If you are using Debian GNU/Linux, saying @samp{apt-get install
20549 picons.*} will install the picons where Gnus can find them.
20550
20551
20552 @node Picon Requirements
20553 @subsubsection Picon Requirements
20554
20555 To have Gnus display Picons for you, you must have @code{x} support
20556 compiled into XEmacs.  To display color picons which are much nicer
20557 than the black & white one, you also need one of @code{xpm} or
20558 @code{gif} compiled into XEmacs.
20559
20560 @vindex gnus-picons-convert-x-face
20561 If you want to display faces from @code{X-Face} headers, you should have
20562 the @code{xface} support compiled into XEmacs.  Otherwise you must have
20563 the @code{netpbm} utilities installed, or munge the
20564 @code{gnus-picons-convert-x-face} variable to use something else.
20565 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20566
20567 @node Easy Picons
20568 @subsubsection Easy Picons
20569
20570 To enable displaying picons, simply put the following line in your
20571 @file{~/.gnus} file and start Gnus.
20572
20573 @lisp
20574 (setq gnus-use-picons t)
20575 (setq gnus-treat-display-picons t)
20576 @end lisp
20577
20578 and make sure @code{gnus-picons-database} points to the directory
20579 containing the Picons databases.
20580
20581 Alternatively if you want to use the web piconsearch engine add this:
20582
20583 @lisp
20584 (setq gnus-picons-piconsearch-url
20585       "http://www.cs.indiana.edu:800/piconsearch")
20586 @end lisp
20587
20588
20589 @node Hard Picons
20590 @subsubsection Hard Picons
20591
20592 @iftex
20593 @iflatex
20594 \margindex{}
20595 @end iflatex
20596 @end iftex
20597
20598 Gnus can display picons for you as you enter and leave groups and
20599 articles.  It knows how to interact with three sections of the picons
20600 database.  Namely, it can display the picons newsgroup pictures,
20601 author's face picture(s), and the authors domain.  To enable this
20602 feature, you need to select where to get the picons from, and where to
20603 display them.
20604
20605 @table @code
20606
20607 @item gnus-picons-database
20608 @vindex gnus-picons-database
20609 The location of the picons database.  Should point to a directory
20610 containing the @file{news}, @file{domains}, @file{users} (and so on)
20611 subdirectories.  This is only useful if
20612 @code{gnus-picons-piconsearch-url} is @code{nil}.  Defaults to
20613 @file{/usr/local/faces/}.
20614
20615 @item gnus-picons-piconsearch-url
20616 @vindex gnus-picons-piconsearch-url
20617 The URL for the web picons search engine.  The only currently known
20618 engine is @uref{http://www.cs.indiana.edu:800/piconsearch}.  To
20619 workaround network delays, icons will be fetched in the background.  If
20620 this is @code{nil} 'the default), then picons are fetched from local
20621 database indicated by @code{gnus-picons-database}.
20622
20623 @item gnus-picons-display-where
20624 @vindex gnus-picons-display-where
20625 Where the picon images should be displayed.  It is @code{picons} by
20626 default (which by default maps to the buffer @samp{*Picons*}).  Other
20627 valid places could be @code{article}, @code{summary}, or
20628 @samp{*scratch*} for all I care.  Just make sure that you've made the
20629 buffer visible using the standard Gnus window configuration
20630 routines---@pxref{Window Layout}.
20631
20632 @item gnus-picons-group-excluded-groups
20633 @vindex gnus-picons-group-excluded-groups
20634 Groups that are matched by this regexp won't have their group icons
20635 displayed.
20636
20637 @end table
20638
20639 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
20640 window configuration for you to include the @code{picons} buffer.
20641
20642 Now that you've made those decision, you need to add the following
20643 functions to the appropriate hooks so these pictures will get displayed
20644 at the right time.
20645
20646 @vindex gnus-picons-display-where
20647 @table @code
20648 @item gnus-article-display-picons
20649 @findex gnus-article-display-picons
20650 Looks up and displays the picons for the author and the author's domain
20651 in the @code{gnus-picons-display-where} buffer.
20652
20653 @item gnus-picons-article-display-x-face
20654 @findex gnus-picons-article-display-x-face
20655 Decodes and displays the X-Face header if present.
20656 (NOTE: @code{x-face} is used in the function name, not @code{xface})
20657
20658 @end table
20659
20660
20661
20662 @node Picon Useless Configuration
20663 @subsubsection Picon Useless Configuration
20664
20665 @iftex
20666 @iflatex
20667 \margindex{}
20668 @end iflatex
20669 @end iftex
20670
20671 The following variables offer further control over how things are
20672 done, where things are located, and other useless stuff you really
20673 don't need to worry about.
20674
20675 @table @code
20676
20677 @item gnus-picons-news-directories
20678 @vindex gnus-picons-news-directories
20679 List of subdirectories to search in @code{gnus-picons-database} for
20680 newsgroups faces.  @code{("news")} is the default.
20681
20682 @item gnus-picons-user-directories
20683 @vindex gnus-picons-user-directories
20684 List of subdirectories to search in @code{gnus-picons-database} for user
20685 faces.  @code{("local" "users" "usenix" "misc")} is the default.
20686
20687 @item gnus-picons-domain-directories
20688 @vindex gnus-picons-domain-directories
20689 List of subdirectories to search in @code{gnus-picons-database} for
20690 domain name faces.  Defaults to @code{("domains")}.  Some people may
20691 want to add @samp{"unknown"} to this list.
20692
20693 @item gnus-picons-convert-x-face
20694 @vindex gnus-picons-convert-x-face
20695 If you don't have @code{xface} support builtin XEmacs, this is the
20696 command to use to convert the @code{X-Face} header to an X bitmap
20697 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
20698 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
20699 gnus-picons-x-face-file-name)}
20700 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20701
20702 @item gnus-picons-x-face-file-name
20703 @vindex gnus-picons-x-face-file-name
20704 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
20705 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
20706 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20707
20708 @item gnus-picons-has-modeline-p
20709 @vindex gnus-picons-has-modeline-p
20710 If you have set @code{gnus-picons-display-where} to @code{picons}, your
20711 XEmacs frame will become really cluttered.  To alleviate this a bit you
20712 can set @code{gnus-picons-has-modeline-p} to @code{nil}; this will
20713 remove the mode line from the Picons buffer.  This is only useful if
20714 @code{gnus-picons-display-where} is @code{picons}.
20715
20716 @item gnus-picons-refresh-before-display
20717 @vindex gnus-picons-refresh-before-display
20718 If non-nil, display the article buffer before computing the picons.
20719 Defaults to @code{nil}.
20720
20721 @item gnus-picons-display-as-address
20722 @vindex gnus-picons-display-as-address
20723 If @code{t} display textual email addresses along with pictures.
20724 Defaults to @code{t}.
20725
20726 @item gnus-picons-file-suffixes
20727 @vindex gnus-picons-file-suffixes
20728 Ordered list of suffixes on picon file names to try.  Defaults to
20729 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
20730
20731 @item gnus-picons-setup-hook
20732 @vindex gnus-picons-setup-hook
20733 Hook run in the picon buffer, if that is displayed.
20734
20735 @item gnus-picons-display-article-move-p
20736 @vindex gnus-picons-display-article-move-p
20737 Whether to move point to first empty line when displaying picons.  This
20738 has only an effect if `gnus-picons-display-where' has value `article'.
20739
20740 If @code{nil}, display the picons in the @code{From} and
20741 @code{Newsgroups} lines.  This is the default.
20742
20743 @item gnus-picons-clear-cache-on-shutdown
20744 @vindex gnus-picons-clear-cache-on-shutdown
20745 Whether to clear the picons cache when exiting gnus.  Gnus caches every
20746 picons it finds while it is running.  This saves some time in the search
20747 process but eats some memory.  If this variable is set to @code{nil},
20748 Gnus will never clear the cache itself; you will have to manually call
20749 @code{gnus-picons-clear-cache} to clear it.  Otherwise the cache will be
20750 cleared every time you exit Gnus.  Defaults to @code{t}.
20751
20752 @iftex
20753 @iflatex
20754 \margindex{}
20755 @end iflatex
20756 @end iftex
20757
20758 @end table
20759
20760 @node Smileys
20761 @subsection Smileys
20762 @cindex smileys
20763
20764 @iftex
20765 @iflatex
20766 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
20767 \input{smiley}
20768 @end iflatex
20769 @end iftex
20770
20771 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
20772 currently the only package that uses Smiley, it is documented here.
20773
20774 In short---to use Smiley in Gnus, put the following in your
20775 @file{.gnus.el} file:
20776
20777 @lisp
20778 (setq gnus-treat-display-smileys t)
20779 @end lisp
20780
20781 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
20782 the like---to pictures and displays those instead of the text smiley
20783 faces.  The conversion is controlled by a list of regexps that matches
20784 text and maps that to file names.
20785
20786 @vindex smiley-nosey-regexp-alist
20787 @vindex smiley-deformed-regexp-alist
20788 Smiley supplies two example conversion alists by default:
20789 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
20790 and so on), and @code{smiley-nosey-regexp-alist} (which matches
20791 @samp{:-)}, @samp{:-(} and so on).
20792
20793 The alist used is specified by the @code{smiley-regexp-alist} variable,
20794 which defaults to the value of @code{smiley-deformed-regexp-alist}.
20795
20796 The first item in each element is the regexp to be matched; the second
20797 element is the regexp match group that is to be replaced by the picture;
20798 and the third element is the name of the file to be displayed.
20799
20800 The following variables customize where Smiley will look for these
20801 files, as well as the color to be used and stuff:
20802
20803 @table @code
20804
20805 @item smiley-data-directory
20806 @vindex smiley-data-directory
20807 Where Smiley will look for smiley faces files.
20808
20809 @item smiley-flesh-color
20810 @vindex smiley-flesh-color
20811 Skin color.  The default is @samp{yellow}, which is really racist.
20812
20813 @item smiley-features-color
20814 @vindex smiley-features-color
20815 Color of the features of the face.  The default is @samp{black}.
20816
20817 @item smiley-tongue-color
20818 @vindex smiley-tongue-color
20819 Color of the tongue.  The default is @samp{red}.
20820
20821 @item smiley-circle-color
20822 @vindex smiley-circle-color
20823 Color of the circle around the face.  The default is @samp{black}.
20824
20825 @item smiley-mouse-face
20826 @vindex smiley-mouse-face
20827 Face used for mouse highlighting over the smiley face.
20828
20829 @end table
20830
20831
20832 @node X-Face
20833 @subsection X-Face
20834 @cindex x-face
20835
20836 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
20837 depth) image that's supposed to represent the author of the message.
20838 It seems to be supported by an ever-growing number of mail and news
20839 readers.
20840
20841 @cindex x-face
20842 @findex gnus-article-display-x-face
20843 @findex gnus-article-x-face-command
20844 @vindex gnus-article-x-face-command
20845 @vindex gnus-article-x-face-too-ugly
20846 @iftex
20847 @iflatex
20848 \include{xface}
20849 @end iflatex
20850 @end iftex
20851 @c @anchor{X-Face}
20852
20853 Decoding an @code{X-Face} header either requires an Emacs that has
20854 @samp{compface} support (which most XEmacs versions has), or that you
20855 have @samp{compface} installed on your system.  If either is true,
20856 Gnus will default to displaying @code{X-Face} headers.
20857
20858 The variable that controls this is the
20859 @code{gnus-article-x-face-command} variable.  If this variable is a
20860 string, this string will be executed in a sub-shell.  If it is a
20861 function, this function will be called with the face as the argument.
20862 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
20863 the @code{From} header, the face will not be shown.
20864
20865 The default action under Emacs 20 is to fork off the @code{display}
20866 program@footnote{@code{display} is from the ImageMagick package.  For
20867 the @code{uncompface} and @code{icontopbm} programs look for a package
20868 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
20869 view the face.
20870
20871 Under XEmacs or Emacs 21+ with suitable image support, the default
20872 action is to display the face before the @code{From} header.  (It's
20873 nicer if XEmacs has been compiled with @code{X-Face} support---that
20874 will make display somewhat faster.  If there's no native @code{X-Face}
20875 support, Gnus will try to convert the @code{X-Face} header using
20876 external programs from the @code{pbmplus} package and
20877 friends.@footnote{On a GNU/Linux system look for packages with names
20878 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
20879
20880 (NOTE: @code{x-face} is used in the variable/function names, not
20881 @code{xface}).
20882
20883 Gnus provides a few convenience functions and variables to allow
20884 easier insertion of X-Face headers in outgoing messages.
20885
20886 @findex gnus-random-x-face
20887 @code{gnus-random-x-face} goes through all the @samp{pbm} files
20888 in @code{gnus-x-face-directory} and picks one at random, and then
20889 converts it to the X-Face format by using the
20890 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
20891 @samp{pbm} files should be 48x48 pixels big.
20892
20893 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
20894 converts the file to X-Face format by using the
20895 @code{gnus-convert-image-to-x-face-command} shell command.
20896
20897 Here's how you would typically use the former function.  Put something
20898 like the folllowing in your @file{.gnus.el} file:
20899
20900 @lisp
20901 (setq message-required-news-headers
20902       (nconc message-required-news-headers
20903              (list '(X-Face . gnus-random-x-face))))
20904 @end lisp
20905
20906 Using the latter function would be something like this:
20907
20908 @lisp
20909 (setq message-required-news-headers
20910       (nconc message-required-news-headers
20911              (list '(X-Face . (lambda ()
20912                                 (gnus-x-face-from-file
20913                                  "~/My-face.gif"))))))
20914 @end lisp
20915
20916
20917 @node Toolbar
20918 @subsection Toolbar
20919
20920 @table @code
20921
20922 @iftex
20923 @iflatex
20924 \margindex{}
20925 @end iflatex
20926 @end iftex
20927
20928 @item gnus-use-toolbar
20929 @vindex gnus-use-toolbar
20930 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
20931 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
20932 @code{right-toolbar}, or @code{left-toolbar}.
20933
20934 @item gnus-group-toolbar
20935 @vindex gnus-group-toolbar
20936 The toolbar in the group buffer.
20937
20938 @item gnus-summary-toolbar
20939 @vindex gnus-summary-toolbar
20940 The toolbar in the summary buffer.
20941
20942 @item gnus-summary-mail-toolbar
20943 @vindex gnus-summary-mail-toolbar
20944 The toolbar in the summary buffer of mail groups.
20945
20946 @end table
20947
20948
20949 @node XVarious
20950 @subsection Various XEmacs Variables
20951
20952 @table @code
20953 @item gnus-xmas-glyph-directory
20954 @vindex gnus-xmas-glyph-directory
20955 This is where Gnus will look for pictures.  Gnus will normally
20956 auto-detect this directory, but you may set it manually if you have an
20957 unusual directory structure.
20958
20959 @item gnus-xmas-logo-color-alist
20960 @vindex gnus-xmas-logo-color-alist
20961 This is an alist where the key is a type symbol and the values are the
20962 foreground and background color of the splash page glyph.
20963
20964 @item gnus-xmas-logo-color-style
20965 @vindex gnus-xmas-logo-color-style
20966 This is the key used to look up the color in the alist described above.
20967 Valid values include @code{flame}, @code{pine}, @code{moss},
20968 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
20969 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
20970
20971 @item gnus-xmas-modeline-glyph
20972 @vindex gnus-xmas-modeline-glyph
20973 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
20974 default.
20975
20976 @iftex
20977 @iflatex
20978 \margindex{}
20979 @end iflatex
20980 @end iftex
20981
20982 @end table
20983
20984
20985
20986
20987 @node Fuzzy Matching
20988 @section Fuzzy Matching
20989 @cindex fuzzy matching
20990
20991 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
20992 things like scoring, thread gathering and thread comparison.
20993
20994 As opposed to regular expression matching, fuzzy matching is very fuzzy.
20995 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
20996 means, and the implementation has changed over time.
20997
20998 Basically, it tries to remove all noise from lines before comparing.
20999 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21000 out of the strings before comparing the results.  This often leads to
21001 adequate results---even when faced with strings generated by text
21002 manglers masquerading as newsreaders.
21003
21004
21005 @node Thwarting Email Spam
21006 @section Thwarting Email Spam
21007 @cindex email spam
21008 @cindex spam
21009 @cindex UCE
21010 @cindex unsolicited commercial email
21011
21012 In these last days of the Usenet, commercial vultures are hanging about
21013 and grepping through news like crazy to find email addresses they can
21014 foist off their scams and products to.  As a reaction to this, many
21015 people have started putting nonsense addresses into their @code{From}
21016 lines.  I think this is counterproductive---it makes it difficult for
21017 people to send you legitimate mail in response to things you write, as
21018 well as making it difficult to see who wrote what.  This rewriting may
21019 perhaps be a bigger menace than the unsolicited commercial email itself
21020 in the end.
21021
21022 The biggest problem I have with email spam is that it comes in under
21023 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21024 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21025 mail group, only to find two pyramid schemes, seven advertisements
21026 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21027 and one mail asking me to repent and find some god.
21028
21029 This is annoying.  Here's what you can do about it.
21030
21031 @menu
21032 * The problem of spam::         Some background, and some solutions
21033 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21034 * SpamAssassin::                How to use external anti-spam tools.
21035 * Hashcash::                    Reduce spam by burning CPU time.
21036 * Filtering Spam Using spam.el::  
21037 * Filtering Spam Using Statistics (spam-stat.el)::  
21038 @end menu
21039
21040 @node The problem of spam
21041 @subsection The problem of spam
21042 @cindex email spam
21043 @cindex spam filtering approaches
21044 @cindex filtering approaches, spam
21045 @cindex UCE
21046 @cindex unsolicited commercial email
21047
21048 First, some background on spam.
21049
21050 If you have access to e-mail, you are familiar with spam (technically
21051 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21052 because e-mail delivery is very cheap compared to paper mail, so only
21053 a very small percentage of people need to respond to an UCE to make it
21054 worthwhile to the advertiser.  Ironically, one of the most common
21055 spams is the one offering a database of e-mail addresses for further
21056 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21057 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21058
21059 Spam comes from a wide variety of sources.  It is simply impossible to
21060 dispose of all spam without discarding useful messages.  A good
21061 example is the TMDA system, which requires senders
21062 unknown to you to confirm themselves as legitimate senders before
21063 their e-mail can reach you.  Without getting into the technical side
21064 of TMDA, a downside is clearly that e-mail from legitimate sources may
21065 be discarded if those sources can't or won't confirm themselves
21066 through the TMDA system.  Another problem with TMDA is that it
21067 requires its users to have a basic understanding of e-mail delivery
21068 and processing.
21069
21070 The simplest approach to filtering spam is filtering.  If you get 200
21071 spam messages per day from @email{random-address@@vmadmin.com}, you
21072 block @samp{vmadmin.com}.  If you get 200 messages about
21073 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21074 message.  This, unfortunately, is a great way to discard legitimate
21075 e-mail.  For instance, the very informative and useful RISKS digest
21076 has been blocked by overzealous mail filters because it
21077 @strong{contained} words that were common in spam messages.
21078 Nevertheless, in isolated cases, with great care, direct filtering of
21079 mail can be useful.
21080
21081 Another approach to filtering e-mail is the distributed spam
21082 processing, for instance DCC implements such a system.  In essence,
21083 @code{N} systems around the world agree that a machine @samp{X} in
21084 China, Ghana, or California is sending out spam e-mail, and these
21085 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21086 a database.  The criteria for spam detection vary - it may be the
21087 number of messages sent, the content of the messages, and so on.  When
21088 a user of the distributed processing system wants to find out if a
21089 message is spam, he consults one of those @code{N} systems.
21090
21091 Distributed spam processing works very well against spammers that send
21092 a large number of messages at once, but it requires the user to set up
21093 fairly complicated checks.  There are commercial and free distributed
21094 spam processing systems.  Distributed spam processing has its risks as
21095 well.  For instance legitimate e-mail senders have been accused of
21096 sending spam, and their web sites have been shut down for some time
21097 because of the incident.
21098
21099 The statistical approach to spam filtering is also popular.  It is
21100 based on a statistical analysis of previous spam messages.  Usually
21101 the analysis is a simple word frequency count, with perhaps pairs of
21102 words or 3-word combinations thrown into the mix.  Statistical
21103 analysis of spam works very well in most of the cases, but it can
21104 classify legitimate e-mail as spam in some cases.  It takes time to
21105 run the analysis, the full message must be analyzed, and the user has
21106 to store the database of spam analyses.
21107
21108 @node Anti-Spam Basics
21109 @subsection Anti-Spam Basics
21110 @cindex email spam
21111 @cindex spam
21112 @cindex UCE
21113 @cindex unsolicited commercial email
21114
21115 One way of dealing with spam is having Gnus split out all spam into a
21116 @samp{spam} mail group (@pxref{Splitting Mail}).
21117
21118 First, pick one (1) valid mail address that you can be reached at, and
21119 put it in your @code{From} header of all your news articles.  (I've
21120 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21121 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21122 sysadmin whether your sendmail installation accepts keywords in the local
21123 part of the mail address.)
21124
21125 @lisp
21126 (setq message-default-news-headers
21127       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21128 @end lisp
21129
21130 Then put the following split rule in @code{nnmail-split-fancy}
21131 (@pxref{Fancy Mail Splitting}):
21132
21133 @lisp
21134 (
21135  ...
21136  (to "larsi@@trym.ifi.uio.no"
21137       (| ("subject" "re:.*" "misc")
21138          ("references" ".*@@.*" "misc")
21139          "spam"))
21140  ...
21141 )
21142 @end lisp
21143
21144 This says that all mail to this address is suspect, but if it has a
21145 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
21146 header, it's probably ok.  All the rest goes to the @samp{spam} group.
21147 (This idea probably comes from Tim Pierce.)
21148
21149 In addition, many mail spammers talk directly to your @sc{smtp} server
21150 and do not include your email address explicitly in the @code{To}
21151 header.  Why they do this is unknown---perhaps it's to thwart this
21152 thwarting scheme?  In any case, this is trivial to deal with---you just
21153 put anything not addressed to you in the @samp{spam} group by ending
21154 your fancy split rule in this way:
21155
21156 @lisp
21157 (
21158  ...
21159  (to "larsi" "misc")
21160  "spam")
21161 @end lisp
21162
21163 In my experience, this will sort virtually everything into the right
21164 group.  You still have to check the @samp{spam} group from time to time to
21165 check for legitimate mail, though.  If you feel like being a good net
21166 citizen, you can even send off complaints to the proper authorities on
21167 each unsolicited commercial email---at your leisure.
21168
21169 If you are also a lazy net citizen, you will probably prefer complaining
21170 automatically with the @file{gnus-junk.el} package, available FOR FREE
21171 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
21172 Since most e-mail spam is sent automatically, this may reconcile the
21173 cosmic balance somewhat.
21174
21175 This works for me.  It allows people an easy way to contact me (they can
21176 just press @kbd{r} in the usual way), and I'm not bothered at all with
21177 spam.  It's a win-win situation.  Forging @code{From} headers to point
21178 to non-existent domains is yucky, in my opinion.
21179
21180
21181
21182 @node SpamAssassin
21183 @subsection SpamAssassin, Vipul's Razor, DCC, etc
21184 @cindex SpamAssassin
21185 @cindex Vipul's Razor
21186 @cindex DCC
21187
21188 The days where the hints in the previous section was sufficient in
21189 avoiding spam is coming to an end.  There are many tools out there
21190 that claim to reduce the amount of spam you get.  This section could
21191 easily become outdated fast, as new products replace old, but
21192 fortunately most of these tools seem to have similar interfaces.  Even
21193 though this section will use SpamAssassin as an example, it should be
21194 easy to adapt it to most other tools.
21195
21196 If the tool you are using is not installed on the mail server, you
21197 need to invoke it yourself.  Ideas on how to use the
21198 @code{:postscript} mail source parameter (@pxref{Mail Source
21199 Specifiers}) follows.
21200
21201 @lisp
21202 (setq mail-sources
21203       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
21204         (pop :user "jrl"
21205              :server "pophost"
21206              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
21207 @end lisp
21208
21209 Once you managed to process your incoming spool somehow, thus making
21210 the mail contain e.g. a header indicating it is spam, you are ready to
21211 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
21212
21213 @lisp
21214 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
21215                              ...))
21216 @end lisp
21217
21218 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
21219
21220 @lisp
21221 (setq nnmail-split-methods 'nnmail-split-fancy
21222       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
21223                              ...))
21224 @end lisp
21225
21226 Some people might not like the idea of piping the mail through various
21227 programs using a @code{:prescript} (if some program is buggy, you
21228 might lose all mail).  If you are one of them, another solution is to
21229 call the external tools during splitting.  Example fancy split method:
21230
21231 @lisp
21232 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
21233                              ...))
21234 (defun kevin-spamassassin ()
21235   (save-excursion
21236     (let ((buf (or (get-buffer " *nnmail incoming*")
21237                    (get-buffer " *nnml move*"))))
21238       (if (not buf)
21239           (progn (message "Oops, cannot find message buffer") nil)
21240         (set-buffer buf)
21241         (if (eq 1 (call-process-region (point-min) (point-max)
21242                                        "spamc" nil nil nil "-c"))
21243             "spam")))))
21244 @end lisp
21245
21246 That is about it.  As some spam is likely to get through anyway, you
21247 might want to have a nifty function to call when you happen to read
21248 spam.  And here is the nifty function:
21249
21250 @lisp
21251  (defun my-gnus-raze-spam ()
21252   "Submit SPAM to Vipul's Razor, then mark it as expirable."
21253   (interactive)
21254   (gnus-summary-show-raw-article)
21255   (gnus-summary-save-in-pipe "razor-report -f -d")
21256   (gnus-summary-mark-as-expirable 1))
21257 @end lisp
21258
21259 @node Hashcash
21260 @subsection Hashcash
21261 @cindex hashcash
21262
21263 A novel technique to fight spam is to require senders to do something
21264 costly for each message they send.  This has the obvious drawback that
21265 you cannot rely on that everyone in the world uses this technique,
21266 since it is not part of the internet standards, but it may be useful
21267 in smaller communities.
21268
21269 While the tools in the previous section work well in practice, they
21270 work only because the tools are constantly maintained and updated as
21271 new form of spam appears.  This means that a small percentage of spam
21272 will always get through.  It also means that somewhere, someone needs
21273 to read lots of spam to update these tools.  Hashcash avoids that, but
21274 instead requires that everyone you communicate with supports the
21275 scheme.  You can view the two approaches as pragmatic vs dogmatic.
21276 The approaches have their own advantages and disadvantages, but as
21277 often in the real world, a combination of them is stronger than either
21278 one of them separately.
21279
21280 @cindex X-Hashcash
21281 The ``something costly'' is to burn CPU time, more specifically to
21282 compute a hash collision up to a certain number of bits.  The
21283 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
21284 header. For more details, and for the external application
21285 @code{hashcash} you need to install to use this feature, see
21286 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
21287 information can be found at @uref{http://www.camram.org/}.
21288
21289 If you wish to call hashcash for each message you send, say something
21290 like:
21291
21292 @lisp
21293 (require 'hashcash)
21294 (add-hook 'message-send-hook 'mail-add-payment)
21295 @end lisp
21296
21297 The @code{hashcash.el} library can be found at
21298 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}, or in the Gnus
21299 development contrib directory.
21300
21301 You will need to set up some additional variables as well:
21302
21303 @table @code
21304
21305 @item hashcash-default-payment
21306 @vindex hashcash-default-payment
21307 This variable indicates the default number of bits the hash collision
21308 should consist of.  By default this is 0, meaning nothing will be
21309 done.  Suggested useful values include 17 to 29.
21310
21311 @item hashcash-payment-alist
21312 @vindex hashcash-payment-alist
21313 Some receivers may require you to spend burn more CPU time than the
21314 default.  This variable contains a list of @samp{(ADDR AMOUNT)} cells,
21315 where ADDR is the receiver (email address or newsgroup) and AMOUNT is
21316 the number of bits in the collision that is needed.  It can also
21317 contain @samp{(ADDR STRING AMOUNT)} cells, where the STRING is the
21318 string to use (normally the email address or newsgroup name is used).
21319
21320 @item hashcash
21321 @vindex hashcash
21322 Where the @code{hashcash} binary is installed.
21323
21324 @end table
21325
21326 Currently there is no built in functionality in Gnus to verify
21327 hashcash cookies, it is expected that this is performed by your hand
21328 customized mail filtering scripts.  Improvements in this area would be
21329 a useful contribution, however.
21330
21331 @node Filtering Spam Using spam.el
21332 @subsection Filtering Spam Using spam.el
21333 @cindex spam filtering
21334 @cindex spam.el
21335
21336 The idea behind @code{spam.el} is to have a control center for spam detection
21337 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
21338 filters incoming mail, and it analyzes mail known to be spam.
21339
21340 So, what happens when you load @code{spam.el}?  First of all, you get
21341 the following keyboard commands:
21342
21343 @table @kbd
21344
21345 @item M-d
21346 @itemx M s x
21347 @itemx S x
21348 @kindex M-d
21349 @kindex S x
21350 @kindex M s x
21351 @findex gnus-summary-mark-as-spam
21352 @code{gnus-summary-mark-as-spam}.
21353
21354 Mark current article as spam, showing it with the @samp{H} mark.
21355 Whenever you see a spam article, make sure to mark its summary line
21356 with @kbd{M-d} before leaving the group.
21357
21358 @item M s t
21359 @itemx S t
21360 @kindex M s t
21361 @kindex S t
21362 @findex spam-bogofilter-score
21363 @code{spam-bogofilter-score}.
21364
21365 You must have bogofilter processing enabled for that command to work
21366 properly.
21367
21368 @xref{Bogofilter}.
21369
21370 @end table
21371
21372 Gnus can learn from the spam you get.  All you have to do is collect
21373 your spam in one or more spam groups, and set the variable
21374 @code{spam-junk-mailgroups} as appropriate.  In these groups, all messages
21375 are considered to be spam by default: they get the @samp{H} mark.  You must
21376 review these messages from time to time and remove the @samp{H} mark for
21377 every message that is not spam after all.  When you leave a spam
21378 group, all messages that continue with the @samp{H} mark, are passed on to
21379 the spam-detection engine (bogofilter, ifile, and others).  To remove
21380 the @samp{H} mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
21381 declaring it read the non-spam way.  When you leave a group, all @samp{H}
21382 marked articles, saved or unsaved, are sent to Bogofilter or ifile
21383 (depending on @code{spam-use-bogofilter} and @code{spam-use-ifile}), which will study
21384 them as spam samples.
21385
21386 Messages may also be deleted in various other ways, and unless
21387 @code{spam-ham-marks-form} gets overridden below, marks @samp{R} and @samp{r} for
21388 default read or explicit delete, marks @samp{X} and @samp{K} for automatic or
21389 explicit kills, as well as mark @samp{Y} for low scores, are all considered
21390 to be associated with articles which are not spam.  This assumption
21391 might be false, in particular if you use kill files or score files as
21392 means for detecting genuine spam, you should then adjust
21393 @code{spam-ham-marks-form}.  When you leave a group, all _unsaved_ articles
21394 bearing any the above marks are sent to Bogofilter or ifile, which
21395 will study these as not-spam samples.  If you explicit kill a lot, you
21396 might sometimes end up with articles marked @samp{K} which you never saw,
21397 and which might accidentally contain spam.  Best is to make sure that
21398 real spam is marked with @samp{H}, and nothing else.
21399
21400 All other marks do not contribute to Bogofilter or ifile
21401 pre-conditioning.  In particular, ticked, dormant or souped articles
21402 are likely to contribute later, when they will get deleted for real,
21403 so there is no need to use them prematurely.  Explicitly expired
21404 articles do not contribute, command @kbd{E} is a way to get rid of an
21405 article without Bogofilter or ifile ever seeing it.
21406
21407 @strong{TODO: @code{spam-use-ifile} does not process spam articles on group exit.
21408 I'm waiting for info from the author of @code{ifile-gnus.el}, because I think
21409 that functionality should go in @code{ifile-gnus.el} rather than @code{spam.el}.}
21410
21411 To use the @code{spam.el} facilities for incoming mail filtering, you
21412 must add the following to your fancy split list
21413 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
21414
21415 @example
21416 (: spam-split)
21417 @end example
21418
21419 Note that the fancy split may be called @code{nnmail-split-fancy} or
21420 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
21421 nnimap back ends to retrieve your mail.
21422
21423 The @code{spam-split} function will process incoming mail and send the mail
21424 considered to be spam into the group name given by the variable
21425 @code{spam-split-group}.  Usually that group name is @samp{spam}.
21426
21427 The following are the methods you can use to control the behavior of
21428 @code{spam-split}:
21429
21430 @menu
21431 * Blacklists and Whitelists::   
21432 * BBDB Whitelists::             
21433 * Blackholes::                  
21434 * Bogofilter::                  
21435 * Ifile spam filtering::        
21436 * Extending spam.el::           
21437 @end menu
21438
21439 @node Blacklists and Whitelists
21440 @subsubsection Blacklists and Whitelists
21441 @cindex spam filtering
21442 @cindex whitelists, spam filtering
21443 @cindex blacklists, spam filtering
21444 @cindex spam.el
21445
21446 @defvar spam-use-blacklist
21447 Set this variables to t (the default) if you want to use blacklists.
21448 @end defvar
21449
21450 @defvar spam-use-whitelist
21451 Set this variables to t if you want to use whitelists.
21452 @end defvar
21453
21454 Blacklists are lists of regular expressions matching addresses you
21455 consider to be spam senders.  For instance, to block mail from any
21456 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
21457 blacklist.  Since you start out with an empty blacklist, no harm is
21458 done by having the @code{spam-use-blacklist} variable set, so it is
21459 set by default.  Blacklist entries use the Emacs regular expression
21460 syntax.
21461
21462 Conversely, whitelists tell Gnus what addresses are considered
21463 legitimate.  All non-whitelisted addresses are considered spammers.
21464 This option is probably not useful for most Gnus users unless the
21465 whitelists is very comprehensive.  Also see @ref{BBDB Whitelists}.
21466 Whitelist entries use the Emacs regular expression syntax.
21467
21468 The Blacklist and whitelist location can be customized with the
21469 @code{spam-directory} variable (@file{~/News/spam} by default).  The whitelist
21470 and blacklist files will be in that directory, named @file{whitelist} and
21471 @file{blacklist} respectively.
21472
21473 @node BBDB Whitelists
21474 @subsubsection BBDB Whitelists
21475 @cindex spam filtering
21476 @cindex BBDB whitelists, spam filtering
21477 @cindex BBDB, spam filtering
21478 @cindex spam.el
21479
21480 @defvar spam-use-bbdb
21481
21482 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
21483 Whitelists}), but uses the BBDB as the source of whitelisted addresses,
21484 without regular expressions.  You must have the BBDB loaded for
21485 @code{spam-use-bbdb} to work properly.  Only addresses in the BBDB
21486 will be allowed through; all others will be classified as spam.
21487
21488 @end defvar
21489
21490 @node Blackholes
21491 @subsubsection Blackholes
21492 @cindex spam filtering
21493 @cindex blackholes, spam filtering
21494 @cindex spam.el
21495
21496 @defvar spam-use-blackholes
21497
21498 This option is disabled by default.  You can let Gnus consult the
21499 blackhole-type distributed spam processing systems (DCC, for instance)
21500 when you set this option.  The variable @code{spam-blackhole-servers}
21501 holds the list of blackhole servers Gnus will consult.  The current
21502 list is fairly comprehensive, but make sure to let us know if it
21503 contains outdated servers.
21504
21505 The blackhole check uses the @code{dig.el} package, but you can tell
21506 @code{spam.el} to use @code{dns.el} instead for better performance if
21507 you set @code{spam-use-dig} to nil.  It is not recommended at this
21508 time to set @code{spam-use-dig} to nil despite the possible
21509 performance improvements, because some users may be unable to use it,
21510 but you can try it and see if it works for you.
21511
21512 @end defvar
21513
21514 @node Bogofilter
21515 @subsubsection Bogofilter
21516 @cindex spam filtering
21517 @cindex bogofilter, spam filtering
21518 @cindex spam.el
21519
21520 @defvar spam-use-bogofilter
21521
21522 Set this variable if you want to use Eric Raymond's speedy Bogofilter.
21523 This has been tested with a locally patched copy of version 0.4.  Make
21524 sure to read the installation comments in @code{spam.el}.
21525
21526 With a minimum of care for associating the @samp{H} mark for spam
21527 articles only, Bogofilter training all gets fairly automatic.  You
21528 should do this until you get a few hundreds of articles in each
21529 category, spam or not.  The shell command @command{head -1
21530 ~/.bogofilter/*} shows both article counts.  The command @kbd{S t} in
21531 summary mode, either for debugging or for curiosity, triggers
21532 Bogofilter into displaying in another buffer the @emph{spamicity}
21533 score of the current article (between 0.0 and 1.0), together with the
21534 article words which most significantly contribute to the score.
21535
21536 @end defvar
21537
21538 @node Ifile spam filtering
21539 @subsubsection Ifile spam filtering
21540 @cindex spam filtering
21541 @cindex ifile, spam filtering
21542 @cindex spam.el
21543
21544 @defvar spam-use-ifile
21545
21546 Enable this variable if you want to use Ifile, a statistical analyzer
21547 similar to Bogofilter.  Currently you must have @code{ifile-gnus.el}
21548 loaded.  The integration of Ifile with @code{spam.el} is not finished
21549 yet, but you can use @code{ifile-gnus.el} on its own if you like.
21550
21551 @end defvar
21552
21553 @node Extending spam.el
21554 @subsubsection Extending spam.el
21555 @cindex spam filtering
21556 @cindex spam.el, extending
21557 @cindex extending spam.el
21558
21559 Say you want to add a new back end called blackbox.  Provide the following:
21560
21561 @enumerate
21562 @item
21563 documentation
21564
21565 @item
21566 code
21567
21568 @example
21569 (defvar spam-use-blackbox nil
21570   "True if blackbox should be used.")
21571 @end example
21572
21573 Add
21574 @example
21575     (spam-use-blackbox   . spam-check-blackbox)
21576 @end example
21577 to @code{spam-list-of-checks}.
21578
21579 @item
21580 functionality
21581
21582 Write the @code{spam-check-blackbox} function.  It should return
21583 @samp{nil} or @code{spam-split-group}.  See the existing
21584 @code{spam-check-*} functions for examples of what you can do.
21585 @end enumerate
21586
21587 @node Filtering Spam Using Statistics (spam-stat.el)
21588 @subsection Filtering Spam Using Statistics (spam-stat.el)
21589 @cindex Paul Graham
21590 @cindex Graham, Paul
21591 @cindex naive Bayesian spam filtering
21592 @cindex Bayesian spam filtering, naive
21593 @cindex spam filtering, naive Bayesian
21594
21595 Paul Graham has written an excellent essay about spam filtering using
21596 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
21597 Spam}.  In it he describes the inherent deficiency of rule-based
21598 filtering as used by SpamAssassin, for example: Somebody has to write
21599 the rules, and everybody else has to install these rules.  You are
21600 always late.  It would be much better, he argues, to filter mail based
21601 on whether it somehow resembles spam or non-spam.  One way to measure
21602 this is word distribution.  He then goes on to describe a solution
21603 that checks whether a new mail resembles any of your other spam mails
21604 or not.
21605
21606 The basic idea is this:  Create a two collections of your mail, one
21607 with spam, one with non-spam.  Count how often each word appears in
21608 either collection, weight this by the total number of mails in the
21609 collections, and store this information in a dictionary.  For every
21610 word in a new mail, determine its probability to belong to a spam or a
21611 non-spam mail.  Use the 15 most conspicuous words, compute the total
21612 probability of the mail being spam.  If this probability is higher
21613 than a certain threshold, the mail is considered to be spam.
21614
21615 Gnus supports this kind of filtering.  But it needs some setting up.
21616 First, you need two collections of your mail, one with spam, one with
21617 non-spam.  Then you need to create a dictionary using these two
21618 collections, and save it.  And last but not least, you need to use
21619 this dictionary in your fancy mail splitting rules.
21620
21621 @menu
21622 * Creating a spam-stat dictionary::  
21623 * Splitting mail using spam-stat::  
21624 * Low-level interface to the spam-stat dictionary::  
21625 @end menu
21626
21627 @node Creating a spam-stat dictionary
21628 @subsubsection Creating a spam-stat dictionary
21629
21630 Before you can begin to filter spam based on statistics, you must
21631 create these statistics based on two mail collections, one with spam,
21632 one with non-spam.  These statistics are then stored in a dictionary
21633 for later use.  In order for these statistics to be meaningful, you
21634 need several hundred emails in both collections.
21635
21636 Gnus currently supports only the nnml back end for automated dictionary
21637 creation.  The nnml back end stores all mails in a directory, one file
21638 per mail.  Use the following:
21639
21640 @defun spam-stat-process-spam-directory
21641 Create spam statistics for every file in this directory.  Every file
21642 is treated as one spam mail.
21643 @end defun
21644
21645 @defun spam-stat-process-non-spam-directory
21646 Create non-spam statistics for every file in this directory.  Every
21647 file is treated as one non-spam mail.
21648 @end defun
21649
21650 Usually you would call @code{spam-stat-process-spam-directory} on a
21651 directory such as @file{~/Mail/mail/spam} (this usually corresponds
21652 the the group @samp{nnml:mail.spam}), and you would call
21653 @code{spam-stat-process-non-spam-directory} on a directory such as
21654 @file{~/Mail/mail/misc} (this usually corresponds the the group
21655 @samp{nnml:mail.misc}).
21656
21657 @defvar spam-stat
21658 This variable holds the hash-table with all the statistics -- the
21659 dictionary we have been talking about.  For every word in either
21660 collection, this hash-table stores a vector describing how often the
21661 word appeared in spam and often it appeared in non-spam mails.
21662
21663 If you want to regenerate the statistics from scratch, you need to
21664 reset the dictionary.
21665
21666 @end defvar
21667
21668 @defun spam-stat-reset
21669 Reset the @code{spam-stat} hash-table, deleting all the statistics.
21670
21671 When you are done, you must save the dictionary.  The dictionary may
21672 be rather large.  If you will not update the dictionary incrementally
21673 (instead, you will recreate it once a month, for example), then you
21674 can reduce the size of the dictionary by deleting all words that did
21675 not appear often enough or that do not clearly belong to only spam or
21676 only non-spam mails.
21677 @end defun
21678
21679 @defun spam-stat-reduce-size
21680 Reduce the size of the dictionary.  Use this only if you do not want
21681 to update the dictionary incrementally.
21682 @end defun
21683
21684 @defun spam-stat-save
21685 Save the dictionary.
21686 @end defun
21687
21688 @defvar spam-stat-file
21689 The filename used to store the dictionary.  This defaults to
21690 @file{~/.spam-stat.el}.
21691 @end defvar
21692
21693 @node Splitting mail using spam-stat
21694 @subsubsection Splitting mail using spam-stat
21695
21696 In order to use @code{spam-stat} to split your mail, you need to add the
21697 following to your @file{~/.gnus} file:
21698
21699 @example
21700 (require 'spam-stat)
21701 (spam-stat-load)
21702 @end example
21703
21704 This will load the necessary Gnus code, and the dictionary you
21705 created.
21706
21707 Next, you need to adapt your fancy splitting rules:  You need to
21708 determine how to use @code{spam-stat}.  In the simplest case, you only have
21709 two groups, @samp{mail.misc} and @samp{mail.spam}.  The following expression says
21710 that mail is either spam or it should go into @samp{mail.misc}.  If it is
21711 spam, then @code{spam-stat-split-fancy} will return @samp{mail.spam}.
21712
21713 @example
21714 (setq nnmail-split-fancy
21715       `(| (: spam-stat-split-fancy)
21716           "mail.misc"))
21717 @end example
21718
21719 @defvar spam-stat-split-fancy-spam-group
21720 The group to use for spam.  Default is @samp{mail.spam}.
21721 @end defvar
21722
21723 If you also filter mail with specific subjects into other groups, use
21724 the following expression.  It only the mails not matching the regular
21725 expression are considered potential spam.
21726
21727 @example
21728 (setq nnmail-split-fancy
21729       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
21730           (: spam-stat-split-fancy)
21731           "mail.misc"))
21732 @end example
21733
21734 If you want to filter for spam first, then you must be careful when
21735 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
21736 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
21737 non-spam, therefore both should be in your collection of non-spam
21738 mails, when creating the dictionary!
21739
21740 @example
21741 (setq nnmail-split-fancy
21742       `(| (: spam-stat-split-fancy)
21743           ("Subject" "\\bspam-stat\\b" "mail.emacs")
21744           "mail.misc"))
21745 @end example
21746
21747 You can combine this with traditional filtering.  Here, we move all
21748 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
21749 @code{spam-stat-split-fancy} will never see them, the mails in
21750 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
21751 nor in your collection of non-spam mails, when creating the
21752 dictionary!
21753
21754 @example
21755 (setq nnmail-split-fancy
21756       `(| ("Content-Type" "text/html" "mail.spam.filtered")
21757           (: spam-stat-split-fancy)
21758           ("Subject" "\\bspam-stat\\b" "mail.emacs")
21759           "mail.misc"))
21760 @end example
21761
21762
21763 @node Low-level interface to the spam-stat dictionary
21764 @subsubsection Low-level interface to the spam-stat dictionary
21765
21766 The main interface to using @code{spam-stat}, are the following functions:
21767
21768 @defun spam-stat-buffer-is-spam
21769 called in a buffer, that buffer is considered to be a new spam mail;
21770 use this for new mail that has not been processed before
21771
21772 @end defun
21773
21774 @defun spam-stat-buffer-is-no-spam
21775 called in a buffer, that buffer is considered to be a new non-spam
21776 mail; use this for new mail that has not been processed before
21777
21778 @end defun
21779
21780 @defun spam-stat-buffer-change-to-spam
21781 called in a buffer, that buffer is no longer considered to be normal
21782 mail but spam; use this to change the status of a mail that has
21783 already been processed as non-spam
21784
21785 @end defun
21786
21787 @defun spam-stat-buffer-change-to-non-spam
21788 called in a buffer, that buffer is no longer considered to be spam but
21789 normal mail; use this to change the status of a mail that has already
21790 been processed as spam
21791
21792 @end defun
21793
21794 @defun spam-stat-save
21795 save the hash table to the file; the filename used is stored in the
21796 variable @code{spam-stat-file}
21797
21798 @end defun
21799
21800 @defun spam-stat-load
21801 load the hash table from a file; the filename used is stored in the
21802 variable @code{spam-stat-file}
21803
21804 @end defun
21805
21806 @defun spam-stat-score-word
21807 return the spam score for a word
21808
21809 @end defun
21810
21811 @defun spam-stat-score-buffer
21812 return the spam score for a buffer
21813
21814 @end defun
21815
21816 @defun spam-stat-split-fancy
21817 for fancy mail splitting; add the rule @samp{(: spam-stat-split-fancy)} to
21818 @code{nnmail-split-fancy}
21819
21820 This requires the following in your @file{~/.gnus} file:
21821
21822 @example
21823 (require 'spam-stat)
21824 (spam-stat-load)
21825 @end example
21826
21827 @end defun
21828
21829 Typical test will involve calls to the following functions:
21830
21831 @example
21832 Reset: (setq spam-stat (make-hash-table :test 'equal))
21833 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
21834 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
21835 Save table: (spam-stat-save)
21836 File size: (nth 7 (file-attributes spam-stat-file))
21837 Number of words: (hash-table-count spam-stat)
21838 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
21839 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
21840 Reduce table size: (spam-stat-reduce-size)
21841 Save table: (spam-stat-save)
21842 File size: (nth 7 (file-attributes spam-stat-file))
21843 Number of words: (hash-table-count spam-stat)
21844 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
21845 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
21846 @end example
21847
21848 Here is how you would create your dictionary:
21849
21850 @example
21851 Reset: (setq spam-stat (make-hash-table :test 'equal))
21852 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
21853 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
21854 Repeat for any other non-spam group you need...
21855 Reduce table size: (spam-stat-reduce-size)
21856 Save table: (spam-stat-save)
21857 @end example
21858
21859 @node Various Various
21860 @section Various Various
21861 @cindex mode lines
21862 @cindex highlights
21863
21864 @table @code
21865
21866 @item gnus-home-directory
21867 All Gnus path variables will be initialized from this variable, which
21868 defaults to @file{~/}.
21869
21870 @item gnus-directory
21871 @vindex gnus-directory
21872 Most Gnus storage path variables will be initialized from this variable,
21873 which defaults to the @samp{SAVEDIR} environment variable, or
21874 @file{~/News/} if that variable isn't set.
21875
21876 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
21877 This means that other directory variables that are initialized from this
21878 variable won't be set properly if you set this variable in
21879 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
21880
21881 @item gnus-default-directory
21882 @vindex gnus-default-directory
21883 Not related to the above variable at all---this variable says what the
21884 default directory of all Gnus buffers should be.  If you issue commands
21885 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
21886 default directory.  If this variable is @code{nil} (which is the
21887 default), the default directory will be the default directory of the
21888 buffer you were in when you started Gnus.
21889
21890 @item gnus-verbose
21891 @vindex gnus-verbose
21892 This variable is an integer between zero and ten.  The higher the value,
21893 the more messages will be displayed.  If this variable is zero, Gnus
21894 will never flash any messages, if it is seven (which is the default),
21895 most important messages will be shown, and if it is ten, Gnus won't ever
21896 shut up, but will flash so many messages it will make your head swim.
21897
21898 @item gnus-verbose-backends
21899 @vindex gnus-verbose-backends
21900 This variable works the same way as @code{gnus-verbose}, but it applies
21901 to the Gnus back ends instead of Gnus proper.
21902
21903 @item nnheader-max-head-length
21904 @vindex nnheader-max-head-length
21905 When the back ends read straight heads of articles, they all try to read
21906 as little as possible.  This variable (default 4096) specifies
21907 the absolute max length the back ends will try to read before giving up
21908 on finding a separator line between the head and the body.  If this
21909 variable is @code{nil}, there is no upper read bound.  If it is
21910 @code{t}, the back ends won't try to read the articles piece by piece,
21911 but read the entire articles.  This makes sense with some versions of
21912 @code{ange-ftp} or @code{efs}.
21913
21914 @item nnheader-head-chop-length
21915 @vindex nnheader-head-chop-length
21916 This variable (default 2048) says how big a piece of each article to
21917 read when doing the operation described above.
21918
21919 @item nnheader-file-name-translation-alist
21920 @vindex nnheader-file-name-translation-alist
21921 @cindex file names
21922 @cindex invalid characters in file names
21923 @cindex characters in file names
21924 This is an alist that says how to translate characters in file names.
21925 For instance, if @samp{:} is invalid as a file character in file names
21926 on your system (you OS/2 user you), you could say something like:
21927
21928 @lisp
21929 (setq nnheader-file-name-translation-alist
21930       '((?: . ?_)))
21931 @end lisp
21932
21933 In fact, this is the default value for this variable on OS/2 and MS
21934 Windows (phooey) systems.
21935
21936 @item gnus-hidden-properties
21937 @vindex gnus-hidden-properties
21938 This is a list of properties to use to hide ``invisible'' text.  It is
21939 @code{(invisible t intangible t)} by default on most systems, which
21940 makes invisible text invisible and intangible.
21941
21942 @item gnus-parse-headers-hook
21943 @vindex gnus-parse-headers-hook
21944 A hook called before parsing headers.  It can be used, for instance, to
21945 gather statistics on the headers fetched, or perhaps you'd like to prune
21946 some headers.  I don't see why you'd want that, though.
21947
21948 @item gnus-shell-command-separator
21949 @vindex gnus-shell-command-separator
21950 String used to separate two shell commands.  The default is @samp{;}.
21951
21952 @item gnus-invalid-group-regexp
21953 @vindex gnus-invalid-group-regexp
21954
21955 Regexp to match ``invalid'' group names when querying user for a group
21956 name.  The default value catches some @strong{really} invalid group
21957 names who could possibly mess up Gnus internally (like allowing
21958 @samp{:} in a group name, which is normally used to delimit method and
21959 group).
21960
21961 @sc{imap} users might want to allow @samp{/} in group names though.
21962
21963
21964 @end table
21965
21966 @node The End
21967 @chapter The End
21968
21969 Well, that's the manual---you can get on with your life now.  Keep in
21970 touch.  Say hello to your cats from me.
21971
21972 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
21973
21974 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
21975
21976 @quotation
21977 @strong{Te Deum}
21978
21979 @sp 1
21980 Not because of victories @*
21981 I sing,@*
21982 having none,@*
21983 but for the common sunshine,@*
21984 the breeze,@*
21985 the largess of the spring.
21986
21987 @sp 1
21988 Not for victory@*
21989 but for the day's work done@*
21990 as well as I was able;@*
21991 not for a seat upon the dais@*
21992 but at the common table.@*
21993 @end quotation
21994
21995
21996 @node Appendices
21997 @chapter Appendices
21998
21999 @menu
22000 * XEmacs::                      Requirements for installing under XEmacs.
22001 * History::                     How Gnus got where it is today.
22002 * On Writing Manuals::          Why this is not a beginner's guide.
22003 * Terminology::                 We use really difficult, like, words here.
22004 * Customization::               Tailoring Gnus to your needs.
22005 * Troubleshooting::             What you might try if things do not work.
22006 * Gnus Reference Guide::        Rilly, rilly technical stuff.
22007 * Emacs for Heathens::          A short introduction to Emacsian terms.
22008 * Frequently Asked Questions::
22009 @end menu
22010
22011
22012 @node XEmacs
22013 @section XEmacs
22014 @cindex XEmacs
22015 @cindex Installing under XEmacs
22016
22017 XEmacs is distributed as a collection of packages.  You should install
22018 whatever packages the Gnus XEmacs package requires.  The current
22019 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
22020 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
22021 @samp{xemacs-base}, and @samp{fsf-compat}.  The @samp{misc-games}
22022 package is required for Morse decoding.
22023
22024
22025 @node History
22026 @section History
22027
22028 @cindex history
22029 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
22030 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
22031
22032 If you want to investigate the person responsible for this outrage,
22033 you can point your (feh!) web browser to
22034 @uref{http://quimby.gnus.org/}.  This is also the primary
22035 distribution point for the new and spiffy versions of Gnus, and is
22036 known as The Site That Destroys Newsrcs And Drives People Mad.
22037
22038 During the first extended alpha period of development, the new Gnus was
22039 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
22040 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
22041 (Besides, the ``Gnus'' in this abbreviation should probably be
22042 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
22043 appropriate name, don't you think?)
22044
22045 In any case, after spending all that energy on coming up with a new and
22046 spunky name, we decided that the name was @emph{too} spunky, so we
22047 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
22048 ``@sc{gnus}''.  New vs. old.
22049
22050 @menu
22051 * Gnus Versions::               What Gnus versions have been released.
22052 * Other Gnus Versions::         Other Gnus versions that also have been released.
22053 * Why?::                        What's the point of Gnus?
22054 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
22055 * Conformity::                  Gnus tries to conform to all standards.
22056 * Emacsen::                     Gnus can be run on a few modern Emacsen.
22057 * Gnus Development::            How Gnus is developed.
22058 * Contributors::                Oodles of people.
22059 * New Features::                Pointers to some of the new stuff in Gnus.
22060 @end menu
22061
22062
22063 @node Gnus Versions
22064 @subsection Gnus Versions
22065 @cindex ding Gnus
22066 @cindex September Gnus
22067 @cindex Red Gnus
22068 @cindex Quassia Gnus
22069 @cindex Pterodactyl Gnus
22070 @cindex Oort Gnus
22071 @cindex No Gnus
22072
22073 The first ``proper'' release of Gnus 5 was done in November 1995 when it
22074 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
22075 plus 15 Gnus 5.0 releases).
22076
22077 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
22078 releases)) was released under the name ``Gnus 5.2'' (40 releases).
22079
22080 On July 28th 1996 work on Red Gnus was begun, and it was released on
22081 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
22082
22083 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
22084 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
22085
22086 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
22087 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
22088 1999.
22089
22090 On the 26th of October 2000, Oort Gnus was begun.
22091
22092 If you happen upon a version of Gnus that has a prefixed name --
22093 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
22094 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
22095 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
22096 run.  Walk away, calmly, until you're out of its reach.  Find a proper
22097 released version of Gnus and snuggle up to that instead.
22098
22099
22100 @node Other Gnus Versions
22101 @subsection Other Gnus Versions
22102 @cindex Semi-gnus
22103
22104 In addition to the versions of Gnus which have had their releases
22105 coordinated by Lars, one major development has been Semi-gnus from
22106 Japan.  It's based on a library called @sc{semi}, which provides
22107 @sc{mime} capabilities.
22108
22109 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
22110 Collectively, they are called ``Semi-gnus'', and different strains are
22111 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
22112 @sc{mime} and multilingualization things, especially important for
22113 Japanese users.
22114
22115
22116 @node Why?
22117 @subsection Why?
22118
22119 What's the point of Gnus?
22120
22121 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
22122 newsreader, that lets you do anything you can think of.  That was my
22123 original motivation, but while working on Gnus, it has become clear to
22124 me that this generation of newsreaders really belong in the stone age.
22125 Newsreaders haven't developed much since the infancy of the net.  If the
22126 volume continues to rise with the current rate of increase, all current
22127 newsreaders will be pretty much useless.  How do you deal with
22128 newsgroups that have thousands of new articles each day?  How do you
22129 keep track of millions of people who post?
22130
22131 Gnus offers no real solutions to these questions, but I would very much
22132 like to see Gnus being used as a testing ground for new methods of
22133 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
22134 to separate the newsreader from the back ends, Gnus now offers a simple
22135 interface for anybody who wants to write new back ends for fetching mail
22136 and news from different sources.  I have added hooks for customizations
22137 everywhere I could imagine it being useful.  By doing so, I'm inviting
22138 every one of you to explore and invent.
22139
22140 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
22141 @kbd{C-u 100 M-x all-hail-xemacs}.
22142
22143
22144 @node Compatibility
22145 @subsection Compatibility
22146
22147 @cindex compatibility
22148 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
22149 bindings have been kept.  More key bindings have been added, of course,
22150 but only in one or two obscure cases have old bindings been changed.
22151
22152 Our motto is:
22153 @quotation
22154 @cartouche
22155 @center In a cloud bones of steel.
22156 @end cartouche
22157 @end quotation
22158
22159 All commands have kept their names.  Some internal functions have changed
22160 their names.
22161
22162 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
22163 Articles}.
22164
22165 One major compatibility question is the presence of several summary
22166 buffers.  All variables relevant while reading a group are
22167 buffer-local to the summary buffer they belong in.  Although many
22168 important variables have their values copied into their global
22169 counterparts whenever a command is executed in the summary buffer, this
22170 change might lead to incorrect values being used unless you are careful.
22171
22172 All code that relies on knowledge of @sc{gnus} internals will probably
22173 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
22174 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
22175 maintains a hash table that points to the entries in this alist (which
22176 speeds up many functions), and changing the alist directly will lead to
22177 peculiar results.
22178
22179 @cindex hilit19
22180 @cindex highlighting
22181 Old hilit19 code does not work at all.  In fact, you should probably
22182 remove all hilit code from all Gnus hooks
22183 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
22184 Gnus provides various integrated functions for highlighting.  These are
22185 faster and more accurate.  To make life easier for everybody, Gnus will
22186 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
22187 Away!
22188
22189 Packages like @code{expire-kill} will no longer work.  As a matter of
22190 fact, you should probably remove all old @sc{gnus} packages (and other
22191 code) when you start using Gnus.  More likely than not, Gnus already
22192 does what you have written code to make @sc{gnus} do.  (Snicker.)
22193
22194 Even though old methods of doing things are still supported, only the
22195 new methods are documented in this manual.  If you detect a new method of
22196 doing something while reading this manual, that does not mean you have
22197 to stop doing it the old way.
22198
22199 Gnus understands all @sc{gnus} startup files.
22200
22201 @kindex M-x gnus-bug
22202 @findex gnus-bug
22203 @cindex reporting bugs
22204 @cindex bugs
22205 Overall, a casual user who hasn't written much code that depends on
22206 @sc{gnus} internals should suffer no problems.  If problems occur,
22207 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
22208
22209 @vindex gnus-bug-create-help-buffer
22210 If you are in the habit of sending bug reports @emph{very} often, you
22211 may find the helpful help buffer annoying after a while.  If so, set
22212 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
22213 up at you.
22214
22215
22216 @node Conformity
22217 @subsection Conformity
22218
22219 No rebels without a clue here, ma'am.  We conform to all standards known
22220 to (wo)man.  Except for those standards and/or conventions we disagree
22221 with, of course.
22222
22223 @table @strong
22224
22225 @item RFC (2)822
22226 @cindex RFC 822
22227 @cindex RFC 2822
22228 There are no known breaches of this standard.
22229
22230 @item RFC 1036
22231 @cindex RFC 1036
22232 There are no known breaches of this standard, either.
22233
22234 @item Son-of-RFC 1036
22235 @cindex Son-of-RFC 1036
22236 We do have some breaches to this one.
22237
22238 @table @emph
22239
22240 @item X-Newsreader
22241 @itemx User-Agent
22242 These are considered to be ``vanity headers'', while I consider them
22243 to be consumer information.  After seeing so many badly formatted
22244 articles coming from @code{tin} and @code{Netscape} I know not to use
22245 either of those for posting articles.  I would not have known that if
22246 it wasn't for the @code{X-Newsreader} header.
22247 @end table
22248
22249 @item USEFOR
22250 @cindex USEFOR
22251 USEFOR is an IETF working group writing a successor to RFC 1036, based
22252 on Son-of-RFC 1036.  They have produced a number of drafts proposing
22253 various changes to the format of news articles.  The Gnus towers will
22254 look into implementing the changes when the draft is accepted as an RFC.
22255
22256 @item MIME - RFC 2045-2049 etc
22257 @cindex MIME
22258 All the various @sc{mime} RFCs are supported.
22259
22260 @item Disposition Notifications - RFC 2298
22261 Message Mode is able to request notifications from the receiver.
22262
22263 @item PGP - RFC 1991 and RFC 2440
22264 @cindex RFC 1991
22265 @cindex RFC 2440
22266 RFC 1991 is the original PGP message specification, published as a
22267 Information RFC.  RFC 2440 was the follow-up, now called Open PGP, and
22268 put on the Standards Track.  Both document a non-@sc{mime} aware PGP
22269 format.  Gnus supports both encoding (signing and encryption) and
22270 decoding (verification and decryption).
22271
22272 @item PGP/MIME - RFC 2015/3156
22273 RFC 2015 (superceded by 3156 which references RFC 2440 instead of RFC
22274 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
22275 Gnus supports both encoding and decoding.
22276
22277 @item S/MIME - RFC 2633
22278 RFC 2633 describes the @sc{s/mime} format.
22279
22280 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
22281 RFC 1730 is @sc{imap} version 4, updated somewhat by RFC 2060 (@sc{imap} 4
22282 revision 1).  RFC 2195 describes CRAM-MD5 authentication for @sc{imap}. RFC
22283 2086 describes access control lists (ACLs) for @sc{imap}. RFC 2359
22284 describes a @sc{imap} protocol enhancement.  RFC 2595 describes the proper
22285 TLS integration (STARTTLS) with @sc{imap}.  RFC 1731 describes the
22286 GSSAPI/Kerberos4 mechanisms for @sc{imap}.
22287
22288 @end table
22289
22290 If you ever notice Gnus acting non-compliant with regards to the texts
22291 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
22292 know.
22293
22294
22295 @node Emacsen
22296 @subsection Emacsen
22297 @cindex Emacsen
22298 @cindex XEmacs
22299 @cindex Mule
22300 @cindex Emacs
22301
22302 Gnus should work on :
22303
22304 @itemize @bullet
22305
22306 @item
22307 Emacs 20.3 and up.
22308
22309 @item
22310 XEmacs 21.1.1 and up.
22311
22312 @end itemize
22313
22314 This Gnus version will absolutely not work on any Emacsen older than
22315 that.  Not reliably, at least.  Older versions of Gnus may work on older
22316 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
22317 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
22318 See the file ``README'' in the T-gnus distribution for more details.
22319
22320 There are some vague differences between Gnus on the various
22321 platforms---XEmacs features more graphics (a logo and a toolbar)---but
22322 other than that, things should look pretty much the same under all
22323 Emacsen.
22324
22325
22326 @node Gnus Development
22327 @subsection Gnus Development
22328
22329 Gnus is developed in a two-phased cycle.  The first phase involves much
22330 discussion on the @samp{ding@@gnus.org} mailing list, where people
22331 propose changes and new features, post patches and new back ends.  This
22332 phase is called the @dfn{alpha} phase, since the Gnusae released in this
22333 phase are @dfn{alpha releases}, or (perhaps more commonly in other
22334 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
22335 unstable and should not be used by casual users.  Gnus alpha releases
22336 have names like ``Red Gnus'' and ``Quassia Gnus''.
22337
22338 After futzing around for 50-100 alpha releases, Gnus is declared
22339 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
22340 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
22341 supposed to be able to use these, and these are mostly discussed on the
22342 @samp{gnu.emacs.gnus} newsgroup.
22343
22344 @cindex Incoming*
22345 @vindex mail-source-delete-incoming
22346 Some variable defaults differ between alpha Gnusae and released Gnusae.
22347 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
22348 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
22349 lossage of mail if an alpha release hiccups while handling the mail.
22350
22351 The division of discussion between the ding mailing list and the Gnus
22352 newsgroup is not purely based on publicity concerns.  It's true that
22353 having people write about the horrible things that an alpha Gnus release
22354 can do (sometimes) in a public forum may scare people off, but more
22355 importantly, talking about new experimental features that have been
22356 introduced may confuse casual users.  New features are frequently
22357 introduced, fiddled with, and judged to be found wanting, and then
22358 either discarded or totally rewritten.  People reading the mailing list
22359 usually keep up with these rapid changes, while people on the newsgroup
22360 can't be assumed to do so.
22361
22362
22363
22364 @node Contributors
22365 @subsection Contributors
22366 @cindex contributors
22367
22368 The new Gnus version couldn't have been done without the help of all the
22369 people on the (ding) mailing list.  Every day for over a year I have
22370 gotten billions of nice bug reports from them, filling me with joy,
22371 every single one of them.  Smooches.  The people on the list have been
22372 tried beyond endurance, what with my ``oh, that's a neat idea <type
22373 type>, yup, I'll release it right away <ship off> no wait, that doesn't
22374 work at all <type type>, yup, I'll ship that one off right away <ship
22375 off> no, wait, that absolutely does not work'' policy for releases.
22376 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
22377 ``worser''? ``much worser''?  ``worsest''?)
22378
22379 I would like to take this opportunity to thank the Academy for...  oops,
22380 wrong show.
22381
22382 @itemize @bullet
22383
22384 @item
22385 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
22386
22387 @item
22388 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
22389 nnwarchive and many, many other things connected with @sc{mime} and
22390 other types of en/decoding, as well as general bug fixing, new
22391 functionality and stuff.
22392
22393 @item
22394 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
22395 well as numerous other things).
22396
22397 @item
22398 Luis Fernandes---design and graphics.
22399
22400 @item
22401 Joe Reiss---creator of the smiley faces.
22402
22403 @item
22404 Justin Sheehy--the FAQ maintainer.
22405
22406 @item
22407 Erik Naggum---help, ideas, support, code and stuff.
22408
22409 @item
22410 Wes Hardaker---@file{gnus-picon.el} and the manual section on
22411 @dfn{picons} (@pxref{Picons}).
22412
22413 @item
22414 Kim-Minh Kaplan---further work on the picon code.
22415
22416 @item
22417 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
22418 (@pxref{GroupLens}).
22419
22420 @item
22421 Sudish Joseph---innumerable bug fixes.
22422
22423 @item
22424 Ilja Weis---@file{gnus-topic.el}.
22425
22426 @item
22427 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
22428
22429 @item
22430 Vladimir Alexiev---the refcard and reference booklets.
22431
22432 @item
22433 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
22434 distribution by Felix Lee and JWZ.
22435
22436 @item
22437 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
22438
22439 @item
22440 Peter Mutsaers---orphan article scoring code.
22441
22442 @item
22443 Ken Raeburn---POP mail support.
22444
22445 @item
22446 Hallvard B Furuseth---various bits and pieces, especially dealing with
22447 .newsrc files.
22448
22449 @item
22450 Brian Edmonds---@file{gnus-bbdb.el}.
22451
22452 @item
22453 David Moore---rewrite of @file{nnvirtual.el} and many other things.
22454
22455 @item
22456 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
22457
22458 @item
22459 François Pinard---many, many interesting and thorough bug reports, as
22460 well as autoconf support.
22461
22462 @end itemize
22463
22464 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
22465 Borges, and Jost Krieger proof-reading parts of the manual.
22466
22467 The following people have contributed many patches and suggestions:
22468
22469 Christopher Davis,
22470 Andrew Eskilsson,
22471 Kai Grossjohann,
22472 David KÃ¥gedal,
22473 Richard Pieri,
22474 Fabrice Popineau,
22475 Daniel Quinlan,
22476 Jason L. Tibbitts, III,
22477 and
22478 Jack Vinson.
22479
22480 Also thanks to the following for patches and stuff:
22481
22482 Jari Aalto,
22483 Adrian Aichner,
22484 Vladimir Alexiev,
22485 Russ Allbery,
22486 Peter Arius,
22487 Matt Armstrong,
22488 Marc Auslander,
22489 Miles Bader,
22490 Alexei V. Barantsev,
22491 Frank Bennett,
22492 Robert Bihlmeyer,
22493 Chris Bone,
22494 Mark Borges,
22495 Mark Boyns,
22496 Lance A. Brown,
22497 Rob Browning,
22498 Kees de Bruin,
22499 Martin Buchholz,
22500 Joe Buehler,
22501 Kevin Buhr,
22502 Alastair Burt,
22503 Joao Cachopo,
22504 Zlatko Calusic,
22505 Massimo Campostrini,
22506 Castor,
22507 David Charlap,
22508 Dan Christensen,
22509 Kevin Christian,
22510 Jae-you Chung, @c ?
22511 James H. Cloos, Jr.,
22512 Laura Conrad,
22513 Michael R. Cook,
22514 Glenn Coombs,
22515 Andrew J. Cosgriff,
22516 Neil Crellin,
22517 Frank D. Cringle,
22518 Geoffrey T. Dairiki,
22519 Andre Deparade,
22520 Ulrik Dickow,
22521 Dave Disser,
22522 Rui-Tao Dong, @c ?
22523 Joev Dubach,
22524 Michael Welsh Duggan,
22525 Dave Edmondson,
22526 Paul Eggert,
22527 Mark W. Eichin,
22528 Karl Eichwalder,
22529 Enami Tsugutomo, @c Enami
22530 Michael Ernst,
22531 Luc Van Eycken,
22532 Sam Falkner,
22533 Nelson Jose dos Santos Ferreira,
22534 Sigbjorn Finne,
22535 Sven Fischer,
22536 Paul Fisher,
22537 Decklin Foster,
22538 Gary D. Foster,
22539 Paul Franklin,
22540 Guy Geens,
22541 Arne Georg Gleditsch,
22542 David S. Goldberg,
22543 Michelangelo Grigni,
22544 Dale Hagglund,
22545 D. Hall,
22546 Magnus Hammerin,
22547 Kenichi Handa, @c Handa
22548 Raja R. Harinath,
22549 Yoshiki Hayashi, @c ?
22550 P. E. Jareth Hein,
22551 Hisashige Kenji, @c Hisashige
22552 Scott Hofmann,
22553 Marc Horowitz,
22554 Gunnar Horrigmo,
22555 Richard Hoskins,
22556 Brad Howes,
22557 Miguel de Icaza,
22558 François Felix Ingrand,
22559 Tatsuya Ichikawa, @c ?
22560 Ishikawa Ichiro, @c Ishikawa
22561 Lee Iverson,
22562 Iwamuro Motonori, @c Iwamuro
22563 Rajappa Iyer,
22564 Andreas Jaeger,
22565 Adam P. Jenkins,
22566 Randell Jesup,
22567 Fred Johansen,
22568 Gareth Jones,
22569 Simon Josefsson,
22570 Greg Klanderman,
22571 Karl Kleinpaste,
22572 Michael Klingbeil,
22573 Peter Skov Knudsen,
22574 Shuhei Kobayashi, @c Kobayashi
22575 Petr Konecny,
22576 Koseki Yoshinori, @c Koseki
22577 Thor Kristoffersen,
22578 Jens Lautenbacher,
22579 Martin Larose,
22580 Seokchan Lee, @c Lee
22581 Joerg Lenneis,
22582 Carsten Leonhardt,
22583 James LewisMoss,
22584 Christian Limpach,
22585 Markus Linnala,
22586 Dave Love,
22587 Mike McEwan,
22588 Tonny Madsen,
22589 Shlomo Mahlab,
22590 Nat Makarevitch,
22591 Istvan Marko,
22592 David Martin,
22593 Jason R. Mastaler,
22594 Gordon Matzigkeit,
22595 Timo Metzemakers,
22596 Richard Mlynarik,
22597 Lantz Moore,
22598 Morioka Tomohiko, @c Morioka
22599 Erik Toubro Nielsen,
22600 Hrvoje Niksic,
22601 Andy Norman,
22602 Fred Oberhauser,
22603 C. R. Oldham,
22604 Alexandre Oliva,
22605 Ken Olstad,
22606 Masaharu Onishi, @c Onishi
22607 Hideki Ono, @c Ono
22608 Ettore Perazzoli,
22609 William Perry,
22610 Stephen Peters,
22611 Jens-Ulrik Holger Petersen,
22612 Ulrich Pfeifer,
22613 Matt Pharr,
22614 Andy Piper,
22615 John McClary Prevost,
22616 Bill Pringlemeir,
22617 Mike Pullen,
22618 Jim Radford,
22619 Colin Rafferty,
22620 Lasse Rasinen,
22621 Lars Balker Rasmussen,
22622 Joe Reiss,
22623 Renaud Rioboo,
22624 Roland B. Roberts,
22625 Bart Robinson,
22626 Christian von Roques,
22627 Markus Rost,
22628 Jason Rumney,
22629 Wolfgang Rupprecht,
22630 Jay Sachs,
22631 Dewey M. Sasser,
22632 Conrad Sauerwald,
22633 Loren Schall,
22634 Dan Schmidt,
22635 Ralph Schleicher,
22636 Philippe Schnoebelen,
22637 Andreas Schwab,
22638 Randal L. Schwartz,
22639 Danny Siu,
22640 Matt Simmons,
22641 Paul D. Smith,
22642 Jeff Sparkes,
22643 Toby Speight,
22644 Michael Sperber,
22645 Darren Stalder,
22646 Richard Stallman,
22647 Greg Stark,
22648 Sam Steingold,
22649 Paul Stevenson,
22650 Jonas Steverud,
22651 Paul Stodghill,
22652 Kiyokazu Suto, @c Suto
22653 Kurt Swanson,
22654 Samuel Tardieu,
22655 Teddy,
22656 Chuck Thompson,
22657 Tozawa Akihiko, @c Tozawa
22658 Philippe Troin,
22659 James Troup,
22660 Trung Tran-Duc,
22661 Jack Twilley,
22662 Aaron M. Ucko,
22663 Aki Vehtari,
22664 Didier Verna,
22665 Vladimir Volovich,
22666 Jan Vroonhof,
22667 Stefan Waldherr,
22668 Pete Ware,
22669 Barry A. Warsaw,
22670 Christoph Wedler,
22671 Joe Wells,
22672 Lee Willis,
22673 Katsumi Yamaoka @c Yamaoka
22674 and
22675 Lloyd Zusman.
22676
22677
22678 For a full overview of what each person has done, the ChangeLogs
22679 included in the Gnus alpha distributions should give ample reading
22680 (550kB and counting).
22681
22682 Apologies to everybody that I've forgotten, of which there are many, I'm
22683 sure.
22684
22685 Gee, that's quite a list of people.  I guess that must mean that there
22686 actually are people who are using Gnus.  Who'd'a thunk it!
22687
22688
22689 @node New Features
22690 @subsection New Features
22691 @cindex new features
22692
22693 @menu
22694 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
22695 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
22696 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
22697 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
22698 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
22699 @end menu
22700
22701 These lists are, of course, just @emph{short} overviews of the
22702 @emph{most} important new features.  No, really.  There are tons more.
22703 Yes, we have feeping creaturism in full effect.
22704
22705 @node ding Gnus
22706 @subsubsection (ding) Gnus
22707
22708 New features in Gnus 5.0/5.1:
22709
22710 @itemize @bullet
22711
22712 @item
22713 The look of all buffers can be changed by setting format-like variables
22714 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
22715
22716 @item
22717 Local spool and several @sc{nntp} servers can be used at once
22718 (@pxref{Select Methods}).
22719
22720 @item
22721 You can combine groups into virtual groups (@pxref{Virtual Groups}).
22722
22723 @item
22724 You can read a number of different mail formats (@pxref{Getting Mail}).
22725 All the mail back ends implement a convenient mail expiry scheme
22726 (@pxref{Expiring Mail}).
22727
22728 @item
22729 Gnus can use various strategies for gathering threads that have lost
22730 their roots (thereby gathering loose sub-threads into one thread) or it
22731 can go back and retrieve enough headers to build a complete thread
22732 (@pxref{Customizing Threading}).
22733
22734 @item
22735 Killed groups can be displayed in the group buffer, and you can read
22736 them as well (@pxref{Listing Groups}).
22737
22738 @item
22739 Gnus can do partial group updates---you do not have to retrieve the
22740 entire active file just to check for new articles in a few groups
22741 (@pxref{The Active File}).
22742
22743 @item
22744 Gnus implements a sliding scale of subscribedness to groups
22745 (@pxref{Group Levels}).
22746
22747 @item
22748 You can score articles according to any number of criteria
22749 (@pxref{Scoring}).  You can even get Gnus to find out how to score
22750 articles for you (@pxref{Adaptive Scoring}).
22751
22752 @item
22753 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
22754 manner, so it should be difficult to lose much data on what you have
22755 read if your machine should go down (@pxref{Auto Save}).
22756
22757 @item
22758 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
22759 the @file{.emacs} file.
22760
22761 @item
22762 You can set the process mark on both groups and articles and perform
22763 operations on all the marked items (@pxref{Process/Prefix}).
22764
22765 @item
22766 You can grep through a subset of groups and create a group from the
22767 results (@pxref{Kibozed Groups}).
22768
22769 @item
22770 You can list subsets of groups according to, well, anything
22771 (@pxref{Listing Groups}).
22772
22773 @item
22774 You can browse foreign servers and subscribe to groups from those
22775 servers (@pxref{Browse Foreign Server}).
22776
22777 @item
22778 Gnus can fetch articles, asynchronously, on a second connection to the
22779 server (@pxref{Asynchronous Fetching}).
22780
22781 @item
22782 You can cache articles locally (@pxref{Article Caching}).
22783
22784 @item
22785 The uudecode functions have been expanded and generalized
22786 (@pxref{Decoding Articles}).
22787
22788 @item
22789 You can still post uuencoded articles, which was a little-known feature
22790 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
22791
22792 @item
22793 Fetching parents (and other articles) now actually works without
22794 glitches (@pxref{Finding the Parent}).
22795
22796 @item
22797 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
22798
22799 @item
22800 Digests (and other files) can be used as the basis for groups
22801 (@pxref{Document Groups}).
22802
22803 @item
22804 Articles can be highlighted and customized (@pxref{Customizing
22805 Articles}).
22806
22807 @item
22808 URLs and other external references can be buttonized (@pxref{Article
22809 Buttons}).
22810
22811 @item
22812 You can do lots of strange stuff with the Gnus window & frame
22813 configuration (@pxref{Window Layout}).
22814
22815 @item
22816 You can click on buttons instead of using the keyboard
22817 (@pxref{Buttons}).
22818
22819 @end itemize
22820
22821
22822 @node September Gnus
22823 @subsubsection September Gnus
22824
22825 @iftex
22826 @iflatex
22827 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
22828 @end iflatex
22829 @end iftex
22830
22831 New features in Gnus 5.2/5.3:
22832
22833 @itemize @bullet
22834
22835 @item
22836 A new message composition mode is used.  All old customization variables
22837 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
22838 now obsolete.
22839
22840 @item
22841 Gnus is now able to generate @dfn{sparse} threads---threads where
22842 missing articles are represented by empty nodes (@pxref{Customizing
22843 Threading}).
22844
22845 @lisp
22846 (setq gnus-build-sparse-threads 'some)
22847 @end lisp
22848
22849 @item
22850 Outgoing articles are stored on a special archive server
22851 (@pxref{Archived Messages}).
22852
22853 @item
22854 Partial thread regeneration now happens when articles are
22855 referred.
22856
22857 @item
22858 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
22859
22860 @item
22861 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
22862
22863 @item
22864 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
22865
22866 @lisp
22867 (setq gnus-use-trees t)
22868 @end lisp
22869
22870 @item
22871 An @code{nn}-like pick-and-read minor mode is available for the summary
22872 buffers (@pxref{Pick and Read}).
22873
22874 @lisp
22875 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
22876 @end lisp
22877
22878 @item
22879 In binary groups you can use a special binary minor mode (@pxref{Binary
22880 Groups}).
22881
22882 @item
22883 Groups can be grouped in a folding topic hierarchy (@pxref{Group
22884 Topics}).
22885
22886 @lisp
22887 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
22888 @end lisp
22889
22890 @item
22891 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
22892
22893 @item
22894 Groups can now have a score, and bubbling based on entry frequency
22895 is possible (@pxref{Group Score}).
22896
22897 @lisp
22898 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
22899 @end lisp
22900
22901 @item
22902 Groups can be process-marked, and commands can be performed on
22903 groups of groups (@pxref{Marking Groups}).
22904
22905 @item
22906 Caching is possible in virtual groups.
22907
22908 @item
22909 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
22910 news batches, ClariNet briefs collections, and just about everything
22911 else (@pxref{Document Groups}).
22912
22913 @item
22914 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
22915 (@pxref{SOUP}).
22916
22917 @item
22918 The Gnus cache is much faster.
22919
22920 @item
22921 Groups can be sorted according to many criteria (@pxref{Sorting
22922 Groups}).
22923
22924 @item
22925 New group parameters have been introduced to set list-addresses and
22926 expiry times (@pxref{Group Parameters}).
22927
22928 @item
22929 All formatting specs allow specifying faces to be used
22930 (@pxref{Formatting Fonts}).
22931
22932 @item
22933 There are several more commands for setting/removing/acting on process
22934 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
22935
22936 @item
22937 The summary buffer can be limited to show parts of the available
22938 articles based on a wide range of criteria.  These commands have been
22939 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
22940
22941 @item
22942 Articles can be made persistent with the @kbd{*} command
22943 (@pxref{Persistent Articles}).
22944
22945 @item
22946 All functions for hiding article elements are now toggles.
22947
22948 @item
22949 Article headers can be buttonized (@pxref{Article Washing}).
22950
22951 @item
22952 All mail back ends support fetching articles by @code{Message-ID}.
22953
22954 @item
22955 Duplicate mail can now be treated properly (@pxref{Duplicates}).
22956
22957 @item
22958 All summary mode commands are available directly from the article
22959 buffer (@pxref{Article Keymap}).
22960
22961 @item
22962 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
22963 Layout}).
22964
22965 @item
22966 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
22967 @iftex
22968 @iflatex
22969 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
22970 @end iflatex
22971 @end iftex
22972
22973 @item
22974 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
22975
22976 @lisp
22977 (setq gnus-use-nocem t)
22978 @end lisp
22979
22980 @item
22981 Groups can be made permanently visible (@pxref{Listing Groups}).
22982
22983 @lisp
22984 (setq gnus-permanently-visible-groups "^nnml:")
22985 @end lisp
22986
22987 @item
22988 Many new hooks have been introduced to make customizing easier.
22989
22990 @item
22991 Gnus respects the @code{Mail-Copies-To} header.
22992
22993 @item
22994 Threads can be gathered by looking at the @code{References} header
22995 (@pxref{Customizing Threading}).
22996
22997 @lisp
22998 (setq gnus-summary-thread-gathering-function
22999       'gnus-gather-threads-by-references)
23000 @end lisp
23001
23002 @item
23003 Read articles can be stored in a special backlog buffer to avoid
23004 refetching (@pxref{Article Backlog}).
23005
23006 @lisp
23007 (setq gnus-keep-backlog 50)
23008 @end lisp
23009
23010 @item
23011 A clean copy of the current article is always stored in a separate
23012 buffer to allow easier treatment.
23013
23014 @item
23015 Gnus can suggest where to save articles (@pxref{Saving Articles}).
23016
23017 @item
23018 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
23019 Articles}).
23020
23021 @lisp
23022 (setq gnus-prompt-before-saving t)
23023 @end lisp
23024
23025 @item
23026 @code{gnus-uu} can view decoded files asynchronously while fetching
23027 articles (@pxref{Other Decode Variables}).
23028
23029 @lisp
23030 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
23031 @end lisp
23032
23033 @item
23034 Filling in the article buffer now works properly on cited text
23035 (@pxref{Article Washing}).
23036
23037 @item
23038 Hiding cited text adds buttons to toggle hiding, and how much
23039 cited text to hide is now customizable (@pxref{Article Hiding}).
23040
23041 @lisp
23042 (setq gnus-cited-lines-visible 2)
23043 @end lisp
23044
23045 @item
23046 Boring headers can be hidden (@pxref{Article Hiding}).
23047
23048 @item
23049 Default scoring values can now be set from the menu bar.
23050
23051 @item
23052 Further syntax checking of outgoing articles have been added.
23053
23054 @end itemize
23055
23056
23057 @node Red Gnus
23058 @subsubsection Red Gnus
23059
23060 New features in Gnus 5.4/5.5:
23061
23062 @iftex
23063 @iflatex
23064 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
23065 @end iflatex
23066 @end iftex
23067
23068 @itemize @bullet
23069
23070 @item
23071 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
23072
23073 @item
23074 Article prefetching functionality has been moved up into
23075 Gnus (@pxref{Asynchronous Fetching}).
23076
23077 @item
23078 Scoring can now be performed with logical operators like @code{and},
23079 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
23080 Scoring}).
23081
23082 @item
23083 Article washing status can be displayed in the
23084 article mode line (@pxref{Misc Article}).
23085
23086 @item
23087 @file{gnus.el} has been split into many smaller files.
23088
23089 @item
23090 Suppression of duplicate articles based on Message-ID can be done
23091 (@pxref{Duplicate Suppression}).
23092
23093 @lisp
23094 (setq gnus-suppress-duplicates t)
23095 @end lisp
23096
23097 @item
23098 New variables for specifying what score and adapt files are to be
23099 considered home score and adapt files (@pxref{Home Score File}) have
23100 been added.
23101
23102 @item
23103 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
23104 Server Internals}).
23105
23106 @item
23107 Groups can inherit group parameters from parent topics (@pxref{Topic
23108 Parameters}).
23109
23110 @item
23111 Article editing has been revamped and is now actually usable.
23112
23113 @item
23114 Signatures can be recognized in more intelligent fashions
23115 (@pxref{Article Signature}).
23116
23117 @item
23118 Summary pick mode has been made to look more @code{nn}-like.  Line
23119 numbers are displayed and the @kbd{.} command can be used to pick
23120 articles (@code{Pick and Read}).
23121
23122 @item
23123 Commands for moving the @file{.newsrc.eld} from one server to
23124 another have been added (@pxref{Changing Servers}).
23125
23126 @item
23127 There's a way now to specify that ``uninteresting'' fields be suppressed
23128 when generating lines in buffers (@pxref{Advanced Formatting}).
23129
23130 @item
23131 Several commands in the group buffer can be undone with @kbd{C-M-_}
23132 (@pxref{Undo}).
23133
23134 @item
23135 Scoring can be done on words using the new score type @code{w}
23136 (@pxref{Score File Format}).
23137
23138 @item
23139 Adaptive scoring can be done on a Subject word-by-word basis
23140 (@pxref{Adaptive Scoring}).
23141
23142 @lisp
23143 (setq gnus-use-adaptive-scoring '(word))
23144 @end lisp
23145
23146 @item
23147 Scores can be decayed (@pxref{Score Decays}).
23148
23149 @lisp
23150 (setq gnus-decay-scores t)
23151 @end lisp
23152
23153 @item
23154 Scoring can be performed using a regexp on the Date header.  The Date is
23155 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
23156
23157 @item
23158 A new command has been added to remove all data on articles from
23159 the native server (@pxref{Changing Servers}).
23160
23161 @item
23162 A new command for reading collections of documents
23163 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
23164 (@pxref{Really Various Summary Commands}).
23165
23166 @item
23167 Process mark sets can be pushed and popped (@pxref{Setting Process
23168 Marks}).
23169
23170 @item
23171 A new mail-to-news back end makes it possible to post even when the @sc{nntp}
23172 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
23173
23174 @item
23175 A new back end for reading searches from Web search engines
23176 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
23177 (@pxref{Web Searches}).
23178
23179 @item
23180 Groups inside topics can now be sorted using the standard sorting
23181 functions, and each topic can be sorted independently (@pxref{Topic
23182 Sorting}).
23183
23184 @item
23185 Subsets of the groups can be sorted independently (@code{Sorting
23186 Groups}).
23187
23188 @item
23189 Cached articles can be pulled into the groups (@pxref{Summary Generation
23190 Commands}).
23191 @iftex
23192 @iflatex
23193 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
23194 @end iflatex
23195 @end iftex
23196
23197 @item
23198 Score files are now applied in a more reliable order (@pxref{Score
23199 Variables}).
23200
23201 @item
23202 Reports on where mail messages end up can be generated (@pxref{Splitting
23203 Mail}).
23204
23205 @item
23206 More hooks and functions have been added to remove junk from incoming
23207 mail before saving the mail (@pxref{Washing Mail}).
23208
23209 @item
23210 Emphasized text can be properly fontisized:
23211
23212 @end itemize
23213
23214
23215 @node Quassia Gnus
23216 @subsubsection Quassia Gnus
23217
23218 New features in Gnus 5.6:
23219
23220 @itemize @bullet
23221
23222 @item
23223 New functionality for using Gnus as an offline newsreader has been
23224 added.  A plethora of new commands and modes have been added.  See
23225 @pxref{Gnus Unplugged} for the full story.
23226
23227 @item
23228  The @code{nndraft} back end has returned, but works differently than
23229 before.  All Message buffers are now also articles in the @code{nndraft}
23230 group, which is created automatically.
23231
23232 @item
23233 @code{gnus-alter-header-function} can now be used to alter header
23234 values.
23235
23236 @item
23237  @code{gnus-summary-goto-article} now accept Message-ID's.
23238
23239 @item
23240  A new Message command for deleting text in the body of a message
23241 outside the region: @kbd{C-c C-v}.
23242
23243 @item
23244  You can now post to component group in @code{nnvirtual} groups with
23245 @kbd{C-u C-c C-c}.
23246
23247 @item
23248  @code{nntp-rlogin-program}---new variable to ease customization.
23249
23250 @item
23251  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
23252 re-highlighting of the article buffer.
23253
23254 @item
23255  New element in @code{gnus-boring-article-headers}---@code{long-to}.
23256
23257 @item
23258  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
23259 Prefixes" in the Gnus manual for details.
23260
23261 @item
23262  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
23263 @kbd{a} to add the score rule to the "all.SCORE" file.
23264
23265 @item
23266  @code{gnus-simplify-subject-functions} variable to allow greater
23267 control over simplification.
23268
23269 @item
23270  @kbd{A T}---new command for fetching the current thread.
23271
23272 @item
23273  @kbd{/ T}---new command for including the current thread in the
23274 limit.
23275
23276 @item
23277  @kbd{M-RET} is a new Message command for breaking cited text.
23278
23279 @item
23280  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
23281
23282 @item
23283  The @code{custom-face-lookup} function has been removed.
23284 If you used this function in your initialization files, you must
23285 rewrite them to use @code{face-spec-set} instead.
23286
23287 @item
23288  Canceling now uses the current select method.  Symbolic prefix
23289 @kbd{a} forces normal posting method.
23290
23291 @item
23292  New command to translate M******** sm*rtq**t*s into proper
23293 text---@kbd{W d}.
23294
23295 @item
23296  For easier debugging of @code{nntp}, you can set
23297 @code{nntp-record-commands} to a non-@code{nil} value.
23298
23299 @item
23300  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
23301 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
23302
23303 @item
23304  A command for editing group parameters from the summary buffer
23305 has been added.
23306
23307 @item
23308  A history of where mails have been split is available.
23309
23310 @item
23311  A new article date command has been added---@code{article-date-iso8601}.
23312
23313 @item
23314  Subjects can be simplified when threading by setting
23315 @code{gnus-score-thread-simplify}.
23316
23317 @item
23318  A new function for citing in Message has been
23319 added---@code{message-cite-original-without-signature}.
23320
23321 @item
23322  @code{article-strip-all-blank-lines}---new article command.
23323
23324 @item
23325  A new Message command to kill to the end of the article has
23326 been added.
23327
23328 @item
23329  A minimum adaptive score can be specified by using the
23330 @code{gnus-adaptive-word-minimum} variable.
23331
23332 @item
23333  The "lapsed date" article header can be kept continually
23334 updated by the @code{gnus-start-date-timer} command.
23335
23336 @item
23337  Web listserv archives can be read with the @code{nnlistserv} back end.
23338
23339 @item
23340  Old dejanews archives can now be read by @code{nnweb}.
23341
23342 @end itemize
23343
23344 @node Pterodactyl Gnus
23345 @subsubsection Pterodactyl Gnus
23346
23347 New features in Gnus 5.8:
23348
23349 @itemize @bullet
23350
23351 @item
23352 The mail-fetching functions have changed.  See the manual for the
23353 many details.  In particular, all procmail fetching variables are gone.
23354
23355 If you used procmail like in
23356
23357 @lisp
23358 (setq nnmail-use-procmail t)
23359 (setq nnmail-spool-file 'procmail)
23360 (setq nnmail-procmail-directory "~/mail/incoming/")
23361 (setq nnmail-procmail-suffix "\\.in")
23362 @end lisp
23363
23364 this now has changed to
23365
23366 @lisp
23367 (setq mail-sources
23368       '((directory :path "~/mail/incoming/"
23369                    :suffix ".in")))
23370 @end lisp
23371
23372 More information is available in the info doc at Select Methods ->
23373 Getting Mail -> Mail Sources
23374
23375 @item
23376 Gnus is now a @sc{mime}-capable reader.  This affects many parts of
23377 Gnus, and adds a slew of new commands.  See the manual for details.
23378
23379 @item
23380 Gnus has also been multilingualized.  This also affects too
23381 many parts of Gnus to summarize here, and adds many new variables.
23382
23383 @item
23384 @code{gnus-auto-select-first} can now be a function to be
23385 called to position point.
23386
23387 @item
23388 The user can now decide which extra headers should be included in
23389 summary buffers and @sc{nov} files.
23390
23391 @item
23392 @code{gnus-article-display-hook} has been removed.  Instead, a number
23393 of variables starting with @code{gnus-treat-} have been added.
23394
23395 @item
23396 The Gnus posting styles have been redone again and now works in a
23397 subtly different manner.
23398
23399 @item
23400 New web-based back ends have been added: @code{nnslashdot},
23401 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
23402 again, to keep up with ever-changing layouts.
23403
23404 @item
23405 Gnus can now read @sc{imap} mail via @code{nnimap}.
23406
23407 @end itemize
23408
23409 @iftex
23410
23411 @page
23412 @node The Manual
23413 @section The Manual
23414 @cindex colophon
23415 @cindex manual
23416
23417 This manual was generated from a TeXinfo file and then run through
23418 either @code{texi2dvi}
23419 @iflatex
23420 or my own home-brewed TeXinfo to \LaTeX\ transformer,
23421 and then run through @code{latex} and @code{dvips}
23422 @end iflatex
23423 to get what you hold in your hands now.
23424
23425 The following conventions have been used:
23426
23427 @enumerate
23428
23429 @item
23430 This is a @samp{string}
23431
23432 @item
23433 This is a @kbd{keystroke}
23434
23435 @item
23436 This is a @file{file}
23437
23438 @item
23439 This is a @code{symbol}
23440
23441 @end enumerate
23442
23443 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
23444 mean:
23445
23446 @lisp
23447 (setq flargnoze "yes")
23448 @end lisp
23449
23450 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
23451
23452 @lisp
23453 (setq flumphel 'yes)
23454 @end lisp
23455
23456 @samp{yes} and @code{yes} are two @emph{very} different things---don't
23457 ever get them confused.
23458
23459 @iflatex
23460 @c @head
23461 Of course, everything in this manual is of vital interest, so you should
23462 read it all.  Several times.  However, if you feel like skimming the
23463 manual, look for that gnu head you should see in the margin over
23464 there---it means that what's being discussed is of more importance than
23465 the rest of the stuff.  (On the other hand, if everything is infinitely
23466 important, how can anything be more important than that?  Just one more
23467 of the mysteries of this world, I guess.)
23468 @end iflatex
23469
23470 @end iftex
23471
23472
23473 @node On Writing Manuals
23474 @section On Writing Manuals
23475
23476 I guess most manuals are written after-the-fact; documenting a program
23477 that's already there.  This is not how this manual is written.  When
23478 implementing something, I write the manual entry for that something
23479 straight away.  I then see that it's difficult to explain the
23480 functionality, so I write how it's supposed to be, and then I change the
23481 implementation.  Writing the documentation and writing the code goes
23482 hand in hand.
23483
23484 This, of course, means that this manual has no, or little, flow.  It
23485 documents absolutely everything in Gnus, but often not where you're
23486 looking for it.  It is a reference manual, and not a guide to how to get
23487 started with Gnus.
23488
23489 That would be a totally different book, that should be written using the
23490 reference manual as source material.  It would look quite differently.
23491
23492
23493 @page
23494 @node Terminology
23495 @section Terminology
23496
23497 @cindex terminology
23498 @table @dfn
23499
23500 @item news
23501 @cindex news
23502 This is what you are supposed to use this thing for---reading news.
23503 News is generally fetched from a nearby @sc{nntp} server, and is
23504 generally publicly available to everybody.  If you post news, the entire
23505 world is likely to read just what you have written, and they'll all
23506 snigger mischievously.  Behind your back.
23507
23508 @item mail
23509 @cindex mail
23510 Everything that's delivered to you personally is mail.  Some news/mail
23511 readers (like Gnus) blur the distinction between mail and news, but
23512 there is a difference.  Mail is private.  News is public.  Mailing is
23513 not posting, and replying is not following up.
23514
23515 @item reply
23516 @cindex reply
23517 Send a mail to the person who has written what you are reading.
23518
23519 @item follow up
23520 @cindex follow up
23521 Post an article to the current newsgroup responding to the article you
23522 are reading.
23523
23524 @item back end
23525 @cindex back end
23526 Gnus considers mail and news to be mostly the same, really.  The only
23527 difference is how to access the actual articles.  News articles are
23528 commonly fetched via the protocol NNTP, whereas mail messages could be
23529 read from a file on the local disk.  The internal architecture of Gnus
23530 thus comprises a `front end' and a number of `back ends'.  Internally,
23531 when you enter a group (by hitting @key{RET}, say), you thereby invoke
23532 a function in the front end in Gnus.  The front end then `talks' to a
23533 back end and says things like ``Give me the list of articles in the foo
23534 group'' or ``Show me article number 4711''.
23535
23536 So a back end mainly defines either a protocol (the @code{nntp} back end
23537 accesses news via NNTP, the @code{nnimap} back end accesses mail via
23538 IMAP) or a file format and directory layout (the @code{nnspool} back end
23539 accesses news via the common `spool directory' format, the @code{nnml}
23540 back end access mail via a file format and directory layout that's
23541 quite similar).
23542
23543 Gnus does not handle the underlying media, so to speak---this is all
23544 done by the back ends.  A back end is a collection of functions to
23545 access the articles.
23546
23547 However, sometimes the term `back end' is also used where `server'
23548 would have been more appropriate.  And then there is the term `select
23549 method' which can mean either.  The Gnus terminology can be quite
23550 confusing.
23551
23552 @item native
23553 @cindex native
23554 Gnus will always use one method (and back end) as the @dfn{native}, or
23555 default, way of getting news.
23556
23557 @item foreign
23558 @cindex foreign
23559 You can also have any number of foreign groups active at the same time.
23560 These are groups that use non-native non-secondary back ends for getting
23561 news.
23562
23563 @item secondary
23564 @cindex secondary
23565 Secondary back ends are somewhere half-way between being native and being
23566 foreign, but they mostly act like they are native.
23567
23568 @item article
23569 @cindex article
23570 A message that has been posted as news.
23571
23572 @item mail message
23573 @cindex mail message
23574 A message that has been mailed.
23575
23576 @item message
23577 @cindex message
23578 A mail message or news article
23579
23580 @item head
23581 @cindex head
23582 The top part of a message, where administrative information (etc.) is
23583 put.
23584
23585 @item body
23586 @cindex body
23587 The rest of an article.  Everything not in the head is in the
23588 body.
23589
23590 @item header
23591 @cindex header
23592 A line from the head of an article.
23593
23594 @item headers
23595 @cindex headers
23596 A collection of such lines, or a collection of heads.  Or even a
23597 collection of @sc{nov} lines.
23598
23599 @item @sc{nov}
23600 @cindex nov
23601 When Gnus enters a group, it asks the back end for the headers of all
23602 unread articles in the group.  Most servers support the News OverView
23603 format, which is more compact and much faster to read and parse than the
23604 normal @sc{head} format.
23605
23606 @item level
23607 @cindex levels
23608 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
23609 that have a lower level are ``more'' subscribed than the groups with a
23610 higher level.  In fact, groups on levels 1-5 are considered
23611 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
23612 are @dfn{killed}.  Commands for listing groups and scanning for new
23613 articles will all use the numeric prefix as @dfn{working level}.
23614
23615 @item killed groups
23616 @cindex killed groups
23617 No information on killed groups is stored or updated, which makes killed
23618 groups much easier to handle than subscribed groups.
23619
23620 @item zombie groups
23621 @cindex zombie groups
23622 Just like killed groups, only slightly less dead.
23623
23624 @item active file
23625 @cindex active file
23626 The news server has to keep track of what articles it carries, and what
23627 groups exist.  All this information in stored in the active file, which
23628 is rather large, as you might surmise.
23629
23630 @item bogus groups
23631 @cindex bogus groups
23632 A group that exists in the @file{.newsrc} file, but isn't known to the
23633 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
23634 This means that the group probably doesn't exist (any more).
23635
23636 @item activating
23637 @cindex activating groups
23638 The act of asking the server for info on a group and computing the
23639 number of unread articles is called @dfn{activating the group}.
23640 Un-activated groups are listed with @samp{*} in the group buffer.
23641
23642 @item server
23643 @cindex server
23644 A machine one can connect to and get news (or mail) from.
23645
23646 @item select method
23647 @cindex select method
23648 A structure that specifies the back end, the server and the virtual
23649 server settings.
23650
23651 @item virtual server
23652 @cindex virtual server
23653 A named select method.  Since a select method defines all there is to
23654 know about connecting to a (physical) server, taking the thing as a
23655 whole is a virtual server.
23656
23657 @item washing
23658 @cindex washing
23659 Taking a buffer and running it through a filter of some sort.  The
23660 result will (more often than not) be cleaner and more pleasing than the
23661 original.
23662
23663 @item ephemeral groups
23664 @cindex ephemeral groups
23665 Most groups store data on what articles you have read.  @dfn{Ephemeral}
23666 groups are groups that will have no data stored---when you exit the
23667 group, it'll disappear into the aether.
23668
23669 @item solid groups
23670 @cindex solid groups
23671 This is the opposite of ephemeral groups.  All groups listed in the
23672 group buffer are solid groups.
23673
23674 @item sparse articles
23675 @cindex sparse articles
23676 These are article placeholders shown in the summary buffer when
23677 @code{gnus-build-sparse-threads} has been switched on.
23678
23679 @item threading
23680 @cindex threading
23681 To put responses to articles directly after the articles they respond
23682 to---in a hierarchical fashion.
23683
23684 @item root
23685 @cindex root
23686 @cindex thread root
23687 The first article in a thread is the root.  It is the ancestor of all
23688 articles in the thread.
23689
23690 @item parent
23691 @cindex parent
23692 An article that has responses.
23693
23694 @item child
23695 @cindex child
23696 An article that responds to a different article---its parent.
23697
23698 @item digest
23699 @cindex digest
23700 A collection of messages in one file.  The most common digest format is
23701 specified by RFC 1153.
23702
23703 @end table
23704
23705
23706 @page
23707 @node Customization
23708 @section Customization
23709 @cindex general customization
23710
23711 All variables are properly documented elsewhere in this manual.  This
23712 section is designed to give general pointers on how to customize Gnus
23713 for some quite common situations.
23714
23715 @menu
23716 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
23717 * Slow Terminal Connection::    You run a remote Emacs.
23718 * Little Disk Space::           You feel that having large setup files is icky.
23719 * Slow Machine::                You feel like buying a faster machine.
23720 @end menu
23721
23722
23723 @node Slow/Expensive Connection
23724 @subsection Slow/Expensive NNTP Connection
23725
23726 If you run Emacs on a machine locally, and get your news from a machine
23727 over some very thin strings, you want to cut down on the amount of data
23728 Gnus has to get from the @sc{nntp} server.
23729
23730 @table @code
23731
23732 @item gnus-read-active-file
23733 Set this to @code{nil}, which will inhibit Gnus from requesting the
23734 entire active file from the server.  This file is often v.  large.  You
23735 also have to set @code{gnus-check-new-newsgroups} and
23736 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
23737 doesn't suddenly decide to fetch the active file anyway.
23738
23739 @item gnus-nov-is-evil
23740 This one has to be @code{nil}.  If not, grabbing article headers from
23741 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
23742 support @sc{xover}; Gnus will detect this by itself.
23743 @end table
23744
23745
23746 @node Slow Terminal Connection
23747 @subsection Slow Terminal Connection
23748
23749 Let's say you use your home computer for dialing up the system that runs
23750 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
23751 possible) the amount of data sent over the wires.
23752
23753 @table @code
23754
23755 @item gnus-auto-center-summary
23756 Set this to @code{nil} to inhibit Gnus from re-centering the summary
23757 buffer all the time.  If it is @code{vertical}, do only vertical
23758 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
23759 horizontal and vertical recentering.
23760
23761 @item gnus-visible-headers
23762 Cut down on the headers included in the articles to the
23763 minimum.  You can, in fact, make do without them altogether---most of the
23764 useful data is in the summary buffer, anyway.  Set this variable to
23765 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
23766
23767 Set this hook to all the available hiding commands:
23768 @lisp
23769 (setq gnus-treat-hide-headers 'head
23770       gnus-treat-hide-signature t
23771       gnus-treat-hide-citation t)
23772 @end lisp
23773
23774 @item gnus-use-full-window
23775 By setting this to @code{nil}, you can make all the windows smaller.
23776 While this doesn't really cut down much generally, it means that you
23777 have to see smaller portions of articles before deciding that you didn't
23778 want to read them anyway.
23779
23780 @item gnus-thread-hide-subtree
23781 If this is non-@code{nil}, all threads in the summary buffer will be
23782 hidden initially.
23783
23784
23785 @item gnus-updated-mode-lines
23786 If this is @code{nil}, Gnus will not put information in the buffer mode
23787 lines, which might save some time.
23788 @end table
23789
23790
23791 @node Little Disk Space
23792 @subsection Little Disk Space
23793 @cindex disk space
23794
23795 The startup files can get rather large, so you may want to cut their
23796 sizes a bit if you are running out of space.
23797
23798 @table @code
23799
23800 @item gnus-save-newsrc-file
23801 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
23802 only save @file{.newsrc.eld}.  This means that you will not be able to
23803 use any other newsreaders than Gnus.  This variable is @code{t} by
23804 default.
23805
23806 @item gnus-read-newsrc-file
23807 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
23808 only read @file{.newsrc.eld}.  This means that you will not be able to
23809 use any other newsreaders than Gnus.  This variable is @code{t} by
23810 default.
23811
23812 @item gnus-save-killed-list
23813 If this is @code{nil}, Gnus will not save the list of dead groups.  You
23814 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
23815 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
23816 variable to @code{nil}.  This variable is @code{t} by default.
23817
23818 @end table
23819
23820
23821 @node Slow Machine
23822 @subsection Slow Machine
23823 @cindex slow machine
23824
23825 If you have a slow machine, or are just really impatient, there are a
23826 few things you can do to make Gnus run faster.
23827
23828 Set @code{gnus-check-new-newsgroups} and
23829 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
23830
23831 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
23832 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
23833 summary buffer faster.
23834
23835
23836 @page
23837 @node Troubleshooting
23838 @section Troubleshooting
23839 @cindex troubleshooting
23840
23841 Gnus works @emph{so} well straight out of the box---I can't imagine any
23842 problems, really.
23843
23844 Ahem.
23845
23846 @enumerate
23847
23848 @item
23849 Make sure your computer is switched on.
23850
23851 @item
23852 Make sure that you really load the current Gnus version.  If you have
23853 been running @sc{gnus}, you need to exit Emacs and start it up again before
23854 Gnus will work.
23855
23856 @item
23857 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
23858 like @samp{T-gnus 6.15.* (based on Oort Gnus v0.*; for SEMI 1.1*, FLIM
23859 1.1*)} you have the right files loaded.  If, on the other hand, you get
23860 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
23861 @file{.el} files lying around.  Delete these.
23862
23863 @item
23864 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
23865 how-to.
23866
23867 @item
23868 @vindex max-lisp-eval-depth
23869 Gnus works on many recursive structures, and in some extreme (and very
23870 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
23871 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
23872 something like that.
23873 @end enumerate
23874
23875 If all else fails, report the problem as a bug.
23876
23877 @cindex bugs
23878 @cindex reporting bugs
23879
23880 @kindex M-x gnus-bug
23881 @findex gnus-bug
23882 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
23883 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
23884 me the backtrace.  I will fix bugs, but I can only fix them if you send
23885 me a precise description as to how to reproduce the bug.
23886
23887 You really can never be too detailed in a bug report.  Always use the
23888 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
23889 a 10Kb mail each time you use it, and even if you have sent me your
23890 environment 500 times before.  I don't care.  I want the full info each
23891 time.
23892
23893 It is also important to remember that I have no memory whatsoever.  If
23894 you send a bug report, and I send you a reply, and then you just send
23895 back ``No, it's not! Moron!'', I will have no idea what you are
23896 insulting me about.  Always over-explain everything.  It's much easier
23897 for all of us---if I don't have all the information I need, I will just
23898 mail you and ask for more info, and everything takes more time.
23899
23900 If the problem you're seeing is very visual, and you can't quite explain
23901 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
23902 it somewhere it can be reached, and include the URL of the picture in
23903 the bug report.
23904
23905 @cindex patches
23906 If you would like to contribute a patch to fix bugs or make
23907 improvements, please produce the patch using @samp{diff -u}.
23908
23909 @cindex edebug
23910 If you want to debug your problem further before reporting, possibly
23911 in order to solve the problem yourself and send a patch, you can use
23912 edebug.  Debugging lisp code is documented in the Elisp manual
23913 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
23914 Lisp Reference Manual}).  To get you started with edebug, consider if
23915 you discover some weird behaviour when pressing @kbd{c}, the first
23916 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
23917 the documentation buffer that leads you to the function definition,
23918 then press @kbd{M-x edebug-defun RET} with point inside that function,
23919 return to Gnus and press @kbd{c} to invoke the code.  You will be
23920 placed in the lisp buffer and can single step using @kbd{SPC} and
23921 evaluate expressions using @kbd{M-:} or inspect variables using
23922 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
23923 @kbd{c} or @kbd{g}.
23924
23925 If you just need help, you are better off asking on
23926 @samp{gnu.emacs.gnus}.  I'm not very helpful.
23927
23928 @cindex gnu.emacs.gnus
23929 @cindex ding mailing list
23930 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
23931 Write to @samp{ding-request@@gnus.org} to subscribe.
23932
23933
23934 @page
23935 @node Gnus Reference Guide
23936 @section Gnus Reference Guide
23937
23938 It is my hope that other people will figure out smart stuff that Gnus
23939 can do, and that other people will write those smart things as well.  To
23940 facilitate that I thought it would be a good idea to describe the inner
23941 workings of Gnus.  And some of the not-so-inner workings, while I'm at
23942 it.
23943
23944 You can never expect the internals of a program not to change, but I
23945 will be defining (in some details) the interface between Gnus and its
23946 back ends (this is written in stone), the format of the score files
23947 (ditto), data structures (some are less likely to change than others)
23948 and general methods of operation.
23949
23950 @menu
23951 * Gnus Utility Functions::      Common functions and variable to use.
23952 * Back End Interface::          How Gnus communicates with the servers.
23953 * Score File Syntax::           A BNF definition of the score file standard.
23954 * Headers::                     How Gnus stores headers internally.
23955 * Ranges::                      A handy format for storing mucho numbers.
23956 * Group Info::                  The group info format.
23957 * Extended Interactive::        Symbolic prefixes and stuff.
23958 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
23959 * Various File Formats::        Formats of files that Gnus use.
23960 @end menu
23961
23962
23963 @node Gnus Utility Functions
23964 @subsection Gnus Utility Functions
23965 @cindex Gnus utility functions
23966 @cindex utility functions
23967 @cindex functions
23968 @cindex internal variables
23969
23970 When writing small functions to be run from hooks (and stuff), it's
23971 vital to have access to the Gnus internal functions and variables.
23972 Below is a list of the most common ones.
23973
23974 @table @code
23975
23976 @item gnus-newsgroup-name
23977 @vindex gnus-newsgroup-name
23978 This variable holds the name of the current newsgroup.
23979
23980 @item gnus-find-method-for-group
23981 @findex gnus-find-method-for-group
23982 A function that returns the select method for @var{group}.
23983
23984 @item gnus-group-real-name
23985 @findex gnus-group-real-name
23986 Takes a full (prefixed) Gnus group name, and returns the unprefixed
23987 name.
23988
23989 @item gnus-group-prefixed-name
23990 @findex gnus-group-prefixed-name
23991 Takes an unprefixed group name and a select method, and returns the full
23992 (prefixed) Gnus group name.
23993
23994 @item gnus-get-info
23995 @findex gnus-get-info
23996 Returns the group info list for @var{group}.
23997
23998 @item gnus-group-unread
23999 @findex gnus-group-unread
24000 The number of unread articles in @var{group}, or @code{t} if that is
24001 unknown.
24002
24003 @item gnus-active
24004 @findex gnus-active
24005 The active entry for @var{group}.
24006
24007 @item gnus-set-active
24008 @findex gnus-set-active
24009 Set the active entry for @var{group}.
24010
24011 @item gnus-add-current-to-buffer-list
24012 @findex gnus-add-current-to-buffer-list
24013 Adds the current buffer to the list of buffers to be killed on Gnus
24014 exit.
24015
24016 @item gnus-continuum-version
24017 @findex gnus-continuum-version
24018 Takes a Gnus version string as a parameter and returns a floating point
24019 number.  Earlier versions will always get a lower number than later
24020 versions.
24021
24022 @item gnus-group-read-only-p
24023 @findex gnus-group-read-only-p
24024 Says whether @var{group} is read-only or not.
24025
24026 @item gnus-news-group-p
24027 @findex gnus-news-group-p
24028 Says whether @var{group} came from a news back end.
24029
24030 @item gnus-ephemeral-group-p
24031 @findex gnus-ephemeral-group-p
24032 Says whether @var{group} is ephemeral or not.
24033
24034 @item gnus-server-to-method
24035 @findex gnus-server-to-method
24036 Returns the select method corresponding to @var{server}.
24037
24038 @item gnus-server-equal
24039 @findex gnus-server-equal
24040 Says whether two virtual servers are equal.
24041
24042 @item gnus-group-native-p
24043 @findex gnus-group-native-p
24044 Says whether @var{group} is native or not.
24045
24046 @item gnus-group-secondary-p
24047 @findex gnus-group-secondary-p
24048 Says whether @var{group} is secondary or not.
24049
24050 @item gnus-group-foreign-p
24051 @findex gnus-group-foreign-p
24052 Says whether @var{group} is foreign or not.
24053
24054 @item group-group-find-parameter
24055 @findex group-group-find-parameter
24056 Returns the parameter list of @var{group}.  If given a second parameter,
24057 returns the value of that parameter for @var{group}.
24058
24059 @item gnus-group-set-parameter
24060 @findex gnus-group-set-parameter
24061 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
24062
24063 @item gnus-narrow-to-body
24064 @findex gnus-narrow-to-body
24065 Narrows the current buffer to the body of the article.
24066
24067 @item gnus-check-backend-function
24068 @findex gnus-check-backend-function
24069 Takes two parameters, @var{function} and @var{group}.  If the back end
24070 @var{group} comes from supports @var{function}, return non-@code{nil}.
24071
24072 @lisp
24073 (gnus-check-backend-function "request-scan" "nnml:misc")
24074 @result{} t
24075 @end lisp
24076
24077 @item gnus-read-method
24078 @findex gnus-read-method
24079 Prompts the user for a select method.
24080
24081 @end table
24082
24083
24084 @node Back End Interface
24085 @subsection Back End Interface
24086
24087 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
24088 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
24089 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
24090 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
24091 examples of the latter we have @code{nntp-port-number} and
24092 @code{nnmbox-directory}.
24093
24094 When Gnus asks for information from a back end---say @code{nntp}---on
24095 something, it will normally include a virtual server name in the
24096 function parameters.  (If not, the back end should use the ``current''
24097 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
24098 server as its only (optional) parameter.  If this virtual server hasn't
24099 been opened, the function should fail.
24100
24101 Note that a virtual server name has no relation to some physical server
24102 name.  Take this example:
24103
24104 @lisp
24105 (nntp "odd-one"
24106       (nntp-address "ifi.uio.no")
24107       (nntp-port-number 4324))
24108 @end lisp
24109
24110 Here the virtual server name is @samp{odd-one} while the name of
24111 the physical server is @samp{ifi.uio.no}.
24112
24113 The back ends should be able to switch between several virtual servers.
24114 The standard back ends implement this by keeping an alist of virtual
24115 server environments that they pull down/push up when needed.
24116
24117 There are two groups of interface functions: @dfn{required functions},
24118 which must be present, and @dfn{optional functions}, which Gnus will
24119 always check for presence before attempting to call 'em.
24120
24121 All these functions are expected to return data in the buffer
24122 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
24123 unfortunately named, but we'll have to live with it.  When I talk about
24124 @dfn{resulting data}, I always refer to the data in that buffer.  When I
24125 talk about @dfn{return value}, I talk about the function value returned by
24126 the function call.  Functions that fail should return @code{nil} as the
24127 return value.
24128
24129 Some back ends could be said to be @dfn{server-forming} back ends, and
24130 some might be said not to be.  The latter are back ends that generally
24131 only operate on one group at a time, and have no concept of ``server''
24132 -- they have a group, and they deliver info on that group and nothing
24133 more.
24134
24135 Gnus identifies each message by way of group name and article number.  A
24136 few remarks about these article numbers might be useful.  First of all,
24137 the numbers are positive integers.  Secondly, it is normally not
24138 possible for later articles to `re-use' older article numbers without
24139 confusing Gnus.  That is, if a group has ever contained a message
24140 numbered 42, then no other message may get that number, or Gnus will get
24141 mightily confused.@footnote{See the function
24142 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
24143 Third, article numbers must be assigned in order of arrival in the
24144 group; this is not necessarily the same as the date of the message.
24145
24146 The previous paragraph already mentions all the `hard' restrictions that
24147 article numbers must fulfill.  But it seems that it might be useful to
24148 assign @emph{consecutive} article numbers, for Gnus gets quite confused
24149 if there are holes in the article numbering sequence.  However, due to
24150 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
24151 also useful for the article numbers to start at 1 to avoid running out
24152 of numbers as long as possible.
24153
24154 Note that by convention, backends are named @code{nnsomething}, but
24155 Gnus also comes with some @code{nnnotbackends}, such as
24156 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
24157
24158 In the examples and definitions I will refer to the imaginary back end
24159 @code{nnchoke}.
24160
24161 @cindex @code{nnchoke}
24162
24163 @menu
24164 * Required Back End Functions::  Functions that must be implemented.
24165 * Optional Back End Functions::  Functions that need not be implemented.
24166 * Error Messaging::             How to get messages and report errors.
24167 * Writing New Back Ends::       Extending old back ends.
24168 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
24169 * Mail-like Back Ends::         Some tips on mail back ends.
24170 @end menu
24171
24172
24173 @node Required Back End Functions
24174 @subsubsection Required Back End Functions
24175
24176 @table @code
24177
24178 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
24179
24180 @var{articles} is either a range of article numbers or a list of
24181 @code{Message-ID}s.  Current back ends do not fully support either---only
24182 sequences (lists) of article numbers, and most back ends do not support
24183 retrieval of @code{Message-ID}s.  But they should try for both.
24184
24185 The result data should either be HEADs or @sc{nov} lines, and the result
24186 value should either be @code{headers} or @code{nov} to reflect this.
24187 This might later be expanded to @code{various}, which will be a mixture
24188 of HEADs and @sc{nov} lines, but this is currently not supported by Gnus.
24189
24190 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
24191 headers", in some meaning of the word.  This is generally done by
24192 fetching (at most) @var{fetch-old} extra headers less than the smallest
24193 article number in @code{articles}, and filling the gaps as well.  The
24194 presence of this parameter can be ignored if the back end finds it
24195 cumbersome to follow the request.  If this is non-@code{nil} and not a
24196 number, do maximum fetches.
24197
24198 Here's an example HEAD:
24199
24200 @example
24201 221 1056 Article retrieved.
24202 Path: ifi.uio.no!sturles
24203 From: sturles@@ifi.uio.no (Sturle Sunde)
24204 Newsgroups: ifi.discussion
24205 Subject: Re: Something very droll
24206 Date: 27 Oct 1994 14:02:57 +0100
24207 Organization: Dept. of Informatics, University of Oslo, Norway
24208 Lines: 26
24209 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
24210 References: <38jdmq$4qu@@visbur.ifi.uio.no>
24211 NNTP-Posting-Host: holmenkollen.ifi.uio.no
24212 .
24213 @end example
24214
24215 So a @code{headers} return value would imply that there's a number of
24216 these in the data buffer.
24217
24218 Here's a BNF definition of such a buffer:
24219
24220 @example
24221 headers        = *head
24222 head           = error / valid-head
24223 error-message  = [ "4" / "5" ] 2number " " <error message> eol
24224 valid-head     = valid-message *header "." eol
24225 valid-message  = "221 " <number> " Article retrieved." eol
24226 header         = <text> eol
24227 @end example
24228
24229 If the return value is @code{nov}, the data buffer should contain
24230 @dfn{network overview database} lines.  These are basically fields
24231 separated by tabs.
24232
24233 @example
24234 nov-buffer = *nov-line
24235 nov-line   = 8*9 [ field <TAB> ] eol
24236 field      = <text except TAB>
24237 @end example
24238
24239 For a closer look at what should be in those fields,
24240 @pxref{Headers}.
24241
24242
24243 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
24244
24245 @var{server} is here the virtual server name.  @var{definitions} is a
24246 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
24247
24248 If the server can't be opened, no error should be signaled.  The back end
24249 may then choose to refuse further attempts at connecting to this
24250 server.  In fact, it should do so.
24251
24252 If the server is opened already, this function should return a
24253 non-@code{nil} value.  There should be no data returned.
24254
24255
24256 @item (nnchoke-close-server &optional SERVER)
24257
24258 Close connection to @var{server} and free all resources connected
24259 to it.  Return @code{nil} if the server couldn't be closed for some
24260 reason.
24261
24262 There should be no data returned.
24263
24264
24265 @item (nnchoke-request-close)
24266
24267 Close connection to all servers and free all resources that the back end
24268 have reserved.  All buffers that have been created by that back end
24269 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
24270 function is generally only called when Gnus is shutting down.
24271
24272 There should be no data returned.
24273
24274
24275 @item (nnchoke-server-opened &optional SERVER)
24276
24277 If @var{server} is the current virtual server, and the connection to the
24278 physical server is alive, then this function should return a
24279 non-@code{nil} vlue.  This function should under no circumstances
24280 attempt to reconnect to a server we have lost connection to.
24281
24282 There should be no data returned.
24283
24284
24285 @item (nnchoke-status-message &optional SERVER)
24286
24287 This function should return the last error message from @var{server}.
24288
24289 There should be no data returned.
24290
24291
24292 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
24293
24294 The result data from this function should be the article specified by
24295 @var{article}.  This might either be a @code{Message-ID} or a number.
24296 It is optional whether to implement retrieval by @code{Message-ID}, but
24297 it would be nice if that were possible.
24298
24299 If @var{to-buffer} is non-@code{nil}, the result data should be returned
24300 in this buffer instead of the normal data buffer.  This is to make it
24301 possible to avoid copying large amounts of data from one buffer to
24302 another, while Gnus mainly requests articles to be inserted directly
24303 into its article buffer.
24304
24305 If it is at all possible, this function should return a cons cell where
24306 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
24307 the article number.  This will enable Gnus to find out what the real
24308 group and article numbers are when fetching articles by
24309 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
24310 on successful article retrieval.
24311
24312
24313 @item (nnchoke-request-group GROUP &optional SERVER FAST)
24314
24315 Get data on @var{group}.  This function also has the side effect of
24316 making @var{group} the current group.
24317
24318 If @var{fast}, don't bother to return useful data, just make @var{group}
24319 the current group.
24320
24321 Here's an example of some result data and a definition of the same:
24322
24323 @example
24324 211 56 1000 1059 ifi.discussion
24325 @end example
24326
24327 The first number is the status, which should be 211.  Next is the
24328 total number of articles in the group, the lowest article number, the
24329 highest article number, and finally the group name.  Note that the total
24330 number of articles may be less than one might think while just
24331 considering the highest and lowest article numbers, but some articles
24332 may have been canceled.  Gnus just discards the total-number, so
24333 whether one should take the bother to generate it properly (if that is a
24334 problem) is left as an exercise to the reader.  If the group contains no
24335 articles, the lowest article number should be reported as 1 and the
24336 highest as 0.
24337
24338 @example
24339 group-status = [ error / info ] eol
24340 error        = [ "4" / "5" ] 2<number> " " <Error message>
24341 info         = "211 " 3* [ <number> " " ] <string>
24342 @end example
24343
24344
24345 @item (nnchoke-close-group GROUP &optional SERVER)
24346
24347 Close @var{group} and free any resources connected to it.  This will be
24348 a no-op on most back ends.
24349
24350 There should be no data returned.
24351
24352
24353 @item (nnchoke-request-list &optional SERVER)
24354
24355 Return a list of all groups available on @var{server}.  And that means
24356 @emph{all}.
24357
24358 Here's an example from a server that only carries two groups:
24359
24360 @example
24361 ifi.test 0000002200 0000002000 y
24362 ifi.discussion 3324 3300 n
24363 @end example
24364
24365 On each line we have a group name, then the highest article number in
24366 that group, the lowest article number, and finally a flag.  If the group
24367 contains no articles, the lowest article number should be reported as 1
24368 and the highest as 0.
24369
24370 @example
24371 active-file = *active-line
24372 active-line = name " " <number> " " <number> " " flags eol
24373 name        = <string>
24374 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
24375 @end example
24376
24377 The flag says whether the group is read-only (@samp{n}), is moderated
24378 (@samp{m}), is dead (@samp{x}), is aliased to some other group
24379 (@samp{=other-group}) or none of the above (@samp{y}).
24380
24381
24382 @item (nnchoke-request-post &optional SERVER)
24383
24384 This function should post the current buffer.  It might return whether
24385 the posting was successful or not, but that's not required.  If, for
24386 instance, the posting is done asynchronously, it has generally not been
24387 completed by the time this function concludes.  In that case, this
24388 function should set up some kind of sentinel to beep the user loud and
24389 clear if the posting could not be completed.
24390
24391 There should be no result data from this function.
24392
24393 @end table
24394
24395
24396 @node Optional Back End Functions
24397 @subsubsection Optional Back End Functions
24398
24399 @table @code
24400
24401 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
24402
24403 @var{groups} is a list of groups, and this function should request data
24404 on all those groups.  How it does it is of no concern to Gnus, but it
24405 should attempt to do this in a speedy fashion.
24406
24407 The return value of this function can be either @code{active} or
24408 @code{group}, which says what the format of the result data is.  The
24409 former is in the same format as the data from
24410 @code{nnchoke-request-list}, while the latter is a buffer full of lines
24411 in the same format as @code{nnchoke-request-group} gives.
24412
24413 @example
24414 group-buffer = *active-line / *group-status
24415 @end example
24416
24417
24418 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
24419
24420 A Gnus group info (@pxref{Group Info}) is handed to the back end for
24421 alterations.  This comes in handy if the back end really carries all the
24422 information (as is the case with virtual and imap groups).  This
24423 function should destructively alter the info to suit its needs, and
24424 should return a non-nil value.
24425
24426 There should be no result data from this function.
24427
24428
24429 @item (nnchoke-request-type GROUP &optional ARTICLE)
24430
24431 When the user issues commands for ``sending news'' (@kbd{F} in the
24432 summary buffer, for instance), Gnus has to know whether the article the
24433 user is following up on is news or mail.  This function should return
24434 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
24435 is mail and @code{unknown} if the type can't be decided.  (The
24436 @var{article} parameter is necessary in @code{nnvirtual} groups which
24437 might very well combine mail groups and news groups.)  Both @var{group}
24438 and @var{article} may be @code{nil}.
24439
24440 There should be no result data from this function.
24441
24442
24443 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
24444
24445 Set/remove/add marks on articles.  Normally Gnus handles the article
24446 marks (such as read, ticked, expired etc) internally, and store them in
24447 @code{~/.newsrc.eld}.  Some back ends (such as @sc{imap}) however carry
24448 all information about the articles on the server, so Gnus need to
24449 propagate the mark information to the server.
24450
24451 ACTION is a list of mark setting requests, having this format:
24452
24453 @example
24454 (RANGE ACTION MARK)
24455 @end example
24456
24457 RANGE is a range of articles you wish to update marks on.  ACTION is
24458 @code{add} or @code{del}, used to add marks or remove marks
24459 (preserving all marks not mentioned).  MARK is a list of marks; where
24460 each mark is a symbol.  Currently used marks are @code{read},
24461 @code{tick}, @code{reply}, @code{expire}, @code{killed},
24462 @code{dormant}, @code{save}, @code{download}, @code{unsend},
24463 @code{forward} and @code{recent}, but your back end should, if
24464 possible, not limit itself to these.
24465
24466 Given contradictory actions, the last action in the list should be the
24467 effective one.  That is, if your action contains a request to add the
24468 @code{tick} mark on article 1 and, later in the list, a request to
24469 remove the mark on the same article, the mark should in fact be removed.
24470
24471 An example action list:
24472
24473 @example
24474 (((5 12 30) 'del '(tick))
24475  ((10 . 90) 'add '(read expire))
24476  ((92 94) 'del '(read)))
24477 @end example
24478
24479 The function should return a range of articles it wasn't able to set the
24480 mark on (currently not used for anything).
24481
24482 There should be no result data from this function.
24483
24484 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
24485
24486 If the user tries to set a mark that the back end doesn't like, this
24487 function may change the mark.  Gnus will use whatever this function
24488 returns as the mark for @var{article} instead of the original
24489 @var{mark}.  If the back end doesn't care, it must return the original
24490 @var{mark}, and not @code{nil} or any other type of garbage.
24491
24492 The only use for this I can see is what @code{nnvirtual} does with
24493 it---if a component group is auto-expirable, marking an article as read
24494 in the virtual group should result in the article being marked as
24495 expirable.
24496
24497 There should be no result data from this function.
24498
24499
24500 @item (nnchoke-request-scan &optional GROUP SERVER)
24501
24502 This function may be called at any time (by Gnus or anything else) to
24503 request that the back end check for incoming articles, in one way or
24504 another.  A mail back end will typically read the spool file or query the
24505 POP server when this function is invoked.  The @var{group} doesn't have
24506 to be heeded---if the back end decides that it is too much work just
24507 scanning for a single group, it may do a total scan of all groups.  It
24508 would be nice, however, to keep things local if that's practical.
24509
24510 There should be no result data from this function.
24511
24512
24513 @item (nnchoke-request-group-description GROUP &optional SERVER)
24514
24515 The result data from this function should be a description of
24516 @var{group}.
24517
24518 @example
24519 description-line = name <TAB> description eol
24520 name             = <string>
24521 description      = <text>
24522 @end example
24523
24524 @item (nnchoke-request-list-newsgroups &optional SERVER)
24525
24526 The result data from this function should be the description of all
24527 groups available on the server.
24528
24529 @example
24530 description-buffer = *description-line
24531 @end example
24532
24533
24534 @item (nnchoke-request-newgroups DATE &optional SERVER)
24535
24536 The result data from this function should be all groups that were
24537 created after @samp{date}, which is in normal human-readable date format
24538 (i.e., the date format used in mail and news headers, and returned by
24539 the function @code{message-make-date} by default).  The data should be
24540 in the active buffer format.
24541
24542 It is okay for this function to return `too many' groups; some back ends
24543 might find it cheaper to return the full list of groups, rather than
24544 just the new groups.  But don't do this for back ends with many groups.
24545 Normally, if the user creates the groups herself, there won't be too
24546 many groups, so @code{nnml} and the like are probably safe.  But for
24547 back ends like @code{nntp}, where the groups have been created by the
24548 server, it is quite likely that there can be many groups.
24549
24550
24551 @item (nnchoke-request-create-group GROUP &optional SERVER)
24552
24553 This function should create an empty group with name @var{group}.
24554
24555 There should be no return data.
24556
24557
24558 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
24559
24560 This function should run the expiry process on all articles in the
24561 @var{articles} range (which is currently a simple list of article
24562 numbers.)  It is left up to the back end to decide how old articles
24563 should be before they are removed by this function.  If @var{force} is
24564 non-@code{nil}, all @var{articles} should be deleted, no matter how new
24565 they are.
24566
24567 This function should return a list of articles that it did not/was not
24568 able to delete.
24569
24570 There should be no result data returned.
24571
24572
24573 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
24574 &optional LAST)
24575
24576 This function should move @var{article} (which is a number) from
24577 @var{group} by calling @var{accept-form}.
24578
24579 This function should ready the article in question for moving by
24580 removing any header lines it has added to the article, and generally
24581 should ``tidy up'' the article.  Then it should @code{eval}
24582 @var{accept-form} in the buffer where the ``tidy'' article is.  This
24583 will do the actual copying.  If this @code{eval} returns a
24584 non-@code{nil} value, the article should be removed.
24585
24586 If @var{last} is @code{nil}, that means that there is a high likelihood
24587 that there will be more requests issued shortly, so that allows some
24588 optimizations.
24589
24590 The function should return a cons where the @code{car} is the group name and
24591 the @code{cdr} is the article number that the article was entered as.
24592
24593 There should be no data returned.
24594
24595
24596 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
24597
24598 This function takes the current buffer and inserts it into @var{group}.
24599 If @var{last} in @code{nil}, that means that there will be more calls to
24600 this function in short order.
24601
24602 The function should return a cons where the @code{car} is the group name and
24603 the @code{cdr} is the article number that the article was entered as.
24604
24605 There should be no data returned.
24606
24607
24608 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
24609
24610 This function should remove @var{article} (which is a number) from
24611 @var{group} and insert @var{buffer} there instead.
24612
24613 There should be no data returned.
24614
24615
24616 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
24617
24618 This function should delete @var{group}.  If @var{force}, it should
24619 really delete all the articles in the group, and then delete the group
24620 itself.  (If there is such a thing as ``the group itself''.)
24621
24622 There should be no data returned.
24623
24624
24625 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
24626
24627 This function should rename @var{group} into @var{new-name}.  All
24628 articles in @var{group} should move to @var{new-name}.
24629
24630 There should be no data returned.
24631
24632 @end table
24633
24634
24635 @node Error Messaging
24636 @subsubsection Error Messaging
24637
24638 @findex nnheader-report
24639 @findex nnheader-get-report
24640 The back ends should use the function @code{nnheader-report} to report
24641 error conditions---they should not raise errors when they aren't able to
24642 perform a request.  The first argument to this function is the back end
24643 symbol, and the rest are interpreted as arguments to @code{format} if
24644 there are multiple of them, or just a string if there is one of them.
24645 This function must always returns @code{nil}.
24646
24647 @lisp
24648 (nnheader-report 'nnchoke "You did something totally bogus")
24649
24650 (nnheader-report 'nnchoke "Could not request group %s" group)
24651 @end lisp
24652
24653 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
24654 @code{nil} back from a server, and this function returns the most
24655 recently reported message for the back end in question.  This function
24656 takes one argument---the server symbol.
24657
24658 Internally, these functions access @var{back-end}@code{-status-string},
24659 so the @code{nnchoke} back end will have its error message stored in
24660 @code{nnchoke-status-string}.
24661
24662
24663 @node Writing New Back Ends
24664 @subsubsection Writing New Back Ends
24665
24666 Many back ends are quite similar.  @code{nnml} is just like
24667 @code{nnspool}, but it allows you to edit the articles on the server.
24668 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
24669 and it doesn't maintain overview databases.  @code{nndir} is just like
24670 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
24671 editing articles.
24672
24673 It would make sense if it were possible to ``inherit'' functions from
24674 back ends when writing new back ends.  And, indeed, you can do that if you
24675 want to.  (You don't have to if you don't want to, of course.)
24676
24677 All the back ends declare their public variables and functions by using a
24678 package called @code{nnoo}.
24679
24680 To inherit functions from other back ends (and allow other back ends to
24681 inherit functions from the current back end), you should use the
24682 following macros:
24683
24684 @table @code
24685
24686 @item nnoo-declare
24687 This macro declares the first parameter to be a child of the subsequent
24688 parameters.  For instance:
24689
24690 @lisp
24691 (nnoo-declare nndir
24692   nnml nnmh)
24693 @end lisp
24694
24695 @code{nndir} has declared here that it intends to inherit functions from
24696 both @code{nnml} and @code{nnmh}.
24697
24698 @item defvoo
24699 This macro is equivalent to @code{defvar}, but registers the variable as
24700 a public server variable.  Most state-oriented variables should be
24701 declared with @code{defvoo} instead of @code{defvar}.
24702
24703 In addition to the normal @code{defvar} parameters, it takes a list of
24704 variables in the parent back ends to map the variable to when executing
24705 a function in those back ends.
24706
24707 @lisp
24708 (defvoo nndir-directory nil
24709   "Where nndir will look for groups."
24710   nnml-current-directory nnmh-current-directory)
24711 @end lisp
24712
24713 This means that @code{nnml-current-directory} will be set to
24714 @code{nndir-directory} when an @code{nnml} function is called on behalf
24715 of @code{nndir}.  (The same with @code{nnmh}.)
24716
24717 @item nnoo-define-basics
24718 This macro defines some common functions that almost all back ends should
24719 have.
24720
24721 @example
24722 (nnoo-define-basics nndir)
24723 @end example
24724
24725 @item deffoo
24726 This macro is just like @code{defun} and takes the same parameters.  In
24727 addition to doing the normal @code{defun} things, it registers the
24728 function as being public so that other back ends can inherit it.
24729
24730 @item nnoo-map-functions
24731 This macro allows mapping of functions from the current back end to
24732 functions from the parent back ends.
24733
24734 @example
24735 (nnoo-map-functions nndir
24736   (nnml-retrieve-headers 0 nndir-current-group 0 0)
24737   (nnmh-request-article 0 nndir-current-group 0 0))
24738 @end example
24739
24740 This means that when @code{nndir-retrieve-headers} is called, the first,
24741 third, and fourth parameters will be passed on to
24742 @code{nnml-retrieve-headers}, while the second parameter is set to the
24743 value of @code{nndir-current-group}.
24744
24745 @item nnoo-import
24746 This macro allows importing functions from back ends.  It should be the
24747 last thing in the source file, since it will only define functions that
24748 haven't already been defined.
24749
24750 @example
24751 (nnoo-import nndir
24752   (nnmh
24753    nnmh-request-list
24754    nnmh-request-newgroups)
24755   (nnml))
24756 @end example
24757
24758 This means that calls to @code{nndir-request-list} should just be passed
24759 on to @code{nnmh-request-list}, while all public functions from
24760 @code{nnml} that haven't been defined in @code{nndir} yet should be
24761 defined now.
24762
24763 @end table
24764
24765 Below is a slightly shortened version of the @code{nndir} back end.
24766
24767 @lisp
24768 ;;; nndir.el --- single directory newsgroup access for Gnus
24769 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
24770
24771 ;;; Code:
24772
24773 (require 'nnheader)
24774 (require 'nnmh)
24775 (require 'nnml)
24776 (require 'nnoo)
24777 (eval-when-compile (require 'cl))
24778
24779 (nnoo-declare nndir
24780   nnml nnmh)
24781
24782 (defvoo nndir-directory nil
24783   "Where nndir will look for groups."
24784   nnml-current-directory nnmh-current-directory)
24785
24786 (defvoo nndir-nov-is-evil nil
24787   "*Non-nil means that nndir will never retrieve NOV headers."
24788   nnml-nov-is-evil)
24789
24790 (defvoo nndir-current-group ""
24791   nil
24792   nnml-current-group nnmh-current-group)
24793 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
24794 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
24795
24796 (defvoo nndir-status-string "" nil nnmh-status-string)
24797 (defconst nndir-version "nndir 1.0")
24798
24799 ;;; Interface functions.
24800
24801 (nnoo-define-basics nndir)
24802
24803 (deffoo nndir-open-server (server &optional defs)
24804   (setq nndir-directory
24805         (or (cadr (assq 'nndir-directory defs))
24806             server))
24807   (unless (assq 'nndir-directory defs)
24808     (push `(nndir-directory ,server) defs))
24809   (push `(nndir-current-group
24810           ,(file-name-nondirectory
24811             (directory-file-name nndir-directory)))
24812         defs)
24813   (push `(nndir-top-directory
24814           ,(file-name-directory (directory-file-name nndir-directory)))
24815         defs)
24816   (nnoo-change-server 'nndir server defs))
24817
24818 (nnoo-map-functions nndir
24819   (nnml-retrieve-headers 0 nndir-current-group 0 0)
24820   (nnmh-request-article 0 nndir-current-group 0 0)
24821   (nnmh-request-group nndir-current-group 0 0)
24822   (nnmh-close-group nndir-current-group 0))
24823
24824 (nnoo-import nndir
24825   (nnmh
24826    nnmh-status-message
24827    nnmh-request-list
24828    nnmh-request-newgroups))
24829
24830 (provide 'nndir)
24831 @end lisp
24832
24833
24834 @node Hooking New Back Ends Into Gnus
24835 @subsubsection Hooking New Back Ends Into Gnus
24836
24837 @vindex gnus-valid-select-methods
24838 @findex gnus-declare-backend
24839 Having Gnus start using your new back end is rather easy---you just
24840 declare it with the @code{gnus-declare-backend} functions.  This will
24841 enter the back end into the @code{gnus-valid-select-methods} variable.
24842
24843 @code{gnus-declare-backend} takes two parameters---the back end name and
24844 an arbitrary number of @dfn{abilities}.
24845
24846 Here's an example:
24847
24848 @lisp
24849 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
24850 @end lisp
24851
24852 The above line would then go in the @file{nnchoke.el} file.
24853
24854 The abilities can be:
24855
24856 @table @code
24857 @item mail
24858 This is a mailish back end---followups should (probably) go via mail.
24859 @item post
24860 This is a newsish back end---followups should (probably) go via news.
24861 @item post-mail
24862 This back end supports both mail and news.
24863 @item none
24864 This is neither a post nor mail back end---it's something completely
24865 different.
24866 @item respool
24867 It supports respooling---or rather, it is able to modify its source
24868 articles and groups.
24869 @item address
24870 The name of the server should be in the virtual server name.  This is
24871 true for almost all back ends.
24872 @item prompt-address
24873 The user should be prompted for an address when doing commands like
24874 @kbd{B} in the group buffer.  This is true for back ends like
24875 @code{nntp}, but not @code{nnmbox}, for instance.
24876 @end table
24877
24878
24879 @node Mail-like Back Ends
24880 @subsubsection Mail-like Back Ends
24881
24882 One of the things that separate the mail back ends from the rest of the
24883 back ends is the heavy dependence by most of the mail back ends on
24884 common functions in @file{nnmail.el}.  For instance, here's the
24885 definition of @code{nnml-request-scan}:
24886
24887 @lisp
24888 (deffoo nnml-request-scan (&optional group server)
24889   (setq nnml-article-file-alist nil)
24890   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
24891 @end lisp
24892
24893 It simply calls @code{nnmail-get-new-mail} with a few parameters,
24894 and @code{nnmail} takes care of all the moving and splitting of the
24895 mail.
24896
24897 This function takes four parameters.
24898
24899 @table @var
24900 @item method
24901 This should be a symbol to designate which back end is responsible for
24902 the call.
24903
24904 @item exit-function
24905 This function should be called after the splitting has been performed.
24906
24907 @item temp-directory
24908 Where the temporary files should be stored.
24909
24910 @item group
24911 This optional argument should be a group name if the splitting is to be
24912 performed for one group only.
24913 @end table
24914
24915 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
24916 save each article.  @var{back-end}@code{-active-number} will be called to
24917 find the article number assigned to this article.
24918
24919 The function also uses the following variables:
24920 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
24921 this back end); and @var{back-end}@code{-group-alist} and
24922 @var{back-end}@code{-active-file} to generate the new active file.
24923 @var{back-end}@code{-group-alist} should be a group-active alist, like
24924 this:
24925
24926 @example
24927 (("a-group" (1 . 10))
24928  ("some-group" (34 . 39)))
24929 @end example
24930
24931
24932 @node Score File Syntax
24933 @subsection Score File Syntax
24934
24935 Score files are meant to be easily parseable, but yet extremely
24936 mallable.   It was decided that something that had the same read syntax
24937 as an Emacs Lisp list would fit that spec.
24938
24939 Here's a typical score file:
24940
24941 @lisp
24942 (("summary"
24943   ("win95" -10000 nil s)
24944   ("Gnus"))
24945  ("from"
24946   ("Lars" -1000))
24947  (mark -100))
24948 @end lisp
24949
24950 BNF definition of a score file:
24951
24952 @example
24953 score-file      = "" / "(" *element ")"
24954 element         = rule / atom
24955 rule            = string-rule / number-rule / date-rule
24956 string-rule     = "(" quote string-header quote space *string-match ")"
24957 number-rule     = "(" quote number-header quote space *number-match ")"
24958 date-rule       = "(" quote date-header quote space *date-match ")"
24959 quote           = <ascii 34>
24960 string-header   = "subject" / "from" / "references" / "message-id" /
24961                   "xref" / "body" / "head" / "all" / "followup"
24962 number-header   = "lines" / "chars"
24963 date-header     = "date"
24964 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
24965                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
24966 score           = "nil" / <integer>
24967 date            = "nil" / <natural number>
24968 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
24969                   "r" / "regex" / "R" / "Regex" /
24970                   "e" / "exact" / "E" / "Exact" /
24971                   "f" / "fuzzy" / "F" / "Fuzzy"
24972 number-match    = "(" <integer> [ "" / [ space score [ "" /
24973                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
24974 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
24975 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
24976                   space date [ "" / [ space date-match-t ] ] ] ] ")"
24977 date-match-t    = "nil" / "at" / "before" / "after"
24978 atom            = "(" [ required-atom / optional-atom ] ")"
24979 required-atom   = mark / expunge / mark-and-expunge / files /
24980                   exclude-files / read-only / touched
24981 optional-atom   = adapt / local / eval
24982 mark            = "mark" space nil-or-number
24983 nil-or-number   = "nil" / <integer>
24984 expunge         = "expunge" space nil-or-number
24985 mark-and-expunge = "mark-and-expunge" space nil-or-number
24986 files           = "files" *[ space <string> ]
24987 exclude-files   = "exclude-files" *[ space <string> ]
24988 read-only       = "read-only" [ space "nil" / space "t" ]
24989 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
24990 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
24991 local           = "local" *[ space "(" <string> space <form> ")" ]
24992 eval            = "eval" space <form>
24993 space           = *[ " " / <TAB> / <NEWLINE> ]
24994 @end example
24995
24996 Any unrecognized elements in a score file should be ignored, but not
24997 discarded.
24998
24999 As you can see, white space is needed, but the type and amount of white
25000 space is irrelevant.  This means that formatting of the score file is
25001 left up to the programmer---if it's simpler to just spew it all out on
25002 one looong line, then that's ok.
25003
25004 The meaning of the various atoms are explained elsewhere in this
25005 manual (@pxref{Score File Format}).
25006
25007
25008 @node Headers
25009 @subsection Headers
25010
25011 Internally Gnus uses a format for storing article headers that
25012 corresponds to the @sc{nov} format in a mysterious fashion.  One could
25013 almost suspect that the author looked at the @sc{nov} specification and
25014 just shamelessly @emph{stole} the entire thing, and one would be right.
25015
25016 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
25017 RFC 1036 to talk about lines in the head of an article (e.g.,
25018 @code{From}).  It is used by many people as a synonym for
25019 ``head''---``the header and the body''.  (That should be avoided, in my
25020 opinion.)  And Gnus uses a format internally that it calls ``header'',
25021 which is what I'm talking about here.  This is a 9-element vector,
25022 basically, with each header (ouch) having one slot.
25023
25024 These slots are, in order: @code{number}, @code{subject}, @code{from},
25025 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
25026 @code{xref}, and @code{extra}.  There are macros for accessing and
25027 setting these slots---they all have predictable names beginning with
25028 @code{mail-header-} and @code{mail-header-set-}, respectively.
25029
25030 All these slots contain strings, except the @code{extra} slot, which
25031 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
25032
25033
25034 @node Ranges
25035 @subsection Ranges
25036
25037 @sc{gnus} introduced a concept that I found so useful that I've started
25038 using it a lot and have elaborated on it greatly.
25039
25040 The question is simple: If you have a large amount of objects that are
25041 identified by numbers (say, articles, to take a @emph{wild} example)
25042 that you want to qualify as being ``included'', a normal sequence isn't
25043 very useful.  (A 200,000 length sequence is a bit long-winded.)
25044
25045 The solution is as simple as the question: You just collapse the
25046 sequence.
25047
25048 @example
25049 (1 2 3 4 5 6 10 11 12)
25050 @end example
25051
25052 is transformed into
25053
25054 @example
25055 ((1 . 6) (10 . 12))
25056 @end example
25057
25058 To avoid having those nasty @samp{(13 . 13)} elements to denote a
25059 lonesome object, a @samp{13} is a valid element:
25060
25061 @example
25062 ((1 . 6) 7 (10 . 12))
25063 @end example
25064
25065 This means that comparing two ranges to find out whether they are equal
25066 is slightly tricky:
25067
25068 @example
25069 ((1 . 5) 7 8 (10 . 12))
25070 @end example
25071
25072 and
25073
25074 @example
25075 ((1 . 5) (7 . 8) (10 . 12))
25076 @end example
25077
25078 are equal.  In fact, any non-descending list is a range:
25079
25080 @example
25081 (1 2 3 4 5)
25082 @end example
25083
25084 is a perfectly valid range, although a pretty long-winded one.  This is
25085 also valid:
25086
25087 @example
25088 (1 . 5)
25089 @end example
25090
25091 and is equal to the previous range.
25092
25093 Here's a BNF definition of ranges.  Of course, one must remember the
25094 semantic requirement that the numbers are non-descending.  (Any number
25095 of repetition of the same number is allowed, but apt to disappear in
25096 range handling.)
25097
25098 @example
25099 range           = simple-range / normal-range
25100 simple-range    = "(" number " . " number ")"
25101 normal-range    = "(" start-contents ")"
25102 contents        = "" / simple-range *[ " " contents ] /
25103                   number *[ " " contents ]
25104 @end example
25105
25106 Gnus currently uses ranges to keep track of read articles and article
25107 marks.  I plan on implementing a number of range operators in C if The
25108 Powers That Be are willing to let me.  (I haven't asked yet, because I
25109 need to do some more thinking on what operators I need to make life
25110 totally range-based without ever having to convert back to normal
25111 sequences.)
25112
25113
25114 @node Group Info
25115 @subsection Group Info
25116
25117 Gnus stores all permanent info on groups in a @dfn{group info} list.
25118 This list is from three to six elements (or more) long and exhaustively
25119 describes the group.
25120
25121 Here are two example group infos; one is a very simple group while the
25122 second is a more complex one:
25123
25124 @example
25125 ("no.group" 5 ((1 . 54324)))
25126
25127 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
25128                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
25129                 (nnml "")
25130                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
25131 @end example
25132
25133 The first element is the @dfn{group name}---as Gnus knows the group,
25134 anyway.  The second element is the @dfn{subscription level}, which
25135 normally is a small integer.  (It can also be the @dfn{rank}, which is a
25136 cons cell where the @code{car} is the level and the @code{cdr} is the
25137 score.)  The third element is a list of ranges of read articles.  The
25138 fourth element is a list of lists of article marks of various kinds.
25139 The fifth element is the select method (or virtual server, if you like).
25140 The sixth element is a list of @dfn{group parameters}, which is what
25141 this section is about.
25142
25143 Any of the last three elements may be missing if they are not required.
25144 In fact, the vast majority of groups will normally only have the first
25145 three elements, which saves quite a lot of cons cells.
25146
25147 Here's a BNF definition of the group info format:
25148
25149 @example
25150 info          = "(" group space ralevel space read
25151                 [ "" / [ space marks-list [ "" / [ space method [ "" /
25152                 space parameters ] ] ] ] ] ")"
25153 group         = quote <string> quote
25154 ralevel       = rank / level
25155 level         = <integer in the range of 1 to inf>
25156 rank          = "(" level "." score ")"
25157 score         = <integer in the range of 1 to inf>
25158 read          = range
25159 marks-lists   = nil / "(" *marks ")"
25160 marks         = "(" <string> range ")"
25161 method        = "(" <string> *elisp-forms ")"
25162 parameters    = "(" *elisp-forms ")"
25163 @end example
25164
25165 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
25166 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
25167 in pseudo-BNF.
25168
25169 If you have a Gnus info and want to access the elements, Gnus offers a
25170 series of macros for getting/setting these elements.
25171
25172 @table @code
25173 @item gnus-info-group
25174 @itemx gnus-info-set-group
25175 @findex gnus-info-group
25176 @findex gnus-info-set-group
25177 Get/set the group name.
25178
25179 @item gnus-info-rank
25180 @itemx gnus-info-set-rank
25181 @findex gnus-info-rank
25182 @findex gnus-info-set-rank
25183 Get/set the group rank (@pxref{Group Score}).
25184
25185 @item gnus-info-level
25186 @itemx gnus-info-set-level
25187 @findex gnus-info-level
25188 @findex gnus-info-set-level
25189 Get/set the group level.
25190
25191 @item gnus-info-score
25192 @itemx gnus-info-set-score
25193 @findex gnus-info-score
25194 @findex gnus-info-set-score
25195 Get/set the group score (@pxref{Group Score}).
25196
25197 @item gnus-info-read
25198 @itemx gnus-info-set-read
25199 @findex gnus-info-read
25200 @findex gnus-info-set-read
25201 Get/set the ranges of read articles.
25202
25203 @item gnus-info-marks
25204 @itemx gnus-info-set-marks
25205 @findex gnus-info-marks
25206 @findex gnus-info-set-marks
25207 Get/set the lists of ranges of marked articles.
25208
25209 @item gnus-info-method
25210 @itemx gnus-info-set-method
25211 @findex gnus-info-method
25212 @findex gnus-info-set-method
25213 Get/set the group select method.
25214
25215 @item gnus-info-params
25216 @itemx gnus-info-set-params
25217 @findex gnus-info-params
25218 @findex gnus-info-set-params
25219 Get/set the group parameters.
25220 @end table
25221
25222 All the getter functions take one parameter---the info list.  The setter
25223 functions take two parameters---the info list and the new value.
25224
25225 The last three elements in the group info aren't mandatory, so it may be
25226 necessary to extend the group info before setting the element.  If this
25227 is necessary, you can just pass on a non-@code{nil} third parameter to
25228 the three final setter functions to have this happen automatically.
25229
25230
25231 @node Extended Interactive
25232 @subsection Extended Interactive
25233 @cindex interactive
25234 @findex gnus-interactive
25235
25236 Gnus extends the standard Emacs @code{interactive} specification
25237 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
25238 Prefixes}).  Here's an example of how this is used:
25239
25240 @lisp
25241 (defun gnus-summary-increase-score (&optional score symp)
25242   (interactive (gnus-interactive "P\ny"))
25243   ...
25244   )
25245 @end lisp
25246
25247 The best thing to do would have been to implement
25248 @code{gnus-interactive} as a macro which would have returned an
25249 @code{interactive} form, but this isn't possible since Emacs checks
25250 whether a function is interactive or not by simply doing an @code{assq}
25251 on the lambda form.  So, instead we have @code{gnus-interactive}
25252 function that takes a string and returns values that are usable to
25253 @code{interactive}.
25254
25255 This function accepts (almost) all normal @code{interactive} specs, but
25256 adds a few more.
25257
25258 @table @samp
25259 @item y
25260 @vindex gnus-current-prefix-symbol
25261 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
25262 variable.
25263
25264 @item Y
25265 @vindex gnus-current-prefix-symbols
25266 A list of the current symbolic prefixes---the
25267 @code{gnus-current-prefix-symbol} variable.
25268
25269 @item A
25270 The current article number---the @code{gnus-summary-article-number}
25271 function.
25272
25273 @item H
25274 The current article header---the @code{gnus-summary-article-header}
25275 function.
25276
25277 @item g
25278 The current group name---the @code{gnus-group-group-name}
25279 function.
25280
25281 @end table
25282
25283
25284 @node Emacs/XEmacs Code
25285 @subsection Emacs/XEmacs Code
25286 @cindex XEmacs
25287 @cindex Emacsen
25288
25289 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
25290 platforms must be the primary one.  I chose Emacs.  Not because I don't
25291 like XEmacs or Mule, but because it comes first alphabetically.
25292
25293 This means that Gnus will byte-compile under Emacs with nary a warning,
25294 while XEmacs will pump out gigabytes of warnings while byte-compiling.
25295 As I use byte-compilation warnings to help me root out trivial errors in
25296 Gnus, that's very useful.
25297
25298 I've also consistently used Emacs function interfaces, but have used
25299 Gnusey aliases for the functions.  To take an example:  Emacs defines a
25300 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
25301 function.  I then define a function called @code{gnus-run-at-time} that
25302 takes the same parameters as the Emacs @code{run-at-time}.  When running
25303 Gnus under Emacs, the former function is just an alias for the latter.
25304 However, when running under XEmacs, the former is an alias for the
25305 following function:
25306
25307 @lisp
25308 (defun gnus-xmas-run-at-time (time repeat function &rest args)
25309   (start-itimer
25310    "gnus-run-at-time"
25311    `(lambda ()
25312       (,function ,@@args))
25313    time repeat))
25314 @end lisp
25315
25316 This sort of thing has been done for bunches of functions.  Gnus does
25317 not redefine any native Emacs functions while running under XEmacs---it
25318 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
25319 all over.
25320
25321 In the cases where the XEmacs function interface was obviously cleaner,
25322 I used it instead.  For example @code{gnus-region-active-p} is an alias
25323 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
25324
25325 Of course, I could have chosen XEmacs as my native platform and done
25326 mapping functions the other way around.  But I didn't.  The performance
25327 hit these indirections impose on Gnus under XEmacs should be slight.
25328
25329
25330 @node Various File Formats
25331 @subsection Various File Formats
25332
25333 @menu
25334 * Active File Format::          Information on articles and groups available.
25335 * Newsgroups File Format::      Group descriptions.
25336 @end menu
25337
25338
25339 @node Active File Format
25340 @subsubsection Active File Format
25341
25342 The active file lists all groups available on the server in
25343 question.  It also lists the highest and lowest current article numbers
25344 in each group.
25345
25346 Here's an excerpt from a typical active file:
25347
25348 @example
25349 soc.motss 296030 293865 y
25350 alt.binaries.pictures.fractals 3922 3913 n
25351 comp.sources.unix 1605 1593 m
25352 comp.binaries.ibm.pc 5097 5089 y
25353 no.general 1000 900 y
25354 @end example
25355
25356 Here's a pseudo-BNF definition of this file:
25357
25358 @example
25359 active      = *group-line
25360 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
25361 group       = <non-white-space string>
25362 spc         = " "
25363 high-number = <non-negative integer>
25364 low-number  = <positive integer>
25365 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
25366 @end example
25367
25368 For a full description of this file, see the manual pages for
25369 @samp{innd}, in particular @samp{active(5)}.
25370
25371
25372 @node Newsgroups File Format
25373 @subsubsection Newsgroups File Format
25374
25375 The newsgroups file lists groups along with their descriptions.  Not all
25376 groups on the server have to be listed,  and not all groups in the file
25377 have to exist on the server.  The file is meant purely as information to
25378 the user.
25379
25380 The format is quite simple; a group name, a tab, and the description.
25381 Here's the definition:
25382
25383 @example
25384 newsgroups    = *line
25385 line          = group tab description <NEWLINE>
25386 group         = <non-white-space string>
25387 tab           = <TAB>
25388 description   = <string>
25389 @end example
25390
25391
25392 @page
25393 @node Emacs for Heathens
25394 @section Emacs for Heathens
25395
25396 Believe it or not, but some people who use Gnus haven't really used
25397 Emacs much before they embarked on their journey on the Gnus Love Boat.
25398 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
25399 region'', and ``set @code{gnus-flargblossen} to an alist where the key
25400 is a regexp that is used for matching on the group name'' are magical
25401 phrases with little or no meaning, then this appendix is for you.  If
25402 you are already familiar with Emacs, just ignore this and go fondle your
25403 cat instead.
25404
25405 @menu
25406 * Keystrokes::                  Entering text and executing commands.
25407 * Emacs Lisp::                  The built-in Emacs programming language.
25408 @end menu
25409
25410
25411 @node Keystrokes
25412 @subsection Keystrokes
25413
25414 @itemize @bullet
25415 @item
25416 Q: What is an experienced Emacs user?
25417
25418 @item
25419 A: A person who wishes that the terminal had pedals.
25420 @end itemize
25421
25422 Yes, when you use Emacs, you are apt to use the control key, the shift
25423 key and the meta key a lot.  This is very annoying to some people
25424 (notably @code{vi}le users), and the rest of us just love the hell out
25425 of it.  Just give up and submit.  Emacs really does stand for
25426 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
25427 may have heard from other disreputable sources (like the Emacs author).
25428
25429 The shift keys are normally located near your pinky fingers, and are
25430 normally used to get capital letters and stuff.  You probably use it all
25431 the time.  The control key is normally marked ``CTRL'' or something like
25432 that.  The meta key is, funnily enough, never marked as such on any
25433 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
25434 which is the meta key on this keyboard.  It's usually located somewhere
25435 to the left hand side of the keyboard, usually on the bottom row.
25436
25437 Now, us Emacs people don't say ``press the meta-control-m key'',
25438 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
25439 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
25440 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
25441 down the control key, and hold it down while you press @kbd{k}''.
25442 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
25443 the control key and then press @kbd{k}''.  Simple, ay?
25444
25445 This is somewhat complicated by the fact that not all keyboards have a
25446 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
25447 means ``press escape, release escape, press @kbd{k}''.  That's much more
25448 work than if you have a meta key, so if that's the case, I respectfully
25449 suggest you get a real keyboard with a meta key.  You can't live without
25450 it.
25451
25452
25453
25454 @node Emacs Lisp
25455 @subsection Emacs Lisp
25456
25457 Emacs is the King of Editors because it's really a Lisp interpreter.
25458 Each and every key you tap runs some Emacs Lisp code snippet, and since
25459 Emacs Lisp is an interpreted language, that means that you can configure
25460 any key to run any arbitrary code.  You just, like, do it.
25461
25462 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
25463 functions.  (These are byte-compiled for speed, but it's still
25464 interpreted.)  If you decide that you don't like the way Gnus does
25465 certain things, it's trivial to have it do something a different way.
25466 (Well, at least if you know how to write Lisp code.)  However, that's
25467 beyond the scope of this manual, so we are simply going to talk about
25468 some common constructs that you normally use in your @file{.emacs} file
25469 to customize Gnus.
25470
25471 If you want to set the variable @code{gnus-florgbnize} to four (4), you
25472 write the following:
25473
25474 @lisp
25475 (setq gnus-florgbnize 4)
25476 @end lisp
25477
25478 This function (really ``special form'') @code{setq} is the one that can
25479 set a variable to some value.  This is really all you need to know.  Now
25480 you can go and fill your @code{.emacs} file with lots of these to change
25481 how Gnus works.
25482
25483 If you have put that thing in your @code{.emacs} file, it will be read
25484 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
25485 start Emacs.  If you want to change the variable right away, simply say
25486 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
25487 previous ``form'', which is a simple @code{setq} statement here.
25488
25489 Go ahead---just try it, if you're located at your Emacs.  After you
25490 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
25491 is the return value of the form you @code{eval}ed.
25492
25493 Some pitfalls:
25494
25495 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
25496 that means:
25497
25498 @lisp
25499 (setq gnus-read-active-file 'some)
25500 @end lisp
25501
25502 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
25503 @samp{nntp.ifi.uio.no}'', that means:
25504
25505 @lisp
25506 (setq gnus-nntp-server "nntp.ifi.uio.no")
25507 @end lisp
25508
25509 So be careful not to mix up strings (the latter) with symbols (the
25510 former).  The manual is unambiguous, but it can be confusing.
25511
25512 @page
25513 @include gnus-faq.texi
25514
25515 @node Index
25516 @chapter Index
25517 @printindex cp
25518
25519 @node Key Index
25520 @chapter Key Index
25521 @printindex ky
25522
25523 @summarycontents
25524 @contents
25525 @bye
25526
25527 @iftex
25528 @iflatex
25529 \end{document}
25530 @end iflatex
25531 @end iftex
25532
25533 @c Local Variables:
25534 @c mode: texinfo
25535 @c coding: iso-8859-1
25536 @c End:
25537 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
25538 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
25539 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
25540 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
25541 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref