Synch with Oort Gnus.
[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}{T-gnus v6.15}
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,
292 2002, 2003
293 Free Software Foundation, Inc.
294
295
296 Permission is granted to copy, distribute and/or modify this document
297 under the terms of the GNU Free Documentation License, Version 1.1 or
298 any later version published by the Free Software Foundation; with no
299 Invariant Sections, with the Front-Cover texts being ``A GNU
300 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
301 license is included in the section entitled ``GNU Free Documentation
302 License'' in the Emacs manual.
303
304 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
305 this GNU Manual, like GNU software.  Copies published by the Free
306 Software Foundation raise funds for GNU development.''
307
308 This document is part of a collection distributed under the GNU Free
309 Documentation License.  If you want to distribute this document
310 separately from the collection, you can do so by adding a copy of the
311 license to the document, as described in section 6 of the license.
312 \newpage
313 \end{titlepage}
314 @end iflatex
315 @end iftex
316
317 @ifnottex
318
319 This file documents gnus, the GNU Emacs newsreader.
320
321 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
322         Free Software Foundation, Inc.
323
324 Permission is granted to copy, distribute and/or modify this document
325 under the terms of the GNU Free Documentation License, Version 1.1 or
326 any later version published by the Free Software Foundation; with the
327 Invariant Sections being none, with the Front-Cover texts being ``A GNU
328 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
329 license is included in the section entitled ``GNU Free Documentation
330 License'' in the Emacs manual.
331
332 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
333 this GNU Manual, like GNU software.  Copies published by the Free
334 Software Foundation raise funds for GNU development.''
335
336 This document is part of a collection distributed under the GNU Free
337 Documentation License.  If you want to distribute this document
338 separately from the collection, you can do so by adding a copy of the
339 license to the document, as described in section 6 of the license.
340 @end ifnottex
341
342 @tex
343
344 @titlepage
345 @title T-gnus 6.15 Manual
346
347 @author by Lars Magne Ingebrigtsen
348 @page
349
350 @vskip 0pt plus 1filll
351 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
352 2002, 2003
353         Free Software Foundation, Inc.
354
355 Permission is granted to copy, distribute and/or modify this document
356 under the terms of the GNU Free Documentation License, Version 1.1 or
357 any later version published by the Free Software Foundation; with no
358 Invariant Sections, with the Front-Cover texts being ``A GNU
359 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
360 license is included in the section entitled ``GNU Free Documentation
361 License'' in the Emacs manual.
362
363 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
364 this GNU Manual, like GNU software.  Copies published by the Free
365 Software Foundation raise funds for GNU development.''
366
367 This document is part of a collection distributed under the GNU Free
368 Documentation License.  If you want to distribute this document
369 separately from the collection, you can do so by adding a copy of the
370 license to the document, as described in section 6 of the license.
371
372 @end titlepage
373 @page
374
375 @end tex
376
377
378 @node Top
379 @top The gnus Newsreader
380
381 @ifinfo
382
383 You can read news (and mail) from within Emacs by using gnus.  The news
384 can be gotten by any nefarious means you can think of---@sc{nntp}, local
385 spool or your mbox file.  All at the same time, if you want to push your
386 luck.
387
388 T-gnus provides @sc{mime} features based on @sc{semi} API.  So T-gnus
389 supports your right to read strange messages including big images or
390 other various kinds of formats.  T-gnus also supports
391 internationalization/localization and multiscript features based on MULE
392 API.  So T-gnus does not discriminate various language communities.
393 Oh, if you are a Klingon, please wait Unicode Next Generation.
394
395 This manual corresponds to T-gnus 6.15.
396
397 @end ifinfo
398
399 @iftex
400
401 @iflatex
402 \tableofcontents
403 \gnuscleardoublepage
404 @end iflatex
405
406 Gnus is the advanced, self-documenting, customizable, extensible
407 unreal-time newsreader for GNU Emacs.
408
409 Oops.  That sounds oddly familiar, so let's start over again to avoid
410 being accused of plagiarism:
411
412 Gnus is a message-reading laboratory.  It will let you look at just
413 about anything as if it were a newsgroup.  You can read mail with it,
414 you can browse directories with it, you can @code{ftp} with it---you
415 can even read news with it!
416
417 Gnus tries to empower people who read news the same way Emacs empowers
418 people who edit text.  Gnus sets no limits to what the user should be
419 allowed to do.  Users are encouraged to extend gnus to make it behave
420 like they want it to behave.  A program should not control people;
421 people should be empowered to do what they want by using (or abusing)
422 the program.
423
424 @end iftex
425
426 @menu
427 * Starting Up::                 Finding news can be a pain.
428 * Group Buffer::                Selecting, subscribing and killing groups.
429 * Summary Buffer::              Reading, saving and posting articles.
430 * Article Buffer::              Displaying and handling articles.
431 * Composing Messages::          Information on sending mail and news.
432 * Select Methods::              Gnus reads all messages from various select methods.
433 * Scoring::                     Assigning values to articles.
434 * Various::                     General purpose settings.
435 * The End::                     Farewell and goodbye.
436 * Appendices::                  Terminology, Emacs intro, FAQ, History, Internals.
437 * Index::                       Variable, function and concept index.
438 * Key Index::                   Key Index.
439
440 Other related manuals
441
442 * Message:(message).            Composing messages.
443 * Emacs-MIME:(emacs-mime).      Composing messages; MIME-specific parts.
444 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
445 * PGG:(pgg).                    PGP/MIME with Gnus.
446
447 @detailmenu
448  --- The Detailed Node Listing ---
449
450 Starting Gnus
451
452 * Finding the News::            Choosing a method for getting news.
453 * The First Time::              What does Gnus do the first time you start it?
454 * The Server is Down::          How can I read my mail then?
455 * Slave Gnusae::                You can have more than one Gnus active at a time.
456 * Fetching a Group::            Starting Gnus just to read a group.
457 * New Groups::                  What is Gnus supposed to do with new groups?
458 * Changing Servers::            You may want to move from one server to another.
459 * Startup Files::               Those pesky startup files---@file{.newsrc}.
460 * Auto Save::                   Recovering from a crash.
461 * The Active File::             Reading the active file over a slow line Takes Time.
462 * Startup Variables::           Other variables you might change.
463
464 New Groups
465
466 * Checking New Groups::         Determining what groups are new.
467 * Subscription Methods::        What Gnus should do with new groups.
468 * Filtering New Groups::        Making Gnus ignore certain new groups.
469
470 Group Buffer
471
472 * Group Buffer Format::         Information listed and how you can change it.
473 * Group Maneuvering::           Commands for moving in the group buffer.
474 * Selecting a Group::           Actually reading news.
475 * Subscription Commands::       Unsubscribing, killing, subscribing.
476 * Group Data::                  Changing the info for a group.
477 * Group Levels::                Levels? What are those, then?
478 * Group Score::                 A mechanism for finding out what groups you like.
479 * Marking Groups::              You can mark groups for later processing.
480 * Foreign Groups::              Creating and editing groups.
481 * Group Parameters::            Each group may have different parameters set.
482 * Listing Groups::              Gnus can list various subsets of the groups.
483 * Sorting Groups::              Re-arrange the group order.
484 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
485 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
486 * Exiting Gnus::                Stop reading news and get some work done.
487 * Group Topics::                A folding group mode divided into topics.
488 * Misc Group Stuff::            Other stuff that you can to do.
489
490 Group Buffer Format
491
492 * Group Line Specification::    Deciding how the group buffer is to look.
493 * Group Modeline Specification::  The group buffer modeline.
494 * Group Highlighting::          Having nice colors in the group buffer.
495
496 Group Topics
497
498 * Topic Commands::              Interactive E-Z commands.
499 * Topic Variables::             How to customize the topics the Lisp Way.
500 * Topic Sorting::               Sorting each topic individually.
501 * Topic Topology::              A map of the world.
502 * Topic Parameters::            Parameters that apply to all groups in a topic.
503
504 Misc Group Stuff
505
506 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
507 * Group Information::           Information and help on groups and Gnus.
508 * Group Timestamp::             Making Gnus keep track of when you last read a group.
509 * File Commands::               Reading and writing the Gnus files.
510 * Sieve Commands::              Managing Sieve scripts.
511
512 Summary Buffer
513
514 * Summary Buffer Format::       Deciding how the summary buffer is to look.
515 * Summary Maneuvering::         Moving around the summary buffer.
516 * Choosing Articles::           Reading articles.
517 * Paging the Article::          Scrolling the current article.
518 * Reply Followup and Post::     Posting articles.
519 * Delayed Articles::            Send articles at a later time.
520 * Marking Articles::            Marking articles as read, expirable, etc.
521 * Limiting::                    You can limit the summary buffer.
522 * Threading::                   How threads are made.
523 * Sorting the Summary Buffer::  How articles and threads are sorted.
524 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
525 * Article Caching::             You may store articles in a cache.
526 * Persistent Articles::         Making articles expiry-resistant.
527 * Article Backlog::             Having already read articles hang around.
528 * Saving Articles::             Ways of customizing article saving.
529 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
530 * Article Treatment::           The article buffer can be mangled at will.
531 * MIME Commands::               Doing MIMEy things with the articles.
532 * Charsets::                    Character set issues.
533 * Article Commands::            Doing various things with the article buffer.
534 * Summary Sorting::             Sorting the summary buffer in various ways.
535 * Finding the Parent::          No child support? Get the parent.
536 * Alternative Approaches::      Reading using non-default summaries.
537 * Tree Display::                A more visual display of threads.
538 * Mail Group Commands::         Some commands can only be used in mail groups.
539 * Various Summary Stuff::       What didn't fit anywhere else.
540 * Exiting the Summary Buffer::  Returning to the Group buffer,
541                                 or reselecting the current group.
542 * Crosspost Handling::          How crossposted articles are dealt with.
543 * Duplicate Suppression::       An alternative when crosspost handling fails.
544 * Security::                    Decrypt and Verify.
545 * Mailing List::                Mailing list minor mode.
546
547 Summary Buffer Format
548
549 * Summary Buffer Lines::        You can specify how summary lines should look.
550 * To From Newsgroups::          How to not display your own name.
551 * Summary Buffer Mode Line::    You can say how the mode line should look.
552 * Summary Highlighting::        Making the summary buffer all pretty and nice.
553
554 Choosing Articles
555
556 * Choosing Commands::           Commands for choosing articles.
557 * Choosing Variables::          Variables that influence these commands.
558
559 Reply, Followup and Post
560
561 * Summary Mail Commands::       Sending mail.
562 * Summary Post Commands::       Sending news.
563 * Summary Message Commands::    Other Message-related commands.
564 * Canceling and Superseding::   
565
566 Marking Articles
567
568 * Unread Articles::             Marks for unread articles.
569 * Read Articles::               Marks for read articles.
570 * Other Marks::                 Marks that do not affect readedness.
571 * Setting Marks::               
572 * Generic Marking Commands::    
573 * Setting Process Marks::       
574
575 Marking Articles
576
577 * Setting Marks::             How to set and remove marks.
578 * Generic Marking Commands::  How to customize the marking.
579 * Setting Process Marks::     How to mark articles for later processing.
580
581 Threading
582
583 * Customizing Threading::       Variables you can change to affect the threading.
584 * Thread Commands::             Thread based commands in the summary buffer.
585
586 Customizing Threading
587
588 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
589 * Filling In Threads::          Making the threads displayed look fuller.
590 * More Threading::              Even more variables for fiddling with threads.
591 * Low-Level Threading::         You thought it was over... but you were wrong!
592
593 Decoding Articles
594
595 * Uuencoded Articles::          Uudecode articles.
596 * Shell Archives::              Unshar articles.
597 * PostScript Files::            Split PostScript.
598 * Other Files::                 Plain save and binhex.
599 * Decoding Variables::          Variables for a happy decoding.
600 * Viewing Files::               You want to look at the result of the decoding?
601
602 Decoding Variables
603
604 * Rule Variables::              Variables that say how a file is to be viewed.
605 * Other Decode Variables::      Other decode variables.
606 * Uuencoding and Posting::      Variables for customizing uuencoding.
607
608 Article Treatment
609
610 * Article Highlighting::        You want to make the article look like fruit salad.
611 * Article Fontisizing::         Making emphasized text look nice.
612 * Article Hiding::              You also want to make certain info go away.
613 * Article Washing::             Lots of way-neat functions to make life better.
614 * Article Header::              Doing various header transformations.
615 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
616 * Article Date::                Grumble, UT!
617 * Article Display::             Display various stuff---X-Face, Picons, Smileys
618 * Article Signature::           What is a signature?
619 * Article Miscellania::         Various other stuff.
620
621 Alternative Approaches
622
623 * Pick and Read::               First mark articles and then read them.
624 * Binary Groups::               Auto-decode all articles.
625
626 Various Summary Stuff
627
628 * Summary Group Information::   Information oriented commands.
629 * Searching for Articles::      Multiple article commands.
630 * Summary Generation Commands::  
631 * Really Various Summary Commands::  Those pesky non-conformant commands.
632
633 Article Buffer
634
635 * Hiding Headers::              Deciding what headers should be displayed.
636 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
637 * Customizing Articles::        Tailoring the look of the articles.
638 * Article Keymap::              Keystrokes available in the article buffer.
639 * Misc Article::                Other stuff.
640
641 Composing Messages
642
643 * Mail::                        Mailing and replying.
644 * Posting Server::              What server should you post and mail via?
645 * Mail and Post::               Mailing and posting at the same time.
646 * Archived Messages::           Where Gnus stores the messages you've sent.
647 * Posting Styles::              An easier way to specify who you are.
648 * Drafts::                      Postponing messages and rejected messages.
649 * Rejected Articles::           What happens if the server doesn't like your article?
650 * Signing and encrypting::      How to compose secure messages.
651
652 Select Methods
653
654 * Server Buffer::               Making and editing virtual servers.
655 * Getting News::                Reading USENET news with Gnus.
656 * Getting Mail::                Reading your personal mail with Gnus.
657 * Browsing the Web::            Getting messages from a plethora of Web sources.
658 * IMAP::                        Using Gnus as a @sc{imap} client.
659 * Other Sources::               Reading directories, files, SOUP packets.
660 * Combined Groups::             Combining groups into one group.
661 * Gnus Unplugged::              Reading news and mail offline.
662
663 Server Buffer
664
665 * Server Buffer Format::        You can customize the look of this buffer.
666 * Server Commands::             Commands to manipulate servers.
667 * Example Methods::             Examples server specifications.
668 * Creating a Virtual Server::   An example session.
669 * Server Variables::            Which variables to set.
670 * Servers and Methods::         You can use server names as select methods.
671 * Unavailable Servers::         Some servers you try to contact may be down.
672
673 Getting News
674
675 * NNTP::                        Reading news from an @sc{nntp} server.
676 * News Spool::                  Reading news from the local spool.
677
678 @sc{nntp}
679
680 * Direct Functions::            Connecting directly to the server.
681 * Indirect Functions::          Connecting indirectly to the server.
682 * Common Variables::            Understood by several connection functions.
683
684 Getting Mail
685
686 * Mail in a Newsreader::        Important introductory notes.
687 * Getting Started Reading Mail::  A simple cookbook example.
688 * Splitting Mail::              How to create mail groups.
689 * Mail Sources::                How to tell Gnus where to get mail from.
690 * Mail Back End Variables::     Variables for customizing mail handling.
691 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
692 * Group Mail Splitting::        Use group customize to drive mail splitting.
693 * Incorporating Old Mail::      What about the old mail you have?
694 * Expiring Mail::               Getting rid of unwanted mail.
695 * Washing Mail::                Removing gruft from the mail you get.
696 * Duplicates::                  Dealing with duplicated mail.
697 * Not Reading Mail::            Using mail back ends for reading other files.
698 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
699
700 Mail Sources
701
702 * Mail Source Specifiers::      How to specify what a mail source is.
703 * Mail Source Customization::   Some variables that influence things.
704 * Fetching Mail::               Using the mail source specifiers.
705
706 Choosing a Mail Back End
707
708 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
709 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
710 * Mail Spool::                  Store your mail in a private spool?
711 * MH Spool::                    An mhspool-like back end.
712 * Mail Folders::                Having one file for each group.
713 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
714
715 Browsing the Web
716
717 * Archiving Mail::              
718 * Web Searches::                Creating groups from articles that match a string.
719 * Slashdot::                    Reading the Slashdot comments.
720 * Ultimate::                    The Ultimate Bulletin Board systems.
721 * Web Archive::                 Reading mailing list archived on web.
722 * RSS::                         Reading RDF site summary.
723 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
724
725 @sc{imap}
726
727 * Splitting in IMAP::           Splitting mail with nnimap.
728 * Expiring in IMAP::            Expiring mail with nnimap.
729 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
730 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
731 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
732
733 Other Sources
734
735 * Directory Groups::            You can read a directory as if it was a newsgroup.
736 * Anything Groups::             Dired?  Who needs dired?
737 * Document Groups::             Single files can be the basis of a group.
738 * SOUP::                        Reading @sc{soup} packets ``offline''.
739 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
740
741 Document Groups
742
743 * Document Server Internals::   How to add your own document types.
744
745 SOUP
746
747 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
748 * SOUP Groups::                 A back end for reading @sc{soup} packets.
749 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
750
751 Combined Groups
752
753 * Virtual Groups::              Combining articles from many groups.
754 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
755
756 Gnus Unplugged
757
758 * Agent Basics::                How it all is supposed to work.
759 * Agent Categories::            How to tell the Gnus Agent what to download.
760 * Agent Commands::              New commands for all the buffers.
761 * Agent as Cache::              The Agent is a big cache too.
762 * Agent Expiry::                How to make old articles go away.
763 * Agent Regeneration::          How to recover from lost connections and other accidents.
764 * Agent and IMAP::              How to use the Agent with IMAP.
765 * Outgoing Messages::           What happens when you post/mail something?
766 * Agent Variables::             Customizing is fun.
767 * Example Setup::               An example @file{.gnus.el} file for offline people.
768 * Batching Agents::             How to fetch news from a @code{cron} job.
769 * Agent Caveats::               What you think it'll do and what it does.
770
771 Agent Categories
772
773 * Category Syntax::             What a category looks like.
774 * Category Buffer::             A buffer for maintaining categories.
775 * Category Variables::          Customize'r'Us.
776
777 Agent Commands
778
779 * Group Agent Commands::        Configure groups and fetch their contents.
780 * Summary Agent Commands::      Manually select then fetch specific articles.
781 * Server Agent Commands::       Select the servers that are supported by the agent.
782
783 Scoring
784
785 * Summary Score Commands::      Adding score entries for the current group.
786 * Group Score Commands::        General score commands.
787 * Score Variables::             Customize your scoring.  (My, what terminology).
788 * Score File Format::           What a score file may contain.
789 * Score File Editing::          You can edit score files by hand as well.
790 * Adaptive Scoring::            Big Sister Gnus knows what you read.
791 * Home Score File::             How to say where new score entries are to go.
792 * Followups To Yourself::       Having Gnus notice when people answer you.
793 * Scoring On Other Headers::    Scoring on non-standard headers.
794 * Scoring Tips::                How to score effectively.
795 * Reverse Scoring::             That problem child of old is not problem.
796 * Global Score Files::          Earth-spanning, ear-splitting score files.
797 * Kill Files::                  They are still here, but they can be ignored.
798 * Converting Kill Files::       Translating kill files to score files.
799 * GroupLens::                   Getting predictions on what you like to read.
800 * Advanced Scoring::            Using logical expressions to build score rules.
801 * Score Decays::                It can be useful to let scores wither away.
802
803 GroupLens
804
805 * Using GroupLens::             How to make Gnus use GroupLens.
806 * Rating Articles::             Letting GroupLens know how you rate articles.
807 * Displaying Predictions::      Displaying predictions given by GroupLens.
808 * GroupLens Variables::         Customizing GroupLens.
809
810 Advanced Scoring
811
812 * Advanced Scoring Syntax::     A definition.
813 * Advanced Scoring Examples::   What they look like.
814 * Advanced Scoring Tips::       Getting the most out of it.
815
816 Various
817
818 * Process/Prefix::              A convention used by many treatment commands.
819 * Interactive::                 Making Gnus ask you many questions.
820 * Symbolic Prefixes::           How to supply some Gnus functions with options.
821 * Formatting Variables::        You can specify what buffers should look like.
822 * Window Layout::               Configuring the Gnus buffer windows.
823 * Faces and Fonts::             How to change how faces look.
824 * Compilation::                 How to speed Gnus up.
825 * Mode Lines::                  Displaying information in the mode lines.
826 * Highlighting and Menus::      Making buffers look all nice and cozy.
827 * Buttons::                     Get tendinitis in ten easy steps!
828 * Daemons::                     Gnus can do things behind your back.
829 * NoCeM::                       How to avoid spam and other fatty foods.
830 * Undo::                        Some actions can be undone.
831 * Predicate Specifiers::        Specifying predicates.
832 * Moderation::                  What to do if you're a moderator.
833 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
834 * Fuzzy Matching::              What's the big fuzz?
835 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
836 * Various Various::             Things that are really various.
837
838 Formatting Variables
839
840 * Formatting Basics::           A formatting variable is basically a format string.
841 * Mode Line Formatting::        Some rules about mode line formatting variables.
842 * Advanced Formatting::         Modifying output in various ways.
843 * User-Defined Specs::          Having Gnus call your own functions.
844 * Formatting Fonts::            Making the formatting look colorful and nice.
845 * Positioning Point::           Moving point to a position after an operation.
846 * Tabulation::                  Tabulating your output.
847 * Wide Characters::             Dealing with wide characters.
848
849 Image Enhancements
850
851 * Picons::                      How to display pictures of what you're reading.
852 * Smileys::                     Show all those happy faces the way they were meant to be shown.
853 * X-Face::                      Display a funky, teensy black-and-white image.
854 * Toolbar::                     Click'n'drool.
855 * XVarious::                    Other XEmacsy Gnusey variables.
856
857 Thwarting Email Spam
858
859 * The problem of spam::         Some background, and some solutions
860 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
861 * SpamAssassin::                How to use external anti-spam tools.
862 * Hashcash::                    Reduce spam by burning CPU time.
863 * Filtering Spam Using The Spam ELisp Package::  
864 * Filtering Spam Using Statistics with spam-stat::  
865
866 Appendices
867
868 * XEmacs::                      Requirements for installing under XEmacs.
869 * History::                     How Gnus got where it is today.
870 * On Writing Manuals::          Why this is not a beginner's guide.
871 * Terminology::                 We use really difficult, like, words here.
872 * Customization::               Tailoring Gnus to your needs.
873 * Troubleshooting::             What you might try if things do not work.
874 * Gnus Reference Guide::        Rilly, rilly technical stuff.
875 * Emacs for Heathens::          A short introduction to Emacsian terms.
876 * Frequently Asked Questions::
877
878 History
879
880 * Gnus Versions::               What Gnus versions have been released.
881 * Other Gnus Versions::         Other Gnus versions that also have been released.
882 * Why?::                        What's the point of Gnus?
883 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
884 * Conformity::                  Gnus tries to conform to all standards.
885 * Emacsen::                     Gnus can be run on a few modern Emacsen.
886 * Gnus Development::            How Gnus is developed.
887 * Contributors::                Oodles of people.
888 * New Features::                Pointers to some of the new stuff in Gnus.
889
890 New Features
891
892 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
893 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
894 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
895 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
896 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
897
898 Customization
899
900 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
901 * Slow Terminal Connection::    You run a remote Emacs.
902 * Little Disk Space::           You feel that having large setup files is icky.
903 * Slow Machine::                You feel like buying a faster machine.
904
905 Gnus Reference Guide
906
907 * Gnus Utility Functions::      Common functions and variable to use.
908 * Back End Interface::          How Gnus communicates with the servers.
909 * Score File Syntax::           A BNF definition of the score file standard.
910 * Headers::                     How Gnus stores headers internally.
911 * Ranges::                      A handy format for storing mucho numbers.
912 * Group Info::                  The group info format.
913 * Extended Interactive::        Symbolic prefixes and stuff.
914 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
915 * Various File Formats::        Formats of files that Gnus use.
916
917 Back End Interface
918
919 * Required Back End Functions::  Functions that must be implemented.
920 * Optional Back End Functions::  Functions that need not be implemented.
921 * Error Messaging::             How to get messages and report errors.
922 * Writing New Back Ends::       Extending old back ends.
923 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
924 * Mail-like Back Ends::         Some tips on mail back ends.
925
926 Various File Formats
927
928 * Active File Format::          Information on articles and groups available.
929 * Newsgroups File Format::      Group descriptions.
930
931 Emacs for Heathens
932
933 * Keystrokes::                  Entering text and executing commands.
934 * Emacs Lisp::                  The built-in Emacs programming language.
935
936 @end detailmenu
937 @end menu
938
939 @node Starting Up
940 @chapter Starting gnus
941 @cindex starting up
942
943 @kindex M-x gnus
944 @findex gnus
945 If your system administrator has set things up properly, starting gnus
946 and reading news is extremely easy---you just type @kbd{M-x gnus} in
947 your Emacs.
948
949 @findex gnus-other-frame
950 @kindex M-x gnus-other-frame
951 If you want to start gnus in a different frame, you can use the command
952 @kbd{M-x gnus-other-frame} instead.
953
954 If things do not go smoothly at startup, you have to twiddle some
955 variables in your @file{~/.gnus} file.  This file is similar to
956 @file{~/.emacs}, but is read when gnus starts.
957
958 If you puzzle at any terms used in this manual, please refer to the
959 terminology section (@pxref{Terminology}).
960
961 @menu
962 * Finding the News::            Choosing a method for getting news.
963 * The First Time::              What does Gnus do the first time you start it?
964 * The Server is Down::          How can I read my mail then?
965 * Slave Gnusae::                You can have more than one Gnus active at a time.
966 * Fetching a Group::            Starting Gnus just to read a group.
967 * New Groups::                  What is Gnus supposed to do with new groups?
968 * Changing Servers::            You may want to move from one server to another.
969 * Startup Files::               Those pesky startup files---@file{.newsrc}.
970 * Auto Save::                   Recovering from a crash.
971 * The Active File::             Reading the active file over a slow line Takes Time.
972 * Startup Variables::           Other variables you might change.
973 @end menu
974
975
976 @node Finding the News
977 @section Finding the News
978 @cindex finding news
979
980 @vindex gnus-select-method
981 @c @head
982 The @code{gnus-select-method} variable says where gnus should look for
983 news.  This variable should be a list where the first element says
984 @dfn{how} and the second element says @dfn{where}.  This method is your
985 native method.  All groups not fetched with this method are
986 foreign groups.
987
988 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
989 you want to get your daily dosage of news from, you'd say:
990
991 @lisp
992 (setq gnus-select-method '(nntp "news.somewhere.edu"))
993 @end lisp
994
995 If you want to read directly from the local spool, say:
996
997 @lisp
998 (setq gnus-select-method '(nnspool ""))
999 @end lisp
1000
1001 If you can use a local spool, you probably should, as it will almost
1002 certainly be much faster.  But do not use the local spool if your
1003 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1004
1005 @vindex gnus-nntpserver-file
1006 @cindex NNTPSERVER
1007 @cindex @sc{nntp} server
1008 If this variable is not set, gnus will take a look at the
1009 @code{NNTPSERVER} environment variable.  If that variable isn't set,
1010 gnus will see whether @code{gnus-nntpserver-file}
1011 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
1012 that fails as well, gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
1013
1014 @vindex gnus-nntp-server
1015 If @code{gnus-nntp-server} is set, this variable will override
1016 @code{gnus-select-method}.  You should therefore set
1017 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1018
1019 @vindex gnus-secondary-servers
1020 @vindex gnus-nntp-server
1021 You can also make gnus prompt you interactively for the name of an
1022 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
1023 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1024 in the @code{gnus-secondary-servers} list (if any).  You can also just
1025 type in the name of any server you feel like visiting.  (Note that this
1026 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1027 gnus} later in the same Emacs session, Gnus will contact the same
1028 server.)
1029
1030 @findex gnus-group-browse-foreign-server
1031 @kindex B (Group)
1032 However, if you use one @sc{nntp} server regularly and are just
1033 interested in a couple of groups from a different server, you would be
1034 better served by using the @kbd{B} command in the group buffer.  It will
1035 let you have a look at what groups are available, and you can subscribe
1036 to any of the groups you want to.  This also makes @file{.newsrc}
1037 maintenance much tidier.  @xref{Foreign Groups}.
1038
1039 @vindex gnus-secondary-select-methods
1040 @c @head
1041 A slightly different approach to foreign groups is to set the
1042 @code{gnus-secondary-select-methods} variable.  The select methods
1043 listed in this variable are in many ways just as native as the
1044 @code{gnus-select-method} server.  They will also be queried for active
1045 files during startup (if that's required), and new newsgroups that
1046 appear on these servers will be subscribed (or not) just as native
1047 groups are.
1048
1049 For instance, if you use the @code{nnmbox} back end to read your mail,
1050 you would typically set this variable to
1051
1052 @lisp
1053 (setq gnus-secondary-select-methods '((nnmbox "")))
1054 @end lisp
1055
1056
1057 @node The First Time
1058 @section The First Time
1059 @cindex first time usage
1060
1061 If no startup files exist, gnus will try to determine what groups should
1062 be subscribed by default.
1063
1064 @vindex gnus-default-subscribed-newsgroups
1065 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1066 will subscribe you to just those groups in that list, leaving the rest
1067 killed.  Your system administrator should have set this variable to
1068 something useful.
1069
1070 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1071 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1072 here as @dfn{whatever Lars thinks you should read}.)
1073
1074 You'll also be subscribed to the gnus documentation group, which should
1075 help you with most common problems.
1076
1077 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1078 use the normal functions for handling new groups, and not do anything
1079 special.
1080
1081
1082 @node The Server is Down
1083 @section The Server is Down
1084 @cindex server errors
1085
1086 If the default server is down, gnus will understandably have some
1087 problems starting.  However, if you have some mail groups in addition to
1088 the news groups, you may want to start gnus anyway.
1089
1090 Gnus, being the trusting sort of program, will ask whether to proceed
1091 without a native select method if that server can't be contacted.  This
1092 will happen whether the server doesn't actually exist (i.e., you have
1093 given the wrong address) or the server has just momentarily taken ill
1094 for some reason or other.  If you decide to continue and have no foreign
1095 groups, you'll find it difficult to actually do anything in the group
1096 buffer.  But, hey, that's your problem.  Blllrph!
1097
1098 @findex gnus-no-server
1099 @kindex M-x gnus-no-server
1100 @c @head
1101 If you know that the server is definitely down, or you just want to read
1102 your mail without bothering with the server at all, you can use the
1103 @code{gnus-no-server} command to start gnus.  That might come in handy
1104 if you're in a hurry as well.  This command will not attempt to contact
1105 your primary server---instead, it will just activate all groups on level
1106 1 and 2.  (You should preferably keep no native groups on those two
1107 levels.) Also @pxref{Group Levels}.
1108
1109
1110 @node Slave Gnusae
1111 @section Slave Gnusae
1112 @cindex slave
1113
1114 You might want to run more than one Emacs with more than one gnus at the
1115 same time.  If you are using different @file{.newsrc} files (e.g., if you
1116 are using the two different gnusae to read from two different servers),
1117 that is no problem whatsoever.  You just do it.
1118
1119 The problem appears when you want to run two Gnusae that use the same
1120 @code{.newsrc} file.
1121
1122 To work around that problem some, we here at the Think-Tank at the gnus
1123 Towers have come up with a new concept: @dfn{Masters} and
1124 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1125 taken out a copyright on those words.  If you wish to use those words in
1126 conjunction with each other, you have to send $1 per usage instance to
1127 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1128 Applications}) will be much more expensive, of course.)
1129
1130 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1131 however you do it).  Each subsequent slave gnusae should be started with
1132 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1133 files, but instead save @dfn{slave files} that contain information only
1134 on what groups have been read in the slave session.  When a master gnus
1135 starts, it will read (and delete) these slave files, incorporating all
1136 information from them.  (The slave files will be read in the sequence
1137 they were created, so the latest changes will have precedence.)
1138
1139 Information from the slave files has, of course, precedence over the
1140 information in the normal (i.e., master) @code{.newsrc} file.
1141
1142 If the @code{.newsrc*} files have not been saved in the master when the
1143 slave starts, you may be prompted as to whether to read an auto-save
1144 file.  If you answer "yes", the unsaved changes to the master will be
1145 incorporated into the slave.  If you answer "no", the slave may see some
1146 messages as unread that have been read in the master.
1147
1148 @node Fetching a Group
1149 @section Fetching a Group
1150 @cindex fetching a group
1151
1152 @findex gnus-fetch-group
1153 It is sometimes convenient to be able to just say ``I want to read this
1154 group and I don't care whether gnus has been started or not''.  This is
1155 perhaps more useful for people who write code than for users, but the
1156 command @code{gnus-fetch-group} provides this functionality in any case.
1157 It takes the group name as a parameter.
1158
1159
1160 @node New Groups
1161 @section New Groups
1162 @cindex new groups
1163 @cindex subscription
1164
1165 @vindex gnus-check-new-newsgroups
1166 If you are satisfied that you really never want to see any new groups,
1167 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1168 also save you some time at startup.  Even if this variable is
1169 @code{nil}, you can always subscribe to the new groups just by pressing
1170 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1171 is @code{ask-server} by default.  If you set this variable to
1172 @code{always}, then Gnus will query the back ends for new groups even
1173 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1174
1175 @menu
1176 * Checking New Groups::         Determining what groups are new.
1177 * Subscription Methods::        What Gnus should do with new groups.
1178 * Filtering New Groups::        Making Gnus ignore certain new groups.
1179 @end menu
1180
1181
1182 @node Checking New Groups
1183 @subsection Checking New Groups
1184
1185 Gnus normally determines whether a group is new or not by comparing the
1186 list of groups from the active file(s) with the lists of subscribed and
1187 dead groups.  This isn't a particularly fast method.  If
1188 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1189 server for new groups since the last time.  This is both faster and
1190 cheaper.  This also means that you can get rid of the list of killed
1191 groups altogether, so you may set @code{gnus-save-killed-list} to
1192 @code{nil}, which will save time both at startup, at exit, and all over.
1193 Saves disk space, too.  Why isn't this the default, then?
1194 Unfortunately, not all servers support this command.
1195
1196 I bet I know what you're thinking now: How do I find out whether my
1197 server supports @code{ask-server}?  No?  Good, because I don't have a
1198 fail-safe answer.  I would suggest just setting this variable to
1199 @code{ask-server} and see whether any new groups appear within the next
1200 few days.  If any do, then it works.  If none do, then it doesn't
1201 work.  I could write a function to make gnus guess whether the server
1202 supports @code{ask-server}, but it would just be a guess.  So I won't.
1203 You could @code{telnet} to the server and say @code{HELP} and see
1204 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1205 it does, then it might work.  (But there are servers that lists
1206 @samp{NEWGROUPS} without supporting the function properly.)
1207
1208 This variable can also be a list of select methods.  If so, gnus will
1209 issue an @code{ask-server} command to each of the select methods, and
1210 subscribe them (or not) using the normal methods.  This might be handy
1211 if you are monitoring a few servers for new groups.  A side effect is
1212 that startup will take much longer, so you can meditate while waiting.
1213 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1214
1215
1216 @node Subscription Methods
1217 @subsection Subscription Methods
1218
1219 @vindex gnus-subscribe-newsgroup-method
1220 What gnus does when it encounters a new group is determined by the
1221 @code{gnus-subscribe-newsgroup-method} variable.
1222
1223 This variable should contain a function.  This function will be called
1224 with the name of the new group as the only parameter.
1225
1226 Some handy pre-fab functions are:
1227
1228 @table @code
1229
1230 @item gnus-subscribe-zombies
1231 @vindex gnus-subscribe-zombies
1232 Make all new groups zombies.  This is the default.  You can browse the
1233 zombies later (with @kbd{A z}) and either kill them all off properly
1234 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1235
1236 @item gnus-subscribe-randomly
1237 @vindex gnus-subscribe-randomly
1238 Subscribe all new groups in arbitrary order.  This really means that all
1239 new groups will be added at ``the top'' of the group buffer.
1240
1241 @item gnus-subscribe-alphabetically
1242 @vindex gnus-subscribe-alphabetically
1243 Subscribe all new groups in alphabetical order.
1244
1245 @item gnus-subscribe-hierarchically
1246 @vindex gnus-subscribe-hierarchically
1247 Subscribe all new groups hierarchically.  The difference between this
1248 function and @code{gnus-subscribe-alphabetically} is slight.
1249 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1250 alphabetical fashion, while this function will enter groups into its
1251 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1252 @samp{comp} hierarchy, this function will not mess that configuration
1253 up.  Or something like that.
1254
1255 @item gnus-subscribe-interactively
1256 @vindex gnus-subscribe-interactively
1257 Subscribe new groups interactively.  This means that gnus will ask
1258 you about @strong{all} new groups.  The groups you choose to subscribe
1259 to will be subscribed hierarchically.
1260
1261 @item gnus-subscribe-killed
1262 @vindex gnus-subscribe-killed
1263 Kill all new groups.
1264
1265 @item gnus-subscribe-topics
1266 @vindex gnus-subscribe-topics
1267 Put the groups into the topic that has a matching @code{subscribe} topic
1268 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1269 topic parameter that looks like
1270
1271 @example
1272 "nnslashdot"
1273 @end example
1274
1275 will mean that all groups that match that regex will be subscribed under
1276 that topic.
1277
1278 If no topics match the groups, the groups will be subscribed in the
1279 top-level topic.
1280
1281 @end table
1282
1283 @vindex gnus-subscribe-hierarchical-interactive
1284 A closely related variable is
1285 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1286 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1287 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1288 will ask you for each sub-hierarchy whether you want to descend the
1289 hierarchy or not.
1290
1291 One common mistake is to set the variable a few paragraphs above
1292 (@code{gnus-subscribe-newsgroup-method}) to
1293 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1294 will not work.  This is ga-ga.  So don't do it.
1295
1296
1297 @node Filtering New Groups
1298 @subsection Filtering New Groups
1299
1300 A nice and portable way to control which new newsgroups should be
1301 subscribed (or ignored) is to put an @dfn{options} line at the start of
1302 the @file{.newsrc} file.  Here's an example:
1303
1304 @example
1305 options -n !alt.all !rec.all sci.all
1306 @end example
1307
1308 @vindex gnus-subscribe-options-newsgroup-method
1309 This line obviously belongs to a serious-minded intellectual scientific
1310 person (or she may just be plain old boring), because it says that all
1311 groups that have names beginning with @samp{alt} and @samp{rec} should
1312 be ignored, and all groups with names beginning with @samp{sci} should
1313 be subscribed.  Gnus will not use the normal subscription method for
1314 subscribing these groups.
1315 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1316 variable defaults to @code{gnus-subscribe-alphabetically}.
1317
1318 @vindex gnus-options-not-subscribe
1319 @vindex gnus-options-subscribe
1320 If you don't want to mess with your @file{.newsrc} file, you can just
1321 set the two variables @code{gnus-options-subscribe} and
1322 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1323 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1324 and if the new group matches the former, it will be unconditionally
1325 subscribed, and if it matches the latter, it will be ignored.
1326
1327 @vindex gnus-auto-subscribed-groups
1328 Yet another variable that meddles here is
1329 @code{gnus-auto-subscribed-groups}.  It works exactly like
1330 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1331 thought it would be nice to have two of these.  This variable is more
1332 meant for setting some ground rules, while the other variable is used
1333 more for user fiddling.  By default this variable makes all new groups
1334 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1335 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1336 subscribed.  If you don't like that, just set this variable to
1337 @code{nil}.
1338
1339 New groups that match this regexp are subscribed using
1340 @code{gnus-subscribe-options-newsgroup-method}.
1341
1342
1343 @node Changing Servers
1344 @section Changing Servers
1345 @cindex changing servers
1346
1347 Sometimes it is necessary to move from one @sc{nntp} server to another.
1348 This happens very rarely, but perhaps you change jobs, or one server is
1349 very flaky and you want to use another.
1350
1351 Changing the server is pretty easy, right?  You just change
1352 @code{gnus-select-method} to point to the new server?
1353
1354 @emph{Wrong!}
1355
1356 Article numbers are not (in any way) kept synchronized between different
1357 @sc{nntp} servers, and the only way Gnus keeps track of what articles
1358 you have read is by keeping track of article numbers.  So when you
1359 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1360 worthless.
1361
1362 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1363 file from one server to another.  They all have one thing in
1364 common---they take a looong time to run.  You don't want to use these
1365 functions more than absolutely necessary.
1366
1367 @kindex M-x gnus-change-server
1368 @findex gnus-change-server
1369 If you have access to both servers, Gnus can request the headers for all
1370 the articles you have read and compare @code{Message-ID}s and map the
1371 article numbers of the read articles and article marks.  The @kbd{M-x
1372 gnus-change-server} command will do this for all your native groups.  It
1373 will prompt for the method you want to move to.
1374
1375 @kindex M-x gnus-group-move-group-to-server
1376 @findex gnus-group-move-group-to-server
1377 You can also move individual groups with the @kbd{M-x
1378 gnus-group-move-group-to-server} command.  This is useful if you want to
1379 move a (foreign) group from one server to another.
1380
1381 @kindex M-x gnus-group-clear-data-on-native-groups
1382 @findex gnus-group-clear-data-on-native-groups
1383 If you don't have access to both the old and new server, all your marks
1384 and read ranges have become worthless.  You can use the @kbd{M-x
1385 gnus-group-clear-data-on-native-groups} command to clear out all data
1386 that you have on your native groups.  Use with caution.
1387
1388 @kindex M-x gnus-group-clear-data
1389 @findex gnus-group-clear-data
1390 Clear the data from the current group only---nix out marks and the
1391 list of read articles (@code{gnus-group-clear-data}).
1392
1393 After changing servers, you @strong{must} move the cache hierarchy away,
1394 since the cached articles will have wrong article numbers, which will
1395 affect which articles Gnus thinks are read.
1396 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1397 to have it done automatically; for @code{gnus-group-clear-data}, you
1398 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1399 cache for all groups).
1400
1401
1402 @node Startup Files
1403 @section Startup Files
1404 @cindex startup files
1405 @cindex .newsrc
1406 @cindex .newsrc.el
1407 @cindex .newsrc.eld
1408
1409 Now, you all know about the @file{.newsrc} file.  All subscription
1410 information is traditionally stored in this file.
1411
1412 Things got a bit more complicated with @sc{gnus}.  In addition to
1413 keeping the @file{.newsrc} file updated, it also used a file called
1414 @file{.newsrc.el} for storing all the information that didn't fit into
1415 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1416 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1417 files was the most recently saved, which enabled people to swap between
1418 @sc{gnus} and other newsreaders.
1419
1420 That was kinda silly, so Gnus went one better: In addition to the
1421 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1422 @file{.newsrc.eld}.  It will read whichever of these files that are most
1423 recent, but it will never write a @file{.newsrc.el} file.  You should
1424 never delete the @file{.newsrc.eld} file---it contains much information
1425 not stored in the @file{.newsrc} file.
1426
1427 @vindex gnus-save-newsrc-file
1428 @vindex gnus-read-newsrc-file
1429 You can turn off writing the @file{.newsrc} file by setting
1430 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1431 the file and save some space, as well as exiting from gnus faster.
1432 However, this will make it impossible to use other newsreaders than
1433 gnus.  But hey, who would want to, right?  Similarly, setting
1434 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1435 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1436 convenient if you have a tendency to use Netscape once in a while.
1437
1438 @vindex gnus-save-killed-list
1439 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1440 will not save the list of killed groups to the startup file.  This will
1441 save both time (when starting and quitting) and space (on disk).  It
1442 will also mean that Gnus has no record of what groups are new or old,
1443 so the automatic new groups subscription methods become meaningless.
1444 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1445 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1446 Groups}).  This variable can also be a regular expression.  If that's
1447 the case, remove all groups that do not match this regexp before
1448 saving.  This can be useful in certain obscure situations that involve
1449 several servers where not all servers support @code{ask-server}.
1450
1451 @vindex gnus-startup-file
1452 The @code{gnus-startup-file} variable says where the startup files are.
1453 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1454 file being whatever that one is, with a @samp{.eld} appended.
1455
1456 @vindex gnus-save-newsrc-hook
1457 @vindex gnus-save-quick-newsrc-hook
1458 @vindex gnus-save-standard-newsrc-hook
1459 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1460 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1461 saving the @file{.newsrc.eld} file, and
1462 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1463 @file{.newsrc} file.  The latter two are commonly used to turn version
1464 control on or off.  Version control is on by default when saving the
1465 startup files.  If you want to turn backup creation off, say something like:
1466
1467 @lisp
1468 (defun turn-off-backup ()
1469   (set (make-local-variable 'backup-inhibited) t))
1470
1471 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1472 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1473 @end lisp
1474
1475 @vindex gnus-init-file
1476 @vindex gnus-site-init-file
1477 When gnus starts, it will read the @code{gnus-site-init-file}
1478 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1479 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1480 and can be used to avoid cluttering your @file{~/.emacs} and
1481 @file{site-init} files with gnus stuff.  Gnus will also check for files
1482 with the same names as these, but with @file{.elc} and @file{.el}
1483 suffixes.  In other words, if you have set @code{gnus-init-file} to
1484 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1485 and finally @file{~/.gnus} (in this order).
1486
1487
1488
1489 @node Auto Save
1490 @section Auto Save
1491 @cindex dribble file
1492 @cindex auto-save
1493
1494 Whenever you do something that changes the gnus data (reading articles,
1495 catching up, killing/subscribing groups), the change is added to a
1496 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1497 Emacs way.  If your Emacs should crash before you have saved the
1498 @file{.newsrc} files, all changes you have made can be recovered from
1499 this file.
1500
1501 If gnus detects this file at startup, it will ask the user whether to
1502 read it.  The auto save file is deleted whenever the real startup file is
1503 saved.
1504
1505 @vindex gnus-use-dribble-file
1506 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1507 maintain a dribble buffer.  The default is @code{t}.
1508
1509 @vindex gnus-dribble-directory
1510 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1511 this variable is @code{nil}, which it is by default, gnus will dribble
1512 into the directory where the @file{.newsrc} file is located.  (This is
1513 normally the user's home directory.)  The dribble file will get the same
1514 file permissions as the @code{.newsrc} file.
1515
1516 @vindex gnus-always-read-dribble-file
1517 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1518 read the dribble file on startup without querying the user.
1519
1520
1521 @node The Active File
1522 @section The Active File
1523 @cindex active file
1524 @cindex ignored groups
1525
1526 When gnus starts, or indeed whenever it tries to determine whether new
1527 articles have arrived, it reads the active file.  This is a very large
1528 file that lists all the active groups and articles on the server.
1529
1530 @vindex gnus-ignored-newsgroups
1531 Before examining the active file, gnus deletes all lines that match the
1532 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1533 any groups with bogus names, but you can use this variable to make gnus
1534 ignore hierarchies you aren't ever interested in.  However, this is not
1535 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1536 Groups} for an overview of other variables that can be used instead.
1537
1538 @c This variable is
1539 @c @code{nil} by default, and will slow down active file handling somewhat
1540 @c if you set it to anything else.
1541
1542 @vindex gnus-read-active-file
1543 @c @head
1544 The active file can be rather Huge, so if you have a slow network, you
1545 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1546 reading the active file.  This variable is @code{some} by default.
1547
1548 Gnus will try to make do by getting information just on the groups that
1549 you actually subscribe to.
1550
1551 Note that if you subscribe to lots and lots of groups, setting this
1552 variable to @code{nil} will probably make gnus slower, not faster.  At
1553 present, having this variable @code{nil} will slow gnus down
1554 considerably, unless you read news over a 2400 baud modem.
1555
1556 This variable can also have the value @code{some}.  Gnus will then
1557 attempt to read active info only on the subscribed groups.  On some
1558 servers this is quite fast (on sparkling, brand new INN servers that
1559 support the @code{LIST ACTIVE group} command), on others this isn't fast
1560 at all.  In any case, @code{some} should be faster than @code{nil}, and
1561 is certainly faster than @code{t} over slow lines.
1562
1563 Some news servers (old versions of Leafnode and old versions of INN, for
1564 instance) do not support the @code{LIST ACTIVE group}.  For these
1565 servers, @code{nil} is probably the most efficient value for this
1566 variable.
1567
1568 If this variable is @code{nil}, gnus will ask for group info in total
1569 lock-step, which isn't very fast.  If it is @code{some} and you use an
1570 @sc{nntp} server, gnus will pump out commands as fast as it can, and
1571 read all the replies in one swoop.  This will normally result in better
1572 performance, but if the server does not support the aforementioned
1573 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1574
1575 If you think that starting up Gnus takes too long, try all the three
1576 different values for this variable and see what works best for you.
1577
1578 In any case, if you use @code{some} or @code{nil}, you should definitely
1579 kill all groups that you aren't interested in to speed things up.
1580
1581 Note that this variable also affects active file retrieval from
1582 secondary select methods.
1583
1584
1585 @node Startup Variables
1586 @section Startup Variables
1587
1588 @table @code
1589
1590 @item gnus-load-hook
1591 @vindex gnus-load-hook
1592 A hook run while gnus is being loaded.  Note that this hook will
1593 normally be run just once in each Emacs session, no matter how many
1594 times you start gnus.
1595
1596 @item gnus-before-startup-hook
1597 @vindex gnus-before-startup-hook
1598 A hook run after starting up gnus successfully.
1599
1600 @item gnus-startup-hook
1601 @vindex gnus-startup-hook
1602 A hook run as the very last thing after starting up gnus
1603
1604 @item gnus-started-hook
1605 @vindex gnus-started-hook
1606 A hook that is run as the very last thing after starting up gnus
1607 successfully.
1608
1609 @item gnus-setup-news-hook
1610 @vindex gnus-setup-news-hook
1611 A hook that is run after reading the @file{.newsrc} file(s), but before
1612 generating the group buffer.
1613
1614 @item gnus-check-bogus-newsgroups
1615 @vindex gnus-check-bogus-newsgroups
1616 If non-@code{nil}, gnus will check for and delete all bogus groups at
1617 startup.  A @dfn{bogus group} is a group that you have in your
1618 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1619 bogus groups can take quite a while, so to save time and resources it's
1620 best to leave this option off, and do the checking for bogus groups once
1621 in a while from the group buffer instead (@pxref{Group Maintenance}).
1622
1623 @item gnus-inhibit-startup-message
1624 @vindex gnus-inhibit-startup-message
1625 If non-@code{nil}, the startup message won't be displayed.  That way,
1626 your boss might not notice as easily that you are reading news instead
1627 of doing your job.  Note that this variable is used before
1628 @file{.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1629
1630 @item gnus-no-groups-message
1631 @vindex gnus-no-groups-message
1632 Message displayed by gnus when no groups are available.
1633
1634 @item gnus-play-startup-jingle
1635 @vindex gnus-play-startup-jingle
1636 If non-@code{nil}, play the gnus jingle at startup.
1637
1638 @item gnus-startup-jingle
1639 @vindex gnus-startup-jingle
1640 Jingle to be played if the above variable is non-@code{nil}.  The
1641 default is @samp{Tuxedomoon.Jingle4.au}.
1642
1643 @end table
1644
1645
1646 @node Group Buffer
1647 @chapter Group Buffer
1648 @cindex group buffer
1649
1650 @c Alex Schroeder suggests to rearrange this as follows:
1651 @c
1652 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1653 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1654 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1655 @c   7. Group Score, 8. Group Buffer Format
1656 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1657 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1658 @c <kensanata> First, "Gnus considers groups... (default 9)."
1659 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1660 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1661 @c <kensanata> Then expand the next paragraph or add some more to it.
1662 @c    This short one sentence explains levels 1 and 2, therefore I understand
1663 @c    that I should keep important news at 3 and boring news at 4.
1664 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1665 @c    Maybe keep those that you don't want to read temporarily at 6,
1666 @c    those that you never want to read at 8, those that offend your
1667 @c    human rights at 9...
1668
1669
1670 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1671 is the first buffer shown when gnus starts, and will never be killed as
1672 long as gnus is active.
1673
1674 @iftex
1675 @iflatex
1676 \gnusfigure{The Group Buffer}{320}{
1677 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1678 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1679 \put(120,38){\vector(1,2){10}}
1680 \put(40,60){\makebox(0,0)[r]{Mode line}}
1681 \put(40,58){\vector(1,0){30}}
1682 \put(200,28){\makebox(0,0)[t]{Native select method}}
1683 \put(200,26){\vector(-1,2){15}}
1684 }
1685 @end iflatex
1686 @end iftex
1687
1688 @menu
1689 * Group Buffer Format::         Information listed and how you can change it.
1690 * Group Maneuvering::           Commands for moving in the group buffer.
1691 * Selecting a Group::           Actually reading news.
1692 * Subscription Commands::       Unsubscribing, killing, subscribing.
1693 * Group Data::                  Changing the info for a group.
1694 * Group Levels::                Levels? What are those, then?
1695 * Group Score::                 A mechanism for finding out what groups you like.
1696 * Marking Groups::              You can mark groups for later processing.
1697 * Foreign Groups::              Creating and editing groups.
1698 * Group Parameters::            Each group may have different parameters set.
1699 * Listing Groups::              Gnus can list various subsets of the groups.
1700 * Sorting Groups::              Re-arrange the group order.
1701 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1702 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1703 * Exiting Gnus::                Stop reading news and get some work done.
1704 * Group Topics::                A folding group mode divided into topics.
1705 * Misc Group Stuff::            Other stuff that you can to do.
1706 @end menu
1707
1708
1709 @node Group Buffer Format
1710 @section Group Buffer Format
1711
1712 @menu
1713 * Group Line Specification::    Deciding how the group buffer is to look.
1714 * Group Modeline Specification::  The group buffer modeline.
1715 * Group Highlighting::          Having nice colors in the group buffer.
1716 @end menu
1717
1718
1719 @node Group Line Specification
1720 @subsection Group Line Specification
1721 @cindex group buffer format
1722
1723 The default format of the group buffer is nice and dull, but you can
1724 make it as exciting and ugly as you feel like.
1725
1726 Here's a couple of example group lines:
1727
1728 @example
1729      25: news.announce.newusers
1730  *    0: alt.fan.andrea-dworkin
1731 @end example
1732
1733 Quite simple, huh?
1734
1735 You can see that there are 25 unread articles in
1736 @samp{news.announce.newusers}.  There are no unread articles, but some
1737 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1738 asterisk at the beginning of the line?).
1739
1740 @vindex gnus-group-line-format
1741 You can change that format to whatever you want by fiddling with the
1742 @code{gnus-group-line-format} variable.  This variable works along the
1743 lines of a @code{format} specification, which is pretty much the same as
1744 a @code{printf} specifications, for those of you who use (feh!) C.
1745 @xref{Formatting Variables}.
1746
1747 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1748
1749 There should always be a colon on the line; the cursor always moves to
1750 the colon after performing an operation.  @xref{Positioning
1751 Point}. Nothing else is required---not even the group name.  All
1752 displayed text is just window dressing, and is never examined by Gnus.
1753 Gnus stores all real information it needs using text properties.
1754
1755 (Note that if you make a really strange, wonderful, spreadsheet-like
1756 layout, everybody will believe you are hard at work with the accounting
1757 instead of wasting time reading news.)
1758
1759 Here's a list of all available format characters:
1760
1761 @table @samp
1762
1763 @item M
1764 An asterisk if the group only has marked articles.
1765
1766 @item S
1767 Whether the group is subscribed.
1768
1769 @item L
1770 Level of subscribedness.
1771
1772 @item N
1773 Number of unread articles.
1774
1775 @item I
1776 Number of dormant articles.
1777
1778 @item T
1779 Number of ticked articles.
1780
1781 @item R
1782 Number of read articles.
1783
1784 @item U
1785 Number of unseen articles.
1786
1787 @item t
1788 Estimated total number of articles.  (This is really @var{max-number}
1789 minus @var{min-number} plus 1.)
1790
1791 Gnus uses this estimation because the @sc{nntp} protocol provides
1792 efficient access to @var{max-number} and @var{min-number} but getting
1793 the true unread message count is not possible efficiently.  For
1794 hysterical raisins, even the mail back ends, where the true number of
1795 unread messages might be available efficiently, use the same limited
1796 interface.  To remove this restriction from Gnus means that the back
1797 end interface has to be changed, which is not an easy job.  If you
1798 want to work on this, please contact the Gnus mailing list.
1799
1800 @item y
1801 Number of unread, unticked, non-dormant articles.
1802
1803 @item i
1804 Number of ticked and dormant articles.
1805
1806 @item g
1807 Full group name.
1808
1809 @item G
1810 Group name.
1811
1812 @item C
1813 Group comment (@pxref{Group Parameters}) or group name if there is no
1814 comment element in the group parameters.
1815
1816 @item D
1817 Newsgroup description.
1818
1819 @item o
1820 @samp{m} if moderated.
1821
1822 @item O
1823 @samp{(m)} if moderated.
1824
1825 @item s
1826 Select method.
1827
1828 @item B
1829 If the summary buffer for the group is open or not.
1830
1831 @item n
1832 Select from where.
1833
1834 @item z
1835 A string that looks like @samp{<%s:%n>} if a foreign select method is
1836 used.
1837
1838 @item P
1839 Indentation based on the level of the topic (@pxref{Group Topics}).
1840
1841 @item c
1842 @vindex gnus-group-uncollapsed-levels
1843 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1844 variable says how many levels to leave at the end of the group name.
1845 The default is 1---this will mean that group names like
1846 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1847
1848 @item m
1849 @vindex gnus-new-mail-mark
1850 @cindex %
1851 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1852 the group lately.
1853
1854 @item p
1855 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1856
1857 @item d
1858 A string that says when you last read the group (@pxref{Group
1859 Timestamp}).
1860
1861 @item u
1862 User defined specifier.  The next character in the format string should
1863 be a letter.  Gnus will call the function
1864 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1865 following @samp{%u}.  The function will be passed a single dummy
1866 parameter as argument.  The function should return a string, which will
1867 be inserted into the buffer just like information from any other
1868 specifier.
1869 @end table
1870
1871 @cindex *
1872 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1873 if no info is available---for instance, if it is a non-activated foreign
1874 group, or a bogus native group.
1875
1876
1877 @node Group Modeline Specification
1878 @subsection Group Modeline Specification
1879 @cindex group modeline
1880
1881 @vindex gnus-group-mode-line-format
1882 The mode line can be changed by setting
1883 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1884 doesn't understand that many format specifiers:
1885
1886 @table @samp
1887 @item S
1888 The native news server.
1889 @item M
1890 The native select method.
1891 @end table
1892
1893
1894 @node Group Highlighting
1895 @subsection Group Highlighting
1896 @cindex highlighting
1897 @cindex group highlighting
1898
1899 @vindex gnus-group-highlight
1900 Highlighting in the group buffer is controlled by the
1901 @code{gnus-group-highlight} variable.  This is an alist with elements
1902 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1903 something non-@code{nil}, the @var{face} will be used on the line.
1904
1905 Here's an example value for this variable that might look nice if the
1906 background is dark:
1907
1908 @lisp
1909 (cond (window-system
1910        (setq custom-background-mode 'light)
1911        (defface my-group-face-1
1912          '((t (:foreground "Red" :bold t))) "First group face")
1913        (defface my-group-face-2
1914          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1915        (defface my-group-face-3
1916          '((t (:foreground "Green4" :bold t))) "Third group face")
1917        (defface my-group-face-4
1918          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1919        (defface my-group-face-5
1920          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1921
1922 (setq gnus-group-highlight
1923       '(((> unread 200) . my-group-face-1)
1924         ((and (< level 3) (zerop unread)) . my-group-face-2)
1925         ((< level 3) . my-group-face-3)
1926         ((zerop unread) . my-group-face-4)
1927         (t . my-group-face-5)))
1928 @end lisp
1929
1930 Also @pxref{Faces and Fonts}.
1931
1932 Variables that are dynamically bound when the forms are evaluated
1933 include:
1934
1935 @table @code
1936 @item group
1937 The group name.
1938 @item unread
1939 The number of unread articles in the group.
1940 @item method
1941 The select method.
1942 @item mailp
1943 Whether the group is a mail group.
1944 @item level
1945 The level of the group.
1946 @item score
1947 The score of the group.
1948 @item ticked
1949 The number of ticked articles in the group.
1950 @item total
1951 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1952 MIN-NUMBER plus one.
1953 @item topic
1954 When using the topic minor mode, this variable is bound to the current
1955 topic being inserted.
1956 @end table
1957
1958 When the forms are @code{eval}ed, point is at the beginning of the line
1959 of the group in question, so you can use many of the normal gnus
1960 functions for snarfing info on the group.
1961
1962 @vindex gnus-group-update-hook
1963 @findex gnus-group-highlight-line
1964 @code{gnus-group-update-hook} is called when a group line is changed.
1965 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1966 calls @code{gnus-group-highlight-line} by default.
1967
1968
1969 @node Group Maneuvering
1970 @section Group Maneuvering
1971 @cindex group movement
1972
1973 All movement commands understand the numeric prefix and will behave as
1974 expected, hopefully.
1975
1976 @table @kbd
1977
1978 @item n
1979 @kindex n (Group)
1980 @findex gnus-group-next-unread-group
1981 Go to the next group that has unread articles
1982 (@code{gnus-group-next-unread-group}).
1983
1984 @item p
1985 @itemx DEL
1986 @kindex DEL (Group)
1987 @kindex p (Group)
1988 @findex gnus-group-prev-unread-group
1989 Go to the previous group that has unread articles
1990 (@code{gnus-group-prev-unread-group}).
1991
1992 @item N
1993 @kindex N (Group)
1994 @findex gnus-group-next-group
1995 Go to the next group (@code{gnus-group-next-group}).
1996
1997 @item P
1998 @kindex P (Group)
1999 @findex gnus-group-prev-group
2000 Go to the previous group (@code{gnus-group-prev-group}).
2001
2002 @item M-n
2003 @kindex M-n (Group)
2004 @findex gnus-group-next-unread-group-same-level
2005 Go to the next unread group on the same (or lower) level
2006 (@code{gnus-group-next-unread-group-same-level}).
2007
2008 @item M-p
2009 @kindex M-p (Group)
2010 @findex gnus-group-prev-unread-group-same-level
2011 Go to the previous unread group on the same (or lower) level
2012 (@code{gnus-group-prev-unread-group-same-level}).
2013 @end table
2014
2015 Three commands for jumping to groups:
2016
2017 @table @kbd
2018
2019 @item j
2020 @kindex j (Group)
2021 @findex gnus-group-jump-to-group
2022 Jump to a group (and make it visible if it isn't already)
2023 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2024 like living groups.
2025
2026 @item ,
2027 @kindex , (Group)
2028 @findex gnus-group-best-unread-group
2029 Jump to the unread group with the lowest level
2030 (@code{gnus-group-best-unread-group}).
2031
2032 @item .
2033 @kindex . (Group)
2034 @findex gnus-group-first-unread-group
2035 Jump to the first group with unread articles
2036 (@code{gnus-group-first-unread-group}).
2037 @end table
2038
2039 @vindex gnus-group-goto-unread
2040 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2041 commands will move to the next group, not the next unread group.  Even
2042 the commands that say they move to the next unread group.  The default
2043 is @code{t}.
2044
2045
2046 @node Selecting a Group
2047 @section Selecting a Group
2048 @cindex group selection
2049
2050 @table @kbd
2051
2052 @item SPACE
2053 @kindex SPACE (Group)
2054 @findex gnus-group-read-group
2055 Select the current group, switch to the summary buffer and display the
2056 first unread article (@code{gnus-group-read-group}).  If there are no
2057 unread articles in the group, or if you give a non-numerical prefix to
2058 this command, gnus will offer to fetch all the old articles in this
2059 group from the server.  If you give a numerical prefix @var{N}, @var{N}
2060 determines the number of articles gnus will fetch.  If @var{N} is
2061 positive, gnus fetches the @var{N} newest articles, if @var{N} is
2062 negative, Gnus fetches the @code{abs(@var{N})} oldest articles.
2063
2064 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2065 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2066 - 4 2 SPC} fetches the 42 oldest ones.
2067
2068 When you are in the group (in the Summary buffer), you can type
2069 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2070 ones.
2071
2072 @item RET
2073 @kindex RET (Group)
2074 @findex gnus-group-select-group
2075 Select the current group and switch to the summary buffer
2076 (@code{gnus-group-select-group}).  Takes the same arguments as
2077 @code{gnus-group-read-group}---the only difference is that this command
2078 does not display the first unread article automatically upon group
2079 entry.
2080
2081 @item M-RET
2082 @kindex M-RET (Group)
2083 @findex gnus-group-quick-select-group
2084 This does the same as the command above, but tries to do it with the
2085 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2086 scoring/killing will be performed, there will be no highlights and no
2087 expunging.  This might be useful if you're in a real hurry and have to
2088 enter some humongous group.  If you give a 0 prefix to this command
2089 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2090 which is useful if you want to toggle threading before generating the
2091 summary buffer (@pxref{Summary Generation Commands}).
2092
2093 @item M-SPACE
2094 @kindex M-SPACE (Group)
2095 @findex gnus-group-visible-select-group
2096 This is yet one more command that does the same as the @kbd{RET}
2097 command, but this one does it without expunging and hiding dormants
2098 (@code{gnus-group-visible-select-group}).
2099
2100 @item C-M-RET
2101 @kindex C-M-RET (Group)
2102 @findex gnus-group-select-group-ephemerally
2103 Finally, this command selects the current group ephemerally without
2104 doing any processing of its contents
2105 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2106 turned off.  Everything you do in the group after selecting it in this
2107 manner will have no permanent effects.
2108
2109 @end table
2110
2111 @vindex gnus-large-newsgroup
2112 The @code{gnus-large-newsgroup} variable says what gnus should consider
2113 to be a big group.  This is 200 by default.  If the group has more
2114 (unread and/or ticked) articles than this, gnus will query the user
2115 before entering the group.  The user can then specify how many articles
2116 should be fetched from the server.  If the user specifies a negative
2117 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2118 is positive, the @code{n} articles that have arrived most recently will
2119 be fetched.
2120
2121 @vindex gnus-select-group-hook
2122 @vindex gnus-auto-select-first
2123 @vindex gnus-auto-select-subject
2124 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2125 automatically when entering a group with the @kbd{SPACE} command.
2126 Which article this is is controlled by the
2127 @code{gnus-auto-select-subject} variable.  Valid values for this
2128 variable is:
2129
2130 @table @code
2131
2132 @item unread
2133 Place point on the subject line of the first unread article.
2134
2135 @item first
2136 Place point on the subject line of the first article.
2137
2138 @item unseen
2139 Place point on the subject line of the first unseen article.
2140
2141 @item unseen-or-unread
2142 Place point on the subject line of the first unseen article, and if
2143 there is no such article, place point on the subject line of the first
2144 unread article.
2145
2146 @item best
2147 Place point on the subject line of the highest-scored unread article.
2148
2149 @end table
2150
2151 This variable can also be a function.  In that case, that function
2152 will be called to place point on a subject line.
2153
2154 If you want to prevent automatic selection in some group (say, in a
2155 binary group with Huge articles) you can set the
2156 @code{gnus-auto-select-first} variable to @code{nil} in
2157 @code{gnus-select-group-hook}, which is called when a group is
2158 selected.
2159
2160
2161 @node Subscription Commands
2162 @section Subscription Commands
2163 @cindex subscription
2164
2165 @table @kbd
2166
2167 @item S t
2168 @itemx u
2169 @kindex S t (Group)
2170 @kindex u (Group)
2171 @findex gnus-group-unsubscribe-current-group
2172 @c @icon{gnus-group-unsubscribe}
2173 Toggle subscription to the current group
2174 (@code{gnus-group-unsubscribe-current-group}).
2175
2176 @item S s
2177 @itemx U
2178 @kindex S s (Group)
2179 @kindex U (Group)
2180 @findex gnus-group-unsubscribe-group
2181 Prompt for a group to subscribe, and then subscribe it.  If it was
2182 subscribed already, unsubscribe it instead
2183 (@code{gnus-group-unsubscribe-group}).
2184
2185 @item S k
2186 @itemx C-k
2187 @kindex S k (Group)
2188 @kindex C-k (Group)
2189 @findex gnus-group-kill-group
2190 @c @icon{gnus-group-kill-group}
2191 Kill the current group (@code{gnus-group-kill-group}).
2192
2193 @item S y
2194 @itemx C-y
2195 @kindex S y (Group)
2196 @kindex C-y (Group)
2197 @findex gnus-group-yank-group
2198 Yank the last killed group (@code{gnus-group-yank-group}).
2199
2200 @item C-x C-t
2201 @kindex C-x C-t (Group)
2202 @findex gnus-group-transpose-groups
2203 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2204 really a subscription command, but you can use it instead of a
2205 kill-and-yank sequence sometimes.
2206
2207 @item S w
2208 @itemx C-w
2209 @kindex S w (Group)
2210 @kindex C-w (Group)
2211 @findex gnus-group-kill-region
2212 Kill all groups in the region (@code{gnus-group-kill-region}).
2213
2214 @item S z
2215 @kindex S z (Group)
2216 @findex gnus-group-kill-all-zombies
2217 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2218
2219 @item S C-k
2220 @kindex S C-k (Group)
2221 @findex gnus-group-kill-level
2222 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2223 These groups can't be yanked back after killing, so this command should
2224 be used with some caution.  The only time where this command comes in
2225 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2226 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2227 kill off all unsubscribed groups that do not have message numbers in the
2228 @file{.newsrc} file.
2229
2230 @end table
2231
2232 Also @pxref{Group Levels}.
2233
2234
2235 @node Group Data
2236 @section Group Data
2237
2238 @table @kbd
2239
2240 @item c
2241 @kindex c (Group)
2242 @findex gnus-group-catchup-current
2243 @vindex gnus-group-catchup-group-hook
2244 @c @icon{gnus-group-catchup-current}
2245 Mark all unticked articles in this group as read
2246 (@code{gnus-group-catchup-current}).
2247 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2248 the group buffer.
2249
2250 @item C
2251 @kindex C (Group)
2252 @findex gnus-group-catchup-current-all
2253 Mark all articles in this group, even the ticked ones, as read
2254 (@code{gnus-group-catchup-current-all}).
2255
2256 @item M-c
2257 @kindex M-c (Group)
2258 @findex gnus-group-clear-data
2259 Clear the data from the current group---nix out marks and the list of
2260 read articles (@code{gnus-group-clear-data}).
2261
2262 @item M-x gnus-group-clear-data-on-native-groups
2263 @kindex M-x gnus-group-clear-data-on-native-groups
2264 @findex gnus-group-clear-data-on-native-groups
2265 If you have switched from one @sc{nntp} server to another, all your marks
2266 and read ranges have become worthless.  You can use this command to
2267 clear out all data that you have on your native groups.  Use with
2268 caution.
2269
2270 @end table
2271
2272
2273 @node Group Levels
2274 @section Group Levels
2275 @cindex group level
2276 @cindex level
2277
2278 All groups have a level of @dfn{subscribedness}.  For instance, if a
2279 group is on level 2, it is more subscribed than a group on level 5.  You
2280 can ask gnus to just list groups on a given level or lower
2281 (@pxref{Listing Groups}), or to just check for new articles in groups on
2282 a given level or lower (@pxref{Scanning New Messages}).
2283
2284 Remember:  The higher the level of the group, the less important it is.
2285
2286 @table @kbd
2287
2288 @item S l
2289 @kindex S l (Group)
2290 @findex gnus-group-set-current-level
2291 Set the level of the current group.  If a numeric prefix is given, the
2292 next @var{n} groups will have their levels set.  The user will be
2293 prompted for a level.
2294 @end table
2295
2296 @vindex gnus-level-killed
2297 @vindex gnus-level-zombie
2298 @vindex gnus-level-unsubscribed
2299 @vindex gnus-level-subscribed
2300 Gnus considers groups from levels 1 to
2301 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2302 @code{gnus-level-subscribed} (exclusive) and
2303 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2304 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2305 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2306 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2307 same, but zombie and killed groups have no information on what articles
2308 you have read, etc, stored.  This distinction between dead and living
2309 groups isn't done because it is nice or clever, it is done purely for
2310 reasons of efficiency.
2311
2312 It is recommended that you keep all your mail groups (if any) on quite
2313 low levels (e.g. 1 or 2).
2314
2315 Maybe the following description of the default behavior of Gnus helps to
2316 understand what these levels are all about.  By default, Gnus shows you
2317 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2318 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2319 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2320 groups are hidden, in a way.
2321
2322 Zombie and killed groups are similar to unsubscribed groups in that they
2323 are hidden by default.  But they are different from subscribed and
2324 unsubscribed groups in that Gnus doesn't ask the news server for
2325 information (number of messages, number of unread messages) on zombie
2326 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2327 aren't interested in.  If most groups are killed, Gnus is faster.
2328
2329 Why does Gnus distinguish between zombie and killed groups?  Well, when
2330 a new group arrives on the server, Gnus by default makes it a zombie
2331 group.  This means that you are normally not bothered with new groups,
2332 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2333 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2334 list of killed groups.)
2335
2336 If you want to play with the level variables, you should show some care.
2337 Set them once, and don't touch them ever again.  Better yet, don't touch
2338 them at all unless you know exactly what you're doing.
2339
2340 @vindex gnus-level-default-unsubscribed
2341 @vindex gnus-level-default-subscribed
2342 Two closely related variables are @code{gnus-level-default-subscribed}
2343 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2344 which are the levels that new groups will be put on if they are
2345 (un)subscribed.  These two variables should, of course, be inside the
2346 relevant valid ranges.
2347
2348 @vindex gnus-keep-same-level
2349 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2350 will only move to groups of the same level (or lower).  In
2351 particular, going from the last article in one group to the next group
2352 will go to the next group of the same level (or lower).  This might be
2353 handy if you want to read the most important groups before you read the
2354 rest.
2355
2356 If this variable is @code{best}, Gnus will make the next newsgroup the
2357 one with the best level.
2358
2359 @vindex gnus-group-default-list-level
2360 All groups with a level less than or equal to
2361 @code{gnus-group-default-list-level} will be listed in the group buffer
2362 by default.
2363
2364 @vindex gnus-group-list-inactive-groups
2365 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2366 groups will be listed along with the unread groups.  This variable is
2367 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2368 listed.
2369
2370 @vindex gnus-group-use-permanent-levels
2371 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2372 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2373 use this level as the ``work'' level.
2374
2375 @vindex gnus-activate-level
2376 Gnus will normally just activate (i. e., query the server about) groups
2377 on level @code{gnus-activate-level} or less.  If you don't want to
2378 activate unsubscribed groups, for instance, you might set this variable
2379 to 5.  The default is 6.
2380
2381
2382 @node Group Score
2383 @section Group Score
2384 @cindex group score
2385 @cindex group rank
2386 @cindex rank
2387
2388 You would normally keep important groups on high levels, but that scheme
2389 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2390 group buffer according to how often you read groups, perhaps?  Within
2391 reason?
2392
2393 This is what @dfn{group score} is for.  You can have Gnus assign a score
2394 to each group through the mechanism described below.  You can then sort
2395 the group buffer based on this score.  Alternatively, you can sort on
2396 score and then level.  (Taken together, the level and the score is
2397 called the @dfn{rank} of the group.  A group that is on level 4 and has
2398 a score of 1 has a higher rank than a group on level 5 that has a score
2399 of 300.  (The level is the most significant part and the score is the
2400 least significant part.))
2401
2402 @findex gnus-summary-bubble-group
2403 If you want groups you read often to get higher scores than groups you
2404 read seldom you can add the @code{gnus-summary-bubble-group} function to
2405 the @code{gnus-summary-exit-hook} hook.  This will result (after
2406 sorting) in a bubbling sort of action.  If you want to see that in
2407 action after each summary exit, you can add
2408 @code{gnus-group-sort-groups-by-rank} or
2409 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2410 slow things down somewhat.
2411
2412
2413 @node Marking Groups
2414 @section Marking Groups
2415 @cindex marking groups
2416
2417 If you want to perform some command on several groups, and they appear
2418 subsequently in the group buffer, you would normally just give a
2419 numerical prefix to the command.  Most group commands will then do your
2420 bidding on those groups.
2421
2422 However, if the groups are not in sequential order, you can still
2423 perform a command on several groups.  You simply mark the groups first
2424 with the process mark and then execute the command.
2425
2426 @table @kbd
2427
2428 @item #
2429 @kindex # (Group)
2430 @itemx M m
2431 @kindex M m (Group)
2432 @findex gnus-group-mark-group
2433 Set the mark on the current group (@code{gnus-group-mark-group}).
2434
2435 @item M-#
2436 @kindex M-# (Group)
2437 @itemx M u
2438 @kindex M u (Group)
2439 @findex gnus-group-unmark-group
2440 Remove the mark from the current group
2441 (@code{gnus-group-unmark-group}).
2442
2443 @item M U
2444 @kindex M U (Group)
2445 @findex gnus-group-unmark-all-groups
2446 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2447
2448 @item M w
2449 @kindex M w (Group)
2450 @findex gnus-group-mark-region
2451 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2452
2453 @item M b
2454 @kindex M b (Group)
2455 @findex gnus-group-mark-buffer
2456 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2457
2458 @item M r
2459 @kindex M r (Group)
2460 @findex gnus-group-mark-regexp
2461 Mark all groups that match some regular expression
2462 (@code{gnus-group-mark-regexp}).
2463 @end table
2464
2465 Also @pxref{Process/Prefix}.
2466
2467 @findex gnus-group-universal-argument
2468 If you want to execute some command on all groups that have been marked
2469 with the process mark, you can use the @kbd{M-&}
2470 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2471 the command to be executed.
2472
2473
2474 @node Foreign Groups
2475 @section Foreign Groups
2476 @cindex foreign groups
2477
2478 Below are some group mode commands for making and editing general foreign
2479 groups, as well as commands to ease the creation of a few
2480 special-purpose groups.  All these commands insert the newly created
2481 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2482 consulted.
2483
2484 @table @kbd
2485
2486 @item G m
2487 @kindex G m (Group)
2488 @findex gnus-group-make-group
2489 @cindex making groups
2490 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2491 for a name, a method and possibly an @dfn{address}.  For an easier way
2492 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
2493
2494 @item G r
2495 @kindex G r (Group)
2496 @findex gnus-group-rename-group
2497 @cindex renaming groups
2498 Rename the current group to something else
2499 (@code{gnus-group-rename-group}).  This is valid only on some
2500 groups---mail groups mostly.  This command might very well be quite slow
2501 on some back ends.
2502
2503 @item G c
2504 @kindex G c (Group)
2505 @cindex customizing
2506 @findex gnus-group-customize
2507 Customize the group parameters (@code{gnus-group-customize}).
2508
2509 @item G e
2510 @kindex G e (Group)
2511 @findex gnus-group-edit-group-method
2512 @cindex renaming groups
2513 Enter a buffer where you can edit the select method of the current
2514 group (@code{gnus-group-edit-group-method}).
2515
2516 @item G p
2517 @kindex G p (Group)
2518 @findex gnus-group-edit-group-parameters
2519 Enter a buffer where you can edit the group parameters
2520 (@code{gnus-group-edit-group-parameters}).
2521
2522 @item G E
2523 @kindex G E (Group)
2524 @findex gnus-group-edit-group
2525 Enter a buffer where you can edit the group info
2526 (@code{gnus-group-edit-group}).
2527
2528 @item G d
2529 @kindex G d (Group)
2530 @findex gnus-group-make-directory-group
2531 @cindex nndir
2532 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2533 for a directory name (@code{gnus-group-make-directory-group}).
2534
2535 @item G h
2536 @kindex G h (Group)
2537 @cindex help group
2538 @findex gnus-group-make-help-group
2539 Make the gnus help group (@code{gnus-group-make-help-group}).
2540
2541 @item G a
2542 @kindex G a (Group)
2543 @cindex (ding) archive
2544 @cindex archive group
2545 @findex gnus-group-make-archive-group
2546 @vindex gnus-group-archive-directory
2547 @vindex gnus-group-recent-archive-directory
2548 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2549 default a group pointing to the most recent articles will be created
2550 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2551 group will be created from @code{gnus-group-archive-directory}.
2552
2553 @item G k
2554 @kindex G k (Group)
2555 @findex gnus-group-make-kiboze-group
2556 @cindex nnkiboze
2557 Make a kiboze group.  You will be prompted for a name, for a regexp to
2558 match groups to be ``included'' in the kiboze group, and a series of
2559 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2560 @xref{Kibozed Groups}.
2561
2562 @item G D
2563 @kindex G D (Group)
2564 @findex gnus-group-enter-directory
2565 @cindex nneething
2566 Read an arbitrary directory as if it were a newsgroup with the
2567 @code{nneething} back end (@code{gnus-group-enter-directory}).
2568 @xref{Anything Groups}.
2569
2570 @item G f
2571 @kindex G f (Group)
2572 @findex gnus-group-make-doc-group
2573 @cindex ClariNet Briefs
2574 @cindex nndoc
2575 Make a group based on some file or other
2576 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2577 command, you will be prompted for a file name and a file type.
2578 Currently supported types are @code{mbox}, @code{babyl},
2579 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2580 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2581 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2582 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2583 you run this command without a prefix, Gnus will guess at the file
2584 type.  @xref{Document Groups}.
2585
2586 @item G u
2587 @kindex G u (Group)
2588 @vindex gnus-useful-groups
2589 @findex gnus-group-make-useful-group
2590 Create one of the groups mentioned in @code{gnus-useful-groups}
2591 (@code{gnus-group-make-useful-group}).
2592
2593 @item G w
2594 @kindex G w (Group)
2595 @findex gnus-group-make-web-group
2596 @cindex Google
2597 @cindex nnweb
2598 @cindex gmane
2599 Make an ephemeral group based on a web search
2600 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2601 command, make a solid group instead.  You will be prompted for the
2602 search engine type and the search string.  Valid search engine types
2603 include @code{google}, @code{dejanews}, and @code{gmane}.
2604 @xref{Web Searches}.
2605
2606 If you use the @code{google} search engine, you can limit the search
2607 to a particular group by using a match string like
2608 @samp{shaving group:alt.sysadmin.recovery}.
2609
2610 @item G DEL
2611 @kindex G DEL (Group)
2612 @findex gnus-group-delete-group
2613 This function will delete the current group
2614 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2615 actually delete all the articles in the group, and forcibly remove the
2616 group itself from the face of the Earth.  Use a prefix only if you are
2617 absolutely sure of what you are doing.  This command can't be used on
2618 read-only groups (like @code{nntp} group), though.
2619
2620 @item G V
2621 @kindex G V (Group)
2622 @findex gnus-group-make-empty-virtual
2623 Make a new, fresh, empty @code{nnvirtual} group
2624 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2625
2626 @item G v
2627 @kindex G v (Group)
2628 @findex gnus-group-add-to-virtual
2629 Add the current group to an @code{nnvirtual} group
2630 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2631 @end table
2632
2633 @xref{Select Methods}, for more information on the various select
2634 methods.
2635
2636 @vindex gnus-activate-foreign-newsgroups
2637 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2638 gnus will check all foreign groups with this level or lower at startup.
2639 This might take quite a while, especially if you subscribe to lots of
2640 groups from different @sc{nntp} servers.  Also @pxref{Group Levels};
2641 @code{gnus-activate-level} also affects activation of foreign
2642 newsgroups.
2643
2644
2645 @node Group Parameters
2646 @section Group Parameters
2647 @cindex group parameters
2648
2649 The group parameters store information local to a particular group.
2650 Here's an example group parameter list:
2651
2652 @example
2653 ((to-address . "ding@@gnus.org")
2654  (auto-expire . t))
2655 @end example
2656
2657 We see that each element consists of a "dotted pair"---the thing before
2658 the dot is the key, while the thing after the dot is the value.  All the
2659 parameters have this form @emph{except} local variable specs, which are
2660 not dotted pairs, but proper lists.
2661
2662 Some parameters have correspondant customizable variables, each of which
2663 is an alist of regexps and values.
2664
2665 The following group parameters can be used:
2666
2667 @table @code
2668 @item to-address
2669 @cindex to-address
2670 Address used by when doing followups and new posts.
2671
2672 @example
2673 (to-address . "some@@where.com")
2674 @end example
2675
2676 This is primarily useful in mail groups that represent closed mailing
2677 lists---mailing lists where it's expected that everybody that writes to
2678 the mailing list is subscribed to it.  Since using this parameter
2679 ensures that the mail only goes to the mailing list itself, it means
2680 that members won't receive two copies of your followups.
2681
2682 Using @code{to-address} will actually work whether the group is foreign
2683 or not.  Let's say there's a group on the server that is called
2684 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2685 the articles from a mail-to-news gateway.  Posting directly to this
2686 group is therefore impossible---you have to send mail to the mailing
2687 list address instead.
2688
2689 See also @code{gnus-parameter-to-address-alist}.
2690
2691 @item to-list
2692 @cindex to-list
2693 Address used when doing @kbd{a} in that group.
2694
2695 @example
2696 (to-list . "some@@where.com")
2697 @end example
2698
2699 It is totally ignored
2700 when doing a followup---except that if it is present in a news group,
2701 you'll get mail group semantics when doing @kbd{f}.
2702
2703 If you do an @kbd{a} command in a mail group and you have neither a
2704 @code{to-list} group parameter nor a @code{to-address} group parameter,
2705 then a @code{to-list} group parameter will be added automatically upon
2706 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2707 @vindex gnus-add-to-list
2708
2709 If you do an @kbd{a} command in a mail group and you don't have a
2710 @code{to-list} group parameter, one will be added automatically upon
2711 sending the message.
2712
2713 @findex gnus-mailing-list-mode
2714 @cindex Mail List Groups
2715 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2716 entering summary buffer.
2717
2718 See also @code{gnus-parameter-to-list-alist}.
2719
2720 @anchor{subscribed}
2721 @item subscribed
2722 @cindex subscribed
2723 If this parameter is set to @code{t}, Gnus will consider the
2724 to-address and to-list parameters for this group as addresses of
2725 mailing lists you are subscribed to.  Giving Gnus this information is
2726 (only) a first step in getting it to generate correct Mail-Followup-To
2727 headers for your posts to these lists.  Look here @pxref{(message)Mailing
2728 Lists} for a complete treatment of available MFT support.
2729
2730 See also @code{gnus-find-subscribed-addresses}, the function that
2731 directly uses this group parameter.
2732
2733 @item visible
2734 @cindex visible
2735 If the group parameter list has the element @code{(visible . t)},
2736 that group will always be visible in the Group buffer, regardless
2737 of whether it has any unread articles.
2738
2739 @item broken-reply-to
2740 @cindex broken-reply-to
2741 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2742 headers in this group are to be ignored.  This can be useful if you're
2743 reading a mailing list group where the listserv has inserted
2744 @code{Reply-To} headers that point back to the listserv itself.  This is
2745 broken behavior.  So there!
2746
2747 @item to-group
2748 @cindex to-group
2749 Elements like @code{(to-group . "some.group.name")} means that all
2750 posts in that group will be sent to @code{some.group.name}.
2751
2752 @item newsgroup
2753 @cindex newsgroup
2754 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2755 will treat all responses as if they were responses to news articles.
2756 This can be useful if you have a mail group that's really a mirror of a
2757 news group.
2758
2759 @item gcc-self
2760 @cindex gcc-self
2761 If @code{(gcc-self . t)} is present in the group parameter list, newly
2762 composed messages will be @code{Gcc}'d to the current group.  If
2763 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2764 generated, if @code{(gcc-self . "string")} is present, this string will
2765 be inserted literally as a @code{gcc} header.  This parameter takes
2766 precedence over any default @code{Gcc} rules as described later
2767 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2768 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2769 a @code{nntp} server doesn't accept articles.
2770
2771 @item auto-expire
2772 @cindex auto-expire
2773 If the group parameter has an element that looks like @code{(auto-expire
2774 . t)}, all articles read will be marked as expirable.  For an
2775 alternative approach, @pxref{Expiring Mail}.
2776
2777 See also @code{gnus-auto-expirable-newsgroups}.
2778
2779 @item total-expire
2780 @cindex total-expire
2781 If the group parameter has an element that looks like
2782 @code{(total-expire . t)}, all read articles will be put through the
2783 expiry process, even if they are not marked as expirable.  Use with
2784 caution.  Unread, ticked and dormant articles are not eligible for
2785 expiry.
2786
2787 See also @code{gnus-total-expirable-newsgroups}.
2788
2789 @item expiry-wait
2790 @cindex expiry-wait
2791 @vindex nnmail-expiry-wait-function
2792 If the group parameter has an element that looks like
2793 @code{(expiry-wait . 10)}, this value will override any
2794 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2795 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2796 can either be a number of days (not necessarily an integer) or the
2797 symbols @code{never} or @code{immediate}.
2798
2799 @item score-file
2800 @cindex score file group parameter
2801 Elements that look like @code{(score-file . "file")} will make
2802 @file{file} into the current score file for the group in question.  All
2803 interactive score entries will be put into this file.
2804
2805 @item adapt-file
2806 @cindex adapt file group parameter
2807 Elements that look like @code{(adapt-file . "file")} will make
2808 @file{file} into the current adaptive file for the group in question.
2809 All adaptive score entries will be put into this file.
2810
2811 @item admin-address
2812 @cindex admin-address
2813 When unsubscribing from a mailing list you should never send the
2814 unsubscription notice to the mailing list itself.  Instead, you'd send
2815 messages to the administrative address.  This parameter allows you to
2816 put the admin address somewhere convenient.
2817
2818 @item display
2819 @cindex display
2820 Elements that look like @code{(display . MODE)} say which articles to
2821 display on entering the group.  Valid values are:
2822
2823 @table @code
2824 @item all
2825 Display all articles, both read and unread.
2826
2827 @item an integer
2828 Display the last INTEGER articles in the group.  This is the same as
2829 entering the group with C-u INTEGER.
2830
2831 @item default
2832 Display the default visible articles, which normally includes unread and
2833 ticked articles.
2834
2835 @item an array
2836 Display articles that satisfy a predicate.
2837
2838 Here are some examples:
2839
2840 @table @code
2841 @item [unread]
2842 Display only unread articles.
2843
2844 @item [not expire]
2845 Display everything except expirable articles.
2846
2847 @item [and (not reply) (not expire)]
2848 Display everything except expirable and articles you've already
2849 responded to.
2850 @end table
2851
2852 The available operators are @code{not}, @code{and} and @code{or}.
2853 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2854 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2855 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2856 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2857
2858 @end table
2859
2860 The @code{display} parameter works by limiting the summary buffer to
2861 the subset specified.  You can pop the limit by using the @kbd{/ w}
2862 command (@pxref{Limiting}).
2863
2864 @item comment
2865 @cindex comment
2866 Elements that look like @code{(comment . "This is a comment")} are
2867 arbitrary comments on the group.  You can display comments in the
2868 group line (@pxref{Group Line Specification}).
2869
2870 @item charset
2871 @cindex charset
2872 Elements that look like @code{(charset . iso-8859-1)} will make
2873 @code{iso-8859-1} the default charset; that is, the charset that will be
2874 used for all articles that do not specify a charset.
2875
2876 See also @code{gnus-group-charset-alist}.
2877
2878 @item ignored-charsets
2879 @cindex ignored-charset
2880 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2881 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2882 default charset will be used for decoding articles.
2883
2884 See also @code{gnus-group-ignored-charsets-alist}.
2885
2886 @item posting-style
2887 @cindex posting-style
2888 You can store additional posting style information for this group
2889 here (@pxref{Posting Styles}).  The format is that of an entry in the
2890 @code{gnus-posting-styles} alist, except that there's no regexp matching
2891 the group name (of course).  Style elements in this group parameter will
2892 take precedence over the ones found in @code{gnus-posting-styles}.
2893
2894 For instance, if you want a funky name and signature in this group only,
2895 instead of hacking @code{gnus-posting-styles}, you could put something
2896 like this in the group parameters:
2897
2898 @example
2899 (posting-style
2900   (name "Funky Name")
2901   ("X-My-Header" "Funky Value")
2902   (signature "Funky Signature"))
2903 @end example
2904
2905 @item post-method
2906 @cindex post-method
2907 If it is set, the value is used as the method for posting message
2908 instead of @code{gnus-post-method}.
2909
2910 @item banner
2911 @cindex banner
2912 An item like @code{(banner . "regex")} causes any part of an article
2913 that matches the regular expression "regex" to be stripped. Instead of
2914 "regex", you can also use the symbol @code{signature} which strips the
2915 last signature or any of the elements of the alist
2916 @code{gnus-article-banner-alist}.
2917
2918 @item sieve
2919 @cindex sieve
2920 This parameter contains a Sieve test that should match incoming mail
2921 that should be placed in this group.  From this group parameter, a
2922 Sieve @samp{IF} control structure is generated, having the test as the
2923 condition and @samp{fileinto "group.name";} as the body.
2924
2925 For example, if the INBOX.list.sieve group has the @code{(sieve
2926 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2927 translating the group parameter into a Sieve script (@pxref{Sieve
2928 Commands}) the following Sieve code is generated:
2929
2930 @example
2931 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2932         fileinto \"INBOX.list.sieve\";
2933 @}
2934 @end example
2935
2936 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2937 Emacs Sieve}.
2938
2939 @item (@var{variable} @var{form})
2940 You can use the group parameters to set variables local to the group you
2941 are entering.  If you want to turn threading off in @samp{news.answers},
2942 you could put @code{(gnus-show-threads nil)} in the group parameters of
2943 that group.  @code{gnus-show-threads} will be made into a local variable
2944 in the summary buffer you enter, and the form @code{nil} will be
2945 @code{eval}ed there.
2946
2947 @vindex gnus-list-identifiers
2948 A use for this feature, is to remove a mailing list identifier tag in
2949 the subject fields of articles.   E.g. if the news group
2950 @samp{nntp+news.gnus.org:gmane.text.docbook.apps} has the tag
2951 @samp{DOC-BOOK-APPS:} in the subject of all articles, this tag can be
2952 removed from the article subjects in the summary buffer for the group by
2953 putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group
2954 parameters for the group.
2955
2956
2957 This can also be used as a group-specific hook function, if you'd like.
2958 If you want to hear a beep when you enter a group, you could put
2959 something like @code{(dummy-variable (ding))} in the parameters of that
2960 group.  @code{dummy-variable} will be set to the result of the
2961 @code{(ding)} form, but who cares?
2962
2963 @end table
2964
2965 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2966 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2967 presents you with a Customize-like interface.  The latter helps avoid
2968 silly Lisp errors.)  You might also be interested in reading about topic
2969 parameters (@pxref{Topic Parameters}).
2970
2971 @vindex gnus-parameters
2972 Group parameters can be set via the @code{gnus-parameters} variable too.
2973 But some variables, such as @code{visible}, have no effect.  For
2974 example:
2975
2976 @example
2977 (setq gnus-parameters
2978       '(("mail\\..*"
2979          (gnus-show-threads nil)
2980          (gnus-use-scoring nil)
2981          (gnus-summary-line-format
2982           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
2983          (gcc-self . t)
2984          (display . all))
2985
2986         ("^nnimap:\\(foo.bar\\)$"
2987          (to-group . "\\1"))
2988
2989         ("mail\\.me"
2990          (gnus-use-scoring  t))
2991
2992         ("list\\..*"
2993          (total-expire . t)
2994          (broken-reply-to . t))))
2995 @end example
2996
2997 String value of parameters will be subjected to regexp substitution, as
2998 the @code{to-group} example shows.
2999
3000
3001 @node Listing Groups
3002 @section Listing Groups
3003 @cindex group listing
3004
3005 These commands all list various slices of the groups available.
3006
3007 @table @kbd
3008
3009 @item l
3010 @itemx A s
3011 @kindex A s (Group)
3012 @kindex l (Group)
3013 @findex gnus-group-list-groups
3014 List all groups that have unread articles
3015 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3016 command will list only groups of level ARG and lower.  By default, it
3017 only lists groups of level five (i. e.,
3018 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3019 groups).
3020
3021 @item L
3022 @itemx A u
3023 @kindex A u (Group)
3024 @kindex L (Group)
3025 @findex gnus-group-list-all-groups
3026 List all groups, whether they have unread articles or not
3027 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3028 this command will list only groups of level ARG and lower.  By default,
3029 it lists groups of level seven or lower (i.e., just subscribed and
3030 unsubscribed groups).
3031
3032 @item A l
3033 @kindex A l (Group)
3034 @findex gnus-group-list-level
3035 List all unread groups on a specific level
3036 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3037 with no unread articles.
3038
3039 @item A k
3040 @kindex A k (Group)
3041 @findex gnus-group-list-killed
3042 List all killed groups (@code{gnus-group-list-killed}).  If given a
3043 prefix argument, really list all groups that are available, but aren't
3044 currently (un)subscribed.  This could entail reading the active file
3045 from the server.
3046
3047 @item A z
3048 @kindex A z (Group)
3049 @findex gnus-group-list-zombies
3050 List all zombie groups (@code{gnus-group-list-zombies}).
3051
3052 @item A m
3053 @kindex A m (Group)
3054 @findex gnus-group-list-matching
3055 List all unread, subscribed groups with names that match a regexp
3056 (@code{gnus-group-list-matching}).
3057
3058 @item A M
3059 @kindex A M (Group)
3060 @findex gnus-group-list-all-matching
3061 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3062
3063 @item A A
3064 @kindex A A (Group)
3065 @findex gnus-group-list-active
3066 List absolutely all groups in the active file(s) of the
3067 server(s) you are connected to (@code{gnus-group-list-active}).  This
3068 might very well take quite a while.  It might actually be a better idea
3069 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3070 thing to match on.  Also note that this command may list groups that
3071 don't exist (yet)---these will be listed as if they were killed groups.
3072 Take the output with some grains of salt.
3073
3074 @item A a
3075 @kindex A a (Group)
3076 @findex gnus-group-apropos
3077 List all groups that have names that match a regexp
3078 (@code{gnus-group-apropos}).
3079
3080 @item A d
3081 @kindex A d (Group)
3082 @findex gnus-group-description-apropos
3083 List all groups that have names or descriptions that match a regexp
3084 (@code{gnus-group-description-apropos}).
3085
3086 @item A c
3087 @kindex A c (Group)
3088 @findex gnus-group-list-cached
3089 List all groups with cached articles (@code{gnus-group-list-cached}).
3090
3091 @item A ?
3092 @kindex A ? (Group)
3093 @findex gnus-group-list-dormant
3094 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3095
3096 @item A /
3097 @kindex A / (Group)
3098 @findex gnus-group-list-limit
3099 List groups limited within the current selection
3100 (@code{gnus-group-list-limit}).
3101
3102 @item A f
3103 @kindex A f (Group)
3104 @findex gnus-group-list-flush
3105 Flush groups from the current selection (@code{gnus-group-list-flush}).
3106
3107 @item A p
3108 @kindex A p (Group)
3109 @findex gnus-group-list-plus
3110 List groups plus the current selection (@code{gnus-group-list-plus}).
3111
3112 @end table
3113
3114 @vindex gnus-permanently-visible-groups
3115 @cindex visible group parameter
3116 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3117 always be shown, whether they have unread articles or not.  You can also
3118 add the @code{visible} element to the group parameters in question to
3119 get the same effect.
3120
3121 @vindex gnus-list-groups-with-ticked-articles
3122 Groups that have just ticked articles in it are normally listed in the
3123 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3124 @code{nil}, these groups will be treated just like totally empty
3125 groups.  It is @code{t} by default.
3126
3127
3128 @node Sorting Groups
3129 @section Sorting Groups
3130 @cindex sorting groups
3131
3132 @kindex C-c C-s (Group)
3133 @findex gnus-group-sort-groups
3134 @vindex gnus-group-sort-function
3135 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3136 group buffer according to the function(s) given by the
3137 @code{gnus-group-sort-function} variable.  Available sorting functions
3138 include:
3139
3140 @table @code
3141
3142 @item gnus-group-sort-by-alphabet
3143 @findex gnus-group-sort-by-alphabet
3144 Sort the group names alphabetically.  This is the default.
3145
3146 @item gnus-group-sort-by-real-name
3147 @findex gnus-group-sort-by-real-name
3148 Sort the group alphabetically on the real (unprefixed) group names.
3149
3150 @item gnus-group-sort-by-level
3151 @findex gnus-group-sort-by-level
3152 Sort by group level.
3153
3154 @item gnus-group-sort-by-score
3155 @findex gnus-group-sort-by-score
3156 Sort by group score.  @xref{Group Score}.
3157
3158 @item gnus-group-sort-by-rank
3159 @findex gnus-group-sort-by-rank
3160 Sort by group score and then the group level.  The level and the score
3161 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3162
3163 @item gnus-group-sort-by-unread
3164 @findex gnus-group-sort-by-unread
3165 Sort by number of unread articles.
3166
3167 @item gnus-group-sort-by-method
3168 @findex gnus-group-sort-by-method
3169 Sort alphabetically on the select method.
3170
3171 @item gnus-group-sort-by-server
3172 @findex gnus-group-sort-by-server
3173 Sort alphabetically on the Gnus server name.
3174
3175
3176 @end table
3177
3178 @code{gnus-group-sort-function} can also be a list of sorting
3179 functions.  In that case, the most significant sort key function must be
3180 the last one.
3181
3182
3183 There are also a number of commands for sorting directly according to
3184 some sorting criteria:
3185
3186 @table @kbd
3187 @item G S a
3188 @kindex G S a (Group)
3189 @findex gnus-group-sort-groups-by-alphabet
3190 Sort the group buffer alphabetically by group name
3191 (@code{gnus-group-sort-groups-by-alphabet}).
3192
3193 @item G S u
3194 @kindex G S u (Group)
3195 @findex gnus-group-sort-groups-by-unread
3196 Sort the group buffer by the number of unread articles
3197 (@code{gnus-group-sort-groups-by-unread}).
3198
3199 @item G S l
3200 @kindex G S l (Group)
3201 @findex gnus-group-sort-groups-by-level
3202 Sort the group buffer by group level
3203 (@code{gnus-group-sort-groups-by-level}).
3204
3205 @item G S v
3206 @kindex G S v (Group)
3207 @findex gnus-group-sort-groups-by-score
3208 Sort the group buffer by group score
3209 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3210
3211 @item G S r
3212 @kindex G S r (Group)
3213 @findex gnus-group-sort-groups-by-rank
3214 Sort the group buffer by group rank
3215 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3216
3217 @item G S m
3218 @kindex G S m (Group)
3219 @findex gnus-group-sort-groups-by-method
3220 Sort the group buffer alphabetically by back end name
3221 (@code{gnus-group-sort-groups-by-method}).
3222
3223 @item G S n
3224 @kindex G S n (Group)
3225 @findex gnus-group-sort-groups-by-real-name
3226 Sort the group buffer alphabetically by real (unprefixed) group name
3227 (@code{gnus-group-sort-groups-by-real-name}).
3228
3229 @end table
3230
3231 All the commands below obey the process/prefix convention
3232 (@pxref{Process/Prefix}).
3233
3234 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3235 commands will sort in reverse order.
3236
3237 You can also sort a subset of the groups:
3238
3239 @table @kbd
3240 @item G P a
3241 @kindex G P a (Group)
3242 @findex gnus-group-sort-selected-groups-by-alphabet
3243 Sort the groups alphabetically by group name
3244 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3245
3246 @item G P u
3247 @kindex G P u (Group)
3248 @findex gnus-group-sort-selected-groups-by-unread
3249 Sort the groups by the number of unread articles
3250 (@code{gnus-group-sort-selected-groups-by-unread}).
3251
3252 @item G P l
3253 @kindex G P l (Group)
3254 @findex gnus-group-sort-selected-groups-by-level
3255 Sort the groups by group level
3256 (@code{gnus-group-sort-selected-groups-by-level}).
3257
3258 @item G P v
3259 @kindex G P v (Group)
3260 @findex gnus-group-sort-selected-groups-by-score
3261 Sort the groups by group score
3262 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3263
3264 @item G P r
3265 @kindex G P r (Group)
3266 @findex gnus-group-sort-selected-groups-by-rank
3267 Sort the groups by group rank
3268 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3269
3270 @item G P m
3271 @kindex G P m (Group)
3272 @findex gnus-group-sort-selected-groups-by-method
3273 Sort the groups alphabetically by back end name
3274 (@code{gnus-group-sort-selected-groups-by-method}).
3275
3276 @item G P n
3277 @kindex G P n (Group)
3278 @findex gnus-group-sort-selected-groups-by-real-name
3279 Sort the groups alphabetically by real (unprefixed) group name
3280 (@code{gnus-group-sort-selected-groups-by-real-name}).
3281
3282 @item G P s
3283 @kindex G P s (Group)
3284 @findex gnus-group-sort-selected-groups
3285 Sort the groups according to @code{gnus-group-sort-function}.
3286
3287 @end table
3288
3289 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3290 move groups around.
3291
3292
3293 @node Group Maintenance
3294 @section Group Maintenance
3295 @cindex bogus groups
3296
3297 @table @kbd
3298 @item b
3299 @kindex b (Group)
3300 @findex gnus-group-check-bogus-groups
3301 Find bogus groups and delete them
3302 (@code{gnus-group-check-bogus-groups}).
3303
3304 @item F
3305 @kindex F (Group)
3306 @findex gnus-group-find-new-groups
3307 Find new groups and process them (@code{gnus-group-find-new-groups}).
3308 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3309 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3310 to query the server for new groups, and subscribe the new groups as
3311 zombies.
3312
3313 @item C-c C-x
3314 @kindex C-c C-x (Group)
3315 @findex gnus-group-expire-articles
3316 Run all expirable articles in the current group through the expiry
3317 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3318 all expirable articles in the group that have been around for a while.
3319 (@pxref{Expiring Mail}).
3320
3321 @item C-c C-M-x
3322 @kindex C-c C-M-x (Group)
3323 @findex gnus-group-expire-all-groups
3324 Run all expirable articles in all groups through the expiry process
3325 (@code{gnus-group-expire-all-groups}).
3326
3327 @end table
3328
3329
3330 @node Browse Foreign Server
3331 @section Browse Foreign Server
3332 @cindex foreign servers
3333 @cindex browsing servers
3334
3335 @table @kbd
3336 @item B
3337 @kindex B (Group)
3338 @findex gnus-group-browse-foreign-server
3339 You will be queried for a select method and a server name.  Gnus will
3340 then attempt to contact this server and let you browse the groups there
3341 (@code{gnus-group-browse-foreign-server}).
3342 @end table
3343
3344 @findex gnus-browse-mode
3345 A new buffer with a list of available groups will appear.  This buffer
3346 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3347 a lot) like a normal group buffer.
3348
3349 Here's a list of keystrokes available in the browse mode:
3350
3351 @table @kbd
3352 @item n
3353 @kindex n (Browse)
3354 @findex gnus-group-next-group
3355 Go to the next group (@code{gnus-group-next-group}).
3356
3357 @item p
3358 @kindex p (Browse)
3359 @findex gnus-group-prev-group
3360 Go to the previous group (@code{gnus-group-prev-group}).
3361
3362 @item SPACE
3363 @kindex SPACE (Browse)
3364 @findex gnus-browse-read-group
3365 Enter the current group and display the first article
3366 (@code{gnus-browse-read-group}).
3367
3368 @item RET
3369 @kindex RET (Browse)
3370 @findex gnus-browse-select-group
3371 Enter the current group (@code{gnus-browse-select-group}).
3372
3373 @item u
3374 @kindex u (Browse)
3375 @findex gnus-browse-unsubscribe-current-group
3376 Unsubscribe to the current group, or, as will be the case here,
3377 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3378
3379 @item l
3380 @itemx q
3381 @kindex q (Browse)
3382 @kindex l (Browse)
3383 @findex gnus-browse-exit
3384 Exit browse mode (@code{gnus-browse-exit}).
3385
3386 @item d
3387 @kindex d (Browse)
3388 @findex gnus-browse-describe-group
3389 Describe the current group (@code{gnus-browse-describe-group}).
3390
3391 @item ?
3392 @kindex ? (Browse)
3393 @findex gnus-browse-describe-briefly
3394 Describe browse mode briefly (well, there's not much to describe, is
3395 there) (@code{gnus-browse-describe-briefly}).
3396 @end table
3397
3398
3399 @node Exiting Gnus
3400 @section Exiting gnus
3401 @cindex exiting gnus
3402
3403 Yes, gnus is ex(c)iting.
3404
3405 @table @kbd
3406 @item z
3407 @kindex z (Group)
3408 @findex gnus-group-suspend
3409 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3410 but it kills all buffers except the Group buffer.  I'm not sure why this
3411 is a gain, but then who am I to judge?
3412
3413 @item q
3414 @kindex q (Group)
3415 @findex gnus-group-exit
3416 @c @icon{gnus-group-exit}
3417 Quit gnus (@code{gnus-group-exit}).
3418
3419 @item Q
3420 @kindex Q (Group)
3421 @findex gnus-group-quit
3422 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3423 The dribble file will be saved, though (@pxref{Auto Save}).
3424 @end table
3425
3426 @vindex gnus-exit-gnus-hook
3427 @vindex gnus-suspend-gnus-hook
3428 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3429 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3430 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3431 exiting gnus.
3432
3433 @findex gnus-unload
3434 @cindex unloading
3435 If you wish to completely unload gnus and all its adherents, you can use
3436 the @code{gnus-unload} command.  This command is also very handy when
3437 trying to customize meta-variables.
3438
3439 Note:
3440
3441 @quotation
3442 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3443 numbly heavy and herself fall into a hazy trance as the boy sitting
3444 behind her drew repeated lines with his pencil across the back of her
3445 plastic chair.
3446 @end quotation
3447
3448
3449 @node Group Topics
3450 @section Group Topics
3451 @cindex topics
3452
3453 If you read lots and lots of groups, it might be convenient to group
3454 them hierarchically according to topics.  You put your Emacs groups over
3455 here, your sex groups over there, and the rest (what, two groups or so?)
3456 you put in some misc section that you never bother with anyway.  You can
3457 even group the Emacs sex groups as a sub-topic to either the Emacs
3458 groups or the sex groups---or both!  Go wild!
3459
3460 @iftex
3461 @iflatex
3462 \gnusfigure{Group Topics}{400}{
3463 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3464 }
3465 @end iflatex
3466 @end iftex
3467
3468 Here's an example:
3469
3470 @example
3471 Gnus
3472   Emacs -- I wuw it!
3473      3: comp.emacs
3474      2: alt.religion.emacs
3475     Naughty Emacs
3476      452: alt.sex.emacs
3477        0: comp.talk.emacs.recovery
3478   Misc
3479      8: comp.binaries.fractals
3480     13: comp.sources.unix
3481 @end example
3482
3483 @findex gnus-topic-mode
3484 @kindex t (Group)
3485 To get this @emph{fab} functionality you simply turn on (ooh!) the
3486 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3487 is a toggling command.)
3488
3489 Go ahead, just try it.  I'll still be here when you get back.  La de
3490 dum...  Nice tune, that...  la la la...  What, you're back?  Yes, and
3491 now press @kbd{l}.  There.  All your groups are now listed under
3492 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
3493 bothered?
3494
3495 If you want this permanently enabled, you should add that minor mode to
3496 the hook for the group mode.  Put the following line in your
3497 @file{~/.gnus} file:
3498
3499 @lisp
3500 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3501 @end lisp
3502
3503 @menu
3504 * Topic Commands::              Interactive E-Z commands.
3505 * Topic Variables::             How to customize the topics the Lisp Way.
3506 * Topic Sorting::               Sorting each topic individually.
3507 * Topic Topology::              A map of the world.
3508 * Topic Parameters::            Parameters that apply to all groups in a topic.
3509 @end menu
3510
3511
3512 @node Topic Commands
3513 @subsection Topic Commands
3514 @cindex topic commands
3515
3516 When the topic minor mode is turned on, a new @kbd{T} submap will be
3517 available.  In addition, a few of the standard keys change their
3518 definitions slightly.
3519
3520 In general, the following kinds of operations are possible on topics.
3521 First of all, you want to create topics.  Secondly, you want to put
3522 groups in topics and to move them around until you have an order you
3523 like.  The third kind of operation is to show/hide parts of the whole
3524 shebang.  You might want to hide a topic including its subtopics and
3525 groups, to get a better overview of the other groups.
3526
3527 Here is a list of the basic keys that you might need to set up topics
3528 the way you like.
3529
3530 @table @kbd
3531
3532 @item T n
3533 @kindex T n (Topic)
3534 @findex gnus-topic-create-topic
3535 Prompt for a new topic name and create it
3536 (@code{gnus-topic-create-topic}).
3537
3538 @item T TAB
3539 @itemx TAB
3540 @kindex T TAB (Topic)
3541 @kindex TAB (Topic)
3542 @findex gnus-topic-indent
3543 ``Indent'' the current topic so that it becomes a sub-topic of the
3544 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3545 ``un-indent'' the topic instead.
3546
3547 @item M-TAB
3548 @kindex M-TAB (Topic)
3549 @findex gnus-topic-unindent
3550 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3551 parent of its current parent (@code{gnus-topic-unindent}).
3552
3553 @end table
3554
3555 The following two keys can be used to move groups and topics around.
3556 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3557 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3558 kill and yank rather than cut and paste.
3559
3560 @table @kbd
3561
3562 @item C-k
3563 @kindex C-k (Topic)
3564 @findex gnus-topic-kill-group
3565 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3566 topic will be removed along with the topic.
3567
3568 @item C-y
3569 @kindex C-y (Topic)
3570 @findex gnus-topic-yank-group
3571 Yank the previously killed group or topic
3572 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3573 before all groups.
3574
3575 So, to move a topic to the beginning of the list of topics, just hit
3576 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3577 move the cursor to the beginning of the buffer (just below the `Gnus'
3578 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3579 paste.  Like I said -- E-Z.
3580
3581 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3582 you can move topics around as well as groups.
3583
3584 @end table
3585
3586 After setting up the topics the way you like them, you might wish to
3587 hide a topic, or to show it again.  That's why we have the following
3588 key.
3589
3590 @table @kbd
3591
3592 @item RET
3593 @kindex RET (Topic)
3594 @findex gnus-topic-select-group
3595 @itemx SPACE
3596 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3597 When you perform this command on a group, you'll enter the group, as
3598 usual.  When done on a topic line, the topic will be folded (if it was
3599 visible) or unfolded (if it was folded already).  So it's basically a
3600 toggling command on topics.  In addition, if you give a numerical
3601 prefix, group on that level (and lower) will be displayed.
3602
3603 @end table
3604
3605 Now for a list of other commands, in no particular order.
3606
3607 @table @kbd
3608
3609 @item T m
3610 @kindex T m (Topic)
3611 @findex gnus-topic-move-group
3612 Move the current group to some other topic
3613 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3614 convention (@pxref{Process/Prefix}).
3615
3616 @item T j
3617 @kindex T j (Topic)
3618 @findex gnus-topic-jump-to-topic
3619 Go to a topic (@code{gnus-topic-jump-to-topic}).
3620
3621 @item T c
3622 @kindex T c (Topic)
3623 @findex gnus-topic-copy-group
3624 Copy the current group to some other topic
3625 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3626 convention (@pxref{Process/Prefix}).
3627
3628 @item T h
3629 @kindex T h (Topic)
3630 @findex gnus-topic-hide-topic
3631 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3632 a prefix, hide the topic permanently.
3633
3634 @item T s
3635 @kindex T s (Topic)
3636 @findex gnus-topic-show-topic
3637 Show the current topic (@code{gnus-topic-show-topic}).  If given
3638 a prefix, show the topic permanently.
3639
3640 @item T D
3641 @kindex T D (Topic)
3642 @findex gnus-topic-remove-group
3643 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3644 This command is mainly useful if you have the same group in several
3645 topics and wish to remove it from one of the topics.  You may also
3646 remove a group from all topics, but in that case, Gnus will add it to
3647 the root topic the next time you start Gnus.  In fact, all new groups
3648 (which, naturally, don't belong to any topic) will show up in the root
3649 topic.
3650
3651 This command uses the process/prefix convention
3652 (@pxref{Process/Prefix}).
3653
3654 @item T M
3655 @kindex T M (Topic)
3656 @findex gnus-topic-move-matching
3657 Move all groups that match some regular expression to a topic
3658 (@code{gnus-topic-move-matching}).
3659
3660 @item T C
3661 @kindex T C (Topic)
3662 @findex gnus-topic-copy-matching
3663 Copy all groups that match some regular expression to a topic
3664 (@code{gnus-topic-copy-matching}).
3665
3666 @item T H
3667 @kindex T H (Topic)
3668 @findex gnus-topic-toggle-display-empty-topics
3669 Toggle hiding empty topics
3670 (@code{gnus-topic-toggle-display-empty-topics}).
3671
3672 @item T #
3673 @kindex T # (Topic)
3674 @findex gnus-topic-mark-topic
3675 Mark all groups in the current topic with the process mark
3676 (@code{gnus-topic-mark-topic}).
3677
3678 @item T M-#
3679 @kindex T M-# (Topic)
3680 @findex gnus-topic-unmark-topic
3681 Remove the process mark from all groups in the current topic
3682 (@code{gnus-topic-unmark-topic}).
3683
3684 @item C-c C-x
3685 @kindex C-c C-x (Topic)
3686 @findex gnus-topic-expire-articles
3687 Run all expirable articles in the current group or topic through the
3688 expiry process (if any)
3689 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3690
3691 @item T r
3692 @kindex T r (Topic)
3693 @findex gnus-topic-rename
3694 Rename a topic (@code{gnus-topic-rename}).
3695
3696 @item T DEL
3697 @kindex T DEL (Topic)
3698 @findex gnus-topic-delete
3699 Delete an empty topic (@code{gnus-topic-delete}).
3700
3701 @item A T
3702 @kindex A T (Topic)
3703 @findex gnus-topic-list-active
3704 List all groups that gnus knows about in a topics-ified way
3705 (@code{gnus-topic-list-active}).
3706
3707 @item T M-n
3708 @kindex T M-n (Topic)
3709 @findex gnus-topic-goto-next-topic
3710 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3711
3712 @item T M-p
3713 @kindex T M-p (Topic)
3714 @findex gnus-topic-goto-previous-topic
3715 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3716
3717 @item G p
3718 @kindex G p (Topic)
3719 @findex gnus-topic-edit-parameters
3720 @cindex group parameters
3721 @cindex topic parameters
3722 @cindex parameters
3723 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3724 @xref{Topic Parameters}.
3725
3726 @end table
3727
3728
3729 @node Topic Variables
3730 @subsection Topic Variables
3731 @cindex topic variables
3732
3733 The previous section told you how to tell Gnus which topics to display.
3734 This section explains how to tell Gnus what to display about each topic.
3735
3736 @vindex gnus-topic-line-format
3737 The topic lines themselves are created according to the
3738 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3739 Valid elements are:
3740
3741 @table @samp
3742 @item i
3743 Indentation.
3744 @item n
3745 Topic name.
3746 @item v
3747 Visibility.
3748 @item l
3749 Level.
3750 @item g
3751 Number of groups in the topic.
3752 @item a
3753 Number of unread articles in the topic.
3754 @item A
3755 Number of unread articles in the topic and all its subtopics.
3756 @end table
3757
3758 @vindex gnus-topic-indent-level
3759 Each sub-topic (and the groups in the sub-topics) will be indented with
3760 @code{gnus-topic-indent-level} times the topic level number of spaces.
3761 The default is 2.
3762
3763 @vindex gnus-topic-mode-hook
3764 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3765
3766 @vindex gnus-topic-display-empty-topics
3767 The @code{gnus-topic-display-empty-topics} says whether to display even
3768 topics that have no unread articles in them.  The default is @code{t}.
3769
3770
3771 @node Topic Sorting
3772 @subsection Topic Sorting
3773 @cindex topic sorting
3774
3775 You can sort the groups in each topic individually with the following
3776 commands:
3777
3778
3779 @table @kbd
3780 @item T S a
3781 @kindex T S a (Topic)
3782 @findex gnus-topic-sort-groups-by-alphabet
3783 Sort the current topic alphabetically by group name
3784 (@code{gnus-topic-sort-groups-by-alphabet}).
3785
3786 @item T S u
3787 @kindex T S u (Topic)
3788 @findex gnus-topic-sort-groups-by-unread
3789 Sort the current topic by the number of unread articles
3790 (@code{gnus-topic-sort-groups-by-unread}).
3791
3792 @item T S l
3793 @kindex T S l (Topic)
3794 @findex gnus-topic-sort-groups-by-level
3795 Sort the current topic by group level
3796 (@code{gnus-topic-sort-groups-by-level}).
3797
3798 @item T S v
3799 @kindex T S v (Topic)
3800 @findex gnus-topic-sort-groups-by-score
3801 Sort the current topic by group score
3802 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3803
3804 @item T S r
3805 @kindex T S r (Topic)
3806 @findex gnus-topic-sort-groups-by-rank
3807 Sort the current topic by group rank
3808 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3809
3810 @item T S m
3811 @kindex T S m (Topic)
3812 @findex gnus-topic-sort-groups-by-method
3813 Sort the current topic alphabetically by back end name
3814 (@code{gnus-topic-sort-groups-by-method}).
3815
3816 @item T S e
3817 @kindex T S e (Topic)
3818 @findex gnus-topic-sort-groups-by-server
3819 Sort the current topic alphabetically by server name
3820 (@code{gnus-topic-sort-groups-by-server}).
3821
3822 @item T S s
3823 @kindex T S s
3824 @findex gnus-topic-sort-groups
3825 Sort the current topic according to the function(s) given by the
3826 @code{gnus-group-sort-function} variable
3827 (@code{gnus-topic-sort-groups}).
3828
3829 @end table
3830
3831 When given a prefix argument, all these commands will sort in reverse
3832 order.  @xref{Sorting Groups}, for more information about group
3833 sorting.
3834
3835
3836 @node Topic Topology
3837 @subsection Topic Topology
3838 @cindex topic topology
3839 @cindex topology
3840
3841 So, let's have a look at an example group buffer:
3842
3843 @example
3844 Gnus
3845   Emacs -- I wuw it!
3846      3: comp.emacs
3847      2: alt.religion.emacs
3848     Naughty Emacs
3849      452: alt.sex.emacs
3850        0: comp.talk.emacs.recovery
3851   Misc
3852      8: comp.binaries.fractals
3853     13: comp.sources.unix
3854 @end example
3855
3856 So, here we have one top-level topic (@samp{Gnus}), two topics under
3857 that, and one sub-topic under one of the sub-topics.  (There is always
3858 just one (1) top-level topic).  This topology can be expressed as
3859 follows:
3860
3861 @lisp
3862 (("Gnus" visible)
3863  (("Emacs -- I wuw it!" visible)
3864   (("Naughty Emacs" visible)))
3865  (("Misc" visible)))
3866 @end lisp
3867
3868 @vindex gnus-topic-topology
3869 This is in fact how the variable @code{gnus-topic-topology} would look
3870 for the display above.  That variable is saved in the @file{.newsrc.eld}
3871 file, and shouldn't be messed with manually---unless you really want
3872 to.  Since this variable is read from the @file{.newsrc.eld} file,
3873 setting it in any other startup files will have no effect.
3874
3875 This topology shows what topics are sub-topics of what topics (right),
3876 and which topics are visible.  Two settings are currently
3877 allowed---@code{visible} and @code{invisible}.
3878
3879
3880 @node Topic Parameters
3881 @subsection Topic Parameters
3882 @cindex topic parameters
3883
3884 All groups in a topic will inherit group parameters from the parent (and
3885 ancestor) topic parameters.  All valid group parameters are valid topic
3886 parameters (@pxref{Group Parameters}).
3887
3888 In addition, the following parameters are only valid as topic
3889 parameters:
3890
3891 @table @code
3892 @item subscribe
3893 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3894 @code{subscribe} topic parameter says what groups go in what topic.  Its
3895 value should be a regexp to match the groups that should go in that
3896 topic.
3897
3898 @item subscribe-level
3899 When subscribing new groups by topic (see the @code{subscribe} parameter),
3900 the group will be subscribed with the level specified in the
3901 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3902
3903 @end table
3904
3905 Group parameters (of course) override topic parameters, and topic
3906 parameters in sub-topics override topic parameters in super-topics.  You
3907 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3908 verb, although you may feel free to disagree with me here.)
3909
3910 @example
3911 Gnus
3912   Emacs
3913      3: comp.emacs
3914      2: alt.religion.emacs
3915    452: alt.sex.emacs
3916     Relief
3917      452: alt.sex.emacs
3918        0: comp.talk.emacs.recovery
3919   Misc
3920      8: comp.binaries.fractals
3921     13: comp.sources.unix
3922    452: alt.sex.emacs
3923 @end example
3924
3925 The @samp{Emacs} topic has the topic parameter @code{(score-file
3926 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3927 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3928 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3929 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3930 . "religion.SCORE")}.
3931
3932 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3933 will get the @file{relief.SCORE} home score file.  If you enter the same
3934 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3935 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3936 get the @file{religion.SCORE} home score file.
3937
3938 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3939 there are some problems, especially with the @code{total-expiry}
3940 parameter.  Say you have a mail group in two topics; one with
3941 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3942 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3943 of these topics you mean to expire articles from, so anything may
3944 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3945 happens.  You just have to be careful if you do stuff like that.
3946
3947
3948 @node Misc Group Stuff
3949 @section Misc Group Stuff
3950
3951 @menu
3952 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3953 * Group Information::           Information and help on groups and Gnus.
3954 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3955 * File Commands::               Reading and writing the Gnus files.
3956 * Sieve Commands::              Managing Sieve scripts.
3957 @end menu
3958
3959 @table @kbd
3960
3961 @item ^
3962 @kindex ^ (Group)
3963 @findex gnus-group-enter-server-mode
3964 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3965 @xref{Server Buffer}.
3966
3967 @item a
3968 @kindex a (Group)
3969 @findex gnus-group-post-news
3970 Start composing a message (a news by default)
3971 (@code{gnus-group-post-news}).  If given a prefix, post to the group
3972 under the point.  If the prefix is 1, prompt for a group to post to.
3973 Contrary to what the name of this function suggests, the prepared
3974 article might be a mail instead of a news, if a mail group is specified
3975 with the prefix argument.  @xref{Composing Messages}.
3976
3977 @item m
3978 @kindex m (Group)
3979 @findex gnus-group-mail
3980 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
3981 use the posting style of the group under the point.  If the prefix is 1,
3982 prompt for a group name to find the posting style.
3983 @xref{Composing Messages}.
3984
3985 @item i
3986 @kindex i (Group)
3987 @findex gnus-group-news
3988 Start composing a news (@code{gnus-group-news}).  If given a prefix,
3989 post to the group under the point.  If the prefix is 1, prompt
3990 for group to post to.  @xref{Composing Messages}.
3991
3992 This function actually prepares a news even when using mail groups.
3993 This is useful for "posting" messages to mail groups without actually
3994 sending them over the network: they're just saved directly to the group
3995 in question.  The corresponding back end must have a request-post method
3996 for this to work though.
3997
3998 @end table
3999
4000 Variables for the group buffer:
4001
4002 @table @code
4003
4004 @item gnus-group-mode-hook
4005 @vindex gnus-group-mode-hook
4006 is called after the group buffer has been
4007 created.
4008
4009 @item gnus-group-prepare-hook
4010 @vindex gnus-group-prepare-hook
4011 is called after the group buffer is
4012 generated.  It may be used to modify the buffer in some strange,
4013 unnatural way.
4014
4015 @item gnus-group-prepared-hook
4016 @vindex gnus-group-prepare-hook
4017 is called as the very last thing after the group buffer has been
4018 generated.  It may be used to move point around, for instance.
4019
4020 @item gnus-permanently-visible-groups
4021 @vindex gnus-permanently-visible-groups
4022 Groups matching this regexp will always be listed in the group buffer,
4023 whether they are empty or not.
4024
4025 @item gnus-group-name-charset-method-alist
4026 @vindex gnus-group-name-charset-method-alist
4027 An alist of method and the charset for group names. It is used to show
4028 non-ASCII group names.
4029
4030 For example:
4031 @lisp
4032 (setq gnus-group-name-charset-method-alist
4033     '(((nntp "news.com.cn") . cn-gb-2312)))
4034 @end lisp
4035
4036 @item gnus-group-name-charset-group-alist
4037 @cindex UTF-8 group names
4038 @vindex gnus-group-name-charset-group-alist
4039 An alist of regexp of group name and the charset for group names.  It
4040 is used to show non-ASCII group names.  @code{((".*" utf-8))} is the
4041 default value if UTF-8 is supported, otherwise the default is
4042 @code{nil}.
4043
4044 For example:
4045 @lisp
4046 (setq gnus-group-name-charset-group-alist
4047     '(("\\.com\\.cn:" . cn-gb-2312)))
4048 @end lisp
4049
4050 @end table
4051
4052 @node Scanning New Messages
4053 @subsection Scanning New Messages
4054 @cindex new messages
4055 @cindex scanning new news
4056
4057 @table @kbd
4058
4059 @item g
4060 @kindex g (Group)
4061 @findex gnus-group-get-new-news
4062 @c @icon{gnus-group-get-new-news}
4063 Check the server(s) for new articles.  If the numerical prefix is used,
4064 this command will check only groups of level @var{arg} and lower
4065 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4066 command will force a total re-reading of the active file(s) from the
4067 back end(s).
4068
4069 @item M-g
4070 @kindex M-g (Group)
4071 @findex gnus-group-get-new-news-this-group
4072 @vindex gnus-goto-next-group-when-activating
4073 @c @icon{gnus-group-get-new-news-this-group}
4074 Check whether new articles have arrived in the current group
4075 (@code{gnus-group-get-new-news-this-group}).
4076 @code{gnus-goto-next-group-when-activating} says whether this command is
4077 to move point to the next group or not.  It is @code{t} by default.
4078
4079 @findex gnus-activate-all-groups
4080 @cindex activating groups
4081 @item C-c M-g
4082 @kindex C-c M-g (Group)
4083 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4084
4085 @item R
4086 @kindex R (Group)
4087 @cindex restarting
4088 @findex gnus-group-restart
4089 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4090 file(s), closes the connection to all servers, clears up all run-time
4091 gnus variables, and then starts gnus all over again.
4092
4093 @end table
4094
4095 @vindex gnus-get-new-news-hook
4096 @code{gnus-get-new-news-hook} is run just before checking for new news.
4097
4098 @vindex gnus-after-getting-new-news-hook
4099 @code{gnus-after-getting-new-news-hook} is run after checking for new
4100 news.
4101
4102
4103 @node Group Information
4104 @subsection Group Information
4105 @cindex group information
4106 @cindex information on groups
4107
4108 @table @kbd
4109
4110
4111 @item H f
4112 @kindex H f (Group)
4113 @findex gnus-group-fetch-faq
4114 @vindex gnus-group-faq-directory
4115 @cindex FAQ
4116 @cindex ange-ftp
4117 Try to fetch the FAQ for the current group
4118 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
4119 @code{gnus-group-faq-directory}, which is usually a directory on a
4120 remote machine.  This variable can also be a list of directories.  In
4121 that case, giving a prefix to this command will allow you to choose
4122 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
4123 for fetching the file.
4124
4125 If fetching from the first site is unsuccessful, gnus will attempt to go
4126 through @code{gnus-group-faq-directory} and try to open them one by one.
4127
4128 @item H c
4129 @kindex H c (Group)
4130 @findex gnus-group-fetch-charter
4131 @vindex gnus-group-charter-alist
4132 @cindex charter
4133 Try to open the charter for the current group in a web browser
4134 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4135 prefix argument.
4136
4137 Gnus will use @code{gnus-group-charter-alist} to find the location of
4138 the charter.  If no location is known, Gnus will fetch the control
4139 messages for the group, which in some cases includes the charter.
4140
4141 @item H C
4142 @kindex H C (Group)
4143 @findex gnus-group-fetch-control
4144 @vindex gnus-group-fetch-control-use-browse-url
4145 @cindex control message
4146 Fetch the control messages for the group from the archive at
4147 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4148 group if given a prefix argument.
4149
4150 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4151 Gnus will open the control messages in a browser using
4152 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4153 and displayed in an ephemeral group.
4154
4155 Note that the control messages are compressed.  To use this command
4156 you need to turn on @code{auto-compression-mode}
4157 (@pxref{(emacs)Compressed Files}).
4158
4159 @item H d
4160 @itemx C-c C-d
4161 @c @icon{gnus-group-describe-group}
4162 @kindex H d (Group)
4163 @kindex C-c C-d (Group)
4164 @cindex describing groups
4165 @cindex group description
4166 @findex gnus-group-describe-group
4167 Describe the current group (@code{gnus-group-describe-group}).  If given
4168 a prefix, force Gnus to re-read the description from the server.
4169
4170 @item M-d
4171 @kindex M-d (Group)
4172 @findex gnus-group-describe-all-groups
4173 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4174 prefix, force gnus to re-read the description file from the server.
4175
4176 @item H v
4177 @itemx V
4178 @kindex V (Group)
4179 @kindex H v (Group)
4180 @cindex version
4181 @findex gnus-version
4182 Display current gnus version numbers (@code{gnus-version}).
4183
4184 @item ?
4185 @kindex ? (Group)
4186 @findex gnus-group-describe-briefly
4187 Give a very short help message (@code{gnus-group-describe-briefly}).
4188
4189 @item C-c C-i
4190 @kindex C-c C-i (Group)
4191 @cindex info
4192 @cindex manual
4193 @findex gnus-info-find-node
4194 Go to the gnus info node (@code{gnus-info-find-node}).
4195 @end table
4196
4197
4198 @node Group Timestamp
4199 @subsection Group Timestamp
4200 @cindex timestamps
4201 @cindex group timestamps
4202
4203 It can be convenient to let gnus keep track of when you last read a
4204 group.  To set the ball rolling, you should add
4205 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4206
4207 @lisp
4208 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4209 @end lisp
4210
4211 After doing this, each time you enter a group, it'll be recorded.
4212
4213 This information can be displayed in various ways---the easiest is to
4214 use the @samp{%d} spec in the group line format:
4215
4216 @lisp
4217 (setq gnus-group-line-format
4218       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4219 @end lisp
4220
4221 This will result in lines looking like:
4222
4223 @example
4224 *        0: mail.ding                                19961002T012943
4225          0: custom                                   19961002T012713
4226 @end example
4227
4228 As you can see, the date is displayed in compact ISO 8601 format.  This
4229 may be a bit too much, so to just display the date, you could say
4230 something like:
4231
4232 @lisp
4233 (setq gnus-group-line-format
4234       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4235 @end lisp
4236
4237 If you would like greater control of the time format, you can use a
4238 user-defined format spec.  Something like the following should do the
4239 trick:
4240
4241 @lisp
4242 (setq gnus-group-line-format
4243       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4244 (defun gnus-user-format-function-d (headers)
4245   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4246     (if time
4247         (format-time-string "%b %d  %H:%M" time)
4248       "")))
4249 @end lisp
4250
4251
4252 @node File Commands
4253 @subsection File Commands
4254 @cindex file commands
4255
4256 @table @kbd
4257
4258 @item r
4259 @kindex r (Group)
4260 @findex gnus-group-read-init-file
4261 @vindex gnus-init-file
4262 @cindex reading init file
4263 Re-read the init file (@code{gnus-init-file}, which defaults to
4264 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
4265
4266 @item s
4267 @kindex s (Group)
4268 @findex gnus-group-save-newsrc
4269 @cindex saving .newsrc
4270 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4271 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4272 file(s) whether Gnus thinks it is necessary or not.
4273
4274 @c @item Z
4275 @c @kindex Z (Group)
4276 @c @findex gnus-group-clear-dribble
4277 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4278
4279 @end table
4280
4281
4282 @node Sieve Commands
4283 @subsection Sieve Commands
4284 @cindex group sieve commands
4285
4286 Sieve is a server-side mail filtering language.  In Gnus you can use
4287 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4288 sieve rules that should apply to each group.  Gnus provides two
4289 commands to translate all these group parameters into a proper Sieve
4290 script that can be transfered to the server somehow.
4291
4292 @vindex gnus-sieve-file
4293 @vindex gnus-sieve-region-start
4294 @vindex gnus-sieve-region-end
4295 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4296 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4297 between two delimiters, @code{gnus-sieve-region-start} and
4298 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4299 outside these delimiters that will not be removed the next time you
4300 regenerate the Sieve script.
4301
4302 @vindex gnus-sieve-crosspost
4303 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4304 is generated.  If it is non-@code{nil} (the default) articles is
4305 placed in all groups that have matching rules, otherwise the article
4306 is only placed in the group with the first matching rule.  For
4307 example, the group parameter @samp{(sieve address "sender"
4308 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4309 code if @code{gnus-sieve-crosspost} is @code{nil}. (When
4310 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4311 except that the line containing the call to @code{stop} is removed.)
4312
4313 @example
4314 if address "sender" "owner-ding@@hpc.uh.edu" @{
4315         fileinto "INBOX.ding";
4316         stop;
4317 @}
4318 @end example
4319
4320 @xref{Top, ,Top, sieve, Emacs Sieve}.
4321
4322 @table @kbd
4323
4324 @item D g
4325 @kindex D g (Group)
4326 @findex gnus-sieve-generate
4327 @vindex gnus-sieve-file
4328 @cindex generating sieve script
4329 Regenerate a Sieve script from the @code{sieve} group parameters and
4330 put you into the @code{gnus-sieve-file} without saving it.
4331
4332 @item D u
4333 @kindex D u (Group)
4334 @findex gnus-sieve-update
4335 @vindex gnus-sieve-file
4336 @cindex updating sieve script
4337 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4338 @code{sieve} group parameters, save the file and upload it to the
4339 server using the @code{sieveshell} program.
4340
4341 @end table
4342
4343
4344 @node Summary Buffer
4345 @chapter Summary Buffer
4346 @cindex summary buffer
4347
4348 A line for each article is displayed in the summary buffer.  You can
4349 move around, read articles, post articles and reply to articles.
4350
4351 The most common way to a summary buffer is to select a group from the
4352 group buffer (@pxref{Selecting a Group}).
4353
4354 You can have as many summary buffers open as you wish.
4355
4356 @menu
4357 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4358 * Summary Maneuvering::         Moving around the summary buffer.
4359 * Choosing Articles::           Reading articles.
4360 * Paging the Article::          Scrolling the current article.
4361 * Reply Followup and Post::     Posting articles.
4362 * Delayed Articles::            Send articles at a later time.
4363 * Marking Articles::            Marking articles as read, expirable, etc.
4364 * Limiting::                    You can limit the summary buffer.
4365 * Threading::                   How threads are made.
4366 * Sorting the Summary Buffer::  How articles and threads are sorted.
4367 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4368 * Article Caching::             You may store articles in a cache.
4369 * Persistent Articles::         Making articles expiry-resistant.
4370 * Article Backlog::             Having already read articles hang around.
4371 * Saving Articles::             Ways of customizing article saving.
4372 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4373 * Article Treatment::           The article buffer can be mangled at will.
4374 * MIME Commands::               Doing MIMEy things with the articles.
4375 * Charsets::                    Character set issues.
4376 * Article Commands::            Doing various things with the article buffer.
4377 * Summary Sorting::             Sorting the summary buffer in various ways.
4378 * Finding the Parent::          No child support? Get the parent.
4379 * Alternative Approaches::      Reading using non-default summaries.
4380 * Tree Display::                A more visual display of threads.
4381 * Mail Group Commands::         Some commands can only be used in mail groups.
4382 * Various Summary Stuff::       What didn't fit anywhere else.
4383 * Exiting the Summary Buffer::  Returning to the Group buffer,
4384                                 or reselecting the current group.
4385 * Crosspost Handling::          How crossposted articles are dealt with.
4386 * Duplicate Suppression::       An alternative when crosspost handling fails.
4387 * Security::                    Decrypt and Verify.
4388 * Mailing List::                Mailing list minor mode.
4389 @end menu
4390
4391
4392 @node Summary Buffer Format
4393 @section Summary Buffer Format
4394 @cindex summary buffer format
4395
4396 @iftex
4397 @iflatex
4398 \gnusfigure{The Summary Buffer}{180}{
4399 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4400 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4401 }
4402 @end iflatex
4403 @end iftex
4404
4405 @menu
4406 * Summary Buffer Lines::        You can specify how summary lines should look.
4407 * To From Newsgroups::          How to not display your own name.
4408 * Summary Buffer Mode Line::    You can say how the mode line should look.
4409 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4410 @end menu
4411
4412 @findex mail-extract-address-components
4413 @findex gnus-extract-address-components
4414 @vindex gnus-extract-address-components
4415 Gnus will use the value of the @code{gnus-extract-address-components}
4416 variable as a function for getting the name and address parts of a
4417 @code{From} header.  Three pre-defined functions exist:
4418 @code{gnus-extract-address-components}, which is the default, quite
4419 fast, and too simplistic solution;
4420 @code{mail-extract-address-components}, which works nicely, but is
4421 slower; and @code{std11-extract-address-components}, which works very
4422 nicely, but is slower.  The default function will return the wrong
4423 answer in 5% of the cases.  If this is unacceptable to you, use the
4424 other function instead:
4425
4426 @lisp
4427 (setq gnus-extract-address-components
4428       'mail-extract-address-components)
4429 @end lisp
4430
4431 @vindex gnus-summary-same-subject
4432 @code{gnus-summary-same-subject} is a string indicating that the current
4433 article has the same subject as the previous.  This string will be used
4434 with those specs that require it.  The default is @code{""}.
4435
4436
4437 @node Summary Buffer Lines
4438 @subsection Summary Buffer Lines
4439
4440 @vindex gnus-summary-line-format
4441 You can change the format of the lines in the summary buffer by changing
4442 the @code{gnus-summary-line-format} variable.  It works along the same
4443 lines as a normal @code{format} string, with some extensions
4444 (@pxref{Formatting Variables}).
4445
4446 There should always be a colon or a point position marker on the line;
4447 the cursor always moves to the point position marker or the colon after
4448 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4449 possible to change this.  Just write a new function
4450 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4451 @xref{Positioning Point}.
4452
4453 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4454
4455 The following format specification characters and extended format
4456 specification(s) are understood:
4457
4458 @table @samp
4459 @item N
4460 Article number.
4461 @item S
4462 Subject string.  List identifiers stripped,
4463 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4464 @item s
4465 Subject if the article is the root of the thread or the previous article
4466 had a different subject, @code{gnus-summary-same-subject} otherwise.
4467 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4468 @item F
4469 Full @code{From} header.
4470 @item n
4471 The name (from the @code{From} header).
4472 @item f
4473 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4474 From Newsgroups}).
4475 @item a
4476 The name (from the @code{From} header).  This differs from the @code{n}
4477 spec in that it uses the function designated by the
4478 @code{gnus-extract-address-components} variable, which is slower, but
4479 may be more thorough.
4480 @item A
4481 The address (from the @code{From} header).  This works the same way as
4482 the @code{a} spec.
4483 @item L
4484 Number of lines in the article.
4485 @item c
4486 Number of characters in the article. This specifier is not supported
4487 in some methods (like nnfolder).
4488 @item k
4489 Pretty-printed version of the number of characters in the article;
4490 for example, @samp{1.2k} or @samp{0.4M}.
4491 @item I
4492 Indentation based on thread level (@pxref{Customizing Threading}).
4493 @item B
4494 A complex trn-style thread tree, showing response-connecting trace
4495 lines.  A thread could be drawn like this:
4496
4497 @example
4498 >
4499 +->
4500 | +->
4501 | | \->
4502 | |   \->
4503 | \->
4504 +->
4505 \->
4506 @end example
4507
4508 You can customize the appearance with the following options.  Note
4509 that it is possible to make the thread display look really neat by
4510 replacing the default ASCII characters with graphic line-drawing
4511 glyphs.
4512 @table @code
4513 @item gnus-sum-thread-tree-root
4514 @vindex gnus-sum-thread-tree-root
4515 Used for the root of a thread.  If @code{nil}, use subject
4516 instead. The default is @samp{> }.
4517
4518 @item gnus-sum-thread-tree-single-indent
4519 @vindex gnus-sum-thread-tree-single-indent
4520 Used for a thread with just one message.  If @code{nil}, use subject
4521 instead.  The default is @samp{}.
4522
4523 @item gnus-sum-thread-tree-vertical
4524 @vindex gnus-sum-thread-tree-vertical
4525 Used for drawing a vertical line.  The default is @samp{| }.
4526
4527 @item gnus-sum-thread-tree-indent
4528 @vindex gnus-sum-thread-tree-indent
4529 Used for indenting.  The default is @samp{  }. 
4530
4531 @item gnus-sum-thread-tree-leaf-with-other
4532 @vindex gnus-sum-thread-tree-leaf-with-other
4533 Used for a leaf with brothers.  The default is @samp{+-> }.
4534
4535 @item gnus-sum-thread-tree-single-leaf
4536 @vindex gnus-sum-thread-tree-single-leaf
4537 Used for a leaf without brothers.  The default is @samp{\-> }
4538
4539 @end table
4540
4541 @item T
4542 Nothing if the article is a root and lots of spaces if it isn't (it
4543 pushes everything after it off the screen).
4544 @item [
4545 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4546 for adopted articles (@pxref{Customizing Threading}).
4547 @item ]
4548 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4549 for adopted articles.
4550 @item >
4551 One space for each thread level.
4552 @item <
4553 Twenty minus thread level spaces.
4554 @item U
4555 Unread. @xref{Read Articles}.
4556
4557 @item R
4558 This misleadingly named specifier is the @dfn{secondary mark}.  This
4559 mark will say whether the article has been replied to, has been cached,
4560 or has been saved.  @xref{Other Marks}.
4561
4562 @item i
4563 Score as a number (@pxref{Scoring}).
4564 @item z
4565 @vindex gnus-summary-zcore-fuzz
4566 Zcore, @samp{+} if above the default level and @samp{-} if below the
4567 default level.  If the difference between
4568 @code{gnus-summary-default-score} and the score is less than
4569 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4570 @item V
4571 Total thread score.
4572 @item x
4573 @code{Xref}.
4574 @item D
4575 @code{Date}.
4576 @item d
4577 The @code{Date} in @code{DD-MMM} format.
4578 @item o
4579 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4580 @item M
4581 @code{Message-ID}.
4582 @item r
4583 @code{References}.
4584 @item t
4585 Number of articles in the current sub-thread.  Using this spec will slow
4586 down summary buffer generation somewhat.
4587 @item e
4588 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4589 article has any children.
4590 @item P
4591 The line number.
4592 @item O
4593 Download mark.
4594 @item &user-date;
4595 Age sensitive date format.  Various date format is defined in
4596 @code{gnus-user-date-format-alist}.
4597 @item u
4598 User defined specifier.  The next character in the format string should
4599 be a letter.  Gnus will call the function
4600 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4601 following @samp{%u}.  The function will be passed the current header as
4602 argument.  The function should return a string, which will be inserted
4603 into the summary just like information from any other summary specifier.
4604 @end table
4605
4606 Text between @samp{%(} and @samp{%)} will be highlighted with
4607 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4608 There can only be one such area.
4609
4610 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4611 have to be handled with care.  For reasons of efficiency, gnus will
4612 compute what column these characters will end up in, and ``hard-code''
4613 that.  This means that it is invalid to have these specs after a
4614 variable-length spec.  Well, you might not be arrested, but your summary
4615 buffer will look strange, which is bad enough.
4616
4617 The smart choice is to have these specs as far to the left as possible.
4618 (Isn't that the case with everything, though?  But I digress.)
4619
4620 This restriction may disappear in later versions of gnus.
4621
4622
4623 @node To From Newsgroups
4624 @subsection To From Newsgroups
4625 @cindex To
4626 @cindex Newsgroups
4627
4628 In some groups (particularly in archive groups), the @code{From} header
4629 isn't very interesting, since all the articles there are written by
4630 you.  To display the information in the @code{To} or @code{Newsgroups}
4631 headers instead, you need to decide three things: What information to
4632 gather; where to display it; and when to display it.
4633
4634 @enumerate
4635 @item
4636 @vindex gnus-extra-headers
4637 The reading of extra header information is controlled by the
4638 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4639 instance:
4640
4641 @lisp
4642 (setq gnus-extra-headers
4643       '(To Newsgroups X-Newsreader))
4644 @end lisp
4645
4646 This will result in Gnus trying to obtain these three headers, and
4647 storing it in header structures for later easy retrieval.
4648
4649 @item
4650 @findex gnus-extra-header
4651 The value of these extra headers can be accessed via the
4652 @code{gnus-extra-header} function.  Here's a format line spec that will
4653 access the @code{X-Newsreader} header:
4654
4655 @example
4656 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4657 @end example
4658
4659 @item
4660 @vindex gnus-ignored-from-addresses
4661 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4662 summary line spec returns the @code{To}, @code{Newsreader} or
4663 @code{From} header.  If this regexp matches the contents of the
4664 @code{From} header, the value of the @code{To} or @code{Newsreader}
4665 headers are used instead.
4666
4667 @end enumerate
4668
4669 @vindex nnmail-extra-headers
4670 A related variable is @code{nnmail-extra-headers}, which controls when
4671 to include extra headers when generating overview (@sc{nov}) files.  If
4672 you have old overview files, you should regenerate them after changing
4673 this variable, by entering the server buffer using `^', and then `g' on
4674 the appropriate mail server (e.g. nnml) to cause regeneration.
4675
4676 @vindex gnus-summary-line-format
4677 You also have to instruct Gnus to display the data by changing the
4678 @code{%n} spec to the @code{%f} spec in the
4679 @code{gnus-summary-line-format} variable.
4680
4681 In summary, you'd typically put something like the following in
4682 @file{~/.gnus}:
4683
4684 @lisp
4685 (setq gnus-extra-headers
4686       '(To Newsgroups))
4687 (setq nnmail-extra-headers gnus-extra-headers)
4688 (setq gnus-summary-line-format
4689       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4690 (setq gnus-ignored-from-addresses
4691       "Your Name Here")
4692 @end lisp
4693
4694 (The values listed above are the default values in Gnus.  Alter them
4695 to fit your needs.)
4696
4697 A note for news server administrators, or for users who wish to try to
4698 convince their news server administrator to provide some additional
4699 support:
4700
4701 The above is mostly useful for mail groups, where you have control over
4702 the @sc{nov} files that are created.  However, if you can persuade your
4703 nntp admin to add (in the usual implementation, notably INN):
4704
4705 @example
4706 Newsgroups:full
4707 @end example
4708
4709 to the end of her @file{overview.fmt} file, then you can use that just
4710 as you would the extra headers from the mail groups.
4711
4712
4713 @node Summary Buffer Mode Line
4714 @subsection Summary Buffer Mode Line
4715
4716 @vindex gnus-summary-mode-line-format
4717 You can also change the format of the summary mode bar (@pxref{Mode Line
4718 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4719 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4720
4721 Here are the elements you can play with:
4722
4723 @table @samp
4724 @item G
4725 Group name.
4726 @item p
4727 Unprefixed group name.
4728 @item A
4729 Current article number.
4730 @item z
4731 Current article score.
4732 @item V
4733 Gnus version.
4734 @item U
4735 Number of unread articles in this group.
4736 @item e
4737 Number of unread articles in this group that aren't displayed in the
4738 summary buffer.
4739 @item Z
4740 A string with the number of unread and unselected articles represented
4741 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4742 articles, and just as @samp{<%U more>} if there are just unread articles
4743 and no unselected ones.
4744 @item g
4745 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4746 shortened to @samp{r.a.anime}.
4747 @item S
4748 Subject of the current article.
4749 @item u
4750 User-defined spec (@pxref{User-Defined Specs}).
4751 @item s
4752 Name of the current score file (@pxref{Scoring}).
4753 @item d
4754 Number of dormant articles (@pxref{Unread Articles}).
4755 @item t
4756 Number of ticked articles (@pxref{Unread Articles}).
4757 @item r
4758 Number of articles that have been marked as read in this session.
4759 @item E
4760 Number of articles expunged by the score files.
4761 @end table
4762
4763
4764 @node Summary Highlighting
4765 @subsection Summary Highlighting
4766
4767 @table @code
4768
4769 @item gnus-visual-mark-article-hook
4770 @vindex gnus-visual-mark-article-hook
4771 This hook is run after selecting an article.  It is meant to be used for
4772 highlighting the article in some way.  It is not run if
4773 @code{gnus-visual} is @code{nil}.
4774
4775 @item gnus-summary-update-hook
4776 @vindex gnus-summary-update-hook
4777 This hook is called when a summary line is changed.  It is not run if
4778 @code{gnus-visual} is @code{nil}.
4779
4780 @item gnus-summary-selected-face
4781 @vindex gnus-summary-selected-face
4782 This is the face (or @dfn{font} as some people call it) used to
4783 highlight the current article in the summary buffer.
4784
4785 @item gnus-summary-highlight
4786 @vindex gnus-summary-highlight
4787 Summary lines are highlighted according to this variable, which is a
4788 list where the elements are of the format @code{(@var{form}
4789 . @var{face})}.  If you would, for instance, like ticked articles to be
4790 italic and high-scored articles to be bold, you could set this variable
4791 to something like
4792 @lisp
4793 (((eq mark gnus-ticked-mark) . italic)
4794  ((> score default) . bold))
4795 @end lisp
4796 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4797 @var{face} will be applied to the line.
4798 @end table
4799
4800
4801 @node Summary Maneuvering
4802 @section Summary Maneuvering
4803 @cindex summary movement
4804
4805 All the straight movement commands understand the numeric prefix and
4806 behave pretty much as you'd expect.
4807
4808 None of these commands select articles.
4809
4810 @table @kbd
4811 @item G M-n
4812 @itemx M-n
4813 @kindex M-n (Summary)
4814 @kindex G M-n (Summary)
4815 @findex gnus-summary-next-unread-subject
4816 Go to the next summary line of an unread article
4817 (@code{gnus-summary-next-unread-subject}).
4818
4819 @item G M-p
4820 @itemx M-p
4821 @kindex M-p (Summary)
4822 @kindex G M-p (Summary)
4823 @findex gnus-summary-prev-unread-subject
4824 Go to the previous summary line of an unread article
4825 (@code{gnus-summary-prev-unread-subject}).
4826
4827 @item G g
4828 @kindex G g (Summary)
4829 @findex gnus-summary-goto-subject
4830 Ask for an article number and then go to the summary line of that article
4831 without displaying the article (@code{gnus-summary-goto-subject}).
4832 @end table
4833
4834 If gnus asks you to press a key to confirm going to the next group, you
4835 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4836 buffer, searching for the next group to read without actually returning
4837 to the group buffer.
4838
4839 Variables related to summary movement:
4840
4841 @table @code
4842
4843 @vindex gnus-auto-select-next
4844 @item gnus-auto-select-next
4845 If you issue one of the movement commands (like @kbd{n}) and there are
4846 no more unread articles after the current one, gnus will offer to go to
4847 the next group.  If this variable is @code{t} and the next group is
4848 empty, gnus will exit summary mode and return to the group buffer.  If
4849 this variable is neither @code{t} nor @code{nil}, gnus will select the
4850 next group with unread articles.  As a special case, if this variable
4851 is @code{quietly}, Gnus will select the next group without asking for
4852 confirmation.  If this variable is @code{almost-quietly}, the same
4853 will happen only if you are located on the last article in the group.
4854 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4855 command will go to the next group without confirmation.  Also
4856 @pxref{Group Levels}.
4857
4858 @item gnus-auto-select-same
4859 @vindex gnus-auto-select-same
4860 If non-@code{nil}, all the movement commands will try to go to the next
4861 article with the same subject as the current.  (@dfn{Same} here might
4862 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4863 for details (@pxref{Customizing Threading}).)  If there are no more
4864 articles with the same subject, go to the first unread article.
4865
4866 This variable is not particularly useful if you use a threaded display.
4867
4868 @item gnus-summary-check-current
4869 @vindex gnus-summary-check-current
4870 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4871 to the next (or previous) article if the current article is unread.
4872 Instead, they will choose the current article.
4873
4874 @item gnus-auto-center-summary
4875 @vindex gnus-auto-center-summary
4876 If non-@code{nil}, gnus will keep the point in the summary buffer
4877 centered at all times.  This makes things quite tidy, but if you have a
4878 slow network connection, or simply do not like this un-Emacsism, you can
4879 set this variable to @code{nil} to get the normal Emacs scrolling
4880 action.  This will also inhibit horizontal re-centering of the summary
4881 buffer, which might make it more inconvenient to read extremely long
4882 threads.
4883
4884 This variable can also be a number.  In that case, center the window at
4885 the given number of lines from the top.
4886
4887 @end table
4888
4889
4890 @node Choosing Articles
4891 @section Choosing Articles
4892 @cindex selecting articles
4893
4894 @menu
4895 * Choosing Commands::           Commands for choosing articles.
4896 * Choosing Variables::          Variables that influence these commands.
4897 @end menu
4898
4899
4900 @node Choosing Commands
4901 @subsection Choosing Commands
4902
4903 None of the following movement commands understand the numeric prefix,
4904 and they all select and display an article.
4905
4906 If you want to fetch new articles or redisplay the group, see
4907 @ref{Exiting the Summary Buffer}.
4908
4909 @table @kbd
4910 @item SPACE
4911 @kindex SPACE (Summary)
4912 @findex gnus-summary-next-page
4913 Select the current article, or, if that one's read already, the next
4914 unread article (@code{gnus-summary-next-page}).
4915
4916 @item G n
4917 @itemx n
4918 @kindex n (Summary)
4919 @kindex G n (Summary)
4920 @findex gnus-summary-next-unread-article
4921 @c @icon{gnus-summary-next-unread}
4922 Go to next unread article (@code{gnus-summary-next-unread-article}).
4923
4924 @item G p
4925 @itemx p
4926 @kindex p (Summary)
4927 @findex gnus-summary-prev-unread-article
4928 @c @icon{gnus-summary-prev-unread}
4929 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4930
4931 @item G N
4932 @itemx N
4933 @kindex N (Summary)
4934 @kindex G N (Summary)
4935 @findex gnus-summary-next-article
4936 Go to the next article (@code{gnus-summary-next-article}).
4937
4938 @item G P
4939 @itemx P
4940 @kindex P (Summary)
4941 @kindex G P (Summary)
4942 @findex gnus-summary-prev-article
4943 Go to the previous article (@code{gnus-summary-prev-article}).
4944
4945 @item G C-n
4946 @kindex G C-n (Summary)
4947 @findex gnus-summary-next-same-subject
4948 Go to the next article with the same subject
4949 (@code{gnus-summary-next-same-subject}).
4950
4951 @item G C-p
4952 @kindex G C-p (Summary)
4953 @findex gnus-summary-prev-same-subject
4954 Go to the previous article with the same subject
4955 (@code{gnus-summary-prev-same-subject}).
4956
4957 @item G f
4958 @itemx .
4959 @kindex G f  (Summary)
4960 @kindex .  (Summary)
4961 @findex gnus-summary-first-unread-article
4962 Go to the first unread article
4963 (@code{gnus-summary-first-unread-article}).
4964
4965 @item G b
4966 @itemx ,
4967 @kindex G b (Summary)
4968 @kindex , (Summary)
4969 @findex gnus-summary-best-unread-article
4970 Go to the unread article with the highest score
4971 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
4972 go to the first unread article that has a score over the default score.
4973
4974 @item G l
4975 @itemx l
4976 @kindex l (Summary)
4977 @kindex G l (Summary)
4978 @findex gnus-summary-goto-last-article
4979 Go to the previous article read (@code{gnus-summary-goto-last-article}).
4980
4981 @item G o
4982 @kindex G o (Summary)
4983 @findex gnus-summary-pop-article
4984 @cindex history
4985 @cindex article history
4986 Pop an article off the summary history and go to this article
4987 (@code{gnus-summary-pop-article}).  This command differs from the
4988 command above in that you can pop as many previous articles off the
4989 history as you like, while @kbd{l} toggles the two last read articles.
4990 For a somewhat related issue (if you use these commands a lot),
4991 @pxref{Article Backlog}.
4992
4993 @item G j
4994 @itemx j
4995 @kindex j (Summary)
4996 @kindex G j (Summary)
4997 @findex gnus-summary-goto-article
4998 Ask for an article number or @code{Message-ID}, and then go to that
4999 article (@code{gnus-summary-goto-article}).
5000
5001 @end table
5002
5003
5004 @node Choosing Variables
5005 @subsection Choosing Variables
5006
5007 Some variables relevant for moving and selecting articles:
5008
5009 @table @code
5010 @item gnus-auto-extend-newsgroup
5011 @vindex gnus-auto-extend-newsgroup
5012 All the movement commands will try to go to the previous (or next)
5013 article, even if that article isn't displayed in the Summary buffer if
5014 this variable is non-@code{nil}.  Gnus will then fetch the article from
5015 the server and display it in the article buffer.
5016
5017 @item gnus-select-article-hook
5018 @vindex gnus-select-article-hook
5019 This hook is called whenever an article is selected.  By default it
5020 exposes any threads hidden under the selected article.  If you would 
5021 like each article to be saved in the Agent as you read it, putting
5022 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5023
5024 @item gnus-mark-article-hook
5025 @vindex gnus-mark-article-hook
5026 @findex gnus-summary-mark-unread-as-read
5027 @findex gnus-summary-mark-read-and-unread-as-read
5028 @findex gnus-unread-mark
5029 This hook is called whenever an article is selected.  It is intended to
5030 be used for marking articles as read.  The default value is
5031 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5032 mark of almost any article you read to @code{gnus-unread-mark}.  The
5033 only articles not affected by this function are ticked, dormant, and
5034 expirable articles.  If you'd instead like to just have unread articles
5035 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5036 instead.  It will leave marks like @code{gnus-low-score-mark},
5037 @code{gnus-del-mark} (and so on) alone.
5038
5039 @end table
5040
5041
5042 @node Paging the Article
5043 @section Scrolling the Article
5044 @cindex article scrolling
5045
5046 @table @kbd
5047
5048 @item SPACE
5049 @kindex SPACE (Summary)
5050 @findex gnus-summary-next-page
5051 Pressing @kbd{SPACE} will scroll the current article forward one page,
5052 or, if you have come to the end of the current article, will choose the
5053 next article (@code{gnus-summary-next-page}).
5054
5055 @item DEL
5056 @kindex DEL (Summary)
5057 @findex gnus-summary-prev-page
5058 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5059
5060 @item RET
5061 @kindex RET (Summary)
5062 @findex gnus-summary-scroll-up
5063 Scroll the current article one line forward
5064 (@code{gnus-summary-scroll-up}).
5065
5066 @item M-RET
5067 @kindex M-RET (Summary)
5068 @findex gnus-summary-scroll-down
5069 Scroll the current article one line backward
5070 (@code{gnus-summary-scroll-down}).
5071
5072 @item A g
5073 @itemx g
5074 @kindex A g (Summary)
5075 @kindex g (Summary)
5076 @findex gnus-summary-show-article
5077 @vindex gnus-summary-show-article-charset-alist
5078 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5079 given a prefix, fetch the current article, but don't run any of the
5080 article treatment functions.  This will give you a ``raw'' article, just
5081 the way it came from the server.
5082
5083 If given a numerical prefix, you can do semi-manual charset stuff.
5084 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5085 encoded in the @code{cn-gb-2312} charset.  If you have
5086
5087 @lisp
5088 (setq gnus-summary-show-article-charset-alist
5089       '((1 . cn-gb-2312)
5090         (2 . big5)))
5091 @end lisp
5092
5093 then you can say @kbd{C-u 1 g} to get the same effect.
5094
5095 @item A <
5096 @itemx <
5097 @kindex < (Summary)
5098 @kindex A < (Summary)
5099 @findex gnus-summary-beginning-of-article
5100 Scroll to the beginning of the article
5101 (@code{gnus-summary-beginning-of-article}).
5102
5103 @item A >
5104 @itemx >
5105 @kindex > (Summary)
5106 @kindex A > (Summary)
5107 @findex gnus-summary-end-of-article
5108 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5109
5110 @item A s
5111 @itemx s
5112 @kindex A s (Summary)
5113 @kindex s (Summary)
5114 @findex gnus-summary-isearch-article
5115 Perform an isearch in the article buffer
5116 (@code{gnus-summary-isearch-article}).
5117
5118 @item h
5119 @kindex h (Summary)
5120 @findex gnus-summary-select-article-buffer
5121 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5122
5123 @end table
5124
5125
5126 @node Reply Followup and Post
5127 @section Reply, Followup and Post
5128
5129 @menu
5130 * Summary Mail Commands::       Sending mail.
5131 * Summary Post Commands::       Sending news.
5132 * Summary Message Commands::    Other Message-related commands.
5133 * Canceling and Superseding::   
5134 @end menu
5135
5136
5137 @node Summary Mail Commands
5138 @subsection Summary Mail Commands
5139 @cindex mail
5140 @cindex composing mail
5141
5142 Commands for composing a mail message:
5143
5144 @table @kbd
5145
5146 @item S r
5147 @itemx r
5148 @kindex S r (Summary)
5149 @kindex r (Summary)
5150 @findex gnus-summary-reply
5151 @c @icon{gnus-summary-mail-reply}
5152 @c @icon{gnus-summary-reply}
5153 Mail a reply to the author of the current article
5154 (@code{gnus-summary-reply}).
5155
5156 @item S R
5157 @itemx R
5158 @kindex R (Summary)
5159 @kindex S R (Summary)
5160 @findex gnus-summary-reply-with-original
5161 @c @icon{gnus-summary-reply-with-original}
5162 Mail a reply to the author of the current article and include the
5163 original message (@code{gnus-summary-reply-with-original}).  This
5164 command uses the process/prefix convention.
5165
5166 @item S w
5167 @kindex S w (Summary)
5168 @findex gnus-summary-wide-reply
5169 Mail a wide reply to the author of the current article
5170 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5171 goes out to all people listed in the @code{To}, @code{From} (or
5172 @code{Reply-to}) and @code{Cc} headers.
5173
5174 @item S W
5175 @kindex S W (Summary)
5176 @findex gnus-summary-wide-reply-with-original
5177 Mail a wide reply to the current article and include the original
5178 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5179 the process/prefix convention.
5180
5181 @item S v
5182 @kindex S v (Summary)
5183 @findex gnus-summary-very-wide-reply
5184 Mail a very wide reply to the author of the current article
5185 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5186 that goes out to all people listed in the @code{To}, @code{From} (or
5187 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5188 articles.  This command uses the process/prefix convention.
5189
5190 @item S V
5191 @kindex S V (Summary)
5192 @findex gnus-summary-very-wide-reply-with-original
5193 Mail a very wide reply to the author of the current article and include the
5194 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5195 command uses the process/prefix convention.
5196
5197 @item S B r
5198 @kindex S B r (Summary)
5199 @findex gnus-summary-reply-broken-reply-to
5200 Mail a reply to the author of the current article but ignore the
5201 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5202
5203 @item S B R
5204 @kindex S B R (Summary)
5205 @findex gnus-summary-reply-broken-reply-to-with-original
5206 Mail a reply to the author of the current article and include the
5207 original message but ignore the @code{Reply-To} field
5208 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5209
5210 @item S o m
5211 @itemx C-c C-f
5212 @kindex S o m (Summary)
5213 @kindex C-c C-f (Summary)
5214 @findex gnus-summary-mail-forward
5215 @c @icon{gnus-summary-mail-forward}
5216 Forward the current article to some other person
5217 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5218 headers of the forwarded article.
5219
5220 @item S m
5221 @itemx m
5222 @kindex m (Summary)
5223 @kindex S m (Summary)
5224 @findex gnus-summary-mail-other-window
5225 @c @icon{gnus-summary-mail-originate}
5226 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5227 the posting style of the current group.  If given a prefix, disable that.
5228 If the prefix is 1, prompt for a group name to find the posting style.
5229
5230 @item S i
5231 @itemx i
5232 @kindex i (Summary)
5233 @kindex S i (Summary)
5234 @findex gnus-summary-news-other-window
5235 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5236 post to the current group.  If given a prefix, disable that.  If the
5237 prefix is 1, prompt for a group to post to.
5238
5239 This function actually prepares a news even when using mail groups.
5240 This is useful for "posting" messages to mail groups without actually
5241 sending them over the network: they're just saved directly to the group
5242 in question.  The corresponding back end must have a request-post method
5243 for this to work though.
5244
5245 @item S D b
5246 @kindex S D b (Summary)
5247 @findex gnus-summary-resend-bounced-mail
5248 @cindex bouncing mail
5249 If you have sent a mail, but the mail was bounced back to you for some
5250 reason (wrong address, transient failure), you can use this command to
5251 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5252 will be popped into a mail buffer where you can edit the headers before
5253 sending the mail off again.  If you give a prefix to this command, and
5254 the bounced mail is a reply to some other mail, gnus will try to fetch
5255 that mail and display it for easy perusal of its headers.  This might
5256 very well fail, though.
5257
5258 @item S D r
5259 @kindex S D r (Summary)
5260 @findex gnus-summary-resend-message
5261 Not to be confused with the previous command,
5262 @code{gnus-summary-resend-message} will prompt you for an address to
5263 send the current message off to, and then send it to that place.  The
5264 headers of the message won't be altered---but lots of headers that say
5265 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5266 means that you actually send a mail to someone that has a @code{To}
5267 header that (probably) points to yourself.  This will confuse people.
5268 So, natcherly you'll only do that if you're really eVIl.
5269
5270 This command is mainly used if you have several accounts and want to
5271 ship a mail to a different account of yours.  (If you're both
5272 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5273 to the @code{root} account, you may want to resend it to
5274 @code{postmaster}.  Ordnung muss sein!
5275
5276 This command understands the process/prefix convention
5277 (@pxref{Process/Prefix}).
5278
5279 @item S O m
5280 @kindex S O m (Summary)
5281 @findex gnus-summary-digest-mail-forward
5282 Digest the current series (@pxref{Decoding Articles}) and forward the
5283 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5284 command uses the process/prefix convention (@pxref{Process/Prefix}).
5285
5286 @item S M-c
5287 @kindex S M-c (Summary)
5288 @findex gnus-summary-mail-crosspost-complaint
5289 @cindex crossposting
5290 @cindex excessive crossposting
5291 Send a complaint about excessive crossposting to the author of the
5292 current article (@code{gnus-summary-mail-crosspost-complaint}).
5293
5294 @findex gnus-crosspost-complaint
5295 This command is provided as a way to fight back against the current
5296 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5297 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5298 command understands the process/prefix convention
5299 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5300
5301 @end table
5302
5303 Also @xref{Header Commands, ,Header Commands, message, The Message
5304 Manual}, for more information.
5305
5306
5307 @node Summary Post Commands
5308 @subsection Summary Post Commands
5309 @cindex post
5310 @cindex composing news
5311
5312 Commands for posting a news article:
5313
5314 @table @kbd
5315 @item S p
5316 @itemx a
5317 @kindex a (Summary)
5318 @kindex S p (Summary)
5319 @findex gnus-summary-post-news
5320 @c @icon{gnus-summary-post-news}
5321 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5322 default, post to the current group.  If given a prefix, disable that.
5323 If the prefix is 1, prompt for another group instead.
5324
5325 @item S f
5326 @itemx f
5327 @kindex f (Summary)
5328 @kindex S f (Summary)
5329 @findex gnus-summary-followup
5330 @c @icon{gnus-summary-followup}
5331 Post a followup to the current article (@code{gnus-summary-followup}).
5332
5333 @item S F
5334 @itemx F
5335 @kindex S F (Summary)
5336 @kindex F (Summary)
5337 @c @icon{gnus-summary-followup-with-original}
5338 @findex gnus-summary-followup-with-original
5339 Post a followup to the current article and include the original message
5340 (@code{gnus-summary-followup-with-original}).   This command uses the
5341 process/prefix convention.
5342
5343 @item S n
5344 @kindex S n (Summary)
5345 @findex gnus-summary-followup-to-mail
5346 Post a followup to the current article via news, even if you got the
5347 message through mail (@code{gnus-summary-followup-to-mail}).
5348
5349 @item S N
5350 @kindex S N (Summary)
5351 @findex gnus-summary-followup-to-mail-with-original
5352 Post a followup to the current article via news, even if you got the
5353 message through mail and include the original message
5354 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5355 the process/prefix convention.
5356
5357 @item S o p
5358 @kindex S o p (Summary)
5359 @findex gnus-summary-post-forward
5360 Forward the current article to a newsgroup
5361 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5362 headers of the forwarded article.
5363
5364 @item S O p
5365 @kindex S O p (Summary)
5366 @findex gnus-summary-digest-post-forward
5367 @cindex digests
5368 @cindex making digests
5369 Digest the current series and forward the result to a newsgroup
5370 (@code{gnus-summary-digest-post-forward}).  This command uses the
5371 process/prefix convention.
5372
5373 @item S u
5374 @kindex S u (Summary)
5375 @findex gnus-uu-post-news
5376 @c @icon{gnus-uu-post-news}
5377 Uuencode a file, split it into parts, and post it as a series
5378 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5379 @end table
5380
5381 Also @xref{Header Commands, ,Header Commands, message, The Message
5382 Manual}, for more information.
5383
5384
5385 @node Summary Message Commands
5386 @subsection Summary Message Commands
5387
5388 @table @kbd
5389 @item S y
5390 @kindex S y (Summary)
5391 @findex gnus-summary-yank-message
5392 Yank the current article into an already existing Message composition
5393 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5394 what message buffer you want to yank into, and understands the
5395 process/prefix convention (@pxref{Process/Prefix}).
5396
5397 @end table
5398
5399
5400 @node Canceling and Superseding
5401 @subsection Canceling Articles
5402 @cindex canceling articles
5403 @cindex superseding articles
5404
5405 Have you ever written something, and then decided that you really,
5406 really, really wish you hadn't posted that?
5407
5408 Well, you can't cancel mail, but you can cancel posts.
5409
5410 @findex gnus-summary-cancel-article
5411 @kindex C (Summary)
5412 @c @icon{gnus-summary-cancel-article}
5413 Find the article you wish to cancel (you can only cancel your own
5414 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5415 c} (@code{gnus-summary-cancel-article}).  Your article will be
5416 canceled---machines all over the world will be deleting your article.
5417 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5418
5419 Be aware, however, that not all sites honor cancels, so your article may
5420 live on here and there, while most sites will delete the article in
5421 question.
5422
5423 Gnus will use the ``current'' select method when canceling.  If you
5424 want to use the standard posting method, use the @samp{a} symbolic
5425 prefix (@pxref{Symbolic Prefixes}).
5426
5427 If you discover that you have made some mistakes and want to do some
5428 corrections, you can post a @dfn{superseding} article that will replace
5429 your original article.
5430
5431 @findex gnus-summary-supersede-article
5432 @kindex S (Summary)
5433 Go to the original article and press @kbd{S s}
5434 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5435 where you can edit the article all you want before sending it off the
5436 usual way.
5437
5438 The same goes for superseding as for canceling, only more so: Some
5439 sites do not honor superseding.  On those sites, it will appear that you
5440 have posted almost the same article twice.
5441
5442 If you have just posted the article, and change your mind right away,
5443 there is a trick you can use to cancel/supersede the article without
5444 waiting for the article to appear on your site first.  You simply return
5445 to the post buffer (which is called @code{*sent ...*}).  There you will
5446 find the article you just posted, with all the headers intact.  Change
5447 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5448 header by substituting one of those words for the word
5449 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5450 you would do normally.  The previous article will be
5451 canceled/superseded.
5452
5453 Just remember, kids: There is no 'c' in 'supersede'.
5454
5455 @node Delayed Articles
5456 @section Delayed Articles
5457 @cindex delayed sending
5458 @cindex send delayed
5459
5460 Sometimes, you might wish to delay the sending of a message.  For
5461 example, you might wish to arrange for a message to turn up just in time
5462 to remind your about the birthday of your Significant Other.  For this,
5463 there is the @code{gnus-delay} package.  Setup is simple:
5464
5465 @lisp
5466 (gnus-delay-initialize)
5467 @end lisp
5468
5469 @findex gnus-delay-article
5470 Normally, to send a message you use the @kbd{C-c C-c} command from
5471 Message mode.  To delay a message, use @kbd{C-c C-j}
5472 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5473 message should be delayed.  Possible answers are:
5474
5475 @itemize @bullet
5476 @item
5477 A time span.  Consists of an integer and a letter.  For example,
5478 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5479 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5480 (months) and @code{Y} (years).
5481
5482 @item
5483 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5484 delayed until that day, at a specific time (eight o'clock by default).
5485 See also @code{gnus-delay-default-hour}.
5486
5487 @item
5488 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5489 stuff.  The deadline will be at that time today, except if that time has
5490 already passed, then it's at the given time tomorrow.  So if it's ten
5491 o'clock in the morning and you specify @code{11:15}, then the deadline
5492 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5493 that means a time tomorrow.
5494 @end itemize
5495
5496 The action of the @code{gnus-delay-article} command is influenced by a
5497 couple of variables:
5498
5499 @table @code
5500 @item gnus-delay-default-hour
5501 @vindex gnus-delay-default-hour
5502 When you specify a specific date, the message will be due on that hour
5503 on the given date.  Possible values are integers 0 through 23.
5504
5505 @item gnus-delay-default-delay
5506 @vindex gnus-delay-default-delay
5507 This is a string and gives the default delay.  It can be of any of the
5508 formats described above.
5509
5510 @item gnus-delay-group
5511 @vindex gnus-delay-group
5512 Delayed articles will be kept in this group on the drafts server until
5513 they are due.  You probably don't need to change this.  The default
5514 value is @code{"delayed"}.
5515
5516 @item gnus-delay-header
5517 @vindex gnus-delay-header
5518 The deadline for each article will be stored in a header.  This variable
5519 is a string and gives the header name.  You probably don't need to
5520 change this.  The default value is @code{"X-Gnus-Delayed"}.
5521 @end table
5522
5523 The way delaying works is like this: when you use the
5524 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5525 calculates the deadline of the message and stores it in the
5526 @code{X-Gnus-Delayed} header and puts the message in the
5527 @code{nndraft:delayed} group.
5528
5529 And whenever you get new news, Gnus looks through the group for articles
5530 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5531 function for this.  By default, this function is added to the hook
5532 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5533 Maybe you want to use the demon to send drafts?  Just tell the demon to
5534 execute the @code{gnus-delay-send-queue} function.
5535
5536 @table @code
5537 @item gnus-delay-initialize
5538 @findex gnus-delay-initialize
5539
5540 By default, this function installs @code{gnus-delay-send-queue} in
5541 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5542 argument @code{no-check}.  If it is non-@code{nil},
5543 @code{gnus-get-new-news-hook} is not changed.  The optional first
5544 argument is ignored.
5545
5546 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5547 Presumably, you want to use the demon for sending due delayed articles.
5548 Just don't forget to set that up :-)
5549 @end table
5550
5551
5552 @node Marking Articles
5553 @section Marking Articles
5554 @cindex article marking
5555 @cindex article ticking
5556 @cindex marks
5557
5558 There are several marks you can set on an article.
5559
5560 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5561 neologism ohoy!) of the article.  Alphabetic marks generally mean
5562 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5563
5564 In addition, you also have marks that do not affect readedness.
5565
5566 @menu
5567 * Unread Articles::             Marks for unread articles.
5568 * Read Articles::               Marks for read articles.
5569 * Other Marks::                 Marks that do not affect readedness.
5570 @end menu
5571
5572 @ifinfo
5573 There's a plethora of commands for manipulating these marks:
5574 @end ifinfo
5575
5576 @menu
5577 * Setting Marks::             How to set and remove marks.
5578 * Generic Marking Commands::  How to customize the marking.
5579 * Setting Process Marks::     How to mark articles for later processing.
5580 @end menu
5581
5582
5583 @node Unread Articles
5584 @subsection Unread Articles
5585
5586 The following marks mark articles as (kinda) unread, in one form or
5587 other.
5588
5589 @table @samp
5590 @item !
5591 @vindex gnus-ticked-mark
5592 Marked as ticked (@code{gnus-ticked-mark}).
5593
5594 @dfn{Ticked articles} are articles that will remain visible always.  If
5595 you see an article that you find interesting, or you want to put off
5596 reading it, or replying to it, until sometime later, you'd typically
5597 tick it.  However, articles can be expired (from news servers by the
5598 news server software, Gnus itself never expires ticked messages), so if
5599 you want to keep an article forever, you'll have to make it persistent
5600 (@pxref{Persistent Articles}).
5601
5602 @item ?
5603 @vindex gnus-dormant-mark
5604 Marked as dormant (@code{gnus-dormant-mark}).
5605
5606 @dfn{Dormant articles} will only appear in the summary buffer if there
5607 are followups to it.  If you want to see them even if they don't have
5608 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5609 Otherwise (except for the visibility issue), they are just like ticked
5610 messages.
5611
5612 @item SPACE
5613 @vindex gnus-unread-mark
5614 Marked as unread (@code{gnus-unread-mark}).
5615
5616 @dfn{Unread articles} are articles that haven't been read at all yet.
5617 @end table
5618
5619
5620 @node Read Articles
5621 @subsection Read Articles
5622 @cindex expirable mark
5623
5624 All the following marks mark articles as read.
5625
5626 @table @samp
5627
5628 @item r
5629 @vindex gnus-del-mark
5630 These are articles that the user has marked as read with the @kbd{d}
5631 command manually, more or less (@code{gnus-del-mark}).
5632
5633 @item R
5634 @vindex gnus-read-mark
5635 Articles that have actually been read (@code{gnus-read-mark}).
5636
5637 @item O
5638 @vindex gnus-ancient-mark
5639 Articles that were marked as read in previous sessions and are now
5640 @dfn{old} (@code{gnus-ancient-mark}).
5641
5642 @item K
5643 @vindex gnus-killed-mark
5644 Marked as killed (@code{gnus-killed-mark}).
5645
5646 @item X
5647 @vindex gnus-kill-file-mark
5648 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5649
5650 @item Y
5651 @vindex gnus-low-score-mark
5652 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5653
5654 @item C
5655 @vindex gnus-catchup-mark
5656 Marked as read by a catchup (@code{gnus-catchup-mark}).
5657
5658 @item G
5659 @vindex gnus-canceled-mark
5660 Canceled article (@code{gnus-canceled-mark})
5661
5662 @item F
5663 @vindex gnus-souped-mark
5664 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5665
5666 @item Q
5667 @vindex gnus-sparse-mark
5668 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5669 Threading}.
5670
5671 @item M
5672 @vindex gnus-duplicate-mark
5673 Article marked as read by duplicate suppression
5674 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5675
5676 @end table
5677
5678 All these marks just mean that the article is marked as read, really.
5679 They are interpreted differently when doing adaptive scoring, though.
5680
5681 One more special mark, though:
5682
5683 @table @samp
5684 @item E
5685 @vindex gnus-expirable-mark
5686 Marked as expirable (@code{gnus-expirable-mark}).
5687
5688 Marking articles as @dfn{expirable} (or have them marked as such
5689 automatically) doesn't make much sense in normal groups---a user doesn't
5690 control expiring of news articles, but in mail groups, for instance,
5691 articles marked as @dfn{expirable} can be deleted by gnus at
5692 any time.
5693 @end table
5694
5695
5696 @node Other Marks
5697 @subsection Other Marks
5698 @cindex process mark
5699 @cindex bookmarks
5700
5701 There are some marks that have nothing to do with whether the article is
5702 read or not.
5703
5704 @itemize @bullet
5705
5706 @item
5707 You can set a bookmark in the current article.  Say you are reading a
5708 long thesis on cats' urinary tracts, and have to go home for dinner
5709 before you've finished reading the thesis.  You can then set a bookmark
5710 in the article, and gnus will jump to this bookmark the next time it
5711 encounters the article.  @xref{Setting Marks}.
5712
5713 @item
5714 @vindex gnus-replied-mark
5715 All articles that you have replied to or made a followup to (i.e., have
5716 answered) will be marked with an @samp{A} in the second column
5717 (@code{gnus-replied-mark}).
5718
5719 @item
5720 @vindex gnus-forwarded-mark
5721 All articles that you have forwarded will be marked with an @samp{F} in
5722 the second column (@code{gnus-forwarded-mark}).
5723
5724 @item
5725 @vindex gnus-cached-mark
5726 Articles stored in the article cache will be marked with an @samp{*} in
5727 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5728
5729 @item
5730 @vindex gnus-saved-mark
5731 Articles ``saved'' (in some manner or other; not necessarily
5732 religiously) are marked with an @samp{S} in the second column
5733 (@code{gnus-saved-mark}).
5734
5735 @item
5736 @vindex gnus-recent-mark
5737 Articles that according to the server haven't been shown to the user
5738 before are marked with a @samp{N} in the second column
5739 (@code{gnus-recent-mark}).  Note that not all servers support this
5740 mark, in which case it simply never appears. Compare with
5741 @code{gnus-unseen-mark}.
5742
5743 @item
5744 @vindex gnus-unseen-mark
5745 Articles that haven't been seen before in Gnus by the user are marked
5746 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5747 Compare with @code{gnus-recent-mark}.
5748
5749 @item
5750 @vindex gnus-downloaded-mark
5751 When using the Gnus agent @pxref{Agent Basics}, articles may be
5752 downloaded for unplugged (offline) viewing.  If you are using the
5753 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5754 (The variable @code{gnus-downloaded-mark} controls which character to
5755 use.)
5756
5757 @item
5758 @vindex gnus-undownloaded-mark
5759 When using the Gnus agent @pxref{Agent Basics}, some articles might
5760 not have been downloaded.  Such articles cannot be viewed while you
5761 are unplugged (offline).  If you are using the @samp{%O} spec, these
5762 articles get the @samp{-} mark in that spec.  (The variable
5763 @code{gnus-undownloaded-mark} controls which character to use.)
5764
5765 @item
5766 @vindex gnus-downloadable-mark
5767 The Gnus agent @pxref{Agent Basics} downloads some articles
5768 automatically, but it is also possible to explicitly mark articles for
5769 download, even if they would not be downloaded automatically.  Such
5770 explicitly-marked articles get the @samp{%} mark in the first column.
5771 (The variable @code{gnus-downloadable-mark} controls which character to
5772 use.)
5773
5774 @item
5775 @vindex gnus-not-empty-thread-mark
5776 @vindex gnus-empty-thread-mark
5777 If the @samp{%e} spec is used, the presence of threads or not will be
5778 marked with @code{gnus-not-empty-thread-mark} and
5779 @code{gnus-empty-thread-mark} in the third column, respectively.
5780
5781 @item
5782 @vindex gnus-process-mark
5783 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5784 variety of commands react to the presence of the process mark.  For
5785 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5786 all articles that have been marked with the process mark.  Articles
5787 marked with the process mark have a @samp{#} in the second column.
5788
5789 @end itemize
5790
5791 You might have noticed that most of these ``non-readedness'' marks
5792 appear in the second column by default.  So if you have a cached, saved,
5793 replied article that you have process-marked, what will that look like?
5794
5795 Nothing much.  The precedence rules go as follows: process -> cache ->
5796 replied -> saved.  So if the article is in the cache and is replied,
5797 you'll only see the cache mark and not the replied mark.
5798
5799
5800 @node Setting Marks
5801 @subsection Setting Marks
5802 @cindex setting marks
5803
5804 All the marking commands understand the numeric prefix.
5805
5806 @table @kbd
5807 @item M c
5808 @itemx M-u
5809 @kindex M c (Summary)
5810 @kindex M-u (Summary)
5811 @findex gnus-summary-clear-mark-forward
5812 @cindex mark as unread
5813 Clear all readedness-marks from the current article
5814 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5815 article as unread.
5816
5817 @item M t
5818 @itemx !
5819 @kindex ! (Summary)
5820 @kindex M t (Summary)
5821 @findex gnus-summary-tick-article-forward
5822 Tick the current article (@code{gnus-summary-tick-article-forward}).
5823 @xref{Article Caching}.
5824
5825 @item M ?
5826 @itemx ?
5827 @kindex ? (Summary)
5828 @kindex M ? (Summary)
5829 @findex gnus-summary-mark-as-dormant
5830 Mark the current article as dormant
5831 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5832
5833 @item M d
5834 @itemx d
5835 @kindex M d (Summary)
5836 @kindex d (Summary)
5837 @findex gnus-summary-mark-as-read-forward
5838 Mark the current article as read
5839 (@code{gnus-summary-mark-as-read-forward}).
5840
5841 @item D
5842 @kindex D (Summary)
5843 @findex gnus-summary-mark-as-read-backward
5844 Mark the current article as read and move point to the previous line
5845 (@code{gnus-summary-mark-as-read-backward}).
5846
5847 @item M k
5848 @itemx k
5849 @kindex k (Summary)
5850 @kindex M k (Summary)
5851 @findex gnus-summary-kill-same-subject-and-select
5852 Mark all articles that have the same subject as the current one as read,
5853 and then select the next unread article
5854 (@code{gnus-summary-kill-same-subject-and-select}).
5855
5856 @item M K
5857 @itemx C-k
5858 @kindex M K (Summary)
5859 @kindex C-k (Summary)
5860 @findex gnus-summary-kill-same-subject
5861 Mark all articles that have the same subject as the current one as read
5862 (@code{gnus-summary-kill-same-subject}).
5863
5864 @item M C
5865 @kindex M C (Summary)
5866 @findex gnus-summary-catchup
5867 @c @icon{gnus-summary-catchup}
5868 Mark all unread articles as read (@code{gnus-summary-catchup}).
5869
5870 @item M C-c
5871 @kindex M C-c (Summary)
5872 @findex gnus-summary-catchup-all
5873 Mark all articles in the group as read---even the ticked and dormant
5874 articles (@code{gnus-summary-catchup-all}).
5875
5876 @item M H
5877 @kindex M H (Summary)
5878 @findex gnus-summary-catchup-to-here
5879 Catchup the current group to point (before the point)
5880 (@code{gnus-summary-catchup-to-here}).
5881
5882 @item M h
5883 @kindex M h (Summary)
5884 @findex gnus-summary-catchup-from-here
5885 Catchup the current group from point (after the point)
5886 (@code{gnus-summary-catchup-from-here}).
5887
5888 @item C-w
5889 @kindex C-w (Summary)
5890 @findex gnus-summary-mark-region-as-read
5891 Mark all articles between point and mark as read
5892 (@code{gnus-summary-mark-region-as-read}).
5893
5894 @item M V k
5895 @kindex M V k (Summary)
5896 @findex gnus-summary-kill-below
5897 Kill all articles with scores below the default score (or below the
5898 numeric prefix) (@code{gnus-summary-kill-below}).
5899
5900 @item M e
5901 @itemx E
5902 @kindex M e (Summary)
5903 @kindex E (Summary)
5904 @findex gnus-summary-mark-as-expirable
5905 Mark the current article as expirable
5906 (@code{gnus-summary-mark-as-expirable}).
5907
5908 @item M b
5909 @kindex M b (Summary)
5910 @findex gnus-summary-set-bookmark
5911 Set a bookmark in the current article
5912 (@code{gnus-summary-set-bookmark}).
5913
5914 @item M B
5915 @kindex M B (Summary)
5916 @findex gnus-summary-remove-bookmark
5917 Remove the bookmark from the current article
5918 (@code{gnus-summary-remove-bookmark}).
5919
5920 @item M V c
5921 @kindex M V c (Summary)
5922 @findex gnus-summary-clear-above
5923 Clear all marks from articles with scores over the default score (or
5924 over the numeric prefix) (@code{gnus-summary-clear-above}).
5925
5926 @item M V u
5927 @kindex M V u (Summary)
5928 @findex gnus-summary-tick-above
5929 Tick all articles with scores over the default score (or over the
5930 numeric prefix) (@code{gnus-summary-tick-above}).
5931
5932 @item M V m
5933 @kindex M V m (Summary)
5934 @findex gnus-summary-mark-above
5935 Prompt for a mark, and mark all articles with scores over the default
5936 score (or over the numeric prefix) with this mark
5937 (@code{gnus-summary-clear-above}).
5938 @end table
5939
5940 @vindex gnus-summary-goto-unread
5941 The @code{gnus-summary-goto-unread} variable controls what action should
5942 be taken after setting a mark.  If non-@code{nil}, point will move to
5943 the next/previous unread article.  If @code{nil}, point will just move
5944 one line up or down.  As a special case, if this variable is
5945 @code{never}, all the marking commands as well as other commands (like
5946 @kbd{SPACE}) will move to the next article, whether it is unread or not.
5947 The default is @code{t}.
5948
5949
5950 @node Generic Marking Commands
5951 @subsection Generic Marking Commands
5952
5953 Some people would like the command that ticks an article (@kbd{!}) go to
5954 the next article.  Others would like it to go to the next unread
5955 article.  Yet others would like it to stay on the current article.  And
5956 even though I haven't heard of anybody wanting it to go to the
5957 previous (unread) article, I'm sure there are people that want that as
5958 well.
5959
5960 Multiply these five behaviors with five different marking commands, and
5961 you get a potentially complex set of variable to control what each
5962 command should do.
5963
5964 To sidestep that mess, Gnus provides commands that do all these
5965 different things.  They can be found on the @kbd{M M} map in the summary
5966 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
5967 to list in this manual.
5968
5969 While you can use these commands directly, most users would prefer
5970 altering the summary mode keymap.  For instance, if you would like the
5971 @kbd{!} command to go to the next article instead of the next unread
5972 article, you could say something like:
5973
5974 @lisp
5975 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
5976 (defun my-alter-summary-map ()
5977   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
5978 @end lisp
5979
5980 or
5981
5982 @lisp
5983 (defun my-alter-summary-map ()
5984   (local-set-key "!" "MM!n"))
5985 @end lisp
5986
5987
5988 @node Setting Process Marks
5989 @subsection Setting Process Marks
5990 @cindex setting process marks
5991
5992 Process marks are displayed as @code{#} in the summary buffer, and are
5993 used for marking articles in such a way that other commands will
5994 process these articles.  For instance, if you process mark four
5995 articles and then use the @kbd{*} command, Gnus will enter these four
5996 commands into the cache.  For more information,
5997 @pxref{Process/Prefix}.
5998
5999 @table @kbd
6000
6001 @item M P p
6002 @itemx #
6003 @kindex # (Summary)
6004 @kindex M P p (Summary)
6005 @findex gnus-summary-mark-as-processable
6006 Mark the current article with the process mark
6007 (@code{gnus-summary-mark-as-processable}).
6008 @findex gnus-summary-unmark-as-processable
6009
6010 @item M P u
6011 @itemx M-#
6012 @kindex M P u (Summary)
6013 @kindex M-# (Summary)
6014 Remove the process mark, if any, from the current article
6015 (@code{gnus-summary-unmark-as-processable}).
6016
6017 @item M P U
6018 @kindex M P U (Summary)
6019 @findex gnus-summary-unmark-all-processable
6020 Remove the process mark from all articles
6021 (@code{gnus-summary-unmark-all-processable}).
6022
6023 @item M P i
6024 @kindex M P i (Summary)
6025 @findex gnus-uu-invert-processable
6026 Invert the list of process marked articles
6027 (@code{gnus-uu-invert-processable}).
6028
6029 @item M P R
6030 @kindex M P R (Summary)
6031 @findex gnus-uu-mark-by-regexp
6032 Mark articles that have a @code{Subject} header that matches a regular
6033 expression (@code{gnus-uu-mark-by-regexp}).
6034
6035 @item M P G
6036 @kindex M P G (Summary)
6037 @findex gnus-uu-unmark-by-regexp
6038 Unmark articles that have a @code{Subject} header that matches a regular
6039 expression (@code{gnus-uu-unmark-by-regexp}).
6040
6041 @item M P r
6042 @kindex M P r (Summary)
6043 @findex gnus-uu-mark-region
6044 Mark articles in region (@code{gnus-uu-mark-region}).
6045
6046 @item M P g
6047 @kindex M P g
6048 @findex gnus-uu-unmark-region
6049 Unmark articles in region (@code{gnus-uu-unmark-region}).
6050
6051 @item M P t
6052 @kindex M P t (Summary)
6053 @findex gnus-uu-mark-thread
6054 Mark all articles in the current (sub)thread
6055 (@code{gnus-uu-mark-thread}).
6056
6057 @item M P T
6058 @kindex M P T (Summary)
6059 @findex gnus-uu-unmark-thread
6060 Unmark all articles in the current (sub)thread
6061 (@code{gnus-uu-unmark-thread}).
6062
6063 @item M P v
6064 @kindex M P v (Summary)
6065 @findex gnus-uu-mark-over
6066 Mark all articles that have a score above the prefix argument
6067 (@code{gnus-uu-mark-over}).
6068
6069 @item M P s
6070 @kindex M P s (Summary)
6071 @findex gnus-uu-mark-series
6072 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6073
6074 @item M P S
6075 @kindex M P S (Summary)
6076 @findex gnus-uu-mark-sparse
6077 Mark all series that have already had some articles marked
6078 (@code{gnus-uu-mark-sparse}).
6079
6080 @item M P a
6081 @kindex M P a (Summary)
6082 @findex gnus-uu-mark-all
6083 Mark all articles in series order (@code{gnus-uu-mark-series}).
6084
6085 @item M P b
6086 @kindex M P b (Summary)
6087 @findex gnus-uu-mark-buffer
6088 Mark all articles in the buffer in the order they appear
6089 (@code{gnus-uu-mark-buffer}).
6090
6091 @item M P k
6092 @kindex M P k (Summary)
6093 @findex gnus-summary-kill-process-mark
6094 Push the current process mark set onto the stack and unmark all articles
6095 (@code{gnus-summary-kill-process-mark}).
6096
6097 @item M P y
6098 @kindex M P y (Summary)
6099 @findex gnus-summary-yank-process-mark
6100 Pop the previous process mark set from the stack and restore it
6101 (@code{gnus-summary-yank-process-mark}).
6102
6103 @item M P w
6104 @kindex M P w (Summary)
6105 @findex gnus-summary-save-process-mark
6106 Push the current process mark set onto the stack
6107 (@code{gnus-summary-save-process-mark}).
6108
6109 @end table
6110
6111 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6112 set process marks based on article body contents.
6113
6114
6115 @node Limiting
6116 @section Limiting
6117 @cindex limiting
6118
6119 It can be convenient to limit the summary buffer to just show some
6120 subset of the articles currently in the group.  The effect most limit
6121 commands have is to remove a few (or many) articles from the summary
6122 buffer.
6123
6124 All limiting commands work on subsets of the articles already fetched
6125 from the servers.  None of these commands query the server for
6126 additional articles.
6127
6128 @table @kbd
6129
6130 @item / /
6131 @itemx / s
6132 @kindex / / (Summary)
6133 @findex gnus-summary-limit-to-subject
6134 Limit the summary buffer to articles that match some subject
6135 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6136 matching articles.
6137
6138 @item / a
6139 @kindex / a (Summary)
6140 @findex gnus-summary-limit-to-author
6141 Limit the summary buffer to articles that match some author
6142 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6143 matching articles.
6144
6145 @item / x
6146 @kindex / x (Summary)
6147 @findex gnus-summary-limit-to-extra
6148 Limit the summary buffer to articles that match one of the ``extra''
6149 headers (@pxref{To From Newsgroups})
6150 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6151 matching articles.
6152
6153 @item / u
6154 @itemx x
6155 @kindex / u (Summary)
6156 @kindex x (Summary)
6157 @findex gnus-summary-limit-to-unread
6158 Limit the summary buffer to articles not marked as read
6159 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6160 buffer to articles strictly unread.  This means that ticked and
6161 dormant articles will also be excluded.
6162
6163 @item / m
6164 @kindex / m (Summary)
6165 @findex gnus-summary-limit-to-marks
6166 Ask for a mark and then limit to all articles that have been marked
6167 with that mark (@code{gnus-summary-limit-to-marks}).
6168
6169 @item / t
6170 @kindex / t (Summary)
6171 @findex gnus-summary-limit-to-age
6172 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6173 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6174 articles younger than that number of days.
6175
6176 @item / n
6177 @kindex / n (Summary)
6178 @findex gnus-summary-limit-to-articles
6179 Limit the summary buffer to the current article
6180 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6181 convention (@pxref{Process/Prefix}).
6182
6183 @item / w
6184 @kindex / w (Summary)
6185 @findex gnus-summary-pop-limit
6186 Pop the previous limit off the stack and restore it
6187 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6188 the stack.
6189
6190 @item / .
6191 @kindex / . (Summary)
6192 @findex gnus-summary-limit-to-unseen
6193 Limit the summary buffer to the unseen articles
6194 (@code{gnus-summary-limit-to-unseen}).
6195
6196 @item / v
6197 @kindex / v (Summary)
6198 @findex gnus-summary-limit-to-score
6199 Limit the summary buffer to articles that have a score at or above some
6200 score (@code{gnus-summary-limit-to-score}).
6201
6202 @item / p
6203 @kindex / p (Summary)
6204 @findex gnus-summary-limit-to-display-predicate
6205 Limit the summary buffer to articles that satisfy the @code{display}
6206 group parameter predicate
6207 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6208 Parameters} for more on this predicate.
6209
6210 @item / E
6211 @itemx M S
6212 @kindex M S (Summary)
6213 @kindex / E (Summary)
6214 @findex gnus-summary-limit-include-expunged
6215 Include all expunged articles in the limit
6216 (@code{gnus-summary-limit-include-expunged}).
6217
6218 @item / D
6219 @kindex / D (Summary)
6220 @findex gnus-summary-limit-include-dormant
6221 Include all dormant articles in the limit
6222 (@code{gnus-summary-limit-include-dormant}).
6223
6224 @item / *
6225 @kindex / * (Summary)
6226 @findex gnus-summary-limit-include-cached
6227 Include all cached articles in the limit
6228 (@code{gnus-summary-limit-include-cached}).
6229
6230 @item / d
6231 @kindex / d (Summary)
6232 @findex gnus-summary-limit-exclude-dormant
6233 Exclude all dormant articles from the limit
6234 (@code{gnus-summary-limit-exclude-dormant}).
6235
6236 @item / M
6237 @kindex / M (Summary)
6238 @findex gnus-summary-limit-exclude-marks
6239 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6240
6241 @item / T
6242 @kindex / T (Summary)
6243 @findex gnus-summary-limit-include-thread
6244 Include all the articles in the current thread in the limit.
6245
6246 @item / c
6247 @kindex / c (Summary)
6248 @findex gnus-summary-limit-exclude-childless-dormant
6249 Exclude all dormant articles that have no children from the limit
6250 (@code{gnus-summary-limit-exclude-childless-dormant}).
6251
6252 @item / C
6253 @kindex / C (Summary)
6254 @findex gnus-summary-limit-mark-excluded-as-read
6255 Mark all excluded unread articles as read
6256 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6257 also mark excluded ticked and dormant articles as read.
6258
6259 @item / N
6260 @kindex / N (Summary)
6261 @findex gnus-summary-insert-new-articles
6262 Insert all new articles in the summary buffer. It scans for new emails
6263 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6264
6265 @item / o
6266 @kindex / o (Summary)
6267 @findex gnus-summary-insert-old-articles
6268 Insert all old articles in the summary buffer. If given a numbered
6269 prefix, fetch this number of articles.
6270
6271 @end table
6272
6273
6274 @node Threading
6275 @section Threading
6276 @cindex threading
6277 @cindex article threading
6278
6279 Gnus threads articles by default.  @dfn{To thread} is to put responses
6280 to articles directly after the articles they respond to---in a
6281 hierarchical fashion.
6282
6283 Threading is done by looking at the @code{References} headers of the
6284 articles.  In a perfect world, this would be enough to build pretty
6285 trees, but unfortunately, the @code{References} header is often broken
6286 or simply missing.  Weird news propagation exacerbates the problem,
6287 so one has to employ other heuristics to get pleasing results.  A
6288 plethora of approaches exists, as detailed in horrible detail in
6289 @pxref{Customizing Threading}.
6290
6291 First, a quick overview of the concepts:
6292
6293 @table @dfn
6294 @item root
6295 The top-most article in a thread; the first article in the thread.
6296
6297 @item thread
6298 A tree-like article structure.
6299
6300 @item sub-thread
6301 A small(er) section of this tree-like structure.
6302
6303 @item loose threads
6304 Threads often lose their roots due to article expiry, or due to the root
6305 already having been read in a previous session, and not displayed in the
6306 summary buffer.  We then typically have many sub-threads that really
6307 belong to one thread, but are without connecting roots.  These are
6308 called loose threads.
6309
6310 @item thread gathering
6311 An attempt to gather loose threads into bigger threads.
6312
6313 @item sparse threads
6314 A thread where the missing articles have been ``guessed'' at, and are
6315 displayed as empty lines in the summary buffer.
6316
6317 @end table
6318
6319
6320 @menu
6321 * Customizing Threading::       Variables you can change to affect the threading.
6322 * Thread Commands::             Thread based commands in the summary buffer.
6323 @end menu
6324
6325
6326 @node Customizing Threading
6327 @subsection Customizing Threading
6328 @cindex customizing threading
6329
6330 @menu
6331 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6332 * Filling In Threads::          Making the threads displayed look fuller.
6333 * More Threading::              Even more variables for fiddling with threads.
6334 * Low-Level Threading::         You thought it was over... but you were wrong!
6335 @end menu
6336
6337
6338 @node Loose Threads
6339 @subsubsection Loose Threads
6340 @cindex <
6341 @cindex >
6342 @cindex loose threads
6343
6344 @table @code
6345 @item gnus-summary-make-false-root
6346 @vindex gnus-summary-make-false-root
6347 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6348 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6349 Yup.)  Loose subtrees occur when the real root has expired, or you've
6350 read or killed the root in a previous session.
6351
6352 When there is no real root of a thread, gnus will have to fudge
6353 something.  This variable says what fudging method gnus should use.
6354 There are four possible values:
6355
6356 @iftex
6357 @iflatex
6358 \gnusfigure{The Summary Buffer}{390}{
6359 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6360 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6361 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6362 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6363 }
6364 @end iflatex
6365 @end iftex
6366
6367 @cindex adopting articles
6368
6369 @table @code
6370
6371 @item adopt
6372 Gnus will make the first of the orphaned articles the parent.  This
6373 parent will adopt all the other articles.  The adopted articles will be
6374 marked as such by pointy brackets (@samp{<>}) instead of the standard
6375 square brackets (@samp{[]}).  This is the default method.
6376
6377 @item dummy
6378 @vindex gnus-summary-dummy-line-format
6379 @vindex gnus-summary-make-false-root-always
6380 Gnus will create a dummy summary line that will pretend to be the
6381 parent.  This dummy line does not correspond to any real article, so
6382 selecting it will just select the first real article after the dummy
6383 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6384 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6385 which is the subject of the article.  @xref{Formatting Variables}.
6386 If you want all threads to have a dummy root, even the non-gathered
6387 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6388
6389 @item empty
6390 Gnus won't actually make any article the parent, but simply leave the
6391 subject field of all orphans except the first empty.  (Actually, it will
6392 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6393 Buffer Format}).)
6394
6395 @item none
6396 Don't make any article parent at all.  Just gather the threads and
6397 display them after one another.
6398
6399 @item nil
6400 Don't gather loose threads.
6401 @end table
6402
6403 @item gnus-summary-gather-subject-limit
6404 @vindex gnus-summary-gather-subject-limit
6405 Loose threads are gathered by comparing subjects of articles.  If this
6406 variable is @code{nil}, gnus requires an exact match between the
6407 subjects of the loose threads before gathering them into one big
6408 super-thread.  This might be too strict a requirement, what with the
6409 presence of stupid newsreaders that chop off long subject lines.  If
6410 you think so, set this variable to, say, 20 to require that only the
6411 first 20 characters of the subjects have to match.  If you set this
6412 variable to a really low number, you'll find that gnus will gather
6413 everything in sight into one thread, which isn't very helpful.
6414
6415 @cindex fuzzy article gathering
6416 If you set this variable to the special value @code{fuzzy}, gnus will
6417 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6418 Matching}).
6419
6420 @item gnus-simplify-subject-fuzzy-regexp
6421 @vindex gnus-simplify-subject-fuzzy-regexp
6422 This can either be a regular expression or list of regular expressions
6423 that match strings that will be removed from subjects if fuzzy subject
6424 simplification is used.
6425
6426 @item gnus-simplify-ignored-prefixes
6427 @vindex gnus-simplify-ignored-prefixes
6428 If you set @code{gnus-summary-gather-subject-limit} to something as low
6429 as 10, you might consider setting this variable to something sensible:
6430
6431 @c Written by Michael Ernst <mernst@cs.rice.edu>
6432 @lisp
6433 (setq gnus-simplify-ignored-prefixes
6434       (concat
6435        "\\`\\[?\\("
6436        (mapconcat
6437         'identity
6438         '("looking"
6439           "wanted" "followup" "summary\\( of\\)?"
6440           "help" "query" "problem" "question"
6441           "answer" "reference" "announce"
6442           "How can I" "How to" "Comparison of"
6443           ;; ...
6444           )
6445         "\\|")
6446        "\\)\\s *\\("
6447        (mapconcat 'identity
6448                   '("for" "for reference" "with" "about")
6449                   "\\|")
6450        "\\)?\\]?:?[ \t]*"))
6451 @end lisp
6452
6453 All words that match this regexp will be removed before comparing two
6454 subjects.
6455
6456 @item gnus-simplify-subject-functions
6457 @vindex gnus-simplify-subject-functions
6458 If non-@code{nil}, this variable overrides
6459 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6460 list of functions to apply to the @code{Subject} string iteratively to
6461 arrive at the simplified version of the string.
6462
6463 Useful functions to put in this list include:
6464
6465 @table @code
6466 @item gnus-simplify-subject-re
6467 @findex gnus-simplify-subject-re
6468 Strip the leading @samp{Re:}.
6469
6470 @item gnus-simplify-subject-fuzzy
6471 @findex gnus-simplify-subject-fuzzy
6472 Simplify fuzzily.
6473
6474 @item gnus-simplify-whitespace
6475 @findex gnus-simplify-whitespace
6476 Remove excessive whitespace.
6477
6478 @item gnus-simplify-all-whitespace
6479 @findex gnus-simplify-all-whitespace
6480 Remove all whitespace.
6481 @end table
6482
6483 You may also write your own functions, of course.
6484
6485
6486 @item gnus-summary-gather-exclude-subject
6487 @vindex gnus-summary-gather-exclude-subject
6488 Since loose thread gathering is done on subjects only, that might lead
6489 to many false hits, especially with certain common subjects like
6490 @samp{} and @samp{(none)}.  To make the situation slightly better,
6491 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6492 what subjects should be excluded from the gathering process.@*
6493 The default is @samp{^ *$\\|^(none)$}.
6494
6495 @item gnus-summary-thread-gathering-function
6496 @vindex gnus-summary-thread-gathering-function
6497 Gnus gathers threads by looking at @code{Subject} headers.  This means
6498 that totally unrelated articles may end up in the same ``thread'', which
6499 is confusing.  An alternate approach is to look at all the
6500 @code{Message-ID}s in all the @code{References} headers to find matches.
6501 This will ensure that no gathered threads ever include unrelated
6502 articles, but it also means that people who have posted with broken
6503 newsreaders won't be gathered properly.  The choice is yours---plague or
6504 cholera:
6505
6506 @table @code
6507 @item gnus-gather-threads-by-subject
6508 @findex gnus-gather-threads-by-subject
6509 This function is the default gathering function and looks at
6510 @code{Subject}s exclusively.
6511
6512 @item gnus-gather-threads-by-references
6513 @findex gnus-gather-threads-by-references
6514 This function looks at @code{References} headers exclusively.
6515 @end table
6516
6517 If you want to test gathering by @code{References}, you could say
6518 something like:
6519
6520 @lisp
6521 (setq gnus-summary-thread-gathering-function
6522       'gnus-gather-threads-by-references)
6523 @end lisp
6524
6525 @end table
6526
6527
6528 @node Filling In Threads
6529 @subsubsection Filling In Threads
6530
6531 @table @code
6532 @item gnus-fetch-old-headers
6533 @vindex gnus-fetch-old-headers
6534 If non-@code{nil}, gnus will attempt to build old threads by fetching
6535 more old headers---headers to articles marked as read.  If you
6536 would like to display as few summary lines as possible, but still
6537 connect as many loose threads as possible, you should set this variable
6538 to @code{some} or a number.  If you set it to a number, no more than
6539 that number of extra old headers will be fetched.  In either case,
6540 fetching old headers only works if the back end you are using carries
6541 overview files---this would normally be @code{nntp}, @code{nnspool},
6542 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6543 the thread has been expired by the server, there's not much Gnus can do
6544 about that.
6545
6546 This variable can also be set to @code{invisible}.  This won't have any
6547 visible effects, but is useful if you use the @kbd{A T} command a lot
6548 (@pxref{Finding the Parent}).
6549
6550 @item gnus-build-sparse-threads
6551 @vindex gnus-build-sparse-threads
6552 Fetching old headers can be slow.  A low-rent similar effect can be
6553 gotten by setting this variable to @code{some}.  Gnus will then look at
6554 the complete @code{References} headers of all articles and try to string
6555 together articles that belong in the same thread.  This will leave
6556 @dfn{gaps} in the threading display where gnus guesses that an article
6557 is missing from the thread.  (These gaps appear like normal summary
6558 lines.  If you select a gap, gnus will try to fetch the article in
6559 question.)  If this variable is @code{t}, gnus will display all these
6560 ``gaps'' without regard for whether they are useful for completing the
6561 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6562 off sparse leaf nodes that don't lead anywhere.  This variable is
6563 @code{nil} by default.
6564
6565 @item gnus-read-all-available-headers
6566 @vindex gnus-read-all-available-headers
6567 This is a rather obscure variable that few will find useful.  It's
6568 intended for those non-news newsgroups where the back end has to fetch
6569 quite a lot to present the summary buffer, and where it's impossible to
6570 go back to parents of articles.  This is mostly the case in the
6571 web-based groups, like the @code{nnultimate} groups.
6572
6573 If you don't use those, then it's safe to leave this as the default
6574 @code{nil}.  If you want to use this variable, it should be a regexp
6575 that matches the group name, or @code{t} for all groups.
6576
6577 @end table
6578
6579
6580 @node More Threading
6581 @subsubsection More Threading
6582
6583 @table @code
6584 @item gnus-show-threads
6585 @vindex gnus-show-threads
6586 If this variable is @code{nil}, no threading will be done, and all of
6587 the rest of the variables here will have no effect.  Turning threading
6588 off will speed group selection up a bit, but it is sure to make reading
6589 slower and more awkward.
6590
6591 @item gnus-thread-hide-subtree
6592 @vindex gnus-thread-hide-subtree
6593 If non-@code{nil}, all threads will be hidden when the summary buffer is
6594 generated.
6595
6596 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6597 Available predicates are @code{gnus-article-unread-p} and
6598 @code{gnus-article-unseen-p}).
6599
6600 Here's an example:
6601
6602 @lisp
6603 (setq gnus-thread-hide-subtree
6604       '(or gnus-article-unread-p
6605            gnus-article-unseen-p))
6606 @end lisp
6607
6608 (It's a pretty nonsensical example, since all unseen articles are also
6609 unread, but you get my drift.)
6610
6611
6612 @item gnus-thread-expunge-below
6613 @vindex gnus-thread-expunge-below
6614 All threads that have a total score (as defined by
6615 @code{gnus-thread-score-function}) less than this number will be
6616 expunged.  This variable is @code{nil} by default, which means that no
6617 threads are expunged.
6618
6619 @item gnus-thread-hide-killed
6620 @vindex gnus-thread-hide-killed
6621 if you kill a thread and this variable is non-@code{nil}, the subtree
6622 will be hidden.
6623
6624 @item gnus-thread-ignore-subject
6625 @vindex gnus-thread-ignore-subject
6626 Sometimes somebody changes the subject in the middle of a thread.  If
6627 this variable is non-@code{nil}, which is the default, the subject
6628 change is ignored.  If it is @code{nil}, a change in the subject will
6629 result in a new thread.
6630
6631 @item gnus-thread-indent-level
6632 @vindex gnus-thread-indent-level
6633 This is a number that says how much each sub-thread should be indented.
6634 The default is 4.
6635
6636 @item gnus-sort-gathered-threads-function
6637 @vindex gnus-sort-gathered-threads-function
6638 Sometimes, particularly with mailing lists, the order in which mails
6639 arrive locally is not necessarily the same as the order in which they
6640 arrived on the mailing list.  Consequently, when sorting sub-threads
6641 using the default @code{gnus-thread-sort-by-number}, responses can end
6642 up appearing before the article to which they are responding to.
6643 Setting this variable to an alternate value
6644 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6645 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6646 more logical sub-thread ordering in such instances.
6647
6648 @end table
6649
6650
6651 @node Low-Level Threading
6652 @subsubsection Low-Level Threading
6653
6654 @table @code
6655
6656 @item gnus-parse-headers-hook
6657 @vindex gnus-parse-headers-hook
6658 Hook run before parsing any headers.  The default value is
6659 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6660 @code{default-mime-charset} in summary buffer based on variable
6661 @code{gnus-newsgroup-default-charset-alist}.
6662
6663 @item gnus-alter-header-function
6664 @vindex gnus-alter-header-function
6665 If non-@code{nil}, this function will be called to allow alteration of
6666 article header structures.  The function is called with one parameter,
6667 the article header vector, which it may alter in any way.  For instance,
6668 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6669 in systematic ways (by adding prefixes and such), you can use this
6670 variable to un-scramble the @code{Message-ID}s so that they are more
6671 meaningful.  Here's one example:
6672
6673 @lisp
6674 (setq gnus-alter-header-function 'my-alter-message-id)
6675
6676 (defun my-alter-message-id (header)
6677   (let ((id (mail-header-id header)))
6678     (when (string-match
6679            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6680       (mail-header-set-id
6681        (concat (match-string 1 id) "@@" (match-string 2 id))
6682        header))))
6683 @end lisp
6684
6685 @end table
6686
6687
6688 @node Thread Commands
6689 @subsection Thread Commands
6690 @cindex thread commands
6691
6692 @table @kbd
6693
6694 @item T k
6695 @itemx C-M-k
6696 @kindex T k (Summary)
6697 @kindex C-M-k (Summary)
6698 @findex gnus-summary-kill-thread
6699 Mark all articles in the current (sub-)thread as read
6700 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6701 remove all marks instead.  If the prefix argument is negative, tick
6702 articles instead.
6703
6704 @item T l
6705 @itemx C-M-l
6706 @kindex T l (Summary)
6707 @kindex C-M-l (Summary)
6708 @findex gnus-summary-lower-thread
6709 Lower the score of the current (sub-)thread
6710 (@code{gnus-summary-lower-thread}).
6711
6712 @item T i
6713 @kindex T i (Summary)
6714 @findex gnus-summary-raise-thread
6715 Increase the score of the current (sub-)thread
6716 (@code{gnus-summary-raise-thread}).
6717
6718 @item T #
6719 @kindex T # (Summary)
6720 @findex gnus-uu-mark-thread
6721 Set the process mark on the current (sub-)thread
6722 (@code{gnus-uu-mark-thread}).
6723
6724 @item T M-#
6725 @kindex T M-# (Summary)
6726 @findex gnus-uu-unmark-thread
6727 Remove the process mark from the current (sub-)thread
6728 (@code{gnus-uu-unmark-thread}).
6729
6730 @item T T
6731 @kindex T T (Summary)
6732 @findex gnus-summary-toggle-threads
6733 Toggle threading (@code{gnus-summary-toggle-threads}).
6734
6735 @item T s
6736 @kindex T s (Summary)
6737 @findex gnus-summary-show-thread
6738 Expose the (sub-)thread hidden under the current article, if any
6739 (@code{gnus-summary-show-thread}).
6740
6741 @item T h
6742 @kindex T h (Summary)
6743 @findex gnus-summary-hide-thread
6744 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6745
6746 @item T S
6747 @kindex T S (Summary)
6748 @findex gnus-summary-show-all-threads
6749 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6750
6751 @item T H
6752 @kindex T H (Summary)
6753 @findex gnus-summary-hide-all-threads
6754 Hide all threads (@code{gnus-summary-hide-all-threads}).
6755
6756 @item T t
6757 @kindex T t (Summary)
6758 @findex gnus-summary-rethread-current
6759 Re-thread the current article's thread
6760 (@code{gnus-summary-rethread-current}).  This works even when the
6761 summary buffer is otherwise unthreaded.
6762
6763 @item T ^
6764 @kindex T ^ (Summary)
6765 @findex gnus-summary-reparent-thread
6766 Make the current article the child of the marked (or previous) article
6767 (@code{gnus-summary-reparent-thread}).
6768
6769 @end table
6770
6771 The following commands are thread movement commands.  They all
6772 understand the numeric prefix.
6773
6774 @table @kbd
6775
6776 @item T n
6777 @kindex T n (Summary)
6778 @itemx C-M-f
6779 @kindex C-M-n (Summary)
6780 @itemx M-down
6781 @kindex M-down (Summary)
6782 @findex gnus-summary-next-thread
6783 Go to the next thread (@code{gnus-summary-next-thread}).
6784
6785 @item T p
6786 @kindex T p (Summary)
6787 @itemx C-M-b
6788 @kindex C-M-p (Summary)
6789 @itemx M-up
6790 @kindex M-up (Summary)
6791 @findex gnus-summary-prev-thread
6792 Go to the previous thread (@code{gnus-summary-prev-thread}).
6793
6794 @item T d
6795 @kindex T d (Summary)
6796 @findex gnus-summary-down-thread
6797 Descend the thread (@code{gnus-summary-down-thread}).
6798
6799 @item T u
6800 @kindex T u (Summary)
6801 @findex gnus-summary-up-thread
6802 Ascend the thread (@code{gnus-summary-up-thread}).
6803
6804 @item T o
6805 @kindex T o (Summary)
6806 @findex gnus-summary-top-thread
6807 Go to the top of the thread (@code{gnus-summary-top-thread}).
6808 @end table
6809
6810 @vindex gnus-thread-operation-ignore-subject
6811 If you ignore subject while threading, you'll naturally end up with
6812 threads that have several different subjects in them.  If you then issue
6813 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
6814 wish to kill the entire thread, but just those parts of the thread that
6815 have the same subject as the current article.  If you like this idea,
6816 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6817 is non-@code{nil} (which it is by default), subjects will be ignored
6818 when doing thread commands.  If this variable is @code{nil}, articles in
6819 the same thread with different subjects will not be included in the
6820 operation in question.  If this variable is @code{fuzzy}, only articles
6821 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6822 Matching}).
6823
6824
6825 @node Sorting the Summary Buffer
6826 @section Sorting the Summary Buffer
6827
6828 @findex gnus-thread-sort-by-total-score
6829 @findex gnus-thread-sort-by-date
6830 @findex gnus-thread-sort-by-score
6831 @findex gnus-thread-sort-by-subject
6832 @findex gnus-thread-sort-by-author
6833 @findex gnus-thread-sort-by-number
6834 @findex gnus-thread-sort-by-random
6835 @vindex gnus-thread-sort-functions
6836 @findex gnus-thread-sort-by-most-recent-thread
6837 If you are using a threaded summary display, you can sort the threads by
6838 setting @code{gnus-thread-sort-functions}, which can be either a single
6839 function, a list of functions, or a list containing functions and
6840 @code{(not some-function)} elements.
6841
6842 By default, sorting is done on article numbers.  Ready-made sorting
6843 predicate functions include @code{gnus-thread-sort-by-number},
6844 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6845 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6846 @code{gnus-thread-sort-by-most-recent-number},
6847 @code{gnus-thread-sort-by-most-recent-date},
6848 @code{gnus-thread-sort-by-random} and
6849 @code{gnus-thread-sort-by-total-score}.
6850
6851 Each function takes two threads and returns non-@code{nil} if the first
6852 thread should be sorted before the other.  Note that sorting really is
6853 normally done by looking only at the roots of each thread.
6854
6855 If you use more than one function, the primary sort key should be the
6856 last function in the list.  You should probably always include
6857 @code{gnus-thread-sort-by-number} in the list of sorting
6858 functions---preferably first.  This will ensure that threads that are
6859 equal with respect to the other sort criteria will be displayed in
6860 ascending article order.
6861
6862 If you would like to sort by reverse score, then by subject, and finally
6863 by number, you could do something like:
6864
6865 @lisp
6866 (setq gnus-thread-sort-functions
6867       '(gnus-thread-sort-by-number
6868         gnus-thread-sort-by-subject
6869         (not gnus-thread-sort-by-total-score)))
6870 @end lisp
6871
6872 The threads that have highest score will be displayed first in the
6873 summary buffer.  When threads have the same score, they will be sorted
6874 alphabetically.  The threads that have the same score and the same
6875 subject will be sorted by number, which is (normally) the sequence in
6876 which the articles arrived.
6877
6878 If you want to sort by score and then reverse arrival order, you could
6879 say something like:
6880
6881 @lisp
6882 (setq gnus-thread-sort-functions
6883       '((lambda (t1 t2)
6884           (not (gnus-thread-sort-by-number t1 t2)))
6885         gnus-thread-sort-by-score))
6886 @end lisp
6887
6888 @vindex gnus-thread-score-function
6889 The function in the @code{gnus-thread-score-function} variable (default
6890 @code{+}) is used for calculating the total score of a thread.  Useful
6891 functions might be @code{max}, @code{min}, or squared means, or whatever
6892 tickles your fancy.
6893
6894 @findex gnus-article-sort-functions
6895 @findex gnus-article-sort-by-date
6896 @findex gnus-article-sort-by-score
6897 @findex gnus-article-sort-by-subject
6898 @findex gnus-article-sort-by-author
6899 @findex gnus-article-sort-by-random
6900 @findex gnus-article-sort-by-number
6901 If you are using an unthreaded display for some strange reason or
6902 other, you have to fiddle with the @code{gnus-article-sort-functions}
6903 variable.  It is very similar to the
6904 @code{gnus-thread-sort-functions}, except that it uses slightly
6905 different functions for article comparison.  Available sorting
6906 predicate functions are @code{gnus-article-sort-by-number},
6907 @code{gnus-article-sort-by-author},
6908 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6909 @code{gnus-article-sort-by-random}, and
6910 @code{gnus-article-sort-by-score}.
6911
6912 If you want to sort an unthreaded summary display by subject, you could
6913 say something like:
6914
6915 @lisp
6916 (setq gnus-article-sort-functions
6917       '(gnus-article-sort-by-number
6918         gnus-article-sort-by-subject))
6919 @end lisp
6920
6921
6922
6923 @node Asynchronous Fetching
6924 @section Asynchronous Article Fetching
6925 @cindex asynchronous article fetching
6926 @cindex article pre-fetch
6927 @cindex pre-fetch
6928
6929 If you read your news from an @sc{nntp} server that's far away, the
6930 network latencies may make reading articles a chore.  You have to wait
6931 for a while after pressing @kbd{n} to go to the next article before the
6932 article appears.  Why can't gnus just go ahead and fetch the article
6933 while you are reading the previous one?  Why not, indeed.
6934
6935 First, some caveats.  There are some pitfalls to using asynchronous
6936 article fetching, especially the way gnus does it.
6937
6938 Let's say you are reading article 1, which is short, and article 2 is
6939 quite long, and you are not interested in reading that.  Gnus does not
6940 know this, so it goes ahead and fetches article 2.  You decide to read
6941 article 3, but since gnus is in the process of fetching article 2, the
6942 connection is blocked.
6943
6944 To avoid these situations, gnus will open two (count 'em two)
6945 connections to the server.  Some people may think this isn't a very nice
6946 thing to do, but I don't see any real alternatives.  Setting up that
6947 extra connection takes some time, so gnus startup will be slower.
6948
6949 Gnus will fetch more articles than you will read.  This will mean that
6950 the link between your machine and the @sc{nntp} server will become more
6951 loaded than if you didn't use article pre-fetch.  The server itself will
6952 also become more loaded---both with the extra article requests, and the
6953 extra connection.
6954
6955 Ok, so now you know that you shouldn't really use this thing...  unless
6956 you really want to.
6957
6958 @vindex gnus-asynchronous
6959 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
6960 happen automatically.
6961
6962 @vindex gnus-use-article-prefetch
6963 You can control how many articles are to be pre-fetched by setting
6964 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
6965 that when you read an article in the group, the back end will pre-fetch
6966 the next 30 articles.  If this variable is @code{t}, the back end will
6967 pre-fetch all the articles it can without bound.  If it is
6968 @code{nil}, no pre-fetching will be done.
6969
6970 @vindex gnus-async-prefetch-article-p
6971 @findex gnus-async-read-p
6972 There are probably some articles that you don't want to pre-fetch---read
6973 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
6974 return non-@code{nil} when the article in question is to be
6975 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
6976 @code{nil} on read articles.  The function is called with an article
6977 data structure as the only parameter.
6978
6979 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
6980
6981 @lisp
6982 (defun my-async-short-unread-p (data)
6983   "Return non-nil for short, unread articles."
6984   (and (gnus-data-unread-p data)
6985        (< (mail-header-lines (gnus-data-header data))
6986           100)))
6987
6988 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
6989 @end lisp
6990
6991 These functions will be called many, many times, so they should
6992 preferably be short and sweet to avoid slowing down gnus too much.
6993 It's probably a good idea to byte-compile things like this.
6994
6995 @vindex gnus-prefetched-article-deletion-strategy
6996 Articles have to be removed from the asynch buffer sooner or later.  The
6997 @code{gnus-prefetched-article-deletion-strategy} says when to remove
6998 articles.  This is a list that may contain the following elements:
6999
7000 @table @code
7001 @item read
7002 Remove articles when they are read.
7003
7004 @item exit
7005 Remove articles when exiting the group.
7006 @end table
7007
7008 The default value is @code{(read exit)}.
7009
7010 @c @vindex gnus-use-header-prefetch
7011 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7012 @c from the next group.
7013
7014
7015 @node Article Caching
7016 @section Article Caching
7017 @cindex article caching
7018 @cindex caching
7019
7020 If you have an @emph{extremely} slow @sc{nntp} connection, you may
7021 consider turning article caching on.  Each article will then be stored
7022 locally under your home directory.  As you may surmise, this could
7023 potentially use @emph{huge} amounts of disk space, as well as eat up all
7024 your inodes so fast it will make your head swim.  In vodka.
7025
7026 Used carefully, though, it could be just an easier way to save articles.
7027
7028 @vindex gnus-use-long-file-name
7029 @vindex gnus-cache-directory
7030 @vindex gnus-use-cache
7031 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7032 all articles ticked or marked as dormant will then be copied
7033 over to your local cache (@code{gnus-cache-directory}).  Whether this
7034 cache is flat or hierarchical is controlled by the
7035 @code{gnus-use-long-file-name} variable, as usual.
7036
7037 When re-selecting a ticked or dormant article, it will be fetched from the
7038 cache instead of from the server.  As articles in your cache will never
7039 expire, this might serve as a method of saving articles while still
7040 keeping them where they belong.  Just mark all articles you want to save
7041 as dormant, and don't worry.
7042
7043 When an article is marked as read, is it removed from the cache.
7044
7045 @vindex gnus-cache-remove-articles
7046 @vindex gnus-cache-enter-articles
7047 The entering/removal of articles from the cache is controlled by the
7048 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7049 variables.  Both are lists of symbols.  The first is @code{(ticked
7050 dormant)} by default, meaning that ticked and dormant articles will be
7051 put in the cache.  The latter is @code{(read)} by default, meaning that
7052 articles marked as read are removed from the cache.  Possibly
7053 symbols in these two lists are @code{ticked}, @code{dormant},
7054 @code{unread} and @code{read}.
7055
7056 @findex gnus-jog-cache
7057 So where does the massive article-fetching and storing come into the
7058 picture?  The @code{gnus-jog-cache} command will go through all
7059 subscribed newsgroups, request all unread articles, score them, and
7060 store them in the cache.  You should only ever, ever ever ever, use this
7061 command if 1) your connection to the @sc{nntp} server is really, really,
7062 really slow and 2) you have a really, really, really huge disk.
7063 Seriously.  One way to cut down on the number of articles downloaded is
7064 to score unwanted articles down and have them marked as read.  They will
7065 not then be downloaded by this command.
7066
7067 @vindex gnus-uncacheable-groups
7068 @vindex gnus-cacheable-groups
7069 It is likely that you do not want caching on all groups.  For instance,
7070 if your @code{nnml} mail is located under your home directory, it makes no
7071 sense to cache it somewhere else under your home directory.  Unless you
7072 feel that it's neat to use twice as much space.
7073
7074 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7075 regexp of groups to cache, @samp{^nntp} for instance, or set the
7076 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7077 Both variables are @code{nil} by default.  If a group matches both
7078 variables, the group is not cached.
7079
7080 @findex gnus-cache-generate-nov-databases
7081 @findex gnus-cache-generate-active
7082 @vindex gnus-cache-active-file
7083 The cache stores information on what articles it contains in its active
7084 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7085 of the cache) becomes all messed up for some reason or other, gnus
7086 offers two functions that will try to set things right.  @kbd{M-x
7087 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
7088 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7089 file.
7090
7091 @findex gnus-cache-move-cache
7092 @code{gnus-cache-move-cache} will move your whole
7093 @code{gnus-cache-directory} to some other location. You get asked to
7094 where, isn't that cool?
7095
7096 @node Persistent Articles
7097 @section Persistent Articles
7098 @cindex persistent articles
7099
7100 Closely related to article caching, we have @dfn{persistent articles}.
7101 In fact, it's just a different way of looking at caching, and much more
7102 useful in my opinion.
7103
7104 Say you're reading a newsgroup, and you happen on to some valuable gem
7105 that you want to keep and treasure forever.  You'd normally just save it
7106 (using one of the many saving commands) in some file.  The problem with
7107 that is that it's just, well, yucky.  Ideally you'd prefer just having
7108 the article remain in the group where you found it forever; untouched by
7109 the expiry going on at the news server.
7110
7111 This is what a @dfn{persistent article} is---an article that just won't
7112 be deleted.  It's implemented using the normal cache functions, but
7113 you use two explicit commands for managing persistent articles:
7114
7115 @table @kbd
7116
7117 @item *
7118 @kindex * (Summary)
7119 @findex gnus-cache-enter-article
7120 Make the current article persistent (@code{gnus-cache-enter-article}).
7121
7122 @item M-*
7123 @kindex M-* (Summary)
7124 @findex gnus-cache-remove-article
7125 Remove the current article from the persistent articles
7126 (@code{gnus-cache-remove-article}).  This will normally delete the
7127 article.
7128 @end table
7129
7130 Both these commands understand the process/prefix convention.
7131
7132 To avoid having all ticked articles (and stuff) entered into the cache,
7133 you should set @code{gnus-use-cache} to @code{passive} if you're just
7134 interested in persistent articles:
7135
7136 @lisp
7137 (setq gnus-use-cache 'passive)
7138 @end lisp
7139
7140
7141 @node Article Backlog
7142 @section Article Backlog
7143 @cindex backlog
7144 @cindex article backlog
7145
7146 If you have a slow connection, but the idea of using caching seems
7147 unappealing to you (and it is, really), you can help the situation some
7148 by switching on the @dfn{backlog}.  This is where gnus will buffer
7149 already read articles so that it doesn't have to re-fetch articles
7150 you've already read.  This only helps if you are in the habit of
7151 re-selecting articles you've recently read, of course.  If you never do
7152 that, turning the backlog on will slow gnus down a little bit, and
7153 increase memory usage some.
7154
7155 @vindex gnus-keep-backlog
7156 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7157 at most @var{n} old articles in a buffer for later re-fetching.  If this
7158 variable is non-@code{nil} and is not a number, gnus will store
7159 @emph{all} read articles, which means that your Emacs will grow without
7160 bound before exploding and taking your machine down with you.  I put
7161 that in there just to keep y'all on your toes.
7162
7163 This variable is @code{nil} by default.
7164
7165
7166 @node Saving Articles
7167 @section Saving Articles
7168 @cindex saving articles
7169
7170 Gnus can save articles in a number of ways.  Below is the documentation
7171 for saving articles in a fairly straight-forward fashion (i.e., little
7172 processing of the article is done before it is saved).  For a different
7173 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7174 (@pxref{Decoding Articles}).
7175
7176 For the commands listed here, the target is a file.  If you want to
7177 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7178 command (@pxref{Mail Group Commands}).
7179
7180 @vindex gnus-save-all-headers
7181 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7182 unwanted headers before saving the article.
7183
7184 @vindex gnus-saved-headers
7185 If the preceding variable is @code{nil}, all headers that match the
7186 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7187 deleted before saving.
7188
7189 @table @kbd
7190
7191 @item O o
7192 @itemx o
7193 @kindex O o (Summary)
7194 @kindex o (Summary)
7195 @findex gnus-summary-save-article
7196 @c @icon{gnus-summary-save-article}
7197 Save the current article using the default article saver
7198 (@code{gnus-summary-save-article}).
7199
7200 @item O m
7201 @kindex O m (Summary)
7202 @findex gnus-summary-save-article-mail
7203 Save the current article in mail format
7204 (@code{gnus-summary-save-article-mail}).
7205
7206 @item O r
7207 @kindex O r (Summary)
7208 @findex gnus-summary-save-article-rmail
7209 Save the current article in rmail format
7210 (@code{gnus-summary-save-article-rmail}).
7211
7212 @item O f
7213 @kindex O f (Summary)
7214 @findex gnus-summary-save-article-file
7215 @c @icon{gnus-summary-save-article-file}
7216 Save the current article in plain file format
7217 (@code{gnus-summary-save-article-file}).
7218
7219 @item O F
7220 @kindex O F (Summary)
7221 @findex gnus-summary-write-article-file
7222 Write the current article in plain file format, overwriting any previous
7223 file contents (@code{gnus-summary-write-article-file}).
7224
7225 @item O b
7226 @kindex O b (Summary)
7227 @findex gnus-summary-save-article-body-file
7228 Save the current article body in plain file format
7229 (@code{gnus-summary-save-article-body-file}).
7230
7231 @item O h
7232 @kindex O h (Summary)
7233 @findex gnus-summary-save-article-folder
7234 Save the current article in mh folder format
7235 (@code{gnus-summary-save-article-folder}).
7236
7237 @item O v
7238 @kindex O v (Summary)
7239 @findex gnus-summary-save-article-vm
7240 Save the current article in a VM folder
7241 (@code{gnus-summary-save-article-vm}).
7242
7243 @item O p
7244 @itemx |
7245 @kindex O p (Summary)
7246 @kindex | (Summary)
7247 @findex gnus-summary-pipe-output
7248 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7249 the current article to a process (@code{gnus-summary-pipe-output}).
7250 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7251 complete headers in the piped output.
7252
7253 @item O P
7254 @kindex O P (Summary)
7255 @findex gnus-summary-muttprint
7256 @vindex gnus-summary-muttprint-program
7257 Save the current article into muttprint. That is, print it using the
7258 external program Muttprint (see
7259 @uref{http://muttprint.sourceforge.net/}). The program name and
7260 options to use is controlled by the variable
7261 @code{gnus-summary-muttprint-program}. (@code{gnus-summary-muttprint}).
7262
7263 @end table
7264
7265 @vindex gnus-prompt-before-saving
7266 All these commands use the process/prefix convention
7267 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7268 functions, you might get tired of being prompted for files to save each
7269 and every article in.  The prompting action is controlled by
7270 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7271 default, giving you that excessive prompting action you know and
7272 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7273 just once for each series of articles you save.  If you like to really
7274 have Gnus do all your thinking for you, you can even set this variable
7275 to @code{nil}, which means that you will never be prompted for files to
7276 save articles in.  Gnus will simply save all the articles in the default
7277 files.
7278
7279
7280 @vindex gnus-default-article-saver
7281 You can customize the @code{gnus-default-article-saver} variable to make
7282 gnus do what you want it to.  You can use any of the six ready-made
7283 functions below, or you can create your own.
7284
7285 @table @code
7286
7287 @item gnus-summary-save-in-rmail
7288 @findex gnus-summary-save-in-rmail
7289 @vindex gnus-rmail-save-name
7290 @findex gnus-plain-save-name
7291 This is the default format, @dfn{babyl}.  Uses the function in the
7292 @code{gnus-rmail-save-name} variable to get a file name to save the
7293 article in.  The default is @code{gnus-plain-save-name}.
7294
7295 @item gnus-summary-save-in-mail
7296 @findex gnus-summary-save-in-mail
7297 @vindex gnus-mail-save-name
7298 Save in a Unix mail (mbox) file.  Uses the function in the
7299 @code{gnus-mail-save-name} variable to get a file name to save the
7300 article in.  The default is @code{gnus-plain-save-name}.
7301
7302 @item gnus-summary-save-in-file
7303 @findex gnus-summary-save-in-file
7304 @vindex gnus-file-save-name
7305 @findex gnus-numeric-save-name
7306 Append the article straight to an ordinary file.  Uses the function in
7307 the @code{gnus-file-save-name} variable to get a file name to save the
7308 article in.  The default is @code{gnus-numeric-save-name}.
7309
7310 @item gnus-summary-write-to-file
7311 @findex gnus-summary-write-to-file
7312 Write the article straight to an ordinary file.  The file is
7313 overwritten if it exists.  Uses the function in the
7314 @code{gnus-file-save-name} variable to get a file name to save the
7315 article in.  The default is @code{gnus-numeric-save-name}.
7316
7317 @item gnus-summary-save-body-in-file
7318 @findex gnus-summary-save-body-in-file
7319 Append the article body to an ordinary file.  Uses the function in the
7320 @code{gnus-file-save-name} variable to get a file name to save the
7321 article in.  The default is @code{gnus-numeric-save-name}.
7322
7323 @item gnus-summary-save-in-folder
7324 @findex gnus-summary-save-in-folder
7325 @findex gnus-folder-save-name
7326 @findex gnus-Folder-save-name
7327 @vindex gnus-folder-save-name
7328 @cindex rcvstore
7329 @cindex MH folders
7330 Save the article to an MH folder using @code{rcvstore} from the MH
7331 library.  Uses the function in the @code{gnus-folder-save-name} variable
7332 to get a file name to save the article in.  The default is
7333 @code{gnus-folder-save-name}, but you can also use
7334 @code{gnus-Folder-save-name}, which creates capitalized names.
7335
7336 @item gnus-summary-save-in-vm
7337 @findex gnus-summary-save-in-vm
7338 Save the article in a VM folder.  You have to have the VM mail
7339 reader to use this setting.
7340 @end table
7341
7342 @vindex gnus-article-save-directory
7343 All of these functions, except for the last one, will save the article
7344 in the @code{gnus-article-save-directory}, which is initialized from the
7345 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
7346 default.
7347
7348 As you can see above, the functions use different functions to find a
7349 suitable name of a file to save the article in.  Below is a list of
7350 available functions that generate names:
7351
7352 @table @code
7353
7354 @item gnus-Numeric-save-name
7355 @findex gnus-Numeric-save-name
7356 File names like @file{~/News/Alt.andrea-dworkin/45}.
7357
7358 @item gnus-numeric-save-name
7359 @findex gnus-numeric-save-name
7360 File names like @file{~/News/alt.andrea-dworkin/45}.
7361
7362 @item gnus-Plain-save-name
7363 @findex gnus-Plain-save-name
7364 File names like @file{~/News/Alt.andrea-dworkin}.
7365
7366 @item gnus-plain-save-name
7367 @findex gnus-plain-save-name
7368 File names like @file{~/News/alt.andrea-dworkin}.
7369
7370 @item gnus-sender-save-name
7371 @findex gnus-sender-save-name
7372 File names like @file{~/News/larsi}.
7373 @end table
7374
7375 @vindex gnus-split-methods
7376 You can have gnus suggest where to save articles by plonking a regexp into
7377 the @code{gnus-split-methods} alist.  For instance, if you would like to
7378 save articles related to gnus in the file @file{gnus-stuff}, and articles
7379 related to VM in @code{vm-stuff}, you could set this variable to something
7380 like:
7381
7382 @lisp
7383 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7384  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7385  (my-choosing-function "../other-dir/my-stuff")
7386  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7387 @end lisp
7388
7389 We see that this is a list where each element is a list that has two
7390 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7391 a string (in which case it is used as a regexp to match on the article
7392 head); it can be a symbol (which will be called as a function with the
7393 group name as a parameter); or it can be a list (which will be
7394 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7395 the @dfn{file} will be used as a default prompt.  In addition, the
7396 result of the operation itself will be used if the function or form
7397 called returns a string or a list of strings.
7398
7399 You basically end up with a list of file names that might be used when
7400 saving the current article.  (All ``matches'' will be used.)  You will
7401 then be prompted for what you really want to use as a name, with file
7402 name completion over the results from applying this variable.
7403
7404 This variable is @code{((gnus-article-archive-name))} by default, which
7405 means that gnus will look at the articles it saves for an
7406 @code{Archive-name} line and use that as a suggestion for the file
7407 name.
7408
7409 Here's an example function to clean up file names somewhat.  If you have
7410 lots of mail groups called things like
7411 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7412 these group names before creating the file name to save to.  The
7413 following will do just that:
7414
7415 @lisp
7416 (defun my-save-name (group)
7417   (when (string-match "^nnml:mail." group)
7418     (substring group (match-end 0))))
7419
7420 (setq gnus-split-methods
7421       '((gnus-article-archive-name)
7422         (my-save-name)))
7423 @end lisp
7424
7425
7426 @vindex gnus-use-long-file-name
7427 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7428 @code{nil}, all the preceding functions will replace all periods
7429 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7430 the functions will generate hierarchies of directories instead of having
7431 all the files in the top level directory
7432 (@file{~/News/alt/andrea-dworkin} instead of
7433 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7434 on most systems.  However, for historical reasons, this is @code{nil} on
7435 Xenix and usg-unix-v machines by default.
7436
7437 This function also affects kill and score file names.  If this variable
7438 is a list, and the list contains the element @code{not-score}, long file
7439 names will not be used for score files, if it contains the element
7440 @code{not-save}, long file names will not be used for saving, and if it
7441 contains the element @code{not-kill}, long file names will not be used
7442 for kill files.
7443
7444 If you'd like to save articles in a hierarchy that looks something like
7445 a spool, you could
7446
7447 @lisp
7448 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
7449 (setq gnus-default-article-saver
7450       'gnus-summary-save-in-file) ; no encoding
7451 @end lisp
7452
7453 Then just save with @kbd{o}.  You'd then read this hierarchy with
7454 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7455 the top level directory as the argument (@file{~/News/}).  Then just walk
7456 around to the groups/directories with @code{nneething}.
7457
7458
7459 @node Decoding Articles
7460 @section Decoding Articles
7461 @cindex decoding articles
7462
7463 Sometime users post articles (or series of articles) that have been
7464 encoded in some way or other.  Gnus can decode them for you.
7465
7466 @menu
7467 * Uuencoded Articles::          Uudecode articles.
7468 * Shell Archives::              Unshar articles.
7469 * PostScript Files::            Split PostScript.
7470 * Other Files::                 Plain save and binhex.
7471 * Decoding Variables::          Variables for a happy decoding.
7472 * Viewing Files::               You want to look at the result of the decoding?
7473 @end menu
7474
7475 @cindex series
7476 @cindex article series
7477 All these functions use the process/prefix convention
7478 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7479 the extension that a ``single article'' means ``a single series''.  Gnus
7480 can find out by itself what articles belong to a series, decode all the
7481 articles and unpack/view/save the resulting file(s).
7482
7483 Gnus guesses what articles are in the series according to the following
7484 simplish rule: The subjects must be (nearly) identical, except for the
7485 last two numbers of the line.  (Spaces are largely ignored, however.)
7486
7487 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7488 will find all the articles that match the regexp @samp{^cat.gif
7489 ([0-9]+/[0-9]+).*$}.
7490
7491 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7492 series}, will not be properly recognized by any of the automatic viewing
7493 commands, and you have to mark the articles manually with @kbd{#}.
7494
7495
7496 @node Uuencoded Articles
7497 @subsection Uuencoded Articles
7498 @cindex uudecode
7499 @cindex uuencoded articles
7500
7501 @table @kbd
7502
7503 @item X u
7504 @kindex X u (Summary)
7505 @findex gnus-uu-decode-uu
7506 @c @icon{gnus-uu-decode-uu}
7507 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7508
7509 @item X U
7510 @kindex X U (Summary)
7511 @findex gnus-uu-decode-uu-and-save
7512 Uudecodes and saves the current series
7513 (@code{gnus-uu-decode-uu-and-save}).
7514
7515 @item X v u
7516 @kindex X v u (Summary)
7517 @findex gnus-uu-decode-uu-view
7518 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7519
7520 @item X v U
7521 @kindex X v U (Summary)
7522 @findex gnus-uu-decode-uu-and-save-view
7523 Uudecodes, views and saves the current series
7524 (@code{gnus-uu-decode-uu-and-save-view}).
7525
7526 @end table
7527
7528 Remember that these all react to the presence of articles marked with
7529 the process mark.  If, for instance, you'd like to decode and save an
7530 entire newsgroup, you'd typically do @kbd{M P a}
7531 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7532 (@code{gnus-uu-decode-uu-and-save}).
7533
7534 All this is very much different from how @code{gnus-uu} worked with
7535 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7536 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7537 articles in some way (@pxref{Setting Process Marks}) and then press
7538 @kbd{X u}.
7539
7540 @vindex gnus-uu-notify-files
7541 Note: When trying to decode articles that have names matching
7542 @code{gnus-uu-notify-files}, which is hard-coded to
7543 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7544 automatically post an article on @samp{comp.unix.wizards} saying that
7545 you have just viewed the file in question.  This feature can't be turned
7546 off.
7547
7548
7549 @node Shell Archives
7550 @subsection Shell Archives
7551 @cindex unshar
7552 @cindex shell archives
7553 @cindex shared articles
7554
7555 Shell archives (``shar files'') used to be a popular way to distribute
7556 sources, but it isn't used all that much today.  In any case, we have
7557 some commands to deal with these:
7558
7559 @table @kbd
7560
7561 @item X s
7562 @kindex X s (Summary)
7563 @findex gnus-uu-decode-unshar
7564 Unshars the current series (@code{gnus-uu-decode-unshar}).
7565
7566 @item X S
7567 @kindex X S (Summary)
7568 @findex gnus-uu-decode-unshar-and-save
7569 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7570
7571 @item X v s
7572 @kindex X v s (Summary)
7573 @findex gnus-uu-decode-unshar-view
7574 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7575
7576 @item X v S
7577 @kindex X v S (Summary)
7578 @findex gnus-uu-decode-unshar-and-save-view
7579 Unshars, views and saves the current series
7580 (@code{gnus-uu-decode-unshar-and-save-view}).
7581 @end table
7582
7583
7584 @node PostScript Files
7585 @subsection PostScript Files
7586 @cindex PostScript
7587
7588 @table @kbd
7589
7590 @item X p
7591 @kindex X p (Summary)
7592 @findex gnus-uu-decode-postscript
7593 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7594
7595 @item X P
7596 @kindex X P (Summary)
7597 @findex gnus-uu-decode-postscript-and-save
7598 Unpack and save the current PostScript series
7599 (@code{gnus-uu-decode-postscript-and-save}).
7600
7601 @item X v p
7602 @kindex X v p (Summary)
7603 @findex gnus-uu-decode-postscript-view
7604 View the current PostScript series
7605 (@code{gnus-uu-decode-postscript-view}).
7606
7607 @item X v P
7608 @kindex X v P (Summary)
7609 @findex gnus-uu-decode-postscript-and-save-view
7610 View and save the current PostScript series
7611 (@code{gnus-uu-decode-postscript-and-save-view}).
7612 @end table
7613
7614
7615 @node Other Files
7616 @subsection Other Files
7617
7618 @table @kbd
7619 @item X o
7620 @kindex X o (Summary)
7621 @findex gnus-uu-decode-save
7622 Save the current series
7623 (@code{gnus-uu-decode-save}).
7624
7625 @item X b
7626 @kindex X b (Summary)
7627 @findex gnus-uu-decode-binhex
7628 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7629 doesn't really work yet.
7630 @end table
7631
7632
7633 @node Decoding Variables
7634 @subsection Decoding Variables
7635
7636 Adjective, not verb.
7637
7638 @menu
7639 * Rule Variables::              Variables that say how a file is to be viewed.
7640 * Other Decode Variables::      Other decode variables.
7641 * Uuencoding and Posting::      Variables for customizing uuencoding.
7642 @end menu
7643
7644
7645 @node Rule Variables
7646 @subsubsection Rule Variables
7647 @cindex rule variables
7648
7649 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7650 variables are of the form
7651
7652 @lisp
7653       (list '(regexp1 command2)
7654             '(regexp2 command2)
7655             ...)
7656 @end lisp
7657
7658 @table @code
7659
7660 @item gnus-uu-user-view-rules
7661 @vindex gnus-uu-user-view-rules
7662 @cindex sox
7663 This variable is consulted first when viewing files.  If you wish to use,
7664 for instance, @code{sox} to convert an @samp{.au} sound file, you could
7665 say something like:
7666 @lisp
7667 (setq gnus-uu-user-view-rules
7668       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7669 @end lisp
7670
7671 @item gnus-uu-user-view-rules-end
7672 @vindex gnus-uu-user-view-rules-end
7673 This variable is consulted if gnus couldn't make any matches from the
7674 user and default view rules.
7675
7676 @item gnus-uu-user-archive-rules
7677 @vindex gnus-uu-user-archive-rules
7678 This variable can be used to say what commands should be used to unpack
7679 archives.
7680 @end table
7681
7682
7683 @node Other Decode Variables
7684 @subsubsection Other Decode Variables
7685
7686 @table @code
7687 @vindex gnus-uu-grabbed-file-functions
7688
7689 @item gnus-uu-grabbed-file-functions
7690 All functions in this list will be called right after each file has been
7691 successfully decoded---so that you can move or view files right away,
7692 and don't have to wait for all files to be decoded before you can do
7693 anything.  Ready-made functions you can put in this list are:
7694
7695 @table @code
7696
7697 @item gnus-uu-grab-view
7698 @findex gnus-uu-grab-view
7699 View the file.
7700
7701 @item gnus-uu-grab-move
7702 @findex gnus-uu-grab-move
7703 Move the file (if you're using a saving function.)
7704 @end table
7705
7706 @item gnus-uu-be-dangerous
7707 @vindex gnus-uu-be-dangerous
7708 Specifies what to do if unusual situations arise during decoding.  If
7709 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7710 that didn't work, and overwrite existing files.  Otherwise, ask each
7711 time.
7712
7713 @item gnus-uu-ignore-files-by-name
7714 @vindex gnus-uu-ignore-files-by-name
7715 Files with name matching this regular expression won't be viewed.
7716
7717 @item gnus-uu-ignore-files-by-type
7718 @vindex gnus-uu-ignore-files-by-type
7719 Files with a @sc{mime} type matching this variable won't be viewed.
7720 Note that Gnus tries to guess what type the file is based on the name.
7721 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
7722 kludgey.
7723
7724 @item gnus-uu-tmp-dir
7725 @vindex gnus-uu-tmp-dir
7726 Where @code{gnus-uu} does its work.
7727
7728 @item gnus-uu-do-not-unpack-archives
7729 @vindex gnus-uu-do-not-unpack-archives
7730 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7731 looking for files to display.
7732
7733 @item gnus-uu-view-and-save
7734 @vindex gnus-uu-view-and-save
7735 Non-@code{nil} means that the user will always be asked to save a file
7736 after viewing it.
7737
7738 @item gnus-uu-ignore-default-view-rules
7739 @vindex gnus-uu-ignore-default-view-rules
7740 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7741 rules.
7742
7743 @item gnus-uu-ignore-default-archive-rules
7744 @vindex gnus-uu-ignore-default-archive-rules
7745 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7746 unpacking commands.
7747
7748 @item gnus-uu-kill-carriage-return
7749 @vindex gnus-uu-kill-carriage-return
7750 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7751 from articles.
7752
7753 @item gnus-uu-unmark-articles-not-decoded
7754 @vindex gnus-uu-unmark-articles-not-decoded
7755 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7756 decoded articles as unread.
7757
7758 @item gnus-uu-correct-stripped-uucode
7759 @vindex gnus-uu-correct-stripped-uucode
7760 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7761 uuencoded files that have had trailing spaces deleted.
7762
7763 @item gnus-uu-pre-uudecode-hook
7764 @vindex gnus-uu-pre-uudecode-hook
7765 Hook run before sending a message to @code{uudecode}.
7766
7767 @item gnus-uu-view-with-metamail
7768 @vindex gnus-uu-view-with-metamail
7769 @cindex metamail
7770 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7771 commands defined by the rule variables and just fudge a @sc{mime}
7772 content type based on the file name.  The result will be fed to
7773 @code{metamail} for viewing.
7774
7775 @item gnus-uu-save-in-digest
7776 @vindex gnus-uu-save-in-digest
7777 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7778 decoding, will save in digests.  If this variable is @code{nil},
7779 @code{gnus-uu} will just save everything in a file without any
7780 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7781 to specify any meaningful volume and issue numbers were found, so I
7782 simply dropped them.
7783
7784 @end table
7785
7786
7787 @node Uuencoding and Posting
7788 @subsubsection Uuencoding and Posting
7789
7790 @table @code
7791
7792 @item gnus-uu-post-include-before-composing
7793 @vindex gnus-uu-post-include-before-composing
7794 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7795 before you compose the article.  If this variable is @code{t}, you can
7796 either include an encoded file with @kbd{C-c C-i} or have one included
7797 for you when you post the article.
7798
7799 @item gnus-uu-post-length
7800 @vindex gnus-uu-post-length
7801 Maximum length of an article.  The encoded file will be split into how
7802 many articles it takes to post the entire file.
7803
7804 @item gnus-uu-post-threaded
7805 @vindex gnus-uu-post-threaded
7806 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7807 thread.  This may not be smart, as no other decoder I have seen is able
7808 to follow threads when collecting uuencoded articles.  (Well, I have
7809 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7810 think that counts...) Default is @code{nil}.
7811
7812 @item gnus-uu-post-separate-description
7813 @vindex gnus-uu-post-separate-description
7814 Non-@code{nil} means that the description will be posted in a separate
7815 article.  The first article will typically be numbered (0/x).  If this
7816 variable is @code{nil}, the description the user enters will be included
7817 at the beginning of the first article, which will be numbered (1/x).
7818 Default is @code{t}.
7819
7820 @end table
7821
7822
7823 @node Viewing Files
7824 @subsection Viewing Files
7825 @cindex viewing files
7826 @cindex pseudo-articles
7827
7828 After decoding, if the file is some sort of archive, gnus will attempt
7829 to unpack the archive and see if any of the files in the archive can be
7830 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7831 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7832 uncompress and de-tar the main file, and then view the two pictures.
7833 This unpacking process is recursive, so if the archive contains archives
7834 of archives, it'll all be unpacked.
7835
7836 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7837 extracted file into the summary buffer.  If you go to these
7838 ``articles'', you will be prompted for a command to run (usually Gnus
7839 will make a suggestion), and then the command will be run.
7840
7841 @vindex gnus-view-pseudo-asynchronously
7842 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7843 until the viewing is done before proceeding.
7844
7845 @vindex gnus-view-pseudos
7846 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7847 the pseudo-articles into the summary buffer, but view them
7848 immediately.  If this variable is @code{not-confirm}, the user won't even
7849 be asked for a confirmation before viewing is done.
7850
7851 @vindex gnus-view-pseudos-separately
7852 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7853 pseudo-article will be created for each file to be viewed.  If
7854 @code{nil}, all files that use the same viewing command will be given as
7855 a list of parameters to that command.
7856
7857 @vindex gnus-insert-pseudo-articles
7858 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7859 pseudo-articles when decoding.  It is @code{t} by default.
7860
7861 So; there you are, reading your @emph{pseudo-articles} in your
7862 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7863 Why isn't anything real anymore? How did we get here?
7864
7865
7866 @node Article Treatment
7867 @section Article Treatment
7868
7869 Reading through this huge manual, you may have quite forgotten that the
7870 object of newsreaders is to actually, like, read what people have
7871 written.  Reading articles.  Unfortunately, people are quite bad at
7872 writing, so there are tons of functions and variables to make reading
7873 these articles easier.
7874
7875 @menu
7876 * Article Highlighting::        You want to make the article look like fruit salad.
7877 * Article Fontisizing::         Making emphasized text look nice.
7878 * Article Hiding::              You also want to make certain info go away.
7879 * Article Washing::             Lots of way-neat functions to make life better.
7880 * Article Header::              Doing various header transformations.
7881 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7882 * Article Date::                Grumble, UT!
7883 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7884 * Article Signature::           What is a signature?
7885 * Article Miscellania::         Various other stuff.
7886 @end menu
7887
7888
7889 @node Article Highlighting
7890 @subsection Article Highlighting
7891 @cindex highlighting
7892
7893 Not only do you want your article buffer to look like fruit salad, but
7894 you want it to look like technicolor fruit salad.
7895
7896 @table @kbd
7897
7898 @item W H a
7899 @kindex W H a (Summary)
7900 @findex gnus-article-highlight
7901 @findex gnus-article-maybe-highlight
7902 Do much highlighting of the current article
7903 (@code{gnus-article-highlight}).  This function highlights header, cited
7904 text, the signature, and adds buttons to the body and the head.
7905
7906 @item W H h
7907 @kindex W H h (Summary)
7908 @findex gnus-article-highlight-headers
7909 @vindex gnus-header-face-alist
7910 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7911 highlighting will be done according to the @code{gnus-header-face-alist}
7912 variable, which is a list where each element has the form
7913 @code{(@var{regexp} @var{name} @var{content})}.
7914 @var{regexp} is a regular expression for matching the
7915 header, @var{name} is the face used for highlighting the header name
7916 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7917 the header value.  The first match made will be used.  Note that
7918 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7919
7920 @item W H c
7921 @kindex W H c (Summary)
7922 @findex gnus-article-highlight-citation
7923 Highlight cited text (@code{gnus-article-highlight-citation}).
7924
7925 Some variables to customize the citation highlights:
7926
7927 @table @code
7928 @vindex gnus-cite-parse-max-size
7929
7930 @item gnus-cite-parse-max-size
7931 If the article size if bigger than this variable (which is 25000 by
7932 default), no citation highlighting will be performed.
7933
7934 @item gnus-cite-max-prefix
7935 @vindex gnus-cite-max-prefix
7936 Maximum possible length for a citation prefix (default 20).
7937
7938 @item gnus-cite-face-list
7939 @vindex gnus-cite-face-list
7940 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
7941 When there are citations from multiple articles in the same message,
7942 gnus will try to give each citation from each article its own face.
7943 This should make it easier to see who wrote what.
7944
7945 @item gnus-supercite-regexp
7946 @vindex gnus-supercite-regexp
7947 Regexp matching normal Supercite attribution lines.
7948
7949 @item gnus-supercite-secondary-regexp
7950 @vindex gnus-supercite-secondary-regexp
7951 Regexp matching mangled Supercite attribution lines.
7952
7953 @item gnus-cite-minimum-match-count
7954 @vindex gnus-cite-minimum-match-count
7955 Minimum number of identical prefixes we have to see before we believe
7956 that it's a citation.
7957
7958 @item gnus-cite-attribution-prefix
7959 @vindex gnus-cite-attribution-prefix
7960 Regexp matching the beginning of an attribution line.
7961
7962 @item gnus-cite-attribution-suffix
7963 @vindex gnus-cite-attribution-suffix
7964 Regexp matching the end of an attribution line.
7965
7966 @item gnus-cite-attribution-face
7967 @vindex gnus-cite-attribution-face
7968 Face used for attribution lines.  It is merged with the face for the
7969 cited text belonging to the attribution.
7970
7971 @end table
7972
7973
7974 @item W H s
7975 @kindex W H s (Summary)
7976 @vindex gnus-signature-separator
7977 @vindex gnus-signature-face
7978 @findex gnus-article-highlight-signature
7979 Highlight the signature (@code{gnus-article-highlight-signature}).
7980 Everything after @code{gnus-signature-separator} (@pxref{Article
7981 Signature}) in an article will be considered a signature and will be
7982 highlighted with @code{gnus-signature-face}, which is @code{italic} by
7983 default.
7984
7985 @end table
7986
7987 @xref{Customizing Articles}, for how to highlight articles automatically.
7988
7989
7990 @node Article Fontisizing
7991 @subsection Article Fontisizing
7992 @cindex emphasis
7993 @cindex article emphasis
7994
7995 @findex gnus-article-emphasize
7996 @kindex W e (Summary)
7997 People commonly add emphasis to words in news articles by writing things
7998 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
7999 this look nicer by running the article through the @kbd{W e}
8000 (@code{gnus-article-emphasize}) command.
8001
8002 @vindex gnus-emphasis-alist
8003 How the emphasis is computed is controlled by the
8004 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8005 element is a regular expression to be matched.  The second is a number
8006 that says what regular expression grouping is used to find the entire
8007 emphasized word.  The third is a number that says what regexp grouping
8008 should be displayed and highlighted.  (The text between these two
8009 groupings will be hidden.)  The fourth is the face used for
8010 highlighting.
8011
8012 @lisp
8013 (setq gnus-emphasis-alist
8014       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8015         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8016 @end lisp
8017
8018 @cindex slash
8019 @cindex asterisk
8020 @cindex underline
8021 @cindex /
8022 @cindex *
8023
8024 @vindex gnus-emphasis-underline
8025 @vindex gnus-emphasis-bold
8026 @vindex gnus-emphasis-italic
8027 @vindex gnus-emphasis-underline-bold
8028 @vindex gnus-emphasis-underline-italic
8029 @vindex gnus-emphasis-bold-italic
8030 @vindex gnus-emphasis-underline-bold-italic
8031 By default, there are seven rules, and they use the following faces:
8032 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8033 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8034 @code{gnus-emphasis-underline-italic},
8035 @code{gnus-emphasis-underline-bold}, and
8036 @code{gnus-emphasis-underline-bold-italic}.
8037
8038 If you want to change these faces, you can either use @kbd{M-x
8039 customize}, or you can use @code{copy-face}.  For instance, if you want
8040 to make @code{gnus-emphasis-italic} use a red face instead, you could
8041 say something like:
8042
8043 @lisp
8044 (copy-face 'red 'gnus-emphasis-italic)
8045 @end lisp
8046
8047 @vindex gnus-group-highlight-words-alist
8048
8049 If you want to highlight arbitrary words, you can use the
8050 @code{gnus-group-highlight-words-alist} variable, which uses the same
8051 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8052 parameter (@pxref{Group Parameters}) can also be used.
8053
8054 @xref{Customizing Articles}, for how to fontize articles automatically.
8055
8056
8057 @node Article Hiding
8058 @subsection Article Hiding
8059 @cindex article hiding
8060
8061 Or rather, hiding certain things in each article.  There usually is much
8062 too much cruft in most articles.
8063
8064 @table @kbd
8065
8066 @item W W a
8067 @kindex W W a (Summary)
8068 @findex gnus-article-hide
8069 Do quite a lot of hiding on the article buffer
8070 (@kbd{gnus-article-hide}).  In particular, this function will hide
8071 headers, PGP, cited text and the signature.
8072
8073 @item W W h
8074 @kindex W W h (Summary)
8075 @findex gnus-article-hide-headers
8076 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8077 Headers}.
8078
8079 @item W W b
8080 @kindex W W b (Summary)
8081 @findex gnus-article-hide-boring-headers
8082 Hide headers that aren't particularly interesting
8083 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8084
8085 @item W W s
8086 @kindex W W s (Summary)
8087 @findex gnus-article-hide-signature
8088 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8089 Signature}.
8090
8091 @item W W l
8092 @kindex W W l (Summary)
8093 @findex gnus-article-hide-list-identifiers
8094 @vindex gnus-list-identifiers
8095 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8096 are strings some mailing list servers add to the beginning of all
8097 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8098 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8099 may not contain @code{\\(..\\)}.
8100
8101 @table @code
8102
8103 @item gnus-list-identifiers
8104 @vindex gnus-list-identifiers
8105 A regular expression that matches list identifiers to be removed from
8106 subject.  This can also be a list of regular expressions.
8107
8108 @end table
8109
8110 @item W W P
8111 @kindex W W P (Summary)
8112 @findex gnus-article-hide-pem
8113 Hide @sc{pem} (privacy enhanced messages) cruft
8114 (@code{gnus-article-hide-pem}).
8115
8116 @item W W B
8117 @kindex W W B (Summary)
8118 @findex gnus-article-strip-banner
8119 @vindex gnus-article-banner-alist
8120 @vindex gnus-article-address-banner-alist
8121 @cindex banner
8122 @cindex OneList
8123 @cindex stripping advertisements
8124 @cindex advertisements
8125 Strip the banner specified by the @code{banner} group parameter
8126 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8127 annoying banners and/or signatures that some mailing lists and moderated
8128 groups adds to all the messages.  The way to use this function is to add
8129 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8130 group you want banners stripped from.  The parameter either be a string,
8131 which will be interpreted as a regular expression matching text to be
8132 removed, or the symbol @code{signature}, meaning that the (last)
8133 signature should be removed, or other symbol, meaning that the
8134 corresponding regular expression in @code{gnus-article-banner-alist} is
8135 used.
8136
8137 Regardless of a group, you can hide things like advertisements only when
8138 the sender of an article has a certain mail address specified in
8139 @code{gnus-article-address-banner-alist}.
8140
8141 @table @code
8142
8143 @item gnus-article-address-banner-alist
8144 @vindex gnus-article-address-banner-alist
8145 Alist of mail addresses and banners.  Each element has the form
8146 @code{(ADDRESS . BANNER)}, where ADDRESS is a regexp matching a mail
8147 address in the From header, BANNER is one of a symbol @code{signature},
8148 an item in @code{gnus-article-banner-alist}, a regexp and @code{nil}.
8149 If ADDRESS matches author's mail address, it will remove things like
8150 advertisements.  For example, if a sender has the mail address
8151 @samp{hail@@yoo-hoo.co.jp} and there is a banner something like
8152 @samp{Do You Yoo-hoo!?} in all articles he sends, you can use the
8153 following element to remove them:
8154
8155 @lisp
8156 ("@@yoo-hoo\\.co\\.jp\\'" . "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8157 @end lisp
8158
8159 @end table
8160
8161 @item W W c
8162 @kindex W W c (Summary)
8163 @findex gnus-article-hide-citation
8164 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8165 customizing the hiding:
8166
8167 @table @code
8168
8169 @item gnus-cited-opened-text-button-line-format
8170 @itemx gnus-cited-closed-text-button-line-format
8171 @vindex gnus-cited-closed-text-button-line-format
8172 @vindex gnus-cited-opened-text-button-line-format
8173 Gnus adds buttons to show where the cited text has been hidden, and to
8174 allow toggle hiding the text.  The format of the variable is specified
8175 by these format-like variable (@pxref{Formatting Variables}).  These
8176 specs are valid:
8177
8178 @table @samp
8179 @item b
8180 Starting point of the hidden text.
8181 @item e
8182 Ending point of the hidden text.
8183 @item l
8184 Number of characters in the hidden region.
8185 @item n
8186 Number of lines of hidden text.
8187 @end table
8188
8189 @item gnus-cited-lines-visible
8190 @vindex gnus-cited-lines-visible
8191 The number of lines at the beginning of the cited text to leave
8192 shown. This can also be a cons cell with the number of lines at the top
8193 and bottom of the text, respectively, to remain visible.
8194
8195 @end table
8196
8197 @item W W C-c
8198 @kindex W W C-c (Summary)
8199 @findex gnus-article-hide-citation-maybe
8200
8201 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8202 following two variables:
8203
8204 @table @code
8205 @item gnus-cite-hide-percentage
8206 @vindex gnus-cite-hide-percentage
8207 If the cited text is of a bigger percentage than this variable (default
8208 50), hide the cited text.
8209
8210 @item gnus-cite-hide-absolute
8211 @vindex gnus-cite-hide-absolute
8212 The cited text must have at least this length (default 10) before it
8213 is hidden.
8214 @end table
8215
8216 @item W W C
8217 @kindex W W C (Summary)
8218 @findex gnus-article-hide-citation-in-followups
8219 Hide cited text in articles that aren't roots
8220 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8221 useful as an interactive command, but might be a handy function to stick
8222 have happen automatically (@pxref{Customizing Articles}).
8223
8224 @end table
8225
8226 All these ``hiding'' commands are toggles, but if you give a negative
8227 prefix to these commands, they will show what they have previously
8228 hidden.  If you give a positive prefix, they will always hide.
8229
8230 Also @pxref{Article Highlighting} for further variables for
8231 citation customization.
8232
8233 @xref{Customizing Articles}, for how to hide article elements
8234 automatically.
8235
8236
8237 @node Article Washing
8238 @subsection Article Washing
8239 @cindex washing
8240 @cindex article washing
8241
8242 We call this ``article washing'' for a really good reason.  Namely, the
8243 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8244
8245 @dfn{Washing} is defined by us as ``changing something from something to
8246 something else'', but normally results in something looking better.
8247 Cleaner, perhaps.
8248
8249 @xref{Customizing Articles}, if you want to change how Gnus displays
8250 articles by default.
8251
8252 @table @kbd
8253
8254 @item C-u g
8255 This is not really washing, it's sort of the opposite of washing.  If
8256 you type this, you see the article exactly as it exists on disk or on
8257 the server.
8258
8259 @item W l
8260 @kindex W l (Summary)
8261 @findex gnus-summary-stop-page-breaking
8262 Remove page breaks from the current article
8263 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8264 delimiters.
8265
8266 @item W r
8267 @kindex W r (Summary)
8268 @findex gnus-summary-caesar-message
8269 @c @icon{gnus-summary-caesar-message}
8270 Do a Caesar rotate (rot13) on the article buffer
8271 (@code{gnus-summary-caesar-message}).
8272 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8273 (Typically offensive jokes and such.)
8274
8275 It's commonly called ``rot13'' because each letter is rotated 13
8276 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8277 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8278 is rumored to have employed this form of, uh, somewhat weak encryption.
8279
8280 @item W m
8281 @kindex W m (Summary)
8282 @findex gnus-summary-morse-message
8283 @c @icon{gnus-summary-morse-message}
8284 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8285
8286 @item W t
8287 @item t
8288 @kindex W t (Summary)
8289 @kindex t (Summary)
8290 @findex gnus-summary-toggle-header
8291 Toggle whether to display all headers in the article buffer
8292 (@code{gnus-summary-toggle-header}).
8293
8294 @item W v
8295 @kindex W v (Summary)
8296 @findex gnus-summary-verbose-headers
8297 Toggle whether to display all headers in the article buffer permanently
8298 (@code{gnus-summary-verbose-headers}).
8299
8300 @item W m
8301 @kindex W m (Summary)
8302 @findex gnus-summary-toggle-mime
8303 Toggle whether to run the article through @sc{mime} before displaying
8304 (@code{gnus-summary-toggle-mime}).
8305
8306 @item W o
8307 @kindex W o (Summary)
8308 @findex gnus-article-treat-overstrike
8309 Treat overstrike (@code{gnus-article-treat-overstrike}).
8310
8311 @item W d
8312 @kindex W d (Summary)
8313 @findex gnus-article-treat-dumbquotes
8314 @vindex gnus-article-dumbquotes-map
8315 @cindex Smartquotes
8316 @cindex M****s*** sm*rtq**t*s
8317 @cindex Latin 1
8318 Treat M****s*** sm*rtq**t*s according to
8319 @code{gnus-article-dumbquotes-map}
8320 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8321 whether a character is a sm*rtq**t* or not, so it should only be used
8322 interactively.
8323
8324 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8325 an attempt to provide more quoting characters.  If you see something
8326 like @code{\222} or @code{\264} where you're expecting some kind of
8327 apostrophe or quotation mark, then try this wash.
8328
8329 @item W Y f
8330 @kindex W Y f (Summary)
8331 @findex gnus-article-outlook-deuglify-article
8332 @cindex Outlook Express
8333 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8334 unwrap lines, repair attribution and rearrange citation.
8335 (@code{gnus-article-outlook-deuglify-article}).
8336
8337 @item W Y u
8338 @kindex W Y u (Summary)
8339 @findex gnus-article-outlook-unwrap-lines
8340 Unwrap lines that appear to be wrapped citation lines.  You can control
8341 what lines will be unwrapped by frobbing
8342 @code{gnus-outlook-deuglify-unwrap-min} and
8343 @code{gnus-outlook-deuglify-unwrap-max}, indicating the miminum and
8344 maximum length of an unwrapped citation line.
8345 (@code{gnus-outlook-deuglify-article}).
8346
8347 @item W Y a
8348 @kindex W Y a (Summary)
8349 @findex gnus-article-outlook-repair-attribution
8350 Repair a broken attribution line.
8351 (@code{gnus-article-outlook-repair-attribution}).
8352
8353 @item W Y c
8354 @kindex W Y c (Summary)
8355 @findex gnus-article-outlook-rearrange-citation
8356 Repair broken citations by rearranging the text.
8357 (@code{gnus-article-outlook-rearrange-citation}).
8358
8359 @item W w
8360 @kindex W w (Summary)
8361 @findex gnus-article-fill-cited-article
8362 Do word wrap (@code{gnus-article-fill-cited-article}).
8363
8364 You can give the command a numerical prefix to specify the width to use
8365 when filling.
8366
8367 @item W Q
8368 @kindex W Q (Summary)
8369 @findex gnus-article-fill-long-lines
8370 Fill long lines (@code{gnus-article-fill-long-lines}).
8371
8372 @item W C
8373 @kindex W C (Summary)
8374 @findex gnus-article-capitalize-sentences
8375 Capitalize the first word in each sentence
8376 (@code{gnus-article-capitalize-sentences}).
8377
8378 @item W c
8379 @kindex W c (Summary)
8380 @findex gnus-article-remove-cr
8381 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8382 (this takes care of DOS line endings), and then translate any remaining
8383 CRs into LF (this takes care of Mac line endings)
8384 (@code{gnus-article-remove-cr}).
8385
8386 @item W 6
8387 @kindex W 6 (Summary)
8388 @findex gnus-article-de-base64-unreadable
8389 Treat base64 (@code{gnus-article-de-base64-unreadable}).
8390 Base64 is one common @sc{mime} encoding employed when sending non-ASCII
8391 (i. e., 8-bit) articles.  Note that this is usually done
8392 automatically by Gnus if the message in question has a
8393 @code{Content-Transfer-Encoding} header that says that this encoding has
8394 been done.
8395 If a prefix is given, a charset will be asked for.
8396
8397 @item W Z
8398 @kindex W Z (Summary)
8399 @findex gnus-article-decode-HZ
8400 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8401 common encoding employed when sending Chinese articles.  It typically
8402 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8403
8404 @item W u
8405 @kindex W u (Summary)
8406 @findex gnus-article-unsplit-urls
8407 Remove newlines from within URLs.  Some mailers insert newlines into
8408 outgoing email messages to keep lines short.  This reformatting can
8409 split long URLs onto multiple lines.  Repair those URLs by removing
8410 the newlines (@code{gnus-article-unsplit-urls}).
8411
8412 @item W h
8413 @kindex W h (Summary)
8414 @findex gnus-article-wash-html
8415 Treat @sc{html} (@code{gnus-article-wash-html}).  Note that this is
8416 usually done automatically by Gnus if the message in question has a
8417 @code{Content-Type} header that says that the message is @sc{html}.
8418
8419 If a prefix is given, a charset will be asked for.
8420
8421 @vindex gnus-article-wash-function
8422 The default is to use the function specified by
8423 @code{mm-text-html-renderer} (@pxref{(emacs-mime)Display
8424 Customization}) to convert the @sc{html}, but this is controlled by
8425 the @code{gnus-article-wash-function} variable.  Pre-defined functions
8426 you can use include:
8427
8428 @table @code
8429 @item w3
8430 Use Emacs/w3.
8431
8432 @item w3m
8433 Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
8434 information).
8435
8436 @item links
8437 Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}).
8438
8439 @item lynx
8440 Use Lynx (see @uref{http://lynx.browser.org/}).
8441
8442 @item html2text
8443 Use html2text -- a simple @sc{html} converter included with Gnus.
8444
8445 @end table
8446
8447 @item W b
8448 @kindex W b (Summary)
8449 @findex gnus-article-add-buttons
8450 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8451 @xref{Article Buttons}.
8452
8453 @item W B
8454 @kindex W B (Summary)
8455 @findex gnus-article-add-buttons-to-head
8456 Add clickable buttons to the article headers
8457 (@code{gnus-article-add-buttons-to-head}).
8458
8459 @item W p
8460 @kindex W p (Summary)
8461 @findex gnus-article-verify-x-pgp-sig
8462 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
8463 Control messages such as @code{newgroup} and @code{checkgroups} are
8464 usually signed by the hierarchy maintainer.  You need to add the PGP
8465 public key of the maintainer to your keyring to verify the
8466 message.@footnote{PGP keys for many hierarchies are available at
8467 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8468
8469 @item W s
8470 @kindex W s (Summary)
8471 @findex gnus-summary-force-verify-and-decrypt
8472 Verify a signed (PGP, @sc{pgp/mime} or @sc{s/mime}) message
8473 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8474
8475 @item W a
8476 @kindex W a (Summary)
8477 @findex gnus-article-strip-headers-in-body
8478 Strip headers like the @code{X-No-Archive} header from the beginning of
8479 article bodies (@code{gnus-article-strip-headers-in-body}).
8480
8481 @item W E l
8482 @kindex W E l (Summary)
8483 @findex gnus-article-strip-leading-blank-lines
8484 Remove all blank lines from the beginning of the article
8485 (@code{gnus-article-strip-leading-blank-lines}).
8486
8487 @item W E m
8488 @kindex W E m (Summary)
8489 @findex gnus-article-strip-multiple-blank-lines
8490 Replace all blank lines with empty lines and then all multiple empty
8491 lines with a single empty line.
8492 (@code{gnus-article-strip-multiple-blank-lines}).
8493
8494 @item W E t
8495 @kindex W E t (Summary)
8496 @findex gnus-article-remove-trailing-blank-lines
8497 Remove all blank lines at the end of the article
8498 (@code{gnus-article-remove-trailing-blank-lines}).
8499
8500 @item W E a
8501 @kindex W E a (Summary)
8502 @findex gnus-article-strip-blank-lines
8503 Do all the three commands above
8504 (@code{gnus-article-strip-blank-lines}).
8505
8506 @item W E A
8507 @kindex W E A (Summary)
8508 @findex gnus-article-strip-all-blank-lines
8509 Remove all blank lines
8510 (@code{gnus-article-strip-all-blank-lines}).
8511
8512 @item W E s
8513 @kindex W E s (Summary)
8514 @findex gnus-article-strip-leading-space
8515 Remove all white space from the beginning of all lines of the article
8516 body (@code{gnus-article-strip-leading-space}).
8517
8518 @item W E e
8519 @kindex W E e (Summary)
8520 @findex gnus-article-strip-trailing-space
8521 Remove all white space from the end of all lines of the article
8522 body (@code{gnus-article-strip-trailing-space}).
8523
8524 @end table
8525
8526 @xref{Customizing Articles}, for how to wash articles automatically.
8527
8528
8529 @node Article Header
8530 @subsection Article Header
8531
8532 These commands perform various transformations of article header.
8533
8534 @table @kbd
8535
8536 @item W G u
8537 @kindex W G u (Summary)
8538 @findex gnus-article-treat-unfold-headers
8539 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8540
8541 @item W G n
8542 @kindex W G n (Summary)
8543 @findex gnus-article-treat-fold-newsgroups
8544 Fold the @code{Newsgroups} and @code{Followup-To} headers
8545 (@code{gnus-article-treat-fold-newsgroups}).
8546
8547 @item W G f
8548 @kindex W G f (Summary)
8549 @findex gnus-article-treat-fold-headers
8550 Fold all the message headers
8551 (@code{gnus-article-treat-fold-headers}).
8552
8553 @item W E w
8554 @kindex W E w
8555 @findex gnus-article-remove-leading-whitespace
8556 Remove excessive whitespace from all headers
8557 (@code{gnus-article-remove-leading-whitespace}).
8558
8559 @end table
8560
8561
8562 @node Article Buttons
8563 @subsection Article Buttons
8564 @cindex buttons
8565
8566 People often include references to other stuff in articles, and it would
8567 be nice if Gnus could just fetch whatever it is that people talk about
8568 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8569 button on these references.
8570
8571 @vindex gnus-button-man-handler
8572 Gnus adds @dfn{buttons} to certain standard references by default:
8573 Well-formed URLs, mail addresses, Message-IDs, Info links and man pages.
8574 This is controlled by two variables, one that handles article bodies and
8575 one that handles article heads:
8576
8577 @table @code
8578
8579 @item gnus-button-alist
8580 @vindex gnus-button-alist
8581 This is an alist where each entry has this form:
8582
8583 @lisp
8584 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8585 @end lisp
8586
8587 @table @var
8588
8589 @item regexp
8590 All text that match this regular expression (case insensitive) will be
8591 considered an external reference.  Here's a typical regexp that matches
8592 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8593 variable containing a regexp, useful variables to use include
8594 @code{gnus-button-url-regexp}.
8595
8596 @item button-par
8597 Gnus has to know which parts of the matches is to be highlighted.  This
8598 is a number that says what sub-expression of the regexp is to be
8599 highlighted.  If you want it all highlighted, you use 0 here.
8600
8601 @item use-p
8602 This form will be @code{eval}ed, and if the result is non-@code{nil},
8603 this is considered a match.  This is useful if you want extra sifting to
8604 avoid false matches.
8605
8606 @item function
8607 This function will be called when you click on this button.
8608
8609 @item data-par
8610 As with @var{button-par}, this is a sub-expression number, but this one
8611 says which part of the match is to be sent as data to @var{function}.
8612
8613 @end table
8614
8615 So the full entry for buttonizing URLs is then
8616
8617 @lisp
8618 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8619 @end lisp
8620
8621 @item gnus-header-button-alist
8622 @vindex gnus-header-button-alist
8623 This is just like the other alist, except that it is applied to the
8624 article head only, and that each entry has an additional element that is
8625 used to say what headers to apply the buttonize coding to:
8626
8627 @lisp
8628 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8629 @end lisp
8630
8631 @var{header} is a regular expression.
8632
8633 @item gnus-button-url-regexp
8634 @vindex gnus-button-url-regexp
8635 A regular expression that matches embedded URLs.  It is used in the
8636 default values of the variables above.
8637
8638 @item gnus-article-button-face
8639 @vindex gnus-article-button-face
8640 Face used on buttons.
8641
8642 @item gnus-article-mouse-face
8643 @vindex gnus-article-mouse-face
8644 Face used when the mouse cursor is over a button.
8645
8646 @end table
8647
8648 @xref{Customizing Articles}, for how to buttonize articles automatically.
8649
8650
8651 @node Article Date
8652 @subsection Article Date
8653
8654 The date is most likely generated in some obscure timezone you've never
8655 heard of, so it's quite nice to be able to find out what the time was
8656 when the article was sent.
8657
8658 @table @kbd
8659
8660 @item W T u
8661 @kindex W T u (Summary)
8662 @findex gnus-article-date-ut
8663 Display the date in UT (aka. GMT, aka ZULU)
8664 (@code{gnus-article-date-ut}).
8665
8666 @item W T i
8667 @kindex W T i (Summary)
8668 @findex gnus-article-date-iso8601
8669 @cindex ISO 8601
8670 Display the date in international format, aka. ISO 8601
8671 (@code{gnus-article-date-iso8601}).
8672
8673 @item W T l
8674 @kindex W T l (Summary)
8675 @findex gnus-article-date-local
8676 Display the date in the local timezone (@code{gnus-article-date-local}).
8677
8678 @item W T p
8679 @kindex W T p (Summary)
8680 @findex gnus-article-date-english
8681 Display the date in a format that's easily pronounceable in English
8682 (@code{gnus-article-date-english}).
8683
8684 @item W T s
8685 @kindex W T s (Summary)
8686 @vindex gnus-article-time-format
8687 @findex gnus-article-date-user
8688 @findex format-time-string
8689 Display the date using a user-defined format
8690 (@code{gnus-article-date-user}).  The format is specified by the
8691 @code{gnus-article-time-format} variable, and is a string that's passed
8692 to @code{format-time-string}.  See the documentation of that variable
8693 for a list of possible format specs.
8694
8695 @item W T e
8696 @kindex W T e (Summary)
8697 @findex gnus-article-date-lapsed
8698 @findex gnus-start-date-timer
8699 @findex gnus-stop-date-timer
8700 Say how much time has elapsed between the article was posted and now
8701 (@code{gnus-article-date-lapsed}).  It looks something like:
8702
8703 @example
8704 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8705 @end example
8706
8707 The value of @code{gnus-article-date-lapsed-new-header} determines
8708 whether this header will just be added below the old Date one, or will
8709 replace it.
8710
8711 An advantage of using Gnus to read mail is that it converts simple bugs
8712 into wonderful absurdities.
8713
8714 If you want to have this line updated continually, you can put
8715
8716 @lisp
8717 (gnus-start-date-timer)
8718 @end lisp
8719
8720 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8721 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8722 command.
8723
8724 @item W T o
8725 @kindex W T o (Summary)
8726 @findex gnus-article-date-original
8727 Display the original date (@code{gnus-article-date-original}).  This can
8728 be useful if you normally use some other conversion function and are
8729 worried that it might be doing something totally wrong.  Say, claiming
8730 that the article was posted in 1854.  Although something like that is
8731 @emph{totally} impossible.  Don't you trust me? *titter*
8732
8733 @end table
8734
8735 @xref{Customizing Articles}, for how to display the date in your
8736 preferred format automatically.
8737
8738
8739 @node Article Display
8740 @subsection Article Display
8741 @cindex picons
8742 @cindex x-face
8743 @cindex smileys
8744
8745 These commands add various frivolous display gimmicks to the article
8746 buffer in Emacs versions that support them.
8747
8748 @code{X-Face} headers are small black-and-white images supplied by the
8749 message headers (@pxref{X-Face}).
8750
8751 Picons, on the other hand, reside on your own system, and Gnus will
8752 try to match the headers to what you have (@pxref{Picons}).
8753
8754 Smileys are those little @samp{:-)} symbols that people like to litter
8755 their messages with (@pxref{Smileys}).
8756
8757 All these functions are toggles--if the elements already exist,
8758 they'll be removed.
8759
8760 @table @kbd
8761 @item W D x
8762 @kindex W D x (Summary)
8763 @findex gnus-article-display-x-face
8764 Display an @code{X-Face} in the @code{From} header.
8765 (@code{gnus-article-display-x-face}).
8766
8767 @item W D d
8768 @kindex W D d (Summary)
8769 @findex gnus-article-display-face
8770 Display a @code{Face} in the @code{From} header.
8771 (@code{gnus-article-display-face}).
8772
8773 @item W D s
8774 @kindex W D s (Summary)
8775 @findex gnus-treat-smiley
8776 Display smileys (@code{gnus-treat-smiley}).
8777
8778 @item W D f
8779 @kindex W D f (Summary)
8780 @findex gnus-treat-from-picon
8781 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8782
8783 @item W D m
8784 @kindex W D m (Summary)
8785 @findex gnus-treat-mail-picon
8786 Piconify all mail headers (i. e., @code{Cc}, @code{To})
8787 (@code{gnus-treat-mail-picon}).
8788
8789 @item W D n
8790 @kindex W D n (Summary)
8791 @findex gnus-treat-newsgroups-picon
8792 Piconify all news headers (i. e., @code{Newsgroups} and
8793 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
8794
8795 @item W D D
8796 @kindex W D D (Summary)
8797 @findex gnus-article-remove-images
8798 Remove all images from the article buffer
8799 (@code{gnus-article-remove-images}).
8800
8801 @end table
8802
8803
8804
8805 @node Article Signature
8806 @subsection Article Signature
8807 @cindex signatures
8808 @cindex article signature
8809
8810 @vindex gnus-signature-separator
8811 Each article is divided into two parts---the head and the body.  The
8812 body can be divided into a signature part and a text part.  The variable
8813 that says what is to be considered a signature is
8814 @code{gnus-signature-separator}.  This is normally the standard
8815 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8816 non-standard signature separators, so this variable can also be a list
8817 of regular expressions to be tested, one by one.  (Searches are done
8818 from the end of the body towards the beginning.)  One likely value is:
8819
8820 @lisp
8821 (setq gnus-signature-separator
8822       '("^-- $"         ; The standard
8823         "^-- *$"        ; A common mangling
8824         "^-------*$"    ; Many people just use a looong
8825                         ; line of dashes.  Shame!
8826         "^ *--------*$" ; Double-shame!
8827         "^________*$"   ; Underscores are also popular
8828         "^========*$")) ; Pervert!
8829 @end lisp
8830
8831 The more permissive you are, the more likely it is that you'll get false
8832 positives.
8833
8834 @vindex gnus-signature-limit
8835 @code{gnus-signature-limit} provides a limit to what is considered a
8836 signature when displaying articles.
8837
8838 @enumerate
8839 @item
8840 If it is an integer, no signature may be longer (in characters) than
8841 that integer.
8842 @item
8843 If it is a floating point number, no signature may be longer (in lines)
8844 than that number.
8845 @item
8846 If it is a function, the function will be called without any parameters,
8847 and if it returns @code{nil}, there is no signature in the buffer.
8848 @item
8849 If it is a string, it will be used as a regexp.  If it matches, the text
8850 in question is not a signature.
8851 @end enumerate
8852
8853 This variable can also be a list where the elements may be of the types
8854 listed above.  Here's an example:
8855
8856 @lisp
8857 (setq gnus-signature-limit
8858       '(200.0 "^---*Forwarded article"))
8859 @end lisp
8860
8861 This means that if there are more than 200 lines after the signature
8862 separator, or the text after the signature separator is matched by
8863 the regular expression @samp{^---*Forwarded article}, then it isn't a
8864 signature after all.
8865
8866
8867 @node Article Miscellania
8868 @subsection Article Miscellania
8869
8870 @table @kbd
8871 @item A t
8872 @kindex A t (Summary)
8873 @findex gnus-article-babel
8874 Translate the article from one language to another
8875 (@code{gnus-article-babel}).
8876
8877 @end table
8878
8879
8880 @node MIME Commands
8881 @section MIME Commands
8882 @cindex MIME decoding
8883 @cindex attachments
8884 @cindex viewing attachments
8885
8886 The following commands all understand the numerical prefix.  For
8887 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8888
8889 @table @kbd
8890 @item b
8891 @itemx K v
8892 @kindex b (Summary)
8893 @kindex K v (Summary)
8894 View the @sc{mime} part.
8895
8896 @item K o
8897 @kindex K o (Summary)
8898 Save the @sc{mime} part.
8899
8900 @item K c
8901 @kindex K c (Summary)
8902 Copy the @sc{mime} part.
8903
8904 @item K e
8905 @kindex K e (Summary)
8906 View the @sc{mime} part externally.
8907
8908 @item K i
8909 @kindex K i (Summary)
8910 View the @sc{mime} part internally.
8911
8912 @item K |
8913 @kindex K | (Summary)
8914 Pipe the @sc{mime} part to an external command.
8915 @end table
8916
8917 The rest of these @sc{mime} commands do not use the numerical prefix in
8918 the same manner:
8919
8920 @table @kbd
8921 @item K b
8922 @kindex K b (Summary)
8923 Make all the @sc{mime} parts have buttons in front of them.  This is
8924 mostly useful if you wish to save (or perform other actions) on inlined
8925 parts.
8926
8927 @item K m
8928 @kindex K m (Summary)
8929 @findex gnus-summary-repair-multipart
8930 Some multipart messages are transmitted with missing or faulty headers.
8931 This command will attempt to ``repair'' these messages so that they can
8932 be viewed in a more pleasant manner
8933 (@code{gnus-summary-repair-multipart}).
8934
8935 @item X m
8936 @kindex X m (Summary)
8937 @findex gnus-summary-save-parts
8938 Save all parts matching a @sc{mime} type to a directory
8939 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8940 convention (@pxref{Process/Prefix}).
8941
8942 @item M-t
8943 @kindex M-t (Summary)
8944 @findex gnus-summary-toggle-display-buttonized
8945 Toggle the buttonized display of the article buffer
8946 (@code{gnus-summary-toggle-display-buttonized}).
8947
8948 @item W M w
8949 @kindex W M w (Summary)
8950 @findex gnus-article-decode-mime-words
8951 Decode RFC 2047-encoded words in the article headers
8952 (@code{gnus-article-decode-mime-words}).
8953
8954 @item W M c
8955 @kindex W M c (Summary)
8956 @findex gnus-article-decode-charset
8957 Decode encoded article bodies as well as charsets
8958 (@code{gnus-article-decode-charset}).
8959
8960 This command looks in the @code{Content-Type} header to determine the
8961 charset.  If there is no such header in the article, you can give it a
8962 prefix, which will prompt for the charset to decode as.  In regional
8963 groups where people post using some common encoding (but do not
8964 include @sc{mime} headers), you can set the @code{charset} group/topic
8965 parameter to the required charset (@pxref{Group Parameters}).
8966
8967 @item W M v
8968 @kindex W M v (Summary)
8969 @findex gnus-mime-view-all-parts
8970 View all the @sc{mime} parts in the current article
8971 (@code{gnus-mime-view-all-parts}).
8972
8973 @end table
8974
8975 Relevant variables:
8976
8977 @table @code
8978 @item gnus-ignored-mime-types
8979 @vindex gnus-ignored-mime-types
8980 This is a list of regexps.  @sc{mime} types that match a regexp from
8981 this list will be completely ignored by Gnus.  The default value is
8982 @code{nil}.
8983
8984 To have all Vcards be ignored, you'd say something like this:
8985
8986 @lisp
8987 (setq gnus-ignored-mime-types
8988       '("text/x-vcard"))
8989 @end lisp
8990
8991 @item gnus-article-loose-mime
8992 @vindex gnus-article-loose-mime
8993 If non-@code{nil}, Gnus won't required the @samp{MIME-Version} header
8994 before interpreting the message as a @sc{mime} message.  This helps
8995 when reading messages from certain broken mail user agents.  The
8996 default is @code{nil}.
8997
8998 @item gnus-article-emulate-mime
8999 @vindex gnus-article-emulate-mime
9000 There are other, non-@sc{mime} encoding methods used.  The most common
9001 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9002 This variable is non-@code{nil}, Gnus will look in message bodies to
9003 see if it finds these encodings, and if so, it'll run them through the
9004 Gnus @sc{mime} machinery.  The default is @code{t}.
9005
9006 @item gnus-unbuttonized-mime-types
9007 @vindex gnus-unbuttonized-mime-types
9008 This is a list of regexps.  @sc{mime} types that match a regexp from
9009 this list won't have @sc{mime} buttons inserted unless they aren't
9010 displayed or this variable is overridden by
9011 @code{gnus-buttonized-mime-types}.  The default value is
9012 @code{(".*/.*")}.  This variable is only used when
9013 @code{gnus-inhibit-mime-unbuttonizing} is nil.
9014
9015 @item gnus-buttonized-mime-types
9016 @vindex gnus-buttonized-mime-types
9017 This is a list of regexps.  @sc{mime} types that match a regexp from
9018 this list will have @sc{mime} buttons inserted unless they aren't
9019 displayed.  This variable overrides
9020 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9021 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9022 is nil.
9023
9024 To see e.g. security buttons but no other buttons, you could set this
9025 variable to @code{("multipart/signed")} and leave
9026 @code{gnus-unbuttonized-mime-types} at the default value.
9027
9028 @item gnus-inhibit-mime-unbuttonizing
9029 @vindex gnus-inhibit-mime-unbuttonizing
9030 If this is non-nil, then all @sc{mime} parts get buttons.  The default
9031 value is @code{nil}.
9032
9033 @item gnus-article-mime-part-function
9034 @vindex gnus-article-mime-part-function
9035 For each @sc{mime} part, this function will be called with the @sc{mime}
9036 handle as the parameter.  The function is meant to be used to allow
9037 users to gather information from the article (e. g., add Vcard info to
9038 the bbdb database) or to do actions based on parts (e. g., automatically
9039 save all jpegs into some directory).
9040
9041 Here's an example function the does the latter:
9042
9043 @lisp
9044 (defun my-save-all-jpeg-parts (handle)
9045   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9046     (with-temp-buffer
9047       (insert (mm-get-part handle))
9048       (write-region (point-min) (point-max)
9049                     (read-file-name "Save jpeg to: ")))))
9050 (setq gnus-article-mime-part-function
9051       'my-save-all-jpeg-parts)
9052 @end lisp
9053
9054 @vindex gnus-mime-multipart-functions
9055 @item gnus-mime-multipart-functions
9056 Alist of @sc{mime} multipart types and functions to handle them.
9057
9058 @vindex mm-file-name-rewrite-functions
9059 @item mm-file-name-rewrite-functions
9060 List of functions used for rewriting file names of @sc{mime} parts.
9061 Each function takes a file name as input and returns a file name.
9062
9063 Ready-made functions include@*
9064 @code{mm-file-name-delete-whitespace},
9065 @code{mm-file-name-trim-whitespace},
9066 @code{mm-file-name-collapse-whitespace}, and
9067 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9068 the variable @code{mm-file-name-replace-whitespace} to replace each
9069 whitespace character in a file name with that string; default value
9070 is @code{"_"} (a single underscore).
9071 @findex mm-file-name-delete-whitespace
9072 @findex mm-file-name-trim-whitespace
9073 @findex mm-file-name-collapse-whitespace
9074 @findex mm-file-name-replace-whitespace
9075 @vindex mm-file-name-replace-whitespace
9076
9077 The standard functions @code{capitalize}, @code{downcase},
9078 @code{upcase}, and @code{upcase-initials} may be useful, too.
9079
9080 Everybody knows that whitespace characters in file names are evil,
9081 except those who don't know.  If you receive lots of attachments from
9082 such unenlightened users, you can make live easier by adding
9083
9084 @lisp
9085 (setq mm-file-name-rewrite-functions
9086       '(mm-file-name-trim-whitespace
9087         mm-file-name-collapse-whitespace
9088         mm-file-name-replace-whitespace))
9089 @end lisp
9090
9091 @noindent
9092 to your @file{.gnus.el} file.
9093
9094 @end table
9095
9096
9097 @node Charsets
9098 @section Charsets
9099 @cindex charsets
9100
9101 People use different charsets, and we have @sc{mime} to let us know what
9102 charsets they use.  Or rather, we wish we had.  Many people use
9103 newsreaders and mailers that do not understand or use @sc{mime}, and
9104 just send out messages without saying what character sets they use.  To
9105 help a bit with this, some local news hierarchies have policies that say
9106 what character set is the default.  For instance, the @samp{fj}
9107 hierarchy uses @code{iso-2022-jp-2}.
9108
9109 @vindex gnus-group-charset-alist
9110 This knowledge is encoded in the @code{gnus-group-charset-alist}
9111 variable, which is an alist of regexps (use the first item to match full
9112 group names) and default charsets to be used when reading these groups.
9113
9114 In addition, some people do use soi-disant @sc{mime}-aware agents that
9115 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9116 even if they really are in @code{koi-8}.  To help here, the
9117 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9118 charsets that are listed here will be ignored.  The variable can be
9119 set on a group-by-group basis using the group parameters (@pxref{Group
9120 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9121 which includes values some agents insist on having in there.
9122
9123 @vindex gnus-group-posting-charset-alist
9124 When posting, @code{gnus-group-posting-charset-alist} is used to
9125 determine which charsets should not be encoded using the @sc{mime}
9126 encodings.  For instance, some hierarchies discourage using
9127 quoted-printable header encoding.
9128
9129 This variable is an alist of regexps and permitted unencoded charsets
9130 for posting.  Each element of the alist has the form @code{(}@var{test
9131 header body-list}@code{)}, where:
9132
9133 @table @var
9134 @item test
9135 is either a regular expression matching the newsgroup header or a
9136 variable to query,
9137 @item header
9138 is the charset which may be left unencoded in the header (@code{nil}
9139 means encode all charsets),
9140 @item body-list
9141 is a list of charsets which may be encoded using 8bit content-transfer
9142 encoding in the body, or one of the special values @code{nil} (always
9143 encode using quoted-printable) or @code{t} (always use 8bit).
9144 @end table
9145
9146 @cindex Russian
9147 @cindex koi8-r
9148 @cindex koi8-u
9149 @cindex iso-8859-5
9150 @cindex coding system aliases
9151 @cindex preferred charset
9152
9153 Other charset tricks that may be useful, although not Gnus-specific:
9154
9155 If there are several @sc{mime} charsets that encode the same Emacs
9156 charset, you can choose what charset to use by saying the following:
9157
9158 @lisp
9159 (put-charset-property 'cyrillic-iso8859-5
9160                       'preferred-coding-system 'koi8-r)
9161 @end lisp
9162
9163 This means that Russian will be encoded using @code{koi8-r} instead of
9164 the default @code{iso-8859-5} @sc{mime} charset.
9165
9166 If you want to read messages in @code{koi8-u}, you can cheat and say
9167
9168 @lisp
9169 (define-coding-system-alias 'koi8-u 'koi8-r)
9170 @end lisp
9171
9172 This will almost do the right thing.
9173
9174 And finally, to read charsets like @code{windows-1251}, you can say
9175 something like
9176
9177 @lisp
9178 (codepage-setup 1251)
9179 (define-coding-system-alias 'windows-1251 'cp1251)
9180 @end lisp
9181
9182
9183 @node Article Commands
9184 @section Article Commands
9185
9186 @table @kbd
9187
9188 @item A P
9189 @cindex PostScript
9190 @cindex printing
9191 @kindex A P (Summary)
9192 @vindex gnus-ps-print-hook
9193 @findex gnus-summary-print-article
9194 Generate and print a PostScript image of the article buffer
9195 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9196 be run just before printing the buffer.  An alternative way to print
9197 article is to use Muttprint (@pxref{Saving Articles}).
9198
9199 @end table
9200
9201
9202 @node Summary Sorting
9203 @section Summary Sorting
9204 @cindex summary sorting
9205
9206 You can have the summary buffer sorted in various ways, even though I
9207 can't really see why you'd want that.
9208
9209 @table @kbd
9210
9211 @item C-c C-s C-n
9212 @kindex C-c C-s C-n (Summary)
9213 @findex gnus-summary-sort-by-number
9214 Sort by article number (@code{gnus-summary-sort-by-number}).
9215
9216 @item C-c C-s C-a
9217 @kindex C-c C-s C-a (Summary)
9218 @findex gnus-summary-sort-by-author
9219 Sort by author (@code{gnus-summary-sort-by-author}).
9220
9221 @item C-c C-s C-s
9222 @kindex C-c C-s C-s (Summary)
9223 @findex gnus-summary-sort-by-subject
9224 Sort by subject (@code{gnus-summary-sort-by-subject}).
9225
9226 @item C-c C-s C-d
9227 @kindex C-c C-s C-d (Summary)
9228 @findex gnus-summary-sort-by-date
9229 Sort by date (@code{gnus-summary-sort-by-date}).
9230
9231 @item C-c C-s C-l
9232 @kindex C-c C-s C-l (Summary)
9233 @findex gnus-summary-sort-by-lines
9234 Sort by lines (@code{gnus-summary-sort-by-lines}).
9235
9236 @item C-c C-s C-c
9237 @kindex C-c C-s C-c (Summary)
9238 @findex gnus-summary-sort-by-chars
9239 Sort by article length (@code{gnus-summary-sort-by-chars}).
9240
9241 @item C-c C-s C-i
9242 @kindex C-c C-s C-i (Summary)
9243 @findex gnus-summary-sort-by-score
9244 Sort by score (@code{gnus-summary-sort-by-score}).
9245
9246 @item C-c C-s C-r
9247 @kindex C-c C-s C-r (Summary)
9248 @findex gnus-summary-sort-by-random
9249 Randomize (@code{gnus-summary-sort-by-random}).
9250
9251 @item C-c C-s C-o
9252 @kindex C-c C-s C-o (Summary)
9253 @findex gnus-summary-sort-by-original
9254 Sort using the default sorting method
9255 (@code{gnus-summary-sort-by-original}).
9256 @end table
9257
9258 These functions will work both when you use threading and when you don't
9259 use threading.  In the latter case, all summary lines will be sorted,
9260 line by line.  In the former case, sorting will be done on a
9261 root-by-root basis, which might not be what you were looking for.  To
9262 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9263 Commands}).
9264
9265
9266 @node Finding the Parent
9267 @section Finding the Parent
9268 @cindex parent articles
9269 @cindex referring articles
9270
9271 @table @kbd
9272 @item ^
9273 @kindex ^ (Summary)
9274 @findex gnus-summary-refer-parent-article
9275 If you'd like to read the parent of the current article, and it is not
9276 displayed in the summary buffer, you might still be able to.  That is,
9277 if the current group is fetched by @sc{nntp}, the parent hasn't expired
9278 and the @code{References} in the current article are not mangled, you
9279 can just press @kbd{^} or @kbd{A r}
9280 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9281 you'll get the parent.  If the parent is already displayed in the
9282 summary buffer, point will just move to this article.
9283
9284 If given a positive numerical prefix, fetch that many articles back into
9285 the ancestry.  If given a negative numerical prefix, fetch just that
9286 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9287 grandparent and the grandgrandparent of the current article.  If you say
9288 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9289 article.
9290
9291 @item A R (Summary)
9292 @findex gnus-summary-refer-references
9293 @kindex A R (Summary)
9294 Fetch all articles mentioned in the @code{References} header of the
9295 article (@code{gnus-summary-refer-references}).
9296
9297 @item A T (Summary)
9298 @findex gnus-summary-refer-thread
9299 @kindex A T (Summary)
9300 Display the full thread where the current article appears
9301 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9302 headers in the current group to work, so it usually takes a while.  If
9303 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9304 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9305 visible effects normally, but it'll make this command work a whole lot
9306 faster.  Of course, it'll make group entry somewhat slow.
9307
9308 @vindex gnus-refer-thread-limit
9309 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9310 articles before the first displayed in the current group) headers to
9311 fetch when doing this command.  The default is 200.  If @code{t}, all
9312 the available headers will be fetched.  This variable can be overridden
9313 by giving the @kbd{A T} command a numerical prefix.
9314
9315 @item M-^ (Summary)
9316 @findex gnus-summary-refer-article
9317 @kindex M-^ (Summary)
9318 @cindex Message-ID
9319 @cindex fetching by Message-ID
9320 You can also ask the @sc{nntp} server for an arbitrary article, no
9321 matter what group it belongs to.  @kbd{M-^}
9322 (@code{gnus-summary-refer-article}) will ask you for a
9323 @code{Message-ID}, which is one of those long, hard-to-read thingies
9324 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9325 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9326 @end table
9327
9328 The current select method will be used when fetching by
9329 @code{Message-ID} from non-news select method, but you can override this
9330 by giving this command a prefix.
9331
9332 @vindex gnus-refer-article-method
9333 If the group you are reading is located on a back end that does not
9334 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9335 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
9336 would, perhaps, be best if the @sc{nntp} server you consult is the one
9337 updating the spool you are reading from, but that's not really
9338 necessary.
9339
9340 It can also be a list of select methods, as well as the special symbol
9341 @code{current}, which means to use the current select method.  If it
9342 is a list, Gnus will try all the methods in the list until it finds a
9343 match.
9344
9345 Here's an example setting that will first try the current method, and
9346 then ask Google if that fails:
9347
9348 @lisp
9349 (setq gnus-refer-article-method
9350       '(current
9351         (nnweb "google" (nnweb-type google))))
9352 @end lisp
9353
9354 Most of the mail back ends support fetching by @code{Message-ID}, but
9355 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9356 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9357 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9358 only able to locate articles that have been posted to the current group.
9359 (Anything else would be too time consuming.)  @code{nnmh} does not
9360 support this at all.
9361
9362
9363 @node Alternative Approaches
9364 @section Alternative Approaches
9365
9366 Different people like to read news using different methods.  This being
9367 gnus, we offer a small selection of minor modes for the summary buffers.
9368
9369 @menu
9370 * Pick and Read::               First mark articles and then read them.
9371 * Binary Groups::               Auto-decode all articles.
9372 @end menu
9373
9374
9375 @node Pick and Read
9376 @subsection Pick and Read
9377 @cindex pick and read
9378
9379 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9380 a two-phased reading interface.  The user first marks in a summary
9381 buffer the articles she wants to read.  Then she starts reading the
9382 articles with just an article buffer displayed.
9383
9384 @findex gnus-pick-mode
9385 @kindex M-x gnus-pick-mode
9386 Gnus provides a summary buffer minor mode that allows
9387 this---@code{gnus-pick-mode}.  This basically means that a few process
9388 mark commands become one-keystroke commands to allow easy marking, and
9389 it provides one additional command for switching to the summary buffer.
9390
9391 Here are the available keystrokes when using pick mode:
9392
9393 @table @kbd
9394 @item .
9395 @kindex . (Pick)
9396 @findex gnus-pick-article-or-thread
9397 Pick the article or thread on the current line
9398 (@code{gnus-pick-article-or-thread}).  If the variable
9399 @code{gnus-thread-hide-subtree} is true, then this key selects the
9400 entire thread when used at the first article of the thread.  Otherwise,
9401 it selects just the article.  If given a numerical prefix, go to that
9402 thread or article and pick it.  (The line number is normally displayed
9403 at the beginning of the summary pick lines.)
9404
9405 @item SPACE
9406 @kindex SPACE (Pick)
9407 @findex gnus-pick-next-page
9408 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9409 at the end of the buffer, start reading the picked articles.
9410
9411 @item u
9412 @kindex u (Pick)
9413 @findex gnus-pick-unmark-article-or-thread.
9414 Unpick the thread or article
9415 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9416 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9417 thread if used at the first article of the thread.  Otherwise it unpicks
9418 just the article.  You can give this key a numerical prefix to unpick
9419 the thread or article at that line.
9420
9421 @item RET
9422 @kindex RET (Pick)
9423 @findex gnus-pick-start-reading
9424 @vindex gnus-pick-display-summary
9425 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9426 given a prefix, mark all unpicked articles as read first.  If
9427 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9428 will still be visible when you are reading.
9429
9430 @end table
9431
9432 All the normal summary mode commands are still available in the
9433 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9434 which is mapped to the same function
9435 @code{gnus-summary-tick-article-forward}.
9436
9437 If this sounds like a good idea to you, you could say:
9438
9439 @lisp
9440 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9441 @end lisp
9442
9443 @vindex gnus-pick-mode-hook
9444 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9445
9446 @vindex gnus-mark-unpicked-articles-as-read
9447 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9448 all unpicked articles as read.  The default is @code{nil}.
9449
9450 @vindex gnus-summary-pick-line-format
9451 The summary line format in pick mode is slightly different from the
9452 standard format.  At the beginning of each line the line number is
9453 displayed.  The pick mode line format is controlled by the
9454 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9455 Variables}).  It accepts the same format specs that
9456 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9457
9458
9459 @node Binary Groups
9460 @subsection Binary Groups
9461 @cindex binary groups
9462
9463 @findex gnus-binary-mode
9464 @kindex M-x gnus-binary-mode
9465 If you spend much time in binary groups, you may grow tired of hitting
9466 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9467 is a minor mode for summary buffers that makes all ordinary Gnus article
9468 selection functions uudecode series of articles and display the result
9469 instead of just displaying the articles the normal way.
9470
9471 @kindex g (Binary)
9472 @findex gnus-binary-show-article
9473 The only way, in fact, to see the actual articles is the @kbd{g}
9474 command, when you have turned on this mode
9475 (@code{gnus-binary-show-article}).
9476
9477 @vindex gnus-binary-mode-hook
9478 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9479
9480
9481 @node Tree Display
9482 @section Tree Display
9483 @cindex trees
9484
9485 @vindex gnus-use-trees
9486 If you don't like the normal gnus summary display, you might try setting
9487 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9488 additional @dfn{tree buffer}.  You can execute all summary mode commands
9489 in the tree buffer.
9490
9491 There are a few variables to customize the tree display, of course:
9492
9493 @table @code
9494 @item gnus-tree-mode-hook
9495 @vindex gnus-tree-mode-hook
9496 A hook called in all tree mode buffers.
9497
9498 @item gnus-tree-mode-line-format
9499 @vindex gnus-tree-mode-line-format
9500 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9501 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9502 of valid specs, @pxref{Summary Buffer Mode Line}.
9503
9504 @item gnus-selected-tree-face
9505 @vindex gnus-selected-tree-face
9506 Face used for highlighting the selected article in the tree buffer.  The
9507 default is @code{modeline}.
9508
9509 @item gnus-tree-line-format
9510 @vindex gnus-tree-line-format
9511 A format string for the tree nodes.  The name is a bit of a misnomer,
9512 though---it doesn't define a line, but just the node.  The default value
9513 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9514 the name of the poster.  It is vital that all nodes are of the same
9515 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9516
9517 Valid specs are:
9518
9519 @table @samp
9520 @item n
9521 The name of the poster.
9522 @item f
9523 The @code{From} header.
9524 @item N
9525 The number of the article.
9526 @item [
9527 The opening bracket.
9528 @item ]
9529 The closing bracket.
9530 @item s
9531 The subject.
9532 @end table
9533
9534 @xref{Formatting Variables}.
9535
9536 Variables related to the display are:
9537
9538 @table @code
9539 @item gnus-tree-brackets
9540 @vindex gnus-tree-brackets
9541 This is used for differentiating between ``real'' articles and
9542 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9543 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9544 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9545
9546 @item gnus-tree-parent-child-edges
9547 @vindex gnus-tree-parent-child-edges
9548 This is a list that contains the characters used for connecting parent
9549 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9550
9551 @end table
9552
9553 @item gnus-tree-minimize-window
9554 @vindex gnus-tree-minimize-window
9555 If this variable is non-@code{nil}, gnus will try to keep the tree
9556 buffer as small as possible to allow more room for the other gnus
9557 windows.  If this variable is a number, the tree buffer will never be
9558 higher than that number.  The default is @code{t}.  Note that if you
9559 have several windows displayed side-by-side in a frame and the tree
9560 buffer is one of these, minimizing the tree window will also resize all
9561 other windows displayed next to it.
9562
9563 You may also wish to add the following hook to keep the window minimized
9564 at all times:
9565
9566 @lisp
9567 (add-hook 'gnus-configure-windows-hook
9568           'gnus-tree-perhaps-minimize)
9569 @end lisp
9570
9571 @item gnus-generate-tree-function
9572 @vindex gnus-generate-tree-function
9573 @findex gnus-generate-horizontal-tree
9574 @findex gnus-generate-vertical-tree
9575 The function that actually generates the thread tree.  Two predefined
9576 functions are available: @code{gnus-generate-horizontal-tree} and
9577 @code{gnus-generate-vertical-tree} (which is the default).
9578
9579 @end table
9580
9581 Here's an example from a horizontal tree buffer:
9582
9583 @example
9584 @{***@}-(***)-[odd]-[Gun]
9585      |      \[Jan]
9586      |      \[odd]-[Eri]
9587      |      \(***)-[Eri]
9588      |            \[odd]-[Paa]
9589      \[Bjo]
9590      \[Gun]
9591      \[Gun]-[Jor]
9592 @end example
9593
9594 Here's the same thread displayed in a vertical tree buffer:
9595
9596 @example
9597 @{***@}
9598   |--------------------------\-----\-----\
9599 (***)                         [Bjo] [Gun] [Gun]
9600   |--\-----\-----\                          |
9601 [odd] [Jan] [odd] (***)                   [Jor]
9602   |           |     |--\
9603 [Gun]       [Eri] [Eri] [odd]
9604                           |
9605                         [Paa]
9606 @end example
9607
9608 If you're using horizontal trees, it might be nice to display the trees
9609 side-by-side with the summary buffer.  You could add something like the
9610 following to your @file{.gnus.el} file:
9611
9612 @lisp
9613 (setq gnus-use-trees t
9614       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9615       gnus-tree-minimize-window nil)
9616 (gnus-add-configuration
9617  '(article
9618    (vertical 1.0
9619              (horizontal 0.25
9620                          (summary 0.75 point)
9621                          (tree 1.0))
9622              (article 1.0))))
9623 @end lisp
9624
9625 @xref{Window Layout}.
9626
9627
9628 @node Mail Group Commands
9629 @section Mail Group Commands
9630 @cindex mail group commands
9631
9632 Some commands only make sense in mail groups.  If these commands are
9633 invalid in the current group, they will raise a hell and let you know.
9634
9635 All these commands (except the expiry and edit commands) use the
9636 process/prefix convention (@pxref{Process/Prefix}).
9637
9638 @table @kbd
9639
9640 @item B e
9641 @kindex B e (Summary)
9642 @findex gnus-summary-expire-articles
9643 Run all expirable articles in the current group through the expiry
9644 process (@code{gnus-summary-expire-articles}).  That is, delete all
9645 expirable articles in the group that have been around for a while.
9646 (@pxref{Expiring Mail}).
9647
9648 @item B C-M-e
9649 @kindex B C-M-e (Summary)
9650 @findex gnus-summary-expire-articles-now
9651 Delete all the expirable articles in the group
9652 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9653 articles eligible for expiry in the current group will
9654 disappear forever into that big @file{/dev/null} in the sky.
9655
9656 @item B DEL
9657 @kindex B DEL (Summary)
9658 @findex gnus-summary-delete-article
9659 @c @icon{gnus-summary-mail-delete}
9660 Delete the mail article.  This is ``delete'' as in ``delete it from your
9661 disk forever and ever, never to return again.'' Use with caution.
9662 (@code{gnus-summary-delete-article}).
9663
9664 @item B m
9665 @kindex B m (Summary)
9666 @cindex move mail
9667 @findex gnus-summary-move-article
9668 @vindex gnus-preserve-marks
9669 Move the article from one mail group to another
9670 (@code{gnus-summary-move-article}).  Marks will be preserved if
9671 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9672
9673 @item B c
9674 @kindex B c (Summary)
9675 @cindex copy mail
9676 @findex gnus-summary-copy-article
9677 @c @icon{gnus-summary-mail-copy}
9678 Copy the article from one group (mail group or not) to a mail group
9679 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9680 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9681
9682 @item B B
9683 @kindex B B (Summary)
9684 @cindex crosspost mail
9685 @findex gnus-summary-crosspost-article
9686 Crosspost the current article to some other group
9687 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9688 the article in the other group, and the Xref headers of the article will
9689 be properly updated.
9690
9691 @item B i
9692 @kindex B i (Summary)
9693 @findex gnus-summary-import-article
9694 Import an arbitrary file into the current mail newsgroup
9695 (@code{gnus-summary-import-article}).  You will be prompted for a file
9696 name, a @code{From} header and a @code{Subject} header.
9697
9698 @item B I
9699 @kindex B I (Summary)
9700 @findex gnus-summary-create-article
9701 Create an empty article in the current mail newsgroups
9702 (@code{gnus-summary-create-article}).  You will be prompted for a
9703 @code{From} header and a @code{Subject} header.
9704
9705 @item B r
9706 @kindex B r (Summary)
9707 @findex gnus-summary-respool-article
9708 Respool the mail article (@code{gnus-summary-respool-article}).
9709 @code{gnus-summary-respool-default-method} will be used as the default
9710 select method when respooling.  This variable is @code{nil} by default,
9711 which means that the current group select method will be used instead.
9712 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9713 (which is the default).
9714
9715 @item B w
9716 @itemx e
9717 @kindex B w (Summary)
9718 @kindex e (Summary)
9719 @findex gnus-summary-edit-article
9720 @kindex C-c C-c (Article)
9721 @findex gnus-summary-edit-article-done
9722 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9723 editing and make the changes permanent, type @kbd{C-c C-c}
9724 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9725 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9726
9727 @item B q
9728 @kindex B q (Summary)
9729 @findex gnus-summary-respool-query
9730 If you want to re-spool an article, you might be curious as to what group
9731 the article will end up in before you do the re-spooling.  This command
9732 will tell you (@code{gnus-summary-respool-query}).
9733
9734 @item B t
9735 @kindex B t (Summary)
9736 @findex gnus-summary-respool-trace
9737 Similarly, this command will display all fancy splitting patterns used
9738 when respooling, if any (@code{gnus-summary-respool-trace}).
9739
9740 @item B p
9741 @kindex B p (Summary)
9742 @findex gnus-summary-article-posted-p
9743 Some people have a tendency to send you "courtesy" copies when they
9744 follow up to articles you have posted.  These usually have a
9745 @code{Newsgroups} header in them, but not always.  This command
9746 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9747 article from your news server (or rather, from
9748 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9749 report back whether it found the article or not.  Even if it says that
9750 it didn't find the article, it may have been posted anyway---mail
9751 propagation is much faster than news propagation, and the news copy may
9752 just not have arrived yet.
9753
9754 @item K E
9755 @kindex K E (Summary)
9756 @findex gnus-article-encrypt-body
9757 @vindex gnus-article-encrypt-protocol
9758 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9759 The body is encrypted with the encryption protocol specified by the
9760 variable @code{gnus-article-encrypt-protocol}.
9761
9762 @end table
9763
9764 @vindex gnus-move-split-methods
9765 @cindex moving articles
9766 If you move (or copy) articles regularly, you might wish to have gnus
9767 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9768 variable that uses the same syntax as @code{gnus-split-methods}
9769 (@pxref{Saving Articles}).  You may customize that variable to create
9770 suggestions you find reasonable.  (Note that
9771 @code{gnus-move-split-methods} uses group names where
9772 @code{gnus-split-methods} uses file names.)
9773
9774 @lisp
9775 (setq gnus-move-split-methods
9776       '(("^From:.*Lars Magne" "nnml:junk")
9777         ("^Subject:.*gnus" "nnfolder:important")
9778         (".*" "nnml:misc")))
9779 @end lisp
9780
9781
9782 @node Various Summary Stuff
9783 @section Various Summary Stuff
9784
9785 @menu
9786 * Summary Group Information::   Information oriented commands.
9787 * Searching for Articles::      Multiple article commands.
9788 * Summary Generation Commands::  
9789 * Really Various Summary Commands::  Those pesky non-conformant commands.
9790 @end menu
9791
9792 @table @code
9793 @vindex gnus-summary-display-while-building
9794 @item gnus-summary-display-while-building
9795 If non-@code{nil}, show and update the summary buffer as it's being
9796 built.  If @code{t}, update the buffer after every line is inserted.
9797 If the value is an integer, @var{n}, update the display every @var{n}
9798 lines.  The default is @code{nil}.
9799
9800 @vindex gnus-summary-mode-hook
9801 @item gnus-summary-mode-hook
9802 This hook is called when creating a summary mode buffer.
9803
9804 @vindex gnus-summary-generate-hook
9805 @item gnus-summary-generate-hook
9806 This is called as the last thing before doing the threading and the
9807 generation of the summary buffer.  It's quite convenient for customizing
9808 the threading variables based on what data the newsgroup has.  This hook
9809 is called from the summary buffer after most summary buffer variables
9810 have been set.
9811
9812 @vindex gnus-summary-prepare-hook
9813 @item gnus-summary-prepare-hook
9814 It is called after the summary buffer has been generated.  You might use
9815 it to, for instance, highlight lines or modify the look of the buffer in
9816 some other ungodly manner.  I don't care.
9817
9818 @vindex gnus-summary-prepared-hook
9819 @item gnus-summary-prepared-hook
9820 A hook called as the very last thing after the summary buffer has been
9821 generated.
9822
9823 @vindex gnus-summary-ignore-duplicates
9824 @item gnus-summary-ignore-duplicates
9825 When gnus discovers two articles that have the same @code{Message-ID},
9826 it has to do something drastic.  No articles are allowed to have the
9827 same @code{Message-ID}, but this may happen when reading mail from some
9828 sources.  Gnus allows you to customize what happens with this variable.
9829 If it is @code{nil} (which is the default), gnus will rename the
9830 @code{Message-ID} (for display purposes only) and display the article as
9831 any other article.  If this variable is @code{t}, it won't display the
9832 article---it'll be as if it never existed.
9833
9834 @vindex gnus-alter-articles-to-read-function
9835 @item gnus-alter-articles-to-read-function
9836 This function, which takes two parameters (the group name and the list
9837 of articles to be selected), is called to allow the user to alter the
9838 list of articles to be selected.
9839
9840 For instance, the following function adds the list of cached articles to
9841 the list in one particular group:
9842
9843 @lisp
9844 (defun my-add-cached-articles (group articles)
9845   (if (string= group "some.group")
9846       (append gnus-newsgroup-cached articles)
9847     articles))
9848 @end lisp
9849
9850 @vindex gnus-newsgroup-variables
9851 @item gnus-newsgroup-variables
9852 A list of newsgroup (summary buffer) local variables, or cons of
9853 variables and their default values (when the default values are not
9854 nil), that should be made global while the summary buffer is active.
9855 These variables can be used to set variables in the group parameters
9856 while still allowing them to affect operations done in other
9857 buffers. For example:
9858
9859 @lisp
9860 (setq gnus-newsgroup-variables
9861      '(message-use-followup-to
9862        (gnus-visible-headers .
9863          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
9864 @end lisp
9865
9866 @end table
9867
9868
9869 @node Summary Group Information
9870 @subsection Summary Group Information
9871
9872 @table @kbd
9873
9874 @item H f
9875 @kindex H f (Summary)
9876 @findex gnus-summary-fetch-faq
9877 @vindex gnus-group-faq-directory
9878 Try to fetch the FAQ (list of frequently asked questions) for the
9879 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9880 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9881 on a remote machine.  This variable can also be a list of directories.
9882 In that case, giving a prefix to this command will allow you to choose
9883 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9884 be used for fetching the file.
9885
9886 @item H d
9887 @kindex H d (Summary)
9888 @findex gnus-summary-describe-group
9889 Give a brief description of the current group
9890 (@code{gnus-summary-describe-group}).  If given a prefix, force
9891 rereading the description from the server.
9892
9893 @item H h
9894 @kindex H h (Summary)
9895 @findex gnus-summary-describe-briefly
9896 Give an extremely brief description of the most important summary
9897 keystrokes (@code{gnus-summary-describe-briefly}).
9898
9899 @item H i
9900 @kindex H i (Summary)
9901 @findex gnus-info-find-node
9902 Go to the gnus info node (@code{gnus-info-find-node}).
9903 @end table
9904
9905
9906 @node Searching for Articles
9907 @subsection Searching for Articles
9908
9909 @table @kbd
9910
9911 @item M-s
9912 @kindex M-s (Summary)
9913 @findex gnus-summary-search-article-forward
9914 Search through all subsequent (raw) articles for a regexp
9915 (@code{gnus-summary-search-article-forward}).
9916
9917 @item M-r
9918 @kindex M-r (Summary)
9919 @findex gnus-summary-search-article-backward
9920 Search through all previous (raw) articles for a regexp
9921 (@code{gnus-summary-search-article-backward}).
9922
9923 @item &
9924 @kindex & (Summary)
9925 @findex gnus-summary-execute-command
9926 This command will prompt you for a header, a regular expression to match
9927 on this field, and a command to be executed if the match is made
9928 (@code{gnus-summary-execute-command}).  If the header is an empty
9929 string, the match is done on the entire article.  If given a prefix,
9930 search backward instead.
9931
9932 For instance, @kbd{& RET some.*string #} will put the process mark on
9933 all articles that have heads or bodies that match @samp{some.*string}.
9934
9935 @item M-&
9936 @kindex M-& (Summary)
9937 @findex gnus-summary-universal-argument
9938 Perform any operation on all articles that have been marked with
9939 the process mark (@code{gnus-summary-universal-argument}).
9940 @end table
9941
9942 @node Summary Generation Commands
9943 @subsection Summary Generation Commands
9944
9945 @table @kbd
9946
9947 @item Y g
9948 @kindex Y g (Summary)
9949 @findex gnus-summary-prepare
9950 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9951
9952 @item Y c
9953 @kindex Y c (Summary)
9954 @findex gnus-summary-insert-cached-articles
9955 Pull all cached articles (for the current group) into the summary buffer
9956 (@code{gnus-summary-insert-cached-articles}).
9957
9958 @item Y d
9959 @kindex Y d (Summary)
9960 @findex gnus-summary-insert-dormant-articles
9961 Pull all dormant articles (for the current group) into the summary buffer
9962 (@code{gnus-summary-insert-dormant-articles}).
9963
9964 @end table
9965
9966
9967 @node Really Various Summary Commands
9968 @subsection Really Various Summary Commands
9969
9970 @table @kbd
9971
9972 @item A D
9973 @itemx C-d
9974 @kindex C-d (Summary)
9975 @kindex A D (Summary)
9976 @findex gnus-summary-enter-digest-group
9977 If the current article is a collection of other articles (for instance,
9978 a digest), you might use this command to enter a group based on the that
9979 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9980 guess what article type is currently displayed unless you give a prefix
9981 to this command, which forces a ``digest'' interpretation.  Basically,
9982 whenever you see a message that is a collection of other messages of
9983 some format, you @kbd{C-d} and read these messages in a more convenient
9984 fashion.
9985
9986 @item C-M-d
9987 @kindex C-M-d (Summary)
9988 @findex gnus-summary-read-document
9989 This command is very similar to the one above, but lets you gather
9990 several documents into one biiig group
9991 (@code{gnus-summary-read-document}).  It does this by opening several
9992 @code{nndoc} groups for each document, and then opening an
9993 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
9994 command understands the process/prefix convention
9995 (@pxref{Process/Prefix}).
9996
9997 @item C-t
9998 @kindex C-t (Summary)
9999 @findex gnus-summary-toggle-truncation
10000 Toggle truncation of summary lines
10001 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10002 line centering function in the summary buffer, so it's not a good idea
10003 to have truncation switched off while reading articles.
10004
10005 @item =
10006 @kindex = (Summary)
10007 @findex gnus-summary-expand-window
10008 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10009 If given a prefix, force an @code{article} window configuration.
10010
10011 @item C-M-e
10012 @kindex C-M-e (Summary)
10013 @findex gnus-summary-edit-parameters
10014 Edit the group parameters (@pxref{Group Parameters}) of the current
10015 group (@code{gnus-summary-edit-parameters}).
10016
10017 @item C-M-a
10018 @kindex C-M-a (Summary)
10019 @findex gnus-summary-customize-parameters
10020 Customize the group parameters (@pxref{Group Parameters}) of the current
10021 group (@code{gnus-summary-customize-parameters}).
10022
10023 @end table
10024
10025
10026 @node Exiting the Summary Buffer
10027 @section Exiting the Summary Buffer
10028 @cindex summary exit
10029 @cindex exiting groups
10030
10031 Exiting from the summary buffer will normally update all info on the
10032 group and return you to the group buffer.
10033
10034 @table @kbd
10035
10036 @item Z Z
10037 @itemx q
10038 @kindex Z Z (Summary)
10039 @kindex q (Summary)
10040 @findex gnus-summary-exit
10041 @vindex gnus-summary-exit-hook
10042 @vindex gnus-summary-prepare-exit-hook
10043 @c @icon{gnus-summary-exit}
10044 Exit the current group and update all information on the group
10045 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10046 called before doing much of the exiting, which calls
10047 @code{gnus-summary-expire-articles} by default.
10048 @code{gnus-summary-exit-hook} is called after finishing the exit
10049 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10050 group mode having no more (unread) groups.
10051
10052 @item Z E
10053 @itemx Q
10054 @kindex Z E (Summary)
10055 @kindex Q (Summary)
10056 @findex gnus-summary-exit-no-update
10057 Exit the current group without updating any information on the group
10058 (@code{gnus-summary-exit-no-update}).
10059
10060 @item Z c
10061 @itemx c
10062 @kindex Z c (Summary)
10063 @kindex c (Summary)
10064 @findex gnus-summary-catchup-and-exit
10065 @c @icon{gnus-summary-catchup-and-exit}
10066 Mark all unticked articles in the group as read and then exit
10067 (@code{gnus-summary-catchup-and-exit}).
10068
10069 @item Z C
10070 @kindex Z C (Summary)
10071 @findex gnus-summary-catchup-all-and-exit
10072 Mark all articles, even the ticked ones, as read and then exit
10073 (@code{gnus-summary-catchup-all-and-exit}).
10074
10075 @item Z n
10076 @kindex Z n (Summary)
10077 @findex gnus-summary-catchup-and-goto-next-group
10078 Mark all articles as read and go to the next group
10079 (@code{gnus-summary-catchup-and-goto-next-group}).
10080
10081 @item Z R
10082 @kindex Z R (Summary)
10083 @findex gnus-summary-reselect-current-group
10084 Exit this group, and then enter it again
10085 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10086 all articles, both read and unread.
10087
10088 @item Z G
10089 @itemx M-g
10090 @kindex Z G (Summary)
10091 @kindex M-g (Summary)
10092 @findex gnus-summary-rescan-group
10093 @c @icon{gnus-summary-mail-get}
10094 Exit the group, check for new articles in the group, and select the
10095 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10096 articles, both read and unread.
10097
10098 @item Z N
10099 @kindex Z N (Summary)
10100 @findex gnus-summary-next-group
10101 Exit the group and go to the next group
10102 (@code{gnus-summary-next-group}).
10103
10104 @item Z P
10105 @kindex Z P (Summary)
10106 @findex gnus-summary-prev-group
10107 Exit the group and go to the previous group
10108 (@code{gnus-summary-prev-group}).
10109
10110 @item Z s
10111 @kindex Z s (Summary)
10112 @findex gnus-summary-save-newsrc
10113 Save the current number of read/marked articles in the dribble buffer
10114 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10115 given a prefix, also save the @file{.newsrc} file(s).  Using this
10116 command will make exit without updating (the @kbd{Q} command) worthless.
10117 @end table
10118
10119 @vindex gnus-exit-group-hook
10120 @code{gnus-exit-group-hook} is called when you exit the current group
10121 with an ``updating'' exit.  For instance @kbd{Q}
10122 (@code{gnus-summary-exit-no-update}) does not call this hook.
10123
10124 @findex gnus-summary-wake-up-the-dead
10125 @findex gnus-dead-summary-mode
10126 @vindex gnus-kill-summary-on-exit
10127 If you're in the habit of exiting groups, and then changing your mind
10128 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10129 If you do that, gnus won't kill the summary buffer when you exit it.
10130 (Quelle surprise!)  Instead it will change the name of the buffer to
10131 something like @samp{*Dead Summary ... *} and install a minor mode
10132 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10133 buffer, you'll find that all keys are mapped to a function called
10134 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10135 summary buffer will result in a live, normal summary buffer.
10136
10137 There will never be more than one dead summary buffer at any one time.
10138
10139 @vindex gnus-use-cross-reference
10140 The data on the current group will be updated (which articles you have
10141 read, which articles you have replied to, etc.) when you exit the
10142 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10143 @code{t} (which is the default), articles that are cross-referenced to
10144 this group and are marked as read, will also be marked as read in the
10145 other subscribed groups they were cross-posted to.  If this variable is
10146 neither @code{nil} nor @code{t}, the article will be marked as read in
10147 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10148
10149
10150 @node Crosspost Handling
10151 @section Crosspost Handling
10152
10153 @cindex velveeta
10154 @cindex spamming
10155 Marking cross-posted articles as read ensures that you'll never have to
10156 read the same article more than once.  Unless, of course, somebody has
10157 posted it to several groups separately.  Posting the same article to
10158 several groups (not cross-posting) is called @dfn{spamming}, and you are
10159 by law required to send nasty-grams to anyone who perpetrates such a
10160 heinous crime.  You may want to try NoCeM handling to filter out spam
10161 (@pxref{NoCeM}).
10162
10163 Remember: Cross-posting is kinda ok, but posting the same article
10164 separately to several groups is not.  Massive cross-posting (aka.
10165 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10166 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10167 excessive crossposting (@pxref{Summary Mail Commands}).
10168
10169 @cindex cross-posting
10170 @cindex Xref
10171 @cindex @sc{nov}
10172 One thing that may cause Gnus to not do the cross-posting thing
10173 correctly is if you use an @sc{nntp} server that supports @sc{xover}
10174 (which is very nice, because it speeds things up considerably) which
10175 does not include the @code{Xref} header in its @sc{nov} lines.  This is
10176 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10177 even with @sc{xover} by registering the @code{Xref} lines of all
10178 articles you actually read, but if you kill the articles, or just mark
10179 them as read without reading them, Gnus will not get a chance to snoop
10180 the @code{Xref} lines out of these articles, and will be unable to use
10181 the cross reference mechanism.
10182
10183 @cindex LIST overview.fmt
10184 @cindex overview.fmt
10185 To check whether your @sc{nntp} server includes the @code{Xref} header
10186 in its overview files, try @samp{telnet your.nntp.server nntp},
10187 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10188 overview.fmt}.  This may not work, but if it does, and the last line you
10189 get does not read @samp{Xref:full}, then you should shout and whine at
10190 your news admin until she includes the @code{Xref} header in the
10191 overview files.
10192
10193 @vindex gnus-nov-is-evil
10194 If you want Gnus to get the @code{Xref}s right all the time, you have to
10195 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10196 considerably.
10197
10198 C'est la vie.
10199
10200 For an alternative approach, @pxref{Duplicate Suppression}.
10201
10202
10203 @node Duplicate Suppression
10204 @section Duplicate Suppression
10205
10206 By default, gnus tries to make sure that you don't have to read the same
10207 article more than once by utilizing the crossposting mechanism
10208 (@pxref{Crosspost Handling}).  However, that simple and efficient
10209 approach may not work satisfactory for some users for various
10210 reasons.
10211
10212 @enumerate
10213 @item
10214 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
10215 is evil and not very common.
10216
10217 @item
10218 The @sc{nntp} server may fail to include the @code{Xref} header in the
10219 @file{.overview} data bases.  This is evil and all too common, alas.
10220
10221 @item
10222 You may be reading the same group (or several related groups) from
10223 different @sc{nntp} servers.
10224
10225 @item
10226 You may be getting mail that duplicates articles posted to groups.
10227 @end enumerate
10228
10229 I'm sure there are other situations where @code{Xref} handling fails as
10230 well, but these four are the most common situations.
10231
10232 If, and only if, @code{Xref} handling fails for you, then you may
10233 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10234 will remember the @code{Message-ID}s of all articles you have read or
10235 otherwise marked as read, and then, as if by magic, mark them as read
10236 all subsequent times you see them---in @emph{all} groups.  Using this
10237 mechanism is quite likely to be somewhat inefficient, but not overly
10238 so.  It's certainly preferable to reading the same articles more than
10239 once.
10240
10241 Duplicate suppression is not a very subtle instrument.  It's more like a
10242 sledge hammer than anything else.  It works in a very simple
10243 fashion---if you have marked an article as read, it adds this Message-ID
10244 to a cache.  The next time it sees this Message-ID, it will mark the
10245 article as read with the @samp{M} mark.  It doesn't care what group it
10246 saw the article in.
10247
10248 @table @code
10249 @item gnus-suppress-duplicates
10250 @vindex gnus-suppress-duplicates
10251 If non-@code{nil}, suppress duplicates.
10252
10253 @item gnus-save-duplicate-list
10254 @vindex gnus-save-duplicate-list
10255 If non-@code{nil}, save the list of duplicates to a file.  This will
10256 make startup and shutdown take longer, so the default is @code{nil}.
10257 However, this means that only duplicate articles read in a single gnus
10258 session are suppressed.
10259
10260 @item gnus-duplicate-list-length
10261 @vindex gnus-duplicate-list-length
10262 This variable says how many @code{Message-ID}s to keep in the duplicate
10263 suppression list.  The default is 10000.
10264
10265 @item gnus-duplicate-file
10266 @vindex gnus-duplicate-file
10267 The name of the file to store the duplicate suppression list in.  The
10268 default is @file{~/News/suppression}.
10269 @end table
10270
10271 If you have a tendency to stop and start gnus often, setting
10272 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10273 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10274 the other hand, saving the list makes startup and shutdown much slower,
10275 so that means that if you stop and start gnus often, you should set
10276 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10277 to you to figure out, I think.
10278
10279 @node Security
10280 @section Security
10281
10282 Gnus is able to verify signed messages or decrypt encrypted messages.
10283 The formats that are supported are PGP, @sc{pgp/mime} and @sc{s/mime},
10284 however you need some external programs to get things to work:
10285
10286 @enumerate
10287 @item
10288 To handle PGP and PGP/MIME messages, you have to install an OpenPGP
10289 implementation such as GnuPG.  The lisp interface to GnuPG included
10290 with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG Manual}), but
10291 Mailcrypt and gpg.el are also supported.
10292
10293 @item
10294 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
10295 or newer is recommended.
10296
10297 @end enumerate
10298
10299 More information on how to set things up can be found in the message
10300 manual (@pxref{Security, ,Security, message, Message Manual}).
10301
10302 @table @code
10303 @item mm-verify-option
10304 @vindex mm-verify-option
10305 Option of verifying signed parts.  @code{never}, not verify;
10306 @code{always}, always verify; @code{known}, only verify known
10307 protocols. Otherwise, ask user.
10308
10309 @item mm-decrypt-option
10310 @vindex mm-decrypt-option
10311 Option of decrypting encrypted parts.  @code{never}, no decryption;
10312 @code{always}, always decrypt; @code{known}, only decrypt known
10313 protocols. Otherwise, ask user.
10314
10315 @item mml1991-use
10316 @vindex mml1991-use
10317 Symbol indicating elisp interface to OpenPGP implementation for PGP
10318 messages.  The default is @code{pgg}, but @code{mailcrypt} and
10319 @code{gpg} are also supported although deprecated.
10320
10321 @item mml2015-use
10322 @vindex mml2015-use
10323 Symbol indicating elisp interface to OpenPGP implementation for
10324 PGP/MIME messages.  The default is @code{pgg}, but @code{mailcrypt}
10325 and @code{gpg} are also supported although deprecated.
10326
10327 @end table
10328
10329 @node Mailing List
10330 @section Mailing List
10331
10332 @kindex A M (summary)
10333 @findex gnus-mailing-list-insinuate
10334 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10335 either add a `to-list' group parameter (@pxref{Group Parameters}),
10336 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10337 summary buffer, or say:
10338
10339 @lisp
10340 (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
10341 @end lisp
10342
10343 That enables the following commands to the summary buffer:
10344
10345 @table @kbd
10346
10347 @item C-c C-n h
10348 @kindex C-c C-n h (Summary)
10349 @findex gnus-mailing-list-help
10350 Send a message to fetch mailing list help, if List-Help field exists.
10351
10352 @item C-c C-n s
10353 @kindex C-c C-n s (Summary)
10354 @findex gnus-mailing-list-subscribe
10355 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10356
10357 @item C-c C-n u
10358 @kindex C-c C-n u (Summary)
10359 @findex gnus-mailing-list-unsubscribe
10360 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10361 field exists.
10362
10363 @item C-c C-n p
10364 @kindex C-c C-n p (Summary)
10365 @findex gnus-mailing-list-post
10366 Post to the mailing list, if List-Post field exists.
10367
10368 @item C-c C-n o
10369 @kindex C-c C-n o (Summary)
10370 @findex gnus-mailing-list-owner
10371 Send a message to the mailing list owner, if List-Owner field exists.
10372
10373 @item C-c C-n a
10374 @kindex C-c C-n a (Summary)
10375 @findex gnus-mailing-list-owner
10376 Browse the mailing list archive, if List-Archive field exists.
10377
10378 @end table
10379
10380 @node Article Buffer
10381 @chapter Article Buffer
10382 @cindex article buffer
10383
10384 The articles are displayed in the article buffer, of which there is only
10385 one.  All the summary buffers share the same article buffer unless you
10386 tell gnus otherwise.
10387
10388 @menu
10389 * Hiding Headers::              Deciding what headers should be displayed.
10390 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
10391 * Customizing Articles::        Tailoring the look of the articles.
10392 * Article Keymap::              Keystrokes available in the article buffer.
10393 * Misc Article::                Other stuff.
10394 @end menu
10395
10396
10397 @node Hiding Headers
10398 @section Hiding Headers
10399 @cindex hiding headers
10400 @cindex deleting headers
10401
10402 The top section of each article is the @dfn{head}.  (The rest is the
10403 @dfn{body}, but you may have guessed that already.)
10404
10405 @vindex gnus-show-all-headers
10406 There is a lot of useful information in the head: the name of the person
10407 who wrote the article, the date it was written and the subject of the
10408 article.  That's well and nice, but there's also lots of information
10409 most people do not want to see---what systems the article has passed
10410 through before reaching you, the @code{Message-ID}, the
10411 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10412 of some of those lines.  If you want to keep all those lines in the
10413 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10414
10415 Gnus provides you with two variables for sifting headers:
10416
10417 @table @code
10418
10419 @item gnus-visible-headers
10420 @vindex gnus-visible-headers
10421 If this variable is non-@code{nil}, it should be a regular expression
10422 that says what headers you wish to keep in the article buffer.  All
10423 headers that do not match this variable will be hidden.
10424
10425 For instance, if you only want to see the name of the person who wrote
10426 the article and the subject, you'd say:
10427
10428 @lisp
10429 (setq gnus-visible-headers "^From:\\|^Subject:")
10430 @end lisp
10431
10432 This variable can also be a list of regexps to match headers to
10433 remain visible.
10434
10435 @item gnus-ignored-headers
10436 @vindex gnus-ignored-headers
10437 This variable is the reverse of @code{gnus-visible-headers}.  If this
10438 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10439 should be a regular expression that matches all lines that you want to
10440 hide.  All lines that do not match this variable will remain visible.
10441
10442 For instance, if you just want to get rid of the @code{References} field
10443 and the @code{Xref} field, you might say:
10444
10445 @lisp
10446 (setq gnus-ignored-headers "^References:\\|^Xref:")
10447 @end lisp
10448
10449 This variable can also be a list of regexps to match headers to
10450 be removed.
10451
10452 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10453 variable will have no effect.
10454
10455 @end table
10456
10457 @vindex gnus-sorted-header-list
10458 Gnus can also sort the headers for you.  (It does this by default.)  You
10459 can control the sorting by setting the @code{gnus-sorted-header-list}
10460 variable.  It is a list of regular expressions that says in what order
10461 the headers are to be displayed.
10462
10463 For instance, if you want the name of the author of the article first,
10464 and then the subject, you might say something like:
10465
10466 @lisp
10467 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10468 @end lisp
10469
10470 Any headers that are to remain visible, but are not listed in this
10471 variable, will be displayed in random order after all the headers listed in this variable.
10472
10473 @findex gnus-article-hide-boring-headers
10474 @vindex gnus-boring-article-headers
10475 You can hide further boring headers by setting
10476 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10477 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10478 list, but this list doesn't actually contain header names.  Instead is
10479 lists various @dfn{boring conditions} that Gnus can check and remove
10480 from sight.
10481
10482 These conditions are:
10483 @table @code
10484 @item empty
10485 Remove all empty headers.
10486 @item followup-to
10487 Remove the @code{Followup-To} header if it is identical to the
10488 @code{Newsgroups} header.
10489 @item reply-to
10490 Remove the @code{Reply-To} header if it lists the same address as the
10491 @code{From} header.
10492 @item newsgroups
10493 Remove the @code{Newsgroups} header if it only contains the current group
10494 name.
10495 @item to-address
10496 Remove the @code{To} header if it only contains the address identical to
10497 the current groups's @code{to-address} parameter.
10498 @item date
10499 Remove the @code{Date} header if the article is less than three days
10500 old.
10501 @item long-to
10502 Remove the @code{To} header if it is very long.
10503 @item many-to
10504 Remove all @code{To} headers if there are more than one.
10505 @end table
10506
10507 To include these three elements, you could say something like:
10508
10509 @lisp
10510 (setq gnus-boring-article-headers
10511       '(empty followup-to reply-to))
10512 @end lisp
10513
10514 This is also the default value for this variable.
10515
10516
10517 @node Using MIME
10518 @section Using MIME
10519 @cindex @sc{mime}
10520
10521 Mime is a standard for waving your hands through the air, aimlessly,
10522 while people stand around yawning.
10523
10524 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
10525 while all newsreaders die of fear.
10526
10527 @sc{mime} may specify what character set the article uses, the encoding
10528 of the characters, and it also makes it possible to embed pictures and
10529 other naughty stuff in innocent-looking articles.
10530
10531 @vindex gnus-show-mime
10532 @vindex gnus-article-display-method-for-mime
10533 @findex gnus-article-display-mime-message
10534 Gnus handles @sc{mime} by pushing the articles through
10535 @code{gnus-article-display-method-for-mime}, which is
10536 @code{gnus-article-display-mime-message} by default.  This function
10537 calls the @sc{semi} MIME-View program to actually do the work.  For more
10538 information on @sc{semi} MIME-View, see its manual page (however it is
10539 not existed yet, sorry).
10540
10541 Set @code{gnus-show-mime} to @code{t} if you want to use
10542 @sc{mime} all the time.  If you have @code{gnus-show-mime} set, then
10543 you'll see some unfortunate display glitches in the article buffer.
10544 These can't be avoided.
10545
10546 In GNUS or Gnus, it might be best to just use the toggling functions
10547 from the summary buffer to avoid getting nasty surprises. (For instance,
10548 you enter the group @samp{alt.sing-a-long} and, before you know it,
10549 @sc{mime} has decoded the sound file in the article and some horrible
10550 sing-a-long song comes screaming out your speakers, and you can't find
10551 the volume button, because there isn't one, and people are starting to
10552 look at you, and you try to stop the program, but you can't, and you
10553 can't find the program to control the volume, and everybody else in the
10554 room suddenly decides to look at you disdainfully, and you'll feel
10555 rather stupid.)
10556
10557 Any similarity to real events and people is purely coincidental.  Ahem.
10558
10559 To avoid such kind of situation, gnus stops to use
10560 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10561 non-@code{nil} every-time, then you can push button in the article
10562 buffer when there are nobody else.
10563
10564 Also see @pxref{MIME Commands}.
10565
10566
10567 @node Customizing Articles
10568 @section Customizing Articles
10569 @cindex article customization
10570
10571 A slew of functions for customizing how the articles are to look like
10572 exist.  You can call these functions interactively, or you can have them
10573 called automatically when you select the articles.
10574
10575 To have them called automatically, you should set the corresponding
10576 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10577 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10578 be set, but first we discuss the values these variables can have.
10579
10580 Note: Some values, while valid, make little sense.  Check the list below
10581 for sensible values.
10582
10583 @enumerate
10584 @item
10585 @code{nil}: Don't do this treatment.
10586
10587 @item
10588 @code{t}: Do this treatment on all body parts.
10589
10590 @item
10591 @code{head}: Do the treatment on the headers.
10592
10593 @item
10594 @code{last}: Do this treatment on the last part.
10595
10596 @item
10597 An integer: Do this treatment on all body parts that have a length less
10598 than this number.
10599
10600 @item
10601 A list of strings: Do this treatment on all body parts that are in
10602 articles that are read in groups that have names that match one of the
10603 regexps in the list.
10604
10605 @item
10606 A list where the first element is not a string:
10607
10608 The list is evaluated recursively.  The first element of the list is a
10609 predicate.  The following predicates are recognized: @code{or},
10610 @code{and}, @code{not} and @code{typep}.  Here's an example:
10611
10612 @lisp
10613 (or last
10614     (typep "text/x-vcard"))
10615 @end lisp
10616
10617 @item
10618 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10619 non-nil.
10620
10621 @end enumerate
10622
10623 You may have noticed that the word @dfn{part} is used here.  This refers
10624 to the fact that some messages are @sc{mime} multipart articles that may
10625 be divided into several parts.  Articles that are not multiparts are
10626 considered to contain just a single part.
10627
10628 @vindex gnus-article-treat-types
10629 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10630 want to, but by default, only @samp{text/plain} parts are given the
10631 treatment.  This is controlled by the @code{gnus-article-treat-types}
10632 variable, which is a list of regular expressions that are matched to the
10633 type of the part.  This variable is ignored if the value of the
10634 controlling variable is a predicate list, as described above.
10635
10636 The following treatment options are available.  The easiest way to
10637 customize this is to examine the @code{gnus-article-treat} customization
10638 group.  Values in parenthesis are suggested sensible values.  Others are
10639 possible but those listed are probably sufficient for most people.
10640
10641 @table @code
10642 @item gnus-treat-buttonize (t, integer)
10643 @item gnus-treat-buttonize-head (head)
10644
10645 @xref{Article Buttons}.
10646
10647 @item gnus-treat-capitalize-sentences (t, integer)
10648 @item gnus-treat-overstrike (t, integer)
10649 @item gnus-treat-strip-cr (t, integer)
10650 @item gnus-treat-strip-headers-in-body (t, integer)
10651 @item gnus-treat-strip-leading-blank-lines (t, integer)
10652 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10653 @item gnus-treat-strip-pem (t, last, integer)
10654 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10655 @item gnus-treat-unsplit-urls (t, integer)
10656 @item gnus-treat-wash-html (t, integer)
10657 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10658
10659 @xref{Article Washing}.
10660
10661 @item gnus-treat-date-english (head)
10662 @item gnus-treat-date-iso8601 (head)
10663 @item gnus-treat-date-lapsed (head)
10664 @item gnus-treat-date-local (head)
10665 @item gnus-treat-date-original (head)
10666 @item gnus-treat-date-user-defined (head)
10667 @item gnus-treat-date-ut (head)
10668
10669 @xref{Article Date}.
10670
10671 @item gnus-treat-from-picon (head)
10672 @item gnus-treat-mail-picon (head)
10673 @item gnus-treat-newsgroups-picon (head)
10674
10675 @xref{Picons}.
10676
10677 @item gnus-treat-display-smileys (t, integer)
10678
10679 @item gnus-treat-body-boundary (head)
10680
10681 @vindex gnus-body-boundary-delimiter
10682 Adds a delimiter between header and body, the string used as delimiter
10683 is controlled by @code{gnus-body-boundary-delimiter}.
10684
10685 @xref{Smileys}.
10686
10687 @item gnus-treat-display-xface (head)
10688
10689 @xref{X-Face}.
10690
10691 @item gnus-treat-emphasize (t, head, integer)
10692 @item gnus-treat-fill-article (t, integer)
10693 @item gnus-treat-fill-long-lines (t, integer)
10694 @item gnus-treat-hide-boring-headers (head)
10695 @item gnus-treat-hide-citation (t, integer)
10696 @item gnus-treat-hide-citation-maybe (t, integer)
10697 @item gnus-treat-hide-headers (head)
10698 @item gnus-treat-hide-signature (t, last)
10699
10700 @xref{Article Hiding}.
10701
10702 @item gnus-treat-highlight-citation (t, integer)
10703 @item gnus-treat-highlight-headers (head)
10704 @item gnus-treat-highlight-signature (t, last, integer)
10705
10706 @xref{Article Highlighting}.
10707
10708 @item gnus-treat-play-sounds
10709 @item gnus-treat-translate
10710 @item gnus-treat-x-pgp-sig (head)
10711
10712 @item gnus-treat-unfold-headers (head)
10713 @item gnus-treat-fold-headers (head)
10714 @item gnus-treat-fold-newsgroups (head)
10715 @item gnus-treat-leading-whitespace (head)
10716
10717 @xref{Article Header}.
10718
10719
10720 @end table
10721
10722 @vindex gnus-part-display-hook
10723 You can, of course, write your own functions to be called from
10724 @code{gnus-part-display-hook}.  The functions are called narrowed to the
10725 part, and you can do anything you like, pretty much.  There is no
10726 information that you have to keep in the buffer---you can change
10727 everything.
10728
10729
10730 @node Article Keymap
10731 @section Article Keymap
10732
10733 Most of the keystrokes in the summary buffer can also be used in the
10734 article buffer.  They should behave as if you typed them in the summary
10735 buffer, which means that you don't actually have to have a summary
10736 buffer displayed while reading.  You can do it all from the article
10737 buffer.
10738
10739 A few additional keystrokes are available:
10740
10741 @table @kbd
10742
10743 @item SPACE
10744 @kindex SPACE (Article)
10745 @findex gnus-article-next-page
10746 Scroll forwards one page (@code{gnus-article-next-page}).
10747
10748 @item DEL
10749 @kindex DEL (Article)
10750 @findex gnus-article-prev-page
10751 Scroll backwards one page (@code{gnus-article-prev-page}).
10752
10753 @item C-c ^
10754 @kindex C-c ^ (Article)
10755 @findex gnus-article-refer-article
10756 If point is in the neighborhood of a @code{Message-ID} and you press
10757 @kbd{C-c ^}, Gnus will try to get that article from the server
10758 (@code{gnus-article-refer-article}).
10759
10760 @item C-c C-m
10761 @kindex C-c C-m (Article)
10762 @findex gnus-article-mail
10763 Send a reply to the address near point (@code{gnus-article-mail}).  If
10764 given a prefix, include the mail.
10765
10766 @item s
10767 @kindex s (Article)
10768 @findex gnus-article-show-summary
10769 Reconfigure the buffers so that the summary buffer becomes visible
10770 (@code{gnus-article-show-summary}).
10771
10772 @item ?
10773 @kindex ? (Article)
10774 @findex gnus-article-describe-briefly
10775 Give a very brief description of the available keystrokes
10776 (@code{gnus-article-describe-briefly}).
10777
10778 @item TAB
10779 @kindex TAB (Article)
10780 @findex gnus-article-next-button
10781 Go to the next button, if any (@code{gnus-article-next-button}).  This
10782 only makes sense if you have buttonizing turned on.
10783
10784 @item M-TAB
10785 @kindex M-TAB (Article)
10786 @findex gnus-article-prev-button
10787 Go to the previous button, if any (@code{gnus-article-prev-button}).
10788
10789 @item R
10790 @kindex R (Article)
10791 @findex gnus-article-reply-with-original
10792 Send a reply to the current article and yank the current article
10793 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
10794 wide reply.  If the region is active, only yank the text in the
10795 region.
10796
10797 @item F
10798 @kindex F (Article)
10799 @findex gnus-article-followup-with-original
10800 Send a followup to the current article and yank the current article
10801 (@code{gnus-article-followup-with-original}).  If given a prefix, make
10802 a wide reply.  If the region is active, only yank the text in the
10803 region.
10804
10805
10806 @end table
10807
10808
10809 @node Misc Article
10810 @section Misc Article
10811
10812 @table @code
10813
10814 @item gnus-single-article-buffer
10815 @vindex gnus-single-article-buffer
10816 If non-@code{nil}, use the same article buffer for all the groups.
10817 (This is the default.)  If @code{nil}, each group will have its own
10818 article buffer.
10819
10820 @vindex gnus-article-decode-hook
10821 @item gnus-article-decode-hook
10822 @cindex MIME
10823 Hook used to decode @sc{mime} articles.  The default value is
10824 @code{(article-decode-charset article-decode-encoded-words)}
10825
10826 @vindex gnus-article-prepare-hook
10827 @item gnus-article-prepare-hook
10828 This hook is called right after the article has been inserted into the
10829 article buffer.  It is mainly intended for functions that do something
10830 depending on the contents; it should probably not be used for changing
10831 the contents of the article buffer.
10832
10833 @item gnus-article-mode-hook
10834 @vindex gnus-article-mode-hook
10835 Hook called in article mode buffers.
10836
10837 @item gnus-article-mode-syntax-table
10838 @vindex gnus-article-mode-syntax-table
10839 Syntax table used in article buffers.  It is initialized from
10840 @code{text-mode-syntax-table}.
10841
10842 @vindex gnus-article-mode-line-format
10843 @item gnus-article-mode-line-format
10844 This variable is a format string along the same lines as
10845 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
10846 accepts the same format specifications as that variable, with two
10847 extensions:
10848
10849 @table @samp
10850
10851 @item w
10852 The @dfn{wash status} of the article.  This is a short string with one
10853 character for each possible article wash operation that may have been
10854 performed.  The characters and their meaning:
10855
10856 @table @samp
10857
10858 @item c
10859 Displayed when cited text may be hidden in the article buffer.
10860
10861 @item h
10862 Displayed when headers are hidden in the article buffer.
10863
10864 @item p
10865 Displayed when article is digitally signed or encrypted, and Gnus has
10866 hidden the security headers.  (N.B. does not tell anything about
10867 security status, i.e. good or bad signature.)
10868
10869 @item s
10870 Displayed when the signature has been hidden in the Article buffer.
10871
10872 @item o
10873 Displayed when Gnus has treated overstrike characters in the article buffer.
10874
10875 @item e
10876 Displayed when Gnus has treated emphasised strings in the article buffer.
10877
10878 @end table
10879
10880 @item m
10881 The number of @sc{mime} parts in the article.
10882
10883 @end table
10884
10885 @vindex gnus-break-pages
10886
10887 @item gnus-break-pages
10888 Controls whether @dfn{page breaking} is to take place.  If this variable
10889 is non-@code{nil}, the articles will be divided into pages whenever a
10890 page delimiter appears in the article.  If this variable is @code{nil},
10891 paging will not be done.
10892
10893 @item gnus-page-delimiter
10894 @vindex gnus-page-delimiter
10895 This is the delimiter mentioned above.  By default, it is @samp{^L}
10896 (formfeed).
10897 @end table
10898
10899
10900 @node Composing Messages
10901 @chapter Composing Messages
10902 @cindex composing messages
10903 @cindex messages
10904 @cindex mail
10905 @cindex sending mail
10906 @cindex reply
10907 @cindex followup
10908 @cindex post
10909 @cindex using gpg
10910 @cindex using s/mime
10911 @cindex using smime
10912
10913 @kindex C-c C-c (Post)
10914 All commands for posting and mailing will put you in a message buffer
10915 where you can edit the article all you like, before you send the
10916 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
10917 Message Manual}.  Where the message will be posted/mailed to depends
10918 on your setup (@pxref{Posting Server}).
10919
10920 @menu
10921 * Mail::                        Mailing and replying.
10922 * Posting Server::              What server should you post and mail via?
10923 * Mail and Post::               Mailing and posting at the same time.
10924 * Archived Messages::           Where Gnus stores the messages you've sent.
10925 * Posting Styles::              An easier way to specify who you are.
10926 * Drafts::                      Postponing messages and rejected messages.
10927 * Rejected Articles::           What happens if the server doesn't like your article?
10928 * Signing and encrypting::      How to compose secure messages.
10929 @end menu
10930
10931 Also see @pxref{Canceling and Superseding} for information on how to
10932 remove articles you shouldn't have posted.
10933
10934
10935 @node Mail
10936 @section Mail
10937
10938 Variables for customizing outgoing mail:
10939
10940 @table @code
10941 @item gnus-uu-digest-headers
10942 @vindex gnus-uu-digest-headers
10943 List of regexps to match headers included in digested messages.  The
10944 headers will be included in the sequence they are matched.  If
10945 @code{nil} include all headers.
10946
10947 @item gnus-add-to-list
10948 @vindex gnus-add-to-list
10949 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
10950 that have none when you do a @kbd{a}.
10951
10952 @item gnus-confirm-mail-reply-to-news
10953 @vindex gnus-confirm-mail-reply-to-news
10954 This can also be a function receiving the group name as the only
10955 parameter which should return non-@code{nil} if a confirmation is
10956 needed, or a regular expression matching group names, where
10957 confirmation is should be asked for.
10958
10959 If you find yourself never wanting to reply to mail, but occasionally
10960 press R anyway, this variable might be for you.
10961
10962 @item gnus-confirm-treat-mail-like-news
10963 @vindex gnus-confirm-treat-mail-like-news
10964 If non-@code{nil}, Gnus also requests confirmation according to
10965 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
10966 useful for treating mailing lists like newsgroups.
10967  
10968 @end table
10969
10970
10971 @node Posting Server
10972 @section Posting Server
10973
10974 When you press those magical @kbd{C-c C-c} keys to ship off your latest
10975 (extremely intelligent, of course) article, where does it go?
10976
10977 Thank you for asking.  I hate you.
10978
10979 It can be quite complicated.
10980
10981 @vindex gnus-post-method
10982 When posting news, Message usually invokes @code{message-send-news}
10983 (@pxref{News Variables, , News Variables, message, Message Manual}).
10984 Normally, Gnus will post using the same select method as you're
10985 reading from (which might be convenient if you're reading lots of
10986 groups from different private servers).  However.  If the server
10987 you're reading from doesn't allow posting, just reading, you probably
10988 want to use some other server to post your (extremely intelligent and
10989 fabulously interesting) articles.  You can then set the
10990 @code{gnus-post-method} to some other method:
10991
10992 @lisp
10993 (setq gnus-post-method '(nnspool ""))
10994 @end lisp
10995
10996 Now, if you've done this, and then this server rejects your article, or
10997 this server is down, what do you do then?  To override this variable you
10998 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
10999 the ``current'' server, to get back the default behavior, for posting.
11000
11001 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11002 gnus will prompt you for what method to use for posting.
11003
11004 You can also set @code{gnus-post-method} to a list of select methods.
11005 If that's the case, gnus will always prompt you for what method to use
11006 for posting.
11007
11008 Finally, if you want to always post using the native select method,
11009 you can set this variable to @code{native}.
11010
11011 When sending mail, Message invokes @code{message-send-mail-function}.
11012 The default function, @code{message-send-mail-with-sendmail}, pipes
11013 your article to the @code{sendmail} binary for further queuing and
11014 sending.  When your local system is not configured for sending mail
11015 using @code{sendmail}, and you have access to a remote @sc{smtp}
11016 server, you can set @code{message-send-mail-function} to
11017 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11018 package correctly.  An example:
11019
11020 @lisp
11021 (setq message-send-mail-function 'smtpmail-send-it
11022       smtpmail-default-smtp-server "YOUR SMTP HOST")
11023 ;; The following variable needs to be set because of the FLIM version of
11024 ;; smtpmail.el.  Which smtpmail.el is used depends on the `load-path'.
11025 (setq smtp-default-smtp-server "YOUR SMTP HOST")
11026 @end lisp
11027
11028 To the thing similar to this, there is @code{message-smtpmail-send-it}.
11029 It is useful if your ISP requires the POP-before-SMTP authentication.
11030 See the documentation for the function @code{mail-source-touch-pop}.
11031
11032 Other possible choices for @code{message-send-mail-function} includes
11033 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11034 and @code{feedmail-send-it}.
11035
11036 @node Mail and Post
11037 @section Mail and Post
11038
11039 Here's a list of variables relevant to both mailing and
11040 posting:
11041
11042 @table @code
11043 @item gnus-mailing-list-groups
11044 @findex gnus-mailing-list-groups
11045 @cindex mailing lists
11046
11047 If your news server offers groups that are really mailing lists
11048 gatewayed to the @sc{nntp} server, you can read those groups without
11049 problems, but you can't post/followup to them without some difficulty.
11050 One solution is to add a @code{to-address} to the group parameters
11051 (@pxref{Group Parameters}).  An easier thing to do is set the
11052 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11053 really are mailing lists.  Then, at least, followups to the mailing
11054 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11055 still a pain, though.
11056
11057 @end table
11058
11059 You may want to do spell-checking on messages that you send out.  Or, if
11060 you don't want to spell-check by hand, you could add automatic
11061 spell-checking via the @code{ispell} package:
11062
11063 @cindex ispell
11064 @findex ispell-message
11065 @lisp
11066 (add-hook 'message-send-hook 'ispell-message)
11067 @end lisp
11068
11069 If you want to change the @code{ispell} dictionary based on what group
11070 you're in, you could say something like the following:
11071
11072 @lisp
11073 (add-hook 'gnus-select-group-hook
11074           (lambda ()
11075             (cond
11076              ((string-match
11077                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11078               (ispell-change-dictionary "deutsch"))
11079              (t
11080               (ispell-change-dictionary "english")))))
11081 @end lisp
11082
11083 Modify to suit your needs.
11084
11085
11086 @node Archived Messages
11087 @section Archived Messages
11088 @cindex archived messages
11089 @cindex sent messages
11090
11091 Gnus provides a few different methods for storing the mail and news you
11092 send.  The default method is to use the @dfn{archive virtual server} to
11093 store the messages.  If you want to disable this completely, the
11094 @code{gnus-message-archive-group} variable should be @code{nil}, which
11095 is the default.
11096
11097 For archiving interesting messages in a group you read, see the
11098 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11099 Group Commands}).
11100
11101 @vindex gnus-message-archive-method
11102 @code{gnus-message-archive-method} says what virtual server gnus is to
11103 use to store sent messages.  The default is:
11104
11105 @lisp
11106 (nnfolder "archive"
11107           (nnfolder-directory   "~/Mail/archive")
11108           (nnfolder-active-file "~/Mail/archive/active")
11109           (nnfolder-get-new-mail nil)
11110           (nnfolder-inhibit-expiry t))
11111 @end lisp
11112
11113 You can, however, use any mail select method (@code{nnml},
11114 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11115 for doing this sort of thing, though.  If you don't like the default
11116 directory chosen, you could say something like:
11117
11118 @lisp
11119 (setq gnus-message-archive-method
11120       '(nnfolder "archive"
11121                  (nnfolder-inhibit-expiry t)
11122                  (nnfolder-active-file "~/News/sent-mail/active")
11123                  (nnfolder-directory "~/News/sent-mail/")))
11124 @end lisp
11125
11126 @vindex gnus-message-archive-group
11127 @cindex Gcc
11128 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11129 to one or more group(s) on that server.  Which group to use is
11130 determined by the @code{gnus-message-archive-group} variable.
11131
11132 This variable can be used to do the following:
11133
11134 @itemize @bullet
11135 @item
11136 a string
11137 Messages will be saved in that group.
11138
11139 Note that you can include a select method in the group name, then the
11140 message will not be stored in the select method given by
11141 @code{gnus-message-archive-method}, but in the select method specified
11142 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11143 has the default value shown above.  Then setting
11144 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11145 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11146 value @code{"nnml:foo"}, then outgoing messages will be stored in
11147 @samp{nnml:foo}.
11148 @item
11149 a list of strings
11150 Messages will be saved in all those groups.
11151 @item
11152 an alist of regexps, functions and forms
11153 When a key ``matches'', the result is used.
11154 @item
11155 @code{nil}
11156 No message archiving will take place.  This is the default.
11157 @end itemize
11158
11159 Let's illustrate:
11160
11161 Just saving to a single group called @samp{MisK}:
11162 @lisp
11163 (setq gnus-message-archive-group "MisK")
11164 @end lisp
11165
11166 Saving to two groups, @samp{MisK} and @samp{safe}:
11167 @lisp
11168 (setq gnus-message-archive-group '("MisK" "safe"))
11169 @end lisp
11170
11171 Save to different groups based on what group you are in:
11172 @lisp
11173 (setq gnus-message-archive-group
11174       '(("^alt" "sent-to-alt")
11175         ("mail" "sent-to-mail")
11176         (".*" "sent-to-misc")))
11177 @end lisp
11178
11179 More complex stuff:
11180 @lisp
11181 (setq gnus-message-archive-group
11182       '((if (message-news-p)
11183             "misc-news"
11184           "misc-mail")))
11185 @end lisp
11186
11187 How about storing all news messages in one file, but storing all mail
11188 messages in one file per month:
11189
11190 @lisp
11191 (setq gnus-message-archive-group
11192       '((if (message-news-p)
11193             "misc-news"
11194           (concat "mail." (format-time-string "%Y-%m")))))
11195 @end lisp
11196
11197 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11198 @c use a different value for @code{gnus-message-archive-group} there.)
11199
11200 Now, when you send a message off, it will be stored in the appropriate
11201 group.  (If you want to disable storing for just one particular message,
11202 you can just remove the @code{Gcc} header that has been inserted.)  The
11203 archive group will appear in the group buffer the next time you start
11204 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11205 enter it and read the articles in it just like you'd read any other
11206 group.  If the group gets really big and annoying, you can simply rename
11207 if (using @kbd{G r} in the group buffer) to something
11208 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11209 continue to be stored in the old (now empty) group.
11210
11211 That's the default method of archiving sent messages.  Gnus offers a
11212 different way for the people who don't like the default method.  In that
11213 case you should set @code{gnus-message-archive-group} to @code{nil};
11214 this will disable archiving.
11215
11216 @table @code
11217 @item gnus-outgoing-message-group
11218 @vindex gnus-outgoing-message-group
11219 All outgoing messages will be put in this group.  If you want to store
11220 all your outgoing mail and articles in the group @samp{nnml:archive},
11221 you set this variable to that value.  This variable can also be a list of
11222 group names.
11223
11224 If you want to have greater control over what group to put each
11225 message in, you can set this variable to a function that checks the
11226 current newsgroup name and then returns a suitable group name (or list
11227 of names).
11228
11229 This variable can be used instead of @code{gnus-message-archive-group},
11230 but the latter is the preferred method.
11231
11232 @item gnus-gcc-mark-as-read
11233 @vindex gnus-gcc-mark-as-read
11234 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11235
11236 @item gnus-gcc-externalize-attachments
11237 @vindex gnus-gcc-externalize-attachments
11238 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11239 and matches the Gcc group name, attach files as external parts; if it is
11240 @code{all}, attach local files as external parts; if it is other
11241 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11242 changed in the future.
11243
11244 @end table
11245
11246
11247 @node Posting Styles
11248 @section Posting Styles
11249 @cindex posting styles
11250 @cindex styles
11251
11252 All them variables, they make my head swim.
11253
11254 So what if you want a different @code{Organization} and signature based
11255 on what groups you post to?  And you post both from your home machine
11256 and your work machine, and you want different @code{From} lines, and so
11257 on?
11258
11259 @vindex gnus-posting-styles
11260 One way to do stuff like that is to write clever hooks that change the
11261 variables you need to have changed.  That's a bit boring, so somebody
11262 came up with the bright idea of letting the user specify these things in
11263 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11264 variable:
11265
11266 @lisp
11267 ((".*"
11268   (signature "Peace and happiness")
11269   (organization "What me?"))
11270  ("^comp"
11271   (signature "Death to everybody"))
11272  ("comp.emacs.i-love-it"
11273   (organization "Emacs is it")))
11274 @end lisp
11275
11276 As you might surmise from this example, this alist consists of several
11277 @dfn{styles}.  Each style will be applicable if the first element
11278 ``matches'', in some form or other.  The entire alist will be iterated
11279 over, from the beginning towards the end, and each match will be
11280 applied, which means that attributes in later styles that match override
11281 the same attributes in earlier matching styles.  So
11282 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11283 signature and the @samp{What me?} @code{Organization} header.
11284
11285 The first element in each style is called the @code{match}.  If it's a
11286 string, then Gnus will try to regexp match it against the group name.
11287 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
11288 the original article for a header whose name is MATCH and compare that
11289 REGEXP.  MATCH and REGEXP are strings.  (There original article is the
11290 one you are replying or following up to.  If you are not composing a
11291 reply or a followup, then there is nothing to match against.)  If the
11292 @code{match} is a function symbol, that function will be called with no
11293 arguments.  If it's a variable symbol, then the variable will be
11294 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11295 any case, if this returns a non-@code{nil} value, then the style is said
11296 to @dfn{match}.
11297
11298 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11299 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11300 attribute name can be one of @code{signature}, @code{signature-file},
11301 @code{x-face-file}, @code{address} (overriding
11302 @code{user-mail-address}), @code{name} (overriding
11303 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11304 be a string or a symbol.  In that case, this will be used as a header
11305 name, and the value will be inserted in the headers of the article; if
11306 the value is @code{nil}, the header name will be removed.  If the
11307 attribute name is @code{eval}, the form is evaluated, and the result
11308 is thrown away.
11309
11310 The attribute value can be a string (used verbatim), a function with
11311 zero arguments (the return value will be used), a variable (its value
11312 will be used) or a list (it will be @code{eval}ed and the return value
11313 will be used).  The functions and sexps are called/@code{eval}ed in the
11314 message buffer that is being set up.  The headers of the current article
11315 are available through the @code{message-reply-headers} variable, which
11316 is a vector of the following headers: number subject from date id
11317 references chars lines xref extra.
11318
11319 @vindex message-reply-headers
11320
11321 If you wish to check whether the message you are about to compose is
11322 meant to be a news article or a mail message, you can check the values
11323 of the @code{message-news-p} and @code{message-mail-p} functions.
11324
11325 @findex message-mail-p
11326 @findex message-news-p
11327
11328 So here's a new example:
11329
11330 @lisp
11331 (setq gnus-posting-styles
11332       '((".*"
11333          (signature-file "~/.signature")
11334          (name "User Name")
11335          ("X-Home-Page" (getenv "WWW_HOME"))
11336          (organization "People's Front Against MWM"))
11337         ("^rec.humor"
11338          (signature my-funny-signature-randomizer))
11339         ((equal (system-name) "gnarly")  ;; A form
11340          (signature my-quote-randomizer))
11341         (message-news-p        ;; A function symbol
11342          (signature my-news-signature))
11343         (window-system         ;; A value symbol
11344          ("X-Window-System" (format "%s" window-system)))
11345         ;; If I'm replying to Larsi, set the Organization header.
11346         ((header "from" "larsi.*org")
11347          (Organization "Somewhere, Inc."))
11348         ((posting-from-work-p) ;; A user defined function
11349          (signature-file "~/.work-signature")
11350          (address "user@@bar.foo")
11351          (body "You are fired.\n\nSincerely, your boss.")
11352          (organization "Important Work, Inc"))
11353         ("nnml:.*"
11354          (From (save-excursion
11355                  (set-buffer gnus-article-buffer)
11356                  (message-fetch-field "to"))))
11357         ("^nn.+:"
11358          (signature-file "~/.mail-signature"))))
11359 @end lisp
11360
11361 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11362 @code{From} address in all your outgoing replies, which might be handy
11363 if you fill many roles.
11364
11365 Setting the @code{gnus-named-posting-styles} variable will make
11366 posting-styles allow to have distinctive names.  You can specify an
11367 arbitrary posting-style when article posting with @kbd{S P} in the
11368 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11369 the names to styles.  Once a posting-style is added to the alist, we can
11370 import it from @code{gnus-posting-styles}.  If an attribute whose name
11371 is @code{import} is found, Gnus will look for the attribute value in
11372 @code{gnus-named-posting-styles} and expand it in place.
11373
11374 Here's an example:
11375
11376 @lisp
11377 (setq gnus-named-posting-styles
11378       '(("Default"
11379          (signature-file "~/.signature")
11380          (name "User Name")
11381          ("X-Home-Page" (getenv "WWW_HOME"))
11382          (organization "People's Front Against MWM"))
11383         ("Emacs"
11384          (import "Default")
11385          (organization "The Church of Emacs"))))
11386 @end lisp
11387
11388 The posting-style named "Emacs" will inherit all the attributes from
11389 "Default" except @code{organization}.
11390
11391
11392 @node Drafts
11393 @section Drafts
11394 @cindex drafts
11395
11396 If you are writing a message (mail or news) and suddenly remember that
11397 you have a steak in the oven (or some pesto in the food processor, you
11398 craaazy vegetarians), you'll probably wish there was a method to save
11399 the message you are writing so that you can continue editing it some
11400 other day, and send it when you feel its finished.
11401
11402 Well, don't worry about it.  Whenever you start composing a message of
11403 some sort using the gnus mail and post commands, the buffer you get will
11404 automatically associate to an article in a special @dfn{draft} group.
11405 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11406 article will be saved there.  (Auto-save files also go to the draft
11407 group.)
11408
11409 @cindex nndraft
11410 @vindex nndraft-directory
11411 The draft group is a special group (which is implemented as an
11412 @code{nndraft} group, if you absolutely have to know) called
11413 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11414 @code{nndraft} is to store its files.  What makes this group special is
11415 that you can't tick any articles in it or mark any articles as
11416 read---all articles in the group are permanently unread.
11417
11418 If the group doesn't exist, it will be created and you'll be subscribed
11419 to it.  The only way to make it disappear from the Group buffer is to
11420 unsubscribe it.
11421
11422 @c @findex gnus-dissociate-buffer-from-draft
11423 @c @kindex C-c M-d (Mail)
11424 @c @kindex C-c M-d (Post)
11425 @c @findex gnus-associate-buffer-with-draft
11426 @c @kindex C-c C-d (Mail)
11427 @c @kindex C-c C-d (Post)
11428 @c If you're writing some super-secret message that you later want to
11429 @c encode with PGP before sending, you may wish to turn the auto-saving
11430 @c (and association with the draft group) off.  You never know who might be
11431 @c interested in reading all your extremely valuable and terribly horrible
11432 @c and interesting secrets.  The @kbd{C-c M-d}
11433 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11434 @c If you change your mind and want to turn the auto-saving back on again,
11435 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11436 @c
11437 @c @vindex gnus-use-draft
11438 @c To leave association with the draft group off by default, set
11439 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11440
11441 @findex gnus-draft-edit-message
11442 @kindex D e (Draft)
11443 When you want to continue editing the article, you simply enter the
11444 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11445 that.  You will be placed in a buffer where you left off.
11446
11447 Rejected articles will also be put in this draft group (@pxref{Rejected
11448 Articles}).
11449
11450 @findex gnus-draft-send-all-messages
11451 @findex gnus-draft-send-message
11452 If you have lots of rejected messages you want to post (or mail) without
11453 doing further editing, you can use the @kbd{D s} command
11454 (@code{gnus-draft-send-message}).  This command understands the
11455 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11456 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11457 in the buffer.
11458
11459 If you have some messages that you wish not to send, you can use the
11460 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11461 as unsendable.  This is a toggling command.
11462
11463
11464 @node Rejected Articles
11465 @section Rejected Articles
11466 @cindex rejected articles
11467
11468 Sometimes a news server will reject an article.  Perhaps the server
11469 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11470 @emph{there be demons}.  Perhaps you have included too much cited text.
11471 Perhaps the disk is full.  Perhaps the server is down.
11472
11473 These situations are, of course, totally beyond the control of gnus.
11474 (Gnus, of course, loves the way you look, always feels great, has angels
11475 fluttering around inside of it, doesn't care about how much cited text
11476 you include, never runs full and never goes down.)  So gnus saves these
11477 articles until some later time when the server feels better.
11478
11479 The rejected articles will automatically be put in a special draft group
11480 (@pxref{Drafts}).  When the server comes back up again, you'd then
11481 typically enter that group and send all the articles off.
11482
11483 @node Signing and encrypting
11484 @section Signing and encrypting
11485 @cindex using gpg
11486 @cindex using s/mime
11487 @cindex using smime
11488
11489 Gnus can digitally sign and encrypt your messages, using vanilla PGP
11490 format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
11491 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
11492 (@pxref{Security}).
11493
11494 Often, you would like to sign replies to people who send you signed
11495 messages.  Even more often, you might want to encrypt messages which
11496 are in reply to encrypted messages.  Gnus offers
11497 @code{gnus-message-replysign} to enable the former, and
11498 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11499 @code{gnus-message-replysignencrypted} (on by default) will sign
11500 automatically encrypted messages.
11501
11502 Instructing MML to perform security operations on a @sc{mime} part is
11503 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11504 C-m c} key map for encryption, as follows.
11505
11506 @table @kbd
11507
11508 @item C-c C-m s s
11509 @kindex C-c C-m s s
11510 @findex mml-secure-message-sign-smime
11511
11512 Digitally sign current message using @sc{s/mime}.
11513
11514 @item C-c C-m s o
11515 @kindex C-c C-m s o
11516 @findex mml-secure-message-sign-pgp
11517
11518 Digitally sign current message using PGP.
11519
11520 @item C-c C-m s p
11521 @kindex C-c C-m s p
11522 @findex mml-secure-message-sign-pgp
11523
11524 Digitally sign current message using @sc{pgp/mime}.
11525
11526 @item C-c C-m c s
11527 @kindex C-c C-m c s
11528 @findex mml-secure-message-encrypt-smime
11529
11530 Digitally encrypt current message using @sc{s/mime}.
11531
11532 @item C-c C-m c o
11533 @kindex C-c C-m c o
11534 @findex mml-secure-message-encrypt-pgp
11535
11536 Digitally encrypt current message using PGP.
11537
11538 @item C-c C-m c p
11539 @kindex C-c C-m c p
11540 @findex mml-secure-message-encrypt-pgpmime
11541
11542 Digitally encrypt current message using @sc{pgp/mime}.
11543
11544 @item C-c C-m C-n
11545 @kindex C-c C-m C-n
11546 @findex mml-unsecure-message
11547 Remove security related MML tags from message.
11548
11549 @end table
11550
11551 @xref{Security, ,Security, message, Message Manual}, for more information.
11552
11553 @node Select Methods
11554 @chapter Select Methods
11555 @cindex foreign groups
11556 @cindex select methods
11557
11558 A @dfn{foreign group} is a group not read by the usual (or
11559 default) means.  It could be, for instance, a group from a different
11560 @sc{nntp} server, it could be a virtual group, or it could be your own
11561 personal mail group.
11562
11563 A foreign group (or any group, really) is specified by a @dfn{name} and
11564 a @dfn{select method}.  To take the latter first, a select method is a
11565 list where the first element says what back end to use (e.g. @code{nntp},
11566 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11567 name}.  There may be additional elements in the select method, where the
11568 value may have special meaning for the back end in question.
11569
11570 One could say that a select method defines a @dfn{virtual server}---so
11571 we do just that (@pxref{Server Buffer}).
11572
11573 The @dfn{name} of the group is the name the back end will recognize the
11574 group as.
11575
11576 For instance, the group @samp{soc.motss} on the @sc{nntp} server
11577 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11578 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11579 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11580 back end just knows this group as @samp{soc.motss}.
11581
11582 The different methods all have their peculiarities, of course.
11583
11584 @menu
11585 * Server Buffer::               Making and editing virtual servers.
11586 * Getting News::                Reading USENET news with Gnus.
11587 * Getting Mail::                Reading your personal mail with Gnus.
11588 * Browsing the Web::            Getting messages from a plethora of Web sources.
11589 * IMAP::                        Using Gnus as a @sc{imap} client.
11590 * Other Sources::               Reading directories, files, SOUP packets.
11591 * Combined Groups::             Combining groups into one group.
11592 * Gnus Unplugged::              Reading news and mail offline.
11593 @end menu
11594
11595
11596 @node Server Buffer
11597 @section Server Buffer
11598
11599 Traditionally, a @dfn{server} is a machine or a piece of software that
11600 one connects to, and then requests information from.  Gnus does not
11601 connect directly to any real servers, but does all transactions through
11602 one back end or other.  But that's just putting one layer more between
11603 the actual media and Gnus, so we might just as well say that each
11604 back end represents a virtual server.
11605
11606 For instance, the @code{nntp} back end may be used to connect to several
11607 different actual @sc{nntp} servers, or, perhaps, to many different ports
11608 on the same actual @sc{nntp} server.  You tell Gnus which back end to
11609 use, and what parameters to set by specifying a @dfn{select method}.
11610
11611 These select method specifications can sometimes become quite
11612 complicated---say, for instance, that you want to read from the
11613 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
11614 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
11615 Anyway, if you had to specify that for each group that used this
11616 server, that would be too much work, so Gnus offers a way of naming
11617 select methods, which is what you do in the server buffer.
11618
11619 To enter the server buffer, use the @kbd{^}
11620 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11621
11622 @menu
11623 * Server Buffer Format::        You can customize the look of this buffer.
11624 * Server Commands::             Commands to manipulate servers.
11625 * Example Methods::             Examples server specifications.
11626 * Creating a Virtual Server::   An example session.
11627 * Server Variables::            Which variables to set.
11628 * Servers and Methods::         You can use server names as select methods.
11629 * Unavailable Servers::         Some servers you try to contact may be down.
11630 @end menu
11631
11632 @vindex gnus-server-mode-hook
11633 @code{gnus-server-mode-hook} is run when creating the server buffer.
11634
11635
11636 @node Server Buffer Format
11637 @subsection Server Buffer Format
11638 @cindex server buffer format
11639
11640 @vindex gnus-server-line-format
11641 You can change the look of the server buffer lines by changing the
11642 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11643 variable, with some simple extensions:
11644
11645 @table @samp
11646
11647 @item h
11648 How the news is fetched---the back end name.
11649
11650 @item n
11651 The name of this server.
11652
11653 @item w
11654 Where the news is to be fetched from---the address.
11655
11656 @item s
11657 The opened/closed/denied status of the server.
11658 @end table
11659
11660 @vindex gnus-server-mode-line-format
11661 The mode line can also be customized by using the
11662 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11663 Formatting}).  The following specs are understood:
11664
11665 @table @samp
11666 @item S
11667 Server name.
11668
11669 @item M
11670 Server method.
11671 @end table
11672
11673 Also @pxref{Formatting Variables}.
11674
11675
11676 @node Server Commands
11677 @subsection Server Commands
11678 @cindex server commands
11679
11680 @table @kbd
11681
11682 @item a
11683 @kindex a (Server)
11684 @findex gnus-server-add-server
11685 Add a new server (@code{gnus-server-add-server}).
11686
11687 @item e
11688 @kindex e (Server)
11689 @findex gnus-server-edit-server
11690 Edit a server (@code{gnus-server-edit-server}).
11691
11692 @item SPACE
11693 @kindex SPACE (Server)
11694 @findex gnus-server-read-server
11695 Browse the current server (@code{gnus-server-read-server}).
11696
11697 @item q
11698 @kindex q (Server)
11699 @findex gnus-server-exit
11700 Return to the group buffer (@code{gnus-server-exit}).
11701
11702 @item k
11703 @kindex k (Server)
11704 @findex gnus-server-kill-server
11705 Kill the current server (@code{gnus-server-kill-server}).
11706
11707 @item y
11708 @kindex y (Server)
11709 @findex gnus-server-yank-server
11710 Yank the previously killed server (@code{gnus-server-yank-server}).
11711
11712 @item c
11713 @kindex c (Server)
11714 @findex gnus-server-copy-server
11715 Copy the current server (@code{gnus-server-copy-server}).
11716
11717 @item l
11718 @kindex l (Server)
11719 @findex gnus-server-list-servers
11720 List all servers (@code{gnus-server-list-servers}).
11721
11722 @item s
11723 @kindex s (Server)
11724 @findex gnus-server-scan-server
11725 Request that the server scan its sources for new articles
11726 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
11727 servers.
11728
11729 @item g
11730 @kindex g (Server)
11731 @findex gnus-server-regenerate-server
11732 Request that the server regenerate all its data structures
11733 (@code{gnus-server-regenerate-server}).  This can be useful if you have
11734 a mail back end that has gotten out of sync.
11735
11736 @end table
11737
11738
11739 @node Example Methods
11740 @subsection Example Methods
11741
11742 Most select methods are pretty simple and self-explanatory:
11743
11744 @lisp
11745 (nntp "news.funet.fi")
11746 @end lisp
11747
11748 Reading directly from the spool is even simpler:
11749
11750 @lisp
11751 (nnspool "")
11752 @end lisp
11753
11754 As you can see, the first element in a select method is the name of the
11755 back end, and the second is the @dfn{address}, or @dfn{name}, if you
11756 will.
11757
11758 After these two elements, there may be an arbitrary number of
11759 @code{(@var{variable} @var{form})} pairs.
11760
11761 To go back to the first example---imagine that you want to read from
11762 port 15 on that machine.  This is what the select method should
11763 look like then:
11764
11765 @lisp
11766 (nntp "news.funet.fi" (nntp-port-number 15))
11767 @end lisp
11768
11769 You should read the documentation to each back end to find out what
11770 variables are relevant, but here's an @code{nnmh} example:
11771
11772 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
11773 you have two structures that you wish to access: One is your private
11774 mail spool, and the other is a public one.  Here's the possible spec for
11775 your private mail:
11776
11777 @lisp
11778 (nnmh "private" (nnmh-directory "~/private/mail/"))
11779 @end lisp
11780
11781 (This server is then called @samp{private}, but you may have guessed
11782 that.)
11783
11784 Here's the method for a public spool:
11785
11786 @lisp
11787 (nnmh "public"
11788       (nnmh-directory "/usr/information/spool/")
11789       (nnmh-get-new-mail nil))
11790 @end lisp
11791
11792 @cindex proxy
11793 @cindex firewall
11794
11795 If you are behind a firewall and only have access to the @sc{nntp}
11796 server from the firewall machine, you can instruct Gnus to @code{rlogin}
11797 on the firewall machine and telnet from there to the @sc{nntp} server.
11798 Doing this can be rather fiddly, but your virtual server definition
11799 should probably look something like this:
11800
11801 @lisp
11802 (nntp "firewall"
11803       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
11804       (nntp-via-address "the.firewall.machine")
11805       (nntp-address "the.real.nntp.host")
11806       (nntp-end-of-line "\n"))
11807 @end lisp
11808
11809 If you want to use the wonderful @code{ssh} program to provide a
11810 compressed connection over the modem line, you could add the following
11811 configuration to the example above:
11812
11813 @lisp
11814       (nntp-via-rlogin-command "ssh")
11815 @end lisp
11816
11817 See also @code{nntp-via-rlogin-command-switches}.
11818
11819 If you're behind a firewall, but have direct access to the outside world
11820 through a wrapper command like "runsocks", you could open a socksified
11821 telnet connection to the news server as follows:
11822
11823 @lisp
11824 (nntp "outside"
11825       (nntp-pre-command "runsocks")
11826       (nntp-open-connection-function nntp-open-via-telnet)
11827       (nntp-address "the.news.server")
11828       (nntp-end-of-line "\n"))
11829 @end lisp
11830
11831 This means that you have to have set up @code{ssh-agent} correctly to
11832 provide automatic authorization, of course.  And to get a compressed
11833 connection, you have to have the @samp{Compression} option in the
11834 @code{ssh} @file{config} file.
11835
11836
11837 @node Creating a Virtual Server
11838 @subsection Creating a Virtual Server
11839
11840 If you're saving lots of articles in the cache by using persistent
11841 articles, you may want to create a virtual server to read the cache.
11842
11843 First you need to add a new server.  The @kbd{a} command does that.  It
11844 would probably be best to use @code{nnspool} to read the cache.  You
11845 could also use @code{nnml} or @code{nnmh}, though.
11846
11847 Type @kbd{a nnspool RET cache RET}.
11848
11849 You should now have a brand new @code{nnspool} virtual server called
11850 @samp{cache}.  You now need to edit it to have the right definitions.
11851 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
11852 will contain the following:
11853
11854 @lisp
11855 (nnspool "cache")
11856 @end lisp
11857
11858 Change that to:
11859
11860 @lisp
11861 (nnspool "cache"
11862          (nnspool-spool-directory "~/News/cache/")
11863          (nnspool-nov-directory "~/News/cache/")
11864          (nnspool-active-file "~/News/cache/active"))
11865 @end lisp
11866
11867 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
11868 @kbd{RET} over this virtual server, you should be entered into a browse
11869 buffer, and you should be able to enter any of the groups displayed.
11870
11871
11872 @node Server Variables
11873 @subsection Server Variables
11874
11875 One sticky point when defining variables (both on back ends and in Emacs
11876 in general) is that some variables are typically initialized from other
11877 variables when the definition of the variables is being loaded.  If you
11878 change the "base" variable after the variables have been loaded, you
11879 won't change the "derived" variables.
11880
11881 This typically affects directory and file variables.  For instance,
11882 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
11883 directory variables are initialized from that variable, so
11884 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
11885 new virtual @code{nnml} server, it will @emph{not} suffice to set just
11886 @code{nnml-directory}---you have to explicitly set all the file
11887 variables to be what you want them to be.  For a complete list of
11888 variables for each back end, see each back end's section later in this
11889 manual, but here's an example @code{nnml} definition:
11890
11891 @lisp
11892 (nnml "public"
11893       (nnml-directory "~/my-mail/")
11894       (nnml-active-file "~/my-mail/active")
11895       (nnml-newsgroups-file "~/my-mail/newsgroups"))
11896 @end lisp
11897
11898
11899 @node Servers and Methods
11900 @subsection Servers and Methods
11901
11902 Wherever you would normally use a select method
11903 (e.g. @code{gnus-secondary-select-method}, in the group select method,
11904 when browsing a foreign server) you can use a virtual server name
11905 instead.  This could potentially save lots of typing.  And it's nice all
11906 over.
11907
11908
11909 @node Unavailable Servers
11910 @subsection Unavailable Servers
11911
11912 If a server seems to be unreachable, Gnus will mark that server as
11913 @code{denied}.  That means that any subsequent attempt to make contact
11914 with that server will just be ignored.  ``It can't be opened,'' Gnus
11915 will tell you, without making the least effort to see whether that is
11916 actually the case or not.
11917
11918 That might seem quite naughty, but it does make sense most of the time.
11919 Let's say you have 10 groups subscribed to on server
11920 @samp{nephelococcygia.com}.  This server is located somewhere quite far
11921 away from you and the machine is quite slow, so it takes 1 minute just
11922 to find out that it refuses connection to you today.  If Gnus were to
11923 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
11924 attempt to do that.  Once it has gotten a single ``connection refused'',
11925 it will regard that server as ``down''.
11926
11927 So, what happens if the machine was only feeling unwell temporarily?
11928 How do you test to see whether the machine has come up again?
11929
11930 You jump to the server buffer (@pxref{Server Buffer}) and poke it
11931 with the following commands:
11932
11933 @table @kbd
11934
11935 @item O
11936 @kindex O (Server)
11937 @findex gnus-server-open-server
11938 Try to establish connection to the server on the current line
11939 (@code{gnus-server-open-server}).
11940
11941 @item C
11942 @kindex C (Server)
11943 @findex gnus-server-close-server
11944 Close the connection (if any) to the server
11945 (@code{gnus-server-close-server}).
11946
11947 @item D
11948 @kindex D (Server)
11949 @findex gnus-server-deny-server
11950 Mark the current server as unreachable
11951 (@code{gnus-server-deny-server}).
11952
11953 @item M-o
11954 @kindex M-o (Server)
11955 @findex gnus-server-open-all-servers
11956 Open the connections to all servers in the buffer
11957 (@code{gnus-server-open-all-servers}).
11958
11959 @item M-c
11960 @kindex M-c (Server)
11961 @findex gnus-server-close-all-servers
11962 Close the connections to all servers in the buffer
11963 (@code{gnus-server-close-all-servers}).
11964
11965 @item R
11966 @kindex R (Server)
11967 @findex gnus-server-remove-denials
11968 Remove all marks to whether Gnus was denied connection from any servers
11969 (@code{gnus-server-remove-denials}).
11970
11971 @item L
11972 @kindex L (Server)
11973 @findex gnus-server-offline-server
11974 Set server status to offline (@code{gnus-server-offline-server}).
11975
11976 @end table
11977
11978
11979 @node Getting News
11980 @section Getting News
11981 @cindex reading news
11982 @cindex news back ends
11983
11984 A newsreader is normally used for reading news.  Gnus currently provides
11985 only two methods of getting news---it can read from an @sc{nntp} server,
11986 or it can read from a local spool.
11987
11988 @menu
11989 * NNTP::                        Reading news from an @sc{nntp} server.
11990 * News Spool::                  Reading news from the local spool.
11991 @end menu
11992
11993
11994 @node NNTP
11995 @subsection NNTP
11996 @cindex nntp
11997
11998 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
11999 You just specify @code{nntp} as method and the address of the @sc{nntp}
12000 server as the, uhm, address.
12001
12002 If the @sc{nntp} server is located at a non-standard port, setting the
12003 third element of the select method to this port number should allow you
12004 to connect to the right port.  You'll have to edit the group info for
12005 that (@pxref{Foreign Groups}).
12006
12007 The name of the foreign group can be the same as a native group.  In
12008 fact, you can subscribe to the same group from as many different servers
12009 you feel like.  There will be no name collisions.
12010
12011 The following variables can be used to create a virtual @code{nntp}
12012 server:
12013
12014 @table @code
12015
12016 @item nntp-server-opened-hook
12017 @vindex nntp-server-opened-hook
12018 @cindex @sc{mode reader}
12019 @cindex authinfo
12020 @cindex authentification
12021 @cindex nntp authentification
12022 @findex nntp-send-authinfo
12023 @findex nntp-send-mode-reader
12024 is run after a connection has been made.  It can be used to send
12025 commands to the @sc{nntp} server after it has been contacted.  By
12026 default it sends the command @code{MODE READER} to the server with the
12027 @code{nntp-send-mode-reader} function.  This function should always be
12028 present in this hook.
12029
12030 @item nntp-authinfo-function
12031 @vindex nntp-authinfo-function
12032 @findex nntp-send-authinfo
12033 @vindex nntp-authinfo-file
12034 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
12035 server.  The default function is @code{nntp-send-authinfo}, which looks
12036 through your @file{~/.authinfo} (or whatever you've set the
12037 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12038 are found, it will prompt you for a login name and a password.  The
12039 format of the @file{~/.authinfo} file is (almost) the same as the
12040 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12041 manual page, but here are the salient facts:
12042
12043 @enumerate
12044 @item
12045 The file contains one or more line, each of which define one server.
12046
12047 @item
12048 Each line may contain an arbitrary number of token/value pairs.
12049
12050 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12051 @samp{default}.  In addition Gnus introduces two new tokens, not present
12052 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12053 @samp{force}.  (This is the only way the @file{.authinfo} file format
12054 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12055 indicate what port on the server the credentials apply to and
12056 @samp{force} is explained below.
12057
12058 @end enumerate
12059
12060 Here's an example file:
12061
12062 @example
12063 machine news.uio.no login larsi password geheimnis
12064 machine nntp.ifi.uio.no login larsi force yes
12065 @end example
12066
12067 The token/value pairs may appear in any order; @samp{machine} doesn't
12068 have to be first, for instance.
12069
12070 In this example, both login name and password have been supplied for the
12071 former server, while the latter has only the login name listed, and the
12072 user will be prompted for the password.  The latter also has the
12073 @samp{force} tag, which means that the authinfo will be sent to the
12074 @var{nntp} server upon connection; the default (i.e., when there is not
12075 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12076 until the @var{nntp} server asks for it.
12077
12078 You can also add @samp{default} lines that will apply to all servers
12079 that don't have matching @samp{machine} lines.
12080
12081 @example
12082 default force yes
12083 @end example
12084
12085 This will force sending @samp{AUTHINFO} commands to all servers not
12086 previously mentioned.
12087
12088 Remember to not leave the @file{~/.authinfo} file world-readable.
12089
12090 @item nntp-server-action-alist
12091 @vindex nntp-server-action-alist
12092 This is a list of regexps to match on server types and actions to be
12093 taken when matches are made.  For instance, if you want Gnus to beep
12094 every time you connect to innd, you could say something like:
12095
12096 @lisp
12097 (setq nntp-server-action-alist
12098       '(("innd" (ding))))
12099 @end lisp
12100
12101 You probably don't want to do that, though.
12102
12103 The default value is
12104
12105 @lisp
12106 '(("nntpd 1\\.5\\.11t"
12107    (remove-hook 'nntp-server-opened-hook
12108                 'nntp-send-mode-reader)))
12109 @end lisp
12110
12111 This ensures that Gnus doesn't send the @code{MODE READER} command to
12112 nntpd 1.5.11t, since that command chokes that server, I've been told.
12113
12114 @item nntp-maximum-request
12115 @vindex nntp-maximum-request
12116 If the @sc{nntp} server doesn't support @sc{nov} headers, this back end
12117 will collect headers by sending a series of @code{head} commands.  To
12118 speed things up, the back end sends lots of these commands without
12119 waiting for reply, and then reads all the replies.  This is controlled
12120 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12121 your network is buggy, you should set this to 1.
12122
12123 @item nntp-connection-timeout
12124 @vindex nntp-connection-timeout
12125 If you have lots of foreign @code{nntp} groups that you connect to
12126 regularly, you're sure to have problems with @sc{nntp} servers not
12127 responding properly, or being too loaded to reply within reasonable
12128 time.  This is can lead to awkward problems, which can be helped
12129 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12130 that says how many seconds the @code{nntp} back end should wait for a
12131 connection before giving up.  If it is @code{nil}, which is the default,
12132 no timeouts are done.
12133
12134 @c @item nntp-command-timeout
12135 @c @vindex nntp-command-timeout
12136 @c @cindex PPP connections
12137 @c @cindex dynamic IP addresses
12138 @c If you're running Gnus on a machine that has a dynamically assigned
12139 @c address, Gnus may become confused.  If the address of your machine
12140 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
12141 @c waiting forever for replies from the server.  To help with this
12142 @c unfortunate problem, you can set this command to a number.  Gnus will
12143 @c then, if it sits waiting for a reply from the server longer than that
12144 @c number of seconds, shut down the connection, start a new one, and resend
12145 @c the command.  This should hopefully be transparent to the user.  A
12146 @c likely number is 30 seconds.
12147 @c
12148 @c @item nntp-retry-on-break
12149 @c @vindex nntp-retry-on-break
12150 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12151 @c hangs.  This will have much the same effect as the command timeout
12152 @c described above.
12153
12154 @item nntp-server-hook
12155 @vindex nntp-server-hook
12156 This hook is run as the last step when connecting to an @sc{nntp}
12157 server.
12158
12159 @item nntp-buggy-select
12160 @vindex nntp-buggy-select
12161 Set this to non-@code{nil} if your select routine is buggy.
12162
12163 @item nntp-nov-is-evil
12164 @vindex nntp-nov-is-evil
12165 If the @sc{nntp} server does not support @sc{nov}, you could set this
12166 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
12167 can be used.
12168
12169 @item nntp-xover-commands
12170 @vindex nntp-xover-commands
12171 @cindex nov
12172 @cindex XOVER
12173 List of strings used as commands to fetch @sc{nov} lines from a
12174 server.  The default value of this variable is @code{("XOVER"
12175 "XOVERVIEW")}.
12176
12177 @item nntp-nov-gap
12178 @vindex nntp-nov-gap
12179 @code{nntp} normally sends just one big request for @sc{nov} lines to
12180 the server.  The server responds with one huge list of lines.  However,
12181 if you have read articles 2-5000 in the group, and only want to read
12182 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
12183 lines that you will not need.  This variable says how
12184 big a gap between two consecutive articles is allowed to be before the
12185 @code{XOVER} request is split into several request.  Note that if your
12186 network is fast, setting this variable to a really small number means
12187 that fetching will probably be slower.  If this variable is @code{nil},
12188 @code{nntp} will never split requests.  The default is 5.
12189
12190 @item nntp-prepare-server-hook
12191 @vindex nntp-prepare-server-hook
12192 A hook run before attempting to connect to an @sc{nntp} server.
12193
12194 @item nntp-warn-about-losing-connection
12195 @vindex nntp-warn-about-losing-connection
12196 If this variable is non-@code{nil}, some noise will be made when a
12197 server closes connection.
12198
12199 @item nntp-record-commands
12200 @vindex nntp-record-commands
12201 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12202 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
12203 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
12204 that doesn't seem to work.
12205
12206 @item nntp-open-connection-function
12207 @vindex nntp-open-connection-function
12208 It is possible to customize how the connection to the nntp server will
12209 be opened.  If you specify an @code{nntp-open-connection-function}
12210 parameter, Gnus will use that function to establish the connection.
12211 Five pre-made functions are supplied.  These functions can be grouped in
12212 two categories: direct connection functions (three pre-made), and
12213 indirect ones (two pre-made).
12214
12215 @item nntp-prepare-post-hook
12216 @vindex nntp-prepare-post-hook
12217 A hook run just before posting an article.  If there is no
12218 @code{Message-ID} header in the article and the news server provides the
12219 recommended ID, it will be added to the article before running this
12220 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12221 inhibit Gnus to add a @code{Message-ID} header, you could say:
12222
12223 @lisp
12224 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12225 @end lisp
12226
12227 Note that not all servers support the recommended ID.  This works for
12228 INN versions 2.3.0 and later, for instance.
12229
12230 @item nntp-list-options
12231 @vindex nntp-list-options
12232 List of newsgroup name used for a option of the LIST command to restrict
12233 the listing output to only the specified newsgroups.  Each newsgroup name
12234 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12235 etc.  Fortunately, if the server can accept such a option, it will
12236 probably make gnus run faster.  You may use it as a server variable as
12237 follows:
12238
12239 @lisp
12240 (setq gnus-select-method
12241       '(nntp "news.somewhere.edu"
12242              (nntp-list-options ("fj.*" "japan.*"))))
12243 @end lisp
12244
12245 @item nntp-options-subscribe
12246 @vindex nntp-options-subscribe
12247 Regexp matching the newsgroup names which will be subscribed
12248 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12249 It may be effective as well as @code{nntp-list-options} even though the
12250 server could not accept a shell-style wildcard as a option of the LIST
12251 command.  You may use it as a server variable as follows:
12252
12253 @lisp
12254 (setq gnus-select-method
12255       '(nntp "news.somewhere.edu"
12256              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12257 @end lisp
12258
12259 @item nntp-options-not-subscribe
12260 @vindex nntp-options-not-subscribe
12261 Regexp matching the newsgroup names which will not be subscribed
12262 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12263 It may be effective as well as @code{nntp-list-options} even though the
12264 server could not accept a shell-style wildcard as a option of the LIST
12265 command.  You may use it as a server variable as follows:
12266
12267 @lisp
12268 (setq gnus-select-method
12269       '(nntp "news.somewhere.edu"
12270              (nntp-options-not-subscribe "\\.binaries\\.")))
12271 @end lisp
12272 @end table
12273
12274 @menu
12275 * Direct Functions::            Connecting directly to the server.
12276 * Indirect Functions::          Connecting indirectly to the server.
12277 * Common Variables::            Understood by several connection functions.
12278 @end menu
12279
12280
12281 @node Direct Functions
12282 @subsubsection Direct Functions
12283 @cindex direct connection functions
12284
12285 These functions are called direct because they open a direct connection
12286 between your machine and the @sc{nntp} server.  The behavior of these
12287 functions is also affected by commonly understood variables
12288 (@pxref{Common Variables}).
12289
12290 @table @code
12291 @findex nntp-open-network-stream
12292 @item nntp-open-network-stream
12293 This is the default, and simply connects to some port or other on the
12294 remote system.
12295
12296 @findex nntp-open-ssl-stream
12297 @item nntp-open-ssl-stream
12298 Opens a connection to a server over a @dfn{secure} channel.  To use
12299 this you must have OpenSSL (@uref{http://www.openssl.org}) or SSLeay
12300 installed (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also
12301 need @file{ssl.el} (from the W3 distribution, for instance).  You then
12302 define a server as follows:
12303
12304 @lisp
12305 ;; Type `C-c C-c' after you've finished editing.
12306 ;;
12307 ;; "snews" is port 563 and is predefined in our /etc/services
12308 ;; however, openssl s_client -port doesn't like named ports
12309 ;;
12310 (nntp "snews.bar.com"
12311       (nntp-open-connection-function nntp-open-ssl-stream)
12312       (nntp-port-number 563)
12313       (nntp-address "snews.bar.com"))
12314 @end lisp
12315
12316 @findex nntp-open-telnet-stream
12317 @item nntp-open-telnet-stream
12318 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
12319 it.  You might wonder why this function exists, since we have the
12320 default @code{nntp-open-network-stream} which would do the job.  (One
12321 of) the reason(s) is that if you are behind a firewall but have direct
12322 connections to the outside world thanks to a command wrapper like
12323 @code{runsocks}, you can use it like this:
12324
12325 @lisp
12326 (nntp "socksified"
12327       (nntp-pre-command "runsocks")
12328       (nntp-open-connection-function nntp-open-telnet-stream)
12329       (nntp-address "the.news.server"))
12330 @end lisp
12331
12332 With the default method, you would need to wrap your whole Emacs
12333 session, which is not a good idea.
12334 @end table
12335
12336
12337 @node Indirect Functions
12338 @subsubsection Indirect Functions
12339 @cindex indirect connection functions
12340
12341 These functions are called indirect because they connect to an
12342 intermediate host before actually connecting to the @sc{nntp} server.
12343 All of these functions and related variables are also said to belong to
12344 the "via" family of connection: they're all prefixed with "via" to make
12345 things cleaner.  The behavior of these functions is also affected by
12346 commonly understood variables (@pxref{Common Variables}).
12347
12348 @table @code
12349 @item nntp-open-via-rlogin-and-telnet
12350 @findex nntp-open-via-rlogin-and-telnet
12351 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12352 to the real @sc{nntp} server from there.  This is useful for instance if
12353 you need to connect to a firewall machine first.
12354
12355 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12356
12357 @table @code
12358 @item nntp-via-rlogin-command
12359 @vindex nntp-via-rlogin-command
12360 Command used to log in on the intermediate host.  The default is
12361 @samp{rsh}, but @samp{ssh} is a popular alternative.
12362
12363 @item nntp-via-rlogin-command-switches
12364 @vindex nntp-via-rlogin-command-switches
12365 List of strings to be used as the switches to
12366 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12367 @samp{ssh} for `nntp-via-rlogin-command', you may set this to
12368 @samp{("-C")} in order to compress all data connections, otherwise set
12369 this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command
12370 requires a pseudo-tty allocation on an intermediate host.
12371 @end table
12372
12373 @item nntp-open-via-telnet-and-telnet
12374 @findex nntp-open-via-telnet-and-telnet
12375 Does essentially the same, but uses @samp{telnet} instead of
12376 @samp{rlogin} to connect to the intermediate host.
12377
12378 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12379
12380 @table @code
12381 @item nntp-via-telnet-command
12382 @vindex nntp-via-telnet-command
12383 Command used to @code{telnet} the intermediate host.  The default is
12384 @samp{telnet}.
12385
12386 @item nntp-via-telnet-switches
12387 @vindex nntp-via-telnet-switches
12388 List of strings to be used as the switches to the
12389 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12390
12391 @item nntp-via-user-password
12392 @vindex nntp-via-user-password
12393 Password to use when logging in on the intermediate host.
12394
12395 @item nntp-via-envuser
12396 @vindex nntp-via-envuser
12397 If non-@code{nil}, the intermediate @code{telnet} session (client and
12398 server both) will support the @code{ENVIRON} option and not prompt for
12399 login name. This works for Solaris @code{telnet}, for instance.
12400
12401 @item nntp-via-shell-prompt
12402 @vindex nntp-via-shell-prompt
12403 Regexp matching the shell prompt on the intermediate host.  The default
12404 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12405
12406 @end table
12407
12408 @end table
12409
12410
12411 Here are some additional variables that are understood by all the above
12412 functions:
12413
12414 @table @code
12415
12416 @item nntp-via-user-name
12417 @vindex nntp-via-user-name
12418 User name to use when connecting to the intermediate host.
12419
12420 @item nntp-via-address
12421 @vindex nntp-via-address
12422 Address of the intermediate host to connect to.
12423
12424 @end table
12425
12426
12427 @node Common Variables
12428 @subsubsection Common Variables
12429
12430 The following variables affect the behavior of all, or several of the
12431 pre-made connection functions. When not specified, all functions are
12432 affected.
12433
12434 @table @code
12435
12436 @item nntp-pre-command
12437 @vindex nntp-pre-command
12438 A command wrapper to use when connecting through a non native connection
12439 function (all except @code{nntp-open-network-stream} and
12440 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
12441 wrapper for instance.
12442
12443 @item nntp-address
12444 @vindex nntp-address
12445 The address of the @sc{nntp} server.
12446
12447 @item nntp-port-number
12448 @vindex nntp-port-number
12449 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
12450 If you use @sc{nntp} over @sc{ssl}, you may want to use integer ports rather
12451 than named ports (i.e, use @samp{563} instead of @samp{snews}), because
12452 external SSL tools may not work with named ports.
12453
12454 @item nntp-end-of-line
12455 @vindex nntp-end-of-line
12456 String to use as end-of-line marker when talking to the @sc{nntp}
12457 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12458 using a non native connection function.
12459
12460 @item nntp-telnet-command
12461 @vindex nntp-telnet-command
12462 Command to use when connecting to the @sc{nntp} server through
12463 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
12464 the real @sc{nntp} server.  The default is @samp{telnet}.
12465
12466 @item nntp-telnet-switches
12467 @vindex nntp-telnet-switches
12468 A list of switches to pass to @code{nntp-telnet-command}.  The default
12469 is @samp{("-8")}.
12470
12471 @end table
12472
12473
12474 @node News Spool
12475 @subsection News Spool
12476 @cindex nnspool
12477 @cindex news spool
12478
12479 Subscribing to a foreign group from the local spool is extremely easy,
12480 and might be useful, for instance, to speed up reading groups that
12481 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12482 instance.
12483
12484 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12485 anything else) as the address.
12486
12487 If you have access to a local spool, you should probably use that as the
12488 native select method (@pxref{Finding the News}).  It is normally faster
12489 than using an @code{nntp} select method, but might not be.  It depends.
12490 You just have to try to find out what's best at your site.
12491
12492 @table @code
12493
12494 @item nnspool-inews-program
12495 @vindex nnspool-inews-program
12496 Program used to post an article.
12497
12498 @item nnspool-inews-switches
12499 @vindex nnspool-inews-switches
12500 Parameters given to the inews program when posting an article.
12501
12502 @item nnspool-spool-directory
12503 @vindex nnspool-spool-directory
12504 Where @code{nnspool} looks for the articles.  This is normally
12505 @file{/usr/spool/news/}.
12506
12507 @item nnspool-nov-directory
12508 @vindex nnspool-nov-directory
12509 Where @code{nnspool} will look for @sc{nov} files.  This is normally
12510 @file{/usr/spool/news/over.view/}.
12511
12512 @item nnspool-lib-dir
12513 @vindex nnspool-lib-dir
12514 Where the news lib dir is (@file{/usr/lib/news/} by default).
12515
12516 @item nnspool-active-file
12517 @vindex nnspool-active-file
12518 The name of the active file.
12519
12520 @item nnspool-newsgroups-file
12521 @vindex nnspool-newsgroups-file
12522 The name of the group descriptions file.
12523
12524 @item nnspool-history-file
12525 @vindex nnspool-history-file
12526 The name of the news history file.
12527
12528 @item nnspool-active-times-file
12529 @vindex nnspool-active-times-file
12530 The name of the active date file.
12531
12532 @item nnspool-nov-is-evil
12533 @vindex nnspool-nov-is-evil
12534 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
12535 that it finds.
12536
12537 @item nnspool-sift-nov-with-sed
12538 @vindex nnspool-sift-nov-with-sed
12539 @cindex sed
12540 If non-@code{nil}, which is the default, use @code{sed} to get the
12541 relevant portion from the overview file.  If nil, @code{nnspool} will
12542 load the entire file into a buffer and process it there.
12543
12544 @end table
12545
12546
12547 @node Getting Mail
12548 @section Getting Mail
12549 @cindex reading mail
12550 @cindex mail
12551
12552 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12553 course.
12554
12555 @menu
12556 * Mail in a Newsreader::        Important introductory notes.
12557 * Getting Started Reading Mail::  A simple cookbook example.
12558 * Splitting Mail::              How to create mail groups.
12559 * Mail Sources::                How to tell Gnus where to get mail from.
12560 * Mail Back End Variables::     Variables for customizing mail handling.
12561 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12562 * Group Mail Splitting::        Use group customize to drive mail splitting.
12563 * Incorporating Old Mail::      What about the old mail you have?
12564 * Expiring Mail::               Getting rid of unwanted mail.
12565 * Washing Mail::                Removing gruft from the mail you get.
12566 * Duplicates::                  Dealing with duplicated mail.
12567 * Not Reading Mail::            Using mail back ends for reading other files.
12568 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12569 @end menu
12570
12571
12572 @node Mail in a Newsreader
12573 @subsection Mail in a Newsreader
12574
12575 If you are used to traditional mail readers, but have decided to switch
12576 to reading mail with Gnus, you may find yourself experiencing something
12577 of a culture shock.
12578
12579 Gnus does not behave like traditional mail readers.  If you want to make
12580 it behave that way, you can, but it's an uphill battle.
12581
12582 Gnus, by default, handles all its groups using the same approach.  This
12583 approach is very newsreaderly---you enter a group, see the new/unread
12584 messages, and when you read the messages, they get marked as read, and
12585 you don't see them any more.  (Unless you explicitly ask for them.)
12586
12587 In particular, you do not do anything explicitly to delete messages.
12588
12589 Does this mean that all the messages that have been marked as read are
12590 deleted?  How awful!
12591
12592 But, no, it means that old messages are @dfn{expired} according to some
12593 scheme or other.  For news messages, the expire process is controlled by
12594 the news administrator; for mail, the expire process is controlled by
12595 you.  The expire process for mail is covered in depth in @pxref{Expiring
12596 Mail}.
12597
12598 What many Gnus users find, after using it a while for both news and
12599 mail, is that the transport mechanism has very little to do with how
12600 they want to treat a message.
12601
12602 Many people subscribe to several mailing lists.  These are transported
12603 via @sc{smtp}, and are therefore mail.  But we might go for weeks without
12604 answering, or even reading these messages very carefully.  We may not
12605 need to save them because if we should need to read one again, they are
12606 archived somewhere else.
12607
12608 Some people have local news groups which have only a handful of readers.
12609 These are transported via @sc{nntp}, and are therefore news.  But we may need
12610 to read and answer a large fraction of the messages very carefully in
12611 order to do our work.  And there may not be an archive, so we may need
12612 to save the interesting messages the same way we would personal mail.
12613
12614 The important distinction turns out to be not the transport mechanism,
12615 but other factors such as how interested we are in the subject matter,
12616 or how easy it is to retrieve the message if we need to read it again.
12617
12618 Gnus provides many options for sorting mail into ``groups'' which behave
12619 like newsgroups, and for treating each group (whether mail or news)
12620 differently.
12621
12622 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12623 that Gnus should grow up and be a male, er, mail reader.  It is possible
12624 to whip Gnus into a more mailreaderly being, but, as said before, it's
12625 not easy.  People who prefer proper mail readers should try @sc{vm}
12626 instead, which is an excellent, and proper, mail reader.
12627
12628 I don't mean to scare anybody off, but I want to make it clear that you
12629 may be required to learn a new way of thinking about messages.  After
12630 you've been subjected to The Gnus Way, you will come to love it.  I can
12631 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12632 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12633 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12634 You Do.)
12635
12636
12637 @node Getting Started Reading Mail
12638 @subsection Getting Started Reading Mail
12639
12640 It's quite easy to use Gnus to read your new mail.  You just plonk the
12641 mail back end of your choice into @code{gnus-secondary-select-methods},
12642 and things will happen automatically.
12643
12644 For instance, if you want to use @code{nnml} (which is a "one file per
12645 mail" back end), you could put the following in your @file{.gnus.el} file:
12646
12647 @lisp
12648 (setq gnus-secondary-select-methods '((nnml "")))
12649 @end lisp
12650
12651 Now, the next time you start Gnus, this back end will be queried for new
12652 articles, and it will move all the messages in your spool file to its
12653 directory, which is @code{~/Mail/} by default.  The new group that will
12654 be created (@samp{mail.misc}) will be subscribed, and you can read it
12655 like any other group.
12656
12657 You will probably want to split the mail into several groups, though:
12658
12659 @lisp
12660 (setq nnmail-split-methods
12661       '(("junk" "^From:.*Lars Ingebrigtsen")
12662         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
12663         ("other" "")))
12664 @end lisp
12665
12666 This will result in three new @code{nnml} mail groups being created:
12667 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
12668 mail that doesn't fit into the first two groups will be placed in the
12669 last group.
12670
12671 This should be sufficient for reading mail with Gnus.  You might want to
12672 give the other sections in this part of the manual a perusal, though.
12673 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
12674
12675
12676 @node Splitting Mail
12677 @subsection Splitting Mail
12678 @cindex splitting mail
12679 @cindex mail splitting
12680
12681 @vindex nnmail-split-methods
12682 The @code{nnmail-split-methods} variable says how the incoming mail is
12683 to be split into groups.
12684
12685 @lisp
12686 (setq nnmail-split-methods
12687   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
12688     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
12689     ("mail.other" "")))
12690 @end lisp
12691
12692 This variable is a list of lists, where the first element of each of
12693 these lists is the name of the mail group (they do not have to be called
12694 something beginning with @samp{mail}, by the way), and the second
12695 element is a regular expression used on the header of each mail to
12696 determine if it belongs in this mail group.  The first string may
12697 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
12698 insert sub-expressions from the matched text.  For instance:
12699
12700 @lisp
12701 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
12702 @end lisp
12703
12704 The second element can also be a function.  In that case, it will be
12705 called narrowed to the headers with the first element of the rule as the
12706 argument.  It should return a non-@code{nil} value if it thinks that the
12707 mail belongs in that group.
12708
12709 The last of these groups should always be a general one, and the regular
12710 expression should @emph{always} be @samp{} so that it matches any mails
12711 that haven't been matched by any of the other regexps.  (These rules are
12712 processed from the beginning of the alist toward the end.  The first
12713 rule to make a match will "win", unless you have crossposting enabled.
12714 In that case, all matching rules will "win".)
12715
12716 If you like to tinker with this yourself, you can set this variable to a
12717 function of your choice.  This function will be called without any
12718 arguments in a buffer narrowed to the headers of an incoming mail
12719 message.  The function should return a list of group names that it
12720 thinks should carry this mail message.
12721
12722 Note that the mail back ends are free to maul the poor, innocent,
12723 incoming headers all they want to.  They all add @code{Lines} headers;
12724 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
12725 @code{From<SPACE>} line to something else.
12726
12727 @vindex nnmail-crosspost
12728 The mail back ends all support cross-posting.  If several regexps match,
12729 the mail will be ``cross-posted'' to all those groups.
12730 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
12731 that no articles are crossposted to the general (@samp{}) group.
12732
12733 @vindex nnmail-crosspost-link-function
12734 @cindex crosspost
12735 @cindex links
12736 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
12737 the crossposted articles.  However, not all file systems support hard
12738 links.  If that's the case for you, set
12739 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
12740 variable is @code{add-name-to-file} by default.)
12741
12742 @kindex M-x nnmail-split-history
12743 @kindex nnmail-split-history
12744 If you wish to see where the previous mail split put the messages, you
12745 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
12746 where re-spooling messages would put the messages, you can use
12747 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
12748 Group Commands}).
12749
12750 @vindex nnmail-split-header-length-limit
12751 Header lines longer than the value of
12752 @code{nnmail-split-header-length-limit} are excluded from the split
12753 function.
12754
12755 @vindex nnmail-mail-splitting-charset
12756 @vindex nnmail-mail-splitting-decodes
12757 By default the splitting codes MIME decodes headers so you can match
12758 on non-ASCII strings.  The @code{nnmail-mail-splitting-charset}
12759 variable specifies the default charset for decoding.  The behaviour
12760 can be turned off completely by binding
12761 @code{nnmail-mail-splitting-decodes} to nil, which is useful if you
12762 want to match articles based on the raw header data.
12763
12764 @vindex nnmail-resplit-incoming
12765 By default, splitting is performed on all incoming messages.  If
12766 you specify a @code{directory} entry for the variable
12767 @code{mail-sources} @pxref{Mail Source Specifiers}, however, then
12768 splitting does @emph{not} happen by default.  You can set the variable
12769 @code{nnmail-resplit-incoming} to a non-nil value to make splitting
12770 happen even in this case.  (This variable has no effect on other kinds
12771 of entries.)
12772
12773 Gnus gives you all the opportunity you could possibly want for shooting
12774 yourself in the foot.  Let's say you create a group that will contain
12775 all the mail you get from your boss.  And then you accidentally
12776 unsubscribe from the group.  Gnus will still put all the mail from your
12777 boss in the unsubscribed group, and so, when your boss mails you ``Have
12778 that report ready by Monday or you're fired!'', you'll never see it and,
12779 come Tuesday, you'll still believe that you're gainfully employed while
12780 you really should be out collecting empty bottles to save up for next
12781 month's rent money.
12782
12783
12784 @node Mail Sources
12785 @subsection Mail Sources
12786
12787 Mail can be gotten from many different sources---the mail spool, from a
12788 POP mail server, from a procmail directory, or from a maildir, for
12789 instance.
12790
12791 @menu
12792 * Mail Source Specifiers::      How to specify what a mail source is.
12793 * Mail Source Customization::   Some variables that influence things.
12794 * Fetching Mail::               Using the mail source specifiers.
12795 @end menu
12796
12797
12798 @node Mail Source Specifiers
12799 @subsubsection Mail Source Specifiers
12800 @cindex POP
12801 @cindex mail server
12802 @cindex procmail
12803 @cindex mail spool
12804 @cindex mail source
12805
12806 You tell Gnus how to fetch mail by setting @code{mail-sources}
12807 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
12808
12809 Here's an example:
12810
12811 @lisp
12812 (pop :server "pop3.mailserver.com" :user "myname")
12813 @end lisp
12814
12815 As can be observed, a mail source specifier is a list where the first
12816 element is a @dfn{mail source type}, followed by an arbitrary number of
12817 @dfn{keywords}.  Keywords that are not explicitly specified are given
12818 default values.
12819
12820 The following mail source types are available:
12821
12822 @table @code
12823 @item file
12824 Get mail from a single file; typically from the mail spool.
12825
12826 Keywords:
12827
12828 @table @code
12829 @item :path
12830 The file name.  Defaults to the value of the @code{MAIL}
12831 environment variable or the value of @code{rmail-spool-directory}
12832 (usually something like @file{/usr/mail/spool/user-name}).
12833 @end table
12834
12835 An example file mail source:
12836
12837 @lisp
12838 (file :path "/usr/spool/mail/user-name")
12839 @end lisp
12840
12841 Or using the default file name:
12842
12843 @lisp
12844 (file)
12845 @end lisp
12846
12847 If the mail spool file is not located on the local machine, it's best to
12848 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
12849 file names here---it has no way to lock the mail spool while moving the
12850 mail.
12851
12852 If it's impossible to set up a proper server, you can use ssh instead.
12853
12854 @lisp
12855 (setq mail-sources
12856       '((file :prescript "ssh host bin/getmail >%t")))
12857 @end lisp
12858
12859 The @samp{getmail} script would look something like the following:
12860
12861 @example
12862 #!/bin/sh
12863 #  getmail - move mail from spool to stdout
12864 #  flu@@iki.fi
12865
12866 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
12867 TMP=$HOME/Mail/tmp
12868 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
12869 @end example
12870
12871 Alter this script to fit find the @samp{movemail} you want to use.
12872
12873
12874 @item directory
12875 @vindex nnmail-scan-directory-mail-source-once
12876 Get mail from several files in a directory.  This is typically used when
12877 you have procmail split the incoming mail into several files.  That is,
12878 there is a one-to-one correspondence between files in that directory and
12879 groups, so that mail from the file @file{foo.bar.spool} will be put in
12880 the group @code{foo.bar}.  (You can change the suffix to be used instead
12881 of @code{.spool}.)  Setting
12882 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus to
12883 scan the mail source only once.  This is particularly useful if you want
12884 to scan mail groups at a specified level.
12885
12886 @vindex nnmail-resplit-incoming
12887 There is also the variable @code{nnmail-resplit-incoming}, if you set
12888 that to a non-nil value, then the normal splitting process is applied
12889 to all the files from the directory, @ref{Splitting Mail}.
12890
12891 Keywords:
12892
12893 @table @code
12894 @item :path
12895 The name of the directory where the files are.  There is no default
12896 value.
12897
12898 @item :suffix
12899 Only files ending with this suffix are used.  The default is
12900 @samp{.spool}.
12901
12902 @item :predicate
12903 Only files that have this predicate return non-@code{nil} are returned.
12904 The default is @code{identity}.  This is used as an additional
12905 filter---only files that have the right suffix @emph{and} satisfy this
12906 predicate are considered.
12907
12908 @item :prescript
12909 @itemx :postscript
12910 Script run before/after fetching mail.
12911
12912 @end table
12913
12914 An example directory mail source:
12915
12916 @lisp
12917 (directory :path "/home/user-name/procmail-dir/"
12918            :suffix ".prcml")
12919 @end lisp
12920
12921 @item pop
12922 Get mail from a POP server.
12923
12924 Keywords:
12925
12926 @table @code
12927 @item :server
12928 The name of the POP server.  The default is taken from the
12929 @code{MAILHOST} environment variable.
12930
12931 @item :port
12932 The port number of the POP server.  This can be a number (eg,
12933 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
12934 string, it should be a service name as listed in @file{/etc/services} on
12935 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
12936 need to specify it as @samp{"pop-3"} instead.
12937
12938 @item :user
12939 The user name to give to the POP server.  The default is the login
12940 name.
12941
12942 @item :password
12943 The password to give to the POP server.  If not specified, the user is
12944 prompted.
12945
12946 @item :program
12947 The program to use to fetch mail from the POP server.  This should be
12948 a @code{format}-like string.  Here's an example:
12949
12950 @example
12951 fetchmail %u@@%s -P %p %t
12952 @end example
12953
12954 The valid format specifier characters are:
12955
12956 @table @samp
12957 @item t
12958 The name of the file the mail is to be moved to.  This must always be
12959 included in this string.
12960
12961 @item s
12962 The name of the server.
12963
12964 @item P
12965 The port number of the server.
12966
12967 @item u
12968 The user name to use.
12969
12970 @item p
12971 The password to use.
12972 @end table
12973
12974 The values used for these specs are taken from the values you give the
12975 corresponding keywords.
12976
12977 @item :prescript
12978 A script to be run before fetching the mail.  The syntax is the same as
12979 the @code{:program} keyword.  This can also be a function to be run.
12980
12981 @item :postscript
12982 A script to be run after fetching the mail.  The syntax is the same as
12983 the @code{:program} keyword.  This can also be a function to be run.
12984
12985 @item :function
12986 The function to use to fetch mail from the POP server.  The function is
12987 called with one parameter---the name of the file where the mail should
12988 be moved to.
12989
12990 @item :authentication
12991 This can be either the symbol @code{password} or the symbol @code{apop}
12992 and says what authentication scheme to use.  The default is
12993 @code{password}.
12994
12995 @item :connection
12996 What stream to use for connecting to the server, this can be the symbol
12997 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
12998 and use insecure connections.  Note that for SSL/TLS, you need external
12999 programs and libraries:
13000
13001 @itemize @bullet
13002 @item
13003 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
13004 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
13005 library @samp{ssl.el}.
13006 @item
13007 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
13008 Requires the external library @samp{starttls.el} and program
13009 @samp{starttls}.
13010 @end itemize
13011
13012 @item :leave
13013 Non-@code{nil} if mail is to be left on the server and UIDL used for
13014 message retrieval.  The default is @code{nil}.
13015
13016 @end table
13017
13018 If the @code{:program} and @code{:function} keywords aren't specified,
13019 @code{pop3-movemail} will be used.
13020
13021 Here are some examples.  Fetch from the default POP server, using the
13022 default user name, and default fetcher:
13023
13024 @lisp
13025 (pop)
13026 @end lisp
13027
13028 Fetch from a named server with a named user and password:
13029
13030 @lisp
13031 (pop :server "my.pop.server"
13032      :user "user-name" :password "secret")
13033 @end lisp
13034
13035 Use @samp{movemail} to move the mail:
13036
13037 @lisp
13038 (pop :program "movemail po:%u %t %p")
13039 @end lisp
13040
13041 @item maildir
13042 Get mail from a maildir.  This is a type of mailbox that is supported by
13043 at least qmail and postfix, where each file in a special directory
13044 contains exactly one mail.
13045
13046 Keywords:
13047
13048 @table @code
13049 @item :path
13050 The name of the directory where the mails are stored.  The default is
13051 taken from the @code{MAILDIR} environment variable or
13052 @samp{~/Maildir/}.
13053 @item :subdirs
13054 The subdirectories of the Maildir.  The default is
13055 @samp{("new" "cur")}.
13056
13057 @c If you sometimes look at your mail through a pop3 daemon before fetching
13058 @c them with Gnus, you may also have to fetch your mails from the
13059 @c @code{cur} directory inside the maildir, like in the first example
13060 @c below.
13061
13062 You can also get mails from remote hosts (because maildirs don't suffer
13063 from locking problems).
13064
13065 @end table
13066
13067 Two example maildir mail sources:
13068
13069 @lisp
13070 (maildir :path "/home/user-name/Maildir/"
13071          :subdirs ("cur" "new"))
13072 @end lisp
13073
13074 @lisp
13075 (maildir :path "/user@@remotehost.org:~/Maildir/"
13076          :subdirs ("new"))
13077 @end lisp
13078
13079 @item imap
13080 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
13081 as intended, as a network mail reading protocol (ie with nnimap), for
13082 some reason or other, Gnus let you treat it similar to a POP server
13083 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
13084 more information.
13085
13086 Note that for the Kerberos, GSSAPI, SSL/TLS and STARTTLS support you
13087 may need external programs and libraries, @xref{IMAP}.
13088
13089 Keywords:
13090
13091 @table @code
13092 @item :server
13093 The name of the @sc{imap} server.  The default is taken from the
13094 @code{MAILHOST} environment variable.
13095
13096 @item :port
13097 The port number of the @sc{imap} server.  The default is @samp{143}, or
13098 @samp{993} for SSL/TLS connections.
13099
13100 @item :user
13101 The user name to give to the @sc{imap} server.  The default is the login
13102 name.
13103
13104 @item :password
13105 The password to give to the @sc{imap} server.  If not specified, the user is
13106 prompted.
13107
13108 @item :stream
13109 What stream to use for connecting to the server, this is one of the
13110 symbols in @code{imap-stream-alist}.  Right now, this means
13111 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{ssl},
13112 @samp{shell} or the default @samp{network}.
13113
13114 @item :authentication
13115 Which authenticator to use for authenticating to the server, this is
13116 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13117 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13118 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13119
13120 @item :program
13121 When using the `shell' :stream, the contents of this variable is
13122 mapped into the `imap-shell-program' variable.  This should be a
13123 @code{format}-like string (or list of strings).  Here's an example:
13124
13125 @example
13126 ssh %s imapd
13127 @end example
13128
13129 The valid format specifier characters are:
13130
13131 @table @samp
13132 @item s
13133 The name of the server.
13134
13135 @item l
13136 User name from `imap-default-user'.
13137
13138 @item p
13139 The port number of the server.
13140 @end table
13141
13142 The values used for these specs are taken from the values you give the
13143 corresponding keywords.
13144
13145 @item :mailbox
13146 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13147 which normally is the mailbox which receive incoming mail.
13148
13149 @item :predicate
13150 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13151 UNDELETED}, is probably the best choice for most people, but if you
13152 sometimes peek in your mailbox with a @sc{imap} client and mark some
13153 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13154 Then all articles in the mailbox is fetched, no matter what.  For a
13155 complete list of predicates, see RFC 2060 section 6.4.4.
13156
13157 @item :fetchflag
13158 How to flag fetched articles on the server, the default @samp{\Deleted}
13159 will mark them as deleted, an alternative would be @samp{\Seen} which
13160 would simply mark them as read.  These are the two most likely choices,
13161 but more flags are defined in RFC 2060 section 2.3.2.
13162
13163 @item :dontexpunge
13164 If non-nil, don't remove all articles marked as deleted in the mailbox
13165 after finishing the fetch.
13166
13167 @end table
13168
13169 An example @sc{imap} mail source:
13170
13171 @lisp
13172 (imap :server "mail.mycorp.com"
13173       :stream kerberos4
13174       :fetchflag "\\Seen")
13175 @end lisp
13176
13177 @item webmail
13178 Get mail from a webmail server, such as @uref{www.hotmail.com},
13179 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13180 @uref{mail.yahoo..com}.
13181
13182 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13183 required for url "4.0pre.46".
13184
13185 WARNING: Mails may be lost.  NO WARRANTY.
13186
13187 Keywords:
13188
13189 @table @code
13190 @item :subtype
13191 The type of the webmail server.  The default is @code{hotmail}.  The
13192 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13193
13194 @item :user
13195 The user name to give to the webmail server.  The default is the login
13196 name.
13197
13198 @item :password
13199 The password to give to the webmail server.  If not specified, the user is
13200 prompted.
13201
13202 @item :dontexpunge
13203 If non-nil, only fetch unread articles and don't move them to trash
13204 folder after finishing the fetch.
13205
13206 @end table
13207
13208 An example webmail source:
13209
13210 @lisp
13211 (webmail :subtype 'hotmail
13212          :user "user-name"
13213          :password "secret")
13214 @end lisp
13215 @end table
13216
13217 @table @dfn
13218 @item Common Keywords
13219 Common keywords can be used in any type of mail source.
13220
13221 Keywords:
13222
13223 @table @code
13224 @item :plugged
13225 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
13226 directory source to get mail, you can specify it as in this example:
13227
13228 @lisp
13229 (setq mail-sources
13230       '((directory :path "/home/pavel/.Spool/"
13231                    :suffix ""
13232                    :plugged t)))
13233 @end lisp
13234
13235 Gnus will then fetch your mail even when you are unplugged.  This is
13236 useful when you use local mail and news.
13237
13238 @end table
13239 @end table
13240
13241 @subsubsection Function Interface
13242
13243 Some of the above keywords specify a Lisp function to be executed.
13244 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13245 the value of the keyword while the function is executing.  For example,
13246 consider the following mail-source setting:
13247
13248 @lisp
13249 (setq mail-sources '((pop :user "jrl"
13250                           :server "pophost" :function fetchfunc)))
13251 @end lisp
13252
13253 While the function @code{fetchfunc} is executing, the symbol @code{user}
13254 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13255 @code{"pophost"}.  The symbols @code{port}, @code{password},
13256 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13257 and @code{authentication} are also bound (to their default values).
13258
13259 See above for a list of keywords for each type of mail source.
13260
13261
13262 @node Mail Source Customization
13263 @subsubsection Mail Source Customization
13264
13265 The following is a list of variables that influence how the mail is
13266 fetched.  You would normally not need to set or change any of these
13267 variables.
13268
13269 @table @code
13270 @item mail-source-crash-box
13271 @vindex mail-source-crash-box
13272 File where mail will be stored while processing it.  The default is
13273 @file{~/.emacs-mail-crash-box}.
13274
13275 @item mail-source-delete-incoming
13276 @vindex mail-source-delete-incoming
13277 If non-@code{nil}, delete incoming files after handling them.
13278
13279 @item mail-source-directory
13280 @vindex mail-source-directory
13281 Directory where files (if any) will be stored.  The default is
13282 @file{~/Mail/}.  At present, the only thing this is used for is to say
13283 where the incoming files will be stored if the previous variable is
13284 @code{nil}.
13285
13286 @item mail-source-incoming-file-prefix
13287 @vindex mail-source-incoming-file-prefix
13288 Prefix for file name for storing incoming mail.  The default is
13289 @file{Incoming}, in which case files will end up with names like
13290 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13291 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13292
13293 @item mail-source-default-file-modes
13294 @vindex mail-source-default-file-modes
13295 All new mail files will get this file mode.  The default is 384.
13296
13297 @item mail-source-movemail-program
13298 @vindex mail-source-movemail-program
13299 If non-nil, name of program for fetching new mail.  If nil,
13300 @code{movemail} in @var{exec-directory}.
13301
13302 @end table
13303
13304
13305 @node Fetching Mail
13306 @subsubsection Fetching Mail
13307
13308 @vindex mail-sources
13309 @vindex nnmail-spool-file
13310 The way to actually tell Gnus where to get new mail from is to set
13311 @code{mail-sources} to a list of mail source specifiers
13312 (@pxref{Mail Source Specifiers}).
13313
13314 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13315 @code{nil}, the mail back ends will never attempt to fetch mail by
13316 themselves.
13317
13318 If you want to fetch mail both from your local spool as well as a POP
13319 mail server, you'd say something like:
13320
13321 @lisp
13322 (setq mail-sources
13323       '((file)
13324         (pop :server "pop3.mail.server"
13325              :password "secret")))
13326 @end lisp
13327
13328 Or, if you don't want to use any of the keyword defaults:
13329
13330 @lisp
13331 (setq mail-sources
13332       '((file :path "/var/spool/mail/user-name")
13333         (pop :server "pop3.mail.server"
13334              :user "user-name"
13335              :port "pop3"
13336              :password "secret")))
13337 @end lisp
13338
13339
13340 When you use a mail back end, Gnus will slurp all your mail from your
13341 inbox and plonk it down in your home directory.  Gnus doesn't move any
13342 mail if you're not using a mail back end---you have to do a lot of magic
13343 invocations first.  At the time when you have finished drawing the
13344 pentagram, lightened the candles, and sacrificed the goat, you really
13345 shouldn't be too surprised when Gnus moves your mail.
13346
13347
13348
13349 @node Mail Back End Variables
13350 @subsection Mail Back End Variables
13351
13352 These variables are (for the most part) pertinent to all the various
13353 mail back ends.
13354
13355 @table @code
13356 @vindex nnmail-read-incoming-hook
13357 @item nnmail-read-incoming-hook
13358 The mail back ends all call this hook after reading new mail.  You can
13359 use this hook to notify any mail watch programs, if you want to.
13360
13361 @vindex nnmail-split-hook
13362 @item nnmail-split-hook
13363 @findex article-decode-encoded-words
13364 @findex RFC 1522 decoding
13365 @findex RFC 2047 decoding
13366 Hook run in the buffer where the mail headers of each message is kept
13367 just before the splitting based on these headers is done.  The hook is
13368 free to modify the buffer contents in any way it sees fit---the buffer
13369 is discarded after the splitting has been done, and no changes performed
13370 in the buffer will show up in any files.
13371 @code{gnus-article-decode-encoded-words} is one likely function to add
13372 to this hook.
13373
13374 @vindex nnmail-pre-get-new-mail-hook
13375 @vindex nnmail-post-get-new-mail-hook
13376 @item nnmail-pre-get-new-mail-hook
13377 @itemx nnmail-post-get-new-mail-hook
13378 These are two useful hooks executed when treating new incoming
13379 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13380 starting to handle the new mail) and
13381 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13382 is done).  Here's and example of using these two hooks to change the
13383 default file modes the new mail files get:
13384
13385 @lisp
13386 (add-hook 'nnmail-pre-get-new-mail-hook
13387           (lambda () (set-default-file-modes 511)))
13388
13389 (add-hook 'nnmail-post-get-new-mail-hook
13390           (lambda () (set-default-file-modes 551)))
13391 @end lisp
13392
13393 @item nnmail-use-long-file-names
13394 @vindex nnmail-use-long-file-names
13395 If non-@code{nil}, the mail back ends will use long file and directory
13396 names.  Groups like @samp{mail.misc} will end up in directories
13397 (assuming use of @code{nnml} back end) or files (assuming use of
13398 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13399 the same group will end up in @file{mail/misc}.
13400
13401 @item nnmail-delete-file-function
13402 @vindex nnmail-delete-file-function
13403 @findex delete-file
13404 Function called to delete files.  It is @code{delete-file} by default.
13405
13406 @item nnmail-cache-accepted-message-ids
13407 @vindex nnmail-cache-accepted-message-ids
13408 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13409 the back end (via @code{Gcc}, for instance) into the mail duplication
13410 discovery cache.  The default is @code{nil}.
13411
13412 @item nnmail-cache-ignore-groups
13413 @vindex nnmail-cache-ignore-groups
13414 This can be a regular expression or a list of regular expressions.
13415 Group names that match any of the regular expressions will never be
13416 recorded in the @code{Message-ID} cache.
13417
13418 This can be useful, for example, when using Fancy Splitting
13419 (@pxref{Fancy Mail Splitting}) together with the function
13420 @code{nnmail-split-fancy-with-parent}.
13421
13422 @end table
13423
13424
13425 @node Fancy Mail Splitting
13426 @subsection Fancy Mail Splitting
13427 @cindex mail splitting
13428 @cindex fancy mail splitting
13429
13430 @vindex nnmail-split-fancy
13431 @findex nnmail-split-fancy
13432 If the rather simple, standard method for specifying how to split mail
13433 doesn't allow you to do what you want, you can set
13434 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13435 play with the @code{nnmail-split-fancy} variable.
13436
13437 Let's look at an example value of this variable first:
13438
13439 @lisp
13440 ;; Messages from the mailer daemon are not crossposted to any of
13441 ;; the ordinary groups.  Warnings are put in a separate group
13442 ;; from real errors.
13443 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13444                    "mail.misc"))
13445    ;; Non-error messages are crossposted to all relevant
13446    ;; groups, but we don't crosspost between the group for the
13447    ;; (ding) list and the group for other (ding) related mail.
13448    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13449          ("subject" "ding" "ding.misc"))
13450       ;; Other mailing lists...
13451       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13452       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13453       ;; Both lists below have the same suffix, so prevent
13454       ;; cross-posting to mkpkg.list of messages posted only to
13455       ;; the bugs- list, but allow cross-posting when the
13456       ;; message was really cross-posted.
13457       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13458       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13459       ;; People...
13460       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13461    ;; Unmatched mail goes to the catch all group.
13462    "misc.misc")
13463 @end lisp
13464
13465 This variable has the format of a @dfn{split}.  A split is a (possibly)
13466 recursive structure where each split may contain other splits.  Here are
13467 the five possible split syntaxes:
13468
13469 @enumerate
13470
13471 @item
13472 @samp{group}: If the split is a string, that will be taken as a group
13473 name.  Normal regexp match expansion will be done.  See below for
13474 examples.
13475
13476 @item
13477 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13478 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13479 first element of which is a string, then store the message as
13480 specified by @var{split}, if header @var{field} (a regexp) contains
13481 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13482 matches some string after @var{field} and before the end of the
13483 matched @var{value}, the @var{split} is ignored.  If none of the
13484 @var{restrict} clauses match, @var{split} is processed.
13485
13486 @item
13487 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13488 element is @code{|} (vertical bar), then process each @var{split} until
13489 one of them matches.  A @var{split} is said to match if it will cause
13490 the mail message to be stored in one or more groups.
13491
13492 @item
13493 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13494 element is @code{&}, then process all @var{split}s in the list.
13495
13496 @item
13497 @code{junk}: If the split is the symbol @code{junk}, then don't save
13498 (i.e., delete) this message.  Use with extreme caution.
13499
13500 @item
13501 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13502 a list, and the first element is @code{:}, then the second element will
13503 be called as a function with @var{args} given as arguments.  The
13504 function should return a @var{split}.
13505
13506 @cindex body split
13507 For instance, the following function could be used to split based on the
13508 body of the messages:
13509
13510 @lisp
13511 (defun split-on-body ()
13512   (save-excursion
13513     (set-buffer " *nnmail incoming*")
13514     (goto-char (point-min))
13515     (when (re-search-forward "Some.*string" nil t)
13516       "string.group")))
13517 @end lisp
13518
13519 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13520 when the @code{:} function is run.
13521
13522 @item
13523 @code{(! @var{func} @var{split})}: If the split is a list, and the first
13524 element is @code{!}, then SPLIT will be processed, and FUNC will be
13525 called as a function with the result of SPLIT as argument.  FUNC should
13526 return a split.
13527
13528 @item
13529 @code{nil}: If the split is @code{nil}, it is ignored.
13530
13531 @end enumerate
13532
13533 In these splits, @var{field} must match a complete field name.
13534 @var{value} must match a complete word according to the fundamental mode
13535 syntax table.  You can use @code{.*} in the regexps to match partial
13536 field names or words.  In other words, all @var{value}'s are wrapped in
13537 @samp{\<} and @samp{\>} pairs.
13538
13539 @vindex nnmail-split-abbrev-alist
13540 @var{field} and @var{value} can also be lisp symbols, in that case they
13541 are expanded as specified by the variable
13542 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13543 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13544 value.
13545
13546 @vindex nnmail-split-fancy-syntax-table
13547 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13548 when all this splitting is performed.
13549
13550 If you want to have Gnus create groups dynamically based on some
13551 information in the headers (i.e., do @code{replace-match}-like
13552 substitutions in the group names), you can say things like:
13553
13554 @example
13555 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13556 @end example
13557
13558 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13559 will be filed in @samp{mail.debian.foo}.
13560
13561 If the string contains the element @samp{\&}, then the previously
13562 matched string will be substituted.  Similarly, the elements @samp{\\1}
13563 up to @samp{\\9} will be substituted with the text matched by the
13564 groupings 1 through 9.
13565
13566 @findex nnmail-split-fancy-with-parent
13567 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13568 split followups into the same groups their parents are in.  Sometimes
13569 you can't make splitting rules for all your mail.  For example, your
13570 boss might send you personal mail regarding different projects you are
13571 working on, and as you can't tell your boss to put a distinguishing
13572 string into the subject line, you have to resort to manually moving the
13573 messages into the right group.  With this function, you only have to do
13574 it once per thread.
13575
13576 To use this feature, you have to set @code{nnmail-treat-duplicates} and
13577 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
13578 you can include @code{nnmail-split-fancy-with-parent} using the colon
13579 feature, like so:
13580 @lisp
13581 (setq nnmail-treat-duplicates 'warn     ; or 'delete
13582       nnmail-cache-accepted-message-ids t
13583       nnmail-split-fancy
13584       '(| (: nnmail-split-fancy-with-parent)
13585           ;; other splits go here
13586         ))
13587 @end lisp
13588
13589 This feature works as follows: when @code{nnmail-treat-duplicates} is
13590 non-nil, Gnus records the message id of every message it sees in the
13591 file specified by the variable @code{nnmail-message-id-cache-file},
13592 together with the group it is in (the group is omitted for non-mail
13593 messages).  When mail splitting is invoked, the function
13594 @code{nnmail-split-fancy-with-parent} then looks at the References (and
13595 In-Reply-To) header of each message to split and searches the file
13596 specified by @code{nnmail-message-id-cache-file} for the message ids.
13597 When it has found a parent, it returns the corresponding group name
13598 unless the group name matches the regexp
13599 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
13600 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
13601 number than the default so that the message ids are still in the cache.
13602 (A value of 5000 appears to create a file some 300 kBytes in size.)
13603 @vindex nnmail-cache-accepted-message-ids
13604 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13605 also records the message ids of moved articles, so that the followup
13606 messages goes into the new group.
13607
13608 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13609 want certain groups to be recorded in the cache.  For example, if all
13610 outgoing messages are written to an `outgoing' group, you could set
13611 @code{nnmail-cache-ignore-groups} to match that group name.
13612 Otherwise, answers to all your messages would end up in the
13613 `outgoing' group.
13614
13615
13616 @node Group Mail Splitting
13617 @subsection Group Mail Splitting
13618 @cindex mail splitting
13619 @cindex group mail splitting
13620
13621 @findex gnus-group-split
13622 If you subscribe to dozens of mailing lists but you don't want to
13623 maintain mail splitting rules manually, group mail splitting is for you.
13624 You just have to set @var{to-list} and/or @var{to-address} in group
13625 parameters or group customization and set @code{nnmail-split-methods} to
13626 @code{gnus-group-split}.  This splitting function will scan all groups
13627 for those parameters and split mail accordingly, i.e., messages posted
13628 from or to the addresses specified in the parameters @var{to-list} or
13629 @var{to-address} of a mail group will be stored in that group.
13630
13631 Sometimes, mailing lists have multiple addresses, and you may want mail
13632 splitting to recognize them all: just set the @var{extra-aliases} group
13633 parameter to the list of additional addresses and it's done.  If you'd
13634 rather use a regular expression, set @var{split-regexp}.
13635
13636 All these parameters in a group will be used to create an
13637 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13638 the @var{value} is a single regular expression that matches
13639 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13640 matches of @var{split-regexp}, and the @var{split} is the name of the
13641 group.  @var{restrict}s are also supported: just set the
13642 @var{split-exclude} parameter to a list of regular expressions.
13643
13644 If you can't get the right split to be generated using all these
13645 parameters, or you just need something fancier, you can set the
13646 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13647 this case, all other aforementioned parameters will be ignored by
13648 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13649 @code{nil}, in which case the group will be ignored by
13650 @code{gnus-group-split}.
13651
13652 @vindex gnus-group-split-default-catch-all-group
13653 @code{gnus-group-split} will do cross-posting on all groups that match,
13654 by defining a single @code{&} fancy split containing one split for each
13655 group.  If a message doesn't match any split, it will be stored in the
13656 group named in @code{gnus-group-split-default-catch-all-group}, unless
13657 some group has @var{split-spec} set to @code{catch-all}, in which case
13658 that group is used as the catch-all group.  Even though this variable is
13659 often used just to name a group, it may also be set to an arbitrarily
13660 complex fancy split (after all, a group name is a fancy split), and this
13661 may be useful to split mail that doesn't go to any mailing list to
13662 personal mail folders.  Note that this fancy split is added as the last
13663 element of a @code{|} split list that also contains a @code{&} split
13664 with the rules extracted from group parameters.
13665
13666 It's time for an example.  Assume the following group parameters have
13667 been defined:
13668
13669 @example
13670 nnml:mail.bar:
13671 ((to-address . "bar@@femail.com")
13672  (split-regexp . ".*@@femail\\.com"))
13673 nnml:mail.foo:
13674 ((to-list . "foo@@nowhere.gov")
13675  (extra-aliases "foo@@localhost" "foo-redist@@home")
13676  (split-exclude "bugs-foo" "rambling-foo")
13677  (admin-address . "foo-request@@nowhere.gov"))
13678 nnml:mail.others:
13679 ((split-spec . catch-all))
13680 @end example
13681
13682 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
13683 behave as if @code{nnmail-split-fancy} had been selected and variable
13684 @code{nnmail-split-fancy} had been set as follows:
13685
13686 @lisp
13687 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
13688       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
13689            - "bugs-foo" - "rambling-foo" "mail.foo"))
13690    "mail.others")
13691 @end lisp
13692
13693 @findex gnus-group-split-fancy
13694 If you'd rather not use group splitting for all your mail groups, you
13695 may use it for only some of them, by using @code{nnmail-split-fancy}
13696 splits like this:
13697
13698 @lisp
13699 (: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL)
13700 @end lisp
13701
13702 @var{groups} may be a regular expression or a list of group names whose
13703 parameters will be scanned to generate the output split.
13704 @var{no-crosspost} can be used to disable cross-posting; in this case, a
13705 single @code{|} split will be output.  @var{catch-all} is the fallback
13706 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
13707 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
13708 empty string in any selected group, no catch-all split will be issued.
13709 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
13710 this group will override the value of the @var{catch-all} argument.
13711
13712 @findex gnus-group-split-setup
13713 Unfortunately, scanning all groups and their parameters can be quite
13714 slow, especially considering that it has to be done for every message.
13715 But don't despair!  The function @code{gnus-group-split-setup} can be
13716 used to enable @code{gnus-group-split} in a much more efficient way.  It
13717 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
13718 @code{nnmail-split-fancy} to the split produced by
13719 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
13720 scanned once, no matter how many messages are split.
13721
13722 @findex gnus-group-split-update
13723 However, if you change group parameters, you'd have to update
13724 @code{nnmail-split-fancy} manually.  You can do it by running
13725 @code{gnus-group-split-update}.  If you'd rather have it updated
13726 automatically, just tell @code{gnus-group-split-setup} to do it for
13727 you.  For example, add to your @file{.gnus.el}:
13728
13729 @lisp
13730 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
13731 @end lisp
13732
13733 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
13734 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
13735 have to worry about updating @code{nnmail-split-fancy} again.  If you
13736 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
13737 @code{gnus-group-split-default-catch-all-group} will be set to its
13738 value.
13739
13740 @vindex gnus-group-split-updated-hook
13741 Because you may want to change @code{nnmail-split-fancy} after it is set
13742 by @code{gnus-group-split-update}, this function will run
13743 @code{gnus-group-split-updated-hook} just before finishing.
13744
13745 @node Incorporating Old Mail
13746 @subsection Incorporating Old Mail
13747 @cindex incorporating old mail
13748 @cindex import old mail
13749
13750 Most people have lots of old mail stored in various file formats.  If
13751 you have set up Gnus to read mail using one of the spiffy Gnus mail
13752 back ends, you'll probably wish to have that old mail incorporated into
13753 your mail groups.
13754
13755 Doing so can be quite easy.
13756
13757 To take an example: You're reading mail using @code{nnml}
13758 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
13759 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
13760 file filled with important, but old, mail.  You want to move it into
13761 your @code{nnml} groups.
13762
13763 Here's how:
13764
13765 @enumerate
13766 @item
13767 Go to the group buffer.
13768
13769 @item
13770 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
13771 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
13772
13773 @item
13774 Type @kbd{SPACE} to enter the newly created group.
13775
13776 @item
13777 Type @kbd{M P b} to process-mark all articles in this group's buffer
13778 (@pxref{Setting Process Marks}).
13779
13780 @item
13781 Type @kbd{B r} to respool all the process-marked articles, and answer
13782 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
13783 @end enumerate
13784
13785 All the mail messages in the mbox file will now also be spread out over
13786 all your @code{nnml} groups.  Try entering them and check whether things
13787 have gone without a glitch.  If things look ok, you may consider
13788 deleting the mbox file, but I wouldn't do that unless I was absolutely
13789 sure that all the mail has ended up where it should be.
13790
13791 Respooling is also a handy thing to do if you're switching from one mail
13792 back end to another.  Just respool all the mail in the old mail groups
13793 using the new mail back end.
13794
13795
13796 @node Expiring Mail
13797 @subsection Expiring Mail
13798 @cindex article expiry
13799
13800 Traditional mail readers have a tendency to remove mail articles when
13801 you mark them as read, in some way.  Gnus takes a fundamentally
13802 different approach to mail reading.
13803
13804 Gnus basically considers mail just to be news that has been received in
13805 a rather peculiar manner.  It does not think that it has the power to
13806 actually change the mail, or delete any mail messages.  If you enter a
13807 mail group, and mark articles as ``read'', or kill them in some other
13808 fashion, the mail articles will still exist on the system.  I repeat:
13809 Gnus will not delete your old, read mail.  Unless you ask it to, of
13810 course.
13811
13812 To make Gnus get rid of your unwanted mail, you have to mark the
13813 articles as @dfn{expirable}.  (With the default keybindings, this means
13814 that you have to type @kbd{E}.)  This does not mean that the articles
13815 will disappear right away, however.  In general, a mail article will be
13816 deleted from your system if, 1) it is marked as expirable, AND 2) it is
13817 more than one week old.  If you do not mark an article as expirable, it
13818 will remain on your system until hell freezes over.  This bears
13819 repeating one more time, with some spurious capitalizations: IF you do
13820 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
13821
13822 You do not have to mark articles as expirable by hand.  Gnus provides
13823 two features, called `auto-expire' and `total-expire', that can help you
13824 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
13825 for you when you select an article.  And `total-expire' means that Gnus
13826 considers all articles as expirable that are read.  So, in addition to
13827 the articles marked @samp{E}, also the articles marked @samp{r},
13828 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
13829 expirable.
13830
13831 When should either auto-expire or total-expire be used?  Most people
13832 who are subscribed to mailing lists split each list into its own group
13833 and then turn on auto-expire or total-expire for those groups.
13834 (@xref{Splitting Mail}, for more information on splitting each list
13835 into its own group.)
13836
13837 Which one is better, auto-expire or total-expire?  It's not easy to
13838 answer.  Generally speaking, auto-expire is probably faster.  Another
13839 advantage of auto-expire is that you get more marks to work with: for
13840 the articles that are supposed to stick around, you can still choose
13841 between tick and dormant and read marks.  But with total-expire, you
13842 only have dormant and ticked to choose from.  The advantage of
13843 total-expire is that it works well with adaptive scoring @pxref{Adaptive
13844 Scoring}.  Auto-expire works with normal scoring but not with adaptive
13845 scoring.
13846
13847 @vindex gnus-auto-expirable-newsgroups
13848 Groups that match the regular expression
13849 @code{gnus-auto-expirable-newsgroups} will have all articles that you
13850 read marked as expirable automatically.  All articles marked as
13851 expirable have an @samp{E} in the first column in the summary buffer.
13852
13853 By default, if you have auto expiry switched on, Gnus will mark all the
13854 articles you read as expirable, no matter if they were read or unread
13855 before.  To avoid having articles marked as read marked as expirable
13856 automatically, you can put something like the following in your
13857 @file{.gnus.el} file:
13858
13859 @vindex gnus-mark-article-hook
13860 @lisp
13861 (remove-hook 'gnus-mark-article-hook
13862              'gnus-summary-mark-read-and-unread-as-read)
13863 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
13864 @end lisp
13865
13866 Note that making a group auto-expirable doesn't mean that all read
13867 articles are expired---only the articles marked as expirable
13868 will be expired.  Also note that using the @kbd{d} command won't make
13869 articles expirable---only semi-automatic marking of articles as read will
13870 mark the articles as expirable in auto-expirable groups.
13871
13872 Let's say you subscribe to a couple of mailing lists, and you want the
13873 articles you have read to disappear after a while:
13874
13875 @lisp
13876 (setq gnus-auto-expirable-newsgroups
13877       "mail.nonsense-list\\|mail.nice-list")
13878 @end lisp
13879
13880 Another way to have auto-expiry happen is to have the element
13881 @code{auto-expire} in the group parameters of the group.
13882
13883 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
13884 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
13885 don't really mix very well.
13886
13887 @vindex nnmail-expiry-wait
13888 The @code{nnmail-expiry-wait} variable supplies the default time an
13889 expirable article has to live.  Gnus starts counting days from when the
13890 message @emph{arrived}, not from when it was sent.  The default is seven
13891 days.
13892
13893 Gnus also supplies a function that lets you fine-tune how long articles
13894 are to live, based on what group they are in.  Let's say you want to
13895 have one month expiry period in the @samp{mail.private} group, a one day
13896 expiry period in the @samp{mail.junk} group, and a six day expiry period
13897 everywhere else:
13898
13899 @vindex nnmail-expiry-wait-function
13900 @lisp
13901 (setq nnmail-expiry-wait-function
13902       (lambda (group)
13903        (cond ((string= group "mail.private")
13904                31)
13905              ((string= group "mail.junk")
13906                1)
13907              ((string= group "important")
13908                'never)
13909              (t
13910                6))))
13911 @end lisp
13912
13913 The group names this function is fed are ``unadorned'' group
13914 names---no @samp{nnml:} prefixes and the like.
13915
13916 The @code{nnmail-expiry-wait} variable and
13917 @code{nnmail-expiry-wait-function} function can either be a number (not
13918 necessarily an integer) or one of the symbols @code{immediate} or
13919 @code{never}.
13920
13921 You can also use the @code{expiry-wait} group parameter to selectively
13922 change the expiry period (@pxref{Group Parameters}).
13923
13924 @vindex nnmail-expiry-target
13925 The normal action taken when expiring articles is to delete them.
13926 However, in some circumstances it might make more sense to move them
13927 to other groups instead of deleting them.  The variable
13928 @code{nnmail-expiry-target} (and the @code{expiry-target} group
13929 parameter) controls this.  The variable supplies a default value for
13930 all groups, which can be overridden for specific groups by the group
13931 parameter.  default value is @code{delete}, but this can also be a
13932 string (which should be the name of the group the message should be
13933 moved to), or a function (which will be called in a buffer narrowed to
13934 the message in question, and with the name of the group being moved
13935 from as its parameter) which should return a target -- either a group
13936 name or @code{delete}.
13937
13938 Here's an example for specifying a group name:
13939 @lisp
13940 (setq nnmail-expiry-target "nnml:expired")
13941 @end lisp
13942
13943 @findex nnmail-fancy-expiry-target
13944 @vindex nnmail-fancy-expiry-targets
13945 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
13946 expire mail to groups according to the variable
13947 @code{nnmail-fancy-expiry-targets}.  Here's an example:
13948
13949 @lisp
13950  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
13951        nnmail-fancy-expiry-targets
13952        '((to-from "boss" "nnfolder:Work")
13953          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
13954          ("from" ".*" "nnfolder:Archive-%Y")))
13955 @end lisp
13956
13957 With this setup, any mail that has @code{IMPORTANT} in its Subject
13958 header and was sent in the year @code{YYYY} and month @code{MMM}, will
13959 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
13960 From or To header contains the string @code{boss}, it will get expired
13961 to @code{nnfolder:Work}. All other mail will get expired to
13962 @code{nnfolder:Archive-YYYY}.
13963
13964 @vindex nnmail-keep-last-article
13965 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
13966 expire the final article in a mail newsgroup.  This is to make life
13967 easier for procmail users.
13968
13969 @vindex gnus-total-expirable-newsgroups
13970 By the way: That line up there, about Gnus never expiring non-expirable
13971 articles, is a lie.  If you put @code{total-expire} in the group
13972 parameters, articles will not be marked as expirable, but all read
13973 articles will be put through the expiry process.  Use with extreme
13974 caution.  Even more dangerous is the
13975 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
13976 this regexp will have all read articles put through the expiry process,
13977 which means that @emph{all} old mail articles in the groups in question
13978 will be deleted after a while.  Use with extreme caution, and don't come
13979 crying to me when you discover that the regexp you used matched the
13980 wrong group and all your important mail has disappeared.  Be a
13981 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
13982 with!  So there!
13983
13984 Most people make most of their mail groups total-expirable, though.
13985
13986 @vindex gnus-inhibit-user-auto-expire
13987 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
13988 commands will not mark an article as expirable, even if the group has
13989 auto-expire turned on.
13990
13991
13992 @node Washing Mail
13993 @subsection Washing Mail
13994 @cindex mail washing
13995 @cindex list server brain damage
13996 @cindex incoming mail treatment
13997
13998 Mailers and list servers are notorious for doing all sorts of really,
13999 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14000 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14001 end of all lines passing through our server, so let's do that!!!!1!''
14002 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14003 considered to be self-evident were not discussed.  So.  Here we are.
14004
14005 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14006 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14007 be shocked and dismayed by this, but I haven't got the energy.  It is to
14008 laugh.
14009
14010 Gnus provides a plethora of functions for washing articles while
14011 displaying them, but it might be nicer to do the filtering before
14012 storing the mail to disk.  For that purpose, we have three hooks and
14013 various functions that can be put in these hooks.
14014
14015 @table @code
14016 @item nnmail-prepare-incoming-hook
14017 @vindex nnmail-prepare-incoming-hook
14018 This hook is called before doing anything with the mail and is meant for
14019 grand, sweeping gestures.  It is called in a buffer that contains all
14020 the new, incoming mail.  Functions to be used include:
14021
14022 @table @code
14023 @item nnheader-ms-strip-cr
14024 @findex nnheader-ms-strip-cr
14025 Remove trailing carriage returns from each line.  This is default on
14026 Emacs running on MS machines.
14027
14028 @end table
14029
14030 @item nnmail-prepare-incoming-header-hook
14031 @vindex nnmail-prepare-incoming-header-hook
14032 This hook is called narrowed to each header.  It can be used when
14033 cleaning up the headers.  Functions that can be used include:
14034
14035 @table @code
14036 @item nnmail-remove-leading-whitespace
14037 @findex nnmail-remove-leading-whitespace
14038 Clear leading white space that ``helpful'' listservs have added to the
14039 headers to make them look nice.  Aaah.
14040
14041 (Note that this function works on both the header on the body of all
14042 messages, so it is a potentially dangerous function to use (if a body
14043 of a message contains something that looks like a header line).  So
14044 rather than fix the bug, it is of course the right solution to make it
14045 into a feature by documenting it.)
14046
14047 @item nnmail-remove-list-identifiers
14048 @findex nnmail-remove-list-identifiers
14049 Some list servers add an identifier---for example, @samp{(idm)}---to the
14050 beginning of all @code{Subject} headers.  I'm sure that's nice for
14051 people who use stone age mail readers.  This function will remove
14052 strings that match the @code{nnmail-list-identifiers} regexp, which can
14053 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14054 @code{\\(..\\)}.
14055
14056 For instance, if you want to remove the @samp{(idm)} and the
14057 @samp{nagnagnag} identifiers:
14058
14059 @lisp
14060 (setq nnmail-list-identifiers
14061       '("(idm)" "nagnagnag"))
14062 @end lisp
14063
14064 This can also be done non-destructively with
14065 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14066
14067 @item nnmail-remove-tabs
14068 @findex nnmail-remove-tabs
14069 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14070
14071 @item nnmail-fix-eudora-headers
14072 @findex nnmail-fix-eudora-headers
14073 @cindex Eudora
14074 Eudora produces broken @code{References} headers, but OK
14075 @code{In-Reply-To} headers.  This function will get rid of the
14076 @code{References} headers.
14077
14078 @end table
14079
14080 @item nnmail-prepare-incoming-message-hook
14081 @vindex nnmail-prepare-incoming-message-hook
14082 This hook is called narrowed to each message.  Functions to be used
14083 include:
14084
14085 @table @code
14086 @item article-de-quoted-unreadable
14087 @findex article-de-quoted-unreadable
14088 Decode Quoted Readable encoding.
14089
14090 @end table
14091 @end table
14092
14093
14094 @node Duplicates
14095 @subsection Duplicates
14096
14097 @vindex nnmail-treat-duplicates
14098 @vindex nnmail-message-id-cache-length
14099 @vindex nnmail-message-id-cache-file
14100 @cindex duplicate mails
14101 If you are a member of a couple of mailing lists, you will sometimes
14102 receive two copies of the same mail.  This can be quite annoying, so
14103 @code{nnmail} checks for and treats any duplicates it might find.  To do
14104 this, it keeps a cache of old @code{Message-ID}s---
14105 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14106 default.  The approximate maximum number of @code{Message-ID}s stored
14107 there is controlled by the @code{nnmail-message-id-cache-length}
14108 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14109 stored.) If all this sounds scary to you, you can set
14110 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14111 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14112 will insert a warning into the head of the mail saying that it thinks
14113 that this is a duplicate of a different message.
14114
14115 This variable can also be a function.  If that's the case, the function
14116 will be called from a buffer narrowed to the message in question with
14117 the @code{Message-ID} as a parameter.  The function must return either
14118 @code{nil}, @code{warn}, or @code{delete}.
14119
14120 You can turn this feature off completely by setting the variable to
14121 @code{nil}.
14122
14123 If you want all the duplicate mails to be put into a special
14124 @dfn{duplicates} group, you could do that using the normal mail split
14125 methods:
14126
14127 @lisp
14128 (setq nnmail-split-fancy
14129       '(| ;; Messages duplicates go to a separate group.
14130           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14131           ;; Message from daemons, postmaster, and the like to another.
14132           (any mail "mail.misc")
14133           ;; Other rules.
14134           [ ... ] ))
14135 @end lisp
14136
14137 Or something like:
14138 @lisp
14139 (setq nnmail-split-methods
14140       '(("duplicates" "^Gnus-Warning:.*duplicate")
14141         ;; Other rules.
14142         [...]))
14143 @end lisp
14144
14145 Here's a neat feature: If you know that the recipient reads her mail
14146 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14147 @code{delete}, you can send her as many insults as you like, just by
14148 using a @code{Message-ID} of a mail that you know that she's already
14149 received.  Think of all the fun!  She'll never see any of it!  Whee!
14150
14151
14152 @node Not Reading Mail
14153 @subsection Not Reading Mail
14154
14155 If you start using any of the mail back ends, they have the annoying
14156 habit of assuming that you want to read mail with them.  This might not
14157 be unreasonable, but it might not be what you want.
14158
14159 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14160 @code{nil}, none of the back ends will ever attempt to read incoming
14161 mail, which should help.
14162
14163 @vindex nnbabyl-get-new-mail
14164 @vindex nnmbox-get-new-mail
14165 @vindex nnml-get-new-mail
14166 @vindex nnmh-get-new-mail
14167 @vindex nnfolder-get-new-mail
14168 This might be too much, if, for instance, you are reading mail quite
14169 happily with @code{nnml} and just want to peek at some old @sc{rmail}
14170 file you have stashed away with @code{nnbabyl}.  All back ends have
14171 variables called back-end-@code{get-new-mail}.  If you want to disable
14172 the @code{nnbabyl} mail reading, you edit the virtual server for the
14173 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14174
14175 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14176 narrowed to the article to be saved before saving it when reading
14177 incoming mail.
14178
14179
14180 @node Choosing a Mail Back End
14181 @subsection Choosing a Mail Back End
14182
14183 Gnus will read the mail spool when you activate a mail group.  The mail
14184 file is first copied to your home directory.  What happens after that
14185 depends on what format you want to store your mail in.
14186
14187 There are six different mail back ends in the standard Gnus, and more
14188 back ends are available separately.  The mail back end most people use
14189 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14190 Spool}).  You might notice that only five back ends are listed below;
14191 @code{nnmaildir}'s documentation has not yet been completely
14192 incorporated into this manual.  Until it is, you can find it at
14193 @uref{http://multivac.cwru.edu./nnmaildir/}.
14194
14195 @menu
14196 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14197 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
14198 * Mail Spool::                  Store your mail in a private spool?
14199 * MH Spool::                    An mhspool-like back end.
14200 * Mail Folders::                Having one file for each group.
14201 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14202 @end menu
14203
14204
14205 @node Unix Mail Box
14206 @subsubsection Unix Mail Box
14207 @cindex nnmbox
14208 @cindex unix mail box
14209
14210 @vindex nnmbox-active-file
14211 @vindex nnmbox-mbox-file
14212 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14213 mail.  @code{nnmbox} will add extra headers to each mail article to say
14214 which group it belongs in.
14215
14216 Virtual server settings:
14217
14218 @table @code
14219 @item nnmbox-mbox-file
14220 @vindex nnmbox-mbox-file
14221 The name of the mail box in the user's home directory.  Default is
14222 @file{~/mbox}.
14223
14224 @item nnmbox-active-file
14225 @vindex nnmbox-active-file
14226 The name of the active file for the mail box.  Default is
14227 @file{~/.mbox-active}.
14228
14229 @item nnmbox-get-new-mail
14230 @vindex nnmbox-get-new-mail
14231 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14232 into groups.  Default is @code{t}.
14233 @end table
14234
14235
14236 @node Rmail Babyl
14237 @subsubsection Rmail Babyl
14238 @cindex nnbabyl
14239 @cindex rmail mbox
14240
14241 @vindex nnbabyl-active-file
14242 @vindex nnbabyl-mbox-file
14243 The @dfn{nnbabyl} back end will use a babyl mail box (aka. @dfn{rmail
14244 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14245 mail article to say which group it belongs in.
14246
14247 Virtual server settings:
14248
14249 @table @code
14250 @item nnbabyl-mbox-file
14251 @vindex nnbabyl-mbox-file
14252 The name of the rmail mbox file.  The default is @file{~/RMAIL}
14253
14254 @item nnbabyl-active-file
14255 @vindex nnbabyl-active-file
14256 The name of the active file for the rmail box.  The default is
14257 @file{~/.rmail-active}
14258
14259 @item nnbabyl-get-new-mail
14260 @vindex nnbabyl-get-new-mail
14261 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14262 @code{t}
14263 @end table
14264
14265
14266 @node Mail Spool
14267 @subsubsection Mail Spool
14268 @cindex nnml
14269 @cindex mail @sc{nov} spool
14270
14271 The @dfn{nnml} spool mail format isn't compatible with any other known
14272 format.  It should be used with some caution.
14273
14274 @vindex nnml-directory
14275 If you use this back end, Gnus will split all incoming mail into files,
14276 one file for each mail, and put the articles into the corresponding
14277 directories under the directory specified by the @code{nnml-directory}
14278 variable.  The default value is @file{~/Mail/}.
14279
14280 You do not have to create any directories beforehand; Gnus will take
14281 care of all that.
14282
14283 If you have a strict limit as to how many files you are allowed to store
14284 in your account, you should not use this back end.  As each mail gets its
14285 own file, you might very well occupy thousands of inodes within a few
14286 weeks.  If this is no problem for you, and it isn't a problem for you
14287 having your friendly systems administrator walking around, madly,
14288 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14289 know that this is probably the fastest format to use.  You do not have
14290 to trudge through a big mbox file just to read your new mail.
14291
14292 @code{nnml} is probably the slowest back end when it comes to article
14293 splitting.  It has to create lots of files, and it also generates
14294 @sc{nov} databases for the incoming mails.  This makes it possibly the
14295 fastest back end when it comes to reading mail.
14296
14297 @cindex self contained nnml servers
14298 @cindex marks
14299 When the marks file is used (which it is by default), @code{nnml}
14300 servers have the property that you may backup them using @code{tar} or
14301 similar, and later be able to restore them into Gnus (by adding the
14302 proper @code{nnml} server) and have all your marks be preserved.  Marks
14303 for a group is usually stored in the @code{.marks} file (but see
14304 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14305 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14306 to restore the group (after restoring the backup into the nnml
14307 directory).
14308
14309 If for some reason you believe your @file{.marks} files are screwed
14310 up, you can just delete them all.  Gnus will then correctly regenerate
14311 them next time it starts.
14312
14313 Virtual server settings:
14314
14315 @table @code
14316 @item nnml-directory
14317 @vindex nnml-directory
14318 All @code{nnml} directories will be placed under this directory.
14319 The default is the value of `message-directory' (whose default value is
14320 @file{~/Mail}).
14321
14322 @item nnml-active-file
14323 @vindex nnml-active-file
14324 The active file for the @code{nnml} server.  The default is
14325 @file{~/Mail/active"}.
14326
14327 @item nnml-newsgroups-file
14328 @vindex nnml-newsgroups-file
14329 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14330 Format}.  The default is @file{~/Mail/newsgroups"}.
14331
14332 @item nnml-get-new-mail
14333 @vindex nnml-get-new-mail
14334 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14335 @code{t}.
14336
14337 @item nnml-nov-is-evil
14338 @vindex nnml-nov-is-evil
14339 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14340 default is @code{nil}.
14341
14342 @item nnml-nov-file-name
14343 @vindex nnml-nov-file-name
14344 The name of the @sc{nov} files.  The default is @file{.overview}.
14345
14346 @item nnml-prepare-save-mail-hook
14347 @vindex nnml-prepare-save-mail-hook
14348 Hook run narrowed to an article before saving.
14349
14350 @item nnml-marks-is-evil
14351 @vindex nnml-marks-is-evil
14352 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14353 default is @code{nil}.
14354
14355 @item nnml-marks-file-name
14356 @vindex nnml-marks-file-name
14357 The name of the @dfn{marks} files.  The default is @file{.marks}.
14358
14359 @item nnml-use-compressed-files
14360 @vindex nnml-use-compressed-files
14361 If non-@code{nil}, @code{nnml} will allow using compressed message
14362 files.
14363
14364 @end table
14365
14366 @findex nnml-generate-nov-databases
14367 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
14368 you can do a complete update by typing @kbd{M-x
14369 nnml-generate-nov-databases}.  This command will trawl through the
14370 entire @code{nnml} hierarchy, looking at each and every article, so it
14371 might take a while to complete.  A better interface to this
14372 functionality can be found in the server buffer (@pxref{Server
14373 Commands}).
14374
14375
14376 @node MH Spool
14377 @subsubsection MH Spool
14378 @cindex nnmh
14379 @cindex mh-e mail spool
14380
14381 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14382 @sc{nov} databases and it doesn't keep an active file or marks file.
14383 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14384 but it also makes it easier to write procmail scripts for.
14385
14386 Virtual server settings:
14387
14388 @table @code
14389 @item nnmh-directory
14390 @vindex nnmh-directory
14391 All @code{nnmh} directories will be located under this directory.  The
14392 default is the value of @code{message-directory} (whose default is
14393 @file{~/Mail})
14394
14395 @item nnmh-get-new-mail
14396 @vindex nnmh-get-new-mail
14397 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14398 @code{t}.
14399
14400 @item nnmh-be-safe
14401 @vindex nnmh-be-safe
14402 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14403 sure that the articles in the folder are actually what Gnus thinks they
14404 are.  It will check date stamps and stat everything in sight, so
14405 setting this to @code{t} will mean a serious slow-down.  If you never
14406 use anything but Gnus to read the @code{nnmh} articles, you do not have
14407 to set this variable to @code{t}.  The default is @code{nil}.
14408 @end table
14409
14410
14411 @node Mail Folders
14412 @subsubsection Mail Folders
14413 @cindex nnfolder
14414 @cindex mbox folders
14415 @cindex mail folders
14416
14417 @code{nnfolder} is a back end for storing each mail group in a separate
14418 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
14419 will add extra headers to keep track of article numbers and arrival
14420 dates.
14421
14422 @cindex self contained nnfolder servers
14423 @cindex marks
14424 When the marks file is used (which it is by default), @code{nnfolder}
14425 servers have the property that you may backup them using @code{tar} or
14426 similar, and later be able to restore them into Gnus (by adding the
14427 proper @code{nnfolder} server) and have all your marks be preserved.
14428 Marks for a group is usually stored in a file named as the mbox file
14429 with @code{.mrk} concatenated to it (but see
14430 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
14431 Individual @code{nnfolder} groups are also possible to backup, use
14432 @kbd{G m} to restore the group (after restoring the backup into the
14433 @code{nnfolder} directory).
14434
14435 Virtual server settings:
14436
14437 @table @code
14438 @item nnfolder-directory
14439 @vindex nnfolder-directory
14440 All the @code{nnfolder} mail boxes will be stored under this directory.
14441 The default is the value of @code{message-directory} (whose default is
14442 @file{~/Mail})
14443
14444 @item nnfolder-active-file
14445 @vindex nnfolder-active-file
14446 The name of the active file.  The default is @file{~/Mail/active}.
14447
14448 @item nnfolder-newsgroups-file
14449 @vindex nnfolder-newsgroups-file
14450 The name of the group descriptions file.  @xref{Newsgroups File
14451 Format}.  The default is @file{~/Mail/newsgroups"}
14452
14453 @item nnfolder-get-new-mail
14454 @vindex nnfolder-get-new-mail
14455 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
14456 is @code{t}
14457
14458 @item nnfolder-save-buffer-hook
14459 @vindex nnfolder-save-buffer-hook
14460 @cindex backup files
14461 Hook run before saving the folders.  Note that Emacs does the normal
14462 backup renaming of files even with the @code{nnfolder} buffers.  If you
14463 wish to switch this off, you could say something like the following in
14464 your @file{.emacs} file:
14465
14466 @lisp
14467 (defun turn-off-backup ()
14468   (set (make-local-variable 'backup-inhibited) t))
14469
14470 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
14471 @end lisp
14472
14473 @item nnfolder-delete-mail-hook
14474 @vindex nnfolder-delete-mail-hook
14475 Hook run in a buffer narrowed to the message that is to be deleted.
14476 This function can be used to copy the message to somewhere else, or to
14477 extract some information from it before removing it.
14478
14479 @item nnfolder-nov-is-evil
14480 @vindex nnfolder-nov-is-evil
14481 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14482 default is @code{nil}.
14483
14484 @item nnfolder-nov-file-suffix
14485 @vindex nnfolder-nov-file-suffix
14486 The extension for @sc{nov} files.  The default is @file{.nov}.
14487
14488 @item nnfolder-nov-directory
14489 @vindex nnfolder-nov-directory
14490 The directory where the @sc{nov} files should be stored.  If nil,
14491 @code{nnfolder-directory} is used.
14492
14493 @item nnfolder-marks-is-evil
14494 @vindex nnfolder-marks-is-evil
14495 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14496 default is @code{nil}.
14497
14498 @item nnfolder-marks-file-suffix
14499 @vindex nnfolder-marks-file-suffix
14500 The extension for @sc{marks} files.  The default is @file{.mrk}.
14501
14502 @item nnfolder-marks-directory
14503 @vindex nnfolder-marks-directory
14504 The directory where the @sc{marks} files should be stored.  If nil,
14505 @code{nnfolder-directory} is used.
14506
14507 @end table
14508
14509
14510 @findex nnfolder-generate-active-file
14511 @kindex M-x nnfolder-generate-active-file
14512 If you have lots of @code{nnfolder}-like files you'd like to read with
14513 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
14514 command to make @code{nnfolder} aware of all likely files in
14515 @code{nnfolder-directory}.  This only works if you use long file names,
14516 though.
14517
14518 @node Comparing Mail Back Ends
14519 @subsubsection Comparing Mail Back Ends
14520
14521 First, just for terminology, the @dfn{back end} is the common word for a
14522 low-level access method---a transport, if you will, by which something
14523 is acquired.  The sense is that one's mail has to come from somewhere,
14524 and so selection of a suitable back end is required in order to get that
14525 mail within spitting distance of Gnus.
14526
14527 The same concept exists for Usenet itself: Though access to articles is
14528 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
14529 in the world got at Usenet by running a reader on the machine where the
14530 articles lay (the machine which today we call an @sc{nntp} server), and
14531 access was by the reader stepping into the articles' directory spool
14532 area directly.  One can still select between either the @code{nntp} or
14533 @code{nnspool} back ends, to select between these methods, if one happens
14534 actually to live on the server (or can see its spool directly, anyway,
14535 via NFS).
14536
14537 The goal in selecting a mail back end is to pick one which
14538 simultaneously represents a suitable way of dealing with the original
14539 format plus leaving mail in a form that is convenient to use in the
14540 future.  Here are some high and low points on each:
14541
14542 @table @code
14543 @item nnmbox
14544
14545 UNIX systems have historically had a single, very common, and well-
14546 defined format.  All messages arrive in a single @dfn{spool file}, and
14547 they are delineated by a line whose regular expression matches
14548 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
14549 to make it clear in this instance that this is not the RFC-specified
14550 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
14551 historically from the Unix environment, it is simplest if one does not
14552 mess a great deal with the original mailbox format, so if one chooses
14553 this back end, Gnus' primary activity in getting mail from the real spool
14554 area to Gnus' preferred directory is simply to copy it, with no
14555 (appreciable) format change in the process.  It is the ``dumbest'' way
14556 to move mail into availability in the Gnus environment.  This makes it
14557 fast to move into place, but slow to parse, when Gnus has to look at
14558 what's where.
14559
14560 @item nnbabyl
14561
14562 Once upon a time, there was the DEC-10 and DEC-20, running operating
14563 systems called TOPS and related things, and the usual (only?) mail
14564 reading environment was a thing called Babyl.  I don't know what format
14565 was used for mail landing on the system, but Babyl had its own internal
14566 format to which mail was converted, primarily involving creating a
14567 spool-file-like entity with a scheme for inserting Babyl-specific
14568 headers and status bits above the top of each message in the file.
14569 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
14570 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
14571 to understand the mail files folks already had in existence.  Gnus (and
14572 VM, for that matter) continue to support this format because it's
14573 perceived as having some good qualities in those mailer-specific
14574 headers/status bits stuff.  RMAIL itself still exists as well, of
14575 course, and is still maintained by Stallman.
14576
14577 Both of the above forms leave your mail in a single file on your
14578 file system, and they must parse that entire file each time you take a
14579 look at your mail.
14580
14581 @item nnml
14582
14583 @code{nnml} is the back end which smells the most as though you were
14584 actually operating with an @code{nnspool}-accessed Usenet system.  (In
14585 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
14586 lo these years ago.)  One's mail is taken from the original spool file,
14587 and is then cut up into individual message files, 1:1.  It maintains a
14588 Usenet-style active file (analogous to what one finds in an INN- or
14589 CNews-based news system in (for instance) @file{/var/lib/news/active},
14590 or what is returned via the @samp{NNTP LIST} verb) and also creates
14591 @dfn{overview} files for efficient group entry, as has been defined for
14592 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
14593 due to the creation of lots of files, updates to the @code{nnml} active
14594 file, and additions to overview files on a per-message basis, but it is
14595 extremely fast on access because of what amounts to the indexing support
14596 provided by the active file and overviews.
14597
14598 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
14599 resource which defines available places in the file system to put new
14600 files.  Sysadmins take a dim view of heavy inode occupation within
14601 tight, shared file systems.  But if you live on a personal machine where
14602 the file system is your own and space is not at a premium, @code{nnml}
14603 wins big.
14604
14605 It is also problematic using this back end if you are living in a
14606 FAT16-based Windows world, since much space will be wasted on all these
14607 tiny files.
14608
14609 @item nnmh
14610
14611 The Rand MH mail-reading system has been around UNIX systems for a very
14612 long time; it operates by splitting one's spool file of messages into
14613 individual files, but with little or no indexing support -- @code{nnmh}
14614 is considered to be semantically equivalent to ``@code{nnml} without
14615 active file or overviews''.  This is arguably the worst choice, because
14616 one gets the slowness of individual file creation married to the
14617 slowness of access parsing when learning what's new in one's groups.
14618
14619 @item nnfolder
14620
14621 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
14622 method described above) on a per-group basis.  That is, @code{nnmbox}
14623 itself puts *all* one's mail in one file; @code{nnfolder} provides a
14624 little bit of optimization to this so that each of one's mail groups has
14625 a Unix mail box file.  It's faster than @code{nnmbox} because each group
14626 can be parsed separately, and still provides the simple Unix mail box
14627 format requiring minimal effort in moving the mail around.  In addition,
14628 it maintains an ``active'' file making it much faster for Gnus to figure
14629 out how many messages there are in each separate group.
14630
14631 If you have groups that are expected to have a massive amount of
14632 messages, @code{nnfolder} is not the best choice, but if you receive
14633 only a moderate amount of mail, @code{nnfolder} is probably the most
14634 friendly mail back end all over.
14635
14636 @item nnmaildir
14637
14638 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
14639 differences.  Each message is stored in a separate file, but the
14640 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
14641 also stores the equivalent of @code{nnml}'s overview files in one file
14642 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
14643 @code{df -i} to see how plentiful your inode supply is.)  If this slows
14644 you down or takes up very much space, consider switching to ReiserFS
14645 (@uref{http://www.namesys.com/}) or another non-block-structured
14646 file system.
14647
14648 Since maildirs don't require locking for delivery, the maildirs you use
14649 as groups can also be the maildirs your mail is directly delivered to.
14650 This means you can skip Gnus's mail splitting if your mail is already
14651 organized into different mailboxes during delivery.  A @code{directory}
14652 entry in @code{mail-sources} would have a similar effect, but would
14653 require one set of mailboxes for spooling deliveries (in mbox format,
14654 thus damaging message bodies), and another set to be used as groups (in
14655 whatever format you like).  A maildir has a built-in spool, in the
14656 @code{new/} subdirectory.  Beware that currently, mail moved from
14657 @code{new/} to @code{cur/} instead of via mail splitting will undergo
14658 treatment such as duplicate checking.
14659
14660 An article will not necessarily keep the same number across Gnus
14661 sessions; articles are renumbered starting from 1 for each Gnus session
14662 (more precisely, each time you open the @code{nnmaildir} server).  This
14663 way, you don't get gaps in your article number ranges, and when entering
14664 large groups, Gnus is likely to give a more accurate article count.  The
14665 price is that @code{nnmaildir} doesn't work with the cache or agent.
14666 This will probably be changed in the future.
14667
14668 @code{nnmaildir} stores article marks for a given group in the
14669 corresponding maildir, in a way designed so that it's easy to manipulate
14670 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
14671 else, and still have your marks.  @code{nnml} also stores marks, but
14672 it's not as easy to work with them from outside Gnus as with
14673 @code{nnmaildir}.
14674
14675 For configuring expiry and other things, @code{nnmaildir} uses group
14676 parameters slightly different from those of other mail back ends.
14677
14678 @code{nnmaildir} uses a significant amount of memory to speed things up.
14679 (It keeps in memory some of the things that @code{nnml} stores in files
14680 and that @code{nnmh} repeatedly parses out of message files.)  If this
14681 is a problem for you, you can set the @code{nov-cache-size} group
14682 parameter to something small (0 would probably not work, but 1 probably
14683 would) to make it use less memory.
14684
14685 Startup and shutdown are likely to be slower with @code{nnmaildir} than
14686 with other back ends.  Everything in between is likely to be faster,
14687 depending in part on your file system.
14688
14689 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
14690 to write an @code{nnmaildir}-derived back end.
14691
14692 @end table
14693
14694
14695 @node Browsing the Web
14696 @section Browsing the Web
14697 @cindex web
14698 @cindex browsing the web
14699 @cindex www
14700 @cindex http
14701
14702 Web-based discussion forums are getting more and more popular.  On many
14703 subjects, the web-based forums have become the most important forums,
14704 eclipsing the importance of mailing lists and news groups.  The reason
14705 is easy to understand---they are friendly to new users; you just point
14706 and click, and there's the discussion.  With mailing lists, you have to
14707 go through a cumbersome subscription procedure, and most people don't
14708 even know what a news group is.
14709
14710 The problem with this scenario is that web browsers are not very good at
14711 being newsreaders.  They do not keep track of what articles you've read;
14712 they do not allow you to score on subjects you're interested in; they do
14713 not allow off-line browsing; they require you to click around and drive
14714 you mad in the end.
14715
14716 So---if web browsers suck at reading discussion forums, why not use Gnus
14717 to do it instead?
14718
14719 Gnus has been getting a bit of a collection of back ends for providing
14720 interfaces to these sources.
14721
14722 @menu
14723 * Archiving Mail::              
14724 * Web Searches::                Creating groups from articles that match a string.
14725 * Slashdot::                    Reading the Slashdot comments.
14726 * Ultimate::                    The Ultimate Bulletin Board systems.
14727 * Web Archive::                 Reading mailing list archived on web.
14728 * RSS::                         Reading RDF site summary.
14729 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
14730 @end menu
14731
14732 All the web sources require Emacs/w3 and the url library to work.
14733
14734 The main caveat with all these web sources is that they probably won't
14735 work for a very long time.  Gleaning information from the @sc{html} data
14736 is guesswork at best, and when the layout is altered, the Gnus back end
14737 will fail.  If you have reasonably new versions of these back ends,
14738 though, you should be ok.
14739
14740 One thing all these Web methods have in common is that the Web sources
14741 are often down, unavailable or just plain too slow to be fun.  In those
14742 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
14743 Unplugged}) handle downloading articles, and then you can read them at
14744 leisure from your local disk.  No more World Wide Wait for you.
14745
14746 @node Archiving Mail
14747 @subsection Archiving Mail
14748 @cindex archiving mail
14749 @cindex backup of mail
14750
14751 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
14752 @code{nnmaildir}, now actually store the article marks with each group.
14753 For these servers, archiving and restoring a group while preserving
14754 marks is fairly simple.
14755
14756 (Preserving the group level and group parameters as well still
14757 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
14758 though.)
14759
14760 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
14761 server, take a recursive copy of the server directory.  There is no need
14762 to shut down Gnus, so archiving may be invoked by @code{cron} or
14763 similar.  You restore the data by restoring the directory tree, and
14764 adding a server definition pointing to that directory in Gnus. The
14765 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
14766 might interfere with overwriting data, so you may want to shut down Gnus
14767 before you restore the data.
14768
14769 It is also possible to archive individual @code{nnml},
14770 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
14771 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
14772 directory.  For @code{nnfolder} you need to copy both the base folder
14773 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
14774 this example). Restoring the group is done with @kbd{G m} from the Group
14775 buffer.  The last step makes Gnus notice the new directory.
14776 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
14777 is unnecessary in that case.
14778
14779 @node Web Searches
14780 @subsection Web Searches
14781 @cindex nnweb
14782 @cindex Google
14783 @cindex dejanews
14784 @cindex gmane
14785 @cindex Usenet searches
14786 @cindex searching the Usenet
14787
14788 It's, like, too neat to search the Usenet for articles that match a
14789 string, but it, like, totally @emph{sucks}, like, totally, to use one of
14790 those, like, Web browsers, and you, like, have to, rilly, like, look at
14791 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
14792 searches without having to use a browser.
14793
14794 The @code{nnweb} back end allows an easy interface to the mighty search
14795 engine.  You create an @code{nnweb} group, enter a search pattern, and
14796 then enter the group and read the articles like you would any normal
14797 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
14798 Groups}) will do this in an easy-to-use fashion.
14799
14800 @code{nnweb} groups don't really lend themselves to being solid
14801 groups---they have a very fleeting idea of article numbers.  In fact,
14802 each time you enter an @code{nnweb} group (not even changing the search
14803 pattern), you are likely to get the articles ordered in a different
14804 manner.  Not even using duplicate suppression (@pxref{Duplicate
14805 Suppression}) will help, since @code{nnweb} doesn't even know the
14806 @code{Message-ID} of the articles before reading them using some search
14807 engines (Google, for instance).  The only possible way to keep track
14808 of which articles you've read is by scoring on the @code{Date}
14809 header---mark all articles posted before the last date you read the
14810 group as read.
14811
14812 If the search engine changes its output substantially, @code{nnweb}
14813 won't be able to parse it and will fail.  One could hardly fault the Web
14814 providers if they were to do this---their @emph{raison d'être} is to
14815 make money off of advertisements, not to provide services to the
14816 community.  Since @code{nnweb} washes the ads off all the articles, one
14817 might think that the providers might be somewhat miffed.  We'll see.
14818
14819 You must have the @code{url} and @code{w3} package installed to be able
14820 to use @code{nnweb}.
14821
14822 Virtual server variables:
14823
14824 @table @code
14825 @item nnweb-type
14826 @vindex nnweb-type
14827 What search engine type is being used.  The currently supported types
14828 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
14829 @code{dejanews} is an alias to @code{google}.
14830
14831 @item nnweb-search
14832 @vindex nnweb-search
14833 The search string to feed to the search engine.
14834
14835 @item nnweb-max-hits
14836 @vindex nnweb-max-hits
14837 Advisory maximum number of hits per search to display.  The default is
14838 999.
14839
14840 @item nnweb-type-definition
14841 @vindex nnweb-type-definition
14842 Type-to-definition alist.  This alist says what @code{nnweb} should do
14843 with the various search engine types.  The following elements must be
14844 present:
14845
14846 @table @code
14847 @item article
14848 Function to decode the article and provide something that Gnus
14849 understands.
14850
14851 @item map
14852 Function to create an article number to message header and URL alist.
14853
14854 @item search
14855 Function to send the search string to the search engine.
14856
14857 @item address
14858 The address the aforementioned function should send the search string
14859 to.
14860
14861 @item id
14862 Format string URL to fetch an article by @code{Message-ID}.
14863 @end table
14864
14865 @end table
14866
14867
14868 @node Slashdot
14869 @subsection Slashdot
14870 @cindex Slashdot
14871 @cindex nnslashdot
14872
14873 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
14874 lively discussion following the news articles.  @code{nnslashdot} will
14875 let you read this forum in a convenient manner.
14876
14877 The easiest way to read this source is to put something like the
14878 following in your @file{.gnus.el} file:
14879
14880 @lisp
14881 (setq gnus-secondary-select-methods
14882       '((nnslashdot "")))
14883 @end lisp
14884
14885 This will make Gnus query the @code{nnslashdot} back end for new comments
14886 and groups.  The @kbd{F} command will subscribe each new news article as
14887 a new Gnus group, and you can read the comments by entering these
14888 groups.  (Note that the default subscription method is to subscribe new
14889 groups as zombies.  Other methods are available (@pxref{Subscription
14890 Methods}).
14891
14892 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
14893 command is the most handy tool (@pxref{Foreign Groups}).
14894
14895 When following up to @code{nnslashdot} comments (or posting new
14896 comments), some light @sc{html}izations will be performed.  In
14897 particular, text quoted with @samp{> } will be quoted with
14898 @code{blockquote} instead, and signatures will have @code{br} added to
14899 the end of each line.  Other than that, you can just write @sc{html}
14900 directly into the message buffer.  Note that Slashdot filters out some
14901 @sc{html} forms.
14902
14903 The following variables can be altered to change its behavior:
14904
14905 @table @code
14906 @item nnslashdot-threaded
14907 Whether @code{nnslashdot} should display threaded groups or not.  The
14908 default is @code{t}.  To be able to display threads, @code{nnslashdot}
14909 has to retrieve absolutely all comments in a group upon entry.  If a
14910 threaded display is not required, @code{nnslashdot} will only retrieve
14911 the comments that are actually wanted by the user.  Threading is nicer,
14912 but much, much slower than unthreaded.
14913
14914 @item nnslashdot-login-name
14915 @vindex nnslashdot-login-name
14916 The login name to use when posting.
14917
14918 @item nnslashdot-password
14919 @vindex nnslashdot-password
14920 The password to use when posting.
14921
14922 @item nnslashdot-directory
14923 @vindex nnslashdot-directory
14924 Where @code{nnslashdot} will store its files.  The default is
14925 @samp{~/News/slashdot/}.
14926
14927 @item nnslashdot-active-url
14928 @vindex nnslashdot-active-url
14929 The @sc{url} format string that will be used to fetch the information on
14930 news articles and comments.  The default is
14931 @samp{http://slashdot.org/search.pl?section=&min=%d}.
14932
14933 @item nnslashdot-comments-url
14934 @vindex nnslashdot-comments-url
14935 The @sc{url} format string that will be used to fetch comments.  The
14936 default is
14937 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
14938
14939 @item nnslashdot-article-url
14940 @vindex nnslashdot-article-url
14941 The @sc{url} format string that will be used to fetch the news article.  The
14942 default is
14943 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
14944
14945 @item nnslashdot-threshold
14946 @vindex nnslashdot-threshold
14947 The score threshold.  The default is -1.
14948
14949 @item nnslashdot-group-number
14950 @vindex nnslashdot-group-number
14951 The number of old groups, in addition to the ten latest, to keep
14952 updated.  The default is 0.
14953
14954 @end table
14955
14956
14957
14958 @node Ultimate
14959 @subsection Ultimate
14960 @cindex nnultimate
14961 @cindex Ultimate Bulletin Board
14962
14963 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
14964 probably the most popular Web bulletin board system used.  It has a
14965 quite regular and nice interface, and it's possible to get the
14966 information Gnus needs to keep groups updated.
14967
14968 The easiest way to get started with @code{nnultimate} is to say
14969 something like the following in the group buffer:  @kbd{B nnultimate RET
14970 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
14971 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
14972 you're interested in; there's quite a list of them on the Ultimate web
14973 site.)  Then subscribe to the groups you're interested in from the
14974 server buffer, and read them from the group buffer.
14975
14976 The following @code{nnultimate} variables can be altered:
14977
14978 @table @code
14979 @item nnultimate-directory
14980 @vindex nnultimate-directory
14981 The directory where @code{nnultimate} stores its files.  The default is
14982 @samp{~/News/ultimate/}.
14983 @end table
14984
14985
14986 @node Web Archive
14987 @subsection Web Archive
14988 @cindex nnwarchive
14989 @cindex Web Archive
14990
14991 Some mailing lists only have archives on Web servers, such as
14992 @uref{http://www.egroups.com/} and
14993 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
14994 interface, and it's possible to get the information Gnus needs to keep
14995 groups updated.
14996
14997 The easiest way to get started with @code{nnwarchive} is to say
14998 something like the following in the group buffer: @kbd{M-x
14999 gnus-group-make-warchive-group RET an_egroup RET egroups RET
15000 www.egroups.com RET your@@email.address RET}.  (Substitute the
15001 @sc{an_egroup} with the mailing list you subscribed, the
15002 @sc{your@@email.address} with your email address.), or to browse the
15003 back end by @kbd{B nnwarchive RET mail-archive RET}.
15004
15005 The following @code{nnwarchive} variables can be altered:
15006
15007 @table @code
15008 @item nnwarchive-directory
15009 @vindex nnwarchive-directory
15010 The directory where @code{nnwarchive} stores its files.  The default is
15011 @samp{~/News/warchive/}.
15012
15013 @item nnwarchive-login
15014 @vindex nnwarchive-login
15015 The account name on the web server.
15016
15017 @item nnwarchive-passwd
15018 @vindex nnwarchive-passwd
15019 The password for your account on the web server.
15020 @end table
15021
15022 @node RSS
15023 @subsection RSS
15024 @cindex nnrss
15025 @cindex RSS
15026
15027 Some sites have RDF site summary (RSS)
15028 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15029 interface, and it's possible to get the information Gnus needs to keep
15030 groups updated.
15031
15032 The easiest way to get started with @code{nnrss} is to say something
15033 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15034 subscribe groups.
15035
15036 The following @code{nnrss} variables can be altered:
15037
15038 @table @code
15039 @item nnrss-directory
15040 @vindex nnrss-directory
15041 The directory where @code{nnrss} stores its files.  The default is
15042 @samp{~/News/rss/}.
15043
15044 @end table
15045
15046 The following code may be helpful, if you want to show the description in
15047 the summary buffer.
15048
15049 @lisp
15050 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15051 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15052
15053 (defun gnus-user-format-function-X (header)
15054   (let ((descr
15055          (assq nnrss-description-field (mail-header-extra header))))
15056     (if descr (concat "\n\t" (cdr descr)) "")))
15057 @end lisp
15058
15059 The following code may be useful to open an nnrss url directly from the
15060 summary buffer.
15061 @lisp
15062 (require 'browse-url)
15063
15064 (defun browse-nnrss-url( arg )
15065   (interactive "p")
15066   (let ((url (assq nnrss-url-field
15067                    (mail-header-extra
15068                     (gnus-data-header
15069                      (assq (gnus-summary-article-number)
15070                            gnus-newsgroup-data))))))
15071     (if url
15072         (progn
15073           (browse-url (cdr url))
15074           (gnus-summary-mark-as-read-forward 1))
15075       (gnus-summary-scroll-up arg))))
15076
15077 (eval-after-load "gnus"
15078   #'(define-key gnus-summary-mode-map
15079       (kbd "<RET>") 'browse-nnrss-url))
15080 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15081 @end lisp
15082
15083 @node Customizing w3
15084 @subsection Customizing w3
15085 @cindex w3
15086 @cindex html
15087 @cindex url
15088 @cindex Netscape
15089
15090 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15091 pages.  Emacs/w3 is documented in its own manual, but there are some
15092 things that may be more relevant for Gnus users.
15093
15094 For instance, a common question is how to make Emacs/w3 follow links
15095 using the @code{browse-url} functions (which will call some external web
15096 browser like Netscape).  Here's one way:
15097
15098 @lisp
15099 (eval-after-load "w3"
15100   '(progn
15101     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15102     (defun w3-fetch (&optional url target)
15103       (interactive (list (w3-read-url-with-default)))
15104       (if (eq major-mode 'gnus-article-mode)
15105           (browse-url url)
15106         (w3-fetch-orig url target)))))
15107 @end lisp
15108
15109 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15110 @sc{html} in the Gnus article buffers will use @code{browse-url} to
15111 follow the link.
15112
15113
15114 @node IMAP
15115 @section IMAP
15116 @cindex nnimap
15117 @cindex @sc{imap}
15118
15119 @sc{imap} is a network protocol for reading mail (or news, or ...),
15120 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
15121 server is much similar to connecting to a news server, you just
15122 specify the network address of the server.
15123
15124 @sc{imap} has two properties.  First, @sc{imap} can do everything that
15125 POP can, it can hence be viewed as a POP++.  Secondly, @sc{imap} is a
15126 mail storage protocol, similar to @sc{nntp} being a news storage
15127 protocol -- however, @sc{imap} offers more features than @sc{nntp}
15128 because news is more or less read-only whereas mail is read-write.
15129
15130 If you want to use @sc{imap} as a POP++, use an imap entry in
15131 @code{mail-sources}.  With this, Gnus will fetch mails from the
15132 @sc{imap} server and store them on the local disk.  This is not the
15133 usage described in this section--@xref{Mail Sources}.
15134
15135 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
15136 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15137 manipulate mails stored on the @sc{imap} server.  This is the kind of
15138 usage explained in this section.
15139
15140 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
15141 might look something like the following. (Note that for SSL/TLS, you
15142 need external programs and libraries, see below.)
15143
15144 @lisp
15145 (setq gnus-secondary-select-methods
15146       '((nnimap "simpleserver") ; no special configuration
15147         ; perhaps a ssh port forwarded server:
15148         (nnimap "dolk"
15149                 (nnimap-address "localhost")
15150                 (nnimap-server-port 1430))
15151         ; a UW server running on localhost
15152         (nnimap "barbar"
15153                 (nnimap-server-port 143)
15154                 (nnimap-address "localhost")
15155                 (nnimap-list-pattern ("INBOX" "mail/*")))
15156         ; anonymous public cyrus server:
15157         (nnimap "cyrus.andrew.cmu.edu"
15158                 (nnimap-authenticator anonymous)
15159                 (nnimap-list-pattern "archive.*")
15160                 (nnimap-stream network))
15161         ; a ssl server on a non-standard port:
15162         (nnimap "vic20"
15163                 (nnimap-address "vic20.somewhere.com")
15164                 (nnimap-server-port 9930)
15165                 (nnimap-stream ssl))))
15166 @end lisp
15167
15168 After defining the new server, you can subscribe to groups on the
15169 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15170 (@pxref{Subscription Commands}) or via the Server Buffer
15171 (@pxref{Server Buffer}).
15172
15173 The following variables can be used to create a virtual @code{nnimap}
15174 server:
15175
15176 @table @code
15177
15178 @item nnimap-address
15179 @vindex nnimap-address
15180
15181 The address of the remote @sc{imap} server.  Defaults to the virtual
15182 server name if not specified.
15183
15184 @item nnimap-server-port
15185 @vindex nnimap-server-port
15186 Port on server to contact.  Defaults to port 143, or 993 for SSL.
15187
15188 Note that this should be an integer, example server specification:
15189
15190 @lisp
15191 (nnimap "mail.server.com"
15192         (nnimap-server-port 4711))
15193 @end lisp
15194
15195 @item nnimap-list-pattern
15196 @vindex nnimap-list-pattern
15197 String or list of strings of mailboxes to limit available groups to.
15198 This is used when the server has very many mailboxes and you're only
15199 interested in a few -- some servers export your home directory via
15200 @sc{imap}, you'll probably want to limit the mailboxes to those in
15201 @file{~/Mail/*} then.
15202
15203 The string can also be a cons of REFERENCE and the string as above, what
15204 REFERENCE is used for is server specific, but on the University of
15205 Washington server it's a directory that will be concatenated with the
15206 mailbox.
15207
15208 Example server specification:
15209
15210 @lisp
15211 (nnimap "mail.server.com"
15212         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15213                                ("~friend/Mail/" . "list/*"))))
15214 @end lisp
15215
15216 @item nnimap-stream
15217 @vindex nnimap-stream
15218 The type of stream used to connect to your server.  By default, nnimap
15219 will detect and automatically use all of the below, with the exception
15220 of SSL/TLS. (@sc{imap} over SSL/TLS is being replaced by STARTTLS, which
15221 can be automatically detected, but it's not widely deployed yet.)
15222
15223 Example server specification:
15224
15225 @lisp
15226 (nnimap "mail.server.com"
15227         (nnimap-stream ssl))
15228 @end lisp
15229
15230 Please note that the value of @code{nnimap-stream} is a symbol!
15231
15232 @itemize @bullet
15233 @item
15234 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15235 @samp{imtest} program.
15236 @item
15237 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15238 @item
15239 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15240 SSL).  Requires the external library @samp{starttls.el} and program
15241 @samp{starttls}.
15242 @item
15243 @dfn{ssl:} Connect through SSL.  Requires OpenSSL (the program
15244 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
15245 library @samp{ssl.el}.
15246 @item
15247 @dfn{shell:} Use a shell command to start @sc{imap} connection.
15248 @item
15249 @dfn{network:} Plain, TCP/IP network connection.
15250 @end itemize
15251
15252 @vindex imap-kerberos4-program
15253 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15254 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15255 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15256 to make @code{imap.el} use a pty instead of a pipe when communicating
15257 with @samp{imtest}.  You will then suffer from a line length
15258 restrictions on @sc{imap} commands, which might make Gnus seem to hang
15259 indefinitely if you have many articles in a mailbox.  The variable
15260 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15261 program.
15262
15263 @vindex imap-ssl-program
15264 For SSL connections, the OpenSSL program is available from
15265 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15266 and nnimap support it too - although the most recent versions of
15267 SSLeay, 0.9.x, are known to have serious bugs making it
15268 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15269 work. The variable @code{imap-ssl-program} contain parameters to pass
15270 to OpenSSL/SSLeay.  You also need @samp{ssl.el} (from the W3
15271 distribution, for instance).
15272
15273 @vindex imap-shell-program
15274 @vindex imap-shell-host
15275 For @sc{imap} connections using the @code{shell} stream, the variable
15276 @code{imap-shell-program} specify what program to call.
15277
15278 @item nnimap-authenticator
15279 @vindex nnimap-authenticator
15280
15281 The authenticator used to connect to the server.  By default, nnimap
15282 will use the most secure authenticator your server is capable of.
15283
15284 Example server specification:
15285
15286 @lisp
15287 (nnimap "mail.server.com"
15288         (nnimap-authenticator anonymous))
15289 @end lisp
15290
15291 Please note that the value of @code{nnimap-authenticator} is a symbol!
15292
15293 @itemize @bullet
15294 @item
15295 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15296 external program @code{imtest}.
15297 @item
15298 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15299 @code{imtest}.
15300 @item
15301 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15302 external library @code{digest-md5.el}.
15303 @item
15304 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15305 @item
15306 @dfn{login:} Plain-text username/password via LOGIN.
15307 @item
15308 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15309 @end itemize
15310
15311 @item nnimap-expunge-on-close
15312 @cindex Expunging
15313 @vindex nnimap-expunge-on-close
15314 Unlike Parmenides the @sc{imap} designers has decided that things that
15315 doesn't exist actually does exist.  More specifically, @sc{imap} has
15316 this concept of marking articles @code{Deleted} which doesn't actually
15317 delete them, and this (marking them @code{Deleted}, that is) is what
15318 nnimap does when you delete a article in Gnus (with @kbd{B DEL} or
15319 similar).
15320
15321 Since the articles aren't really removed when we mark them with the
15322 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15323 running in circles yet?
15324
15325 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15326 when closing a mailbox but this is now configurable by this server
15327 variable.
15328
15329 The possible options are:
15330
15331 @table @code
15332
15333 @item always
15334 The default behavior, delete all articles marked as "Deleted" when
15335 closing a mailbox.
15336 @item never
15337 Never actually delete articles.  Currently there is no way of showing
15338 the articles marked for deletion in nnimap, but other @sc{imap} clients
15339 may allow you to do this.  If you ever want to run the EXPUNGE command
15340 manually, @xref{Expunging mailboxes}.
15341 @item ask
15342 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15343 articles or not.
15344
15345 @end table
15346
15347 @item nnimap-importantize-dormant
15348 @vindex nnimap-importantize-dormant
15349
15350 If non-nil (the default), marks dormant articles as ticked (as well),
15351 for other @sc{imap} clients. Within Gnus, dormant articles will
15352 naturally still (only) be marked as dormant.  This is to make dormant
15353 articles stand out, just like ticked articles, in other @sc{imap}
15354 clients. (In other words, Gnus has two ``Tick'' marks and @sc{imap}
15355 has only one.)
15356
15357 Probably the only reason for frobing this would be if you're trying
15358 enable per-user persistant dormant flags, using something like:
15359
15360 @lisp
15361 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15362         (format "gnus-dormant-%s" (user-login-name)))
15363 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
15364         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
15365 @end lisp
15366
15367 In this case, you would not want the per-user dormant flag showing up
15368 as ticked for other users.
15369
15370 @item nnimap-expunge-search-string
15371 @cindex Expunging
15372 @vindex nnimap-expunge-search-string
15373
15374 This variable contain the @sc{imap} search command sent to server when
15375 searching for articles eligible for expiring.  The default is
15376 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
15377 UID set and the second @code{%s} is replaced by a date.
15378
15379 Probably the only useful value to change this to is
15380 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
15381 messages instead of the internal article date. See section 6.4.4 of
15382 RFC 2060 for more information on valid strings.
15383
15384 @item nnimap-authinfo-file
15385 @vindex nnimap-authinfo-file
15386
15387 A file containing credentials used to log in on servers.  The format is
15388 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
15389 variable @code{nntp-authinfo-file} for exact syntax; also see
15390 @ref{NNTP}.
15391
15392 @end table
15393
15394 @menu
15395 * Splitting in IMAP::           Splitting mail with nnimap.
15396 * Expiring in IMAP::            Expiring mail with nnimap.
15397 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
15398 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
15399 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
15400 @end menu
15401
15402
15403
15404 @node Splitting in IMAP
15405 @subsection Splitting in IMAP
15406 @cindex splitting imap mail
15407
15408 Splitting is something Gnus users has loved and used for years, and now
15409 the rest of the world is catching up.  Yeah, dream on, not many
15410 @sc{imap} server has server side splitting and those that have splitting
15411 seem to use some non-standard protocol.  This means that @sc{imap}
15412 support for Gnus has to do it's own splitting.
15413
15414 And it does.
15415
15416 Here are the variables of interest:
15417
15418 @table @code
15419
15420 @item nnimap-split-crosspost
15421 @cindex splitting, crosspost
15422 @cindex crosspost
15423 @vindex nnimap-split-crosspost
15424
15425 If non-nil, do crossposting if several split methods match the mail.  If
15426 nil, the first match in @code{nnimap-split-rule} found will be used.
15427
15428 Nnmail equivalent: @code{nnmail-crosspost}.
15429
15430 @item nnimap-split-inbox
15431 @cindex splitting, inbox
15432 @cindex inbox
15433 @vindex nnimap-split-inbox
15434
15435 A string or a list of strings that gives the name(s) of @sc{imap}
15436 mailboxes to split from.  Defaults to nil, which means that splitting is
15437 disabled!
15438
15439 @lisp
15440 (setq nnimap-split-inbox
15441       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
15442 @end lisp
15443
15444 No nnmail equivalent.
15445
15446 @item nnimap-split-rule
15447 @cindex Splitting, rules
15448 @vindex nnimap-split-rule
15449
15450 New mail found in @code{nnimap-split-inbox} will be split according to
15451 this variable.
15452
15453 This variable contains a list of lists, where the first element in the
15454 sublist gives the name of the @sc{imap} mailbox to move articles
15455 matching the regexp in the second element in the sublist.  Got that?
15456 Neither did I, we need examples.
15457
15458 @lisp
15459 (setq nnimap-split-rule
15460       '(("INBOX.nnimap"
15461          "^Sender: owner-nnimap@@vic20.globalcom.se")
15462         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
15463         ("INBOX.private" "")))
15464 @end lisp
15465
15466 This will put all articles from the nnimap mailing list into mailbox
15467 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
15468 into INBOX.junk and everything else in INBOX.private.
15469
15470 The first string may contain `\\1' forms, like the ones used by
15471 replace-match to insert sub-expressions from the matched text.  For
15472 instance:
15473
15474 @lisp
15475 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
15476 @end lisp
15477
15478 The first element can also be the symbol @code{junk} to indicate that
15479 matching messages should simply be deleted.  Use with care.
15480
15481 The second element can also be a function.  In that case, it will be
15482 called with the first element of the rule as the argument, in a buffer
15483 containing the headers of the article.  It should return a non-nil value
15484 if it thinks that the mail belongs in that group.
15485
15486 Nnmail users might recollect that the last regexp had to be empty to
15487 match all articles (like in the example above).  This is not required in
15488 nnimap.  Articles not matching any of the regexps will not be moved out
15489 of your inbox.  (This might affect performance if you keep lots of
15490 unread articles in your inbox, since the splitting code would go over
15491 them every time you fetch new mail.)
15492
15493 These rules are processed from the beginning of the alist toward the
15494 end.  The first rule to make a match will "win", unless you have
15495 crossposting enabled.  In that case, all matching rules will "win".
15496
15497 This variable can also have a function as its value, the function will
15498 be called with the headers narrowed and should return a group where it
15499 thinks the article should be split to.  See @code{nnimap-split-fancy}.
15500
15501 The splitting code tries to create mailboxes if it needs to.
15502
15503 To allow for different split rules on different virtual servers, and
15504 even different split rules in different inboxes on the same server,
15505 the syntax of this variable have been extended along the lines of:
15506
15507 @lisp
15508 (setq nnimap-split-rule
15509       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
15510                                   ("junk"    "From:.*Simon")))
15511         ("my2server"    ("INBOX" nnimap-split-fancy))
15512         ("my[34]server" (".*"    (("private" "To:.*Simon")
15513                                   ("junk"    my-junk-func)))))
15514 @end lisp
15515
15516 The virtual server name is in fact a regexp, so that the same rules
15517 may apply to several servers.  In the example, the servers
15518 @code{my3server} and @code{my4server} both use the same rules.
15519 Similarly, the inbox string is also a regexp.  The actual splitting
15520 rules are as before, either a function, or a list with group/regexp or
15521 group/function elements.
15522
15523 Nnmail equivalent: @code{nnmail-split-methods}.
15524
15525 @item nnimap-split-predicate
15526 @cindex splitting
15527 @vindex nnimap-split-predicate
15528
15529 Mail matching this predicate in @code{nnimap-split-inbox} will be
15530 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
15531
15532 This might be useful if you use another @sc{imap} client to read mail in
15533 your inbox but would like Gnus to split all articles in the inbox
15534 regardless of readedness. Then you might change this to
15535 @samp{UNDELETED}.
15536
15537 @item nnimap-split-fancy
15538 @cindex splitting, fancy
15539 @findex nnimap-split-fancy
15540 @vindex nnimap-split-fancy
15541
15542 It's possible to set @code{nnimap-split-rule} to
15543 @code{nnmail-split-fancy} if you want to use fancy
15544 splitting. @xref{Fancy Mail Splitting}.
15545
15546 However, to be able to have different fancy split rules for nnmail and
15547 nnimap back ends you can set @code{nnimap-split-rule} to
15548 @code{nnimap-split-fancy} and define the nnimap specific fancy split
15549 rule in @code{nnimap-split-fancy}.
15550
15551 Example:
15552
15553 @lisp
15554 (setq nnimap-split-rule 'nnimap-split-fancy
15555       nnimap-split-fancy ...)
15556 @end lisp
15557
15558 Nnmail equivalent: @code{nnmail-split-fancy}.
15559
15560 @item nnimap-split-download-body
15561 @findex nnimap-split-download-body
15562 @vindex nnimap-split-download-body
15563
15564 Set to non-nil to download entire articles during splitting.  This is
15565 generally not required, and will slow things down considerably.  You
15566 may need it if you want to use an advanced splitting function that
15567 analyses the body to split the article.
15568
15569 @end table
15570
15571 @node Expiring in IMAP
15572 @subsection Expiring in IMAP
15573 @cindex expiring imap mail
15574
15575 Even though @code{nnimap} is not a proper @code{nnmail} derived back
15576 end, it supports most features in regular expiring (@pxref{Expiring
15577 Mail}).  Unlike splitting in IMAP (@pxref{Splitting in IMAP}) it do
15578 not clone the @code{nnmail} variables (i.e., creating
15579 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
15580 follows below are the variables used by the @code{nnimap} expiry
15581 process.
15582
15583 A note on how the expire mark is stored on the @sc{imap} server is
15584 appropriate here as well.  The expire mark is translated into a
15585 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
15586 message.  This means that likely only Gnus will understand and treat
15587 the @code{gnus-expire} mark properly, although other clients may allow
15588 you to view client specific flags on the message.  It also means that
15589 your server must support permanent storage of client specific flags on
15590 messages.  Most do, fortunately.
15591
15592 @table @code
15593
15594 @item nnmail-expiry-wait
15595 @item nnmail-expiry-wait-function
15596
15597 These variables are fully supported.  The expire value can be a
15598 number, the symbol @var{immediate} or @var{never}.
15599
15600 @item nnmail-expiry-target
15601
15602 This variable is supported, and internally implemented by calling the
15603 @code{nnmail} functions that handle this.  It contains an optimization
15604 that if the destination is a IMAP group on the same server, the
15605 article is copied instead of appended (that is, uploaded again).
15606
15607 @end table
15608
15609 @node Editing IMAP ACLs
15610 @subsection Editing IMAP ACLs
15611 @cindex editing imap acls
15612 @cindex Access Control Lists
15613 @cindex Editing @sc{imap} ACLs
15614 @kindex G l
15615 @findex gnus-group-nnimap-edit-acl
15616
15617 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
15618 limiting (or enabling) other users access to your mail boxes.  Not all
15619 @sc{imap} servers support this, this function will give an error if it
15620 doesn't.
15621
15622 To edit a ACL for a mailbox, type @kbd{G l}
15623 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
15624 editing window with detailed instructions.
15625
15626 Some possible uses:
15627
15628 @itemize @bullet
15629 @item
15630 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
15631 on your mailing list mailboxes enables other users on the same server to
15632 follow the list without subscribing to it.
15633 @item
15634 At least with the Cyrus server, you are required to give the user
15635 "anyone" posting ("p") capabilities to have "plussing" work (that is,
15636 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
15637 INBOX.mailbox).
15638 @end itemize
15639
15640 @node Expunging mailboxes
15641 @subsection Expunging mailboxes
15642 @cindex expunging
15643
15644 @cindex Expunge
15645 @cindex Manual expunging
15646 @kindex G x
15647 @findex gnus-group-nnimap-expunge
15648
15649 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
15650 you may want the option of expunging all deleted articles in a mailbox
15651 manually.  This is exactly what @kbd{G x} does.
15652
15653 Currently there is no way of showing deleted articles, you can just
15654 delete them.
15655
15656 @node A note on namespaces
15657 @subsection A note on namespaces
15658 @cindex IMAP namespace
15659 @cindex namespaces
15660
15661 The IMAP protocol has a concept called namespaces, described by the
15662 following text in the RFC:
15663
15664 @example
15665 5.1.2.  Mailbox Namespace Naming Convention
15666
15667    By convention, the first hierarchical element of any mailbox name
15668    which begins with "#" identifies the "namespace" of the remainder of
15669    the name.  This makes it possible to disambiguate between different
15670    types of mailbox stores, each of which have their own namespaces.
15671
15672       For example, implementations which offer access to USENET
15673       newsgroups MAY use the "#news" namespace to partition the USENET
15674       newsgroup namespace from that of other mailboxes.  Thus, the
15675       comp.mail.misc newsgroup would have an mailbox name of
15676       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
15677       to a different object (e.g. a user's private mailbox).
15678 @end example
15679
15680 While there is nothing in this text that warrants concern for the IMAP
15681 implementation in Gnus, some servers use namespace prefixes in a way
15682 that does not work with how Gnus uses mailbox names.
15683
15684 Specifically, University of Washington's IMAP server uses mailbox
15685 names like @code{#driver.mbx/read-mail} which are valid only in the
15686 @sc{create} and @sc{append} commands.  After the mailbox is created
15687 (or a messages is appended to a mailbox), it must be accessed without
15688 the namespace prefix, i.e @code{read-mail}.  Since Gnus do not make it
15689 possible for the user to guarantee that user entered mailbox names
15690 will only be used with the CREATE and APPEND commands, you should
15691 simply not use the namespace prefixed mailbox names in Gnus.
15692
15693 See the UoW @sc{imapd} documentation for the @code{#driver.*/} prefix
15694 for more information on how to use the prefixes.  They are a power
15695 tool and should be used only if you are sure what the effects are.
15696
15697 @node Other Sources
15698 @section Other Sources
15699
15700 Gnus can do more than just read news or mail.  The methods described
15701 below allow Gnus to view directories and files as if they were
15702 newsgroups.
15703
15704 @menu
15705 * Directory Groups::            You can read a directory as if it was a newsgroup.
15706 * Anything Groups::             Dired?  Who needs dired?
15707 * Document Groups::             Single files can be the basis of a group.
15708 * SOUP::                        Reading @sc{soup} packets ``offline''.
15709 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
15710 @end menu
15711
15712
15713 @node Directory Groups
15714 @subsection Directory Groups
15715 @cindex nndir
15716 @cindex directory groups
15717
15718 If you have a directory that has lots of articles in separate files in
15719 it, you might treat it as a newsgroup.  The files have to have numerical
15720 names, of course.
15721
15722 This might be an opportune moment to mention @code{ange-ftp} (and its
15723 successor @code{efs}), that most wonderful of all wonderful Emacs
15724 packages.  When I wrote @code{nndir}, I didn't think much about it---a
15725 back end to read directories.  Big deal.
15726
15727 @code{ange-ftp} changes that picture dramatically.  For instance, if you
15728 enter the @code{ange-ftp} file name
15729 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
15730 @code{ange-ftp} or @code{efs} will actually allow you to read this
15731 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
15732
15733 @code{nndir} will use @sc{nov} files if they are present.
15734
15735 @code{nndir} is a ``read-only'' back end---you can't delete or expire
15736 articles with this method.  You can use @code{nnmh} or @code{nnml} for
15737 whatever you use @code{nndir} for, so you could switch to any of those
15738 methods if you feel the need to have a non-read-only @code{nndir}.
15739
15740
15741 @node Anything Groups
15742 @subsection Anything Groups
15743 @cindex nneething
15744
15745 From the @code{nndir} back end (which reads a single spool-like
15746 directory), it's just a hop and a skip to @code{nneething}, which
15747 pretends that any arbitrary directory is a newsgroup.  Strange, but
15748 true.
15749
15750 When @code{nneething} is presented with a directory, it will scan this
15751 directory and assign article numbers to each file.  When you enter such
15752 a group, @code{nneething} must create ``headers'' that Gnus can use.
15753 After all, Gnus is a newsreader, in case you're forgetting.
15754 @code{nneething} does this in a two-step process.  First, it snoops each
15755 file in question.  If the file looks like an article (i.e., the first
15756 few lines look like headers), it will use this as the head.  If this is
15757 just some arbitrary file without a head (e.g. a C source file),
15758 @code{nneething} will cobble up a header out of thin air.  It will use
15759 file ownership, name and date and do whatever it can with these
15760 elements.
15761
15762 All this should happen automatically for you, and you will be presented
15763 with something that looks very much like a newsgroup.  Totally like a
15764 newsgroup, to be precise.  If you select an article, it will be displayed
15765 in the article buffer, just as usual.
15766
15767 If you select a line that represents a directory, Gnus will pop you into
15768 a new summary buffer for this @code{nneething} group.  And so on.  You can
15769 traverse the entire disk this way, if you feel like, but remember that
15770 Gnus is not dired, really, and does not intend to be, either.
15771
15772 There are two overall modes to this action---ephemeral or solid.  When
15773 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
15774 will not store information on what files you have read, and what files
15775 are new, and so on.  If you create a solid @code{nneething} group the
15776 normal way with @kbd{G m}, Gnus will store a mapping table between
15777 article numbers and file names, and you can treat this group like any
15778 other groups.  When you activate a solid @code{nneething} group, you will
15779 be told how many unread articles it contains, etc., etc.
15780
15781 Some variables:
15782
15783 @table @code
15784 @item nneething-map-file-directory
15785 @vindex nneething-map-file-directory
15786 All the mapping files for solid @code{nneething} groups will be stored
15787 in this directory, which defaults to @file{~/.nneething/}.
15788
15789 @item nneething-exclude-files
15790 @vindex nneething-exclude-files
15791 All files that match this regexp will be ignored.  Nice to use to exclude
15792 auto-save files and the like, which is what it does by default.
15793
15794 @item nneething-include-files
15795 @vindex nneething-include-files
15796 Regexp saying what files to include in the group.  If this variable is
15797 non-@code{nil}, only files matching this regexp will be included.
15798
15799 @item nneething-map-file
15800 @vindex nneething-map-file
15801 Name of the map files.
15802 @end table
15803
15804
15805 @node Document Groups
15806 @subsection Document Groups
15807 @cindex nndoc
15808 @cindex documentation group
15809 @cindex help group
15810
15811 @code{nndoc} is a cute little thing that will let you read a single file
15812 as a newsgroup.  Several files types are supported:
15813
15814 @table @code
15815 @cindex babyl
15816 @cindex rmail mbox
15817
15818 @item babyl
15819 The babyl (rmail) mail box.
15820 @cindex mbox
15821 @cindex Unix mbox
15822
15823 @item mbox
15824 The standard Unix mbox file.
15825
15826 @cindex MMDF mail box
15827 @item mmdf
15828 The MMDF mail box format.
15829
15830 @item news
15831 Several news articles appended into a file.
15832
15833 @item rnews
15834 @cindex rnews batch files
15835 The rnews batch transport format.
15836 @cindex forwarded messages
15837
15838 @item forward
15839 Forwarded articles.
15840
15841 @item nsmail
15842 Netscape mail boxes.
15843
15844 @item mime-parts
15845 @sc{mime} multipart messages.
15846
15847 @item standard-digest
15848 The standard (RFC 1153) digest format.
15849
15850 @item mime-digest
15851 A @sc{mime} digest of messages.
15852
15853 @item lanl-gov-announce
15854 Announcement messages from LANL Gov Announce.
15855
15856 @item rfc822-forward
15857 A message forwarded according to RFC822.
15858
15859 @item outlook
15860 The Outlook mail box.
15861
15862 @item oe-dbx
15863 The Outlook Express dbx mail box.
15864
15865 @item exim-bounce
15866 A bounce message from the Exim MTA.
15867
15868 @item forward
15869 A message forwarded according to informal rules.
15870
15871 @item rfc934
15872 An RFC934-forwarded message.
15873
15874 @item mailman
15875 A mailman digest.
15876
15877 @item clari-briefs
15878 A digest of Clarinet brief news items.
15879
15880 @item slack-digest
15881 Non-standard digest format---matches most things, but does it badly.
15882
15883 @item mail-in-mail
15884 The last resort.
15885 @end table
15886
15887 You can also use the special ``file type'' @code{guess}, which means
15888 that @code{nndoc} will try to guess what file type it is looking at.
15889 @code{digest} means that @code{nndoc} should guess what digest type the
15890 file is.
15891
15892 @code{nndoc} will not try to change the file or insert any extra headers into
15893 it---it will simply, like, let you use the file as the basis for a
15894 group.  And that's it.
15895
15896 If you have some old archived articles that you want to insert into your
15897 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
15898 that.  Say you have an old @file{RMAIL} file with mail that you now want
15899 to split into your new @code{nnml} groups.  You look at that file using
15900 @code{nndoc} (using the @kbd{G f} command in the group buffer
15901 (@pxref{Foreign Groups})), set the process mark on all the articles in
15902 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
15903 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
15904 file is now also stored in lots of @code{nnml} directories, and you can
15905 delete that pesky @file{RMAIL} file.  If you have the guts!
15906
15907 Virtual server variables:
15908
15909 @table @code
15910 @item nndoc-article-type
15911 @vindex nndoc-article-type
15912 This should be one of @code{mbox}, @code{babyl}, @code{digest},
15913 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
15914 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
15915 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
15916 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
15917
15918 @item nndoc-post-type
15919 @vindex nndoc-post-type
15920 This variable says whether Gnus is to consider the group a news group or
15921 a mail group.  There are two valid values:  @code{mail} (the default)
15922 and @code{news}.
15923 @end table
15924
15925 @menu
15926 * Document Server Internals::   How to add your own document types.
15927 @end menu
15928
15929
15930 @node Document Server Internals
15931 @subsubsection Document Server Internals
15932
15933 Adding new document types to be recognized by @code{nndoc} isn't
15934 difficult.  You just have to whip up a definition of what the document
15935 looks like, write a predicate function to recognize that document type,
15936 and then hook into @code{nndoc}.
15937
15938 First, here's an example document type definition:
15939
15940 @example
15941 (mmdf
15942  (article-begin .  "^\^A\^A\^A\^A\n")
15943  (body-end .  "^\^A\^A\^A\^A\n"))
15944 @end example
15945
15946 The definition is simply a unique @dfn{name} followed by a series of
15947 regexp pseudo-variable settings.  Below are the possible
15948 variables---don't be daunted by the number of variables; most document
15949 types can be defined with very few settings:
15950
15951 @table @code
15952 @item first-article
15953 If present, @code{nndoc} will skip past all text until it finds
15954 something that match this regexp.  All text before this will be
15955 totally ignored.
15956
15957 @item article-begin
15958 This setting has to be present in all document type definitions.  It
15959 says what the beginning of each article looks like.
15960
15961 @item head-begin-function
15962 If present, this should be a function that moves point to the head of
15963 the article.
15964
15965 @item nndoc-head-begin
15966 If present, this should be a regexp that matches the head of the
15967 article.
15968
15969 @item nndoc-head-end
15970 This should match the end of the head of the article.  It defaults to
15971 @samp{^$}---the empty line.
15972
15973 @item body-begin-function
15974 If present, this function should move point to the beginning of the body
15975 of the article.
15976
15977 @item body-begin
15978 This should match the beginning of the body of the article.  It defaults
15979 to @samp{^\n}.
15980
15981 @item body-end-function
15982 If present, this function should move point to the end of the body of
15983 the article.
15984
15985 @item body-end
15986 If present, this should match the end of the body of the article.
15987
15988 @item file-end
15989 If present, this should match the end of the file.  All text after this
15990 regexp will be totally ignored.
15991
15992 @end table
15993
15994 So, using these variables @code{nndoc} is able to dissect a document
15995 file into a series of articles, each with a head and a body.  However, a
15996 few more variables are needed since not all document types are all that
15997 news-like---variables needed to transform the head or the body into
15998 something that's palatable for Gnus:
15999
16000 @table @code
16001 @item prepare-body-function
16002 If present, this function will be called when requesting an article.  It
16003 will be called with point at the start of the body, and is useful if the
16004 document has encoded some parts of its contents.
16005
16006 @item article-transform-function
16007 If present, this function is called when requesting an article.  It's
16008 meant to be used for more wide-ranging transformation of both head and
16009 body of the article.
16010
16011 @item generate-head-function
16012 If present, this function is called to generate a head that Gnus can
16013 understand.  It is called with the article number as a parameter, and is
16014 expected to generate a nice head for the article in question.  It is
16015 called when requesting the headers of all articles.
16016
16017 @end table
16018
16019 Let's look at the most complicated example I can come up with---standard
16020 digests:
16021
16022 @example
16023 (standard-digest
16024  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16025  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16026  (prepare-body-function . nndoc-unquote-dashes)
16027  (body-end-function . nndoc-digest-body-end)
16028  (head-end . "^ ?$")
16029  (body-begin . "^ ?\n")
16030  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16031  (subtype digest guess))
16032 @end example
16033
16034 We see that all text before a 70-width line of dashes is ignored; all
16035 text after a line that starts with that @samp{^End of} is also ignored;
16036 each article begins with a 30-width line of dashes; the line separating
16037 the head from the body may contain a single space; and that the body is
16038 run through @code{nndoc-unquote-dashes} before being delivered.
16039
16040 To hook your own document definition into @code{nndoc}, use the
16041 @code{nndoc-add-type} function.  It takes two parameters---the first is
16042 the definition itself and the second (optional) parameter says where in
16043 the document type definition alist to put this definition.  The alist is
16044 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
16045 is of @code{mmdf} type, and so on.  These type predicates should return
16046 @code{nil} if the document is not of the correct type; @code{t} if it is
16047 of the correct type; and a number if the document might be of the
16048 correct type.  A high number means high probability; a low number means
16049 low probability with @samp{0} being the lowest valid number.
16050
16051
16052 @node SOUP
16053 @subsection SOUP
16054 @cindex SOUP
16055 @cindex offline
16056
16057 In the PC world people often talk about ``offline'' newsreaders.  These
16058 are thingies that are combined reader/news transport monstrosities.
16059 With built-in modem programs.  Yecchh!
16060
16061 Of course, us Unix Weenie types of human beans use things like
16062 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16063 transport things like Ghod intended.  And then we just use normal
16064 newsreaders.
16065
16066 However, it can sometimes be convenient to do something that's a bit
16067 easier on the brain if you have a very slow modem, and you're not really
16068 that interested in doing things properly.
16069
16070 A file format called @sc{soup} has been developed for transporting news
16071 and mail from servers to home machines and back again.  It can be a bit
16072 fiddly.
16073
16074 First some terminology:
16075
16076 @table @dfn
16077
16078 @item server
16079 This is the machine that is connected to the outside world and where you
16080 get news and/or mail from.
16081
16082 @item home machine
16083 This is the machine that you want to do the actual reading and responding
16084 on.  It is typically not connected to the rest of the world in any way.
16085
16086 @item packet
16087 Something that contains messages and/or commands.  There are two kinds
16088 of packets:
16089
16090 @table @dfn
16091 @item message packets
16092 These are packets made at the server, and typically contain lots of
16093 messages for you to read.  These are called @file{SoupoutX.tgz} by
16094 default, where @var{x} is a number.
16095
16096 @item response packets
16097 These are packets made at the home machine, and typically contains
16098 replies that you've written.  These are called @file{SoupinX.tgz} by
16099 default, where @var{x} is a number.
16100
16101 @end table
16102
16103 @end table
16104
16105
16106 @enumerate
16107
16108 @item
16109 You log in on the server and create a @sc{soup} packet.  You can either
16110 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16111 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16112 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16113
16114 @item
16115 You transfer the packet home.  Rail, boat, car or modem will do fine.
16116
16117 @item
16118 You put the packet in your home directory.
16119
16120 @item
16121 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16122 the native or secondary server.
16123
16124 @item
16125 You read articles and mail and answer and followup to the things you
16126 want (@pxref{SOUP Replies}).
16127
16128 @item
16129 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16130 packet.
16131
16132 @item
16133 You transfer this packet to the server.
16134
16135 @item
16136 You use Gnus to mail this packet out with the @kbd{G s s} command.
16137
16138 @item
16139 You then repeat until you die.
16140
16141 @end enumerate
16142
16143 So you basically have a bipartite system---you use @code{nnsoup} for
16144 reading and Gnus for packing/sending these @sc{soup} packets.
16145
16146 @menu
16147 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16148 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16149 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16150 @end menu
16151
16152
16153 @node SOUP Commands
16154 @subsubsection SOUP Commands
16155
16156 These are commands for creating and manipulating @sc{soup} packets.
16157
16158 @table @kbd
16159 @item G s b
16160 @kindex G s b (Group)
16161 @findex gnus-group-brew-soup
16162 Pack all unread articles in the current group
16163 (@code{gnus-group-brew-soup}).  This command understands the
16164 process/prefix convention.
16165
16166 @item G s w
16167 @kindex G s w (Group)
16168 @findex gnus-soup-save-areas
16169 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16170
16171 @item G s s
16172 @kindex G s s (Group)
16173 @findex gnus-soup-send-replies
16174 Send all replies from the replies packet
16175 (@code{gnus-soup-send-replies}).
16176
16177 @item G s p
16178 @kindex G s p (Group)
16179 @findex gnus-soup-pack-packet
16180 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16181
16182 @item G s r
16183 @kindex G s r (Group)
16184 @findex nnsoup-pack-replies
16185 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16186
16187 @item O s
16188 @kindex O s (Summary)
16189 @findex gnus-soup-add-article
16190 This summary-mode command adds the current article to a @sc{soup} packet
16191 (@code{gnus-soup-add-article}).  It understands the process/prefix
16192 convention (@pxref{Process/Prefix}).
16193
16194 @end table
16195
16196
16197 There are a few variables to customize where Gnus will put all these
16198 thingies:
16199
16200 @table @code
16201
16202 @item gnus-soup-directory
16203 @vindex gnus-soup-directory
16204 Directory where Gnus will save intermediate files while composing
16205 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16206
16207 @item gnus-soup-replies-directory
16208 @vindex gnus-soup-replies-directory
16209 This is what Gnus will use as a temporary directory while sending our
16210 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16211
16212 @item gnus-soup-prefix-file
16213 @vindex gnus-soup-prefix-file
16214 Name of the file where Gnus stores the last used prefix.  The default is
16215 @samp{gnus-prefix}.
16216
16217 @item gnus-soup-packer
16218 @vindex gnus-soup-packer
16219 A format string command for packing a @sc{soup} packet.  The default is
16220 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16221
16222 @item gnus-soup-unpacker
16223 @vindex gnus-soup-unpacker
16224 Format string command for unpacking a @sc{soup} packet.  The default is
16225 @samp{gunzip -c %s | tar xvf -}.
16226
16227 @item gnus-soup-packet-directory
16228 @vindex gnus-soup-packet-directory
16229 Where Gnus will look for reply packets.  The default is @file{~/}.
16230
16231 @item gnus-soup-packet-regexp
16232 @vindex gnus-soup-packet-regexp
16233 Regular expression matching @sc{soup} reply packets in
16234 @code{gnus-soup-packet-directory}.
16235
16236 @end table
16237
16238
16239 @node SOUP Groups
16240 @subsubsection SOUP Groups
16241 @cindex nnsoup
16242
16243 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16244 read incoming packets, unpack them, and put them in a directory where
16245 you can read them at leisure.
16246
16247 These are the variables you can use to customize its behavior:
16248
16249 @table @code
16250
16251 @item nnsoup-tmp-directory
16252 @vindex nnsoup-tmp-directory
16253 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16254 directory.  (@file{/tmp/} by default.)
16255
16256 @item nnsoup-directory
16257 @vindex nnsoup-directory
16258 @code{nnsoup} then moves each message and index file to this directory.
16259 The default is @file{~/SOUP/}.
16260
16261 @item nnsoup-replies-directory
16262 @vindex nnsoup-replies-directory
16263 All replies will be stored in this directory before being packed into a
16264 reply packet.  The default is @file{~/SOUP/replies/"}.
16265
16266 @item nnsoup-replies-format-type
16267 @vindex nnsoup-replies-format-type
16268 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16269 (rnews), and I don't think you should touch that variable.  I probably
16270 shouldn't even have documented it.  Drats!  Too late!
16271
16272 @item nnsoup-replies-index-type
16273 @vindex nnsoup-replies-index-type
16274 The index type of the replies packet.  The default is @samp{?n}, which
16275 means ``none''.  Don't fiddle with this one either!
16276
16277 @item nnsoup-active-file
16278 @vindex nnsoup-active-file
16279 Where @code{nnsoup} stores lots of information.  This is not an ``active
16280 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16281 this file or mess it up in any way, you're dead.  The default is
16282 @file{~/SOUP/active}.
16283
16284 @item nnsoup-packer
16285 @vindex nnsoup-packer
16286 Format string command for packing a reply @sc{soup} packet.  The default
16287 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16288
16289 @item nnsoup-unpacker
16290 @vindex nnsoup-unpacker
16291 Format string command for unpacking incoming @sc{soup} packets.  The
16292 default is @samp{gunzip -c %s | tar xvf -}.
16293
16294 @item nnsoup-packet-directory
16295 @vindex nnsoup-packet-directory
16296 Where @code{nnsoup} will look for incoming packets.  The default is
16297 @file{~/}.
16298
16299 @item nnsoup-packet-regexp
16300 @vindex nnsoup-packet-regexp
16301 Regular expression matching incoming @sc{soup} packets.  The default is
16302 @samp{Soupout}.
16303
16304 @item nnsoup-always-save
16305 @vindex nnsoup-always-save
16306 If non-@code{nil}, save the replies buffer after each posted message.
16307
16308 @end table
16309
16310
16311 @node SOUP Replies
16312 @subsubsection SOUP Replies
16313
16314 Just using @code{nnsoup} won't mean that your postings and mailings end
16315 up in @sc{soup} reply packets automagically.  You have to work a bit
16316 more for that to happen.
16317
16318 @findex nnsoup-set-variables
16319 The @code{nnsoup-set-variables} command will set the appropriate
16320 variables to ensure that all your followups and replies end up in the
16321 @sc{soup} system.
16322
16323 In specific, this is what it does:
16324
16325 @lisp
16326 (setq message-send-news-function 'nnsoup-request-post)
16327 (setq message-send-mail-function 'nnsoup-request-mail)
16328 @end lisp
16329
16330 And that's it, really.  If you only want news to go into the @sc{soup}
16331 system you just use the first line.  If you only want mail to be
16332 @sc{soup}ed you use the second.
16333
16334
16335 @node Mail-To-News Gateways
16336 @subsection Mail-To-News Gateways
16337 @cindex mail-to-news gateways
16338 @cindex gateways
16339
16340 If your local @code{nntp} server doesn't allow posting, for some reason
16341 or other, you can post using one of the numerous mail-to-news gateways.
16342 The @code{nngateway} back end provides the interface.
16343
16344 Note that you can't read anything from this back end---it can only be
16345 used to post with.
16346
16347 Server variables:
16348
16349 @table @code
16350 @item nngateway-address
16351 @vindex nngateway-address
16352 This is the address of the mail-to-news gateway.
16353
16354 @item nngateway-header-transformation
16355 @vindex nngateway-header-transformation
16356 News headers often have to be transformed in some odd way or other
16357 for the mail-to-news gateway to accept it.  This variable says what
16358 transformation should be called, and defaults to
16359 @code{nngateway-simple-header-transformation}.  The function is called
16360 narrowed to the headers to be transformed and with one parameter---the
16361 gateway address.
16362
16363 This default function just inserts a new @code{To} header based on the
16364 @code{Newsgroups} header and the gateway address.
16365 For instance, an article with this @code{Newsgroups} header:
16366
16367 @example
16368 Newsgroups: alt.religion.emacs
16369 @end example
16370
16371 will get this @code{To} header inserted:
16372
16373 @example
16374 To: alt-religion-emacs@@GATEWAY
16375 @end example
16376
16377 The following pre-defined functions exist:
16378
16379 @findex nngateway-simple-header-transformation
16380 @table @code
16381
16382 @item nngateway-simple-header-transformation
16383 Creates a @code{To} header that looks like
16384 @var{newsgroup}@@@code{nngateway-address}.
16385
16386 @findex nngateway-mail2news-header-transformation
16387
16388 @item nngateway-mail2news-header-transformation
16389 Creates a @code{To} header that looks like
16390 @code{nngateway-address}.
16391
16392 Here's an example:
16393
16394 @lisp
16395 (setq gnus-post-method
16396       '(nngateway
16397         "mail2news@@replay.com"
16398         (nngateway-header-transformation
16399          nngateway-mail2news-header-transformation)))
16400 @end lisp
16401
16402 @end table
16403
16404
16405 @end table
16406
16407 So, to use this, simply say something like:
16408
16409 @lisp
16410 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
16411 @end lisp
16412
16413
16414
16415 @node Combined Groups
16416 @section Combined Groups
16417
16418 Gnus allows combining a mixture of all the other group types into bigger
16419 groups.
16420
16421 @menu
16422 * Virtual Groups::              Combining articles from many groups.
16423 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
16424 @end menu
16425
16426
16427 @node Virtual Groups
16428 @subsection Virtual Groups
16429 @cindex nnvirtual
16430 @cindex virtual groups
16431 @cindex merging groups
16432
16433 An @dfn{nnvirtual group} is really nothing more than a collection of
16434 other groups.
16435
16436 For instance, if you are tired of reading many small groups, you can
16437 put them all in one big group, and then grow tired of reading one
16438 big, unwieldy group.  The joys of computing!
16439
16440 You specify @code{nnvirtual} as the method.  The address should be a
16441 regexp to match component groups.
16442
16443 All marks in the virtual group will stick to the articles in the
16444 component groups.  So if you tick an article in a virtual group, the
16445 article will also be ticked in the component group from whence it
16446 came.  (And vice versa---marks from the component groups will also be
16447 shown in the virtual group.). To create an empty virtual group, run
16448 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
16449 and edit the method regexp with @kbd{M-e}
16450 (@code{gnus-group-edit-group-method})
16451
16452 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
16453 newsgroups into one, big, happy newsgroup:
16454
16455 @lisp
16456 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
16457 @end lisp
16458
16459 The component groups can be native or foreign; everything should work
16460 smoothly, but if your computer explodes, it was probably my fault.
16461
16462 Collecting the same group from several servers might actually be a good
16463 idea if users have set the Distribution header to limit distribution.
16464 If you would like to read @samp{soc.motss} both from a server in Japan
16465 and a server in Norway, you could use the following as the group regexp:
16466
16467 @example
16468 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
16469 @end example
16470
16471 (Remember, though, that if you're creating the group with @kbd{G m}, you
16472 shouldn't double the backslashes, and you should leave off the quote
16473 characters at the beginning and the end of the string.)
16474
16475 This should work kinda smoothly---all articles from both groups should
16476 end up in this one, and there should be no duplicates.  Threading (and
16477 the rest) will still work as usual, but there might be problems with the
16478 sequence of articles.  Sorting on date might be an option here
16479 (@pxref{Selecting a Group}).
16480
16481 One limitation, however---all groups included in a virtual
16482 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
16483 zombie groups can't be component groups for @code{nnvirtual} groups.
16484
16485 @vindex nnvirtual-always-rescan
16486 If the @code{nnvirtual-always-rescan} is non-@code{nil},
16487 @code{nnvirtual} will always scan groups for unread articles when
16488 entering a virtual group.  If this variable is @code{nil} (which is the
16489 default) and you read articles in a component group after the virtual
16490 group has been activated, the read articles from the component group
16491 will show up when you enter the virtual group.  You'll also see this
16492 effect if you have two virtual groups that have a component group in
16493 common.  If that's the case, you should set this variable to @code{t}.
16494 Or you can just tap @code{M-g} on the virtual group every time before
16495 you enter it---it'll have much the same effect.
16496
16497 @code{nnvirtual} can have both mail and news groups as component groups.
16498 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
16499 has to ask the back end of the component group the article comes from
16500 whether it is a news or mail back end.  However, when you do a @kbd{^},
16501 there is typically no sure way for the component back end to know this,
16502 and in that case @code{nnvirtual} tells Gnus that the article came from a
16503 not-news back end.  (Just to be on the safe side.)
16504
16505 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
16506 line from the article you respond to in these cases.
16507
16508 @code{nnvirtual} groups do not inherit anything but articles and marks
16509 from component groups---group parameters, for instance, are not
16510 inherited.
16511
16512
16513 @node Kibozed Groups
16514 @subsection Kibozed Groups
16515 @cindex nnkiboze
16516 @cindex kibozing
16517
16518 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
16519 the news feed''.  @code{nnkiboze} is a back end that will do this for
16520 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
16521 with useless requests!  Oh happiness!
16522
16523 @kindex G k (Group)
16524 To create a kibozed group, use the @kbd{G k} command in the group
16525 buffer.
16526
16527 The address field of the @code{nnkiboze} method is, as with
16528 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
16529 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
16530 and @code{nnvirtual} end.
16531
16532 In addition to this regexp detailing component groups, an @code{nnkiboze} group
16533 must have a score file to say what articles are to be included in
16534 the group (@pxref{Scoring}).
16535
16536 @kindex M-x nnkiboze-generate-groups
16537 @findex nnkiboze-generate-groups
16538 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
16539 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
16540 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
16541 all the articles in all the component groups and run them through the
16542 scoring process to determine if there are any articles in the groups
16543 that are to be part of the @code{nnkiboze} groups.
16544
16545 Please limit the number of component groups by using restrictive
16546 regexps.  Otherwise your sysadmin may become annoyed with you, and the
16547 @sc{nntp} site may throw you off and never let you back in again.
16548 Stranger things have happened.
16549
16550 @code{nnkiboze} component groups do not have to be alive---they can be dead,
16551 and they can be foreign.  No restrictions.
16552
16553 @vindex nnkiboze-directory
16554 The generation of an @code{nnkiboze} group means writing two files in
16555 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
16556 contains the @sc{nov} header lines for all the articles in the group,
16557 and the other is an additional @file{.newsrc} file to store information
16558 on what groups have been searched through to find component articles.
16559
16560 Articles marked as read in the @code{nnkiboze} group will have
16561 their @sc{nov} lines removed from the @sc{nov} file.
16562
16563
16564 @node Gnus Unplugged
16565 @section Gnus Unplugged
16566 @cindex offline
16567 @cindex unplugged
16568 @cindex Agent
16569 @cindex Gnus Agent
16570 @cindex Gnus Unplugged
16571
16572 In olden times (ca. February '88), people used to run their newsreaders
16573 on big machines with permanent connections to the net.  News transport
16574 was dealt with by news servers, and all the newsreaders had to do was to
16575 read news.  Believe it or not.
16576
16577 Nowadays most people read news and mail at home, and use some sort of
16578 modem to connect to the net.  To avoid running up huge phone bills, it
16579 would be nice to have a way to slurp down all the news and mail, hang up
16580 the phone, read for several hours, and then upload any responses you
16581 have to make.  And then you repeat the procedure.
16582
16583 Of course, you can use news servers for doing this as well.  I've used
16584 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
16585 for some years, but doing that's a bore.  Moving the news server
16586 functionality up to the newsreader makes sense if you're the only person
16587 reading news on a machine.
16588
16589 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
16590 fact, you don't even have to configure anything.
16591
16592 Of course, to use it as such, you have to learn a few new commands.
16593
16594 @menu
16595 * Agent Basics::                How it all is supposed to work.
16596 * Agent Categories::            How to tell the Gnus Agent what to download.
16597 * Agent Commands::              New commands for all the buffers.
16598 * Agent as Cache::              The Agent is a big cache too.
16599 * Agent Expiry::                How to make old articles go away.
16600 * Agent Regeneration::          How to recover from lost connections and other accidents.
16601 * Agent and IMAP::              How to use the Agent with IMAP.
16602 * Outgoing Messages::           What happens when you post/mail something?
16603 * Agent Variables::             Customizing is fun.
16604 * Example Setup::               An example @file{.gnus.el} file for offline people.
16605 * Batching Agents::             How to fetch news from a @code{cron} job.
16606 * Agent Caveats::               What you think it'll do and what it does.
16607 @end menu
16608
16609
16610 @node Agent Basics
16611 @subsection Agent Basics
16612
16613 First, let's get some terminology out of the way.
16614
16615 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
16616 connection to the net (and notified the Agent that this is the case).
16617 When the connection to the net is up again (and Gnus knows this), the
16618 Agent is @dfn{plugged}.
16619
16620 The @dfn{local} machine is the one you're running on, and which isn't
16621 connected to the net continuously.
16622
16623 @dfn{Downloading} means fetching things from the net to your local
16624 machine.  @dfn{Uploading} is doing the opposite.
16625
16626 Let's take a typical Gnus session using the Agent.
16627
16628 @itemize @bullet
16629
16630 @item
16631 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
16632 Agent in a disconnected state.  You can read all the news that you have
16633 already fetched while in this mode.
16634
16635 @item
16636 You then decide to see whether any new news has arrived.  You connect
16637 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
16638 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
16639 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
16640 Source Specifiers}).
16641
16642 @item
16643 You can then read the new news immediately, or you can download the news
16644 onto your local machine.  If you want to do the latter, you press @kbd{g}
16645 to check if there are any new news and then @kbd{J
16646 s} to fetch all the eligible articles in all the groups.  (To let Gnus
16647 know which articles you want to download, @pxref{Agent Categories}.)
16648
16649 @item
16650 After fetching the articles, you press @kbd{J j} to make Gnus become
16651 unplugged again, and you shut down the PPP thing (or whatever).  And
16652 then you read the news offline.
16653
16654 @item
16655 And then you go to step 2.
16656 @end itemize
16657
16658 Here are some things you should do the first time (or so) that you use
16659 the Agent.
16660
16661 @itemize @bullet
16662
16663 @item
16664 Decide which servers should be covered by the Agent.  If you have a mail
16665 back end, it would probably be nonsensical to have it covered by the
16666 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
16667 @kbd{J a} on the server (or servers) that you wish to have covered by the
16668 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
16669 added servers you do not wish to have covered by the Agent.  By default,
16670 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
16671 @code{gnus-secondary-select-methods} are agentized.
16672
16673 @item
16674 Decide on download policy.  @xref{Agent Categories}.
16675
16676 @item
16677 Uhm... that's it.
16678 @end itemize
16679
16680
16681 @node Agent Categories
16682 @subsection Agent Categories
16683
16684 One of the main reasons to integrate the news transport layer into the
16685 newsreader is to allow greater control over what articles to download.
16686 There's not much point in downloading huge amounts of articles, just to
16687 find out that you're not interested in reading any of them.  It's better
16688 to be somewhat more conservative in choosing what to download, and then
16689 mark the articles for downloading manually if it should turn out that
16690 you're interested in the articles anyway.
16691
16692 The main way to control what is to be downloaded is to create a
16693 @dfn{category} and then assign some (or all) groups to this category.
16694 Groups that do not belong in any other category belong to the
16695 @code{default} category.  Gnus has its own buffer for creating and
16696 managing categories.
16697
16698 @menu
16699 * Category Syntax::             What a category looks like.
16700 * Category Buffer::             A buffer for maintaining categories.
16701 * Category Variables::          Customize'r'Us.
16702 @end menu
16703
16704
16705 @node Category Syntax
16706 @subsubsection Category Syntax
16707
16708 A category consists of two things.
16709
16710 @enumerate
16711 @item
16712 A predicate which (generally) gives a rough outline of which articles
16713 are eligible for downloading; and
16714
16715 @item
16716 a score rule which (generally) gives you a finer granularity when
16717 deciding what articles to download.  (Note that this @dfn{download
16718 score} is not necessarily related to normal scores.)
16719 @end enumerate
16720
16721 A predicate in its simplest form can be a single predicate such as
16722 @code{true} or @code{false}.  These two will download every available
16723 article or nothing respectively.  In the case of these two special
16724 predicates an additional score rule is superfluous.
16725
16726 Predicates of @code{high} or @code{low} download articles in respect of
16727 their scores in relationship to @code{gnus-agent-high-score} and
16728 @code{gnus-agent-low-score} as described below.
16729
16730 To gain even finer control of what is to be regarded eligible for
16731 download a predicate can consist of a number of predicates with logical
16732 operators sprinkled in between.
16733
16734 Perhaps some examples are in order.
16735
16736 Here's a simple predicate.  (It's the default predicate, in fact, used
16737 for all groups that don't belong to any other category.)
16738
16739 @lisp
16740 short
16741 @end lisp
16742
16743 Quite simple, eh?  This predicate is true if and only if the article is
16744 short (for some value of ``short'').
16745
16746 Here's a more complex predicate:
16747
16748 @lisp
16749 (or high
16750     (and
16751      (not low)
16752      (not long)))
16753 @end lisp
16754
16755 This means that an article should be downloaded if it has a high score,
16756 or if the score is not low and the article is not long.  You get the
16757 drift.
16758
16759 The available logical operators are @code{or}, @code{and} and
16760 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
16761 @samp{|}, @code{&} and @code{!} instead.)
16762
16763 The following predicates are pre-defined, but if none of these fit what
16764 you want to do, you can write your own.
16765
16766 @table @code
16767 @item short
16768 True iff the article is shorter than @code{gnus-agent-short-article}
16769 lines; default 100.
16770
16771 @item long
16772 True iff the article is longer than @code{gnus-agent-long-article}
16773 lines; default 200.
16774
16775 @item low
16776 True iff the article has a download score less than
16777 @code{gnus-agent-low-score}; default 0.
16778
16779 @item high
16780 True iff the article has a download score greater than
16781 @code{gnus-agent-high-score}; default 0.
16782
16783 @item spam
16784 True iff the Gnus Agent guesses that the article is spam.  The
16785 heuristics may change over time, but at present it just computes a
16786 checksum and sees whether articles match.
16787
16788 @item true
16789 Always true.
16790
16791 @item false
16792 Always false.
16793 @end table
16794
16795 If you want to create your own predicate function, here's what you have
16796 to know:  The functions are called with no parameters, but the
16797 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
16798 useful values.
16799
16800 For example, you could decide that you don't want to download articles
16801 that were posted more than a certain number of days ago (e.g. posted
16802 more than @code{gnus-agent-expire-days} ago) you might write a function
16803 something along the lines of the following:
16804
16805 @lisp
16806 (defun my-article-old-p ()
16807   "Say whether an article is old."
16808   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
16809      (- (time-to-days (current-time)) gnus-agent-expire-days)))
16810 @end lisp
16811
16812 with the predicate then defined as:
16813
16814 @lisp
16815 (not my-article-old-p)
16816 @end lisp
16817
16818 or you could append your predicate to the predefined
16819 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
16820 wherever.
16821
16822 @lisp
16823 (require 'gnus-agent)
16824 (setq  gnus-category-predicate-alist
16825   (append gnus-category-predicate-alist
16826          '((old . my-article-old-p))))
16827 @end lisp
16828
16829 and simply specify your predicate as:
16830
16831 @lisp
16832 (not old)
16833 @end lisp
16834
16835 If/when using something like the above, be aware that there are many
16836 misconfigured systems/mailers out there and so an article's date is not
16837 always a reliable indication of when it was posted.  Hell, some people
16838 just don't give a damn.
16839
16840 The above predicates apply to *all* the groups which belong to the
16841 category.  However, if you wish to have a specific predicate for an
16842 individual group within a category, or you're just too lazy to set up a
16843 new category, you can enter a group's individual predicate in it's group
16844 parameters like so:
16845
16846 @lisp
16847 (agent-predicate . short)
16848 @end lisp
16849
16850 This is the group parameter equivalent of the agent category default.
16851 Note that when specifying a single word predicate like this, the
16852 @code{agent-predicate} specification must be in dotted pair notation.
16853
16854 The equivalent of the longer example from above would be:
16855
16856 @lisp
16857 (agent-predicate or high (and (not low) (not long)))
16858 @end lisp
16859
16860 The outer parenthesis required in the category specification are not
16861 entered here as, not being in dotted pair notation, the value of the
16862 predicate is assumed to be a list.
16863
16864
16865 Now, the syntax of the download score is the same as the syntax of
16866 normal score files, except that all elements that require actually
16867 seeing the article itself are verboten.  This means that only the
16868 following headers can be scored on: @code{Subject}, @code{From},
16869 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
16870 @code{Lines}, and @code{Xref}.
16871
16872 As with predicates, the specification of the @code{download score rule}
16873 to use in respect of a group can be in either the category definition if
16874 it's to be applicable to all groups in therein, or a group's parameters
16875 if it's to be specific to that group.
16876
16877 In both of these places the @code{download score rule} can take one of
16878 three forms:
16879
16880 @enumerate
16881 @item
16882 Score rule
16883
16884 This has the same syntax as a normal gnus score file except only a
16885 subset of scoring keywords are available as mentioned above.
16886
16887 example:
16888
16889 @itemize @bullet
16890 @item
16891 Category specification
16892
16893 @lisp
16894 (("from"
16895        ("Lars Ingebrigtsen" 1000000 nil s))
16896 ("lines"
16897        (500 -100 nil <)))
16898 @end lisp
16899
16900 @item
16901 Group Parameter specification
16902
16903 @lisp
16904 (agent-score ("from"
16905                    ("Lars Ingebrigtsen" 1000000 nil s))
16906              ("lines"
16907                    (500 -100 nil <)))
16908 @end lisp
16909
16910 Again, note the omission of the outermost parenthesis here.
16911 @end itemize
16912
16913 @item
16914 Agent score file
16915
16916 These score files must *only* contain the permitted scoring keywords
16917 stated above.
16918
16919 example:
16920
16921 @itemize @bullet
16922 @item
16923 Category specification
16924
16925 @lisp
16926 ("~/News/agent.SCORE")
16927 @end lisp
16928
16929 or perhaps
16930
16931 @lisp
16932 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
16933 @end lisp
16934
16935 @item
16936 Group Parameter specification
16937
16938 @lisp
16939 (agent-score "~/News/agent.SCORE")
16940 @end lisp
16941
16942 Additional score files can be specified as above.  Need I say anything
16943 about parenthesis?
16944 @end itemize
16945
16946 @item
16947 Use @code{normal} score files
16948
16949 If you don't want to maintain two sets of scoring rules for a group, and
16950 your desired @code{downloading} criteria for a group are the same as your
16951 @code{reading} criteria then you can tell the agent to refer to your
16952 @code{normal} score files when deciding what to download.
16953
16954 These directives in either the category definition or a group's
16955 parameters will cause the agent to read in all the applicable score
16956 files for a group, *filtering out* those sections that do not
16957 relate to one of the permitted subset of scoring keywords.
16958
16959 @itemize @bullet
16960 @item
16961 Category Specification
16962
16963 @lisp
16964 file
16965 @end lisp
16966
16967 @item
16968 Group Parameter specification
16969
16970 @lisp
16971 (agent-score . file)
16972 @end lisp
16973 @end itemize
16974 @end enumerate
16975
16976 @node Category Buffer
16977 @subsubsection Category Buffer
16978
16979 You'd normally do all category maintenance from the category buffer.
16980 When you enter it for the first time (with the @kbd{J c} command from
16981 the group buffer), you'll only see the @code{default} category.
16982
16983 The following commands are available in this buffer:
16984
16985 @table @kbd
16986 @item q
16987 @kindex q (Category)
16988 @findex gnus-category-exit
16989 Return to the group buffer (@code{gnus-category-exit}).
16990
16991 @item k
16992 @kindex k (Category)
16993 @findex gnus-category-kill
16994 Kill the current category (@code{gnus-category-kill}).
16995
16996 @item c
16997 @kindex c (Category)
16998 @findex gnus-category-copy
16999 Copy the current category (@code{gnus-category-copy}).
17000
17001 @item a
17002 @kindex a (Category)
17003 @findex gnus-category-add
17004 Add a new category (@code{gnus-category-add}).
17005
17006 @item p
17007 @kindex p (Category)
17008 @findex gnus-category-edit-predicate
17009 Edit the predicate of the current category
17010 (@code{gnus-category-edit-predicate}).
17011
17012 @item g
17013 @kindex g (Category)
17014 @findex gnus-category-edit-groups
17015 Edit the list of groups belonging to the current category
17016 (@code{gnus-category-edit-groups}).
17017
17018 @item s
17019 @kindex s (Category)
17020 @findex gnus-category-edit-score
17021 Edit the download score rule of the current category
17022 (@code{gnus-category-edit-score}).
17023
17024 @item l
17025 @kindex l (Category)
17026 @findex gnus-category-list
17027 List all the categories (@code{gnus-category-list}).
17028 @end table
17029
17030
17031 @node Category Variables
17032 @subsubsection Category Variables
17033
17034 @table @code
17035 @item gnus-category-mode-hook
17036 @vindex gnus-category-mode-hook
17037 Hook run in category buffers.
17038
17039 @item gnus-category-line-format
17040 @vindex gnus-category-line-format
17041 Format of the lines in the category buffer (@pxref{Formatting
17042 Variables}).  Valid elements are:
17043
17044 @table @samp
17045 @item c
17046 The name of the category.
17047
17048 @item g
17049 The number of groups in the category.
17050 @end table
17051
17052 @item gnus-category-mode-line-format
17053 @vindex gnus-category-mode-line-format
17054 Format of the category mode line (@pxref{Mode Line Formatting}).
17055
17056 @item gnus-agent-short-article
17057 @vindex gnus-agent-short-article
17058 Articles that have fewer lines than this are short.  Default 100.
17059
17060 @item gnus-agent-long-article
17061 @vindex gnus-agent-long-article
17062 Articles that have more lines than this are long.  Default 200.
17063
17064 @item gnus-agent-low-score
17065 @vindex gnus-agent-low-score
17066 Articles that have a score lower than this have a low score.  Default
17067 0.
17068
17069 @item gnus-agent-high-score
17070 @vindex gnus-agent-high-score
17071 Articles that have a score higher than this have a high score.  Default
17072 0.
17073
17074 @end table
17075
17076
17077 @node Agent Commands
17078 @subsection Agent Commands
17079
17080 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17081 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17082 toggles the plugged/unplugged state of the Gnus Agent.
17083
17084
17085 @menu
17086 * Group Agent Commands::        Configure groups and fetch their contents.
17087 * Summary Agent Commands::      Manually select then fetch specific articles.
17088 * Server Agent Commands::       Select the servers that are supported by the agent.
17089 @end menu
17090
17091
17092
17093
17094 @node Group Agent Commands
17095 @subsubsection Group Agent Commands
17096
17097 @table @kbd
17098 @item J u
17099 @kindex J u (Agent Group)
17100 @findex gnus-agent-fetch-groups
17101 Fetch all eligible articles in the current group
17102 (@code{gnus-agent-fetch-groups}).
17103
17104 @item J c
17105 @kindex J c (Agent Group)
17106 @findex gnus-enter-category-buffer
17107 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17108
17109 @item J s
17110 @kindex J s (Agent Group)
17111 @findex gnus-agent-fetch-session
17112 Fetch all eligible articles in all groups
17113 (@code{gnus-agent-fetch-session}).
17114
17115 @item J S
17116 @kindex J S (Agent Group)
17117 @findex gnus-group-send-queue
17118 Send all sendable messages in the queue group
17119 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17120
17121 @item J a
17122 @kindex J a (Agent Group)
17123 @findex gnus-agent-add-group
17124 Add the current group to an Agent category
17125 (@code{gnus-agent-add-group}).  This command understands the
17126 process/prefix convention (@pxref{Process/Prefix}).
17127
17128 @item J r
17129 @kindex J r (Agent Group)
17130 @findex gnus-agent-remove-group
17131 Remove the current group from its category, if any
17132 (@code{gnus-agent-remove-group}).  This command understands the
17133 process/prefix convention (@pxref{Process/Prefix}).
17134
17135 @item J Y
17136 @kindex J Y (Agent Group)
17137 @findex gnus-agent-synchronize-flags
17138 Synchronize flags changed while unplugged with remote server, if any.
17139
17140
17141 @end table
17142
17143
17144 @node Summary Agent Commands
17145 @subsubsection Summary Agent Commands
17146
17147 @table @kbd
17148 @item J #
17149 @kindex J # (Agent Summary)
17150 @findex gnus-agent-mark-article
17151 Mark the article for downloading (@code{gnus-agent-mark-article}).
17152
17153 @item J M-#
17154 @kindex J M-# (Agent Summary)
17155 @findex gnus-agent-unmark-article
17156 Remove the downloading mark from the article
17157 (@code{gnus-agent-unmark-article}).
17158
17159 @cindex %
17160 @item @@
17161 @kindex @@ (Agent Summary)
17162 @findex gnus-agent-toggle-mark
17163 Toggle whether to download the article
17164 (@code{gnus-agent-toggle-mark}).  The dowload mark is @samp{%} by
17165 default. 
17166
17167 @item J c
17168 @kindex J c (Agent Summary)
17169 @findex gnus-agent-catchup
17170 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17171
17172 @item J S
17173 @kindex J S (Agent Summary)
17174 @findex gnus-agent-fetch-group
17175 Download all eligible (See @pxref{Agent Categories}) articles in this group.
17176 (@code{gnus-agent-fetch-group}).
17177
17178 @item J s
17179 @kindex J s (Agent Summary)
17180 @findex gnus-agent-fetch-series
17181 Download all processable articles in this group.
17182 (@code{gnus-agent-fetch-series}).
17183
17184 @item J u
17185 @kindex J u (Agent Summary)
17186 @findex gnus-agent-summary-fetch-group
17187 Download all downloadable articles in the current group
17188 (@code{gnus-agent-summary-fetch-group}).
17189
17190 @end table
17191
17192
17193 @node Server Agent Commands
17194 @subsubsection Server Agent Commands
17195
17196 @table @kbd
17197 @item J a
17198 @kindex J a (Agent Server)
17199 @findex gnus-agent-add-server
17200 Add the current server to the list of servers covered by the Gnus Agent
17201 (@code{gnus-agent-add-server}).
17202
17203 @item J r
17204 @kindex J r (Agent Server)
17205 @findex gnus-agent-remove-server
17206 Remove the current server from the list of servers covered by the Gnus
17207 Agent (@code{gnus-agent-remove-server}).
17208
17209 @end table
17210
17211
17212 @node Agent as Cache
17213 @subsection Agent as Cache
17214
17215 When Gnus is plugged, it is not efficient to download headers or
17216 articles from the server again, if they are already stored in the
17217 Agent.  So, Gnus normally only downloads headers once, and stores them
17218 in the Agent.  These headers are later used when generating the summary
17219 buffer, regardless of whether you are plugged or unplugged.  Articles
17220 are not cached in the Agent by default though (that would potentially
17221 consume lots of disk space), but if you have already downloaded an
17222 article into the Agent, Gnus will not download the article from the
17223 server again but use the locally stored copy instead.
17224
17225 This behaviour can be controlled by @code{gnus-agent-cache}
17226 (@pxref{Agent Variables}).
17227
17228 @node Agent Expiry
17229 @subsection Agent Expiry
17230
17231 @vindex gnus-agent-expire-days
17232 @findex gnus-agent-expire
17233 @kindex M-x gnus-agent-expire
17234 @cindex Agent expiry
17235 @cindex Gnus Agent expiry
17236 @cindex expiry
17237
17238 @code{nnagent} doesn't handle expiry.  Instead, there's a special
17239 @code{gnus-agent-expire} command that will expire all read articles that
17240 are older than @code{gnus-agent-expire-days} days.  It can be run
17241 whenever you feel that you're running out of space.  It's not
17242 particularly fast or efficient, and it's not a particularly good idea to
17243 interrupt it (with @kbd{C-g} or anything else) once you've started it.
17244
17245 Note that other functions, e.g. @code{gnus-request-expire-articles},
17246 might run @code{gnus-agent-expire} for you to keep the agent 
17247 synchronized with the group.
17248
17249 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
17250 The regexps will be matched against group names to allow differing
17251 expiry in different groups.
17252
17253 @lisp
17254 (setq gnus-agent-expire-days
17255       '(("alt\\." 7)
17256         (".*binary" 1)
17257         ("." 21)))
17258 @end lisp
17259
17260 If you use the list form, the last element must always be the default
17261 method---it must always match all groups. Also, for a regexp to match,
17262 it must match from the beginning of the group's name.
17263
17264 @vindex gnus-agent-expire-all
17265 If @code{gnus-agent-expire-all} is non-@code{nil}, this command will
17266 expire all articles---unread, read, ticked and dormant.  If @code{nil}
17267 (which is the default), only read articles are eligible for expiry, and
17268 unread, ticked and dormant articles will be kept indefinitely.
17269
17270 If you find that some articles eligible for expiry are never expired,
17271 perhaps some Gnus Agent files are corrupted.  There's a special
17272 @code{gnus-agent-regenerate} command to fix possible problems.
17273
17274 @node Agent Regeneration
17275 @subsection Agent Regeneration
17276
17277 @cindex Agent Regeneration
17278 @cindex Gnus Agent Regeneration
17279 @cindex regeneration
17280
17281 The local data structures used by @code{nnagent} may become corrupted
17282 due to certain exceptional conditions.  When this happens,
17283 @code{nnagent} functionality may degrade or even fail.  The solution
17284 to this problem is to repair the local data structures by removing all
17285 internal inconsistencies.
17286
17287 For example, if your connection to your server is lost while
17288 downloaded articles into the agent, the local data structures will not
17289 know about articles downloaded prior to the connection failure.
17290 Running @code{gnus-agent-regenerate} or
17291 @code{gnus-agent-regenerate-group} will update the data structures
17292 such that you don't need to download these articles a second time.
17293
17294 @findex gnus-agent-regenerate
17295 @kindex M-x gnus-agent-regenerate
17296 The command @code{gnus-agent-regenerate} will perform
17297 @code{gnus-agent-regenerate-group} on every agentized group.  While
17298 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
17299 recommended that you first close all summary buffers.
17300
17301 @findex gnus-agent-regenerate-group
17302 @kindex M-x gnus-agent-regenerate-group
17303 The command @code{gnus-agent-regenerate-group} uses the local copies
17304 of individual articles to repair the local NOV(header) database.  It
17305 then updates the internal data structures that document which articles
17306 are stored locally.  An optional argument will mark articles in the
17307 agent as unread.
17308
17309 @node Agent and IMAP
17310 @subsection Agent and IMAP
17311
17312 The Agent works with any Gnus back end, including nnimap.  However,
17313 since there are some conceptual differences between @sc{nntp} and
17314 @sc{imap}, this section (should) provide you with some information to
17315 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
17316
17317 The first thing to keep in mind is that all flags (read, ticked, etc)
17318 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
17319 case for nntp.  Thus Gnus need to remember flag changes when
17320 disconnected, and synchronize these flags when you plug back in.
17321
17322 Gnus keeps track of flag changes when reading nnimap groups under the
17323 Agent.  When you plug back in, Gnus will check if you have any changed
17324 any flags and ask if you wish to synchronize these with the server.
17325 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
17326
17327 @vindex gnus-agent-synchronize-flags
17328 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
17329 never automatically synchronize flags.  If it is @code{ask}, which is
17330 the default, the Agent will check if you made any changes and if so
17331 ask if you wish to synchronize these when you re-connect.  If it has
17332 any other value, all flags will be synchronized automatically.
17333
17334 If you do not wish to synchronize flags automatically when you
17335 re-connect, you can do it manually with the
17336 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
17337 in the group buffer.
17338
17339 Some things are currently not implemented in the Agent that you'd might
17340 expect from a disconnected @sc{imap} client, including:
17341
17342 @itemize @bullet
17343
17344 @item
17345 Copying/moving articles into nnimap groups when unplugged.
17346
17347 @item
17348 Creating/deleting nnimap groups when unplugged.
17349
17350 @end itemize
17351
17352 Technical note: the synchronization algorithm does not work by "pushing"
17353 all local flags to the server, but rather incrementally update the
17354 server view of flags by changing only those flags that were changed by
17355 the user.  Thus, if you set one flag on a article, quit the group and
17356 re-select the group and remove the flag; the flag will be set and
17357 removed from the server when you "synchronize".  The queued flag
17358 operations can be found in the per-server @code{flags} file in the Agent
17359 directory.  It's emptied when you synchronize flags.
17360
17361
17362 @node Outgoing Messages
17363 @subsection Outgoing Messages
17364
17365 When Gnus is unplugged, all outgoing messages (both mail and news) are
17366 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
17367 them there after posting, and edit them at will.
17368
17369 When Gnus is plugged again, you can send the messages either from the
17370 draft group with the special commands available there, or you can use
17371 the @kbd{J S} command in the group buffer to send all the sendable
17372 messages in the draft group.
17373
17374
17375
17376 @node Agent Variables
17377 @subsection Agent Variables
17378
17379 @table @code
17380 @item gnus-agent-directory
17381 @vindex gnus-agent-directory
17382 Where the Gnus Agent will store its files.  The default is
17383 @file{~/News/agent/}.
17384
17385 @item gnus-agent-handle-level
17386 @vindex gnus-agent-handle-level
17387 Groups on levels (@pxref{Group Levels}) higher than this variable will
17388 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
17389 which means that only subscribed group will be considered by the Agent
17390 by default.
17391
17392 @item gnus-agent-plugged-hook
17393 @vindex gnus-agent-plugged-hook
17394 Hook run when connecting to the network.
17395
17396 @item gnus-agent-unplugged-hook
17397 @vindex gnus-agent-unplugged-hook
17398 Hook run when disconnecting from the network.
17399
17400 @item gnus-agent-fetched-hook
17401 @vindex gnus-agent-fetched-hook
17402 Hook run when after finishing fetching articles.
17403
17404 @item gnus-agent-cache
17405 @vindex gnus-agent-cache
17406 Variable to control whether use the locally stored @sc{nov} and
17407 articles when plugged, e.g. essentially using the Agent as a cache.
17408 The default is non-nil, which means to use the Agent as a cache.
17409
17410 @item gnus-agent-go-online
17411 @vindex gnus-agent-go-online
17412 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
17413 automatically switch offline servers into online status.  If it is
17414 @code{ask}, the default, the Agent will ask if you wish to switch
17415 offline servers into online status when you re-connect.  If it has any
17416 other value, all offline servers will be automatically switched into
17417 online status.
17418
17419 @item gnus-agent-mark-unread-after-downloaded
17420 @vindex gnus-agent-mark-unread-after-downloaded
17421 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
17422 mark articles as unread after downloading.  The default is t.
17423
17424 @item gnus-agent-consider-all-articles
17425 @vindex gnus-agent-consider-all-articles
17426 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
17427 agent will fetch all missing headers.  When @code{nil}, the agent will
17428 fetch only new headers. The default is @code{nil}.
17429
17430 @item gnus-agent-max-fetch-size
17431 @vindex gnus-agent-max-fetch-size
17432 The agent fetches articles into a temporary buffer prior to parsing
17433 them into individual files.  To avoid exceeding the max. buffer size,
17434 the agent alternates between fetching and parsing until all articles
17435 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
17436 limit to control how often the cycling occurs.  A large value improves
17437 performance.  A small value minimizes the time lost should the
17438 connection be lost while fetching (You may need to run
17439 @code{gnus-agent-regenerate-group} to update the group's state.
17440 However, all articles parsed prior to loosing the connection will be
17441 available while unplugged).
17442
17443 @item gnus-server-unopen-status
17444 @vindex gnus-server-unopen-status
17445 Perhaps not a Agent variable, but closely related to the Agent, this
17446 variable says what will happen if Gnus cannot open a server.  If the
17447 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
17448 whether to deny the server or whether to unplug the agent.  If the
17449 Agent is disabled, Gnus always simply deny the server.  Other choices
17450 for this variable include @code{denied} and @code{offline} the latter
17451 is only valid if the Agent is used.
17452
17453 @end table
17454
17455
17456 @node Example Setup
17457 @subsection Example Setup
17458
17459 If you don't want to read this manual, and you have a fairly standard
17460 setup, you may be able to use something like the following as your
17461 @file{.gnus.el} file to get started.
17462
17463 @lisp
17464 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
17465 ;;; from your ISP's server.
17466 (setq gnus-select-method '(nntp "news.your-isp.com"))
17467
17468 ;;; Define how Gnus is to read your mail.  We read mail from
17469 ;;; your ISP's POP server.
17470 (setq mail-sources '((pop :server "pop.your-isp.com")))
17471
17472 ;;; Say how Gnus is to store the mail.  We use nnml groups.
17473 (setq gnus-secondary-select-methods '((nnml "")))
17474
17475 ;;; Make Gnus into an offline newsreader.
17476 ;;; (gnus-agentize) ; The obsolete setting.
17477 ;;; (setq gnus-agent t) ; Now the default.
17478 @end lisp
17479
17480 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
17481 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
17482 gnus}.
17483
17484 If this is the first time you've run Gnus, you will be subscribed
17485 automatically to a few default newsgroups.  You'll probably want to
17486 subscribe to more groups, and to do that, you have to query the
17487 @sc{nntp} server for a complete list of groups with the @kbd{A A}
17488 command.  This usually takes quite a while, but you only have to do it
17489 once.
17490
17491 After reading and parsing a while, you'll be presented with a list of
17492 groups.  Subscribe to the ones you want to read with the @kbd{u}
17493 command.  @kbd{l} to make all the killed groups disappear after you've
17494 subscribe to all the groups you want to read.  (@kbd{A k} will bring
17495 back all the killed groups.)
17496
17497 You can now read the groups at once, or you can download the articles
17498 with the @kbd{J s} command.  And then read the rest of this manual to
17499 find out which of the other gazillion things you want to customize.
17500
17501
17502 @node Batching Agents
17503 @subsection Batching Agents
17504
17505 Having the Gnus Agent fetch articles (and post whatever messages you've
17506 written) is quite easy once you've gotten things set up properly.  The
17507 following shell script will do everything that is necessary:
17508
17509 You can run a complete batch command from the command line with the
17510 following incantation:
17511
17512 @example
17513 #!/bin/sh
17514 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
17515 @end example
17516
17517
17518 @node Agent Caveats
17519 @subsection Agent Caveats
17520
17521 The Gnus Agent doesn't seem to work like most other offline
17522 newsreaders.  Here are some common questions that some imaginary people
17523 may ask:
17524
17525 @table @dfn
17526 @item If I read an article while plugged, do they get entered into the Agent?
17527
17528 @strong{No}.  If you want this behaviour, add
17529 @code{gnus-agent-fetch-selected-article} to
17530 @code{gnus-select-article-hook}.
17531
17532 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
17533
17534 @strong{No}, unless @code{gnus-agent-cache} is `nil'.
17535
17536 @end table
17537
17538 In short, when Gnus is unplugged, it only looks into the locally stored
17539 articles; when it's plugged, it talks to your ISP and may also use the
17540 locally stored articles.
17541
17542
17543 @node Scoring
17544 @chapter Scoring
17545 @cindex scoring
17546
17547 Other people use @dfn{kill files}, but we here at Gnus Towers like
17548 scoring better than killing, so we'd rather switch than fight.  They do
17549 something completely different as well, so sit up straight and pay
17550 attention!
17551
17552 @vindex gnus-summary-mark-below
17553 All articles have a default score (@code{gnus-summary-default-score}),
17554 which is 0 by default.  This score may be raised or lowered either
17555 interactively or by score files.  Articles that have a score lower than
17556 @code{gnus-summary-mark-below} are marked as read.
17557
17558 Gnus will read any @dfn{score files} that apply to the current group
17559 before generating the summary buffer.
17560
17561 There are several commands in the summary buffer that insert score
17562 entries based on the current article.  You can, for instance, ask Gnus to
17563 lower or increase the score of all articles with a certain subject.
17564
17565 There are two sorts of scoring entries: Permanent and temporary.
17566 Temporary score entries are self-expiring entries.  Any entries that are
17567 temporary and have not been used for, say, a week, will be removed
17568 silently to help keep the sizes of the score files down.
17569
17570 @menu
17571 * Summary Score Commands::      Adding score entries for the current group.
17572 * Group Score Commands::        General score commands.
17573 * Score Variables::             Customize your scoring.  (My, what terminology).
17574 * Score File Format::           What a score file may contain.
17575 * Score File Editing::          You can edit score files by hand as well.
17576 * Adaptive Scoring::            Big Sister Gnus knows what you read.
17577 * Home Score File::             How to say where new score entries are to go.
17578 * Followups To Yourself::       Having Gnus notice when people answer you.
17579 * Scoring On Other Headers::    Scoring on non-standard headers.
17580 * Scoring Tips::                How to score effectively.
17581 * Reverse Scoring::             That problem child of old is not problem.
17582 * Global Score Files::          Earth-spanning, ear-splitting score files.
17583 * Kill Files::                  They are still here, but they can be ignored.
17584 * Converting Kill Files::       Translating kill files to score files.
17585 * GroupLens::                   Getting predictions on what you like to read.
17586 * Advanced Scoring::            Using logical expressions to build score rules.
17587 * Score Decays::                It can be useful to let scores wither away.
17588 @end menu
17589
17590
17591 @node Summary Score Commands
17592 @section Summary Score Commands
17593 @cindex score commands
17594
17595 The score commands that alter score entries do not actually modify real
17596 score files.  That would be too inefficient.  Gnus maintains a cache of
17597 previously loaded score files, one of which is considered the
17598 @dfn{current score file alist}.  The score commands simply insert
17599 entries into this list, and upon group exit, this list is saved.
17600
17601 The current score file is by default the group's local score file, even
17602 if no such score file actually exists.  To insert score commands into
17603 some other score file (e.g. @file{all.SCORE}), you must first make this
17604 score file the current one.
17605
17606 General score commands that don't actually change the score file:
17607
17608 @table @kbd
17609
17610 @item V s
17611 @kindex V s (Summary)
17612 @findex gnus-summary-set-score
17613 Set the score of the current article (@code{gnus-summary-set-score}).
17614
17615 @item V S
17616 @kindex V S (Summary)
17617 @findex gnus-summary-current-score
17618 Display the score of the current article
17619 (@code{gnus-summary-current-score}).
17620
17621 @item V t
17622 @kindex V t (Summary)
17623 @findex gnus-score-find-trace
17624 Display all score rules that have been used on the current article
17625 (@code{gnus-score-find-trace}).
17626
17627 @item V w
17628 @kindex V w (Summary)
17629 @findex gnus-score-find-favourite-words
17630 List words used in scoring (@code{gnus-score-find-favourite-words}).
17631
17632 @item V R
17633 @kindex V R (Summary)
17634 @findex gnus-summary-rescore
17635 Run the current summary through the scoring process
17636 (@code{gnus-summary-rescore}).  This might be useful if you're playing
17637 around with your score files behind Gnus' back and want to see the
17638 effect you're having.
17639
17640 @item V c
17641 @kindex V c (Summary)
17642 @findex gnus-score-change-score-file
17643 Make a different score file the current
17644 (@code{gnus-score-change-score-file}).
17645
17646 @item V e
17647 @kindex V e (Summary)
17648 @findex gnus-score-edit-current-scores
17649 Edit the current score file (@code{gnus-score-edit-current-scores}).
17650 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
17651 File Editing}).
17652
17653 @item V f
17654 @kindex V f (Summary)
17655 @findex gnus-score-edit-file
17656 Edit a score file and make this score file the current one
17657 (@code{gnus-score-edit-file}).
17658
17659 @item V F
17660 @kindex V F (Summary)
17661 @findex gnus-score-flush-cache
17662 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
17663 after editing score files.
17664
17665 @item V C
17666 @kindex V C (Summary)
17667 @findex gnus-score-customize
17668 Customize a score file in a visually pleasing manner
17669 (@code{gnus-score-customize}).
17670
17671 @end table
17672
17673 The rest of these commands modify the local score file.
17674
17675 @table @kbd
17676
17677 @item V m
17678 @kindex V m (Summary)
17679 @findex gnus-score-set-mark-below
17680 Prompt for a score, and mark all articles with a score below this as
17681 read (@code{gnus-score-set-mark-below}).
17682
17683 @item V x
17684 @kindex V x (Summary)
17685 @findex gnus-score-set-expunge-below
17686 Prompt for a score, and add a score rule to the current score file to
17687 expunge all articles below this score
17688 (@code{gnus-score-set-expunge-below}).
17689 @end table
17690
17691 The keystrokes for actually making score entries follow a very regular
17692 pattern, so there's no need to list all the commands.  (Hundreds of
17693 them.)
17694
17695 @findex gnus-summary-increase-score
17696 @findex gnus-summary-lower-score
17697
17698 @enumerate
17699 @item
17700 The first key is either @kbd{I} (upper case i) for increasing the score
17701 or @kbd{L} for lowering the score.
17702 @item
17703 The second key says what header you want to score on.  The following
17704 keys are available:
17705 @table @kbd
17706
17707 @item a
17708 Score on the author name.
17709
17710 @item s
17711 Score on the subject line.
17712
17713 @item x
17714 Score on the @code{Xref} line---i.e., the cross-posting line.
17715
17716 @item r
17717 Score on the @code{References} line.
17718
17719 @item d
17720 Score on the date.
17721
17722 @item l
17723 Score on the number of lines.
17724
17725 @item i
17726 Score on the @code{Message-ID} header.
17727
17728 @item e
17729 Score on an "extra" header, that is, one of those in gnus-extra-headers,
17730 if your @sc{nntp} server tracks additional header data in overviews.
17731
17732 @item f
17733 Score on followups---this matches the author name, and adds scores to
17734 the followups to this author.  (Using this key leads to the creation of
17735 @file{ADAPT} files.)
17736
17737 @item b
17738 Score on the body.
17739
17740 @item h
17741 Score on the head.
17742
17743 @item t
17744 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
17745 files.)
17746
17747 @end table
17748
17749 @item
17750 The third key is the match type.  Which match types are valid depends on
17751 what headers you are scoring on.
17752
17753 @table @code
17754
17755 @item strings
17756
17757 @table @kbd
17758
17759 @item e
17760 Exact matching.
17761
17762 @item s
17763 Substring matching.
17764
17765 @item f
17766 Fuzzy matching (@pxref{Fuzzy Matching}).
17767
17768 @item r
17769 Regexp matching
17770 @end table
17771
17772 @item date
17773 @table @kbd
17774
17775 @item b
17776 Before date.
17777
17778 @item a
17779 After date.
17780
17781 @item n
17782 This date.
17783 @end table
17784
17785 @item number
17786 @table @kbd
17787
17788 @item <
17789 Less than number.
17790
17791 @item =
17792 Equal to number.
17793
17794 @item >
17795 Greater than number.
17796 @end table
17797 @end table
17798
17799 @item
17800 The fourth and usually final key says whether this is a temporary (i.e.,
17801 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
17802 or whether it is to be done immediately, without adding to the score
17803 file.
17804 @table @kbd
17805
17806 @item t
17807 Temporary score entry.
17808
17809 @item p
17810 Permanent score entry.
17811
17812 @item i
17813 Immediately scoring.
17814 @end table
17815
17816 @item
17817 If you are scoring on `e' (extra) headers, you will then be prompted for
17818 the header name on which you wish to score.  This must be a header named
17819 in gnus-extra-headers, and @samp{TAB} completion is available.
17820
17821 @end enumerate
17822
17823 So, let's say you want to increase the score on the current author with
17824 exact matching permanently: @kbd{I a e p}.  If you want to lower the
17825 score based on the subject line, using substring matching, and make a
17826 temporary score entry: @kbd{L s s t}.  Pretty easy.
17827
17828 To make things a bit more complicated, there are shortcuts.  If you use
17829 a capital letter on either the second or third keys, Gnus will use
17830 defaults for the remaining one or two keystrokes.  The defaults are
17831 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
17832 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
17833
17834 These functions take both the numerical prefix and the symbolic prefix
17835 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
17836 (or increase) the score of the article.  A symbolic prefix of @code{a}
17837 says to use the @file{all.SCORE} file for the command instead of the
17838 current score file.
17839
17840 @vindex gnus-score-mimic-keymap
17841 The @code{gnus-score-mimic-keymap} says whether these commands will
17842 pretend they are keymaps or not.
17843
17844
17845 @node Group Score Commands
17846 @section Group Score Commands
17847 @cindex group score commands
17848
17849 There aren't many of these as yet, I'm afraid.
17850
17851 @table @kbd
17852
17853 @item W f
17854 @kindex W f (Group)
17855 @findex gnus-score-flush-cache
17856 Gnus maintains a cache of score alists to avoid having to reload them
17857 all the time.  This command will flush the cache
17858 (@code{gnus-score-flush-cache}).
17859
17860 @end table
17861
17862 You can do scoring from the command line by saying something like:
17863
17864 @findex gnus-batch-score
17865 @cindex batch scoring
17866 @example
17867 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
17868 @end example
17869
17870
17871 @node Score Variables
17872 @section Score Variables
17873 @cindex score variables
17874
17875 @table @code
17876
17877 @item gnus-use-scoring
17878 @vindex gnus-use-scoring
17879 If @code{nil}, Gnus will not check for score files, and will not, in
17880 general, do any score-related work.  This is @code{t} by default.
17881
17882 @item gnus-kill-killed
17883 @vindex gnus-kill-killed
17884 If this variable is @code{nil}, Gnus will never apply score files to
17885 articles that have already been through the kill process.  While this
17886 may save you lots of time, it also means that if you apply a kill file
17887 to a group, and then change the kill file and want to run it over you
17888 group again to kill more articles, it won't work.  You have to set this
17889 variable to @code{t} to do that.  (It is @code{t} by default.)
17890
17891 @item gnus-kill-files-directory
17892 @vindex gnus-kill-files-directory
17893 All kill and score files will be stored in this directory, which is
17894 initialized from the @code{SAVEDIR} environment variable by default.
17895 This is @file{~/News/} by default.
17896
17897 @item gnus-score-file-suffix
17898 @vindex gnus-score-file-suffix
17899 Suffix to add to the group name to arrive at the score file name
17900 (@samp{SCORE} by default.)
17901
17902 @item gnus-score-uncacheable-files
17903 @vindex gnus-score-uncacheable-files
17904 @cindex score cache
17905 All score files are normally cached to avoid excessive re-loading of
17906 score files.  However, if this might make your Emacs grow big and
17907 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
17908 @file{all.SCORE}, while it might be a good idea to not cache
17909 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
17910 variable is @samp{ADAPT$} by default, so no adaptive score files will
17911 be cached.
17912
17913 @item gnus-save-score
17914 @vindex gnus-save-score
17915 If you have really complicated score files, and do lots of batch
17916 scoring, then you might set this variable to @code{t}.  This will make
17917 Gnus save the scores into the @file{.newsrc.eld} file.
17918
17919 If you do not set this to @code{t}, then manual scores (like those set
17920 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
17921 across group visits.
17922
17923 @item gnus-score-interactive-default-score
17924 @vindex gnus-score-interactive-default-score
17925 Score used by all the interactive raise/lower commands to raise/lower
17926 score with.  Default is 1000, which may seem excessive, but this is to
17927 ensure that the adaptive scoring scheme gets enough room to play with.
17928 We don't want the small changes from the adaptive scoring to overwrite
17929 manually entered data.
17930
17931 @item gnus-summary-default-score
17932 @vindex gnus-summary-default-score
17933 Default score of an article, which is 0 by default.
17934
17935 @item gnus-summary-expunge-below
17936 @vindex gnus-summary-expunge-below
17937 Don't display the summary lines of articles that have scores lower than
17938 this variable.  This is @code{nil} by default, which means that no
17939 articles will be hidden.  This variable is local to the summary buffers,
17940 and has to be set from @code{gnus-summary-mode-hook}.
17941
17942 @item gnus-score-over-mark
17943 @vindex gnus-score-over-mark
17944 Mark (in the third column) used for articles with a score over the
17945 default.  Default is @samp{+}.
17946
17947 @item gnus-score-below-mark
17948 @vindex gnus-score-below-mark
17949 Mark (in the third column) used for articles with a score below the
17950 default.  Default is @samp{-}.
17951
17952 @item gnus-score-find-score-files-function
17953 @vindex gnus-score-find-score-files-function
17954 Function used to find score files for the current group.  This function
17955 is called with the name of the group as the argument.
17956
17957 Predefined functions available are:
17958 @table @code
17959
17960 @item gnus-score-find-single
17961 @findex gnus-score-find-single
17962 Only apply the group's own score file.
17963
17964 @item gnus-score-find-bnews
17965 @findex gnus-score-find-bnews
17966 Apply all score files that match, using bnews syntax.  This is the
17967 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
17968 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
17969 @file{gnu.all.SCORE} would all apply.  In short, the instances of
17970 @samp{all} in the score file names are translated into @samp{.*}, and
17971 then a regexp match is done.
17972
17973 This means that if you have some score entries that you want to apply to
17974 all groups, then you put those entries in the @file{all.SCORE} file.
17975
17976 The score files are applied in a semi-random order, although Gnus will
17977 try to apply the more general score files before the more specific score
17978 files.  It does this by looking at the number of elements in the score
17979 file names---discarding the @samp{all} elements.
17980
17981 @item gnus-score-find-hierarchical
17982 @findex gnus-score-find-hierarchical
17983 Apply all score files from all the parent groups.  This means that you
17984 can't have score files like @file{all.SCORE}, but you can have
17985 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
17986 server.
17987
17988 @end table
17989 This variable can also be a list of functions.  In that case, all
17990 these functions will be called with the group name as argument, and
17991 all the returned lists of score files will be applied.  These
17992 functions can also return lists of lists of score alists directly.  In
17993 that case, the functions that return these non-file score alists
17994 should probably be placed before the ``real'' score file functions, to
17995 ensure that the last score file returned is the local score file.
17996 Phu.
17997
17998 For example, to do hierarchical scoring but use a non-server-specific
17999 overall score file, you could use the value
18000 @example
18001 (list (lambda (group) ("all.SCORE"))
18002       'gnus-score-find-hierarchical)
18003 @end example
18004
18005 @item gnus-score-expiry-days
18006 @vindex gnus-score-expiry-days
18007 This variable says how many days should pass before an unused score file
18008 entry is expired.  If this variable is @code{nil}, no score file entries
18009 are expired.  It's 7 by default.
18010
18011 @item gnus-update-score-entry-dates
18012 @vindex gnus-update-score-entry-dates
18013 If this variable is non-@code{nil}, temporary score entries that have
18014 been triggered (matched) will have their dates updated.  (This is how Gnus
18015 controls expiry---all non-matched-entries will become too old while
18016 matched entries will stay fresh and young.)  However, if you set this
18017 variable to @code{nil}, even matched entries will grow old and will
18018 have to face that oh-so grim reaper.
18019
18020 @item gnus-score-after-write-file-function
18021 @vindex gnus-score-after-write-file-function
18022 Function called with the name of the score file just written.
18023
18024 @item gnus-score-thread-simplify
18025 @vindex gnus-score-thread-simplify
18026 If this variable is non-@code{nil}, article subjects will be simplified
18027 for subject scoring purposes in the same manner as with
18028 threading---according to the current value of
18029 gnus-simplify-subject-functions.  If the scoring entry uses
18030 @code{substring} or @code{exact} matching, the match will also be
18031 simplified in this manner.
18032
18033 @end table
18034
18035
18036 @node Score File Format
18037 @section Score File Format
18038 @cindex score file format
18039
18040 A score file is an @code{emacs-lisp} file that normally contains just a
18041 single form.  Casual users are not expected to edit these files;
18042 everything can be changed from the summary buffer.
18043
18044 Anyway, if you'd like to dig into it yourself, here's an example:
18045
18046 @lisp
18047 (("from"
18048   ("Lars Ingebrigtsen" -10000)
18049   ("Per Abrahamsen")
18050   ("larsi\\|lmi" -50000 nil R))
18051  ("subject"
18052   ("Ding is Badd" nil 728373))
18053  ("xref"
18054   ("alt.politics" -1000 728372 s))
18055  ("lines"
18056   (2 -100 nil <))
18057  (mark 0)
18058  (expunge -1000)
18059  (mark-and-expunge -10)
18060  (read-only nil)
18061  (orphan -10)
18062  (adapt t)
18063  (files "/hom/larsi/News/gnu.SCORE")
18064  (exclude-files "all.SCORE")
18065  (local (gnus-newsgroup-auto-expire t)
18066         (gnus-summary-make-false-root empty))
18067  (eval (ding)))
18068 @end lisp
18069
18070 This example demonstrates most score file elements.  For a different
18071 approach, see @pxref{Advanced Scoring}.
18072
18073 Even though this looks much like lisp code, nothing here is actually
18074 @code{eval}ed.  The lisp reader is used to read this form, though, so it
18075 has to be valid syntactically, if not semantically.
18076
18077 Six keys are supported by this alist:
18078
18079 @table @code
18080
18081 @item STRING
18082 If the key is a string, it is the name of the header to perform the
18083 match on.  Scoring can only be performed on these eight headers:
18084 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18085 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18086 these headers, there are three strings to tell Gnus to fetch the entire
18087 article and do the match on larger parts of the article: @code{Body}
18088 will perform the match on the body of the article, @code{Head} will
18089 perform the match on the head of the article, and @code{All} will
18090 perform the match on the entire article.  Note that using any of these
18091 last three keys will slow down group entry @emph{considerably}.  The
18092 final ``header'' you can score on is @code{Followup}.  These score
18093 entries will result in new score entries being added for all follow-ups
18094 to articles that matches these score entries.
18095
18096 Following this key is a arbitrary number of score entries, where each
18097 score entry has one to four elements.
18098 @enumerate
18099
18100 @item
18101 The first element is the @dfn{match element}.  On most headers this will
18102 be a string, but on the Lines and Chars headers, this must be an
18103 integer.
18104
18105 @item
18106 If the second element is present, it should be a number---the @dfn{score
18107 element}.  This number should be an integer in the neginf to posinf
18108 interval.  This number is added to the score of the article if the match
18109 is successful.  If this element is not present, the
18110 @code{gnus-score-interactive-default-score} number will be used
18111 instead.  This is 1000 by default.
18112
18113 @item
18114 If the third element is present, it should be a number---the @dfn{date
18115 element}.  This date says when the last time this score entry matched,
18116 which provides a mechanism for expiring the score entries.  It this
18117 element is not present, the score entry is permanent.  The date is
18118 represented by the number of days since December 31, 1 BCE.
18119
18120 @item
18121 If the fourth element is present, it should be a symbol---the @dfn{type
18122 element}.  This element specifies what function should be used to see
18123 whether this score entry matches the article.  What match types that can
18124 be used depends on what header you wish to perform the match on.
18125 @table @dfn
18126
18127 @item From, Subject, References, Xref, Message-ID
18128 For most header types, there are the @code{r} and @code{R} (regexp), as
18129 well as @code{s} and @code{S} (substring) types, and @code{e} and
18130 @code{E} (exact match), and @code{w} (word match) types.  If this
18131 element is not present, Gnus will assume that substring matching should
18132 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
18133 that the matches will be done in a case-sensitive manner.  All these
18134 one-letter types are really just abbreviations for the @code{regexp},
18135 @code{string}, @code{exact}, and @code{word} types, which you can use
18136 instead, if you feel like.
18137
18138 @item Extra
18139 Just as for the standard string overview headers, if you are using
18140 gnus-extra-headers, you can score on these headers' values.  In this
18141 case, there is a 5th element in the score entry, being the name of the
18142 header to be scored.  The following entry is useful in your
18143 @file{all.SCORE} file in case of spam attacks from a single origin host,
18144 if your @sc{nntp} server tracks NNTP-Posting-Host in overviews:
18145
18146 @lisp
18147 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
18148 @end lisp
18149
18150 @item Lines, Chars
18151 These two headers use different match types: @code{<}, @code{>},
18152 @code{=}, @code{>=} and @code{<=}.
18153
18154 These predicates are true if
18155
18156 @example
18157 (PREDICATE HEADER MATCH)
18158 @end example
18159
18160 evaluates to non-@code{nil}.  For instance, the advanced match
18161 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
18162 following form:
18163
18164 @lisp
18165 (< header-value 4)
18166 @end lisp
18167
18168 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
18169 the match, we get the score added if the article has less than 4 lines.
18170 (It's easy to get confused and think it's the other way around.  But
18171 it's not.  I think.)
18172
18173 When matching on @code{Lines}, be careful because some back ends (like
18174 @code{nndir}) do not generate @code{Lines} header, so every article ends
18175 up being marked as having 0 lines.  This can lead to strange results if
18176 you happen to lower score of the articles with few lines.
18177
18178 @item Date
18179 For the Date header we have three kinda silly match types:
18180 @code{before}, @code{at} and @code{after}.  I can't really imagine this
18181 ever being useful, but, like, it would feel kinda silly not to provide
18182 this function.  Just in case.  You never know.  Better safe than sorry.
18183 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
18184 sex on a first date.  (I have been told that at least one person, and I
18185 quote, ``found this function indispensable'', however.)
18186
18187 @cindex ISO8601
18188 @cindex date
18189 A more useful match type is @code{regexp}.  With it, you can match the
18190 date string using a regular expression.  The date is normalized to
18191 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
18192 you want to match all articles that have been posted on April 1st in
18193 every year, you could use @samp{....0401.........} as a match string,
18194 for instance.  (Note that the date is kept in its original time zone, so
18195 this will match articles that were posted when it was April 1st where
18196 the article was posted from.  Time zones are such wholesome fun for the
18197 whole family, eh?)
18198
18199 @item Head, Body, All
18200 These three match keys use the same match types as the @code{From} (etc)
18201 header uses.
18202
18203 @item Followup
18204 This match key is somewhat special, in that it will match the
18205 @code{From} header, and affect the score of not only the matching
18206 articles, but also all followups to the matching articles.  This allows
18207 you e.g. increase the score of followups to your own articles, or
18208 decrease the score of followups to the articles of some known
18209 trouble-maker.  Uses the same match types as the @code{From} header
18210 uses.  (Using this match key will lead to creation of @file{ADAPT}
18211 files.)
18212
18213 @item Thread
18214 This match key works along the same lines as the @code{Followup} match
18215 key.  If you say that you want to score on a (sub-)thread started by an
18216 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
18217 match.  This will add a new @samp{thread} match for each article that
18218 has @var{x} in its @code{References} header.  (These new @samp{thread}
18219 matches will use the @code{Message-ID}s of these matching articles.)
18220 This will ensure that you can raise/lower the score of an entire thread,
18221 even though some articles in the thread may not have complete
18222 @code{References} headers.  Note that using this may lead to
18223 undeterministic scores of the articles in the thread.  (Using this match
18224 key will lead to creation of @file{ADAPT} files.)
18225 @end table
18226 @end enumerate
18227
18228 @cindex Score File Atoms
18229 @item mark
18230 The value of this entry should be a number.  Any articles with a score
18231 lower than this number will be marked as read.
18232
18233 @item expunge
18234 The value of this entry should be a number.  Any articles with a score
18235 lower than this number will be removed from the summary buffer.
18236
18237 @item mark-and-expunge
18238 The value of this entry should be a number.  Any articles with a score
18239 lower than this number will be marked as read and removed from the
18240 summary buffer.
18241
18242 @item thread-mark-and-expunge
18243 The value of this entry should be a number.  All articles that belong to
18244 a thread that has a total score below this number will be marked as read
18245 and removed from the summary buffer.  @code{gnus-thread-score-function}
18246 says how to compute the total score for a thread.
18247
18248 @item files
18249 The value of this entry should be any number of file names.  These files
18250 are assumed to be score files as well, and will be loaded the same way
18251 this one was.
18252
18253 @item exclude-files
18254 The clue of this entry should be any number of files.  These files will
18255 not be loaded, even though they would normally be so, for some reason or
18256 other.
18257
18258 @item eval
18259 The value of this entry will be @code{eval}el.  This element will be
18260 ignored when handling global score files.
18261
18262 @item read-only
18263 Read-only score files will not be updated or saved.  Global score files
18264 should feature this atom (@pxref{Global Score Files}).  (Note:
18265 @dfn{Global} here really means @dfn{global}; not your personal
18266 apply-to-all-groups score files.)
18267
18268 @item orphan
18269 The value of this entry should be a number.  Articles that do not have
18270 parents will get this number added to their scores.  Imagine you follow
18271 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
18272 will only follow a few of the threads, also want to see any new threads.
18273
18274 You can do this with the following two score file entries:
18275
18276 @example
18277         (orphan -500)
18278         (mark-and-expunge -100)
18279 @end example
18280
18281 When you enter the group the first time, you will only see the new
18282 threads.  You then raise the score of the threads that you find
18283 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
18284 rest.  Next time you enter the group, you will see new articles in the
18285 interesting threads, plus any new threads.
18286
18287 I.e.---the orphan score atom is for high-volume groups where a few
18288 interesting threads which can't be found automatically by ordinary
18289 scoring rules exist.
18290
18291 @item adapt
18292 This entry controls the adaptive scoring.  If it is @code{t}, the
18293 default adaptive scoring rules will be used.  If it is @code{ignore}, no
18294 adaptive scoring will be performed on this group.  If it is a list, this
18295 list will be used as the adaptive scoring rules.  If it isn't present,
18296 or is something other than @code{t} or @code{ignore}, the default
18297 adaptive scoring rules will be used.  If you want to use adaptive
18298 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
18299 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
18300 not want adaptive scoring.  If you only want adaptive scoring in a few
18301 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
18302 insert @code{(adapt t)} in the score files of the groups where you want
18303 it.
18304
18305 @item adapt-file
18306 All adaptive score entries will go to the file named by this entry.  It
18307 will also be applied when entering the group.  This atom might be handy
18308 if you want to adapt on several groups at once, using the same adaptive
18309 file for a number of groups.
18310
18311 @item local
18312 @cindex local variables
18313 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
18314 Each @var{var} will be made buffer-local to the current summary buffer,
18315 and set to the value specified.  This is a convenient, if somewhat
18316 strange, way of setting variables in some groups if you don't like hooks
18317 much.  Note that the @var{value} won't be evaluated.
18318 @end table
18319
18320
18321 @node Score File Editing
18322 @section Score File Editing
18323
18324 You normally enter all scoring commands from the summary buffer, but you
18325 might feel the urge to edit them by hand as well, so we've supplied you
18326 with a mode for that.
18327
18328 It's simply a slightly customized @code{emacs-lisp} mode, with these
18329 additional commands:
18330
18331 @table @kbd
18332
18333 @item C-c C-c
18334 @kindex C-c C-c (Score)
18335 @findex gnus-score-edit-done
18336 Save the changes you have made and return to the summary buffer
18337 (@code{gnus-score-edit-done}).
18338
18339 @item C-c C-d
18340 @kindex C-c C-d (Score)
18341 @findex gnus-score-edit-insert-date
18342 Insert the current date in numerical format
18343 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
18344 you were wondering.
18345
18346 @item C-c C-p
18347 @kindex C-c C-p (Score)
18348 @findex gnus-score-pretty-print
18349 The adaptive score files are saved in an unformatted fashion.  If you
18350 intend to read one of these files, you want to @dfn{pretty print} it
18351 first.  This command (@code{gnus-score-pretty-print}) does that for
18352 you.
18353
18354 @end table
18355
18356 Type @kbd{M-x gnus-score-mode} to use this mode.
18357
18358 @vindex gnus-score-mode-hook
18359 @code{gnus-score-menu-hook} is run in score mode buffers.
18360
18361 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
18362 e} to begin editing score files.
18363
18364
18365 @node Adaptive Scoring
18366 @section Adaptive Scoring
18367 @cindex adaptive scoring
18368
18369 If all this scoring is getting you down, Gnus has a way of making it all
18370 happen automatically---as if by magic.  Or rather, as if by artificial
18371 stupidity, to be precise.
18372
18373 @vindex gnus-use-adaptive-scoring
18374 When you read an article, or mark an article as read, or kill an
18375 article, you leave marks behind.  On exit from the group, Gnus can sniff
18376 these marks and add score elements depending on what marks it finds.
18377 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
18378 @code{t} or @code{(line)}.  If you want score adaptively on separate
18379 words appearing in the subjects, you should set this variable to
18380 @code{(word)}.  If you want to use both adaptive methods, set this
18381 variable to @code{(word line)}.
18382
18383 @vindex gnus-default-adaptive-score-alist
18384 To give you complete control over the scoring process, you can customize
18385 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
18386 might look something like this:
18387
18388 @lisp
18389 (setq gnus-default-adaptive-score-alist
18390   '((gnus-unread-mark)
18391     (gnus-ticked-mark (from 4))
18392     (gnus-dormant-mark (from 5))
18393     (gnus-del-mark (from -4) (subject -1))
18394     (gnus-read-mark (from 4) (subject 2))
18395     (gnus-expirable-mark (from -1) (subject -1))
18396     (gnus-killed-mark (from -1) (subject -3))
18397     (gnus-kill-file-mark)
18398     (gnus-ancient-mark)
18399     (gnus-low-score-mark)
18400     (gnus-catchup-mark (from -1) (subject -1))))
18401 @end lisp
18402
18403 As you see, each element in this alist has a mark as a key (either a
18404 variable name or a ``real'' mark---a character).  Following this key is
18405 a arbitrary number of header/score pairs.  If there are no header/score
18406 pairs following the key, no adaptive scoring will be done on articles
18407 that have that key as the article mark.  For instance, articles with
18408 @code{gnus-unread-mark} in the example above will not get adaptive score
18409 entries.
18410
18411 Each article can have only one mark, so just a single of these rules
18412 will be applied to each article.
18413
18414 To take @code{gnus-del-mark} as an example---this alist says that all
18415 articles that have that mark (i.e., are marked with @samp{D}) will have a
18416 score entry added to lower based on the @code{From} header by -4, and
18417 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
18418
18419 If you have marked 10 articles with the same subject with
18420 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
18421 That means that that subject will get a score of ten times -1, which
18422 should be, unless I'm much mistaken, -10.
18423
18424 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
18425 the read articles will be marked with the @samp{E} mark.  This'll
18426 probably make adaptive scoring slightly impossible, so auto-expiring and
18427 adaptive scoring doesn't really mix very well.
18428
18429 The headers you can score on are @code{from}, @code{subject},
18430 @code{message-id}, @code{references}, @code{xref}, @code{lines},
18431 @code{chars} and @code{date}.  In addition, you can score on
18432 @code{followup}, which will create an adaptive score entry that matches
18433 on the @code{References} header using the @code{Message-ID} of the
18434 current article, thereby matching the following thread.
18435
18436 If you use this scheme, you should set the score file atom @code{mark}
18437 to something small---like -300, perhaps, to avoid having small random
18438 changes result in articles getting marked as read.
18439
18440 After using adaptive scoring for a week or so, Gnus should start to
18441 become properly trained and enhance the authors you like best, and kill
18442 the authors you like least, without you having to say so explicitly.
18443
18444 You can control what groups the adaptive scoring is to be performed on
18445 by using the score files (@pxref{Score File Format}).  This will also
18446 let you use different rules in different groups.
18447
18448 @vindex gnus-adaptive-file-suffix
18449 The adaptive score entries will be put into a file where the name is the
18450 group name with @code{gnus-adaptive-file-suffix} appended.  The default
18451 is @samp{ADAPT}.
18452
18453 @vindex gnus-score-exact-adapt-limit
18454 When doing adaptive scoring, substring or fuzzy matching would probably
18455 give you the best results in most cases.  However, if the header one
18456 matches is short, the possibility for false positives is great, so if
18457 the length of the match is less than
18458 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
18459 this variable is @code{nil}, exact matching will always be used to avoid
18460 this problem.
18461
18462 @vindex gnus-default-adaptive-word-score-alist
18463 As mentioned above, you can adapt either on individual words or entire
18464 headers.  If you adapt on words, the
18465 @code{gnus-default-adaptive-word-score-alist} variable says what score
18466 each instance of a word should add given a mark.
18467
18468 @lisp
18469 (setq gnus-default-adaptive-word-score-alist
18470       `((,gnus-read-mark . 30)
18471         (,gnus-catchup-mark . -10)
18472         (,gnus-killed-mark . -20)
18473         (,gnus-del-mark . -15)))
18474 @end lisp
18475
18476 This is the default value.  If you have adaption on words enabled, every
18477 word that appears in subjects of articles marked with
18478 @code{gnus-read-mark} will result in a score rule that increase the
18479 score with 30 points.
18480
18481 @vindex gnus-default-ignored-adaptive-words
18482 @vindex gnus-ignored-adaptive-words
18483 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
18484 will be ignored.  If you wish to add more words to be ignored, use the
18485 @code{gnus-ignored-adaptive-words} list instead.
18486
18487 @vindex gnus-adaptive-word-length-limit
18488 Some may feel that short words shouldn't count when doing adaptive
18489 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
18490 an integer.  Words shorter than this number will be ignored.  This
18491 variable defaults to @code{nil}.
18492
18493 @vindex gnus-adaptive-word-syntax-table
18494 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
18495 syntax table in effect.  It is similar to the standard syntax table, but
18496 it considers numbers to be non-word-constituent characters.
18497
18498 @vindex gnus-adaptive-word-minimum
18499 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
18500 word scoring process will never bring down the score of an article to
18501 below this number.  The default is @code{nil}.
18502
18503 @vindex gnus-adaptive-word-no-group-words
18504 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
18505 won't adaptively word score any of the words in the group name.  Useful
18506 for groups like @samp{comp.editors.emacs}, where most of the subject
18507 lines contain the word @samp{emacs}.
18508
18509 After using this scheme for a while, it might be nice to write a
18510 @code{gnus-psychoanalyze-user} command to go through the rules and see
18511 what words you like and what words you don't like.  Or perhaps not.
18512
18513 Note that the adaptive word scoring thing is highly experimental and is
18514 likely to change in the future.  Initial impressions seem to indicate
18515 that it's totally useless as it stands.  Some more work (involving more
18516 rigorous statistical methods) will have to be done to make this useful.
18517
18518
18519 @node Home Score File
18520 @section Home Score File
18521
18522 The score file where new score file entries will go is called the
18523 @dfn{home score file}.  This is normally (and by default) the score file
18524 for the group itself.  For instance, the home score file for
18525 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
18526
18527 However, this may not be what you want.  It is often convenient to share
18528 a common home score file among many groups---all @samp{emacs} groups
18529 could perhaps use the same home score file.
18530
18531 @vindex gnus-home-score-file
18532 The variable that controls this is @code{gnus-home-score-file}.  It can
18533 be:
18534
18535 @enumerate
18536 @item
18537 A string.  Then this file will be used as the home score file for all
18538 groups.
18539
18540 @item
18541 A function.  The result of this function will be used as the home score
18542 file.  The function will be called with the name of the group as the
18543 parameter.
18544
18545 @item
18546 A list.  The elements in this list can be:
18547
18548 @enumerate
18549 @item
18550 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
18551 group name, the @var{file-name} will be used as the home score file.
18552
18553 @item
18554 A function.  If the function returns non-nil, the result will be used as
18555 the home score file.
18556
18557 @item
18558 A string.  Use the string as the home score file.
18559 @end enumerate
18560
18561 The list will be traversed from the beginning towards the end looking
18562 for matches.
18563
18564 @end enumerate
18565
18566 So, if you want to use just a single score file, you could say:
18567
18568 @lisp
18569 (setq gnus-home-score-file
18570       "my-total-score-file.SCORE")
18571 @end lisp
18572
18573 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
18574 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
18575
18576 @findex gnus-hierarchial-home-score-file
18577 @lisp
18578 (setq gnus-home-score-file
18579       'gnus-hierarchial-home-score-file)
18580 @end lisp
18581
18582 This is a ready-made function provided for your convenience.
18583 Other functions include
18584
18585 @table @code
18586 @item gnus-current-home-score-file
18587 @findex gnus-current-home-score-file
18588 Return the ``current'' regular score file.  This will make scoring
18589 commands add entry to the ``innermost'' matching score file.
18590
18591 @end table
18592
18593 If you want to have one score file for the @samp{emacs} groups and
18594 another for the @samp{comp} groups, while letting all other groups use
18595 their own home score files:
18596
18597 @lisp
18598 (setq gnus-home-score-file
18599       ;; All groups that match the regexp "\\.emacs"
18600       '(("\\.emacs" "emacs.SCORE")
18601         ;; All the comp groups in one score file
18602         ("^comp" "comp.SCORE")))
18603 @end lisp
18604
18605 @vindex gnus-home-adapt-file
18606 @code{gnus-home-adapt-file} works exactly the same way as
18607 @code{gnus-home-score-file}, but says what the home adaptive score file
18608 is instead.  All new adaptive file entries will go into the file
18609 specified by this variable, and the same syntax is allowed.
18610
18611 In addition to using @code{gnus-home-score-file} and
18612 @code{gnus-home-adapt-file}, you can also use group parameters
18613 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
18614 Parameters}) to achieve much the same.  Group and topic parameters take
18615 precedence over this variable.
18616
18617
18618 @node Followups To Yourself
18619 @section Followups To Yourself
18620
18621 Gnus offers two commands for picking out the @code{Message-ID} header in
18622 the current buffer.  Gnus will then add a score rule that scores using
18623 this @code{Message-ID} on the @code{References} header of other
18624 articles.  This will, in effect, increase the score of all articles that
18625 respond to the article in the current buffer.  Quite useful if you want
18626 to easily note when people answer what you've said.
18627
18628 @table @code
18629
18630 @item gnus-score-followup-article
18631 @findex gnus-score-followup-article
18632 This will add a score to articles that directly follow up your own
18633 article.
18634
18635 @item gnus-score-followup-thread
18636 @findex gnus-score-followup-thread
18637 This will add a score to all articles that appear in a thread ``below''
18638 your own article.
18639 @end table
18640
18641 @vindex message-sent-hook
18642 These two functions are both primarily meant to be used in hooks like
18643 @code{message-sent-hook}, like this:
18644 @lisp
18645 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
18646 @end lisp
18647
18648
18649 If you look closely at your own @code{Message-ID}, you'll notice that
18650 the first two or three characters are always the same.  Here's two of
18651 mine:
18652
18653 @example
18654 <x6u3u47icf.fsf@@eyesore.no>
18655 <x6sp9o7ibw.fsf@@eyesore.no>
18656 @end example
18657
18658 So ``my'' ident on this machine is @samp{x6}.  This can be
18659 exploited---the following rule will raise the score on all followups to
18660 myself:
18661
18662 @lisp
18663 ("references"
18664  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
18665   1000 nil r))
18666 @end lisp
18667
18668 Whether it's the first two or first three characters that are ``yours''
18669 is system-dependent.
18670
18671
18672 @node Scoring On Other Headers
18673 @section Scoring On Other Headers
18674 @cindex scoring on other headers
18675
18676 Gnus is quite fast when scoring the ``traditional''
18677 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
18678 other headers requires writing a @code{head} scoring rule, which means
18679 that Gnus has to request every single article from the back end to find
18680 matches.  This takes a long time in big groups.
18681
18682 Now, there's not much you can do about this for news groups, but for
18683 mail groups, you have greater control.  In the @pxref{To From
18684 Newsgroups} section of the manual, it's explained in greater detail what
18685 this mechanism does, but here's a cookbook example for @code{nnml} on
18686 how to allow scoring on the @samp{To} and @samp{Cc} headers.
18687
18688 Put the following in your @file{.gnus.el} file.
18689
18690 @lisp
18691 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
18692       nnmail-extra-headers gnus-extra-headers)
18693 @end lisp
18694
18695 Restart Gnus and rebuild your @code{nnml} overview files with the
18696 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
18697 time if you have much mail.
18698
18699 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
18700 so: @kbd{I e s p To RET <your name> RET}.
18701
18702 See?  Simple.
18703
18704
18705 @node Scoring Tips
18706 @section Scoring Tips
18707 @cindex scoring tips
18708
18709 @table @dfn
18710
18711 @item Crossposts
18712 @cindex crossposts
18713 @cindex scoring crossposts
18714 If you want to lower the score of crossposts, the line to match on is
18715 the @code{Xref} header.
18716 @lisp
18717 ("xref" (" talk.politics.misc:" -1000))
18718 @end lisp
18719
18720 @item Multiple crossposts
18721 If you want to lower the score of articles that have been crossposted to
18722 more than, say, 3 groups:
18723 @lisp
18724 ("xref"
18725   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
18726    -1000 nil r))
18727 @end lisp
18728
18729 @item Matching on the body
18730 This is generally not a very good idea---it takes a very long time.
18731 Gnus actually has to fetch each individual article from the server.  But
18732 you might want to anyway, I guess.  Even though there are three match
18733 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
18734 and stick with it in each score file.  If you use any two, each article
18735 will be fetched @emph{twice}.  If you want to match a bit on the
18736 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
18737 the matches.
18738
18739 @item Marking as read
18740 You will probably want to mark articles that have scores below a certain
18741 number as read.  This is most easily achieved by putting the following
18742 in your @file{all.SCORE} file:
18743 @lisp
18744 ((mark -100))
18745 @end lisp
18746 You may also consider doing something similar with @code{expunge}.
18747
18748 @item Negated character classes
18749 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
18750 That will match newlines, which might lead to, well, The Unknown.  Say
18751 @code{[^abcd\n]*} instead.
18752 @end table
18753
18754
18755 @node Reverse Scoring
18756 @section Reverse Scoring
18757 @cindex reverse scoring
18758
18759 If you want to keep just articles that have @samp{Sex with Emacs} in the
18760 subject header, and expunge all other articles, you could put something
18761 like this in your score file:
18762
18763 @lisp
18764 (("subject"
18765   ("Sex with Emacs" 2))
18766  (mark 1)
18767  (expunge 1))
18768 @end lisp
18769
18770 So, you raise all articles that match @samp{Sex with Emacs} and mark the
18771 rest as read, and expunge them to boot.
18772
18773
18774 @node Global Score Files
18775 @section Global Score Files
18776 @cindex global score files
18777
18778 Sure, other newsreaders have ``global kill files''.  These are usually
18779 nothing more than a single kill file that applies to all groups, stored
18780 in the user's home directory.  Bah!  Puny, weak newsreaders!
18781
18782 What I'm talking about here are Global Score Files.  Score files from
18783 all over the world, from users everywhere, uniting all nations in one
18784 big, happy score file union!  Ange-score!  New and untested!
18785
18786 @vindex gnus-global-score-files
18787 All you have to do to use other people's score files is to set the
18788 @code{gnus-global-score-files} variable.  One entry for each score file,
18789 or each score file directory.  Gnus will decide by itself what score
18790 files are applicable to which group.
18791
18792 To use the score file
18793 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
18794 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
18795 say this:
18796
18797 @lisp
18798 (setq gnus-global-score-files
18799       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
18800         "/ftp@@ftp.some-where:/pub/score/"))
18801 @end lisp
18802
18803 @findex gnus-score-search-global-directories
18804 @noindent
18805 Simple, eh?  Directory names must end with a @samp{/}.  These
18806 directories are typically scanned only once during each Gnus session.
18807 If you feel the need to manually re-scan the remote directories, you can
18808 use the @code{gnus-score-search-global-directories} command.
18809
18810 Note that, at present, using this option will slow down group entry
18811 somewhat.  (That is---a lot.)
18812
18813 If you want to start maintaining score files for other people to use,
18814 just put your score file up for anonymous ftp and announce it to the
18815 world.  Become a retro-moderator!  Participate in the retro-moderator
18816 wars sure to ensue, where retro-moderators battle it out for the
18817 sympathy of the people, luring them to use their score files on false
18818 premises!  Yay!  The net is saved!
18819
18820 Here are some tips for the would-be retro-moderator, off the top of my
18821 head:
18822
18823 @itemize @bullet
18824
18825 @item
18826 Articles heavily crossposted are probably junk.
18827 @item
18828 To lower a single inappropriate article, lower by @code{Message-ID}.
18829 @item
18830 Particularly brilliant authors can be raised on a permanent basis.
18831 @item
18832 Authors that repeatedly post off-charter for the group can safely be
18833 lowered out of existence.
18834 @item
18835 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
18836 articles completely.
18837
18838 @item
18839 Use expiring score entries to keep the size of the file down.  You
18840 should probably have a long expiry period, though, as some sites keep
18841 old articles for a long time.
18842 @end itemize
18843
18844 ... I wonder whether other newsreaders will support global score files
18845 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
18846 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
18847 holding our breath yet?
18848
18849
18850 @node Kill Files
18851 @section Kill Files
18852 @cindex kill files
18853
18854 Gnus still supports those pesky old kill files.  In fact, the kill file
18855 entries can now be expiring, which is something I wrote before Daniel
18856 Quinlan thought of doing score files, so I've left the code in there.
18857
18858 In short, kill processing is a lot slower (and I do mean @emph{a lot})
18859 than score processing, so it might be a good idea to rewrite your kill
18860 files into score files.
18861
18862 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
18863 forms into this file, which means that you can use kill files as some
18864 sort of primitive hook function to be run on group entry, even though
18865 that isn't a very good idea.
18866
18867 Normal kill files look like this:
18868
18869 @lisp
18870 (gnus-kill "From" "Lars Ingebrigtsen")
18871 (gnus-kill "Subject" "ding")
18872 (gnus-expunge "X")
18873 @end lisp
18874
18875 This will mark every article written by me as read, and remove the
18876 marked articles from the summary buffer.  Very useful, you'll agree.
18877
18878 Other programs use a totally different kill file syntax.  If Gnus
18879 encounters what looks like a @code{rn} kill file, it will take a stab at
18880 interpreting it.
18881
18882 Two summary functions for editing a GNUS kill file:
18883
18884 @table @kbd
18885
18886 @item M-k
18887 @kindex M-k (Summary)
18888 @findex gnus-summary-edit-local-kill
18889 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
18890
18891 @item M-K
18892 @kindex M-K (Summary)
18893 @findex gnus-summary-edit-global-kill
18894 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
18895 @end table
18896
18897 Two group mode functions for editing the kill files:
18898
18899 @table @kbd
18900
18901 @item M-k
18902 @kindex M-k (Group)
18903 @findex gnus-group-edit-local-kill
18904 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
18905
18906 @item M-K
18907 @kindex M-K (Group)
18908 @findex gnus-group-edit-global-kill
18909 Edit the general kill file (@code{gnus-group-edit-global-kill}).
18910 @end table
18911
18912 Kill file variables:
18913
18914 @table @code
18915 @item gnus-kill-file-name
18916 @vindex gnus-kill-file-name
18917 A kill file for the group @samp{soc.motss} is normally called
18918 @file{soc.motss.KILL}.  The suffix appended to the group name to get
18919 this file name is detailed by the @code{gnus-kill-file-name} variable.
18920 The ``global'' kill file (not in the score file sense of ``global'', of
18921 course) is just called @file{KILL}.
18922
18923 @vindex gnus-kill-save-kill-file
18924 @item gnus-kill-save-kill-file
18925 If this variable is non-@code{nil}, Gnus will save the
18926 kill file after processing, which is necessary if you use expiring
18927 kills.
18928
18929 @item gnus-apply-kill-hook
18930 @vindex gnus-apply-kill-hook
18931 @findex gnus-apply-kill-file-unless-scored
18932 @findex gnus-apply-kill-file
18933 A hook called to apply kill files to a group.  It is
18934 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
18935 kill file if you have a score file for the same group, you can set this
18936 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
18937 kill files to be processed, you should set this variable to @code{nil}.
18938
18939 @item gnus-kill-file-mode-hook
18940 @vindex gnus-kill-file-mode-hook
18941 A hook called in kill-file mode buffers.
18942
18943 @end table
18944
18945
18946 @node Converting Kill Files
18947 @section Converting Kill Files
18948 @cindex kill files
18949 @cindex converting kill files
18950
18951 If you have loads of old kill files, you may want to convert them into
18952 score files.  If they are ``regular'', you can use
18953 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
18954 by hand.
18955
18956 The kill to score conversion package isn't included in Gnus by default.
18957 You can fetch it from
18958 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
18959
18960 If your old kill files are very complex---if they contain more
18961 non-@code{gnus-kill} forms than not, you'll have to convert them by
18962 hand.  Or just let them be as they are.  Gnus will still use them as
18963 before.
18964
18965
18966 @node GroupLens
18967 @section GroupLens
18968 @cindex GroupLens
18969
18970 GroupLens (@uref{http://www.cs.umn.edu/Research/GroupLens/}) is a
18971 collaborative filtering system that helps you work together with other
18972 people to find the quality news articles out of the huge volume of
18973 news articles generated every day.
18974
18975 To accomplish this the GroupLens system combines your opinions about
18976 articles you have already read with the opinions of others who have done
18977 likewise and gives you a personalized prediction for each unread news
18978 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
18979 rate articles, and finds other people that rate articles the same way.
18980 Once it has found some people you agree with it tells you, in the form
18981 of a prediction, what they thought of the article.  You can use this
18982 prediction to help you decide whether or not you want to read the
18983 article.
18984
18985 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
18986 so this section is mostly of historical interest.
18987
18988 @menu
18989 * Using GroupLens::             How to make Gnus use GroupLens.
18990 * Rating Articles::             Letting GroupLens know how you rate articles.
18991 * Displaying Predictions::      Displaying predictions given by GroupLens.
18992 * GroupLens Variables::         Customizing GroupLens.
18993 @end menu
18994
18995
18996 @node Using GroupLens
18997 @subsection Using GroupLens
18998
18999 To use GroupLens you must register a pseudonym with your local Better
19000 Bit Bureau (BBB).
19001 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
19002 better bit in town at the moment.
19003
19004 Once you have registered you'll need to set a couple of variables.
19005
19006 @table @code
19007
19008 @item gnus-use-grouplens
19009 @vindex gnus-use-grouplens
19010 Setting this variable to a non-@code{nil} value will make Gnus hook into
19011 all the relevant GroupLens functions.
19012
19013 @item grouplens-pseudonym
19014 @vindex grouplens-pseudonym
19015 This variable should be set to the pseudonym you got when registering
19016 with the Better Bit Bureau.
19017
19018 @item grouplens-newsgroups
19019 @vindex grouplens-newsgroups
19020 A list of groups that you want to get GroupLens predictions for.
19021
19022 @end table
19023
19024 That's the minimum of what you need to get up and running with GroupLens.
19025 Once you've registered, GroupLens will start giving you scores for
19026 articles based on the average of what other people think.  But, to get
19027 the real benefit of GroupLens you need to start rating articles
19028 yourself.  Then the scores GroupLens gives you will be personalized for
19029 you, based on how the people you usually agree with have already rated.
19030
19031
19032 @node Rating Articles
19033 @subsection Rating Articles
19034
19035 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19036 Where 1 means something like this article is a waste of bandwidth and 5
19037 means that the article was really good.  The basic question to ask
19038 yourself is, "on a scale from 1 to 5 would I like to see more articles
19039 like this one?"
19040
19041 There are four ways to enter a rating for an article in GroupLens.
19042
19043 @table @kbd
19044
19045 @item r
19046 @kindex r (GroupLens)
19047 @findex bbb-summary-rate-article
19048 This function will prompt you for a rating on a scale of one to five.
19049
19050 @item k
19051 @kindex k (GroupLens)
19052 @findex grouplens-score-thread
19053 This function will prompt you for a rating, and rate all the articles in
19054 the thread.  This is really useful for some of those long running giant
19055 threads in rec.humor.
19056
19057 @end table
19058
19059 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19060 the score of the article you're reading.
19061
19062 @table @kbd
19063
19064 @item 1-5 n
19065 @kindex n (GroupLens)
19066 @findex grouplens-next-unread-article
19067 Rate the article and go to the next unread article.
19068
19069 @item 1-5 ,
19070 @kindex , (GroupLens)
19071 @findex grouplens-best-unread-article
19072 Rate the article and go to the next unread article with the highest score.
19073
19074 @end table
19075
19076 If you want to give the current article a score of 4 and then go to the
19077 next article, just type @kbd{4 n}.
19078
19079
19080 @node Displaying Predictions
19081 @subsection Displaying Predictions
19082
19083 GroupLens makes a prediction for you about how much you will like a
19084 news article.  The predictions from GroupLens are on a scale from 1 to
19085 5, where 1 is the worst and 5 is the best.  You can use the predictions
19086 from GroupLens in one of three ways controlled by the variable
19087 @code{gnus-grouplens-override-scoring}.
19088
19089 @vindex gnus-grouplens-override-scoring
19090 There are three ways to display predictions in grouplens.  You may
19091 choose to have the GroupLens scores contribute to, or override the
19092 regular gnus scoring mechanism.  override is the default; however, some
19093 people prefer to see the Gnus scores plus the grouplens scores.  To get
19094 the separate scoring behavior you need to set
19095 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19096 GroupLens predictions combined with the grouplens scores set it to
19097 @code{'override} and to combine the scores set
19098 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19099 the combine option you will also want to set the values for
19100 @code{grouplens-prediction-offset} and
19101 @code{grouplens-score-scale-factor}.
19102
19103 @vindex grouplens-prediction-display
19104 In either case, GroupLens gives you a few choices for how you would like
19105 to see your predictions displayed.  The display of predictions is
19106 controlled by the @code{grouplens-prediction-display} variable.
19107
19108 The following are valid values for that variable.
19109
19110 @table @code
19111 @item prediction-spot
19112 The higher the prediction, the further to the right an @samp{*} is
19113 displayed.
19114
19115 @item confidence-interval
19116 A numeric confidence interval.
19117
19118 @item prediction-bar
19119 The higher the prediction, the longer the bar.
19120
19121 @item confidence-bar
19122 Numerical confidence.
19123
19124 @item confidence-spot
19125 The spot gets bigger with more confidence.
19126
19127 @item prediction-num
19128 Plain-old numeric value.
19129
19130 @item confidence-plus-minus
19131 Prediction +/- confidence.
19132
19133 @end table
19134
19135
19136 @node GroupLens Variables
19137 @subsection GroupLens Variables
19138
19139 @table @code
19140
19141 @item gnus-summary-grouplens-line-format
19142 The summary line format used in GroupLens-enhanced summary buffers.  It
19143 accepts the same specs as the normal summary line format (@pxref{Summary
19144 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
19145 %s\n}.
19146
19147 @item grouplens-bbb-host
19148 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
19149 default.
19150
19151 @item grouplens-bbb-port
19152 Port of the host running the bbbd server.  The default is 9000.
19153
19154 @item grouplens-score-offset
19155 Offset the prediction by this value.  In other words, subtract the
19156 prediction value by this number to arrive at the effective score.  The
19157 default is 0.
19158
19159 @item grouplens-score-scale-factor
19160 This variable allows the user to magnify the effect of GroupLens scores.
19161 The scale factor is applied after the offset.  The default is 1.
19162
19163 @end table
19164
19165
19166 @node Advanced Scoring
19167 @section Advanced Scoring
19168
19169 Scoring on Subjects and From headers is nice enough, but what if you're
19170 really interested in what a person has to say only when she's talking
19171 about a particular subject?  Or what if you really don't want to
19172 read what person A has to say when she's following up to person B, but
19173 want to read what she says when she's following up to person C?
19174
19175 By using advanced scoring rules you may create arbitrarily complex
19176 scoring patterns.
19177
19178 @menu
19179 * Advanced Scoring Syntax::     A definition.
19180 * Advanced Scoring Examples::   What they look like.
19181 * Advanced Scoring Tips::       Getting the most out of it.
19182 @end menu
19183
19184
19185 @node Advanced Scoring Syntax
19186 @subsection Advanced Scoring Syntax
19187
19188 Ordinary scoring rules have a string as the first element in the rule.
19189 Advanced scoring rules have a list as the first element.  The second
19190 element is the score to be applied if the first element evaluated to a
19191 non-@code{nil} value.
19192
19193 These lists may consist of three logical operators, one redirection
19194 operator, and various match operators.
19195
19196 Logical operators:
19197
19198 @table @code
19199 @item &
19200 @itemx and
19201 This logical operator will evaluate each of its arguments until it finds
19202 one that evaluates to @code{false}, and then it'll stop.  If all arguments
19203 evaluate to @code{true} values, then this operator will return
19204 @code{true}.
19205
19206 @item |
19207 @itemx or
19208 This logical operator will evaluate each of its arguments until it finds
19209 one that evaluates to @code{true}.  If no arguments are @code{true},
19210 then this operator will return @code{false}.
19211
19212 @item !
19213 @itemx not
19214 @itemx Â¬
19215 This logical operator only takes a single argument.  It returns the
19216 logical negation of the value of its argument.
19217
19218 @end table
19219
19220 There is an @dfn{indirection operator} that will make its arguments
19221 apply to the ancestors of the current article being scored.  For
19222 instance, @code{1-} will make score rules apply to the parent of the
19223 current article.  @code{2-} will make score rules apply to the
19224 grandparent of the current article.  Alternatively, you can write
19225 @code{^^}, where the number of @code{^}s (carets) says how far back into
19226 the ancestry you want to go.
19227
19228 Finally, we have the match operators.  These are the ones that do the
19229 real work.  Match operators are header name strings followed by a match
19230 and a match type.  A typical match operator looks like @samp{("from"
19231 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
19232 simple scoring, and the match types are also the same.
19233
19234
19235 @node Advanced Scoring Examples
19236 @subsection Advanced Scoring Examples
19237
19238 Please note that the following examples are score file rules.  To
19239 make a complete score file from them, surround them with another pair
19240 of parentheses.
19241
19242 Let's say you want to increase the score of articles written by Lars
19243 when he's talking about Gnus:
19244
19245 @example
19246 ((&
19247   ("from" "Lars Ingebrigtsen")
19248   ("subject" "Gnus"))
19249  1000)
19250 @end example
19251
19252 Quite simple, huh?
19253
19254 When he writes long articles, he sometimes has something nice to say:
19255
19256 @example
19257 ((&
19258   ("from" "Lars Ingebrigtsen")
19259   (|
19260    ("subject" "Gnus")
19261    ("lines" 100 >)))
19262  1000)
19263 @end example
19264
19265 However, when he responds to things written by Reig Eigil Logge, you
19266 really don't want to read what he's written:
19267
19268 @example
19269 ((&
19270   ("from" "Lars Ingebrigtsen")
19271   (1- ("from" "Reig Eigir Logge")))
19272  -100000)
19273 @end example
19274
19275 Everybody that follows up Redmondo when he writes about disappearing
19276 socks should have their scores raised, but only when they talk about
19277 white socks.  However, when Lars talks about socks, it's usually not
19278 very interesting:
19279
19280 @example
19281 ((&
19282   (1-
19283    (&
19284     ("from" "redmondo@@.*no" r)
19285     ("body" "disappearing.*socks" t)))
19286   (! ("from" "Lars Ingebrigtsen"))
19287   ("body" "white.*socks"))
19288  1000)
19289 @end example
19290
19291 The possibilities are endless.
19292
19293
19294 @node Advanced Scoring Tips
19295 @subsection Advanced Scoring Tips
19296
19297 The @code{&} and @code{|} logical operators do short-circuit logic.
19298 That is, they stop processing their arguments when it's clear what the
19299 result of the operation will be.  For instance, if one of the arguments
19300 of an @code{&} evaluates to @code{false}, there's no point in evaluating
19301 the rest of the arguments.  This means that you should put slow matches
19302 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
19303 @samp{subject}) first.
19304
19305 The indirection arguments (@code{1-} and so on) will make their
19306 arguments work on previous generations of the thread.  If you say
19307 something like:
19308
19309 @example
19310 ...
19311 (1-
19312  (1-
19313   ("from" "lars")))
19314 ...
19315 @end example
19316
19317 Then that means "score on the from header of the grandparent of the
19318 current article".  An indirection is quite fast, but it's better to say:
19319
19320 @example
19321 (1-
19322  (&
19323   ("from" "Lars")
19324   ("subject" "Gnus")))
19325 @end example
19326
19327 than it is to say:
19328
19329 @example
19330 (&
19331  (1- ("from" "Lars"))
19332  (1- ("subject" "Gnus")))
19333 @end example
19334
19335
19336 @node Score Decays
19337 @section Score Decays
19338 @cindex score decays
19339 @cindex decays
19340
19341 You may find that your scores have a tendency to grow without
19342 bounds, especially if you're using adaptive scoring.  If scores get too
19343 big, they lose all meaning---they simply max out and it's difficult to
19344 use them in any sensible way.
19345
19346 @vindex gnus-decay-scores
19347 @findex gnus-decay-score
19348 @vindex gnus-decay-score-function
19349 Gnus provides a mechanism for decaying scores to help with this problem.
19350 When score files are loaded and @code{gnus-decay-scores} is
19351 non-@code{nil}, Gnus will run the score files through the decaying
19352 mechanism thereby lowering the scores of all non-permanent score rules.
19353 The decay itself if performed by the @code{gnus-decay-score-function}
19354 function, which is @code{gnus-decay-score} by default.  Here's the
19355 definition of that function:
19356
19357 @lisp
19358 (defun gnus-decay-score (score)
19359   "Decay SCORE.
19360 This is done according to `gnus-score-decay-constant'
19361 and `gnus-score-decay-scale'."
19362   (floor
19363    (- score
19364       (* (if (< score 0) 1 -1)
19365          (min (abs score)
19366               (max gnus-score-decay-constant
19367                    (* (abs score)
19368                       gnus-score-decay-scale)))))))
19369 @end lisp
19370
19371 @vindex gnus-score-decay-scale
19372 @vindex gnus-score-decay-constant
19373 @code{gnus-score-decay-constant} is 3 by default and
19374 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
19375
19376 @enumerate
19377 @item
19378 Scores between -3 and 3 will be set to 0 when this function is called.
19379
19380 @item
19381 Scores with magnitudes between 3 and 60 will be shrunk by 3.
19382
19383 @item
19384 Scores with magnitudes greater than 60 will be shrunk by 5% of the
19385 score.
19386 @end enumerate
19387
19388 If you don't like this decay function, write your own.  It is called
19389 with the score to be decayed as its only parameter, and it should return
19390 the new score, which should be an integer.
19391
19392 Gnus will try to decay scores once a day.  If you haven't run Gnus for
19393 four days, Gnus will decay the scores four times, for instance.
19394
19395 @iftex
19396 @iflatex
19397 @chapter Message
19398 @include message.texi
19399 @chapter Emacs MIME
19400 @include emacs-mime.texi
19401 @chapter Sieve
19402 @include sieve.texi
19403 @c @chapter PGG
19404 @c @include pgg.texi
19405 @end iflatex
19406 @end iftex
19407
19408 @node Various
19409 @chapter Various
19410
19411 @menu
19412 * Process/Prefix::              A convention used by many treatment commands.
19413 * Interactive::                 Making Gnus ask you many questions.
19414 * Symbolic Prefixes::           How to supply some Gnus functions with options.
19415 * Formatting Variables::        You can specify what buffers should look like.
19416 * Window Layout::               Configuring the Gnus buffer windows.
19417 * Faces and Fonts::             How to change how faces look.
19418 * Compilation::                 How to speed Gnus up.
19419 * Mode Lines::                  Displaying information in the mode lines.
19420 * Highlighting and Menus::      Making buffers look all nice and cozy.
19421 * Buttons::                     Get tendinitis in ten easy steps!
19422 * Daemons::                     Gnus can do things behind your back.
19423 * NoCeM::                       How to avoid spam and other fatty foods.
19424 * Undo::                        Some actions can be undone.
19425 * Predicate Specifiers::        Specifying predicates.
19426 * Moderation::                  What to do if you're a moderator.
19427 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
19428 * Fuzzy Matching::              What's the big fuzz?
19429 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
19430 * Various Various::             Things that are really various.
19431 @end menu
19432
19433
19434 @node Process/Prefix
19435 @section Process/Prefix
19436 @cindex process/prefix convention
19437
19438 Many functions, among them functions for moving, decoding and saving
19439 articles, use what is known as the @dfn{Process/Prefix convention}.
19440
19441 This is a method for figuring out what articles the user wants the
19442 command to be performed on.
19443
19444 It goes like this:
19445
19446 If the numeric prefix is N, perform the operation on the next N
19447 articles, starting with the current one.  If the numeric prefix is
19448 negative, perform the operation on the previous N articles, starting
19449 with the current one.
19450
19451 @vindex transient-mark-mode
19452 If @code{transient-mark-mode} in non-@code{nil} and the region is
19453 active, all articles in the region will be worked upon.
19454
19455 If there is no numeric prefix, but some articles are marked with the
19456 process mark, perform the operation on the articles marked with
19457 the process mark.
19458
19459 If there is neither a numeric prefix nor any articles marked with the
19460 process mark, just perform the operation on the current article.
19461
19462 Quite simple, really, but it needs to be made clear so that surprises
19463 are avoided.
19464
19465 Commands that react to the process mark will push the current list of
19466 process marked articles onto a stack and will then clear all process
19467 marked articles.  You can restore the previous configuration with the
19468 @kbd{M P y} command (@pxref{Setting Process Marks}).
19469
19470 @vindex gnus-summary-goto-unread
19471 One thing that seems to shock & horrify lots of people is that, for
19472 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
19473 Since each @kbd{d} (which marks the current article as read) by default
19474 goes to the next unread article after marking, this means that @kbd{3 d}
19475 will mark the next three unread articles as read, no matter what the
19476 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
19477 @code{nil} for a more straightforward action.
19478
19479 Many commands do not use the process/prefix convention.  All commands
19480 that do explicitly say so in this manual.  To apply the process/prefix
19481 convention to commands that do not use it, you can use the @kbd{M-&}
19482 command.  For instance, to mark all the articles in the group as
19483 expirable, you could say `M P b M-& E'.
19484
19485
19486 @node Interactive
19487 @section Interactive
19488 @cindex interaction
19489
19490 @table @code
19491
19492 @item gnus-novice-user
19493 @vindex gnus-novice-user
19494 If this variable is non-@code{nil}, you are either a newcomer to the
19495 World of Usenet, or you are very cautious, which is a nice thing to be,
19496 really.  You will be given questions of the type ``Are you sure you want
19497 to do this?'' before doing anything dangerous.  This is @code{t} by
19498 default.
19499
19500 @item gnus-expert-user
19501 @vindex gnus-expert-user
19502 If this variable is non-@code{nil}, you will seldom be asked any
19503 questions by Gnus.  It will simply assume you know what you're doing, no
19504 matter how strange.
19505
19506 @item gnus-interactive-catchup
19507 @vindex gnus-interactive-catchup
19508 Require confirmation before catching up a group if non-@code{nil}.  It
19509 is @code{t} by default.
19510
19511 @item gnus-interactive-exit
19512 @vindex gnus-interactive-exit
19513 Require confirmation before exiting Gnus.  This variable is @code{t} by
19514 default.
19515 @end table
19516
19517
19518 @node Symbolic Prefixes
19519 @section Symbolic Prefixes
19520 @cindex symbolic prefixes
19521
19522 Quite a lot of Emacs commands react to the (numeric) prefix.  For
19523 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
19524 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
19525 rule of 900 to the current article.
19526
19527 This is all nice and well, but what if you want to give a command some
19528 additional information?  Well, what most commands do is interpret the
19529 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
19530 doesn't want a backup file to be created when saving the current buffer,
19531 for instance.  But what if you want to save without making a backup
19532 file, and you want Emacs to flash lights and play a nice tune at the
19533 same time?  You can't, and you're probably perfectly happy that way.
19534
19535 @kindex M-i (Summary)
19536 @findex gnus-symbolic-argument
19537 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
19538 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
19539 character typed in is the value.  You can stack as many @kbd{M-i}
19540 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
19541 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
19542 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
19543 @code{b}''.  You get the drift.
19544
19545 Typing in symbolic prefixes to commands that don't accept them doesn't
19546 hurt, but it doesn't do any good either.  Currently not many Gnus
19547 functions make use of the symbolic prefix.
19548
19549 If you're interested in how Gnus implements this, @pxref{Extended
19550 Interactive}.
19551
19552
19553 @node Formatting Variables
19554 @section Formatting Variables
19555 @cindex formatting variables
19556
19557 Throughout this manual you've probably noticed lots of variables called
19558 things like @code{gnus-group-line-format} and
19559 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
19560 output lines in the various buffers.  There's quite a lot of them.
19561 Fortunately, they all use the same syntax, so there's not that much to
19562 be annoyed by.
19563
19564 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
19565 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
19566 lots of percentages everywhere.
19567
19568 @menu
19569 * Formatting Basics::           A formatting variable is basically a format string.
19570 * Mode Line Formatting::        Some rules about mode line formatting variables.
19571 * Advanced Formatting::         Modifying output in various ways.
19572 * User-Defined Specs::          Having Gnus call your own functions.
19573 * Formatting Fonts::            Making the formatting look colorful and nice.
19574 * Positioning Point::           Moving point to a position after an operation.
19575 * Tabulation::                  Tabulating your output.
19576 * Wide Characters::             Dealing with wide characters.
19577 @end menu
19578
19579 Currently Gnus uses the following formatting variables:
19580 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
19581 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
19582 @code{gnus-group-mode-line-format},
19583 @code{gnus-summary-mode-line-format},
19584 @code{gnus-article-mode-line-format},
19585 @code{gnus-server-mode-line-format}, and
19586 @code{gnus-summary-pick-line-format}.
19587
19588 All these format variables can also be arbitrary elisp forms.  In that
19589 case, they will be @code{eval}ed to insert the required lines.
19590
19591 @kindex M-x gnus-update-format
19592 @findex gnus-update-format
19593 Gnus includes a command to help you while creating your own format
19594 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
19595 update the spec in question and pop you to a buffer where you can
19596 examine the resulting lisp code to be run to generate the line.
19597
19598
19599
19600 @node Formatting Basics
19601 @subsection Formatting Basics
19602
19603 Each @samp{%} element will be replaced by some string or other when the
19604 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
19605 spec, and pad with spaces to get a 5-character field''.
19606
19607 As with normal C and Emacs Lisp formatting strings, the numerical
19608 modifier between the @samp{%} and the formatting type character will
19609 @dfn{pad} the output so that it is always at least that long.
19610 @samp{%5y} will make the field always (at least) five characters wide by
19611 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
19612 the right instead.
19613
19614 You may also wish to limit the length of the field to protect against
19615 particularly wide values.  For that you can say @samp{%4,6y}, which
19616 means that the field will never be more than 6 characters wide and never
19617 less than 4 characters wide.
19618
19619 Also Gnus supports some extended format specifications, such as
19620 @samp{%&user-date;}.
19621
19622
19623 @node Mode Line Formatting
19624 @subsection Mode Line Formatting
19625
19626 Mode line formatting variables (e.g.,
19627 @code{gnus-summary-mode-line-format}) follow the same rules as other,
19628 buffer line oriented formatting variables (@pxref{Formatting Basics})
19629 with the following two differences:
19630
19631 @enumerate
19632
19633 @item
19634 There must be no newline (@samp{\n}) at the end.
19635
19636 @item
19637 The special @samp{%%b} spec can be used to display the buffer name.
19638 Well, it's no spec at all, really---@samp{%%} is just a way to quote
19639 @samp{%} to allow it to pass through the formatting machinery unmangled,
19640 so that Emacs receives @samp{%b}, which is something the Emacs mode line
19641 display interprets to mean ``show the buffer name''.  For a full list of
19642 mode line specs Emacs understands, see the documentation of the
19643 @code{mode-line-format} variable.
19644
19645 @end enumerate
19646
19647
19648 @node Advanced Formatting
19649 @subsection Advanced Formatting
19650
19651 It is frequently useful to post-process the fields in some way.
19652 Padding, limiting, cutting off parts and suppressing certain values can
19653 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
19654 look like @samp{%~(cut 3)~(ignore "0")y}.
19655
19656 These are the valid modifiers:
19657
19658 @table @code
19659 @item pad
19660 @itemx pad-left
19661 Pad the field to the left with spaces until it reaches the required
19662 length.
19663
19664 @item pad-right
19665 Pad the field to the right with spaces until it reaches the required
19666 length.
19667
19668 @item max
19669 @itemx max-left
19670 Cut off characters from the left until it reaches the specified length.
19671
19672 @item max-right
19673 Cut off characters from the right until it reaches the specified
19674 length.
19675
19676 @item cut
19677 @itemx cut-left
19678 Cut off the specified number of characters from the left.
19679
19680 @item cut-right
19681 Cut off the specified number of characters from the right.
19682
19683 @item ignore
19684 Return an empty string if the field is equal to the specified value.
19685
19686 @item form
19687 Use the specified form as the field value when the @samp{@@} spec is
19688 used.
19689
19690 Here's an example:
19691
19692 @lisp
19693 "~(form (current-time-string))@@"
19694 @end lisp
19695
19696 @end table
19697
19698 Let's take an example.  The @samp{%o} spec in the summary mode lines
19699 will return a date in compact ISO8601 format---@samp{19960809T230410}.
19700 This is quite a mouthful, so we want to shave off the century number and
19701 the time, leaving us with a six-character date.  That would be
19702 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
19703 maxing, and we need the padding to ensure that the date is never less
19704 than 6 characters to make it look nice in columns.)
19705
19706 Ignoring is done first; then cutting; then maxing; and then as the very
19707 last operation, padding.
19708
19709 @vindex gnus-compile-user-specs
19710 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
19711 default) with your strong personality, and use a lots of these advanced
19712 thingies, you'll find that Gnus gets quite slow.  This can be helped
19713 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
19714 the look of your lines.
19715 @xref{Compilation}.
19716
19717
19718 @node User-Defined Specs
19719 @subsection User-Defined Specs
19720
19721 All the specs allow for inserting user defined specifiers---@samp{u}.
19722 The next character in the format string should be a letter.  Gnus
19723 will call the function @code{gnus-user-format-function-}@samp{X}, where
19724 @samp{X} is the letter following @samp{%u}.  The function will be passed
19725 a single parameter---what the parameter means depends on what buffer
19726 it's being called from.  The function should return a string, which will
19727 be inserted into the buffer just like information from any other
19728 specifier.  This function may also be called with dummy values, so it
19729 should protect against that.
19730
19731 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
19732 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
19733
19734 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
19735 much the same without defining new functions.  Here's an example:
19736 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
19737 given here will be evaluated to yield the current line number, and then
19738 inserted.
19739
19740
19741 @node Formatting Fonts
19742 @subsection Formatting Fonts
19743
19744 There are specs for highlighting, and these are shared by all the format
19745 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
19746 the special @code{mouse-face} property set, which means that it will be
19747 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
19748 over it.
19749
19750 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
19751 normal faces set using @code{gnus-face-0}, which is @code{bold} by
19752 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
19753 and so on.  Create as many faces as you wish.  The same goes for the
19754 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
19755 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
19756
19757 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
19758 special @code{balloon-help} property set to @code{gnus-balloon-face-0}.
19759 If you say @samp{%1<<}, you'll get @code{gnus-balloon-face-1} and so on.
19760 The @code{gnus-balloon-face-*} variables should be either strings or
19761 symbols naming functions that return a string.  When the mouse passes
19762 over text with this property set, a balloon window will appear and
19763 display the string.  Please refer to @ref{(emacs)Help Echo} (in GNU
19764 Emacs) or the doc string of @code{balloon-help-mode} (in XEmacs) for
19765 more information on this.  (For technical reasons, the guillemets have
19766 been approximated as @samp{<<} and @samp{>>} in this paragraph.)
19767
19768 Here's an alternative recipe for the group buffer:
19769
19770 @lisp
19771 ;; Create three face types.
19772 (setq gnus-face-1 'bold)
19773 (setq gnus-face-3 'italic)
19774
19775 ;; We want the article count to be in
19776 ;; a bold and green face.  So we create
19777 ;; a new face called `my-green-bold'.
19778 (copy-face 'bold 'my-green-bold)
19779 ;; Set the color.
19780 (set-face-foreground 'my-green-bold "ForestGreen")
19781 (setq gnus-face-2 'my-green-bold)
19782
19783 ;; Set the new & fancy format.
19784 (setq gnus-group-line-format
19785       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
19786 @end lisp
19787
19788 I'm sure you'll be able to use this scheme to create totally unreadable
19789 and extremely vulgar displays.  Have fun!
19790
19791 Note that the @samp{%(} specs (and friends) do not make any sense on the
19792 mode-line variables.
19793
19794 @node Positioning Point
19795 @subsection Positioning Point
19796
19797 Gnus usually moves point to a pre-defined place on each line in most
19798 buffers.  By default, point move to the first colon character on the
19799 line.  You can customize this behaviour in three different ways.
19800
19801 You can move the colon character to somewhere else on the line.
19802
19803 @findex gnus-goto-colon
19804 You can redefine the function that moves the point to the colon.  The
19805 function is called @code{gnus-goto-colon}.
19806
19807 But perhaps the most convenient way to deal with this, if you don't want
19808 to have a colon in your line, is to use the @samp{%*} specifier.  If you
19809 put a @samp{%*} somewhere in your format line definition, Gnus will
19810 place point there.
19811
19812
19813 @node Tabulation
19814 @subsection Tabulation
19815
19816 You can usually line up your displays by padding and cutting your
19817 strings.  However, when combining various strings of different size, it
19818 can often be more convenient to just output the strings, and then worry
19819 about lining up the following text afterwards.
19820
19821 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
19822 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
19823
19824 @samp{%50=} will insert space characters to pad the line up to column
19825 50.  If the text is already past column 50, nothing will be inserted.
19826 This is the soft tabulator.
19827
19828 @samp{%-50=} will insert space characters to pad the line up to column
19829 50.  If the text is already past column 50, the excess text past column
19830 50 will be removed.  This is the hard tabulator.
19831
19832
19833 @node Wide Characters
19834 @subsection Wide Characters
19835
19836 Proportional fonts in most countries have characters of the same width.
19837 Some countries, however, use Latin characters mixed with wider
19838 characters---most notable East Asian countries.
19839
19840 The problem is that when formatting, Gnus assumes that if a string is 10
19841 characters wide, it'll be 10 Latin characters wide on the screen.  In
19842 these countries, that's not true.
19843
19844 @vindex gnus-use-correct-string-widths
19845 To help fix this, you can set @code{gnus-use-correct-string-widths} to
19846 @code{t}.  This makes buffer generation slower, but the results will be
19847 prettier.  The default value under XEmacs is @code{t} but @code{nil}
19848 for Emacs.
19849
19850
19851 @node Window Layout
19852 @section Window Layout
19853 @cindex window layout
19854
19855 No, there's nothing here about X, so be quiet.
19856
19857 @vindex gnus-use-full-window
19858 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
19859 other windows and occupy the entire Emacs screen by itself.  It is
19860 @code{t} by default.
19861
19862 Setting this variable to @code{nil} kinda works, but there are
19863 glitches.  Use at your own peril.
19864
19865 @vindex gnus-buffer-configuration
19866 @code{gnus-buffer-configuration} describes how much space each Gnus
19867 buffer should be given.  Here's an excerpt of this variable:
19868
19869 @lisp
19870 ((group (vertical 1.0 (group 1.0 point)
19871                       (if gnus-carpal (group-carpal 4))))
19872  (article (vertical 1.0 (summary 0.25 point)
19873                         (article 1.0))))
19874 @end lisp
19875
19876 This is an alist.  The @dfn{key} is a symbol that names some action or
19877 other.  For instance, when displaying the group buffer, the window
19878 configuration function will use @code{group} as the key.  A full list of
19879 possible names is listed below.
19880
19881 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
19882 should occupy.  To take the @code{article} split as an example -
19883
19884 @lisp
19885 (article (vertical 1.0 (summary 0.25 point)
19886                        (article 1.0)))
19887 @end lisp
19888
19889 This @dfn{split} says that the summary buffer should occupy 25% of upper
19890 half of the screen, and that it is placed over the article buffer.  As
19891 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
19892 reaching for that calculator there).  However, the special number
19893 @code{1.0} is used to signal that this buffer should soak up all the
19894 rest of the space available after the rest of the buffers have taken
19895 whatever they need.  There should be only one buffer with the @code{1.0}
19896 size spec per split.
19897
19898 Point will be put in the buffer that has the optional third element
19899 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
19900 split where the tag @code{frame-focus} is a member (i.e. is the third or
19901 fourth element in the list, depending on whether the @code{point} tag is
19902 present) gets focus.
19903
19904 Here's a more complicated example:
19905
19906 @lisp
19907 (article (vertical 1.0 (group 4)
19908                        (summary 0.25 point)
19909                        (if gnus-carpal (summary-carpal 4))
19910                        (article 1.0)))
19911 @end lisp
19912
19913 If the size spec is an integer instead of a floating point number,
19914 then that number will be used to say how many lines a buffer should
19915 occupy, not a percentage.
19916
19917 If the @dfn{split} looks like something that can be @code{eval}ed (to be
19918 precise---if the @code{car} of the split is a function or a subr), this
19919 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
19920 be used as a split.  This means that there will be three buffers if
19921 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
19922 is non-@code{nil}.
19923
19924 Not complicated enough for you?  Well, try this on for size:
19925
19926 @lisp
19927 (article (horizontal 1.0
19928              (vertical 0.5
19929                  (group 1.0)
19930                  (gnus-carpal 4))
19931              (vertical 1.0
19932                  (summary 0.25 point)
19933                  (summary-carpal 4)
19934                  (article 1.0))))
19935 @end lisp
19936
19937 Whoops.  Two buffers with the mystery 100% tag.  And what's that
19938 @code{horizontal} thingie?
19939
19940 If the first element in one of the split is @code{horizontal}, Gnus will
19941 split the window horizontally, giving you two windows side-by-side.
19942 Inside each of these strips you may carry on all you like in the normal
19943 fashion.  The number following @code{horizontal} says what percentage of
19944 the screen is to be given to this strip.
19945
19946 For each split, there @emph{must} be one element that has the 100% tag.
19947 The splitting is never accurate, and this buffer will eat any leftover
19948 lines from the splits.
19949
19950 To be slightly more formal, here's a definition of what a valid split
19951 may look like:
19952
19953 @example
19954 split      = frame | horizontal | vertical | buffer | form
19955 frame      = "(frame " size *split ")"
19956 horizontal = "(horizontal " size *split ")"
19957 vertical   = "(vertical " size *split ")"
19958 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
19959 size       = number | frame-params
19960 buf-name   = group | article | summary ...
19961 @end example
19962
19963 The limitations are that the @code{frame} split can only appear as the
19964 top-level split.  @var{form} should be an Emacs Lisp form that should
19965 return a valid split.  We see that each split is fully recursive, and
19966 may contain any number of @code{vertical} and @code{horizontal} splits.
19967
19968 @vindex gnus-window-min-width
19969 @vindex gnus-window-min-height
19970 @cindex window height
19971 @cindex window width
19972 Finding the right sizes can be a bit complicated.  No window may be less
19973 than @code{gnus-window-min-height} (default 1) characters high, and all
19974 windows must be at least @code{gnus-window-min-width} (default 1)
19975 characters wide.  Gnus will try to enforce this before applying the
19976 splits.  If you want to use the normal Emacs window width/height limit,
19977 you can just set these two variables to @code{nil}.
19978
19979 If you're not familiar with Emacs terminology, @code{horizontal} and
19980 @code{vertical} splits may work the opposite way of what you'd expect.
19981 Windows inside a @code{horizontal} split are shown side-by-side, and
19982 windows within a @code{vertical} split are shown above each other.
19983
19984 @findex gnus-configure-frame
19985 If you want to experiment with window placement, a good tip is to call
19986 @code{gnus-configure-frame} directly with a split.  This is the function
19987 that does all the real work when splitting buffers.  Below is a pretty
19988 nonsensical configuration with 5 windows; two for the group buffer and
19989 three for the article buffer.  (I said it was nonsensical.)  If you
19990 @code{eval} the statement below, you can get an idea of how that would
19991 look straight away, without going through the normal Gnus channels.
19992 Play with it until you're satisfied, and then use
19993 @code{gnus-add-configuration} to add your new creation to the buffer
19994 configuration list.
19995
19996 @lisp
19997 (gnus-configure-frame
19998  '(horizontal 1.0
19999     (vertical 10
20000       (group 1.0)
20001       (article 0.3 point))
20002     (vertical 1.0
20003       (article 1.0)
20004       (horizontal 4
20005         (group 1.0)
20006         (article 10)))))
20007 @end lisp
20008
20009 You might want to have several frames as well.  No prob---just use the
20010 @code{frame} split:
20011
20012 @lisp
20013 (gnus-configure-frame
20014  '(frame 1.0
20015          (vertical 1.0
20016                    (summary 0.25 point frame-focus)
20017                    (article 1.0))
20018          (vertical ((height . 5) (width . 15)
20019                     (user-position . t)
20020                     (left . -1) (top . 1))
20021                    (picon 1.0))))
20022
20023 @end lisp
20024
20025 This split will result in the familiar summary/article window
20026 configuration in the first (or ``main'') frame, while a small additional
20027 frame will be created where picons will be shown.  As you can see,
20028 instead of the normal @code{1.0} top-level spec, each additional split
20029 should have a frame parameter alist as the size spec.
20030 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20031 Reference Manual}.  Under XEmacs, a frame property list will be
20032 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20033 is such a plist.
20034 The list of all possible keys for @code{gnus-buffer-configuration} can
20035 be found in its default value.
20036
20037 Note that the @code{message} key is used for both
20038 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20039 it is desirable to distinguish between the two, something like this
20040 might be used:
20041
20042 @lisp
20043 (message (horizontal 1.0
20044                      (vertical 1.0 (message 1.0 point))
20045                      (vertical 0.24
20046                                (if (buffer-live-p gnus-summary-buffer)
20047                                    '(summary 0.5))
20048                                (group 1.0))))
20049 @end lisp
20050
20051 One common desire for a multiple frame split is to have a separate frame
20052 for composing mail and news while leaving the original frame intact.  To
20053 accomplish that, something like the following can be done:
20054
20055 @lisp
20056 (message
20057   (frame 1.0
20058          (if (not (buffer-live-p gnus-summary-buffer))
20059              (car (cdr (assoc 'group gnus-buffer-configuration)))
20060            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20061          (vertical ((user-position . t) (top . 1) (left . 1)
20062                     (name . "Message"))
20063                    (message 1.0 point))))
20064 @end lisp
20065
20066 @findex gnus-add-configuration
20067 Since the @code{gnus-buffer-configuration} variable is so long and
20068 complicated, there's a function you can use to ease changing the config
20069 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20070 you want to change the @code{article} setting, you could say:
20071
20072 @lisp
20073 (gnus-add-configuration
20074  '(article (vertical 1.0
20075                (group 4)
20076                (summary .25 point)
20077                (article 1.0))))
20078 @end lisp
20079
20080 You'd typically stick these @code{gnus-add-configuration} calls in your
20081 @file{.gnus.el} file or in some startup hook---they should be run after
20082 Gnus has been loaded.
20083
20084 @vindex gnus-always-force-window-configuration
20085 If all windows mentioned in the configuration are already visible, Gnus
20086 won't change the window configuration.  If you always want to force the
20087 ``right'' window configuration, you can set
20088 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20089
20090 If you're using tree displays (@pxref{Tree Display}), and the tree
20091 window is displayed vertically next to another window, you may also want
20092 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20093 windows resized.
20094
20095 @subsection Example Window Configurations
20096
20097 @itemize @bullet
20098 @item
20099 Narrow left hand side occupied by group buffer.  Right hand side split
20100 between summary buffer (top one-sixth) and article buffer (bottom).
20101
20102 @ifinfo
20103 @example
20104 +---+---------+
20105 | G | Summary |
20106 | r +---------+
20107 | o |         |
20108 | u | Article |
20109 | p |         |
20110 +---+---------+
20111 @end example
20112 @end ifinfo
20113
20114 @lisp
20115 (gnus-add-configuration
20116  '(article
20117    (horizontal 1.0
20118                (vertical 25 (group 1.0))
20119                (vertical 1.0
20120                          (summary 0.16 point)
20121                          (article 1.0)))))
20122
20123 (gnus-add-configuration
20124  '(summary
20125    (horizontal 1.0
20126                (vertical 25 (group 1.0))
20127                (vertical 1.0 (summary 1.0 point)))))
20128 @end lisp
20129
20130 @end itemize
20131
20132
20133 @node Faces and Fonts
20134 @section Faces and Fonts
20135 @cindex faces
20136 @cindex fonts
20137 @cindex colors
20138
20139 Fiddling with fonts and faces used to be very difficult, but these days
20140 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
20141 the face you want to alter, and alter it via the standard Customize
20142 interface.
20143
20144
20145 @node Compilation
20146 @section Compilation
20147 @cindex compilation
20148 @cindex byte-compilation
20149
20150 @findex gnus-compile
20151
20152 Remember all those line format specification variables?
20153 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
20154 on.  By default, T-gnus will use the byte-compiled codes of these
20155 variables and we can keep a slow-down to a minimum.  However, if you set
20156 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
20157 unfortunately, changing them will mean a quite significant slow-down.
20158 (The default values of these variables have byte-compiled functions
20159 associated with them, while the user-generated versions do not, of
20160 course.)
20161
20162 To help with this, you can run @kbd{M-x gnus-compile} after you've
20163 fiddled around with the variables and feel that you're (kind of)
20164 satisfied.  This will result in the new specs being byte-compiled, and
20165 you'll get top speed again.  Note that T-gnus will not save these
20166 compiled specs in the @file{.newsrc.eld} file.
20167
20168 @table @code
20169 @item gnus-compile-user-specs
20170 @vindex gnus-compile-user-specs
20171 If it is non-nil, the user-defined format specs will be byte-compiled
20172 automatically.  The default value of this variable is @code{t}.  It has
20173 an effect on the values of @code{gnus-*-line-format-spec}.
20174 @end table
20175
20176
20177 @node Mode Lines
20178 @section Mode Lines
20179 @cindex mode lines
20180
20181 @vindex gnus-updated-mode-lines
20182 @code{gnus-updated-mode-lines} says what buffers should keep their mode
20183 lines updated.  It is a list of symbols.  Supported symbols include
20184 @code{group}, @code{article}, @code{summary}, @code{server},
20185 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
20186 Gnus will keep that mode line updated with information that may be
20187 pertinent.  If this variable is @code{nil}, screen refresh may be
20188 quicker.
20189
20190 @cindex display-time
20191
20192 @vindex gnus-mode-non-string-length
20193 By default, Gnus displays information on the current article in the mode
20194 lines of the summary and article buffers.  The information Gnus wishes
20195 to display (e.g. the subject of the article) is often longer than the
20196 mode lines, and therefore have to be cut off at some point.  The
20197 @code{gnus-mode-non-string-length} variable says how long the other
20198 elements on the line is (i.e., the non-info part).  If you put
20199 additional elements on the mode line (e.g. a clock), you should modify
20200 this variable:
20201
20202 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
20203 @lisp
20204 (add-hook 'display-time-hook
20205           (lambda () (setq gnus-mode-non-string-length
20206                            (+ 21
20207                               (if line-number-mode 5 0)
20208                               (if column-number-mode 4 0)
20209                               (length display-time-string)))))
20210 @end lisp
20211
20212 If this variable is @code{nil} (which is the default), the mode line
20213 strings won't be chopped off, and they won't be padded either.  Note
20214 that the default is unlikely to be desirable, as even the percentage
20215 complete in the buffer may be crowded off the mode line; the user should
20216 configure this variable appropriately for her configuration.
20217
20218
20219 @node Highlighting and Menus
20220 @section Highlighting and Menus
20221 @cindex visual
20222 @cindex highlighting
20223 @cindex menus
20224
20225 @vindex gnus-visual
20226 The @code{gnus-visual} variable controls most of the Gnus-prettifying
20227 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
20228 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
20229 file.
20230
20231 This variable can be a list of visual properties that are enabled.  The
20232 following elements are valid, and are all included by default:
20233
20234 @table @code
20235 @item group-highlight
20236 Do highlights in the group buffer.
20237 @item summary-highlight
20238 Do highlights in the summary buffer.
20239 @item article-highlight
20240 Do highlights in the article buffer.
20241 @item highlight
20242 Turn on highlighting in all buffers.
20243 @item group-menu
20244 Create menus in the group buffer.
20245 @item summary-menu
20246 Create menus in the summary buffers.
20247 @item article-menu
20248 Create menus in the article buffer.
20249 @item browse-menu
20250 Create menus in the browse buffer.
20251 @item server-menu
20252 Create menus in the server buffer.
20253 @item score-menu
20254 Create menus in the score buffers.
20255 @item menu
20256 Create menus in all buffers.
20257 @end table
20258
20259 So if you only want highlighting in the article buffer and menus in all
20260 buffers, you could say something like:
20261
20262 @lisp
20263 (setq gnus-visual '(article-highlight menu))
20264 @end lisp
20265
20266 If you want highlighting only and no menus whatsoever, you'd say:
20267
20268 @lisp
20269 (setq gnus-visual '(highlight))
20270 @end lisp
20271
20272 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
20273 in all Gnus buffers.
20274
20275 Other general variables that influence the look of all buffers include:
20276
20277 @table @code
20278 @item gnus-mouse-face
20279 @vindex gnus-mouse-face
20280 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
20281 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
20282
20283 @end table
20284
20285 There are hooks associated with the creation of all the different menus:
20286
20287 @table @code
20288
20289 @item gnus-article-menu-hook
20290 @vindex gnus-article-menu-hook
20291 Hook called after creating the article mode menu.
20292
20293 @item gnus-group-menu-hook
20294 @vindex gnus-group-menu-hook
20295 Hook called after creating the group mode menu.
20296
20297 @item gnus-summary-menu-hook
20298 @vindex gnus-summary-menu-hook
20299 Hook called after creating the summary mode menu.
20300
20301 @item gnus-server-menu-hook
20302 @vindex gnus-server-menu-hook
20303 Hook called after creating the server mode menu.
20304
20305 @item gnus-browse-menu-hook
20306 @vindex gnus-browse-menu-hook
20307 Hook called after creating the browse mode menu.
20308
20309 @item gnus-score-menu-hook
20310 @vindex gnus-score-menu-hook
20311 Hook called after creating the score mode menu.
20312
20313 @end table
20314
20315
20316 @node Buttons
20317 @section Buttons
20318 @cindex buttons
20319 @cindex mouse
20320 @cindex click
20321
20322 Those new-fangled @dfn{mouse} contraptions is very popular with the
20323 young, hep kids who don't want to learn the proper way to do things
20324 these days.  Why, I remember way back in the summer of '89, when I was
20325 using Emacs on a Tops 20 system.  Three hundred users on one single
20326 machine, and every user was running Simula compilers.  Bah!
20327
20328 Right.
20329
20330 @vindex gnus-carpal
20331 Well, you can make Gnus display bufferfuls of buttons you can click to
20332 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
20333 really.  Tell the chiropractor I sent you.
20334
20335
20336 @table @code
20337
20338 @item gnus-carpal-mode-hook
20339 @vindex gnus-carpal-mode-hook
20340 Hook run in all carpal mode buffers.
20341
20342 @item gnus-carpal-button-face
20343 @vindex gnus-carpal-button-face
20344 Face used on buttons.
20345
20346 @item gnus-carpal-header-face
20347 @vindex gnus-carpal-header-face
20348 Face used on carpal buffer headers.
20349
20350 @item gnus-carpal-group-buffer-buttons
20351 @vindex gnus-carpal-group-buffer-buttons
20352 Buttons in the group buffer.
20353
20354 @item gnus-carpal-summary-buffer-buttons
20355 @vindex gnus-carpal-summary-buffer-buttons
20356 Buttons in the summary buffer.
20357
20358 @item gnus-carpal-server-buffer-buttons
20359 @vindex gnus-carpal-server-buffer-buttons
20360 Buttons in the server buffer.
20361
20362 @item gnus-carpal-browse-buffer-buttons
20363 @vindex gnus-carpal-browse-buffer-buttons
20364 Buttons in the browse buffer.
20365 @end table
20366
20367 All the @code{buttons} variables are lists.  The elements in these list
20368 are either cons cells where the @code{car} contains a text to be displayed and
20369 the @code{cdr} contains a function symbol, or a simple string.
20370
20371
20372 @node Daemons
20373 @section Daemons
20374 @cindex demons
20375 @cindex daemons
20376
20377 Gnus, being larger than any program ever written (allegedly), does lots
20378 of strange stuff that you may wish to have done while you're not
20379 present.  For instance, you may want it to check for new mail once in a
20380 while.  Or you may want it to close down all connections to all servers
20381 when you leave Emacs idle.  And stuff like that.
20382
20383 Gnus will let you do stuff like that by defining various
20384 @dfn{handlers}.  Each handler consists of three elements:  A
20385 @var{function}, a @var{time}, and an @var{idle} parameter.
20386
20387 Here's an example of a handler that closes connections when Emacs has
20388 been idle for thirty minutes:
20389
20390 @lisp
20391 (gnus-demon-close-connections nil 30)
20392 @end lisp
20393
20394 Here's a handler that scans for PGP headers every hour when Emacs is
20395 idle:
20396
20397 @lisp
20398 (gnus-demon-scan-pgp 60 t)
20399 @end lisp
20400
20401 This @var{time} parameter and than @var{idle} parameter work together
20402 in a strange, but wonderful fashion.  Basically, if @var{idle} is
20403 @code{nil}, then the function will be called every @var{time} minutes.
20404
20405 If @var{idle} is @code{t}, then the function will be called after
20406 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
20407 the function will never be called.  But once Emacs goes idle, the
20408 function will be called every @var{time} minutes.
20409
20410 If @var{idle} is a number and @var{time} is a number, the function will
20411 be called every @var{time} minutes only when Emacs has been idle for
20412 @var{idle} minutes.
20413
20414 If @var{idle} is a number and @var{time} is @code{nil}, the function
20415 will be called once every time Emacs has been idle for @var{idle}
20416 minutes.
20417
20418 And if @var{time} is a string, it should look like @samp{07:31}, and
20419 the function will then be called once every day somewhere near that
20420 time.  Modified by the @var{idle} parameter, of course.
20421
20422 @vindex gnus-demon-timestep
20423 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
20424 seconds.  This is 60 by default.  If you change that variable,
20425 all the timings in the handlers will be affected.)
20426
20427 So, if you want to add a handler, you could put something like this in
20428 your @file{.gnus.el} file:
20429
20430 @findex gnus-demon-add-handler
20431 @lisp
20432 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
20433 @end lisp
20434
20435 @findex gnus-demon-add-nocem
20436 @findex gnus-demon-add-scanmail
20437 @findex gnus-demon-add-rescan
20438 @findex gnus-demon-add-scan-timestamps
20439 @findex gnus-demon-add-disconnection
20440 Some ready-made functions to do this have been created:
20441 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
20442 @code{gnus-demon-add-nntp-close-connection},
20443 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
20444 @code{gnus-demon-add-scanmail}.  Just put those functions in your
20445 @file{.gnus.el} if you want those abilities.
20446
20447 @findex gnus-demon-init
20448 @findex gnus-demon-cancel
20449 @vindex gnus-demon-handlers
20450 If you add handlers to @code{gnus-demon-handlers} directly, you should
20451 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
20452 daemons, you can use the @code{gnus-demon-cancel} function.
20453
20454 Note that adding daemons can be pretty naughty if you over do it.  Adding
20455 functions that scan all news and mail from all servers every two seconds
20456 is a sure-fire way of getting booted off any respectable system.  So
20457 behave.
20458
20459
20460 @node NoCeM
20461 @section NoCeM
20462 @cindex nocem
20463 @cindex spam
20464
20465 @dfn{Spamming} is posting the same article lots and lots of times.
20466 Spamming is bad.  Spamming is evil.
20467
20468 Spamming is usually canceled within a day or so by various anti-spamming
20469 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
20470 NoCeM is pronounced ``no see-'em'', and means what the name
20471 implies---these are messages that make the offending articles, like, go
20472 away.
20473
20474 What use are these NoCeM messages if the articles are canceled anyway?
20475 Some sites do not honor cancel messages and some sites just honor cancels
20476 from a select few people.  Then you may wish to make use of the NoCeM
20477 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
20478
20479 Gnus can read and parse the messages in this group automatically, and
20480 this will make spam disappear.
20481
20482 There are some variables to customize, of course:
20483
20484 @table @code
20485 @item gnus-use-nocem
20486 @vindex gnus-use-nocem
20487 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
20488 by default.
20489
20490 @item gnus-nocem-groups
20491 @vindex gnus-nocem-groups
20492 Gnus will look for NoCeM messages in the groups in this list.  The
20493 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
20494 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
20495
20496 @item gnus-nocem-issuers
20497 @vindex gnus-nocem-issuers
20498 There are many people issuing NoCeM messages.  This list says what
20499 people you want to listen to.  The default is @code{("Automoose-1"
20500 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
20501 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
20502
20503 Known despammers that you can put in this list are listed at
20504 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
20505
20506 You do not have to heed NoCeM messages from all these people---just the
20507 ones you want to listen to.  You also don't have to accept all NoCeM
20508 messages from the people you like.  Each NoCeM message has a @dfn{type}
20509 header that gives the message a (more or less, usually less) rigorous
20510 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
20511 @samp{binary}, and @samp{troll}.  To specify this, you have to use
20512 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
20513 Each condition is either a string (which is a regexp that matches types
20514 you want to use) or a list on the form @code{(not @var{string})}, where
20515 @var{string} is a regexp that matches types you don't want to use.
20516
20517 For instance, if you want all NoCeM messages from Chris Lewis except his
20518 @samp{troll} messages, you'd say:
20519
20520 @lisp
20521 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
20522 @end lisp
20523
20524 On the other hand, if you just want nothing but his @samp{spam} and
20525 @samp{spew} messages, you'd say:
20526
20527 @lisp
20528 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
20529 @end lisp
20530
20531 The specs are applied left-to-right.
20532
20533
20534 @item gnus-nocem-verifyer
20535 @vindex gnus-nocem-verifyer
20536 @findex mc-verify
20537 This should be a function for verifying that the NoCeM issuer is who she
20538 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
20539 function.  If this is too slow and you don't care for verification
20540 (which may be dangerous), you can set this variable to @code{nil}.
20541
20542 If you want signed NoCeM messages to be verified and unsigned messages
20543 not to be verified (but used anyway), you could do something like:
20544
20545 @lisp
20546 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
20547
20548 (defun my-gnus-mc-verify ()
20549   (not (eq 'forged
20550            (ignore-errors
20551              (if (mc-verify)
20552                  t
20553                'forged)))))
20554 @end lisp
20555
20556 This might be dangerous, though.
20557
20558 @item gnus-nocem-directory
20559 @vindex gnus-nocem-directory
20560 This is where Gnus will store its NoCeM cache files.  The default is
20561 @file{~/News/NoCeM/}.
20562
20563 @item gnus-nocem-expiry-wait
20564 @vindex gnus-nocem-expiry-wait
20565 The number of days before removing old NoCeM entries from the cache.
20566 The default is 15.  If you make it shorter Gnus will be faster, but you
20567 might then see old spam.
20568
20569 @item gnus-nocem-check-from
20570 @vindex gnus-nocem-check-from
20571 Non-@code{nil} means check for valid issuers in message bodies.
20572 Otherwise don't bother fetching articles unless their author matches a
20573 valid issuer; that is much faster if you are selective about the
20574 issuers.
20575
20576 @item gnus-nocem-check-article-limit
20577 @vindex gnus-nocem-check-article-limit
20578 If non-@code{nil}, the maximum number of articles to check in any NoCeM
20579 group.  NoCeM groups can be huge and very slow to process.
20580
20581 @end table
20582
20583 Using NoCeM could potentially be a memory hog.  If you have many living
20584 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
20585 big.  If this is a problem, you should kill off all (or most) of your
20586 unsubscribed groups (@pxref{Subscription Commands}).
20587
20588
20589 @node Undo
20590 @section Undo
20591 @cindex undo
20592
20593 It is very useful to be able to undo actions one has done.  In normal
20594 Emacs buffers, it's easy enough---you just push the @code{undo} button.
20595 In Gnus buffers, however, it isn't that simple.
20596
20597 The things Gnus displays in its buffer is of no value whatsoever to
20598 Gnus---it's all just data designed to look nice to the user.
20599 Killing a group in the group buffer with @kbd{C-k} makes the line
20600 disappear, but that's just a side-effect of the real action---the
20601 removal of the group in question from the internal Gnus structures.
20602 Undoing something like that can't be done by the normal Emacs
20603 @code{undo} function.
20604
20605 Gnus tries to remedy this somewhat by keeping track of what the user
20606 does and coming up with actions that would reverse the actions the user
20607 takes.  When the user then presses the @code{undo} key, Gnus will run
20608 the code to reverse the previous action, or the previous actions.
20609 However, not all actions are easily reversible, so Gnus currently offers
20610 a few key functions to be undoable.  These include killing groups,
20611 yanking groups, and changing the list of read articles of groups.
20612 That's it, really.  More functions may be added in the future, but each
20613 added function means an increase in data to be stored, so Gnus will
20614 never be totally undoable.
20615
20616 @findex gnus-undo-mode
20617 @vindex gnus-use-undo
20618 @findex gnus-undo
20619 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
20620 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
20621 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
20622 command, which should feel kinda like the normal Emacs @code{undo}
20623 command.
20624
20625
20626 @node Predicate Specifiers
20627 @section Predicate Specifiers
20628 @cindex predicate specifiers
20629
20630 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
20631 form that allows flexible specification of predicates without having
20632 to type all that much.
20633
20634 These specifiers are lists consisting of functions, symbols and lists.
20635
20636 Here's an example:
20637
20638 @lisp
20639 (or gnus-article-unseen-p
20640     gnus-article-unread-p)
20641 @end lisp
20642
20643 The available symbols are @code{or}, @code{and} and @code{not}.  The
20644 functions all take one parameter.
20645
20646 @findex gnus-make-predicate
20647 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
20648 to create a function that can be called.  This input parameter to this
20649 function will be passed along to all the functions in the predicate
20650 specifier.
20651
20652
20653 @node Moderation
20654 @section Moderation
20655 @cindex moderation
20656
20657 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
20658 It is not included in the standard Gnus package.  Write a mail to
20659 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
20660 get a copy.
20661
20662 The moderation package is implemented as a minor mode for summary
20663 buffers.  Put
20664
20665 @lisp
20666 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
20667 @end lisp
20668
20669 in your @file{.gnus.el} file.
20670
20671 If you are the moderator of @samp{rec.zoofle}, this is how it's
20672 supposed to work:
20673
20674 @enumerate
20675 @item
20676 You split your incoming mail by matching on
20677 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
20678 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
20679
20680 @item
20681 You enter that group once in a while and post articles using the @kbd{e}
20682 (edit-and-post) or @kbd{s} (just send unedited) commands.
20683
20684 @item
20685 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
20686 articles that weren't approved by you, you can cancel them with the
20687 @kbd{c} command.
20688 @end enumerate
20689
20690 To use moderation mode in these two groups, say:
20691
20692 @lisp
20693 (setq gnus-moderated-list
20694       "^nnml:rec.zoofle$\\|^rec.zoofle$")
20695 @end lisp
20696
20697
20698 @node Image Enhancements
20699 @section Image Enhancements
20700
20701 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
20702 Gnus has taken advantage of that.
20703
20704 @menu
20705 * Picons::                      How to display pictures of what you're reading.
20706 * Smileys::                     Show all those happy faces the way they were meant to be shown.
20707 * X-Face::                      Display a funky, teensy black-and-white image.
20708 * Toolbar::                     Click'n'drool.
20709 * XVarious::                    Other XEmacsy Gnusey variables.
20710 @end menu
20711
20712
20713 @node Picons
20714 @subsection Picons
20715
20716 @iftex
20717 @iflatex
20718 \include{picons}
20719 @end iflatex
20720 @end iftex
20721
20722 So@dots{}  You want to slow down your news reader even more!  This is a
20723 good way to do so.  Its also a great way to impress people staring
20724 over your shoulder as you read news.
20725
20726 What are Picons?  To quote directly from the Picons Web site:
20727
20728 @iftex
20729 @iflatex
20730 \margindex{}
20731 @end iflatex
20732 @end iftex
20733
20734 @quotation
20735 @dfn{Picons} is short for ``personal icons''.  They're small,
20736 constrained images used to represent users and domains on the net,
20737 organized into databases so that the appropriate image for a given
20738 e-mail address can be found.  Besides users and domains, there are picon
20739 databases for Usenet newsgroups and weather forecasts.  The picons are
20740 in either monochrome @code{XBM} format or color @code{XPM} and
20741 @code{GIF} formats.
20742 @end quotation
20743
20744 @vindex gnus-picon-databases
20745 For instructions on obtaining and installing the picons databases,
20746 point your Web browser at
20747 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
20748
20749 If you are using Debian GNU/Linux, saying @samp{apt-get install
20750 picons.*} will install the picons where Gnus can find them.
20751
20752 To enable displaying picons, simply make sure that
20753 @code{gnus-picon-databases} points to the directory containing the
20754 Picons databases.
20755
20756 The following variables offer control over where things are located.
20757
20758 @table @code
20759
20760 @item gnus-picon-databases
20761 @vindex gnus-picon-databases
20762 The location of the picons database.  This is a list of directories
20763 containing the @file{news}, @file{domains}, @file{users} (and so on)
20764 subdirectories.  Defaults to @code{("/usr/lib/picon"
20765 "/usr/local/faces")}.
20766
20767 @item gnus-picon-news-directories
20768 @vindex gnus-picon-news-directories
20769 List of subdirectories to search in @code{gnus-picon-databases} for
20770 newsgroups faces.  @code{("news")} is the default.
20771
20772 @item gnus-picon-user-directories
20773 @vindex gnus-picon-user-directories
20774 List of subdirectories to search in @code{gnus-picon-databases} for user
20775 faces.  @code{("users" "usenix" "local" "misc")} is the default.
20776
20777 @item gnus-picon-domain-directories
20778 @vindex gnus-picon-domain-directories
20779 List of subdirectories to search in @code{gnus-picon-databases} for
20780 domain name faces.  Defaults to @code{("domains")}.  Some people may
20781 want to add @samp{"unknown"} to this list.
20782
20783 @item gnus-picon-file-types
20784 @vindex gnus-picon-file-types
20785 Ordered list of suffixes on picon file names to try.  Defaults to
20786 @code{("xpm" "gif" "xbm")} minus those not builtin your Emacs.
20787
20788 @end table
20789
20790 @node Smileys
20791 @subsection Smileys
20792 @cindex smileys
20793
20794 @iftex
20795 @iflatex
20796 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
20797 \input{smiley}
20798 @end iflatex
20799 @end iftex
20800
20801 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
20802 currently the only package that uses Smiley, it is documented here.
20803
20804 In short---to use Smiley in Gnus, put the following in your
20805 @file{.gnus.el} file:
20806
20807 @lisp
20808 (setq gnus-treat-display-smileys t)
20809 @end lisp
20810
20811 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
20812 the like---to pictures and displays those instead of the text smiley
20813 faces.  The conversion is controlled by a list of regexps that matches
20814 text and maps that to file names.
20815
20816 @vindex smiley-nosey-regexp-alist
20817 @vindex smiley-deformed-regexp-alist
20818 Smiley supplies two example conversion alists by default:
20819 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
20820 and so on), and @code{smiley-nosey-regexp-alist} (which matches
20821 @samp{:-)}, @samp{:-(} and so on).
20822
20823 The alist used is specified by the @code{smiley-regexp-alist} variable,
20824 which defaults to the value of @code{smiley-deformed-regexp-alist}.
20825
20826 The first item in each element is the regexp to be matched; the second
20827 element is the regexp match group that is to be replaced by the picture;
20828 and the third element is the name of the file to be displayed.
20829
20830 The following variables customize where Smiley will look for these
20831 files, as well as the color to be used and stuff:
20832
20833 @table @code
20834
20835 @item smiley-data-directory
20836 @vindex smiley-data-directory
20837 Where Smiley will look for smiley faces files.
20838
20839 @item smiley-flesh-color
20840 @vindex smiley-flesh-color
20841 Skin color.  The default is @samp{yellow}, which is really racist.
20842
20843 @item smiley-features-color
20844 @vindex smiley-features-color
20845 Color of the features of the face.  The default is @samp{black}.
20846
20847 @item smiley-tongue-color
20848 @vindex smiley-tongue-color
20849 Color of the tongue.  The default is @samp{red}.
20850
20851 @item smiley-circle-color
20852 @vindex smiley-circle-color
20853 Color of the circle around the face.  The default is @samp{black}.
20854
20855 @item smiley-mouse-face
20856 @vindex smiley-mouse-face
20857 Face used for mouse highlighting over the smiley face.
20858
20859 @end table
20860
20861
20862 @node X-Face
20863 @subsection X-Face
20864 @cindex x-face
20865
20866 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
20867 depth) image that's supposed to represent the author of the message.
20868 It seems to be supported by an ever-growing number of mail and news
20869 readers.
20870
20871 @cindex x-face
20872 @findex gnus-article-display-x-face
20873 @findex gnus-article-x-face-command
20874 @vindex gnus-article-x-face-command
20875 @vindex gnus-article-x-face-too-ugly
20876 @iftex
20877 @iflatex
20878 \include{xface}
20879 @end iflatex
20880 @end iftex
20881 @c @anchor{X-Face}
20882
20883 Decoding an @code{X-Face} header either requires an Emacs that has
20884 @samp{compface} support (which most XEmacs versions has), or that you
20885 have @samp{compface} installed on your system.  If either is true,
20886 Gnus will default to displaying @code{X-Face} headers.
20887
20888 The variable that controls this is the
20889 @code{gnus-article-x-face-command} variable.  If this variable is a
20890 string, this string will be executed in a sub-shell.  If it is a
20891 function, this function will be called with the face as the argument.
20892 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
20893 the @code{From} header, the face will not be shown.
20894
20895 The default action under Emacs 20 is to fork off the @code{display}
20896 program@footnote{@code{display} is from the ImageMagick package.  For
20897 the @code{uncompface} and @code{icontopbm} programs look for a package
20898 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
20899 view the face.
20900
20901 Under XEmacs or Emacs 21+ with suitable image support, the default
20902 action is to display the face before the @code{From} header.  (It's
20903 nicer if XEmacs has been compiled with @code{X-Face} support---that
20904 will make display somewhat faster.  If there's no native @code{X-Face}
20905 support, Gnus will try to convert the @code{X-Face} header using
20906 external programs from the @code{pbmplus} package and
20907 friends.@footnote{On a GNU/Linux system look for packages with names
20908 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
20909
20910 (NOTE: @code{x-face} is used in the variable/function names, not
20911 @code{xface}).
20912
20913 Gnus provides a few convenience functions and variables to allow
20914 easier insertion of X-Face headers in outgoing messages.
20915
20916 @findex gnus-random-x-face
20917 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
20918 @code{gnus-x-face-directory} and picks one at random, and then
20919 converts it to the X-Face format by using the
20920 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
20921 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
20922 header data as a string.
20923
20924 @findex gnus-insert-random-x-face-header
20925 @code{gnus-insert-random-x-face-header} calls
20926 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
20927 randomly generated data.
20928
20929 @findex gnus-x-face-from-file
20930 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
20931 converts the file to X-Face format by using the
20932 @code{gnus-convert-image-to-x-face-command} shell command.
20933
20934 Here's how you would typically use the first function.  Put something
20935 like the following in your @file{.gnus.el} file:
20936
20937 @lisp
20938 (setq message-required-news-headers
20939       (nconc message-required-news-headers
20940              (list '(X-Face . gnus-random-x-face))))
20941 @end lisp
20942
20943 Using the last function would be something like this:
20944
20945 @lisp
20946 (setq message-required-news-headers
20947       (nconc message-required-news-headers
20948              (list '(X-Face . (lambda ()
20949                                 (gnus-x-face-from-file
20950                                  "~/My-face.gif"))))))
20951 @end lisp
20952
20953
20954 @node Toolbar
20955 @subsection Toolbar
20956
20957 @table @code
20958
20959 @iftex
20960 @iflatex
20961 \margindex{}
20962 @end iflatex
20963 @end iftex
20964
20965 @item gnus-use-toolbar
20966 @vindex gnus-use-toolbar
20967 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
20968 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
20969 @code{right-toolbar}, or @code{left-toolbar}.
20970
20971 @item gnus-group-toolbar
20972 @vindex gnus-group-toolbar
20973 The toolbar in the group buffer.
20974
20975 @item gnus-summary-toolbar
20976 @vindex gnus-summary-toolbar
20977 The toolbar in the summary buffer.
20978
20979 @item gnus-summary-mail-toolbar
20980 @vindex gnus-summary-mail-toolbar
20981 The toolbar in the summary buffer of mail groups.
20982
20983 @end table
20984
20985
20986 @node XVarious
20987 @subsection Various XEmacs Variables
20988
20989 @table @code
20990 @item gnus-xmas-glyph-directory
20991 @vindex gnus-xmas-glyph-directory
20992 This is where Gnus will look for pictures.  Gnus will normally
20993 auto-detect this directory, but you may set it manually if you have an
20994 unusual directory structure.
20995
20996 @item gnus-xmas-logo-color-alist
20997 @vindex gnus-xmas-logo-color-alist
20998 This is an alist where the key is a type symbol and the values are the
20999 foreground and background color of the splash page glyph.
21000
21001 @item gnus-xmas-logo-color-style
21002 @vindex gnus-xmas-logo-color-style
21003 This is the key used to look up the color in the alist described above.
21004 Valid values include @code{flame}, @code{pine}, @code{moss},
21005 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21006 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21007
21008 @item gnus-xmas-modeline-glyph
21009 @vindex gnus-xmas-modeline-glyph
21010 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21011 default.
21012
21013 @iftex
21014 @iflatex
21015 \margindex{}
21016 @end iflatex
21017 @end iftex
21018
21019 @end table
21020
21021
21022
21023
21024 @node Fuzzy Matching
21025 @section Fuzzy Matching
21026 @cindex fuzzy matching
21027
21028 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21029 things like scoring, thread gathering and thread comparison.
21030
21031 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21032 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21033 means, and the implementation has changed over time.
21034
21035 Basically, it tries to remove all noise from lines before comparing.
21036 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21037 out of the strings before comparing the results.  This often leads to
21038 adequate results---even when faced with strings generated by text
21039 manglers masquerading as newsreaders.
21040
21041
21042 @node Thwarting Email Spam
21043 @section Thwarting Email Spam
21044 @cindex email spam
21045 @cindex spam
21046 @cindex UCE
21047 @cindex unsolicited commercial email
21048
21049 In these last days of the Usenet, commercial vultures are hanging about
21050 and grepping through news like crazy to find email addresses they can
21051 foist off their scams and products to.  As a reaction to this, many
21052 people have started putting nonsense addresses into their @code{From}
21053 lines.  I think this is counterproductive---it makes it difficult for
21054 people to send you legitimate mail in response to things you write, as
21055 well as making it difficult to see who wrote what.  This rewriting may
21056 perhaps be a bigger menace than the unsolicited commercial email itself
21057 in the end.
21058
21059 The biggest problem I have with email spam is that it comes in under
21060 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21061 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21062 mail group, only to find two pyramid schemes, seven advertisements
21063 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21064 and one mail asking me to repent and find some god.
21065
21066 This is annoying.  Here's what you can do about it.
21067
21068 @menu
21069 * The problem of spam::         Some background, and some solutions
21070 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21071 * SpamAssassin::                How to use external anti-spam tools.
21072 * Hashcash::                    Reduce spam by burning CPU time.
21073 * Filtering Spam Using The Spam ELisp Package::  
21074 * Filtering Spam Using Statistics with spam-stat::  
21075 @end menu
21076
21077 @node The problem of spam
21078 @subsection The problem of spam
21079 @cindex email spam
21080 @cindex spam filtering approaches
21081 @cindex filtering approaches, spam
21082 @cindex UCE
21083 @cindex unsolicited commercial email
21084
21085 First, some background on spam.
21086
21087 If you have access to e-mail, you are familiar with spam (technically
21088 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21089 because e-mail delivery is very cheap compared to paper mail, so only
21090 a very small percentage of people need to respond to an UCE to make it
21091 worthwhile to the advertiser.  Ironically, one of the most common
21092 spams is the one offering a database of e-mail addresses for further
21093 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21094 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21095
21096 Spam comes from a wide variety of sources.  It is simply impossible to
21097 dispose of all spam without discarding useful messages.  A good
21098 example is the TMDA system, which requires senders
21099 unknown to you to confirm themselves as legitimate senders before
21100 their e-mail can reach you.  Without getting into the technical side
21101 of TMDA, a downside is clearly that e-mail from legitimate sources may
21102 be discarded if those sources can't or won't confirm themselves
21103 through the TMDA system.  Another problem with TMDA is that it
21104 requires its users to have a basic understanding of e-mail delivery
21105 and processing.
21106
21107 The simplest approach to filtering spam is filtering.  If you get 200
21108 spam messages per day from @email{random-address@@vmadmin.com}, you
21109 block @samp{vmadmin.com}.  If you get 200 messages about
21110 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21111 message.  This, unfortunately, is a great way to discard legitimate
21112 e-mail.  For instance, the very informative and useful RISKS digest
21113 has been blocked by overzealous mail filters because it
21114 @strong{contained} words that were common in spam messages.
21115 Nevertheless, in isolated cases, with great care, direct filtering of
21116 mail can be useful.
21117
21118 Another approach to filtering e-mail is the distributed spam
21119 processing, for instance DCC implements such a system.  In essence,
21120 @code{N} systems around the world agree that a machine @samp{X} in
21121 China, Ghana, or California is sending out spam e-mail, and these
21122 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21123 a database.  The criteria for spam detection vary - it may be the
21124 number of messages sent, the content of the messages, and so on.  When
21125 a user of the distributed processing system wants to find out if a
21126 message is spam, he consults one of those @code{N} systems.
21127
21128 Distributed spam processing works very well against spammers that send
21129 a large number of messages at once, but it requires the user to set up
21130 fairly complicated checks.  There are commercial and free distributed
21131 spam processing systems.  Distributed spam processing has its risks as
21132 well.  For instance legitimate e-mail senders have been accused of
21133 sending spam, and their web sites have been shut down for some time
21134 because of the incident.
21135
21136 The statistical approach to spam filtering is also popular.  It is
21137 based on a statistical analysis of previous spam messages.  Usually
21138 the analysis is a simple word frequency count, with perhaps pairs of
21139 words or 3-word combinations thrown into the mix.  Statistical
21140 analysis of spam works very well in most of the cases, but it can
21141 classify legitimate e-mail as spam in some cases.  It takes time to
21142 run the analysis, the full message must be analyzed, and the user has
21143 to store the database of spam analyses.
21144
21145 @node Anti-Spam Basics
21146 @subsection Anti-Spam Basics
21147 @cindex email spam
21148 @cindex spam
21149 @cindex UCE
21150 @cindex unsolicited commercial email
21151
21152 One way of dealing with spam is having Gnus split out all spam into a
21153 @samp{spam} mail group (@pxref{Splitting Mail}).
21154
21155 First, pick one (1) valid mail address that you can be reached at, and
21156 put it in your @code{From} header of all your news articles.  (I've
21157 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21158 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21159 sysadmin whether your sendmail installation accepts keywords in the local
21160 part of the mail address.)
21161
21162 @lisp
21163 (setq message-default-news-headers
21164       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21165 @end lisp
21166
21167 Then put the following split rule in @code{nnmail-split-fancy}
21168 (@pxref{Fancy Mail Splitting}):
21169
21170 @lisp
21171 (
21172  ...
21173  (to "larsi@@trym.ifi.uio.no"
21174       (| ("subject" "re:.*" "misc")
21175          ("references" ".*@@.*" "misc")
21176          "spam"))
21177  ...
21178 )
21179 @end lisp
21180
21181 This says that all mail to this address is suspect, but if it has a
21182 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
21183 header, it's probably ok.  All the rest goes to the @samp{spam} group.
21184 (This idea probably comes from Tim Pierce.)
21185
21186 In addition, many mail spammers talk directly to your @sc{smtp} server
21187 and do not include your email address explicitly in the @code{To}
21188 header.  Why they do this is unknown---perhaps it's to thwart this
21189 thwarting scheme?  In any case, this is trivial to deal with---you just
21190 put anything not addressed to you in the @samp{spam} group by ending
21191 your fancy split rule in this way:
21192
21193 @lisp
21194 (
21195  ...
21196  (to "larsi" "misc")
21197  "spam")
21198 @end lisp
21199
21200 In my experience, this will sort virtually everything into the right
21201 group.  You still have to check the @samp{spam} group from time to time to
21202 check for legitimate mail, though.  If you feel like being a good net
21203 citizen, you can even send off complaints to the proper authorities on
21204 each unsolicited commercial email---at your leisure.
21205
21206 If you are also a lazy net citizen, you will probably prefer complaining
21207 automatically with the @file{gnus-junk.el} package, available FOR FREE
21208 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
21209 Since most e-mail spam is sent automatically, this may reconcile the
21210 cosmic balance somewhat.
21211
21212 This works for me.  It allows people an easy way to contact me (they can
21213 just press @kbd{r} in the usual way), and I'm not bothered at all with
21214 spam.  It's a win-win situation.  Forging @code{From} headers to point
21215 to non-existent domains is yucky, in my opinion.
21216
21217
21218
21219 @node SpamAssassin
21220 @subsection SpamAssassin, Vipul's Razor, DCC, etc
21221 @cindex SpamAssassin
21222 @cindex Vipul's Razor
21223 @cindex DCC
21224
21225 The days where the hints in the previous section was sufficient in
21226 avoiding spam is coming to an end.  There are many tools out there
21227 that claim to reduce the amount of spam you get.  This section could
21228 easily become outdated fast, as new products replace old, but
21229 fortunately most of these tools seem to have similar interfaces.  Even
21230 though this section will use SpamAssassin as an example, it should be
21231 easy to adapt it to most other tools.
21232
21233 If the tool you are using is not installed on the mail server, you
21234 need to invoke it yourself.  Ideas on how to use the
21235 @code{:postscript} mail source parameter (@pxref{Mail Source
21236 Specifiers}) follows.
21237
21238 @lisp
21239 (setq mail-sources
21240       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
21241         (pop :user "jrl"
21242              :server "pophost"
21243              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
21244 @end lisp
21245
21246 Once you managed to process your incoming spool somehow, thus making
21247 the mail contain e.g. a header indicating it is spam, you are ready to
21248 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
21249
21250 @lisp
21251 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
21252                              ...))
21253 @end lisp
21254
21255 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
21256
21257 @lisp
21258 (setq nnmail-split-methods 'nnmail-split-fancy
21259       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
21260                              ...))
21261 @end lisp
21262
21263 Some people might not like the idea of piping the mail through various
21264 programs using a @code{:prescript} (if some program is buggy, you
21265 might lose all mail).  If you are one of them, another solution is to
21266 call the external tools during splitting.  Example fancy split method:
21267
21268 @lisp
21269 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
21270                              ...))
21271 (defun kevin-spamassassin ()
21272   (save-excursion
21273     (let ((buf (or (get-buffer " *nnmail incoming*")
21274                    (get-buffer " *nnml move*"))))
21275       (if (not buf)
21276           (progn (message "Oops, cannot find message buffer") nil)
21277         (set-buffer buf)
21278         (if (eq 1 (call-process-region (point-min) (point-max)
21279                                        "spamc" nil nil nil "-c"))
21280             "spam")))))
21281 @end lisp
21282
21283 That is about it.  As some spam is likely to get through anyway, you
21284 might want to have a nifty function to call when you happen to read
21285 spam.  And here is the nifty function:
21286
21287 @lisp
21288  (defun my-gnus-raze-spam ()
21289   "Submit SPAM to Vipul's Razor, then mark it as expirable."
21290   (interactive)
21291   (gnus-summary-show-raw-article)
21292   (gnus-summary-save-in-pipe "razor-report -f -d")
21293   (gnus-summary-mark-as-expirable 1))
21294 @end lisp
21295
21296 @node Hashcash
21297 @subsection Hashcash
21298 @cindex hashcash
21299
21300 A novel technique to fight spam is to require senders to do something
21301 costly for each message they send.  This has the obvious drawback that
21302 you cannot rely on that everyone in the world uses this technique,
21303 since it is not part of the Internet standards, but it may be useful
21304 in smaller communities.
21305
21306 While the tools in the previous section work well in practice, they
21307 work only because the tools are constantly maintained and updated as
21308 new form of spam appears.  This means that a small percentage of spam
21309 will always get through.  It also means that somewhere, someone needs
21310 to read lots of spam to update these tools.  Hashcash avoids that, but
21311 instead requires that everyone you communicate with supports the
21312 scheme.  You can view the two approaches as pragmatic vs dogmatic.
21313 The approaches have their own advantages and disadvantages, but as
21314 often in the real world, a combination of them is stronger than either
21315 one of them separately.
21316
21317 @cindex X-Hashcash
21318 The ``something costly'' is to burn CPU time, more specifically to
21319 compute a hash collision up to a certain number of bits.  The
21320 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
21321 header. For more details, and for the external application
21322 @code{hashcash} you need to install to use this feature, see
21323 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
21324 information can be found at @uref{http://www.camram.org/}.
21325
21326 If you wish to call hashcash for each message you send, say something
21327 like:
21328
21329 @lisp
21330 (require 'hashcash)
21331 (add-hook 'message-send-hook 'mail-add-payment)
21332 @end lisp
21333
21334 The @code{hashcash.el} library can be found at
21335 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}, or in the Gnus
21336 development contrib directory.
21337
21338 You will need to set up some additional variables as well:
21339
21340 @table @code
21341
21342 @item hashcash-default-payment
21343 @vindex hashcash-default-payment
21344 This variable indicates the default number of bits the hash collision
21345 should consist of.  By default this is 0, meaning nothing will be
21346 done.  Suggested useful values include 17 to 29.
21347
21348 @item hashcash-payment-alist
21349 @vindex hashcash-payment-alist
21350 Some receivers may require you to spend burn more CPU time than the
21351 default.  This variable contains a list of @samp{(ADDR AMOUNT)} cells,
21352 where ADDR is the receiver (email address or newsgroup) and AMOUNT is
21353 the number of bits in the collision that is needed.  It can also
21354 contain @samp{(ADDR STRING AMOUNT)} cells, where the STRING is the
21355 string to use (normally the email address or newsgroup name is used).
21356
21357 @item hashcash
21358 @vindex hashcash
21359 Where the @code{hashcash} binary is installed.
21360
21361 @end table
21362
21363 Currently there is no built in functionality in Gnus to verify
21364 hashcash cookies, it is expected that this is performed by your hand
21365 customized mail filtering scripts.  Improvements in this area would be
21366 a useful contribution, however.
21367
21368 @node Filtering Spam Using The Spam ELisp Package
21369 @subsection Filtering Spam Using The Spam ELisp Package
21370 @cindex spam filtering
21371 @cindex spam
21372
21373 The idea behind @code{spam.el} is to have a control center for spam detection
21374 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
21375 filters incoming mail, and it analyzes mail known to be spam or ham.
21376 @emph{Ham} is the name used throughout @code{spam.el} to indicate
21377 non-spam messages.
21378
21379 So, what happens when you load @code{spam.el}?  First of all, you get
21380 the following keyboard commands:
21381
21382 @table @kbd
21383
21384 @item M-d
21385 @itemx M s x
21386 @itemx S x
21387 @kindex M-d
21388 @kindex S x
21389 @kindex M s x
21390 @findex gnus-summary-mark-as-spam
21391 @code{gnus-summary-mark-as-spam}.
21392
21393 Mark current article as spam, showing it with the @samp{H} mark.
21394 Whenever you see a spam article, make sure to mark its summary line
21395 with @kbd{M-d} before leaving the group.  This is done automatically
21396 for unread articles in @emph{spam} groups.
21397
21398 @item M s t
21399 @itemx S t
21400 @kindex M s t
21401 @kindex S t
21402 @findex spam-bogofilter-score
21403 @code{spam-bogofilter-score}.
21404
21405 You must have Bogofilter installed for that command to work properly.
21406
21407 @xref{Bogofilter}.
21408
21409 @end table
21410
21411 Also, when you load @code{spam.el}, you will be able to customize its
21412 variables.  Try @code{customize-group} on the @samp{spam} variable
21413 group.
21414
21415 The concepts of ham processors and spam processors are very important.
21416 Ham processors and spam processors for a group can be set with the
21417 @code{spam-process} group parameter, or the
21418 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
21419 mail known to be non-spam (@emph{ham}) and process it in some way so
21420 that later similar mail will also be considered non-spam.  Spam
21421 processors take mail known to be spam and process it so similar spam
21422 will be detected later.
21423
21424 Gnus learns from the spam you get.  You have to collect your spam in
21425 one or more spam groups, and set or customize the variable
21426 @code{spam-junk-mailgroups} as appropriate.  You can also declare
21427 groups to contain spam by setting their group parameter
21428 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
21429 by customizing the corresponding variable
21430 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
21431 parameter and the @code{gnus-spam-newsgroup-contents} variable can
21432 also be used to declare groups as @emph{ham} groups if you set their
21433 classification to @code{gnus-group-spam-classification-ham}.  If
21434 groups are not classified by means of @code{spam-junk-mailgroups},
21435 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
21436 considered @emph{unclassified}.  All groups are unclassified by
21437 default.
21438
21439 In spam groups, all messages are considered to be spam by default:
21440 they get the @samp{H} mark when you enter the group.  You must review
21441 these messages from time to time and remove the @samp{H} mark for
21442 every message that is not spam after all.  To remove the @samp{H}
21443 mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
21444 declaring it read the non-spam way.  When you leave a group, all
21445 spam-marked (@samp{H}) articles are sent to a spam processor which
21446 will study them as spam samples.
21447
21448 Messages may also be deleted in various other ways, and unless
21449 @code{spam-ham-marks} gets overridden below, marks @samp{R} and
21450 @samp{r} for default read or explicit delete, marks @samp{X} and
21451 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
21452 low scores, are all considered to be associated with articles which
21453 are not spam.  This assumption might be false, in particular if you
21454 use kill files or score files as means for detecting genuine spam, you
21455 should then adjust the @code{spam-ham-marks} variable.
21456
21457 @defvar spam-ham-marks
21458 You can customize this variable to be the list of marks you want to
21459 consider ham.  By default, the list contains the deleted, read,
21460 killed, kill-filed, and low-score marks.
21461 @end defvar
21462
21463 @defvar spam-spam-marks
21464 You can customize this variable to be the list of marks you want to
21465 consider spam.  By default, the list contains only the spam mark.
21466 @end defvar
21467
21468 When you leave @emph{any} group, regardless of its
21469 @code{spam-contents} classification, all spam-marked articles are sent
21470 to a spam processor, which will study these as spam samples.  If you
21471 explicit kill a lot, you might sometimes end up with articles marked
21472 @samp{K} which you never saw, and which might accidentally contain
21473 spam.  Best is to make sure that real spam is marked with @samp{H},
21474 and nothing else.
21475
21476 When you leave a @emph{spam} group, all spam-marked articles are
21477 marked as expired after processing with the spam processor.  This is
21478 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
21479 @strong{ham} articles in a spam group will be moved to a location
21480 determined by either the @code{ham-process-destination} group
21481 parameter or a match in the @code{gnus-ham-process-destinations}
21482 variable, which is a list of regular expressions matched with group
21483 names (it's easiest to customize this variable with
21484 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
21485 location is a group name.  If the @code{ham-process-destination}
21486 parameter is not set, spam articles are only expired.
21487
21488 When you leave a @emph{ham} group, all ham-marked articles are sent to
21489 a ham processor, which will study these as non-spam samples.
21490
21491 When you leave a @emph{ham} or @emph{unclassified} group, all
21492 @strong{spam} articles are moved to a location determined by either
21493 the @code{spam-process-destination} group parameter or a match in the
21494 @code{gnus-spam-process-destinations} variable, which is a list of
21495 regular expressions matched with group names (it's easiest to
21496 customize this variable with @code{customize-variable
21497 gnus-spam-process-destinations}).  The ultimate location is a group
21498 name.  If the @code{spam-process-destination} parameter is not set,
21499 the spam articles are only expired.
21500
21501 To use the @code{spam.el} facilities for incoming mail filtering, you
21502 must add the following to your fancy split list
21503 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
21504
21505 @example
21506 (: spam-split)
21507 @end example
21508
21509 Note that the fancy split may be called @code{nnmail-split-fancy} or
21510 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
21511 nnimap back ends to retrieve your mail.
21512
21513 The @code{spam-split} function will process incoming mail and send the
21514 mail considered to be spam into the group name given by the variable
21515 @code{spam-split-group}.  By default that group name is @samp{spam},
21516 but you can customize it.
21517
21518 @emph{Note for IMAP users}
21519
21520 The boolean variable @code{nnimap-split-download-body} needs to be
21521 set, if you want to split based on the whole message instead of just
21522 the headers.  By default, the nnimap backend will only retrieve the
21523 message headers.  If you use spam-check-bogofilter, spam-check-ifile,
21524 or spam-check-stat (the splitters that can benefit from the full
21525 message body), you should set this variable.  It is not set by default
21526 because it will slow IMAP down.
21527
21528 @xref{Splitting in IMAP}.
21529
21530 @emph{TODO: Currently, spam.el only supports insertion of articles
21531 into a backend.  There is no way to tell spam.el that an article is no
21532 longer spam or ham.}
21533
21534 @emph{TODO: spam.el needs to provide a uniform way of training all the
21535 statistical databases.  Some have that functionality built-in, others
21536 don't.}
21537
21538 The following are the methods you can use to control the behavior of
21539 @code{spam-split} and their corresponding spam and ham processors:
21540
21541 @menu
21542 * Blacklists and Whitelists::   
21543 * BBDB Whitelists::             
21544 * Blackholes::                  
21545 * Bogofilter::                  
21546 * ifile spam filtering::        
21547 * spam-stat spam filtering::    
21548 * Extending the spam elisp package::  
21549 @end menu
21550
21551 @node Blacklists and Whitelists
21552 @subsubsection Blacklists and Whitelists
21553 @cindex spam filtering
21554 @cindex whitelists, spam filtering
21555 @cindex blacklists, spam filtering
21556 @cindex spam
21557
21558 @defvar spam-use-blacklist
21559 Set this variable to @code{t} if you want to use blacklists when
21560 splitting incoming mail.  Messages whose senders are in the blacklist
21561 will be sent to the @code{spam-split-group}.  This is an explicit
21562 filter, meaning that it acts only on mail senders @emph{declared} to
21563 be spammers.
21564 @end defvar
21565
21566 @defvar spam-use-whitelist
21567 Set this variable to @code{t} if you want to use whitelists when
21568 splitting incoming mail.  Messages whose senders are not in the
21569 whitelist will be sent to the @code{spam-split-group}.  This is an
21570 implicit filter, meaning it believes everyone to be a spammer unless
21571 told otherwise.  Use with care.
21572 @end defvar
21573
21574 @defvar gnus-group-spam-exit-processor-blacklist
21575 Add this symbol to a group's @code{spam-process} parameter by
21576 customizing the group parameters or the
21577 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21578 added to a group's @code{spam-process} parameter, the senders of
21579 spam-marked articles will be added to the blacklist.
21580 @end defvar
21581
21582 @defvar gnus-group-ham-exit-processor-whitelist
21583 Add this symbol to a group's @code{spam-process} parameter by
21584 customizing the group parameters or the
21585 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21586 added to a group's @code{spam-process} parameter, the senders of
21587 ham-marked articles in @emph{ham} groups will be added to the
21588 whitelist.  Note that this ham processor has no effect in @emph{spam}
21589 or @emph{unclassified} groups.
21590 @end defvar
21591
21592 Blacklists are lists of regular expressions matching addresses you
21593 consider to be spam senders.  For instance, to block mail from any
21594 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
21595 blacklist.  You start out with an empty blacklist.  Blacklist entries
21596 use the Emacs regular expression syntax.
21597
21598 Conversely, whitelists tell Gnus what addresses are considered
21599 legitimate.  All non-whitelisted addresses are considered spammers.
21600 This option is probably not useful for most Gnus users unless the
21601 whitelists is very comprehensive or permissive.  Also see @ref{BBDB
21602 Whitelists}.  Whitelist entries use the Emacs regular expression
21603 syntax.
21604
21605 The blacklist and whitelist file locations can be customized with the
21606 @code{spam-directory} variable (@file{~/News/spam} by default), or
21607 the @code{spam-whitelist} and @code{spam-blacklist} variables
21608 directly.  The whitelist and blacklist files will by default be in the
21609 @code{spam-directory} directory, named @file{whitelist} and
21610 @file{blacklist} respectively.
21611
21612 @node BBDB Whitelists
21613 @subsubsection BBDB Whitelists
21614 @cindex spam filtering
21615 @cindex BBDB whitelists, spam filtering
21616 @cindex BBDB, spam filtering
21617 @cindex spam
21618
21619 @defvar spam-use-BBDB
21620
21621 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
21622 Whitelists}), but uses the BBDB as the source of whitelisted addresses,
21623 without regular expressions.  You must have the BBDB loaded for
21624 @code{spam-use-BBDB} to work properly.  Only addresses in the BBDB
21625 will be allowed through; all others will be classified as spam.
21626
21627 @end defvar
21628
21629 @defvar gnus-group-ham-exit-processor-BBDB
21630 Add this symbol to a group's @code{spam-process} parameter by
21631 customizing the group parameters or the
21632 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21633 added to a group's @code{spam-process} parameter, the senders of
21634 ham-marked articles in @emph{ham} groups will be added to the
21635 BBDB.  Note that this ham processor has no effect in @emph{spam}
21636 or @emph{unclassified} groups.
21637 @end defvar
21638
21639 @node Blackholes
21640 @subsubsection Blackholes
21641 @cindex spam filtering
21642 @cindex blackholes, spam filtering
21643 @cindex spam
21644
21645 @defvar spam-use-blackholes
21646
21647 This option is disabled by default.  You can let Gnus consult the
21648 blackhole-type distributed spam processing systems (DCC, for instance)
21649 when you set this option.  The variable @code{spam-blackhole-servers}
21650 holds the list of blackhole servers Gnus will consult.  The current
21651 list is fairly comprehensive, but make sure to let us know if it
21652 contains outdated servers.
21653
21654 The blackhole check uses the @code{dig.el} package, but you can tell
21655 @code{spam.el} to use @code{dns.el} instead for better performance if
21656 you set @code{spam-use-dig} to nil.  It is not recommended at this
21657 time to set @code{spam-use-dig} to nil despite the possible
21658 performance improvements, because some users may be unable to use it,
21659 but you can try it and see if it works for you.
21660
21661 @end defvar
21662
21663 @defvar spam-blackhole-servers
21664
21665 The list of servers to consult for blackhole checks.
21666
21667 @end defvar
21668
21669 @defvar spam-use-dig
21670
21671 Use the @code{dig.el} package instead of the @code{dns.el} package.
21672 The default setting of @code{t} is recommended.
21673
21674 @end defvar
21675
21676 Blackhole checks are done only on incoming mail.  There is no spam or
21677 ham processor for blackholes.
21678
21679 @node Bogofilter
21680 @subsubsection Bogofilter
21681 @cindex spam filtering
21682 @cindex bogofilter, spam filtering
21683 @cindex spam
21684
21685 @defvar spam-use-bogofilter
21686
21687 Set this variable if you want @code{spam-split} to use Eric Raymond's
21688 speedy Bogofilter.
21689
21690 With a minimum of care for associating the @samp{H} mark for spam
21691 articles only, Bogofilter training all gets fairly automatic.  You
21692 should do this until you get a few hundreds of articles in each
21693 category, spam or not.  The command @kbd{S t} in summary mode, either
21694 for debugging or for curiosity, shows the @emph{spamicity} score of
21695 the current article (between 0.0 and 1.0).
21696
21697 Bogofilter determines if a message is spam based on an internal
21698 threshold, set at compilation time.  That threshold can't be
21699 customized.
21700
21701 If the @code{bogofilter} executable is not in your path, Bogofilter
21702 processing will be turned off.
21703
21704 You should not enable this if you use @code{spam-use-bogofilter-headers}.
21705
21706 @end defvar
21707
21708 @defvar spam-use-bogofilter-headers
21709
21710 Set this variable if you want @code{spam-split} to use Eric Raymond's
21711 speedy Bogofilter, looking only at the message headers.  It works
21712 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
21713 must be in the message already.  Normally you would do this with a
21714 procmail recipe or something similar; consult the Bogofilter
21715 installation documents for details.
21716
21717 You should not enable this if you use @code{spam-use-bogofilter}.
21718
21719 @end defvar
21720
21721 @defvar gnus-group-spam-exit-processor-bogofilter
21722 Add this symbol to a group's @code{spam-process} parameter by
21723 customizing the group parameters or the
21724 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21725 added to a group's @code{spam-process} parameter, spam-marked articles
21726 will be added to the Bogofilter spam database.
21727 @end defvar
21728
21729 @defvar gnus-group-ham-exit-processor-bogofilter
21730 Add this symbol to a group's @code{spam-process} parameter by
21731 customizing the group parameters or the
21732 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21733 added to a group's @code{spam-process} parameter, the ham-marked
21734 articles in @emph{ham} groups will be added to the Bogofilter database
21735 of non-spam messages.  Note that this ham processor has no effect in
21736 @emph{spam} or @emph{unclassified} groups.
21737 @end defvar
21738
21739 @defvar spam-bogofilter-database-directory
21740
21741 This is the directory where Bogofilter will store its databases.  It
21742 is not specified by default, so Bogofilter will use its own default
21743 database directory.
21744
21745 @end defvar
21746
21747 The Bogofilter mail classifier is similar to ifile in intent and
21748 purpose.  A ham and a spam processor are provided, plus the
21749 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
21750 variables to indicate to spam-split that Bogofilter should either be
21751 used, or has already been used on the article.  The 0.9.2.1 version of
21752 Bogofilter was used to test this functionality.
21753
21754 @node ifile spam filtering
21755 @subsubsection ifile spam filtering
21756 @cindex spam filtering
21757 @cindex ifile, spam filtering
21758 @cindex spam
21759
21760 @defvar spam-use-ifile
21761
21762 Enable this variable if you want @code{spam-split} to use ifile, a
21763 statistical analyzer similar to Bogofilter.
21764
21765 @end defvar
21766
21767 @defvar spam-ifile-all-categories
21768
21769 Enable this variable if you want @code{spam-use-ifile} to give you all
21770 the ifile categories, not just spam/non-spam.  If you use this, make
21771 sure you train ifile as described in its documentation.
21772
21773 @end defvar
21774
21775 @defvar spam-ifile-spam-category
21776
21777 This is the category of spam messages as far as ifile is concerned.
21778 The actual string used is irrelevant, but you probably want to leave
21779 the default value of @samp{spam}.
21780 @end defvar
21781
21782 @defvar spam-ifile-database-path
21783
21784 This is the filename for the ifile database.  It is not specified by
21785 default, so ifile will use its own default database name.
21786
21787 @end defvar
21788
21789 The ifile mail classifier is similar to Bogofilter in intent and
21790 purpose.  A ham and a spam processor are provided, plus the
21791 @code{spam-use-ifile} variable to indicate to spam-split that ifile
21792 should be used.  The 1.2.1 version of ifile was used to test this
21793 functionality.
21794
21795 @node spam-stat spam filtering
21796 @subsubsection spam-stat spam filtering
21797 @cindex spam filtering
21798 @cindex spam-stat, spam filtering
21799 @cindex spam-stat
21800 @cindex spam
21801
21802 @xref{Filtering Spam Using Statistics with spam-stat}.
21803
21804 @defvar spam-use-stat
21805
21806 Enable this variable if you want @code{spam-split} to use
21807 spam-stat.el, an Emacs Lisp statistical analyzer.
21808
21809 @end defvar
21810
21811 @defvar gnus-group-spam-exit-processor-stat
21812 Add this symbol to a group's @code{spam-process} parameter by
21813 customizing the group parameters or the
21814 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21815 added to a group's @code{spam-process} parameter, the spam-marked
21816 articles will be added to the spam-stat database of spam messages.
21817 @end defvar
21818
21819 @defvar gnus-group-ham-exit-processor-stat
21820 Add this symbol to a group's @code{spam-process} parameter by
21821 customizing the group parameters or the
21822 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
21823 added to a group's @code{spam-process} parameter, the ham-marked
21824 articles in @emph{ham} groups will be added to the spam-stat database
21825 of non-spam messages.  Note that this ham processor has no effect in
21826 @emph{spam} or @emph{unclassified} groups.
21827 @end defvar
21828
21829 This enables spam.el to cooperate with spam-stat.el.  spam-stat.el
21830 provides an internal (Lisp-only) spam database, which unlike ifile or
21831 Bogofilter does not require external programs.  A spam and a ham
21832 processor, and the @code{spam-use-stat} variable for @code{spam-split}
21833 are provided.
21834
21835 @node Extending the spam elisp package
21836 @subsubsection Extending the spam elisp package
21837 @cindex spam filtering
21838 @cindex spam elisp package, extending
21839 @cindex extending the spam elisp package
21840
21841 Say you want to add a new back end called blackbox.  For filtering
21842 incoming mail, provide the following:
21843
21844 @enumerate
21845
21846 @item
21847 code
21848
21849 @example
21850 (defvar spam-use-blackbox nil
21851   "True if blackbox should be used.")
21852 @end example
21853
21854 Add
21855 @example
21856     (spam-use-blackbox   . spam-check-blackbox)
21857 @end example
21858 to @code{spam-list-of-checks}.
21859
21860 @item
21861 functionality
21862
21863 Write the @code{spam-check-blackbox} function.  It should return
21864 @samp{nil} or @code{spam-split-group}.  See the existing
21865 @code{spam-check-*} functions for examples of what you can do.
21866 @end enumerate
21867
21868 For processing spam and ham messages, provide the following:
21869
21870 @enumerate
21871
21872 @item
21873 code 
21874
21875 Note you don't have to provide a spam or a ham processor.  Only
21876 provide them if Blackbox supports spam or ham processing.
21877
21878 @example
21879 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
21880   "The Blackbox summary exit spam processor.
21881 Only applicable to spam groups.")
21882
21883 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
21884   "The whitelist summary exit ham processor.
21885 Only applicable to non-spam (unclassified and ham) groups.")
21886
21887 @end example
21888
21889 @item
21890 functionality
21891
21892 @example
21893 (defun spam-blackbox-register-spam-routine ()
21894   (spam-generic-register-routine
21895    ;; the spam function
21896    (lambda (article)
21897      (let ((from (spam-fetch-field-from-fast article)))
21898        (when (stringp from)
21899            (blackbox-do-something-with-this-spammer from))))
21900    ;; the ham function
21901    nil))
21902
21903 (defun spam-blackbox-register-ham-routine ()
21904   (spam-generic-register-routine
21905    ;; the spam function
21906    nil
21907    ;; the ham function
21908    (lambda (article)
21909      (let ((from (spam-fetch-field-from-fast article)))
21910        (when (stringp from)
21911            (blackbox-do-something-with-this-ham-sender from))))))
21912 @end example
21913
21914 Write the @code{blackbox-do-something-with-this-ham-sender} and
21915 @code{blackbox-do-something-with-this-spammer} functions.  You can add
21916 more complex code than fetching the message sender, but keep in mind
21917 that retrieving the whole message takes significantly longer than the
21918 sender through @code{spam-fetch-field-from-fast}, because the message
21919 senders are kept in memory by Gnus.
21920
21921 @end enumerate
21922
21923
21924 @node Filtering Spam Using Statistics with spam-stat
21925 @subsection Filtering Spam Using Statistics with spam-stat
21926 @cindex Paul Graham
21927 @cindex Graham, Paul
21928 @cindex naive Bayesian spam filtering
21929 @cindex Bayesian spam filtering, naive
21930 @cindex spam filtering, naive Bayesian
21931
21932 Paul Graham has written an excellent essay about spam filtering using
21933 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
21934 Spam}.  In it he describes the inherent deficiency of rule-based
21935 filtering as used by SpamAssassin, for example: Somebody has to write
21936 the rules, and everybody else has to install these rules.  You are
21937 always late.  It would be much better, he argues, to filter mail based
21938 on whether it somehow resembles spam or non-spam.  One way to measure
21939 this is word distribution.  He then goes on to describe a solution
21940 that checks whether a new mail resembles any of your other spam mails
21941 or not.
21942
21943 The basic idea is this:  Create a two collections of your mail, one
21944 with spam, one with non-spam.  Count how often each word appears in
21945 either collection, weight this by the total number of mails in the
21946 collections, and store this information in a dictionary.  For every
21947 word in a new mail, determine its probability to belong to a spam or a
21948 non-spam mail.  Use the 15 most conspicuous words, compute the total
21949 probability of the mail being spam.  If this probability is higher
21950 than a certain threshold, the mail is considered to be spam.
21951
21952 Gnus supports this kind of filtering.  But it needs some setting up.
21953 First, you need two collections of your mail, one with spam, one with
21954 non-spam.  Then you need to create a dictionary using these two
21955 collections, and save it.  And last but not least, you need to use
21956 this dictionary in your fancy mail splitting rules.
21957
21958 @menu
21959 * Creating a spam-stat dictionary::  
21960 * Splitting mail using spam-stat::  
21961 * Low-level interface to the spam-stat dictionary::  
21962 @end menu
21963
21964 @node Creating a spam-stat dictionary
21965 @subsubsection Creating a spam-stat dictionary
21966
21967 Before you can begin to filter spam based on statistics, you must
21968 create these statistics based on two mail collections, one with spam,
21969 one with non-spam.  These statistics are then stored in a dictionary
21970 for later use.  In order for these statistics to be meaningful, you
21971 need several hundred emails in both collections.
21972
21973 Gnus currently supports only the nnml back end for automated dictionary
21974 creation.  The nnml back end stores all mails in a directory, one file
21975 per mail.  Use the following:
21976
21977 @defun spam-stat-process-spam-directory
21978 Create spam statistics for every file in this directory.  Every file
21979 is treated as one spam mail.
21980 @end defun
21981
21982 @defun spam-stat-process-non-spam-directory
21983 Create non-spam statistics for every file in this directory.  Every
21984 file is treated as one non-spam mail.
21985 @end defun
21986
21987 Usually you would call @code{spam-stat-process-spam-directory} on a
21988 directory such as @file{~/Mail/mail/spam} (this usually corresponds
21989 the the group @samp{nnml:mail.spam}), and you would call
21990 @code{spam-stat-process-non-spam-directory} on a directory such as
21991 @file{~/Mail/mail/misc} (this usually corresponds the the group
21992 @samp{nnml:mail.misc}).
21993
21994 When you are using IMAP, you won't have the mails available locally,
21995 so that will not work.  One solution is to use the Gnus Agent to cache
21996 the articles.  Then you can use directories such as
21997 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
21998 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
21999
22000 @defvar spam-stat
22001 This variable holds the hash-table with all the statistics -- the
22002 dictionary we have been talking about.  For every word in either
22003 collection, this hash-table stores a vector describing how often the
22004 word appeared in spam and often it appeared in non-spam mails.
22005 @end defvar
22006
22007 If you want to regenerate the statistics from scratch, you need to
22008 reset the dictionary.
22009
22010 @defun spam-stat-reset
22011 Reset the @code{spam-stat} hash-table, deleting all the statistics.
22012 @end defun
22013
22014 When you are done, you must save the dictionary.  The dictionary may
22015 be rather large.  If you will not update the dictionary incrementally
22016 (instead, you will recreate it once a month, for example), then you
22017 can reduce the size of the dictionary by deleting all words that did
22018 not appear often enough or that do not clearly belong to only spam or
22019 only non-spam mails.
22020
22021 @defun spam-stat-reduce-size
22022 Reduce the size of the dictionary.  Use this only if you do not want
22023 to update the dictionary incrementally.
22024 @end defun
22025
22026 @defun spam-stat-save
22027 Save the dictionary.
22028 @end defun
22029
22030 @defvar spam-stat-file
22031 The filename used to store the dictionary.  This defaults to
22032 @file{~/.spam-stat.el}.
22033 @end defvar
22034
22035 @node Splitting mail using spam-stat
22036 @subsubsection Splitting mail using spam-stat
22037
22038 In order to use @code{spam-stat} to split your mail, you need to add the
22039 following to your @file{~/.gnus} file:
22040
22041 @example
22042 (require 'spam-stat)
22043 (spam-stat-load)
22044 @end example
22045
22046 This will load the necessary Gnus code, and the dictionary you
22047 created.
22048
22049 Next, you need to adapt your fancy splitting rules:  You need to
22050 determine how to use @code{spam-stat}.  The following examples are for
22051 the nnml back end.  Using the nnimap back end works just as well.  Just
22052 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
22053
22054 In the simplest case, you only have two groups, @samp{mail.misc} and
22055 @samp{mail.spam}.  The following expression says that mail is either
22056 spam or it should go into @samp{mail.misc}.  If it is spam, then
22057 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
22058
22059 @example
22060 (setq nnmail-split-fancy
22061       `(| (: spam-stat-split-fancy)
22062           "mail.misc"))
22063 @end example
22064
22065 @defvar spam-stat-split-fancy-spam-group
22066 The group to use for spam.  Default is @samp{mail.spam}.
22067 @end defvar
22068
22069 If you also filter mail with specific subjects into other groups, use
22070 the following expression.  Only mails not matching the regular
22071 expression are considered potential spam.
22072
22073 @example
22074 (setq nnmail-split-fancy
22075       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
22076           (: spam-stat-split-fancy)
22077           "mail.misc"))
22078 @end example
22079
22080 If you want to filter for spam first, then you must be careful when
22081 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
22082 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
22083 non-spam, therefore both should be in your collection of non-spam
22084 mails, when creating the dictionary!
22085
22086 @example
22087 (setq nnmail-split-fancy
22088       `(| (: spam-stat-split-fancy)
22089           ("Subject" "\\bspam-stat\\b" "mail.emacs")
22090           "mail.misc"))
22091 @end example
22092
22093 You can combine this with traditional filtering.  Here, we move all
22094 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
22095 @code{spam-stat-split-fancy} will never see them, the mails in
22096 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
22097 nor in your collection of non-spam mails, when creating the
22098 dictionary!
22099
22100 @example
22101 (setq nnmail-split-fancy
22102       `(| ("Content-Type" "text/html" "mail.spam.filtered")
22103           (: spam-stat-split-fancy)
22104           ("Subject" "\\bspam-stat\\b" "mail.emacs")
22105           "mail.misc"))
22106 @end example
22107
22108
22109 @node Low-level interface to the spam-stat dictionary
22110 @subsubsection Low-level interface to the spam-stat dictionary
22111
22112 The main interface to using @code{spam-stat}, are the following functions:
22113
22114 @defun spam-stat-buffer-is-spam
22115 Called in a buffer, that buffer is considered to be a new spam mail.
22116 Use this for new mail that has not been processed before.
22117 @end defun
22118
22119 @defun spam-stat-buffer-is-no-spam
22120 Called in a buffer, that buffer is considered to be a new non-spam
22121 mail.  Use this for new mail that has not been processed before.
22122 @end defun
22123
22124 @defun spam-stat-buffer-change-to-spam
22125 Called in a buffer, that buffer is no longer considered to be normal
22126 mail but spam.  Use this to change the status of a mail that has
22127 already been processed as non-spam.
22128 @end defun
22129
22130 @defun spam-stat-buffer-change-to-non-spam
22131 Called in a buffer, that buffer is no longer considered to be spam but
22132 normal mail.  Use this to change the status of a mail that has already
22133 been processed as spam.
22134 @end defun
22135
22136 @defun spam-stat-save
22137 Save the hash table to the file.  The filename used is stored in the
22138 variable @code{spam-stat-file}.
22139 @end defun
22140
22141 @defun spam-stat-load
22142 Load the hash table from a file.  The filename used is stored in the
22143 variable @code{spam-stat-file}.
22144 @end defun
22145
22146 @defun spam-stat-score-word
22147 Return the spam score for a word.
22148 @end defun
22149
22150 @defun spam-stat-score-buffer
22151 Return the spam score for a buffer.
22152 @end defun
22153
22154 @defun spam-stat-split-fancy
22155 Use this function for fancy mail splitting.  Add the rule @samp{(:
22156 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
22157 @end defun
22158
22159 Make sure you load the dictionary before using it.  This requires the
22160 following in your @file{~/.gnus} file:
22161
22162 @example
22163 (require 'spam-stat)
22164 (spam-stat-load)
22165 @end example
22166
22167 Typical test will involve calls to the following functions:
22168
22169 @example
22170 Reset: (setq spam-stat (make-hash-table :test 'equal))
22171 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
22172 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
22173 Save table: (spam-stat-save)
22174 File size: (nth 7 (file-attributes spam-stat-file))
22175 Number of words: (hash-table-count spam-stat)
22176 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
22177 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
22178 Reduce table size: (spam-stat-reduce-size)
22179 Save table: (spam-stat-save)
22180 File size: (nth 7 (file-attributes spam-stat-file))
22181 Number of words: (hash-table-count spam-stat)
22182 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
22183 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
22184 @end example
22185
22186 Here is how you would create your dictionary:
22187
22188 @example
22189 Reset: (setq spam-stat (make-hash-table :test 'equal))
22190 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
22191 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
22192 Repeat for any other non-spam group you need...
22193 Reduce table size: (spam-stat-reduce-size)
22194 Save table: (spam-stat-save)
22195 @end example
22196
22197 @node Various Various
22198 @section Various Various
22199 @cindex mode lines
22200 @cindex highlights
22201
22202 @table @code
22203
22204 @item gnus-home-directory
22205 All Gnus file and directory variables will be initialized from this
22206 variable, which defaults to @file{~/}.
22207
22208 @item gnus-directory
22209 @vindex gnus-directory
22210 Most Gnus storage file and directory variables will be initialized from
22211 this variable, which defaults to the @samp{SAVEDIR} environment
22212 variable, or @file{~/News/} if that variable isn't set.
22213
22214 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
22215 This means that other directory variables that are initialized from this
22216 variable won't be set properly if you set this variable in
22217 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
22218
22219 @item gnus-default-directory
22220 @vindex gnus-default-directory
22221 Not related to the above variable at all---this variable says what the
22222 default directory of all Gnus buffers should be.  If you issue commands
22223 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
22224 default directory.  If this variable is @code{nil} (which is the
22225 default), the default directory will be the default directory of the
22226 buffer you were in when you started Gnus.
22227
22228 @item gnus-verbose
22229 @vindex gnus-verbose
22230 This variable is an integer between zero and ten.  The higher the value,
22231 the more messages will be displayed.  If this variable is zero, Gnus
22232 will never flash any messages, if it is seven (which is the default),
22233 most important messages will be shown, and if it is ten, Gnus won't ever
22234 shut up, but will flash so many messages it will make your head swim.
22235
22236 @item gnus-verbose-backends
22237 @vindex gnus-verbose-backends
22238 This variable works the same way as @code{gnus-verbose}, but it applies
22239 to the Gnus back ends instead of Gnus proper.
22240
22241 @item nnheader-max-head-length
22242 @vindex nnheader-max-head-length
22243 When the back ends read straight heads of articles, they all try to read
22244 as little as possible.  This variable (default 4096) specifies
22245 the absolute max length the back ends will try to read before giving up
22246 on finding a separator line between the head and the body.  If this
22247 variable is @code{nil}, there is no upper read bound.  If it is
22248 @code{t}, the back ends won't try to read the articles piece by piece,
22249 but read the entire articles.  This makes sense with some versions of
22250 @code{ange-ftp} or @code{efs}.
22251
22252 @item nnheader-head-chop-length
22253 @vindex nnheader-head-chop-length
22254 This variable (default 2048) says how big a piece of each article to
22255 read when doing the operation described above.
22256
22257 @item nnheader-file-name-translation-alist
22258 @vindex nnheader-file-name-translation-alist
22259 @cindex file names
22260 @cindex invalid characters in file names
22261 @cindex characters in file names
22262 This is an alist that says how to translate characters in file names.
22263 For instance, if @samp{:} is invalid as a file character in file names
22264 on your system (you OS/2 user you), you could say something like:
22265
22266 @lisp
22267 (setq nnheader-file-name-translation-alist
22268       '((?: . ?_)))
22269 @end lisp
22270
22271 In fact, this is the default value for this variable on OS/2 and MS
22272 Windows (phooey) systems.
22273
22274 @item gnus-hidden-properties
22275 @vindex gnus-hidden-properties
22276 This is a list of properties to use to hide ``invisible'' text.  It is
22277 @code{(invisible t intangible t)} by default on most systems, which
22278 makes invisible text invisible and intangible.
22279
22280 @item gnus-parse-headers-hook
22281 @vindex gnus-parse-headers-hook
22282 A hook called before parsing headers.  It can be used, for instance, to
22283 gather statistics on the headers fetched, or perhaps you'd like to prune
22284 some headers.  I don't see why you'd want that, though.
22285
22286 @item gnus-shell-command-separator
22287 @vindex gnus-shell-command-separator
22288 String used to separate two shell commands.  The default is @samp{;}.
22289
22290 @item gnus-invalid-group-regexp
22291 @vindex gnus-invalid-group-regexp
22292
22293 Regexp to match ``invalid'' group names when querying user for a group
22294 name.  The default value catches some @strong{really} invalid group
22295 names who could possibly mess up Gnus internally (like allowing
22296 @samp{:} in a group name, which is normally used to delimit method and
22297 group).
22298
22299 @sc{imap} users might want to allow @samp{/} in group names though.
22300
22301
22302 @end table
22303
22304 @node The End
22305 @chapter The End
22306
22307 Well, that's the manual---you can get on with your life now.  Keep in
22308 touch.  Say hello to your cats from me.
22309
22310 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
22311
22312 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
22313
22314 @quotation
22315 @strong{Te Deum}
22316
22317 @sp 1
22318 Not because of victories @*
22319 I sing,@*
22320 having none,@*
22321 but for the common sunshine,@*
22322 the breeze,@*
22323 the largess of the spring.
22324
22325 @sp 1
22326 Not for victory@*
22327 but for the day's work done@*
22328 as well as I was able;@*
22329 not for a seat upon the dais@*
22330 but at the common table.@*
22331 @end quotation
22332
22333
22334 @node Appendices
22335 @chapter Appendices
22336
22337 @menu
22338 * XEmacs::                      Requirements for installing under XEmacs.
22339 * History::                     How Gnus got where it is today.
22340 * On Writing Manuals::          Why this is not a beginner's guide.
22341 * Terminology::                 We use really difficult, like, words here.
22342 * Customization::               Tailoring Gnus to your needs.
22343 * Troubleshooting::             What you might try if things do not work.
22344 * Gnus Reference Guide::        Rilly, rilly technical stuff.
22345 * Emacs for Heathens::          A short introduction to Emacsian terms.
22346 * Frequently Asked Questions::
22347 @end menu
22348
22349
22350 @node XEmacs
22351 @section XEmacs
22352 @cindex XEmacs
22353 @cindex Installing under XEmacs
22354
22355 XEmacs is distributed as a collection of packages.  You should install
22356 whatever packages the Gnus XEmacs package requires.  The current
22357 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
22358 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
22359 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
22360 @samp{misc-games} package is required for Morse decoding.
22361
22362
22363 @node History
22364 @section History
22365
22366 @cindex history
22367 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
22368 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
22369
22370 If you want to investigate the person responsible for this outrage,
22371 you can point your (feh!) web browser to
22372 @uref{http://quimby.gnus.org/}.  This is also the primary
22373 distribution point for the new and spiffy versions of Gnus, and is
22374 known as The Site That Destroys Newsrcs And Drives People Mad.
22375
22376 During the first extended alpha period of development, the new Gnus was
22377 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
22378 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
22379 (Besides, the ``Gnus'' in this abbreviation should probably be
22380 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
22381 appropriate name, don't you think?)
22382
22383 In any case, after spending all that energy on coming up with a new and
22384 spunky name, we decided that the name was @emph{too} spunky, so we
22385 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
22386 ``@sc{gnus}''.  New vs. old.
22387
22388 @menu
22389 * Gnus Versions::               What Gnus versions have been released.
22390 * Other Gnus Versions::         Other Gnus versions that also have been released.
22391 * Why?::                        What's the point of Gnus?
22392 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
22393 * Conformity::                  Gnus tries to conform to all standards.
22394 * Emacsen::                     Gnus can be run on a few modern Emacsen.
22395 * Gnus Development::            How Gnus is developed.
22396 * Contributors::                Oodles of people.
22397 * New Features::                Pointers to some of the new stuff in Gnus.
22398 @end menu
22399
22400
22401 @node Gnus Versions
22402 @subsection Gnus Versions
22403 @cindex ding Gnus
22404 @cindex September Gnus
22405 @cindex Red Gnus
22406 @cindex Quassia Gnus
22407 @cindex Pterodactyl Gnus
22408 @cindex Oort Gnus
22409 @cindex No Gnus
22410
22411 The first ``proper'' release of Gnus 5 was done in November 1995 when it
22412 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
22413 plus 15 Gnus 5.0 releases).
22414
22415 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
22416 releases)) was released under the name ``Gnus 5.2'' (40 releases).
22417
22418 On July 28th 1996 work on Red Gnus was begun, and it was released on
22419 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
22420
22421 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
22422 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
22423
22424 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
22425 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
22426 1999.
22427
22428 On the 26th of October 2000, Oort Gnus was begun.
22429
22430 If you happen upon a version of Gnus that has a prefixed name --
22431 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
22432 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
22433 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
22434 run.  Walk away, calmly, until you're out of its reach.  Find a proper
22435 released version of Gnus and snuggle up to that instead.
22436
22437
22438 @node Other Gnus Versions
22439 @subsection Other Gnus Versions
22440 @cindex Semi-gnus
22441
22442 In addition to the versions of Gnus which have had their releases
22443 coordinated by Lars, one major development has been Semi-gnus from
22444 Japan.  It's based on a library called @sc{semi}, which provides
22445 @sc{mime} capabilities.
22446
22447 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
22448 Collectively, they are called ``Semi-gnus'', and different strains are
22449 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
22450 @sc{mime} and multilingualization things, especially important for
22451 Japanese users.
22452
22453
22454 @node Why?
22455 @subsection Why?
22456
22457 What's the point of Gnus?
22458
22459 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
22460 newsreader, that lets you do anything you can think of.  That was my
22461 original motivation, but while working on Gnus, it has become clear to
22462 me that this generation of newsreaders really belong in the stone age.
22463 Newsreaders haven't developed much since the infancy of the net.  If the
22464 volume continues to rise with the current rate of increase, all current
22465 newsreaders will be pretty much useless.  How do you deal with
22466 newsgroups that have thousands of new articles each day?  How do you
22467 keep track of millions of people who post?
22468
22469 Gnus offers no real solutions to these questions, but I would very much
22470 like to see Gnus being used as a testing ground for new methods of
22471 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
22472 to separate the newsreader from the back ends, Gnus now offers a simple
22473 interface for anybody who wants to write new back ends for fetching mail
22474 and news from different sources.  I have added hooks for customizations
22475 everywhere I could imagine it being useful.  By doing so, I'm inviting
22476 every one of you to explore and invent.
22477
22478 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
22479 @kbd{C-u 100 M-x all-hail-xemacs}.
22480
22481
22482 @node Compatibility
22483 @subsection Compatibility
22484
22485 @cindex compatibility
22486 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
22487 bindings have been kept.  More key bindings have been added, of course,
22488 but only in one or two obscure cases have old bindings been changed.
22489
22490 Our motto is:
22491 @quotation
22492 @cartouche
22493 @center In a cloud bones of steel.
22494 @end cartouche
22495 @end quotation
22496
22497 All commands have kept their names.  Some internal functions have changed
22498 their names.
22499
22500 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
22501 Articles}.
22502
22503 One major compatibility question is the presence of several summary
22504 buffers.  All variables relevant while reading a group are
22505 buffer-local to the summary buffer they belong in.  Although many
22506 important variables have their values copied into their global
22507 counterparts whenever a command is executed in the summary buffer, this
22508 change might lead to incorrect values being used unless you are careful.
22509
22510 All code that relies on knowledge of @sc{gnus} internals will probably
22511 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
22512 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
22513 maintains a hash table that points to the entries in this alist (which
22514 speeds up many functions), and changing the alist directly will lead to
22515 peculiar results.
22516
22517 @cindex hilit19
22518 @cindex highlighting
22519 Old hilit19 code does not work at all.  In fact, you should probably
22520 remove all hilit code from all Gnus hooks
22521 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
22522 Gnus provides various integrated functions for highlighting.  These are
22523 faster and more accurate.  To make life easier for everybody, Gnus will
22524 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
22525 Away!
22526
22527 Packages like @code{expire-kill} will no longer work.  As a matter of
22528 fact, you should probably remove all old @sc{gnus} packages (and other
22529 code) when you start using Gnus.  More likely than not, Gnus already
22530 does what you have written code to make @sc{gnus} do.  (Snicker.)
22531
22532 Even though old methods of doing things are still supported, only the
22533 new methods are documented in this manual.  If you detect a new method of
22534 doing something while reading this manual, that does not mean you have
22535 to stop doing it the old way.
22536
22537 Gnus understands all @sc{gnus} startup files.
22538
22539 @kindex M-x gnus-bug
22540 @findex gnus-bug
22541 @cindex reporting bugs
22542 @cindex bugs
22543 Overall, a casual user who hasn't written much code that depends on
22544 @sc{gnus} internals should suffer no problems.  If problems occur,
22545 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
22546
22547 @vindex gnus-bug-create-help-buffer
22548 If you are in the habit of sending bug reports @emph{very} often, you
22549 may find the helpful help buffer annoying after a while.  If so, set
22550 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
22551 up at you.
22552
22553
22554 @node Conformity
22555 @subsection Conformity
22556
22557 No rebels without a clue here, ma'am.  We conform to all standards known
22558 to (wo)man.  Except for those standards and/or conventions we disagree
22559 with, of course.
22560
22561 @table @strong
22562
22563 @item RFC (2)822
22564 @cindex RFC 822
22565 @cindex RFC 2822
22566 There are no known breaches of this standard.
22567
22568 @item RFC 1036
22569 @cindex RFC 1036
22570 There are no known breaches of this standard, either.
22571
22572 @item Son-of-RFC 1036
22573 @cindex Son-of-RFC 1036
22574 We do have some breaches to this one.
22575
22576 @table @emph
22577
22578 @item X-Newsreader
22579 @itemx User-Agent
22580 These are considered to be ``vanity headers'', while I consider them
22581 to be consumer information.  After seeing so many badly formatted
22582 articles coming from @code{tin} and @code{Netscape} I know not to use
22583 either of those for posting articles.  I would not have known that if
22584 it wasn't for the @code{X-Newsreader} header.
22585 @end table
22586
22587 @item USEFOR
22588 @cindex USEFOR
22589 USEFOR is an IETF working group writing a successor to RFC 1036, based
22590 on Son-of-RFC 1036.  They have produced a number of drafts proposing
22591 various changes to the format of news articles.  The Gnus towers will
22592 look into implementing the changes when the draft is accepted as an RFC.
22593
22594 @item MIME - RFC 2045-2049 etc
22595 @cindex MIME
22596 All the various @sc{mime} RFCs are supported.
22597
22598 @item Disposition Notifications - RFC 2298
22599 Message Mode is able to request notifications from the receiver.
22600
22601 @item PGP - RFC 1991 and RFC 2440
22602 @cindex RFC 1991
22603 @cindex RFC 2440
22604 RFC 1991 is the original PGP message specification, published as a
22605 Information RFC.  RFC 2440 was the follow-up, now called Open PGP, and
22606 put on the Standards Track.  Both document a non-@sc{mime} aware PGP
22607 format.  Gnus supports both encoding (signing and encryption) and
22608 decoding (verification and decryption).
22609
22610 @item PGP/MIME - RFC 2015/3156
22611 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
22612 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
22613 Gnus supports both encoding and decoding.
22614
22615 @item S/MIME - RFC 2633
22616 RFC 2633 describes the @sc{s/mime} format.
22617
22618 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
22619 RFC 1730 is @sc{imap} version 4, updated somewhat by RFC 2060 (@sc{imap} 4
22620 revision 1).  RFC 2195 describes CRAM-MD5 authentication for @sc{imap}. RFC
22621 2086 describes access control lists (ACLs) for @sc{imap}. RFC 2359
22622 describes a @sc{imap} protocol enhancement.  RFC 2595 describes the proper
22623 TLS integration (STARTTLS) with @sc{imap}.  RFC 1731 describes the
22624 GSSAPI/Kerberos4 mechanisms for @sc{imap}.
22625
22626 @end table
22627
22628 If you ever notice Gnus acting non-compliant with regards to the texts
22629 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
22630 know.
22631
22632
22633 @node Emacsen
22634 @subsection Emacsen
22635 @cindex Emacsen
22636 @cindex XEmacs
22637 @cindex Mule
22638 @cindex Emacs
22639
22640 Gnus should work on :
22641
22642 @itemize @bullet
22643
22644 @item
22645 Emacs 20.3 and up.
22646
22647 @item
22648 XEmacs 21.1.1 and up.
22649
22650 @end itemize
22651
22652 This Gnus version will absolutely not work on any Emacsen older than
22653 that.  Not reliably, at least.  Older versions of Gnus may work on older
22654 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
22655 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
22656 See the file ``README'' in the T-gnus distribution for more details.
22657
22658 There are some vague differences between Gnus on the various
22659 platforms---XEmacs features more graphics (a logo and a toolbar)---but
22660 other than that, things should look pretty much the same under all
22661 Emacsen.
22662
22663
22664 @node Gnus Development
22665 @subsection Gnus Development
22666
22667 Gnus is developed in a two-phased cycle.  The first phase involves much
22668 discussion on the @samp{ding@@gnus.org} mailing list, where people
22669 propose changes and new features, post patches and new back ends.  This
22670 phase is called the @dfn{alpha} phase, since the Gnusae released in this
22671 phase are @dfn{alpha releases}, or (perhaps more commonly in other
22672 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
22673 unstable and should not be used by casual users.  Gnus alpha releases
22674 have names like ``Red Gnus'' and ``Quassia Gnus''.
22675
22676 After futzing around for 50-100 alpha releases, Gnus is declared
22677 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
22678 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
22679 supposed to be able to use these, and these are mostly discussed on the
22680 @samp{gnu.emacs.gnus} newsgroup.
22681
22682 @cindex Incoming*
22683 @vindex mail-source-delete-incoming
22684 Some variable defaults differ between alpha Gnusae and released Gnusae.
22685 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
22686 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
22687 lossage of mail if an alpha release hiccups while handling the mail.
22688
22689 The division of discussion between the ding mailing list and the Gnus
22690 newsgroup is not purely based on publicity concerns.  It's true that
22691 having people write about the horrible things that an alpha Gnus release
22692 can do (sometimes) in a public forum may scare people off, but more
22693 importantly, talking about new experimental features that have been
22694 introduced may confuse casual users.  New features are frequently
22695 introduced, fiddled with, and judged to be found wanting, and then
22696 either discarded or totally rewritten.  People reading the mailing list
22697 usually keep up with these rapid changes, while people on the newsgroup
22698 can't be assumed to do so.
22699
22700
22701
22702 @node Contributors
22703 @subsection Contributors
22704 @cindex contributors
22705
22706 The new Gnus version couldn't have been done without the help of all the
22707 people on the (ding) mailing list.  Every day for over a year I have
22708 gotten billions of nice bug reports from them, filling me with joy,
22709 every single one of them.  Smooches.  The people on the list have been
22710 tried beyond endurance, what with my ``oh, that's a neat idea <type
22711 type>, yup, I'll release it right away <ship off> no wait, that doesn't
22712 work at all <type type>, yup, I'll ship that one off right away <ship
22713 off> no, wait, that absolutely does not work'' policy for releases.
22714 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
22715 ``worser''? ``much worser''?  ``worsest''?)
22716
22717 I would like to take this opportunity to thank the Academy for...  oops,
22718 wrong show.
22719
22720 @itemize @bullet
22721
22722 @item
22723 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
22724
22725 @item
22726 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
22727 nnwarchive and many, many other things connected with @sc{mime} and
22728 other types of en/decoding, as well as general bug fixing, new
22729 functionality and stuff.
22730
22731 @item
22732 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
22733 well as numerous other things).
22734
22735 @item
22736 Luis Fernandes---design and graphics.
22737
22738 @item
22739 Joe Reiss---creator of the smiley faces.
22740
22741 @item
22742 Justin Sheehy--the FAQ maintainer.
22743
22744 @item
22745 Erik Naggum---help, ideas, support, code and stuff.
22746
22747 @item
22748 Wes Hardaker---@file{gnus-picon.el} and the manual section on
22749 @dfn{picons} (@pxref{Picons}).
22750
22751 @item
22752 Kim-Minh Kaplan---further work on the picon code.
22753
22754 @item
22755 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
22756 (@pxref{GroupLens}).
22757
22758 @item
22759 Sudish Joseph---innumerable bug fixes.
22760
22761 @item
22762 Ilja Weis---@file{gnus-topic.el}.
22763
22764 @item
22765 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
22766
22767 @item
22768 Vladimir Alexiev---the refcard and reference booklets.
22769
22770 @item
22771 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
22772 distribution by Felix Lee and JWZ.
22773
22774 @item
22775 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
22776
22777 @item
22778 Peter Mutsaers---orphan article scoring code.
22779
22780 @item
22781 Ken Raeburn---POP mail support.
22782
22783 @item
22784 Hallvard B Furuseth---various bits and pieces, especially dealing with
22785 .newsrc files.
22786
22787 @item
22788 Brian Edmonds---@file{gnus-bbdb.el}.
22789
22790 @item
22791 David Moore---rewrite of @file{nnvirtual.el} and many other things.
22792
22793 @item
22794 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
22795
22796 @item
22797 François Pinard---many, many interesting and thorough bug reports, as
22798 well as autoconf support.
22799
22800 @end itemize
22801
22802 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
22803 Borges, and Jost Krieger proof-reading parts of the manual.
22804
22805 The following people have contributed many patches and suggestions:
22806
22807 Christopher Davis,
22808 Andrew Eskilsson,
22809 Kai Grossjohann,
22810 David KÃ¥gedal,
22811 Richard Pieri,
22812 Fabrice Popineau,
22813 Daniel Quinlan,
22814 Jason L. Tibbitts, III,
22815 and
22816 Jack Vinson.
22817
22818 Also thanks to the following for patches and stuff:
22819
22820 Jari Aalto,
22821 Adrian Aichner,
22822 Vladimir Alexiev,
22823 Russ Allbery,
22824 Peter Arius,
22825 Matt Armstrong,
22826 Marc Auslander,
22827 Miles Bader,
22828 Alexei V. Barantsev,
22829 Frank Bennett,
22830 Robert Bihlmeyer,
22831 Chris Bone,
22832 Mark Borges,
22833 Mark Boyns,
22834 Lance A. Brown,
22835 Rob Browning,
22836 Kees de Bruin,
22837 Martin Buchholz,
22838 Joe Buehler,
22839 Kevin Buhr,
22840 Alastair Burt,
22841 Joao Cachopo,
22842 Zlatko Calusic,
22843 Massimo Campostrini,
22844 Castor,
22845 David Charlap,
22846 Dan Christensen,
22847 Kevin Christian,
22848 Jae-you Chung, @c ?
22849 James H. Cloos, Jr.,
22850 Laura Conrad,
22851 Michael R. Cook,
22852 Glenn Coombs,
22853 Andrew J. Cosgriff,
22854 Neil Crellin,
22855 Frank D. Cringle,
22856 Geoffrey T. Dairiki,
22857 Andre Deparade,
22858 Ulrik Dickow,
22859 Dave Disser,
22860 Rui-Tao Dong, @c ?
22861 Joev Dubach,
22862 Michael Welsh Duggan,
22863 Dave Edmondson,
22864 Paul Eggert,
22865 Mark W. Eichin,
22866 Karl Eichwalder,
22867 Enami Tsugutomo, @c Enami
22868 Michael Ernst,
22869 Luc Van Eycken,
22870 Sam Falkner,
22871 Nelson Jose dos Santos Ferreira,
22872 Sigbjorn Finne,
22873 Sven Fischer,
22874 Paul Fisher,
22875 Decklin Foster,
22876 Gary D. Foster,
22877 Paul Franklin,
22878 Guy Geens,
22879 Arne Georg Gleditsch,
22880 David S. Goldberg,
22881 Michelangelo Grigni,
22882 Dale Hagglund,
22883 D. Hall,
22884 Magnus Hammerin,
22885 Kenichi Handa, @c Handa
22886 Raja R. Harinath,
22887 Yoshiki Hayashi, @c ?
22888 P. E. Jareth Hein,
22889 Hisashige Kenji, @c Hisashige
22890 Scott Hofmann,
22891 Marc Horowitz,
22892 Gunnar Horrigmo,
22893 Richard Hoskins,
22894 Brad Howes,
22895 Miguel de Icaza,
22896 François Felix Ingrand,
22897 Tatsuya Ichikawa, @c ?
22898 Ishikawa Ichiro, @c Ishikawa
22899 Lee Iverson,
22900 Iwamuro Motonori, @c Iwamuro
22901 Rajappa Iyer,
22902 Andreas Jaeger,
22903 Adam P. Jenkins,
22904 Randell Jesup,
22905 Fred Johansen,
22906 Gareth Jones,
22907 Simon Josefsson,
22908 Greg Klanderman,
22909 Karl Kleinpaste,
22910 Michael Klingbeil,
22911 Peter Skov Knudsen,
22912 Shuhei Kobayashi, @c Kobayashi
22913 Petr Konecny,
22914 Koseki Yoshinori, @c Koseki
22915 Thor Kristoffersen,
22916 Jens Lautenbacher,
22917 Martin Larose,
22918 Seokchan Lee, @c Lee
22919 Joerg Lenneis,
22920 Carsten Leonhardt,
22921 James LewisMoss,
22922 Christian Limpach,
22923 Markus Linnala,
22924 Dave Love,
22925 Mike McEwan,
22926 Tonny Madsen,
22927 Shlomo Mahlab,
22928 Nat Makarevitch,
22929 Istvan Marko,
22930 David Martin,
22931 Jason R. Mastaler,
22932 Gordon Matzigkeit,
22933 Timo Metzemakers,
22934 Richard Mlynarik,
22935 Lantz Moore,
22936 Morioka Tomohiko, @c Morioka
22937 Erik Toubro Nielsen,
22938 Hrvoje Niksic,
22939 Andy Norman,
22940 Fred Oberhauser,
22941 C. R. Oldham,
22942 Alexandre Oliva,
22943 Ken Olstad,
22944 Masaharu Onishi, @c Onishi
22945 Hideki Ono, @c Ono
22946 Ettore Perazzoli,
22947 William Perry,
22948 Stephen Peters,
22949 Jens-Ulrik Holger Petersen,
22950 Ulrich Pfeifer,
22951 Matt Pharr,
22952 Andy Piper,
22953 John McClary Prevost,
22954 Bill Pringlemeir,
22955 Mike Pullen,
22956 Jim Radford,
22957 Colin Rafferty,
22958 Lasse Rasinen,
22959 Lars Balker Rasmussen,
22960 Joe Reiss,
22961 Renaud Rioboo,
22962 Roland B. Roberts,
22963 Bart Robinson,
22964 Christian von Roques,
22965 Markus Rost,
22966 Jason Rumney,
22967 Wolfgang Rupprecht,
22968 Jay Sachs,
22969 Dewey M. Sasser,
22970 Conrad Sauerwald,
22971 Loren Schall,
22972 Dan Schmidt,
22973 Ralph Schleicher,
22974 Philippe Schnoebelen,
22975 Andreas Schwab,
22976 Randal L. Schwartz,
22977 Danny Siu,
22978 Matt Simmons,
22979 Paul D. Smith,
22980 Jeff Sparkes,
22981 Toby Speight,
22982 Michael Sperber,
22983 Darren Stalder,
22984 Richard Stallman,
22985 Greg Stark,
22986 Sam Steingold,
22987 Paul Stevenson,
22988 Jonas Steverud,
22989 Paul Stodghill,
22990 Kiyokazu Suto, @c Suto
22991 Kurt Swanson,
22992 Samuel Tardieu,
22993 Teddy,
22994 Chuck Thompson,
22995 Tozawa Akihiko, @c Tozawa
22996 Philippe Troin,
22997 James Troup,
22998 Trung Tran-Duc,
22999 Jack Twilley,
23000 Aaron M. Ucko,
23001 Aki Vehtari,
23002 Didier Verna,
23003 Vladimir Volovich,
23004 Jan Vroonhof,
23005 Stefan Waldherr,
23006 Pete Ware,
23007 Barry A. Warsaw,
23008 Christoph Wedler,
23009 Joe Wells,
23010 Lee Willis,
23011 Katsumi Yamaoka @c Yamaoka
23012 and
23013 Lloyd Zusman.
23014
23015
23016 For a full overview of what each person has done, the ChangeLogs
23017 included in the Gnus alpha distributions should give ample reading
23018 (550kB and counting).
23019
23020 Apologies to everybody that I've forgotten, of which there are many, I'm
23021 sure.
23022
23023 Gee, that's quite a list of people.  I guess that must mean that there
23024 actually are people who are using Gnus.  Who'd'a thunk it!
23025
23026
23027 @node New Features
23028 @subsection New Features
23029 @cindex new features
23030
23031 @menu
23032 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
23033 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
23034 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
23035 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
23036 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
23037 @end menu
23038
23039 These lists are, of course, just @emph{short} overviews of the
23040 @emph{most} important new features.  No, really.  There are tons more.
23041 Yes, we have feeping creaturism in full effect.
23042
23043 @node ding Gnus
23044 @subsubsection (ding) Gnus
23045
23046 New features in Gnus 5.0/5.1:
23047
23048 @itemize @bullet
23049
23050 @item
23051 The look of all buffers can be changed by setting format-like variables
23052 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
23053
23054 @item
23055 Local spool and several @sc{nntp} servers can be used at once
23056 (@pxref{Select Methods}).
23057
23058 @item
23059 You can combine groups into virtual groups (@pxref{Virtual Groups}).
23060
23061 @item
23062 You can read a number of different mail formats (@pxref{Getting Mail}).
23063 All the mail back ends implement a convenient mail expiry scheme
23064 (@pxref{Expiring Mail}).
23065
23066 @item
23067 Gnus can use various strategies for gathering threads that have lost
23068 their roots (thereby gathering loose sub-threads into one thread) or it
23069 can go back and retrieve enough headers to build a complete thread
23070 (@pxref{Customizing Threading}).
23071
23072 @item
23073 Killed groups can be displayed in the group buffer, and you can read
23074 them as well (@pxref{Listing Groups}).
23075
23076 @item
23077 Gnus can do partial group updates---you do not have to retrieve the
23078 entire active file just to check for new articles in a few groups
23079 (@pxref{The Active File}).
23080
23081 @item
23082 Gnus implements a sliding scale of subscribedness to groups
23083 (@pxref{Group Levels}).
23084
23085 @item
23086 You can score articles according to any number of criteria
23087 (@pxref{Scoring}).  You can even get Gnus to find out how to score
23088 articles for you (@pxref{Adaptive Scoring}).
23089
23090 @item
23091 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
23092 manner, so it should be difficult to lose much data on what you have
23093 read if your machine should go down (@pxref{Auto Save}).
23094
23095 @item
23096 Gnus now has its own startup file (@file{.gnus.el}) to avoid cluttering up
23097 the @file{.emacs} file.
23098
23099 @item
23100 You can set the process mark on both groups and articles and perform
23101 operations on all the marked items (@pxref{Process/Prefix}).
23102
23103 @item
23104 You can grep through a subset of groups and create a group from the
23105 results (@pxref{Kibozed Groups}).
23106
23107 @item
23108 You can list subsets of groups according to, well, anything
23109 (@pxref{Listing Groups}).
23110
23111 @item
23112 You can browse foreign servers and subscribe to groups from those
23113 servers (@pxref{Browse Foreign Server}).
23114
23115 @item
23116 Gnus can fetch articles, asynchronously, on a second connection to the
23117 server (@pxref{Asynchronous Fetching}).
23118
23119 @item
23120 You can cache articles locally (@pxref{Article Caching}).
23121
23122 @item
23123 The uudecode functions have been expanded and generalized
23124 (@pxref{Decoding Articles}).
23125
23126 @item
23127 You can still post uuencoded articles, which was a little-known feature
23128 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
23129
23130 @item
23131 Fetching parents (and other articles) now actually works without
23132 glitches (@pxref{Finding the Parent}).
23133
23134 @item
23135 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
23136
23137 @item
23138 Digests (and other files) can be used as the basis for groups
23139 (@pxref{Document Groups}).
23140
23141 @item
23142 Articles can be highlighted and customized (@pxref{Customizing
23143 Articles}).
23144
23145 @item
23146 URLs and other external references can be buttonized (@pxref{Article
23147 Buttons}).
23148
23149 @item
23150 You can do lots of strange stuff with the Gnus window & frame
23151 configuration (@pxref{Window Layout}).
23152
23153 @item
23154 You can click on buttons instead of using the keyboard
23155 (@pxref{Buttons}).
23156
23157 @end itemize
23158
23159
23160 @node September Gnus
23161 @subsubsection September Gnus
23162
23163 @iftex
23164 @iflatex
23165 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
23166 @end iflatex
23167 @end iftex
23168
23169 New features in Gnus 5.2/5.3:
23170
23171 @itemize @bullet
23172
23173 @item
23174 A new message composition mode is used.  All old customization variables
23175 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
23176 now obsolete.
23177
23178 @item
23179 Gnus is now able to generate @dfn{sparse} threads---threads where
23180 missing articles are represented by empty nodes (@pxref{Customizing
23181 Threading}).
23182
23183 @lisp
23184 (setq gnus-build-sparse-threads 'some)
23185 @end lisp
23186
23187 @item
23188 Outgoing articles are stored on a special archive server
23189 (@pxref{Archived Messages}).
23190
23191 @item
23192 Partial thread regeneration now happens when articles are
23193 referred.
23194
23195 @item
23196 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
23197
23198 @item
23199 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
23200
23201 @item
23202 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
23203
23204 @lisp
23205 (setq gnus-use-trees t)
23206 @end lisp
23207
23208 @item
23209 An @code{nn}-like pick-and-read minor mode is available for the summary
23210 buffers (@pxref{Pick and Read}).
23211
23212 @lisp
23213 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
23214 @end lisp
23215
23216 @item
23217 In binary groups you can use a special binary minor mode (@pxref{Binary
23218 Groups}).
23219
23220 @item
23221 Groups can be grouped in a folding topic hierarchy (@pxref{Group
23222 Topics}).
23223
23224 @lisp
23225 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
23226 @end lisp
23227
23228 @item
23229 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
23230
23231 @item
23232 Groups can now have a score, and bubbling based on entry frequency
23233 is possible (@pxref{Group Score}).
23234
23235 @lisp
23236 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
23237 @end lisp
23238
23239 @item
23240 Groups can be process-marked, and commands can be performed on
23241 groups of groups (@pxref{Marking Groups}).
23242
23243 @item
23244 Caching is possible in virtual groups.
23245
23246 @item
23247 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
23248 news batches, ClariNet briefs collections, and just about everything
23249 else (@pxref{Document Groups}).
23250
23251 @item
23252 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
23253 (@pxref{SOUP}).
23254
23255 @item
23256 The Gnus cache is much faster.
23257
23258 @item
23259 Groups can be sorted according to many criteria (@pxref{Sorting
23260 Groups}).
23261
23262 @item
23263 New group parameters have been introduced to set list-addresses and
23264 expiry times (@pxref{Group Parameters}).
23265
23266 @item
23267 All formatting specs allow specifying faces to be used
23268 (@pxref{Formatting Fonts}).
23269
23270 @item
23271 There are several more commands for setting/removing/acting on process
23272 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
23273
23274 @item
23275 The summary buffer can be limited to show parts of the available
23276 articles based on a wide range of criteria.  These commands have been
23277 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
23278
23279 @item
23280 Articles can be made persistent with the @kbd{*} command
23281 (@pxref{Persistent Articles}).
23282
23283 @item
23284 All functions for hiding article elements are now toggles.
23285
23286 @item
23287 Article headers can be buttonized (@pxref{Article Washing}).
23288
23289 @item
23290 All mail back ends support fetching articles by @code{Message-ID}.
23291
23292 @item
23293 Duplicate mail can now be treated properly (@pxref{Duplicates}).
23294
23295 @item
23296 All summary mode commands are available directly from the article
23297 buffer (@pxref{Article Keymap}).
23298
23299 @item
23300 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
23301 Layout}).
23302
23303 @item
23304 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
23305 @iftex
23306 @iflatex
23307 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
23308 @end iflatex
23309 @end iftex
23310
23311 @item
23312 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
23313
23314 @lisp
23315 (setq gnus-use-nocem t)
23316 @end lisp
23317
23318 @item
23319 Groups can be made permanently visible (@pxref{Listing Groups}).
23320
23321 @lisp
23322 (setq gnus-permanently-visible-groups "^nnml:")
23323 @end lisp
23324
23325 @item
23326 Many new hooks have been introduced to make customizing easier.
23327
23328 @item
23329 Gnus respects the @code{Mail-Copies-To} header.
23330
23331 @item
23332 Threads can be gathered by looking at the @code{References} header
23333 (@pxref{Customizing Threading}).
23334
23335 @lisp
23336 (setq gnus-summary-thread-gathering-function
23337       'gnus-gather-threads-by-references)
23338 @end lisp
23339
23340 @item
23341 Read articles can be stored in a special backlog buffer to avoid
23342 refetching (@pxref{Article Backlog}).
23343
23344 @lisp
23345 (setq gnus-keep-backlog 50)
23346 @end lisp
23347
23348 @item
23349 A clean copy of the current article is always stored in a separate
23350 buffer to allow easier treatment.
23351
23352 @item
23353 Gnus can suggest where to save articles (@pxref{Saving Articles}).
23354
23355 @item
23356 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
23357 Articles}).
23358
23359 @lisp
23360 (setq gnus-prompt-before-saving t)
23361 @end lisp
23362
23363 @item
23364 @code{gnus-uu} can view decoded files asynchronously while fetching
23365 articles (@pxref{Other Decode Variables}).
23366
23367 @lisp
23368 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
23369 @end lisp
23370
23371 @item
23372 Filling in the article buffer now works properly on cited text
23373 (@pxref{Article Washing}).
23374
23375 @item
23376 Hiding cited text adds buttons to toggle hiding, and how much
23377 cited text to hide is now customizable (@pxref{Article Hiding}).
23378
23379 @lisp
23380 (setq gnus-cited-lines-visible 2)
23381 @end lisp
23382
23383 @item
23384 Boring headers can be hidden (@pxref{Article Hiding}).
23385
23386 @item
23387 Default scoring values can now be set from the menu bar.
23388
23389 @item
23390 Further syntax checking of outgoing articles have been added.
23391
23392 @end itemize
23393
23394
23395 @node Red Gnus
23396 @subsubsection Red Gnus
23397
23398 New features in Gnus 5.4/5.5:
23399
23400 @iftex
23401 @iflatex
23402 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
23403 @end iflatex
23404 @end iftex
23405
23406 @itemize @bullet
23407
23408 @item
23409 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
23410
23411 @item
23412 Article prefetching functionality has been moved up into
23413 Gnus (@pxref{Asynchronous Fetching}).
23414
23415 @item
23416 Scoring can now be performed with logical operators like @code{and},
23417 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
23418 Scoring}).
23419
23420 @item
23421 Article washing status can be displayed in the
23422 article mode line (@pxref{Misc Article}).
23423
23424 @item
23425 @file{gnus.el} has been split into many smaller files.
23426
23427 @item
23428 Suppression of duplicate articles based on Message-ID can be done
23429 (@pxref{Duplicate Suppression}).
23430
23431 @lisp
23432 (setq gnus-suppress-duplicates t)
23433 @end lisp
23434
23435 @item
23436 New variables for specifying what score and adapt files are to be
23437 considered home score and adapt files (@pxref{Home Score File}) have
23438 been added.
23439
23440 @item
23441 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
23442 Server Internals}).
23443
23444 @item
23445 Groups can inherit group parameters from parent topics (@pxref{Topic
23446 Parameters}).
23447
23448 @item
23449 Article editing has been revamped and is now actually usable.
23450
23451 @item
23452 Signatures can be recognized in more intelligent fashions
23453 (@pxref{Article Signature}).
23454
23455 @item
23456 Summary pick mode has been made to look more @code{nn}-like.  Line
23457 numbers are displayed and the @kbd{.} command can be used to pick
23458 articles (@code{Pick and Read}).
23459
23460 @item
23461 Commands for moving the @file{.newsrc.eld} from one server to
23462 another have been added (@pxref{Changing Servers}).
23463
23464 @item
23465 There's a way now to specify that ``uninteresting'' fields be suppressed
23466 when generating lines in buffers (@pxref{Advanced Formatting}).
23467
23468 @item
23469 Several commands in the group buffer can be undone with @kbd{C-M-_}
23470 (@pxref{Undo}).
23471
23472 @item
23473 Scoring can be done on words using the new score type @code{w}
23474 (@pxref{Score File Format}).
23475
23476 @item
23477 Adaptive scoring can be done on a Subject word-by-word basis
23478 (@pxref{Adaptive Scoring}).
23479
23480 @lisp
23481 (setq gnus-use-adaptive-scoring '(word))
23482 @end lisp
23483
23484 @item
23485 Scores can be decayed (@pxref{Score Decays}).
23486
23487 @lisp
23488 (setq gnus-decay-scores t)
23489 @end lisp
23490
23491 @item
23492 Scoring can be performed using a regexp on the Date header.  The Date is
23493 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
23494
23495 @item
23496 A new command has been added to remove all data on articles from
23497 the native server (@pxref{Changing Servers}).
23498
23499 @item
23500 A new command for reading collections of documents
23501 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
23502 (@pxref{Really Various Summary Commands}).
23503
23504 @item
23505 Process mark sets can be pushed and popped (@pxref{Setting Process
23506 Marks}).
23507
23508 @item
23509 A new mail-to-news back end makes it possible to post even when the @sc{nntp}
23510 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
23511
23512 @item
23513 A new back end for reading searches from Web search engines
23514 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
23515 (@pxref{Web Searches}).
23516
23517 @item
23518 Groups inside topics can now be sorted using the standard sorting
23519 functions, and each topic can be sorted independently (@pxref{Topic
23520 Sorting}).
23521
23522 @item
23523 Subsets of the groups can be sorted independently (@code{Sorting
23524 Groups}).
23525
23526 @item
23527 Cached articles can be pulled into the groups (@pxref{Summary Generation
23528 Commands}).
23529 @iftex
23530 @iflatex
23531 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
23532 @end iflatex
23533 @end iftex
23534
23535 @item
23536 Score files are now applied in a more reliable order (@pxref{Score
23537 Variables}).
23538
23539 @item
23540 Reports on where mail messages end up can be generated (@pxref{Splitting
23541 Mail}).
23542
23543 @item
23544 More hooks and functions have been added to remove junk from incoming
23545 mail before saving the mail (@pxref{Washing Mail}).
23546
23547 @item
23548 Emphasized text can be properly fontisized:
23549
23550 @end itemize
23551
23552
23553 @node Quassia Gnus
23554 @subsubsection Quassia Gnus
23555
23556 New features in Gnus 5.6:
23557
23558 @itemize @bullet
23559
23560 @item
23561 New functionality for using Gnus as an offline newsreader has been
23562 added.  A plethora of new commands and modes have been added.  See
23563 @pxref{Gnus Unplugged} for the full story.
23564
23565 @item
23566  The @code{nndraft} back end has returned, but works differently than
23567 before.  All Message buffers are now also articles in the @code{nndraft}
23568 group, which is created automatically.
23569
23570 @item
23571 @code{gnus-alter-header-function} can now be used to alter header
23572 values.
23573
23574 @item
23575  @code{gnus-summary-goto-article} now accept Message-ID's.
23576
23577 @item
23578  A new Message command for deleting text in the body of a message
23579 outside the region: @kbd{C-c C-v}.
23580
23581 @item
23582  You can now post to component group in @code{nnvirtual} groups with
23583 @kbd{C-u C-c C-c}.
23584
23585 @item
23586  @code{nntp-rlogin-program}---new variable to ease customization.
23587
23588 @item
23589  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
23590 re-highlighting of the article buffer.
23591
23592 @item
23593  New element in @code{gnus-boring-article-headers}---@code{long-to}.
23594
23595 @item
23596  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
23597 Prefixes" in the Gnus manual for details.
23598
23599 @item
23600  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
23601 @kbd{a} to add the score rule to the "all.SCORE" file.
23602
23603 @item
23604  @code{gnus-simplify-subject-functions} variable to allow greater
23605 control over simplification.
23606
23607 @item
23608  @kbd{A T}---new command for fetching the current thread.
23609
23610 @item
23611  @kbd{/ T}---new command for including the current thread in the
23612 limit.
23613
23614 @item
23615  @kbd{M-RET} is a new Message command for breaking cited text.
23616
23617 @item
23618  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
23619
23620 @item
23621  The @code{custom-face-lookup} function has been removed.
23622 If you used this function in your initialization files, you must
23623 rewrite them to use @code{face-spec-set} instead.
23624
23625 @item
23626  Canceling now uses the current select method.  Symbolic prefix
23627 @kbd{a} forces normal posting method.
23628
23629 @item
23630  New command to translate M******** sm*rtq**t*s into proper
23631 text---@kbd{W d}.
23632
23633 @item
23634  For easier debugging of @code{nntp}, you can set
23635 @code{nntp-record-commands} to a non-@code{nil} value.
23636
23637 @item
23638  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
23639 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
23640
23641 @item
23642  A command for editing group parameters from the summary buffer
23643 has been added.
23644
23645 @item
23646  A history of where mails have been split is available.
23647
23648 @item
23649  A new article date command has been added---@code{article-date-iso8601}.
23650
23651 @item
23652  Subjects can be simplified when threading by setting
23653 @code{gnus-score-thread-simplify}.
23654
23655 @item
23656  A new function for citing in Message has been
23657 added---@code{message-cite-original-without-signature}.
23658
23659 @item
23660  @code{article-strip-all-blank-lines}---new article command.
23661
23662 @item
23663  A new Message command to kill to the end of the article has
23664 been added.
23665
23666 @item
23667  A minimum adaptive score can be specified by using the
23668 @code{gnus-adaptive-word-minimum} variable.
23669
23670 @item
23671  The "lapsed date" article header can be kept continually
23672 updated by the @code{gnus-start-date-timer} command.
23673
23674 @item
23675  Web listserv archives can be read with the @code{nnlistserv} back end.
23676
23677 @item
23678  Old dejanews archives can now be read by @code{nnweb}.
23679
23680 @end itemize
23681
23682 @node Pterodactyl Gnus
23683 @subsubsection Pterodactyl Gnus
23684
23685 New features in Gnus 5.8:
23686
23687 @itemize @bullet
23688
23689 @item
23690 The mail-fetching functions have changed.  See the manual for the
23691 many details.  In particular, all procmail fetching variables are gone.
23692
23693 If you used procmail like in
23694
23695 @lisp
23696 (setq nnmail-use-procmail t)
23697 (setq nnmail-spool-file 'procmail)
23698 (setq nnmail-procmail-directory "~/mail/incoming/")
23699 (setq nnmail-procmail-suffix "\\.in")
23700 @end lisp
23701
23702 this now has changed to
23703
23704 @lisp
23705 (setq mail-sources
23706       '((directory :path "~/mail/incoming/"
23707                    :suffix ".in")))
23708 @end lisp
23709
23710 More information is available in the info doc at Select Methods ->
23711 Getting Mail -> Mail Sources
23712
23713 @item
23714 Gnus is now a @sc{mime}-capable reader.  This affects many parts of
23715 Gnus, and adds a slew of new commands.  See the manual for details.
23716
23717 @item
23718 Gnus has also been multilingualized.  This also affects too
23719 many parts of Gnus to summarize here, and adds many new variables.
23720
23721 @item
23722 @code{gnus-auto-select-first} can now be a function to be
23723 called to position point.
23724
23725 @item
23726 The user can now decide which extra headers should be included in
23727 summary buffers and @sc{nov} files.
23728
23729 @item
23730 @code{gnus-article-display-hook} has been removed.  Instead, a number
23731 of variables starting with @code{gnus-treat-} have been added.
23732
23733 @item
23734 The Gnus posting styles have been redone again and now works in a
23735 subtly different manner.
23736
23737 @item
23738 New web-based back ends have been added: @code{nnslashdot},
23739 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
23740 again, to keep up with ever-changing layouts.
23741
23742 @item
23743 Gnus can now read @sc{imap} mail via @code{nnimap}.
23744
23745 @end itemize
23746
23747 @iftex
23748
23749 @page
23750 @node The Manual
23751 @section The Manual
23752 @cindex colophon
23753 @cindex manual
23754
23755 This manual was generated from a TeXinfo file and then run through
23756 either @code{texi2dvi}
23757 @iflatex
23758 or my own home-brewed TeXinfo to \LaTeX\ transformer,
23759 and then run through @code{latex} and @code{dvips}
23760 @end iflatex
23761 to get what you hold in your hands now.
23762
23763 The following conventions have been used:
23764
23765 @enumerate
23766
23767 @item
23768 This is a @samp{string}
23769
23770 @item
23771 This is a @kbd{keystroke}
23772
23773 @item
23774 This is a @file{file}
23775
23776 @item
23777 This is a @code{symbol}
23778
23779 @end enumerate
23780
23781 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
23782 mean:
23783
23784 @lisp
23785 (setq flargnoze "yes")
23786 @end lisp
23787
23788 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
23789
23790 @lisp
23791 (setq flumphel 'yes)
23792 @end lisp
23793
23794 @samp{yes} and @code{yes} are two @emph{very} different things---don't
23795 ever get them confused.
23796
23797 @iflatex
23798 @c @head
23799 Of course, everything in this manual is of vital interest, so you should
23800 read it all.  Several times.  However, if you feel like skimming the
23801 manual, look for that gnu head you should see in the margin over
23802 there---it means that what's being discussed is of more importance than
23803 the rest of the stuff.  (On the other hand, if everything is infinitely
23804 important, how can anything be more important than that?  Just one more
23805 of the mysteries of this world, I guess.)
23806 @end iflatex
23807
23808 @end iftex
23809
23810
23811 @node On Writing Manuals
23812 @section On Writing Manuals
23813
23814 I guess most manuals are written after-the-fact; documenting a program
23815 that's already there.  This is not how this manual is written.  When
23816 implementing something, I write the manual entry for that something
23817 straight away.  I then see that it's difficult to explain the
23818 functionality, so I write how it's supposed to be, and then I change the
23819 implementation.  Writing the documentation and writing the code goes
23820 hand in hand.
23821
23822 This, of course, means that this manual has no, or little, flow.  It
23823 documents absolutely everything in Gnus, but often not where you're
23824 looking for it.  It is a reference manual, and not a guide to how to get
23825 started with Gnus.
23826
23827 That would be a totally different book, that should be written using the
23828 reference manual as source material.  It would look quite differently.
23829
23830
23831 @page
23832 @node Terminology
23833 @section Terminology
23834
23835 @cindex terminology
23836 @table @dfn
23837
23838 @item news
23839 @cindex news
23840 This is what you are supposed to use this thing for---reading news.
23841 News is generally fetched from a nearby @sc{nntp} server, and is
23842 generally publicly available to everybody.  If you post news, the entire
23843 world is likely to read just what you have written, and they'll all
23844 snigger mischievously.  Behind your back.
23845
23846 @item mail
23847 @cindex mail
23848 Everything that's delivered to you personally is mail.  Some news/mail
23849 readers (like Gnus) blur the distinction between mail and news, but
23850 there is a difference.  Mail is private.  News is public.  Mailing is
23851 not posting, and replying is not following up.
23852
23853 @item reply
23854 @cindex reply
23855 Send a mail to the person who has written what you are reading.
23856
23857 @item follow up
23858 @cindex follow up
23859 Post an article to the current newsgroup responding to the article you
23860 are reading.
23861
23862 @item back end
23863 @cindex back end
23864 Gnus considers mail and news to be mostly the same, really.  The only
23865 difference is how to access the actual articles.  News articles are
23866 commonly fetched via the protocol NNTP, whereas mail messages could be
23867 read from a file on the local disk.  The internal architecture of Gnus
23868 thus comprises a `front end' and a number of `back ends'.  Internally,
23869 when you enter a group (by hitting @key{RET}, say), you thereby invoke
23870 a function in the front end in Gnus.  The front end then `talks' to a
23871 back end and says things like ``Give me the list of articles in the foo
23872 group'' or ``Show me article number 4711''.
23873
23874 So a back end mainly defines either a protocol (the @code{nntp} back end
23875 accesses news via NNTP, the @code{nnimap} back end accesses mail via
23876 IMAP) or a file format and directory layout (the @code{nnspool} back end
23877 accesses news via the common `spool directory' format, the @code{nnml}
23878 back end access mail via a file format and directory layout that's
23879 quite similar).
23880
23881 Gnus does not handle the underlying media, so to speak---this is all
23882 done by the back ends.  A back end is a collection of functions to
23883 access the articles.
23884
23885 However, sometimes the term `back end' is also used where `server'
23886 would have been more appropriate.  And then there is the term `select
23887 method' which can mean either.  The Gnus terminology can be quite
23888 confusing.
23889
23890 @item native
23891 @cindex native
23892 Gnus will always use one method (and back end) as the @dfn{native}, or
23893 default, way of getting news.
23894
23895 @item foreign
23896 @cindex foreign
23897 You can also have any number of foreign groups active at the same time.
23898 These are groups that use non-native non-secondary back ends for getting
23899 news.
23900
23901 @item secondary
23902 @cindex secondary
23903 Secondary back ends are somewhere half-way between being native and being
23904 foreign, but they mostly act like they are native.
23905
23906 @item article
23907 @cindex article
23908 A message that has been posted as news.
23909
23910 @item mail message
23911 @cindex mail message
23912 A message that has been mailed.
23913
23914 @item message
23915 @cindex message
23916 A mail message or news article
23917
23918 @item head
23919 @cindex head
23920 The top part of a message, where administrative information (etc.) is
23921 put.
23922
23923 @item body
23924 @cindex body
23925 The rest of an article.  Everything not in the head is in the
23926 body.
23927
23928 @item header
23929 @cindex header
23930 A line from the head of an article.
23931
23932 @item headers
23933 @cindex headers
23934 A collection of such lines, or a collection of heads.  Or even a
23935 collection of @sc{nov} lines.
23936
23937 @item @sc{nov}
23938 @cindex nov
23939 When Gnus enters a group, it asks the back end for the headers of all
23940 unread articles in the group.  Most servers support the News OverView
23941 format, which is more compact and much faster to read and parse than the
23942 normal @sc{head} format.
23943
23944 @item level
23945 @cindex levels
23946 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
23947 that have a lower level are ``more'' subscribed than the groups with a
23948 higher level.  In fact, groups on levels 1-5 are considered
23949 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
23950 are @dfn{killed}.  Commands for listing groups and scanning for new
23951 articles will all use the numeric prefix as @dfn{working level}.
23952
23953 @item killed groups
23954 @cindex killed groups
23955 No information on killed groups is stored or updated, which makes killed
23956 groups much easier to handle than subscribed groups.
23957
23958 @item zombie groups
23959 @cindex zombie groups
23960 Just like killed groups, only slightly less dead.
23961
23962 @item active file
23963 @cindex active file
23964 The news server has to keep track of what articles it carries, and what
23965 groups exist.  All this information in stored in the active file, which
23966 is rather large, as you might surmise.
23967
23968 @item bogus groups
23969 @cindex bogus groups
23970 A group that exists in the @file{.newsrc} file, but isn't known to the
23971 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
23972 This means that the group probably doesn't exist (any more).
23973
23974 @item activating
23975 @cindex activating groups
23976 The act of asking the server for info on a group and computing the
23977 number of unread articles is called @dfn{activating the group}.
23978 Un-activated groups are listed with @samp{*} in the group buffer.
23979
23980 @item server
23981 @cindex server
23982 A machine one can connect to and get news (or mail) from.
23983
23984 @item select method
23985 @cindex select method
23986 A structure that specifies the back end, the server and the virtual
23987 server settings.
23988
23989 @item virtual server
23990 @cindex virtual server
23991 A named select method.  Since a select method defines all there is to
23992 know about connecting to a (physical) server, taking the thing as a
23993 whole is a virtual server.
23994
23995 @item washing
23996 @cindex washing
23997 Taking a buffer and running it through a filter of some sort.  The
23998 result will (more often than not) be cleaner and more pleasing than the
23999 original.
24000
24001 @item ephemeral groups
24002 @cindex ephemeral groups
24003 Most groups store data on what articles you have read.  @dfn{Ephemeral}
24004 groups are groups that will have no data stored---when you exit the
24005 group, it'll disappear into the aether.
24006
24007 @item solid groups
24008 @cindex solid groups
24009 This is the opposite of ephemeral groups.  All groups listed in the
24010 group buffer are solid groups.
24011
24012 @item sparse articles
24013 @cindex sparse articles
24014 These are article placeholders shown in the summary buffer when
24015 @code{gnus-build-sparse-threads} has been switched on.
24016
24017 @item threading
24018 @cindex threading
24019 To put responses to articles directly after the articles they respond
24020 to---in a hierarchical fashion.
24021
24022 @item root
24023 @cindex root
24024 @cindex thread root
24025 The first article in a thread is the root.  It is the ancestor of all
24026 articles in the thread.
24027
24028 @item parent
24029 @cindex parent
24030 An article that has responses.
24031
24032 @item child
24033 @cindex child
24034 An article that responds to a different article---its parent.
24035
24036 @item digest
24037 @cindex digest
24038 A collection of messages in one file.  The most common digest format is
24039 specified by RFC 1153.
24040
24041 @end table
24042
24043
24044 @page
24045 @node Customization
24046 @section Customization
24047 @cindex general customization
24048
24049 All variables are properly documented elsewhere in this manual.  This
24050 section is designed to give general pointers on how to customize Gnus
24051 for some quite common situations.
24052
24053 @menu
24054 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
24055 * Slow Terminal Connection::    You run a remote Emacs.
24056 * Little Disk Space::           You feel that having large setup files is icky.
24057 * Slow Machine::                You feel like buying a faster machine.
24058 @end menu
24059
24060
24061 @node Slow/Expensive Connection
24062 @subsection Slow/Expensive NNTP Connection
24063
24064 If you run Emacs on a machine locally, and get your news from a machine
24065 over some very thin strings, you want to cut down on the amount of data
24066 Gnus has to get from the @sc{nntp} server.
24067
24068 @table @code
24069
24070 @item gnus-read-active-file
24071 Set this to @code{nil}, which will inhibit Gnus from requesting the
24072 entire active file from the server.  This file is often v.  large.  You
24073 also have to set @code{gnus-check-new-newsgroups} and
24074 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
24075 doesn't suddenly decide to fetch the active file anyway.
24076
24077 @item gnus-nov-is-evil
24078 This one has to be @code{nil}.  If not, grabbing article headers from
24079 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
24080 support @sc{xover}; Gnus will detect this by itself.
24081 @end table
24082
24083
24084 @node Slow Terminal Connection
24085 @subsection Slow Terminal Connection
24086
24087 Let's say you use your home computer for dialing up the system that runs
24088 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
24089 possible) the amount of data sent over the wires.
24090
24091 @table @code
24092
24093 @item gnus-auto-center-summary
24094 Set this to @code{nil} to inhibit Gnus from re-centering the summary
24095 buffer all the time.  If it is @code{vertical}, do only vertical
24096 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
24097 horizontal and vertical recentering.
24098
24099 @item gnus-visible-headers
24100 Cut down on the headers included in the articles to the
24101 minimum.  You can, in fact, make do without them altogether---most of the
24102 useful data is in the summary buffer, anyway.  Set this variable to
24103 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
24104
24105 Set this hook to all the available hiding commands:
24106 @lisp
24107 (setq gnus-treat-hide-headers 'head
24108       gnus-treat-hide-signature t
24109       gnus-treat-hide-citation t)
24110 @end lisp
24111
24112 @item gnus-use-full-window
24113 By setting this to @code{nil}, you can make all the windows smaller.
24114 While this doesn't really cut down much generally, it means that you
24115 have to see smaller portions of articles before deciding that you didn't
24116 want to read them anyway.
24117
24118 @item gnus-thread-hide-subtree
24119 If this is non-@code{nil}, all threads in the summary buffer will be
24120 hidden initially.
24121
24122
24123 @item gnus-updated-mode-lines
24124 If this is @code{nil}, Gnus will not put information in the buffer mode
24125 lines, which might save some time.
24126 @end table
24127
24128
24129 @node Little Disk Space
24130 @subsection Little Disk Space
24131 @cindex disk space
24132
24133 The startup files can get rather large, so you may want to cut their
24134 sizes a bit if you are running out of space.
24135
24136 @table @code
24137
24138 @item gnus-save-newsrc-file
24139 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
24140 only save @file{.newsrc.eld}.  This means that you will not be able to
24141 use any other newsreaders than Gnus.  This variable is @code{t} by
24142 default.
24143
24144 @item gnus-read-newsrc-file
24145 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
24146 only read @file{.newsrc.eld}.  This means that you will not be able to
24147 use any other newsreaders than Gnus.  This variable is @code{t} by
24148 default.
24149
24150 @item gnus-save-killed-list
24151 If this is @code{nil}, Gnus will not save the list of dead groups.  You
24152 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
24153 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
24154 variable to @code{nil}.  This variable is @code{t} by default.
24155
24156 @end table
24157
24158
24159 @node Slow Machine
24160 @subsection Slow Machine
24161 @cindex slow machine
24162
24163 If you have a slow machine, or are just really impatient, there are a
24164 few things you can do to make Gnus run faster.
24165
24166 Set @code{gnus-check-new-newsgroups} and
24167 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
24168
24169 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
24170 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
24171 summary buffer faster.
24172
24173
24174 @page
24175 @node Troubleshooting
24176 @section Troubleshooting
24177 @cindex troubleshooting
24178
24179 Gnus works @emph{so} well straight out of the box---I can't imagine any
24180 problems, really.
24181
24182 Ahem.
24183
24184 @enumerate
24185
24186 @item
24187 Make sure your computer is switched on.
24188
24189 @item
24190 Make sure that you really load the current Gnus version.  If you have
24191 been running @sc{gnus}, you need to exit Emacs and start it up again before
24192 Gnus will work.
24193
24194 @item
24195 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
24196 like @samp{T-gnus 6.15.* (based on Oort Gnus v0.*; for SEMI 1.1*, FLIM
24197 1.1*)} you have the right files loaded.  If, on the other hand, you get
24198 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
24199 @file{.el} files lying around.  Delete these.
24200
24201 @item
24202 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
24203 how-to.
24204
24205 @item
24206 @vindex max-lisp-eval-depth
24207 Gnus works on many recursive structures, and in some extreme (and very
24208 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
24209 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
24210 something like that.
24211 @end enumerate
24212
24213 If all else fails, report the problem as a bug.
24214
24215 @cindex bugs
24216 @cindex reporting bugs
24217
24218 @kindex M-x gnus-bug
24219 @findex gnus-bug
24220 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
24221 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
24222 me the backtrace.  I will fix bugs, but I can only fix them if you send
24223 me a precise description as to how to reproduce the bug.
24224
24225 You really can never be too detailed in a bug report.  Always use the
24226 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
24227 a 10Kb mail each time you use it, and even if you have sent me your
24228 environment 500 times before.  I don't care.  I want the full info each
24229 time.
24230
24231 It is also important to remember that I have no memory whatsoever.  If
24232 you send a bug report, and I send you a reply, and then you just send
24233 back ``No, it's not! Moron!'', I will have no idea what you are
24234 insulting me about.  Always over-explain everything.  It's much easier
24235 for all of us---if I don't have all the information I need, I will just
24236 mail you and ask for more info, and everything takes more time.
24237
24238 If the problem you're seeing is very visual, and you can't quite explain
24239 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
24240 it somewhere it can be reached, and include the URL of the picture in
24241 the bug report.
24242
24243 @cindex patches
24244 If you would like to contribute a patch to fix bugs or make
24245 improvements, please produce the patch using @samp{diff -u}.
24246
24247 @cindex edebug
24248 If you want to debug your problem further before reporting, possibly
24249 in order to solve the problem yourself and send a patch, you can use
24250 edebug.  Debugging lisp code is documented in the Elisp manual
24251 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
24252 Lisp Reference Manual}).  To get you started with edebug, consider if
24253 you discover some weird behaviour when pressing @kbd{c}, the first
24254 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
24255 the documentation buffer that leads you to the function definition,
24256 then press @kbd{M-x edebug-defun RET} with point inside that function,
24257 return to Gnus and press @kbd{c} to invoke the code.  You will be
24258 placed in the lisp buffer and can single step using @kbd{SPC} and
24259 evaluate expressions using @kbd{M-:} or inspect variables using
24260 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
24261 @kbd{c} or @kbd{g}.
24262
24263 @cindex elp
24264 @cindex profile
24265 @cindex slow
24266 Sometimes, a problem do not directly generate a elisp error but
24267 manifests itself by causing Gnus to be very slow.  In these cases, you
24268 can use @kbd{M-x toggle-debug-on-quit} and press C-j when things are
24269 slow, and then try to analyze the backtrace (repeating the procedure
24270 helps isolating the real problem areas).  A fancier approach is to use
24271 the elisp profiler, ELP.  The profiler is (or should be) fully
24272 documented elsewhere, but to get you started there are a few steps
24273 that need to be followed.  First, instrument the part of Gnus you are
24274 interested in for profiling, e.g. @kbd{M-x elp-instrument-package RET
24275 gnus} or @kbd{M-x elp-instrument-packagre RET message}.  Then perform
24276 the operation that is slow and press @kbd{M-x elp-results}.  You will
24277 then see which operations that takes time, and can debug them further.
24278 If the entire operation takes much longer than the time spent in the
24279 slowest function in the profiler output, you probably profiled the
24280 wrong part of Gnus.  To reset profiling statistics, use @kbd{M-x
24281 elp-reset-all}.  @kbd{M-x elp-restore-all} is supposed to remove
24282 profiling, but given the complexities and dynamic code generation in
24283 Gnus, it might not always work perfectly.
24284
24285 If you just need help, you are better off asking on
24286 @samp{gnu.emacs.gnus}.  I'm not very helpful.
24287
24288 @cindex gnu.emacs.gnus
24289 @cindex ding mailing list
24290 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
24291 Write to @samp{ding-request@@gnus.org} to subscribe.
24292
24293
24294 @page
24295 @node Gnus Reference Guide
24296 @section Gnus Reference Guide
24297
24298 It is my hope that other people will figure out smart stuff that Gnus
24299 can do, and that other people will write those smart things as well.  To
24300 facilitate that I thought it would be a good idea to describe the inner
24301 workings of Gnus.  And some of the not-so-inner workings, while I'm at
24302 it.
24303
24304 You can never expect the internals of a program not to change, but I
24305 will be defining (in some details) the interface between Gnus and its
24306 back ends (this is written in stone), the format of the score files
24307 (ditto), data structures (some are less likely to change than others)
24308 and general methods of operation.
24309
24310 @menu
24311 * Gnus Utility Functions::      Common functions and variable to use.
24312 * Back End Interface::          How Gnus communicates with the servers.
24313 * Score File Syntax::           A BNF definition of the score file standard.
24314 * Headers::                     How Gnus stores headers internally.
24315 * Ranges::                      A handy format for storing mucho numbers.
24316 * Group Info::                  The group info format.
24317 * Extended Interactive::        Symbolic prefixes and stuff.
24318 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
24319 * Various File Formats::        Formats of files that Gnus use.
24320 @end menu
24321
24322
24323 @node Gnus Utility Functions
24324 @subsection Gnus Utility Functions
24325 @cindex Gnus utility functions
24326 @cindex utility functions
24327 @cindex functions
24328 @cindex internal variables
24329
24330 When writing small functions to be run from hooks (and stuff), it's
24331 vital to have access to the Gnus internal functions and variables.
24332 Below is a list of the most common ones.
24333
24334 @table @code
24335
24336 @item gnus-newsgroup-name
24337 @vindex gnus-newsgroup-name
24338 This variable holds the name of the current newsgroup.
24339
24340 @item gnus-find-method-for-group
24341 @findex gnus-find-method-for-group
24342 A function that returns the select method for @var{group}.
24343
24344 @item gnus-group-real-name
24345 @findex gnus-group-real-name
24346 Takes a full (prefixed) Gnus group name, and returns the unprefixed
24347 name.
24348
24349 @item gnus-group-prefixed-name
24350 @findex gnus-group-prefixed-name
24351 Takes an unprefixed group name and a select method, and returns the full
24352 (prefixed) Gnus group name.
24353
24354 @item gnus-get-info
24355 @findex gnus-get-info
24356 Returns the group info list for @var{group}.
24357
24358 @item gnus-group-unread
24359 @findex gnus-group-unread
24360 The number of unread articles in @var{group}, or @code{t} if that is
24361 unknown.
24362
24363 @item gnus-active
24364 @findex gnus-active
24365 The active entry for @var{group}.
24366
24367 @item gnus-set-active
24368 @findex gnus-set-active
24369 Set the active entry for @var{group}.
24370
24371 @item gnus-add-current-to-buffer-list
24372 @findex gnus-add-current-to-buffer-list
24373 Adds the current buffer to the list of buffers to be killed on Gnus
24374 exit.
24375
24376 @item gnus-continuum-version
24377 @findex gnus-continuum-version
24378 Takes a Gnus version string as a parameter and returns a floating point
24379 number.  Earlier versions will always get a lower number than later
24380 versions.
24381
24382 @item gnus-group-read-only-p
24383 @findex gnus-group-read-only-p
24384 Says whether @var{group} is read-only or not.
24385
24386 @item gnus-news-group-p
24387 @findex gnus-news-group-p
24388 Says whether @var{group} came from a news back end.
24389
24390 @item gnus-ephemeral-group-p
24391 @findex gnus-ephemeral-group-p
24392 Says whether @var{group} is ephemeral or not.
24393
24394 @item gnus-server-to-method
24395 @findex gnus-server-to-method
24396 Returns the select method corresponding to @var{server}.
24397
24398 @item gnus-server-equal
24399 @findex gnus-server-equal
24400 Says whether two virtual servers are equal.
24401
24402 @item gnus-group-native-p
24403 @findex gnus-group-native-p
24404 Says whether @var{group} is native or not.
24405
24406 @item gnus-group-secondary-p
24407 @findex gnus-group-secondary-p
24408 Says whether @var{group} is secondary or not.
24409
24410 @item gnus-group-foreign-p
24411 @findex gnus-group-foreign-p
24412 Says whether @var{group} is foreign or not.
24413
24414 @item group-group-find-parameter
24415 @findex group-group-find-parameter
24416 Returns the parameter list of @var{group}.  If given a second parameter,
24417 returns the value of that parameter for @var{group}.
24418
24419 @item gnus-group-set-parameter
24420 @findex gnus-group-set-parameter
24421 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
24422
24423 @item gnus-narrow-to-body
24424 @findex gnus-narrow-to-body
24425 Narrows the current buffer to the body of the article.
24426
24427 @item gnus-check-backend-function
24428 @findex gnus-check-backend-function
24429 Takes two parameters, @var{function} and @var{group}.  If the back end
24430 @var{group} comes from supports @var{function}, return non-@code{nil}.
24431
24432 @lisp
24433 (gnus-check-backend-function "request-scan" "nnml:misc")
24434 @result{} t
24435 @end lisp
24436
24437 @item gnus-read-method
24438 @findex gnus-read-method
24439 Prompts the user for a select method.
24440
24441 @end table
24442
24443
24444 @node Back End Interface
24445 @subsection Back End Interface
24446
24447 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
24448 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
24449 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
24450 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
24451 examples of the latter we have @code{nntp-port-number} and
24452 @code{nnmbox-directory}.
24453
24454 When Gnus asks for information from a back end---say @code{nntp}---on
24455 something, it will normally include a virtual server name in the
24456 function parameters.  (If not, the back end should use the ``current''
24457 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
24458 server as its only (optional) parameter.  If this virtual server hasn't
24459 been opened, the function should fail.
24460
24461 Note that a virtual server name has no relation to some physical server
24462 name.  Take this example:
24463
24464 @lisp
24465 (nntp "odd-one"
24466       (nntp-address "ifi.uio.no")
24467       (nntp-port-number 4324))
24468 @end lisp
24469
24470 Here the virtual server name is @samp{odd-one} while the name of
24471 the physical server is @samp{ifi.uio.no}.
24472
24473 The back ends should be able to switch between several virtual servers.
24474 The standard back ends implement this by keeping an alist of virtual
24475 server environments that they pull down/push up when needed.
24476
24477 There are two groups of interface functions: @dfn{required functions},
24478 which must be present, and @dfn{optional functions}, which Gnus will
24479 always check for presence before attempting to call 'em.
24480
24481 All these functions are expected to return data in the buffer
24482 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
24483 unfortunately named, but we'll have to live with it.  When I talk about
24484 @dfn{resulting data}, I always refer to the data in that buffer.  When I
24485 talk about @dfn{return value}, I talk about the function value returned by
24486 the function call.  Functions that fail should return @code{nil} as the
24487 return value.
24488
24489 Some back ends could be said to be @dfn{server-forming} back ends, and
24490 some might be said not to be.  The latter are back ends that generally
24491 only operate on one group at a time, and have no concept of ``server''
24492 -- they have a group, and they deliver info on that group and nothing
24493 more.
24494
24495 Gnus identifies each message by way of group name and article number.  A
24496 few remarks about these article numbers might be useful.  First of all,
24497 the numbers are positive integers.  Secondly, it is normally not
24498 possible for later articles to `re-use' older article numbers without
24499 confusing Gnus.  That is, if a group has ever contained a message
24500 numbered 42, then no other message may get that number, or Gnus will get
24501 mightily confused.@footnote{See the function
24502 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
24503 Third, article numbers must be assigned in order of arrival in the
24504 group; this is not necessarily the same as the date of the message.
24505
24506 The previous paragraph already mentions all the `hard' restrictions that
24507 article numbers must fulfill.  But it seems that it might be useful to
24508 assign @emph{consecutive} article numbers, for Gnus gets quite confused
24509 if there are holes in the article numbering sequence.  However, due to
24510 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
24511 also useful for the article numbers to start at 1 to avoid running out
24512 of numbers as long as possible.
24513
24514 Note that by convention, backends are named @code{nnsomething}, but
24515 Gnus also comes with some @code{nnnotbackends}, such as
24516 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
24517
24518 In the examples and definitions I will refer to the imaginary back end
24519 @code{nnchoke}.
24520
24521 @cindex @code{nnchoke}
24522
24523 @menu
24524 * Required Back End Functions::  Functions that must be implemented.
24525 * Optional Back End Functions::  Functions that need not be implemented.
24526 * Error Messaging::             How to get messages and report errors.
24527 * Writing New Back Ends::       Extending old back ends.
24528 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
24529 * Mail-like Back Ends::         Some tips on mail back ends.
24530 @end menu
24531
24532
24533 @node Required Back End Functions
24534 @subsubsection Required Back End Functions
24535
24536 @table @code
24537
24538 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
24539
24540 @var{articles} is either a range of article numbers or a list of
24541 @code{Message-ID}s.  Current back ends do not fully support either---only
24542 sequences (lists) of article numbers, and most back ends do not support
24543 retrieval of @code{Message-ID}s.  But they should try for both.
24544
24545 The result data should either be HEADs or @sc{nov} lines, and the result
24546 value should either be @code{headers} or @code{nov} to reflect this.
24547 This might later be expanded to @code{various}, which will be a mixture
24548 of HEADs and @sc{nov} lines, but this is currently not supported by Gnus.
24549
24550 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
24551 headers", in some meaning of the word.  This is generally done by
24552 fetching (at most) @var{fetch-old} extra headers less than the smallest
24553 article number in @code{articles}, and filling the gaps as well.  The
24554 presence of this parameter can be ignored if the back end finds it
24555 cumbersome to follow the request.  If this is non-@code{nil} and not a
24556 number, do maximum fetches.
24557
24558 Here's an example HEAD:
24559
24560 @example
24561 221 1056 Article retrieved.
24562 Path: ifi.uio.no!sturles
24563 From: sturles@@ifi.uio.no (Sturle Sunde)
24564 Newsgroups: ifi.discussion
24565 Subject: Re: Something very droll
24566 Date: 27 Oct 1994 14:02:57 +0100
24567 Organization: Dept. of Informatics, University of Oslo, Norway
24568 Lines: 26
24569 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
24570 References: <38jdmq$4qu@@visbur.ifi.uio.no>
24571 NNTP-Posting-Host: holmenkollen.ifi.uio.no
24572 .
24573 @end example
24574
24575 So a @code{headers} return value would imply that there's a number of
24576 these in the data buffer.
24577
24578 Here's a BNF definition of such a buffer:
24579
24580 @example
24581 headers        = *head
24582 head           = error / valid-head
24583 error-message  = [ "4" / "5" ] 2number " " <error message> eol
24584 valid-head     = valid-message *header "." eol
24585 valid-message  = "221 " <number> " Article retrieved." eol
24586 header         = <text> eol
24587 @end example
24588
24589 If the return value is @code{nov}, the data buffer should contain
24590 @dfn{network overview database} lines.  These are basically fields
24591 separated by tabs.
24592
24593 @example
24594 nov-buffer = *nov-line
24595 nov-line   = 8*9 [ field <TAB> ] eol
24596 field      = <text except TAB>
24597 @end example
24598
24599 For a closer look at what should be in those fields,
24600 @pxref{Headers}.
24601
24602
24603 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
24604
24605 @var{server} is here the virtual server name.  @var{definitions} is a
24606 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
24607
24608 If the server can't be opened, no error should be signaled.  The back end
24609 may then choose to refuse further attempts at connecting to this
24610 server.  In fact, it should do so.
24611
24612 If the server is opened already, this function should return a
24613 non-@code{nil} value.  There should be no data returned.
24614
24615
24616 @item (nnchoke-close-server &optional SERVER)
24617
24618 Close connection to @var{server} and free all resources connected
24619 to it.  Return @code{nil} if the server couldn't be closed for some
24620 reason.
24621
24622 There should be no data returned.
24623
24624
24625 @item (nnchoke-request-close)
24626
24627 Close connection to all servers and free all resources that the back end
24628 have reserved.  All buffers that have been created by that back end
24629 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
24630 function is generally only called when Gnus is shutting down.
24631
24632 There should be no data returned.
24633
24634
24635 @item (nnchoke-server-opened &optional SERVER)
24636
24637 If @var{server} is the current virtual server, and the connection to the
24638 physical server is alive, then this function should return a
24639 non-@code{nil} vlue.  This function should under no circumstances
24640 attempt to reconnect to a server we have lost connection to.
24641
24642 There should be no data returned.
24643
24644
24645 @item (nnchoke-status-message &optional SERVER)
24646
24647 This function should return the last error message from @var{server}.
24648
24649 There should be no data returned.
24650
24651
24652 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
24653
24654 The result data from this function should be the article specified by
24655 @var{article}.  This might either be a @code{Message-ID} or a number.
24656 It is optional whether to implement retrieval by @code{Message-ID}, but
24657 it would be nice if that were possible.
24658
24659 If @var{to-buffer} is non-@code{nil}, the result data should be returned
24660 in this buffer instead of the normal data buffer.  This is to make it
24661 possible to avoid copying large amounts of data from one buffer to
24662 another, while Gnus mainly requests articles to be inserted directly
24663 into its article buffer.
24664
24665 If it is at all possible, this function should return a cons cell where
24666 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
24667 the article number.  This will enable Gnus to find out what the real
24668 group and article numbers are when fetching articles by
24669 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
24670 on successful article retrieval.
24671
24672
24673 @item (nnchoke-request-group GROUP &optional SERVER FAST)
24674
24675 Get data on @var{group}.  This function also has the side effect of
24676 making @var{group} the current group.
24677
24678 If @var{fast}, don't bother to return useful data, just make @var{group}
24679 the current group.
24680
24681 Here's an example of some result data and a definition of the same:
24682
24683 @example
24684 211 56 1000 1059 ifi.discussion
24685 @end example
24686
24687 The first number is the status, which should be 211.  Next is the
24688 total number of articles in the group, the lowest article number, the
24689 highest article number, and finally the group name.  Note that the total
24690 number of articles may be less than one might think while just
24691 considering the highest and lowest article numbers, but some articles
24692 may have been canceled.  Gnus just discards the total-number, so
24693 whether one should take the bother to generate it properly (if that is a
24694 problem) is left as an exercise to the reader.  If the group contains no
24695 articles, the lowest article number should be reported as 1 and the
24696 highest as 0.
24697
24698 @example
24699 group-status = [ error / info ] eol
24700 error        = [ "4" / "5" ] 2<number> " " <Error message>
24701 info         = "211 " 3* [ <number> " " ] <string>
24702 @end example
24703
24704
24705 @item (nnchoke-close-group GROUP &optional SERVER)
24706
24707 Close @var{group} and free any resources connected to it.  This will be
24708 a no-op on most back ends.
24709
24710 There should be no data returned.
24711
24712
24713 @item (nnchoke-request-list &optional SERVER)
24714
24715 Return a list of all groups available on @var{server}.  And that means
24716 @emph{all}.
24717
24718 Here's an example from a server that only carries two groups:
24719
24720 @example
24721 ifi.test 0000002200 0000002000 y
24722 ifi.discussion 3324 3300 n
24723 @end example
24724
24725 On each line we have a group name, then the highest article number in
24726 that group, the lowest article number, and finally a flag.  If the group
24727 contains no articles, the lowest article number should be reported as 1
24728 and the highest as 0.
24729
24730 @example
24731 active-file = *active-line
24732 active-line = name " " <number> " " <number> " " flags eol
24733 name        = <string>
24734 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
24735 @end example
24736
24737 The flag says whether the group is read-only (@samp{n}), is moderated
24738 (@samp{m}), is dead (@samp{x}), is aliased to some other group
24739 (@samp{=other-group}) or none of the above (@samp{y}).
24740
24741
24742 @item (nnchoke-request-post &optional SERVER)
24743
24744 This function should post the current buffer.  It might return whether
24745 the posting was successful or not, but that's not required.  If, for
24746 instance, the posting is done asynchronously, it has generally not been
24747 completed by the time this function concludes.  In that case, this
24748 function should set up some kind of sentinel to beep the user loud and
24749 clear if the posting could not be completed.
24750
24751 There should be no result data from this function.
24752
24753 @end table
24754
24755
24756 @node Optional Back End Functions
24757 @subsubsection Optional Back End Functions
24758
24759 @table @code
24760
24761 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
24762
24763 @var{groups} is a list of groups, and this function should request data
24764 on all those groups.  How it does it is of no concern to Gnus, but it
24765 should attempt to do this in a speedy fashion.
24766
24767 The return value of this function can be either @code{active} or
24768 @code{group}, which says what the format of the result data is.  The
24769 former is in the same format as the data from
24770 @code{nnchoke-request-list}, while the latter is a buffer full of lines
24771 in the same format as @code{nnchoke-request-group} gives.
24772
24773 @example
24774 group-buffer = *active-line / *group-status
24775 @end example
24776
24777
24778 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
24779
24780 A Gnus group info (@pxref{Group Info}) is handed to the back end for
24781 alterations.  This comes in handy if the back end really carries all the
24782 information (as is the case with virtual and imap groups).  This
24783 function should destructively alter the info to suit its needs, and
24784 should return a non-nil value.
24785
24786 There should be no result data from this function.
24787
24788
24789 @item (nnchoke-request-type GROUP &optional ARTICLE)
24790
24791 When the user issues commands for ``sending news'' (@kbd{F} in the
24792 summary buffer, for instance), Gnus has to know whether the article the
24793 user is following up on is news or mail.  This function should return
24794 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
24795 is mail and @code{unknown} if the type can't be decided.  (The
24796 @var{article} parameter is necessary in @code{nnvirtual} groups which
24797 might very well combine mail groups and news groups.)  Both @var{group}
24798 and @var{article} may be @code{nil}.
24799
24800 There should be no result data from this function.
24801
24802
24803 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
24804
24805 Set/remove/add marks on articles.  Normally Gnus handles the article
24806 marks (such as read, ticked, expired etc) internally, and store them in
24807 @code{~/.newsrc.eld}.  Some back ends (such as @sc{imap}) however carry
24808 all information about the articles on the server, so Gnus need to
24809 propagate the mark information to the server.
24810
24811 ACTION is a list of mark setting requests, having this format:
24812
24813 @example
24814 (RANGE ACTION MARK)
24815 @end example
24816
24817 RANGE is a range of articles you wish to update marks on.  ACTION is
24818 @code{add} or @code{del}, used to add marks or remove marks
24819 (preserving all marks not mentioned).  MARK is a list of marks; where
24820 each mark is a symbol.  Currently used marks are @code{read},
24821 @code{tick}, @code{reply}, @code{expire}, @code{killed},
24822 @code{dormant}, @code{save}, @code{download}, @code{unsend},
24823 @code{forward} and @code{recent}, but your back end should, if
24824 possible, not limit itself to these.
24825
24826 Given contradictory actions, the last action in the list should be the
24827 effective one.  That is, if your action contains a request to add the
24828 @code{tick} mark on article 1 and, later in the list, a request to
24829 remove the mark on the same article, the mark should in fact be removed.
24830
24831 An example action list:
24832
24833 @example
24834 (((5 12 30) 'del '(tick))
24835  ((10 . 90) 'add '(read expire))
24836  ((92 94) 'del '(read)))
24837 @end example
24838
24839 The function should return a range of articles it wasn't able to set the
24840 mark on (currently not used for anything).
24841
24842 There should be no result data from this function.
24843
24844 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
24845
24846 If the user tries to set a mark that the back end doesn't like, this
24847 function may change the mark.  Gnus will use whatever this function
24848 returns as the mark for @var{article} instead of the original
24849 @var{mark}.  If the back end doesn't care, it must return the original
24850 @var{mark}, and not @code{nil} or any other type of garbage.
24851
24852 The only use for this I can see is what @code{nnvirtual} does with
24853 it---if a component group is auto-expirable, marking an article as read
24854 in the virtual group should result in the article being marked as
24855 expirable.
24856
24857 There should be no result data from this function.
24858
24859
24860 @item (nnchoke-request-scan &optional GROUP SERVER)
24861
24862 This function may be called at any time (by Gnus or anything else) to
24863 request that the back end check for incoming articles, in one way or
24864 another.  A mail back end will typically read the spool file or query the
24865 POP server when this function is invoked.  The @var{group} doesn't have
24866 to be heeded---if the back end decides that it is too much work just
24867 scanning for a single group, it may do a total scan of all groups.  It
24868 would be nice, however, to keep things local if that's practical.
24869
24870 There should be no result data from this function.
24871
24872
24873 @item (nnchoke-request-group-description GROUP &optional SERVER)
24874
24875 The result data from this function should be a description of
24876 @var{group}.
24877
24878 @example
24879 description-line = name <TAB> description eol
24880 name             = <string>
24881 description      = <text>
24882 @end example
24883
24884 @item (nnchoke-request-list-newsgroups &optional SERVER)
24885
24886 The result data from this function should be the description of all
24887 groups available on the server.
24888
24889 @example
24890 description-buffer = *description-line
24891 @end example
24892
24893
24894 @item (nnchoke-request-newgroups DATE &optional SERVER)
24895
24896 The result data from this function should be all groups that were
24897 created after @samp{date}, which is in normal human-readable date format
24898 (i.e., the date format used in mail and news headers, and returned by
24899 the function @code{message-make-date} by default).  The data should be
24900 in the active buffer format.
24901
24902 It is okay for this function to return `too many' groups; some back ends
24903 might find it cheaper to return the full list of groups, rather than
24904 just the new groups.  But don't do this for back ends with many groups.
24905 Normally, if the user creates the groups herself, there won't be too
24906 many groups, so @code{nnml} and the like are probably safe.  But for
24907 back ends like @code{nntp}, where the groups have been created by the
24908 server, it is quite likely that there can be many groups.
24909
24910
24911 @item (nnchoke-request-create-group GROUP &optional SERVER)
24912
24913 This function should create an empty group with name @var{group}.
24914
24915 There should be no return data.
24916
24917
24918 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
24919
24920 This function should run the expiry process on all articles in the
24921 @var{articles} range (which is currently a simple list of article
24922 numbers.)  It is left up to the back end to decide how old articles
24923 should be before they are removed by this function.  If @var{force} is
24924 non-@code{nil}, all @var{articles} should be deleted, no matter how new
24925 they are.
24926
24927 This function should return a list of articles that it did not/was not
24928 able to delete.
24929
24930 There should be no result data returned.
24931
24932
24933 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
24934 &optional LAST)
24935
24936 This function should move @var{article} (which is a number) from
24937 @var{group} by calling @var{accept-form}.
24938
24939 This function should ready the article in question for moving by
24940 removing any header lines it has added to the article, and generally
24941 should ``tidy up'' the article.  Then it should @code{eval}
24942 @var{accept-form} in the buffer where the ``tidy'' article is.  This
24943 will do the actual copying.  If this @code{eval} returns a
24944 non-@code{nil} value, the article should be removed.
24945
24946 If @var{last} is @code{nil}, that means that there is a high likelihood
24947 that there will be more requests issued shortly, so that allows some
24948 optimizations.
24949
24950 The function should return a cons where the @code{car} is the group name and
24951 the @code{cdr} is the article number that the article was entered as.
24952
24953 The group should exist before the backend is asked to accept the
24954 article for that group.
24955
24956 There should be no data returned.
24957
24958
24959 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
24960
24961 This function takes the current buffer and inserts it into @var{group}.
24962 If @var{last} in @code{nil}, that means that there will be more calls to
24963 this function in short order.
24964
24965 The function should return a cons where the @code{car} is the group name and
24966 the @code{cdr} is the article number that the article was entered as.
24967
24968 There should be no data returned.
24969
24970
24971 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
24972
24973 This function should remove @var{article} (which is a number) from
24974 @var{group} and insert @var{buffer} there instead.
24975
24976 There should be no data returned.
24977
24978
24979 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
24980
24981 This function should delete @var{group}.  If @var{force}, it should
24982 really delete all the articles in the group, and then delete the group
24983 itself.  (If there is such a thing as ``the group itself''.)
24984
24985 There should be no data returned.
24986
24987
24988 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
24989
24990 This function should rename @var{group} into @var{new-name}.  All
24991 articles in @var{group} should move to @var{new-name}.
24992
24993 There should be no data returned.
24994
24995 @end table
24996
24997
24998 @node Error Messaging
24999 @subsubsection Error Messaging
25000
25001 @findex nnheader-report
25002 @findex nnheader-get-report
25003 The back ends should use the function @code{nnheader-report} to report
25004 error conditions---they should not raise errors when they aren't able to
25005 perform a request.  The first argument to this function is the back end
25006 symbol, and the rest are interpreted as arguments to @code{format} if
25007 there are multiple of them, or just a string if there is one of them.
25008 This function must always returns @code{nil}.
25009
25010 @lisp
25011 (nnheader-report 'nnchoke "You did something totally bogus")
25012
25013 (nnheader-report 'nnchoke "Could not request group %s" group)
25014 @end lisp
25015
25016 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
25017 @code{nil} back from a server, and this function returns the most
25018 recently reported message for the back end in question.  This function
25019 takes one argument---the server symbol.
25020
25021 Internally, these functions access @var{back-end}@code{-status-string},
25022 so the @code{nnchoke} back end will have its error message stored in
25023 @code{nnchoke-status-string}.
25024
25025
25026 @node Writing New Back Ends
25027 @subsubsection Writing New Back Ends
25028
25029 Many back ends are quite similar.  @code{nnml} is just like
25030 @code{nnspool}, but it allows you to edit the articles on the server.
25031 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
25032 and it doesn't maintain overview databases.  @code{nndir} is just like
25033 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
25034 editing articles.
25035
25036 It would make sense if it were possible to ``inherit'' functions from
25037 back ends when writing new back ends.  And, indeed, you can do that if you
25038 want to.  (You don't have to if you don't want to, of course.)
25039
25040 All the back ends declare their public variables and functions by using a
25041 package called @code{nnoo}.
25042
25043 To inherit functions from other back ends (and allow other back ends to
25044 inherit functions from the current back end), you should use the
25045 following macros:
25046
25047 @table @code
25048
25049 @item nnoo-declare
25050 This macro declares the first parameter to be a child of the subsequent
25051 parameters.  For instance:
25052
25053 @lisp
25054 (nnoo-declare nndir
25055   nnml nnmh)
25056 @end lisp
25057
25058 @code{nndir} has declared here that it intends to inherit functions from
25059 both @code{nnml} and @code{nnmh}.
25060
25061 @item defvoo
25062 This macro is equivalent to @code{defvar}, but registers the variable as
25063 a public server variable.  Most state-oriented variables should be
25064 declared with @code{defvoo} instead of @code{defvar}.
25065
25066 In addition to the normal @code{defvar} parameters, it takes a list of
25067 variables in the parent back ends to map the variable to when executing
25068 a function in those back ends.
25069
25070 @lisp
25071 (defvoo nndir-directory nil
25072   "Where nndir will look for groups."
25073   nnml-current-directory nnmh-current-directory)
25074 @end lisp
25075
25076 This means that @code{nnml-current-directory} will be set to
25077 @code{nndir-directory} when an @code{nnml} function is called on behalf
25078 of @code{nndir}.  (The same with @code{nnmh}.)
25079
25080 @item nnoo-define-basics
25081 This macro defines some common functions that almost all back ends should
25082 have.
25083
25084 @example
25085 (nnoo-define-basics nndir)
25086 @end example
25087
25088 @item deffoo
25089 This macro is just like @code{defun} and takes the same parameters.  In
25090 addition to doing the normal @code{defun} things, it registers the
25091 function as being public so that other back ends can inherit it.
25092
25093 @item nnoo-map-functions
25094 This macro allows mapping of functions from the current back end to
25095 functions from the parent back ends.
25096
25097 @example
25098 (nnoo-map-functions nndir
25099   (nnml-retrieve-headers 0 nndir-current-group 0 0)
25100   (nnmh-request-article 0 nndir-current-group 0 0))
25101 @end example
25102
25103 This means that when @code{nndir-retrieve-headers} is called, the first,
25104 third, and fourth parameters will be passed on to
25105 @code{nnml-retrieve-headers}, while the second parameter is set to the
25106 value of @code{nndir-current-group}.
25107
25108 @item nnoo-import
25109 This macro allows importing functions from back ends.  It should be the
25110 last thing in the source file, since it will only define functions that
25111 haven't already been defined.
25112
25113 @example
25114 (nnoo-import nndir
25115   (nnmh
25116    nnmh-request-list
25117    nnmh-request-newgroups)
25118   (nnml))
25119 @end example
25120
25121 This means that calls to @code{nndir-request-list} should just be passed
25122 on to @code{nnmh-request-list}, while all public functions from
25123 @code{nnml} that haven't been defined in @code{nndir} yet should be
25124 defined now.
25125
25126 @end table
25127
25128 Below is a slightly shortened version of the @code{nndir} back end.
25129
25130 @lisp
25131 ;;; nndir.el --- single directory newsgroup access for Gnus
25132 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
25133
25134 ;;; Code:
25135
25136 (require 'nnheader)
25137 (require 'nnmh)
25138 (require 'nnml)
25139 (require 'nnoo)
25140 (eval-when-compile (require 'cl))
25141
25142 (nnoo-declare nndir
25143   nnml nnmh)
25144
25145 (defvoo nndir-directory nil
25146   "Where nndir will look for groups."
25147   nnml-current-directory nnmh-current-directory)
25148
25149 (defvoo nndir-nov-is-evil nil
25150   "*Non-nil means that nndir will never retrieve NOV headers."
25151   nnml-nov-is-evil)
25152
25153 (defvoo nndir-current-group ""
25154   nil
25155   nnml-current-group nnmh-current-group)
25156 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
25157 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
25158
25159 (defvoo nndir-status-string "" nil nnmh-status-string)
25160 (defconst nndir-version "nndir 1.0")
25161
25162 ;;; Interface functions.
25163
25164 (nnoo-define-basics nndir)
25165
25166 (deffoo nndir-open-server (server &optional defs)
25167   (setq nndir-directory
25168         (or (cadr (assq 'nndir-directory defs))
25169             server))
25170   (unless (assq 'nndir-directory defs)
25171     (push `(nndir-directory ,server) defs))
25172   (push `(nndir-current-group
25173           ,(file-name-nondirectory
25174             (directory-file-name nndir-directory)))
25175         defs)
25176   (push `(nndir-top-directory
25177           ,(file-name-directory (directory-file-name nndir-directory)))
25178         defs)
25179   (nnoo-change-server 'nndir server defs))
25180
25181 (nnoo-map-functions nndir
25182   (nnml-retrieve-headers 0 nndir-current-group 0 0)
25183   (nnmh-request-article 0 nndir-current-group 0 0)
25184   (nnmh-request-group nndir-current-group 0 0)
25185   (nnmh-close-group nndir-current-group 0))
25186
25187 (nnoo-import nndir
25188   (nnmh
25189    nnmh-status-message
25190    nnmh-request-list
25191    nnmh-request-newgroups))
25192
25193 (provide 'nndir)
25194 @end lisp
25195
25196
25197 @node Hooking New Back Ends Into Gnus
25198 @subsubsection Hooking New Back Ends Into Gnus
25199
25200 @vindex gnus-valid-select-methods
25201 @findex gnus-declare-backend
25202 Having Gnus start using your new back end is rather easy---you just
25203 declare it with the @code{gnus-declare-backend} functions.  This will
25204 enter the back end into the @code{gnus-valid-select-methods} variable.
25205
25206 @code{gnus-declare-backend} takes two parameters---the back end name and
25207 an arbitrary number of @dfn{abilities}.
25208
25209 Here's an example:
25210
25211 @lisp
25212 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
25213 @end lisp
25214
25215 The above line would then go in the @file{nnchoke.el} file.
25216
25217 The abilities can be:
25218
25219 @table @code
25220 @item mail
25221 This is a mailish back end---followups should (probably) go via mail.
25222 @item post
25223 This is a newsish back end---followups should (probably) go via news.
25224 @item post-mail
25225 This back end supports both mail and news.
25226 @item none
25227 This is neither a post nor mail back end---it's something completely
25228 different.
25229 @item respool
25230 It supports respooling---or rather, it is able to modify its source
25231 articles and groups.
25232 @item address
25233 The name of the server should be in the virtual server name.  This is
25234 true for almost all back ends.
25235 @item prompt-address
25236 The user should be prompted for an address when doing commands like
25237 @kbd{B} in the group buffer.  This is true for back ends like
25238 @code{nntp}, but not @code{nnmbox}, for instance.
25239 @end table
25240
25241
25242 @node Mail-like Back Ends
25243 @subsubsection Mail-like Back Ends
25244
25245 One of the things that separate the mail back ends from the rest of the
25246 back ends is the heavy dependence by most of the mail back ends on
25247 common functions in @file{nnmail.el}.  For instance, here's the
25248 definition of @code{nnml-request-scan}:
25249
25250 @lisp
25251 (deffoo nnml-request-scan (&optional group server)
25252   (setq nnml-article-file-alist nil)
25253   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
25254 @end lisp
25255
25256 It simply calls @code{nnmail-get-new-mail} with a few parameters,
25257 and @code{nnmail} takes care of all the moving and splitting of the
25258 mail.
25259
25260 This function takes four parameters.
25261
25262 @table @var
25263 @item method
25264 This should be a symbol to designate which back end is responsible for
25265 the call.
25266
25267 @item exit-function
25268 This function should be called after the splitting has been performed.
25269
25270 @item temp-directory
25271 Where the temporary files should be stored.
25272
25273 @item group
25274 This optional argument should be a group name if the splitting is to be
25275 performed for one group only.
25276 @end table
25277
25278 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
25279 save each article.  @var{back-end}@code{-active-number} will be called to
25280 find the article number assigned to this article.
25281
25282 The function also uses the following variables:
25283 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
25284 this back end); and @var{back-end}@code{-group-alist} and
25285 @var{back-end}@code{-active-file} to generate the new active file.
25286 @var{back-end}@code{-group-alist} should be a group-active alist, like
25287 this:
25288
25289 @example
25290 (("a-group" (1 . 10))
25291  ("some-group" (34 . 39)))
25292 @end example
25293
25294
25295 @node Score File Syntax
25296 @subsection Score File Syntax
25297
25298 Score files are meant to be easily parseable, but yet extremely
25299 mallable.   It was decided that something that had the same read syntax
25300 as an Emacs Lisp list would fit that spec.
25301
25302 Here's a typical score file:
25303
25304 @lisp
25305 (("summary"
25306   ("win95" -10000 nil s)
25307   ("Gnus"))
25308  ("from"
25309   ("Lars" -1000))
25310  (mark -100))
25311 @end lisp
25312
25313 BNF definition of a score file:
25314
25315 @example
25316 score-file      = "" / "(" *element ")"
25317 element         = rule / atom
25318 rule            = string-rule / number-rule / date-rule
25319 string-rule     = "(" quote string-header quote space *string-match ")"
25320 number-rule     = "(" quote number-header quote space *number-match ")"
25321 date-rule       = "(" quote date-header quote space *date-match ")"
25322 quote           = <ascii 34>
25323 string-header   = "subject" / "from" / "references" / "message-id" /
25324                   "xref" / "body" / "head" / "all" / "followup"
25325 number-header   = "lines" / "chars"
25326 date-header     = "date"
25327 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
25328                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
25329 score           = "nil" / <integer>
25330 date            = "nil" / <natural number>
25331 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
25332                   "r" / "regex" / "R" / "Regex" /
25333                   "e" / "exact" / "E" / "Exact" /
25334                   "f" / "fuzzy" / "F" / "Fuzzy"
25335 number-match    = "(" <integer> [ "" / [ space score [ "" /
25336                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
25337 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
25338 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
25339                   space date [ "" / [ space date-match-t ] ] ] ] ")"
25340 date-match-t    = "nil" / "at" / "before" / "after"
25341 atom            = "(" [ required-atom / optional-atom ] ")"
25342 required-atom   = mark / expunge / mark-and-expunge / files /
25343                   exclude-files / read-only / touched
25344 optional-atom   = adapt / local / eval
25345 mark            = "mark" space nil-or-number
25346 nil-or-number   = "nil" / <integer>
25347 expunge         = "expunge" space nil-or-number
25348 mark-and-expunge = "mark-and-expunge" space nil-or-number
25349 files           = "files" *[ space <string> ]
25350 exclude-files   = "exclude-files" *[ space <string> ]
25351 read-only       = "read-only" [ space "nil" / space "t" ]
25352 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
25353 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
25354 local           = "local" *[ space "(" <string> space <form> ")" ]
25355 eval            = "eval" space <form>
25356 space           = *[ " " / <TAB> / <NEWLINE> ]
25357 @end example
25358
25359 Any unrecognized elements in a score file should be ignored, but not
25360 discarded.
25361
25362 As you can see, white space is needed, but the type and amount of white
25363 space is irrelevant.  This means that formatting of the score file is
25364 left up to the programmer---if it's simpler to just spew it all out on
25365 one looong line, then that's ok.
25366
25367 The meaning of the various atoms are explained elsewhere in this
25368 manual (@pxref{Score File Format}).
25369
25370
25371 @node Headers
25372 @subsection Headers
25373
25374 Internally Gnus uses a format for storing article headers that
25375 corresponds to the @sc{nov} format in a mysterious fashion.  One could
25376 almost suspect that the author looked at the @sc{nov} specification and
25377 just shamelessly @emph{stole} the entire thing, and one would be right.
25378
25379 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
25380 RFC 1036 to talk about lines in the head of an article (e.g.,
25381 @code{From}).  It is used by many people as a synonym for
25382 ``head''---``the header and the body''.  (That should be avoided, in my
25383 opinion.)  And Gnus uses a format internally that it calls ``header'',
25384 which is what I'm talking about here.  This is a 9-element vector,
25385 basically, with each header (ouch) having one slot.
25386
25387 These slots are, in order: @code{number}, @code{subject}, @code{from},
25388 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
25389 @code{xref}, and @code{extra}.  There are macros for accessing and
25390 setting these slots---they all have predictable names beginning with
25391 @code{mail-header-} and @code{mail-header-set-}, respectively.
25392
25393 All these slots contain strings, except the @code{extra} slot, which
25394 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
25395
25396
25397 @node Ranges
25398 @subsection Ranges
25399
25400 @sc{gnus} introduced a concept that I found so useful that I've started
25401 using it a lot and have elaborated on it greatly.
25402
25403 The question is simple: If you have a large amount of objects that are
25404 identified by numbers (say, articles, to take a @emph{wild} example)
25405 that you want to qualify as being ``included'', a normal sequence isn't
25406 very useful.  (A 200,000 length sequence is a bit long-winded.)
25407
25408 The solution is as simple as the question: You just collapse the
25409 sequence.
25410
25411 @example
25412 (1 2 3 4 5 6 10 11 12)
25413 @end example
25414
25415 is transformed into
25416
25417 @example
25418 ((1 . 6) (10 . 12))
25419 @end example
25420
25421 To avoid having those nasty @samp{(13 . 13)} elements to denote a
25422 lonesome object, a @samp{13} is a valid element:
25423
25424 @example
25425 ((1 . 6) 7 (10 . 12))
25426 @end example
25427
25428 This means that comparing two ranges to find out whether they are equal
25429 is slightly tricky:
25430
25431 @example
25432 ((1 . 5) 7 8 (10 . 12))
25433 @end example
25434
25435 and
25436
25437 @example
25438 ((1 . 5) (7 . 8) (10 . 12))
25439 @end example
25440
25441 are equal.  In fact, any non-descending list is a range:
25442
25443 @example
25444 (1 2 3 4 5)
25445 @end example
25446
25447 is a perfectly valid range, although a pretty long-winded one.  This is
25448 also valid:
25449
25450 @example
25451 (1 . 5)
25452 @end example
25453
25454 and is equal to the previous range.
25455
25456 Here's a BNF definition of ranges.  Of course, one must remember the
25457 semantic requirement that the numbers are non-descending.  (Any number
25458 of repetition of the same number is allowed, but apt to disappear in
25459 range handling.)
25460
25461 @example
25462 range           = simple-range / normal-range
25463 simple-range    = "(" number " . " number ")"
25464 normal-range    = "(" start-contents ")"
25465 contents        = "" / simple-range *[ " " contents ] /
25466                   number *[ " " contents ]
25467 @end example
25468
25469 Gnus currently uses ranges to keep track of read articles and article
25470 marks.  I plan on implementing a number of range operators in C if The
25471 Powers That Be are willing to let me.  (I haven't asked yet, because I
25472 need to do some more thinking on what operators I need to make life
25473 totally range-based without ever having to convert back to normal
25474 sequences.)
25475
25476
25477 @node Group Info
25478 @subsection Group Info
25479
25480 Gnus stores all permanent info on groups in a @dfn{group info} list.
25481 This list is from three to six elements (or more) long and exhaustively
25482 describes the group.
25483
25484 Here are two example group infos; one is a very simple group while the
25485 second is a more complex one:
25486
25487 @example
25488 ("no.group" 5 ((1 . 54324)))
25489
25490 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
25491                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
25492                 (nnml "")
25493                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
25494 @end example
25495
25496 The first element is the @dfn{group name}---as Gnus knows the group,
25497 anyway.  The second element is the @dfn{subscription level}, which
25498 normally is a small integer.  (It can also be the @dfn{rank}, which is a
25499 cons cell where the @code{car} is the level and the @code{cdr} is the
25500 score.)  The third element is a list of ranges of read articles.  The
25501 fourth element is a list of lists of article marks of various kinds.
25502 The fifth element is the select method (or virtual server, if you like).
25503 The sixth element is a list of @dfn{group parameters}, which is what
25504 this section is about.
25505
25506 Any of the last three elements may be missing if they are not required.
25507 In fact, the vast majority of groups will normally only have the first
25508 three elements, which saves quite a lot of cons cells.
25509
25510 Here's a BNF definition of the group info format:
25511
25512 @example
25513 info          = "(" group space ralevel space read
25514                 [ "" / [ space marks-list [ "" / [ space method [ "" /
25515                 space parameters ] ] ] ] ] ")"
25516 group         = quote <string> quote
25517 ralevel       = rank / level
25518 level         = <integer in the range of 1 to inf>
25519 rank          = "(" level "." score ")"
25520 score         = <integer in the range of 1 to inf>
25521 read          = range
25522 marks-lists   = nil / "(" *marks ")"
25523 marks         = "(" <string> range ")"
25524 method        = "(" <string> *elisp-forms ")"
25525 parameters    = "(" *elisp-forms ")"
25526 @end example
25527
25528 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
25529 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
25530 in pseudo-BNF.
25531
25532 If you have a Gnus info and want to access the elements, Gnus offers a
25533 series of macros for getting/setting these elements.
25534
25535 @table @code
25536 @item gnus-info-group
25537 @itemx gnus-info-set-group
25538 @findex gnus-info-group
25539 @findex gnus-info-set-group
25540 Get/set the group name.
25541
25542 @item gnus-info-rank
25543 @itemx gnus-info-set-rank
25544 @findex gnus-info-rank
25545 @findex gnus-info-set-rank
25546 Get/set the group rank (@pxref{Group Score}).
25547
25548 @item gnus-info-level
25549 @itemx gnus-info-set-level
25550 @findex gnus-info-level
25551 @findex gnus-info-set-level
25552 Get/set the group level.
25553
25554 @item gnus-info-score
25555 @itemx gnus-info-set-score
25556 @findex gnus-info-score
25557 @findex gnus-info-set-score
25558 Get/set the group score (@pxref{Group Score}).
25559
25560 @item gnus-info-read
25561 @itemx gnus-info-set-read
25562 @findex gnus-info-read
25563 @findex gnus-info-set-read
25564 Get/set the ranges of read articles.
25565
25566 @item gnus-info-marks
25567 @itemx gnus-info-set-marks
25568 @findex gnus-info-marks
25569 @findex gnus-info-set-marks
25570 Get/set the lists of ranges of marked articles.
25571
25572 @item gnus-info-method
25573 @itemx gnus-info-set-method
25574 @findex gnus-info-method
25575 @findex gnus-info-set-method
25576 Get/set the group select method.
25577
25578 @item gnus-info-params
25579 @itemx gnus-info-set-params
25580 @findex gnus-info-params
25581 @findex gnus-info-set-params
25582 Get/set the group parameters.
25583 @end table
25584
25585 All the getter functions take one parameter---the info list.  The setter
25586 functions take two parameters---the info list and the new value.
25587
25588 The last three elements in the group info aren't mandatory, so it may be
25589 necessary to extend the group info before setting the element.  If this
25590 is necessary, you can just pass on a non-@code{nil} third parameter to
25591 the three final setter functions to have this happen automatically.
25592
25593
25594 @node Extended Interactive
25595 @subsection Extended Interactive
25596 @cindex interactive
25597 @findex gnus-interactive
25598
25599 Gnus extends the standard Emacs @code{interactive} specification
25600 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
25601 Prefixes}).  Here's an example of how this is used:
25602
25603 @lisp
25604 (defun gnus-summary-increase-score (&optional score symp)
25605   (interactive (gnus-interactive "P\ny"))
25606   ...
25607   )
25608 @end lisp
25609
25610 The best thing to do would have been to implement
25611 @code{gnus-interactive} as a macro which would have returned an
25612 @code{interactive} form, but this isn't possible since Emacs checks
25613 whether a function is interactive or not by simply doing an @code{assq}
25614 on the lambda form.  So, instead we have @code{gnus-interactive}
25615 function that takes a string and returns values that are usable to
25616 @code{interactive}.
25617
25618 This function accepts (almost) all normal @code{interactive} specs, but
25619 adds a few more.
25620
25621 @table @samp
25622 @item y
25623 @vindex gnus-current-prefix-symbol
25624 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
25625 variable.
25626
25627 @item Y
25628 @vindex gnus-current-prefix-symbols
25629 A list of the current symbolic prefixes---the
25630 @code{gnus-current-prefix-symbol} variable.
25631
25632 @item A
25633 The current article number---the @code{gnus-summary-article-number}
25634 function.
25635
25636 @item H
25637 The current article header---the @code{gnus-summary-article-header}
25638 function.
25639
25640 @item g
25641 The current group name---the @code{gnus-group-group-name}
25642 function.
25643
25644 @end table
25645
25646
25647 @node Emacs/XEmacs Code
25648 @subsection Emacs/XEmacs Code
25649 @cindex XEmacs
25650 @cindex Emacsen
25651
25652 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
25653 platforms must be the primary one.  I chose Emacs.  Not because I don't
25654 like XEmacs or Mule, but because it comes first alphabetically.
25655
25656 This means that Gnus will byte-compile under Emacs with nary a warning,
25657 while XEmacs will pump out gigabytes of warnings while byte-compiling.
25658 As I use byte-compilation warnings to help me root out trivial errors in
25659 Gnus, that's very useful.
25660
25661 I've also consistently used Emacs function interfaces, but have used
25662 Gnusey aliases for the functions.  To take an example:  Emacs defines a
25663 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
25664 function.  I then define a function called @code{gnus-run-at-time} that
25665 takes the same parameters as the Emacs @code{run-at-time}.  When running
25666 Gnus under Emacs, the former function is just an alias for the latter.
25667 However, when running under XEmacs, the former is an alias for the
25668 following function:
25669
25670 @lisp
25671 (defun gnus-xmas-run-at-time (time repeat function &rest args)
25672   (start-itimer
25673    "gnus-run-at-time"
25674    `(lambda ()
25675       (,function ,@@args))
25676    time repeat))
25677 @end lisp
25678
25679 This sort of thing has been done for bunches of functions.  Gnus does
25680 not redefine any native Emacs functions while running under XEmacs---it
25681 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
25682 all over.
25683
25684 In the cases where the XEmacs function interface was obviously cleaner,
25685 I used it instead.  For example @code{gnus-region-active-p} is an alias
25686 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
25687
25688 Of course, I could have chosen XEmacs as my native platform and done
25689 mapping functions the other way around.  But I didn't.  The performance
25690 hit these indirections impose on Gnus under XEmacs should be slight.
25691
25692
25693 @node Various File Formats
25694 @subsection Various File Formats
25695
25696 @menu
25697 * Active File Format::          Information on articles and groups available.
25698 * Newsgroups File Format::      Group descriptions.
25699 @end menu
25700
25701
25702 @node Active File Format
25703 @subsubsection Active File Format
25704
25705 The active file lists all groups available on the server in
25706 question.  It also lists the highest and lowest current article numbers
25707 in each group.
25708
25709 Here's an excerpt from a typical active file:
25710
25711 @example
25712 soc.motss 296030 293865 y
25713 alt.binaries.pictures.fractals 3922 3913 n
25714 comp.sources.unix 1605 1593 m
25715 comp.binaries.ibm.pc 5097 5089 y
25716 no.general 1000 900 y
25717 @end example
25718
25719 Here's a pseudo-BNF definition of this file:
25720
25721 @example
25722 active      = *group-line
25723 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
25724 group       = <non-white-space string>
25725 spc         = " "
25726 high-number = <non-negative integer>
25727 low-number  = <positive integer>
25728 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
25729 @end example
25730
25731 For a full description of this file, see the manual pages for
25732 @samp{innd}, in particular @samp{active(5)}.
25733
25734
25735 @node Newsgroups File Format
25736 @subsubsection Newsgroups File Format
25737
25738 The newsgroups file lists groups along with their descriptions.  Not all
25739 groups on the server have to be listed,  and not all groups in the file
25740 have to exist on the server.  The file is meant purely as information to
25741 the user.
25742
25743 The format is quite simple; a group name, a tab, and the description.
25744 Here's the definition:
25745
25746 @example
25747 newsgroups    = *line
25748 line          = group tab description <NEWLINE>
25749 group         = <non-white-space string>
25750 tab           = <TAB>
25751 description   = <string>
25752 @end example
25753
25754
25755 @page
25756 @node Emacs for Heathens
25757 @section Emacs for Heathens
25758
25759 Believe it or not, but some people who use Gnus haven't really used
25760 Emacs much before they embarked on their journey on the Gnus Love Boat.
25761 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
25762 region'', and ``set @code{gnus-flargblossen} to an alist where the key
25763 is a regexp that is used for matching on the group name'' are magical
25764 phrases with little or no meaning, then this appendix is for you.  If
25765 you are already familiar with Emacs, just ignore this and go fondle your
25766 cat instead.
25767
25768 @menu
25769 * Keystrokes::                  Entering text and executing commands.
25770 * Emacs Lisp::                  The built-in Emacs programming language.
25771 @end menu
25772
25773
25774 @node Keystrokes
25775 @subsection Keystrokes
25776
25777 @itemize @bullet
25778 @item
25779 Q: What is an experienced Emacs user?
25780
25781 @item
25782 A: A person who wishes that the terminal had pedals.
25783 @end itemize
25784
25785 Yes, when you use Emacs, you are apt to use the control key, the shift
25786 key and the meta key a lot.  This is very annoying to some people
25787 (notably @code{vi}le users), and the rest of us just love the hell out
25788 of it.  Just give up and submit.  Emacs really does stand for
25789 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
25790 may have heard from other disreputable sources (like the Emacs author).
25791
25792 The shift keys are normally located near your pinky fingers, and are
25793 normally used to get capital letters and stuff.  You probably use it all
25794 the time.  The control key is normally marked ``CTRL'' or something like
25795 that.  The meta key is, funnily enough, never marked as such on any
25796 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
25797 which is the meta key on this keyboard.  It's usually located somewhere
25798 to the left hand side of the keyboard, usually on the bottom row.
25799
25800 Now, us Emacs people don't say ``press the meta-control-m key'',
25801 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
25802 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
25803 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
25804 down the control key, and hold it down while you press @kbd{k}''.
25805 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
25806 the control key and then press @kbd{k}''.  Simple, ay?
25807
25808 This is somewhat complicated by the fact that not all keyboards have a
25809 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
25810 means ``press escape, release escape, press @kbd{k}''.  That's much more
25811 work than if you have a meta key, so if that's the case, I respectfully
25812 suggest you get a real keyboard with a meta key.  You can't live without
25813 it.
25814
25815
25816
25817 @node Emacs Lisp
25818 @subsection Emacs Lisp
25819
25820 Emacs is the King of Editors because it's really a Lisp interpreter.
25821 Each and every key you tap runs some Emacs Lisp code snippet, and since
25822 Emacs Lisp is an interpreted language, that means that you can configure
25823 any key to run any arbitrary code.  You just, like, do it.
25824
25825 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
25826 functions.  (These are byte-compiled for speed, but it's still
25827 interpreted.)  If you decide that you don't like the way Gnus does
25828 certain things, it's trivial to have it do something a different way.
25829 (Well, at least if you know how to write Lisp code.)  However, that's
25830 beyond the scope of this manual, so we are simply going to talk about
25831 some common constructs that you normally use in your @file{.emacs} file
25832 to customize Gnus.
25833
25834 If you want to set the variable @code{gnus-florgbnize} to four (4), you
25835 write the following:
25836
25837 @lisp
25838 (setq gnus-florgbnize 4)
25839 @end lisp
25840
25841 This function (really ``special form'') @code{setq} is the one that can
25842 set a variable to some value.  This is really all you need to know.  Now
25843 you can go and fill your @file{.emacs} file with lots of these to change
25844 how Gnus works.
25845
25846 If you have put that thing in your @file{.emacs} file, it will be read
25847 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
25848 start Emacs.  If you want to change the variable right away, simply say
25849 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
25850 previous ``form'', which is a simple @code{setq} statement here.
25851
25852 Go ahead---just try it, if you're located at your Emacs.  After you
25853 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
25854 is the return value of the form you @code{eval}ed.
25855
25856 Some pitfalls:
25857
25858 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
25859 that means:
25860
25861 @lisp
25862 (setq gnus-read-active-file 'some)
25863 @end lisp
25864
25865 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
25866 @samp{nntp.ifi.uio.no}'', that means:
25867
25868 @lisp
25869 (setq gnus-nntp-server "nntp.ifi.uio.no")
25870 @end lisp
25871
25872 So be careful not to mix up strings (the latter) with symbols (the
25873 former).  The manual is unambiguous, but it can be confusing.
25874
25875 @page
25876 @include gnus-faq.texi
25877
25878 @node Index
25879 @chapter Index
25880 @printindex cp
25881
25882 @node Key Index
25883 @chapter Key Index
25884 @printindex ky
25885
25886 @summarycontents
25887 @contents
25888 @bye
25889
25890 @iftex
25891 @iflatex
25892 \end{document}
25893 @end iflatex
25894 @end iftex
25895
25896 @c Local Variables:
25897 @c mode: texinfo
25898 @c coding: iso-8859-1
25899 @c End:
25900 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
25901 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
25902 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
25903 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
25904 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref