Synch to Gnus 200307171419.
[elisp/gnus.git-] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle T-gnus 6.16 Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{T-gnus v6.16}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
57 \newcommand{\gnusenv}[1]{\gnustt{#1}}
58 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
59 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
60 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
61 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
62 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
63 \newcommand{\gnusdfn}[1]{\textit{#1}}
64 \newcommand{\gnusi}[1]{\textit{#1}}
65 \newcommand{\gnusr}[1]{\textrm{#1}}
66 \newcommand{\gnusstrong}[1]{\textbf{#1}}
67 \newcommand{\gnusemph}[1]{\textit{#1}}
68 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
69 \newcommand{\gnussc}[1]{\textsc{#1}}
70 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
71 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
72 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
73 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
74 \newcommand{\gnusacronym}[1]{\textsc{#1}}
75 \newcommand{\gnusemail}[1]{\textit{#1}}
76
77 \newcommand{\gnusbullet}{{${\bullet}$}}
78 \newcommand{\gnusdollar}{\$}
79 \newcommand{\gnusampersand}{\&}
80 \newcommand{\gnuspercent}{\%}
81 \newcommand{\gnushash}{\#}
82 \newcommand{\gnushat}{\symbol{"5E}}
83 \newcommand{\gnusunderline}{\symbol{"5F}}
84 \newcommand{\gnusnot}{$\neg$}
85 \newcommand{\gnustilde}{\symbol{"7E}}
86 \newcommand{\gnusless}{{$<$}}
87 \newcommand{\gnusgreater}{{$>$}}
88 \newcommand{\gnusbraceleft}{{$>$}}
89 \newcommand{\gnusbraceright}{{$>$}}
90
91 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
92 \newcommand{\gnusinteresting}{
93 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
94 }
95
96 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
97
98 \newcommand{\gnuspagechapter}[1]{
99 {\mbox{}}
100 }
101
102 \newdimen{\gnusdimen}
103 \gnusdimen 0pt
104
105 \newcommand{\gnuschapter}[2]{
106 \gnuscleardoublepage
107 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
108 \chapter{#2}
109 \renewcommand{\gnussectionname}{}
110 \renewcommand{\gnuschaptername}{#2}
111 \thispagestyle{empty}
112 \hspace*{-2cm}
113 \begin{picture}(500,500)(0,0)
114 \put(480,350){\makebox(0,0)[tr]{#1}}
115 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
116 \end{picture}
117 \clearpage
118 }
119
120 \newcommand{\gnusfigure}[3]{
121 \begin{figure}
122 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
123 #3
124 \end{picture}
125 \caption{#1}
126 \end{figure}
127 }
128
129 \newcommand{\gnusicon}[1]{
130 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
131 }
132
133 \newcommand{\gnuspicon}[1]{
134 \margindex{\epsfig{figure=#1,width=2cm}}
135 }
136
137 \newcommand{\gnusxface}[2]{
138 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
139 }
140
141 \newcommand{\gnussmiley}[2]{
142 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
143 }
144
145 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
146
147 \newcommand{\gnussection}[1]{
148 \renewcommand{\gnussectionname}{#1}
149 \section{#1}
150 }
151
152 \newenvironment{codelist}%
153 {\begin{list}{}{
154 }
155 }{\end{list}}
156
157 \newenvironment{kbdlist}%
158 {\begin{list}{}{
159 \labelwidth=0cm
160 }
161 }{\end{list}}
162
163 \newenvironment{dfnlist}%
164 {\begin{list}{}{
165 }
166 }{\end{list}}
167
168 \newenvironment{stronglist}%
169 {\begin{list}{}{
170 }
171 }{\end{list}}
172
173 \newenvironment{samplist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{varlist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newenvironment{emphlist}%
184 {\begin{list}{}{
185 }
186 }{\end{list}}
187
188 \newlength\gnusheadtextwidth
189 \setlength{\gnusheadtextwidth}{\headtextwidth}
190 \addtolength{\gnusheadtextwidth}{1cm}
191
192 \newpagestyle{gnuspreamble}%
193 {
194 {
195 \ifodd\count0
196 {
197 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
198 }
199 \else
200 {
201 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
202 }
203 }
204 \fi
205 }
206 }
207 {
208 \ifodd\count0
209 \mbox{} \hfill
210 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
211 \else
212 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
213 \hfill \mbox{}
214 \fi
215 }
216
217 \newpagestyle{gnusindex}%
218 {
219 {
220 \ifodd\count0
221 {
222 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
223 }
224 \else
225 {
226 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
227 }
228 \fi
229 }
230 }
231 {
232 \ifodd\count0
233 \mbox{} \hfill
234 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
235 \else
236 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
237 \hfill \mbox{}
238 \fi
239 }
240
241 \newpagestyle{gnus}%
242 {
243 {
244 \ifodd\count0
245 {
246 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
247 }
248 \else
249 {
250 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
251 }
252 \fi
253 }
254 }
255 {
256 \ifodd\count0
257 \mbox{} \hfill
258 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
259 \else
260 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
261 \hfill \mbox{}
262 \fi
263 }
264
265 \pagenumbering{roman}
266 \pagestyle{gnuspreamble}
267
268 @end iflatex
269 @end iftex
270
271 @iftex
272 @iflatex
273 \begin{titlepage}
274 {
275
276 %\addtolength{\oddsidemargin}{-5cm}
277 %\addtolength{\evensidemargin}{-5cm}
278 \parindent=0cm
279 \addtolength{\textheight}{2cm}
280
281 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
282 \rule{15cm}{1mm}\\
283 \vfill
284 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
285 \vfill
286 \rule{15cm}{1mm}\\
287 \gnusauthor{by Lars Magne Ingebrigtsen}
288 \newpage
289 }
290
291 \mbox{}
292 \vfill
293
294 \thispagestyle{empty}
295
296 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
297 2002, 2003
298 Free Software Foundation, Inc.
299
300
301 Permission is granted to copy, distribute and/or modify this document
302 under the terms of the GNU Free Documentation License, Version 1.1 or
303 any later version published by the Free Software Foundation; with no
304 Invariant Sections, with the Front-Cover texts being ``A GNU
305 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
306 license is included in the section entitled ``GNU Free Documentation
307 License'' in the Emacs manual.
308
309 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
310 this GNU Manual, like GNU software.  Copies published by the Free
311 Software Foundation raise funds for GNU development.''
312
313 This document is part of a collection distributed under the GNU Free
314 Documentation License.  If you want to distribute this document
315 separately from the collection, you can do so by adding a copy of the
316 license to the document, as described in section 6 of the license.
317 \newpage
318 \end{titlepage}
319 @end iflatex
320 @end iftex
321
322 @ifnottex
323
324 This file documents gnus, the GNU Emacs newsreader.
325
326 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
327         Free Software Foundation, Inc.
328
329 Permission is granted to copy, distribute and/or modify this document
330 under the terms of the GNU Free Documentation License, Version 1.1 or
331 any later version published by the Free Software Foundation; with the
332 Invariant Sections being none, with the Front-Cover texts being ``A GNU
333 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
334 license is included in the section entitled ``GNU Free Documentation
335 License'' in the Emacs manual.
336
337 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
338 this GNU Manual, like GNU software.  Copies published by the Free
339 Software Foundation raise funds for GNU development.''
340
341 This document is part of a collection distributed under the GNU Free
342 Documentation License.  If you want to distribute this document
343 separately from the collection, you can do so by adding a copy of the
344 license to the document, as described in section 6 of the license.
345 @end ifnottex
346
347 @tex
348
349 @titlepage
350 @title T-gnus 6.16 Manual
351
352 @author by Lars Magne Ingebrigtsen
353 @page
354
355 @vskip 0pt plus 1filll
356 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
357 2002, 2003
358         Free Software Foundation, Inc.
359
360 Permission is granted to copy, distribute and/or modify this document
361 under the terms of the GNU Free Documentation License, Version 1.1 or
362 any later version published by the Free Software Foundation; with no
363 Invariant Sections, with the Front-Cover texts being ``A GNU
364 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
365 license is included in the section entitled ``GNU Free Documentation
366 License'' in the Emacs manual.
367
368 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
369 this GNU Manual, like GNU software.  Copies published by the Free
370 Software Foundation raise funds for GNU development.''
371
372 This document is part of a collection distributed under the GNU Free
373 Documentation License.  If you want to distribute this document
374 separately from the collection, you can do so by adding a copy of the
375 license to the document, as described in section 6 of the license.
376
377 @end titlepage
378 @page
379
380 @end tex
381
382
383 @node Top
384 @top The gnus Newsreader
385
386 @ifinfo
387
388 You can read news (and mail) from within Emacs by using T-gnus.  The news
389 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
390 spool or your mbox file.  All at the same time, if you want to push your
391 luck.
392
393 T-gnus provides @acronym{MIME} features based on @acronym{SEMI} API.  So
394 T-gnus supports your right to read strange messages including big images
395 or other various kinds of formats.  T-gnus also supports
396 internationalization/localization and multiscript features based on MULE
397 API.  So T-gnus does not discriminate various language communities.  Oh,
398 if you are a Klingon, please wait Unicode Next Generation.
399
400 This manual corresponds to T-gnus 6.16.
401
402 @end ifinfo
403
404 @iftex
405
406 @iflatex
407 \tableofcontents
408 \gnuscleardoublepage
409 @end iflatex
410
411 Gnus is the advanced, self-documenting, customizable, extensible
412 unreal-time newsreader for GNU Emacs.
413
414 Oops.  That sounds oddly familiar, so let's start over again to avoid
415 being accused of plagiarism:
416
417 Gnus is a message-reading laboratory.  It will let you look at just
418 about anything as if it were a newsgroup.  You can read mail with it,
419 you can browse directories with it, you can @code{ftp} with it---you
420 can even read news with it!
421
422 Gnus tries to empower people who read news the same way Emacs empowers
423 people who edit text.  Gnus sets no limits to what the user should be
424 allowed to do.  Users are encouraged to extend gnus to make it behave
425 like they want it to behave.  A program should not control people;
426 people should be empowered to do what they want by using (or abusing)
427 the program.
428
429 @end iftex
430
431 @menu
432 * Starting Up::                 Finding news can be a pain.
433 * Group Buffer::                Selecting, subscribing and killing groups.
434 * Summary Buffer::              Reading, saving and posting articles.
435 * Article Buffer::              Displaying and handling articles.
436 * Composing Messages::          Information on sending mail and news.
437 * Select Methods::              Gnus reads all messages from various select methods.
438 * Scoring::                     Assigning values to articles.
439 * Various::                     General purpose settings.
440 * The End::                     Farewell and goodbye.
441 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
442 * Index::                       Variable, function and concept index.
443 * Key Index::                   Key Index.
444
445 Other related manuals
446
447 * Message:(message).            Composing messages.
448 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
449 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
450 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
451
452 @detailmenu
453  --- The Detailed Node Listing ---
454
455 Starting Gnus
456
457 * Finding the News::            Choosing a method for getting news.
458 * The First Time::              What does Gnus do the first time you start it?
459 * The Server is Down::          How can I read my mail then?
460 * Slave Gnusae::                You can have more than one Gnus active at a time.
461 * Fetching a Group::            Starting Gnus just to read a group.
462 * New Groups::                  What is Gnus supposed to do with new groups?
463 * Changing Servers::            You may want to move from one server to another.
464 * Startup Files::               Those pesky startup files---@file{.newsrc}.
465 * Auto Save::                   Recovering from a crash.
466 * The Active File::             Reading the active file over a slow line Takes Time.
467 * Startup Variables::           Other variables you might change.
468
469 New Groups
470
471 * Checking New Groups::         Determining what groups are new.
472 * Subscription Methods::        What Gnus should do with new groups.
473 * Filtering New Groups::        Making Gnus ignore certain new groups.
474
475 Group Buffer
476
477 * Group Buffer Format::         Information listed and how you can change it.
478 * Group Maneuvering::           Commands for moving in the group buffer.
479 * Selecting a Group::           Actually reading news.
480 * Subscription Commands::       Unsubscribing, killing, subscribing.
481 * Group Data::                  Changing the info for a group.
482 * Group Levels::                Levels? What are those, then?
483 * Group Score::                 A mechanism for finding out what groups you like.
484 * Marking Groups::              You can mark groups for later processing.
485 * Foreign Groups::              Creating and editing groups.
486 * Group Parameters::            Each group may have different parameters set.
487 * Listing Groups::              Gnus can list various subsets of the groups.
488 * Sorting Groups::              Re-arrange the group order.
489 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
490 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
491 * Exiting Gnus::                Stop reading news and get some work done.
492 * Group Topics::                A folding group mode divided into topics.
493 * Misc Group Stuff::            Other stuff that you can to do.
494
495 Group Buffer Format
496
497 * Group Line Specification::    Deciding how the group buffer is to look.
498 * Group Mode Line Specification::  The group buffer mode line.
499 * Group Highlighting::          Having nice colors in the group buffer.
500
501 Group Topics
502
503 * Topic Commands::              Interactive E-Z commands.
504 * Topic Variables::             How to customize the topics the Lisp Way.
505 * Topic Sorting::               Sorting each topic individually.
506 * Topic Topology::              A map of the world.
507 * Topic Parameters::            Parameters that apply to all groups in a topic.
508
509 Misc Group Stuff
510
511 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
512 * Group Information::           Information and help on groups and Gnus.
513 * Group Timestamp::             Making Gnus keep track of when you last read a group.
514 * File Commands::               Reading and writing the Gnus files.
515 * Sieve Commands::              Managing Sieve scripts.
516
517 Summary Buffer
518
519 * Summary Buffer Format::       Deciding how the summary buffer is to look.
520 * Summary Maneuvering::         Moving around the summary buffer.
521 * Choosing Articles::           Reading articles.
522 * Paging the Article::          Scrolling the current article.
523 * Reply Followup and Post::     Posting articles.
524 * Delayed Articles::            Send articles at a later time.
525 * Marking Articles::            Marking articles as read, expirable, etc.
526 * Limiting::                    You can limit the summary buffer.
527 * Threading::                   How threads are made.
528 * Sorting the Summary Buffer::  How articles and threads are sorted.
529 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
530 * Article Caching::             You may store articles in a cache.
531 * Persistent Articles::         Making articles expiry-resistant.
532 * Article Backlog::             Having already read articles hang around.
533 * Saving Articles::             Ways of customizing article saving.
534 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
535 * Article Treatment::           The article buffer can be mangled at will.
536 * MIME Commands::               Doing MIMEy things with the articles.
537 * Charsets::                    Character set issues.
538 * Article Commands::            Doing various things with the article buffer.
539 * Summary Sorting::             Sorting the summary buffer in various ways.
540 * Finding the Parent::          No child support? Get the parent.
541 * Alternative Approaches::      Reading using non-default summaries.
542 * Tree Display::                A more visual display of threads.
543 * Mail Group Commands::         Some commands can only be used in mail groups.
544 * Various Summary Stuff::       What didn't fit anywhere else.
545 * Exiting the Summary Buffer::  Returning to the Group buffer,
546                                 or reselecting the current group.
547 * Crosspost Handling::          How crossposted articles are dealt with.
548 * Duplicate Suppression::       An alternative when crosspost handling fails.
549 * Security::                    Decrypt and Verify.
550 * Mailing List::                Mailing list minor mode.
551
552 Summary Buffer Format
553
554 * Summary Buffer Lines::        You can specify how summary lines should look.
555 * To From Newsgroups::          How to not display your own name.
556 * Summary Buffer Mode Line::    You can say how the mode line should look.
557 * Summary Highlighting::        Making the summary buffer all pretty and nice.
558
559 Choosing Articles
560
561 * Choosing Commands::           Commands for choosing articles.
562 * Choosing Variables::          Variables that influence these commands.
563
564 Reply, Followup and Post
565
566 * Summary Mail Commands::       Sending mail.
567 * Summary Post Commands::       Sending news.
568 * Summary Message Commands::    Other Message-related commands.
569 * Canceling and Superseding::
570
571 Marking Articles
572
573 * Unread Articles::             Marks for unread articles.
574 * Read Articles::               Marks for read articles.
575 * Other Marks::                 Marks that do not affect readedness.
576 * Setting Marks::
577 * Generic Marking Commands::
578 * Setting Process Marks::
579
580 Marking Articles
581
582 * Setting Marks::             How to set and remove marks.
583 * Generic Marking Commands::  How to customize the marking.
584 * Setting Process Marks::     How to mark articles for later processing.
585
586 Threading
587
588 * Customizing Threading::       Variables you can change to affect the threading.
589 * Thread Commands::             Thread based commands in the summary buffer.
590
591 Customizing Threading
592
593 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
594 * Filling In Threads::          Making the threads displayed look fuller.
595 * More Threading::              Even more variables for fiddling with threads.
596 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
597
598 Decoding Articles
599
600 * Uuencoded Articles::          Uudecode articles.
601 * Shell Archives::              Unshar articles.
602 * PostScript Files::            Split PostScript.
603 * Other Files::                 Plain save and binhex.
604 * Decoding Variables::          Variables for a happy decoding.
605 * Viewing Files::               You want to look at the result of the decoding?
606
607 Decoding Variables
608
609 * Rule Variables::              Variables that say how a file is to be viewed.
610 * Other Decode Variables::      Other decode variables.
611 * Uuencoding and Posting::      Variables for customizing uuencoding.
612
613 Article Treatment
614
615 * Article Highlighting::        You want to make the article look like fruit salad.
616 * Article Fontisizing::         Making emphasized text look nice.
617 * Article Hiding::              You also want to make certain info go away.
618 * Article Washing::             Lots of way-neat functions to make life better.
619 * Article Header::              Doing various header transformations.
620 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
621 * Article Button Levels::       Controlling appearance of buttons.
622 * Article Date::                Grumble, UT!
623 * Article Display::             Display various stuff---X-Face, Picons, Smileys
624 * Article Signature::           What is a signature?
625 * Article Miscellanea::         Various other stuff.
626
627 Alternative Approaches
628
629 * Pick and Read::               First mark articles and then read them.
630 * Binary Groups::               Auto-decode all articles.
631
632 Various Summary Stuff
633
634 * Summary Group Information::   Information oriented commands.
635 * Searching for Articles::      Multiple article commands.
636 * Summary Generation Commands::
637 * Really Various Summary Commands::  Those pesky non-conformant commands.
638
639 Article Buffer
640
641 * Hiding Headers::              Deciding what headers should be displayed.
642 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
643 * Customizing Articles::        Tailoring the look of the articles.
644 * Article Keymap::              Keystrokes available in the article buffer.
645 * Misc Article::                Other stuff.
646
647 Composing Messages
648
649 * Mail::                        Mailing and replying.
650 * Posting Server::              What server should you post and mail via?
651 * Mail and Post::               Mailing and posting at the same time.
652 * Archived Messages::           Where Gnus stores the messages you've sent.
653 * Posting Styles::              An easier way to specify who you are.
654 * Drafts::                      Postponing messages and rejected messages.
655 * Rejected Articles::           What happens if the server doesn't like your article?
656 * Signing and encrypting::      How to compose secure messages.
657
658 Select Methods
659
660 * Server Buffer::               Making and editing virtual servers.
661 * Getting News::                Reading USENET news with Gnus.
662 * Getting Mail::                Reading your personal mail with Gnus.
663 * Browsing the Web::            Getting messages from a plethora of Web sources.
664 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
665 * Other Sources::               Reading directories, files, SOUP packets.
666 * Combined Groups::             Combining groups into one group.
667 * Gnus Unplugged::              Reading news and mail offline.
668
669 Server Buffer
670
671 * Server Buffer Format::        You can customize the look of this buffer.
672 * Server Commands::             Commands to manipulate servers.
673 * Example Methods::             Examples server specifications.
674 * Creating a Virtual Server::   An example session.
675 * Server Variables::            Which variables to set.
676 * Servers and Methods::         You can use server names as select methods.
677 * Unavailable Servers::         Some servers you try to contact may be down.
678
679 Getting News
680
681 * NNTP::                        Reading news from an @acronym{NNTP} server.
682 * News Spool::                  Reading news from the local spool.
683
684 @acronym{NNTP}
685
686 * Direct Functions::            Connecting directly to the server.
687 * Indirect Functions::          Connecting indirectly to the server.
688 * Common Variables::            Understood by several connection functions.
689
690 Getting Mail
691
692 * Mail in a Newsreader::        Important introductory notes.
693 * Getting Started Reading Mail::  A simple cookbook example.
694 * Splitting Mail::              How to create mail groups.
695 * Mail Sources::                How to tell Gnus where to get mail from.
696 * Mail Back End Variables::     Variables for customizing mail handling.
697 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
698 * Group Mail Splitting::        Use group customize to drive mail splitting.
699 * Incorporating Old Mail::      What about the old mail you have?
700 * Expiring Mail::               Getting rid of unwanted mail.
701 * Washing Mail::                Removing cruft from the mail you get.
702 * Duplicates::                  Dealing with duplicated mail.
703 * Not Reading Mail::            Using mail back ends for reading other files.
704 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
705
706 Mail Sources
707
708 * Mail Source Specifiers::      How to specify what a mail source is.
709 * Mail Source Customization::   Some variables that influence things.
710 * Fetching Mail::               Using the mail source specifiers.
711
712 Choosing a Mail Back End
713
714 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
715 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
716 * Mail Spool::                  Store your mail in a private spool?
717 * MH Spool::                    An mhspool-like back end.
718 * Maildir::                     Another one-file-per-message format.
719 * Mail Folders::                Having one file for each group.
720 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
721
722 Browsing the Web
723
724 * Archiving Mail::
725 * Web Searches::                Creating groups from articles that match a string.
726 * Slashdot::                    Reading the Slashdot comments.
727 * Ultimate::                    The Ultimate Bulletin Board systems.
728 * Web Archive::                 Reading mailing list archived on web.
729 * RSS::                         Reading RDF site summary.
730 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
731
732 @acronym{IMAP}
733
734 * Splitting in IMAP::           Splitting mail with nnimap.
735 * Expiring in IMAP::            Expiring mail with nnimap.
736 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
737 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
738 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
739
740 Other Sources
741
742 * Directory Groups::            You can read a directory as if it was a newsgroup.
743 * Anything Groups::             Dired?  Who needs dired?
744 * Document Groups::             Single files can be the basis of a group.
745 * SOUP::                        Reading @sc{soup} packets ``offline''.
746 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
747
748 Document Groups
749
750 * Document Server Internals::   How to add your own document types.
751
752 SOUP
753
754 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
755 * SOUP Groups::                 A back end for reading @sc{soup} packets.
756 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
757
758 Combined Groups
759
760 * Virtual Groups::              Combining articles from many groups.
761 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
762
763 Gnus Unplugged
764
765 * Agent Basics::                How it all is supposed to work.
766 * Agent Categories::            How to tell the Gnus Agent what to download.
767 * Agent Commands::              New commands for all the buffers.
768 * Agent Visuals::               Ways that the agent may effect your summary buffer.
769 * Agent as Cache::              The Agent is a big cache too.
770 * Agent Expiry::                How to make old articles go away.
771 * Agent Regeneration::          How to recover from lost connections and other accidents.
772 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
773 * Outgoing Messages::           What happens when you post/mail something?
774 * Agent Variables::             Customizing is fun.
775 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
776 * Batching Agents::             How to fetch news from a @code{cron} job.
777 * Agent Caveats::               What you think it'll do and what it does.
778
779 Agent Categories
780
781 * Category Syntax::             What a category looks like.
782 * Category Buffer::             A buffer for maintaining categories.
783 * Category Variables::          Customize'r'Us.
784
785 Agent Commands
786
787 * Group Agent Commands::        Configure groups and fetch their contents.
788 * Summary Agent Commands::      Manually select then fetch specific articles.
789 * Server Agent Commands::       Select the servers that are supported by the agent.
790
791 Scoring
792
793 * Summary Score Commands::      Adding score entries for the current group.
794 * Group Score Commands::        General score commands.
795 * Score Variables::             Customize your scoring.  (My, what terminology).
796 * Score File Format::           What a score file may contain.
797 * Score File Editing::          You can edit score files by hand as well.
798 * Adaptive Scoring::            Big Sister Gnus knows what you read.
799 * Home Score File::             How to say where new score entries are to go.
800 * Followups To Yourself::       Having Gnus notice when people answer you.
801 * Scoring On Other Headers::    Scoring on non-standard headers.
802 * Scoring Tips::                How to score effectively.
803 * Reverse Scoring::             That problem child of old is not problem.
804 * Global Score Files::          Earth-spanning, ear-splitting score files.
805 * Kill Files::                  They are still here, but they can be ignored.
806 * Converting Kill Files::       Translating kill files to score files.
807 * GroupLens::                   Getting predictions on what you like to read.
808 * Advanced Scoring::            Using logical expressions to build score rules.
809 * Score Decays::                It can be useful to let scores wither away.
810
811 GroupLens
812
813 * Using GroupLens::             How to make Gnus use GroupLens.
814 * Rating Articles::             Letting GroupLens know how you rate articles.
815 * Displaying Predictions::      Displaying predictions given by GroupLens.
816 * GroupLens Variables::         Customizing GroupLens.
817
818 Advanced Scoring
819
820 * Advanced Scoring Syntax::     A definition.
821 * Advanced Scoring Examples::   What they look like.
822 * Advanced Scoring Tips::       Getting the most out of it.
823
824 Various
825
826 * Process/Prefix::              A convention used by many treatment commands.
827 * Interactive::                 Making Gnus ask you many questions.
828 * Symbolic Prefixes::           How to supply some Gnus functions with options.
829 * Formatting Variables::        You can specify what buffers should look like.
830 * Window Layout::               Configuring the Gnus buffer windows.
831 * Faces and Fonts::             How to change how faces look.
832 * Compilation::                 How to speed Gnus up.
833 * Mode Lines::                  Displaying information in the mode lines.
834 * Highlighting and Menus::      Making buffers look all nice and cozy.
835 * Buttons::                     Get tendinitis in ten easy steps!
836 * Daemons::                     Gnus can do things behind your back.
837 * NoCeM::                       How to avoid spam and other fatty foods.
838 * Undo::                        Some actions can be undone.
839 * Predicate Specifiers::        Specifying predicates.
840 * Moderation::                  What to do if you're a moderator.
841 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
842 * Fuzzy Matching::              What's the big fuzz?
843 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
844 * Various Various::             Things that are really various.
845
846 Formatting Variables
847
848 * Formatting Basics::           A formatting variable is basically a format string.
849 * Mode Line Formatting::        Some rules about mode line formatting variables.
850 * Advanced Formatting::         Modifying output in various ways.
851 * User-Defined Specs::          Having Gnus call your own functions.
852 * Formatting Fonts::            Making the formatting look colorful and nice.
853 * Positioning Point::           Moving point to a position after an operation.
854 * Tabulation::                  Tabulating your output.
855 * Wide Characters::             Dealing with wide characters.
856
857 Image Enhancements
858
859 * Picons::                      How to display pictures of what you're reading.
860 * Smileys::                     Show all those happy faces the way they were meant to be shown.
861 * X-Face::                      Display a funky, teensy black-and-white image.
862 * XVarious::                    Other XEmacsy Gnusey variables.
863
864 Thwarting Email Spam
865
866 * The problem of spam::         Some background, and some solutions
867 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
868 * SpamAssassin::                How to use external anti-spam tools.
869 * Hashcash::                    Reduce spam by burning CPU time.
870 * Filtering Spam Using The Spam ELisp Package::
871 * Filtering Spam Using Statistics with spam-stat::
872
873 Appendices
874
875 * XEmacs::                      Requirements for installing under XEmacs.
876 * History::                     How Gnus got where it is today.
877 * On Writing Manuals::          Why this is not a beginner's guide.
878 * Terminology::                 We use really difficult, like, words here.
879 * Customization::               Tailoring Gnus to your needs.
880 * Troubleshooting::             What you might try if things do not work.
881 * Gnus Reference Guide::        Rilly, rilly technical stuff.
882 * Emacs for Heathens::          A short introduction to Emacsian terms.
883 * Frequently Asked Questions::  The Gnus FAQ.
884
885 History
886
887 * Gnus Versions::               What Gnus versions have been released.
888 * Other Gnus Versions::         Other Gnus versions that also have been released.
889 * Why?::                        What's the point of Gnus?
890 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
891 * Conformity::                  Gnus tries to conform to all standards.
892 * Emacsen::                     Gnus can be run on a few modern Emacsen.
893 * Gnus Development::            How Gnus is developed.
894 * Contributors::                Oodles of people.
895 * New Features::                Pointers to some of the new stuff in Gnus.
896
897 New Features
898
899 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
900 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
901 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
902 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
903 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
904 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
905
906 Customization
907
908 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
909 * Slow Terminal Connection::    You run a remote Emacs.
910 * Little Disk Space::           You feel that having large setup files is icky.
911 * Slow Machine::                You feel like buying a faster machine.
912
913 Gnus Reference Guide
914
915 * Gnus Utility Functions::      Common functions and variable to use.
916 * Back End Interface::          How Gnus communicates with the servers.
917 * Score File Syntax::           A BNF definition of the score file standard.
918 * Headers::                     How Gnus stores headers internally.
919 * Ranges::                      A handy format for storing mucho numbers.
920 * Group Info::                  The group info format.
921 * Extended Interactive::        Symbolic prefixes and stuff.
922 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
923 * Various File Formats::        Formats of files that Gnus use.
924
925 Back End Interface
926
927 * Required Back End Functions::  Functions that must be implemented.
928 * Optional Back End Functions::  Functions that need not be implemented.
929 * Error Messaging::             How to get messages and report errors.
930 * Writing New Back Ends::       Extending old back ends.
931 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
932 * Mail-like Back Ends::         Some tips on mail back ends.
933
934 Various File Formats
935
936 * Active File Format::          Information on articles and groups available.
937 * Newsgroups File Format::      Group descriptions.
938
939 Emacs for Heathens
940
941 * Keystrokes::                  Entering text and executing commands.
942 * Emacs Lisp::                  The built-in Emacs programming language.
943
944 @end detailmenu
945 @end menu
946
947 @node Starting Up
948 @chapter Starting gnus
949 @cindex starting up
950
951 @kindex M-x gnus
952 @findex gnus
953 If your system administrator has set things up properly, starting gnus
954 and reading news is extremely easy---you just type @kbd{M-x gnus} in
955 your Emacs.
956
957 @findex gnus-other-frame
958 @kindex M-x gnus-other-frame
959 If you want to start gnus in a different frame, you can use the command
960 @kbd{M-x gnus-other-frame} instead.
961
962 If things do not go smoothly at startup, you have to twiddle some
963 variables in your @file{~/.gnus.el} file.  This file is similar to
964 @file{~/.emacs}, but is read when gnus starts.
965
966 If you puzzle at any terms used in this manual, please refer to the
967 terminology section (@pxref{Terminology}).
968
969 @menu
970 * Finding the News::            Choosing a method for getting news.
971 * The First Time::              What does Gnus do the first time you start it?
972 * The Server is Down::          How can I read my mail then?
973 * Slave Gnusae::                You can have more than one Gnus active at a time.
974 * Fetching a Group::            Starting Gnus just to read a group.
975 * New Groups::                  What is Gnus supposed to do with new groups?
976 * Changing Servers::            You may want to move from one server to another.
977 * Startup Files::               Those pesky startup files---@file{.newsrc}.
978 * Auto Save::                   Recovering from a crash.
979 * The Active File::             Reading the active file over a slow line Takes Time.
980 * Startup Variables::           Other variables you might change.
981 @end menu
982
983
984 @node Finding the News
985 @section Finding the News
986 @cindex finding news
987
988 @vindex gnus-select-method
989 @c @head
990 The @code{gnus-select-method} variable says where gnus should look for
991 news.  This variable should be a list where the first element says
992 @dfn{how} and the second element says @dfn{where}.  This method is your
993 native method.  All groups not fetched with this method are
994 foreign groups.
995
996 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
997 you want to get your daily dosage of news from, you'd say:
998
999 @lisp
1000 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1001 @end lisp
1002
1003 If you want to read directly from the local spool, say:
1004
1005 @lisp
1006 (setq gnus-select-method '(nnspool ""))
1007 @end lisp
1008
1009 If you can use a local spool, you probably should, as it will almost
1010 certainly be much faster.  But do not use the local spool if your
1011 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1012
1013 @vindex gnus-nntpserver-file
1014 @cindex NNTPSERVER
1015 @cindex @acronym{NNTP} server
1016 If this variable is not set, gnus will take a look at the
1017 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1018 gnus will see whether @code{gnus-nntpserver-file}
1019 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1020 If that fails as well, gnus will try to use the machine running Emacs
1021 as an @acronym{NNTP} server.  That's a long shot, though.
1022
1023 @vindex gnus-nntp-server
1024 If @code{gnus-nntp-server} is set, this variable will override
1025 @code{gnus-select-method}.  You should therefore set
1026 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1027
1028 @vindex gnus-secondary-servers
1029 @vindex gnus-nntp-server
1030 You can also make gnus prompt you interactively for the name of an
1031 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1032 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1033 in the @code{gnus-secondary-servers} list (if any).  You can also just
1034 type in the name of any server you feel like visiting.  (Note that this
1035 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1036 gnus} later in the same Emacs session, Gnus will contact the same
1037 server.)
1038
1039 @findex gnus-group-browse-foreign-server
1040 @kindex B (Group)
1041 However, if you use one @acronym{NNTP} server regularly and are just
1042 interested in a couple of groups from a different server, you would be
1043 better served by using the @kbd{B} command in the group buffer.  It will
1044 let you have a look at what groups are available, and you can subscribe
1045 to any of the groups you want to.  This also makes @file{.newsrc}
1046 maintenance much tidier.  @xref{Foreign Groups}.
1047
1048 @vindex gnus-secondary-select-methods
1049 @c @head
1050 A slightly different approach to foreign groups is to set the
1051 @code{gnus-secondary-select-methods} variable.  The select methods
1052 listed in this variable are in many ways just as native as the
1053 @code{gnus-select-method} server.  They will also be queried for active
1054 files during startup (if that's required), and new newsgroups that
1055 appear on these servers will be subscribed (or not) just as native
1056 groups are.
1057
1058 For instance, if you use the @code{nnmbox} back end to read your mail,
1059 you would typically set this variable to
1060
1061 @lisp
1062 (setq gnus-secondary-select-methods '((nnmbox "")))
1063 @end lisp
1064
1065
1066 @node The First Time
1067 @section The First Time
1068 @cindex first time usage
1069
1070 If no startup files exist, gnus will try to determine what groups should
1071 be subscribed by default.
1072
1073 @vindex gnus-default-subscribed-newsgroups
1074 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1075 will subscribe you to just those groups in that list, leaving the rest
1076 killed.  Your system administrator should have set this variable to
1077 something useful.
1078
1079 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1080 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1081 here as @dfn{whatever Lars thinks you should read}.)
1082
1083 You'll also be subscribed to the gnus documentation group, which should
1084 help you with most common problems.
1085
1086 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1087 use the normal functions for handling new groups, and not do anything
1088 special.
1089
1090
1091 @node The Server is Down
1092 @section The Server is Down
1093 @cindex server errors
1094
1095 If the default server is down, gnus will understandably have some
1096 problems starting.  However, if you have some mail groups in addition to
1097 the news groups, you may want to start gnus anyway.
1098
1099 Gnus, being the trusting sort of program, will ask whether to proceed
1100 without a native select method if that server can't be contacted.  This
1101 will happen whether the server doesn't actually exist (i.e., you have
1102 given the wrong address) or the server has just momentarily taken ill
1103 for some reason or other.  If you decide to continue and have no foreign
1104 groups, you'll find it difficult to actually do anything in the group
1105 buffer.  But, hey, that's your problem.  Blllrph!
1106
1107 @findex gnus-no-server
1108 @kindex M-x gnus-no-server
1109 @c @head
1110 If you know that the server is definitely down, or you just want to read
1111 your mail without bothering with the server at all, you can use the
1112 @code{gnus-no-server} command to start gnus.  That might come in handy
1113 if you're in a hurry as well.  This command will not attempt to contact
1114 your primary server---instead, it will just activate all groups on level
1115 1 and 2.  (You should preferably keep no native groups on those two
1116 levels.) Also @pxref{Group Levels}.
1117
1118
1119 @node Slave Gnusae
1120 @section Slave Gnusae
1121 @cindex slave
1122
1123 You might want to run more than one Emacs with more than one gnus at the
1124 same time.  If you are using different @file{.newsrc} files (e.g., if you
1125 are using the two different gnusae to read from two different servers),
1126 that is no problem whatsoever.  You just do it.
1127
1128 The problem appears when you want to run two Gnusae that use the same
1129 @file{.newsrc} file.
1130
1131 To work around that problem some, we here at the Think-Tank at the gnus
1132 Towers have come up with a new concept: @dfn{Masters} and
1133 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1134 taken out a copyright on those words.  If you wish to use those words in
1135 conjunction with each other, you have to send $1 per usage instance to
1136 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1137 Applications}) will be much more expensive, of course.)
1138
1139 @findex gnus-slave
1140 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1141 however you do it).  Each subsequent slave gnusae should be started with
1142 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1143 files, but instead save @dfn{slave files} that contain information only
1144 on what groups have been read in the slave session.  When a master gnus
1145 starts, it will read (and delete) these slave files, incorporating all
1146 information from them.  (The slave files will be read in the sequence
1147 they were created, so the latest changes will have precedence.)
1148
1149 Information from the slave files has, of course, precedence over the
1150 information in the normal (i.e., master) @file{.newsrc} file.
1151
1152 If the @file{.newsrc*} files have not been saved in the master when the
1153 slave starts, you may be prompted as to whether to read an auto-save
1154 file.  If you answer ``yes'', the unsaved changes to the master will be
1155 incorporated into the slave.  If you answer ``no'', the slave may see some
1156 messages as unread that have been read in the master.
1157
1158 @node Fetching a Group
1159 @section Fetching a Group
1160 @cindex fetching a group
1161
1162 @findex gnus-fetch-group
1163 It is sometimes convenient to be able to just say ``I want to read this
1164 group and I don't care whether gnus has been started or not''.  This is
1165 perhaps more useful for people who write code than for users, but the
1166 command @code{gnus-fetch-group} provides this functionality in any case.
1167 It takes the group name as a parameter.
1168
1169
1170 @node New Groups
1171 @section New Groups
1172 @cindex new groups
1173 @cindex subscription
1174
1175 @vindex gnus-check-new-newsgroups
1176 If you are satisfied that you really never want to see any new groups,
1177 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1178 also save you some time at startup.  Even if this variable is
1179 @code{nil}, you can always subscribe to the new groups just by pressing
1180 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1181 is @code{ask-server} by default.  If you set this variable to
1182 @code{always}, then Gnus will query the back ends for new groups even
1183 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1184
1185 @menu
1186 * Checking New Groups::         Determining what groups are new.
1187 * Subscription Methods::        What Gnus should do with new groups.
1188 * Filtering New Groups::        Making Gnus ignore certain new groups.
1189 @end menu
1190
1191
1192 @node Checking New Groups
1193 @subsection Checking New Groups
1194
1195 Gnus normally determines whether a group is new or not by comparing the
1196 list of groups from the active file(s) with the lists of subscribed and
1197 dead groups.  This isn't a particularly fast method.  If
1198 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1199 server for new groups since the last time.  This is both faster and
1200 cheaper.  This also means that you can get rid of the list of killed
1201 groups altogether, so you may set @code{gnus-save-killed-list} to
1202 @code{nil}, which will save time both at startup, at exit, and all over.
1203 Saves disk space, too.  Why isn't this the default, then?
1204 Unfortunately, not all servers support this command.
1205
1206 I bet I know what you're thinking now: How do I find out whether my
1207 server supports @code{ask-server}?  No?  Good, because I don't have a
1208 fail-safe answer.  I would suggest just setting this variable to
1209 @code{ask-server} and see whether any new groups appear within the next
1210 few days.  If any do, then it works.  If none do, then it doesn't
1211 work.  I could write a function to make gnus guess whether the server
1212 supports @code{ask-server}, but it would just be a guess.  So I won't.
1213 You could @code{telnet} to the server and say @code{HELP} and see
1214 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1215 it does, then it might work.  (But there are servers that lists
1216 @samp{NEWGROUPS} without supporting the function properly.)
1217
1218 This variable can also be a list of select methods.  If so, gnus will
1219 issue an @code{ask-server} command to each of the select methods, and
1220 subscribe them (or not) using the normal methods.  This might be handy
1221 if you are monitoring a few servers for new groups.  A side effect is
1222 that startup will take much longer, so you can meditate while waiting.
1223 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1224
1225
1226 @node Subscription Methods
1227 @subsection Subscription Methods
1228
1229 @vindex gnus-subscribe-newsgroup-method
1230 What gnus does when it encounters a new group is determined by the
1231 @code{gnus-subscribe-newsgroup-method} variable.
1232
1233 This variable should contain a function.  This function will be called
1234 with the name of the new group as the only parameter.
1235
1236 Some handy pre-fab functions are:
1237
1238 @table @code
1239
1240 @item gnus-subscribe-zombies
1241 @vindex gnus-subscribe-zombies
1242 Make all new groups zombies.  This is the default.  You can browse the
1243 zombies later (with @kbd{A z}) and either kill them all off properly
1244 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1245
1246 @item gnus-subscribe-randomly
1247 @vindex gnus-subscribe-randomly
1248 Subscribe all new groups in arbitrary order.  This really means that all
1249 new groups will be added at ``the top'' of the group buffer.
1250
1251 @item gnus-subscribe-alphabetically
1252 @vindex gnus-subscribe-alphabetically
1253 Subscribe all new groups in alphabetical order.
1254
1255 @item gnus-subscribe-hierarchically
1256 @vindex gnus-subscribe-hierarchically
1257 Subscribe all new groups hierarchically.  The difference between this
1258 function and @code{gnus-subscribe-alphabetically} is slight.
1259 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1260 alphabetical fashion, while this function will enter groups into its
1261 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1262 @samp{comp} hierarchy, this function will not mess that configuration
1263 up.  Or something like that.
1264
1265 @item gnus-subscribe-interactively
1266 @vindex gnus-subscribe-interactively
1267 Subscribe new groups interactively.  This means that gnus will ask
1268 you about @strong{all} new groups.  The groups you choose to subscribe
1269 to will be subscribed hierarchically.
1270
1271 @item gnus-subscribe-killed
1272 @vindex gnus-subscribe-killed
1273 Kill all new groups.
1274
1275 @item gnus-subscribe-topics
1276 @vindex gnus-subscribe-topics
1277 Put the groups into the topic that has a matching @code{subscribe} topic
1278 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1279 topic parameter that looks like
1280
1281 @example
1282 "nnslashdot"
1283 @end example
1284
1285 will mean that all groups that match that regex will be subscribed under
1286 that topic.
1287
1288 If no topics match the groups, the groups will be subscribed in the
1289 top-level topic.
1290
1291 @end table
1292
1293 @vindex gnus-subscribe-hierarchical-interactive
1294 A closely related variable is
1295 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1296 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1297 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1298 will ask you for each sub-hierarchy whether you want to descend the
1299 hierarchy or not.
1300
1301 One common mistake is to set the variable a few paragraphs above
1302 (@code{gnus-subscribe-newsgroup-method}) to
1303 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1304 will not work.  This is ga-ga.  So don't do it.
1305
1306
1307 @node Filtering New Groups
1308 @subsection Filtering New Groups
1309
1310 A nice and portable way to control which new newsgroups should be
1311 subscribed (or ignored) is to put an @dfn{options} line at the start of
1312 the @file{.newsrc} file.  Here's an example:
1313
1314 @example
1315 options -n !alt.all !rec.all sci.all
1316 @end example
1317
1318 @vindex gnus-subscribe-options-newsgroup-method
1319 This line obviously belongs to a serious-minded intellectual scientific
1320 person (or she may just be plain old boring), because it says that all
1321 groups that have names beginning with @samp{alt} and @samp{rec} should
1322 be ignored, and all groups with names beginning with @samp{sci} should
1323 be subscribed.  Gnus will not use the normal subscription method for
1324 subscribing these groups.
1325 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1326 variable defaults to @code{gnus-subscribe-alphabetically}.
1327
1328 @vindex gnus-options-not-subscribe
1329 @vindex gnus-options-subscribe
1330 If you don't want to mess with your @file{.newsrc} file, you can just
1331 set the two variables @code{gnus-options-subscribe} and
1332 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1333 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1334 and if the new group matches the former, it will be unconditionally
1335 subscribed, and if it matches the latter, it will be ignored.
1336
1337 @vindex gnus-auto-subscribed-groups
1338 Yet another variable that meddles here is
1339 @code{gnus-auto-subscribed-groups}.  It works exactly like
1340 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1341 thought it would be nice to have two of these.  This variable is more
1342 meant for setting some ground rules, while the other variable is used
1343 more for user fiddling.  By default this variable makes all new groups
1344 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1345 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1346 subscribed.  If you don't like that, just set this variable to
1347 @code{nil}.
1348
1349 New groups that match this regexp are subscribed using
1350 @code{gnus-subscribe-options-newsgroup-method}.
1351
1352
1353 @node Changing Servers
1354 @section Changing Servers
1355 @cindex changing servers
1356
1357 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1358 This happens very rarely, but perhaps you change jobs, or one server is
1359 very flaky and you want to use another.
1360
1361 Changing the server is pretty easy, right?  You just change
1362 @code{gnus-select-method} to point to the new server?
1363
1364 @emph{Wrong!}
1365
1366 Article numbers are not (in any way) kept synchronized between different
1367 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1368 you have read is by keeping track of article numbers.  So when you
1369 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1370 worthless.
1371
1372 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1373 file from one server to another.  They all have one thing in
1374 common---they take a looong time to run.  You don't want to use these
1375 functions more than absolutely necessary.
1376
1377 @kindex M-x gnus-change-server
1378 @findex gnus-change-server
1379 If you have access to both servers, Gnus can request the headers for all
1380 the articles you have read and compare @code{Message-ID}s and map the
1381 article numbers of the read articles and article marks.  The @kbd{M-x
1382 gnus-change-server} command will do this for all your native groups.  It
1383 will prompt for the method you want to move to.
1384
1385 @kindex M-x gnus-group-move-group-to-server
1386 @findex gnus-group-move-group-to-server
1387 You can also move individual groups with the @kbd{M-x
1388 gnus-group-move-group-to-server} command.  This is useful if you want to
1389 move a (foreign) group from one server to another.
1390
1391 @kindex M-x gnus-group-clear-data-on-native-groups
1392 @findex gnus-group-clear-data-on-native-groups
1393 If you don't have access to both the old and new server, all your marks
1394 and read ranges have become worthless.  You can use the @kbd{M-x
1395 gnus-group-clear-data-on-native-groups} command to clear out all data
1396 that you have on your native groups.  Use with caution.
1397
1398 @kindex M-x gnus-group-clear-data
1399 @findex gnus-group-clear-data
1400 Clear the data from the current group only---nix out marks and the
1401 list of read articles (@code{gnus-group-clear-data}).
1402
1403 After changing servers, you @strong{must} move the cache hierarchy away,
1404 since the cached articles will have wrong article numbers, which will
1405 affect which articles Gnus thinks are read.
1406 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1407 to have it done automatically; for @code{gnus-group-clear-data}, you
1408 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1409 cache for all groups).
1410
1411
1412 @node Startup Files
1413 @section Startup Files
1414 @cindex startup files
1415 @cindex .newsrc
1416 @cindex .newsrc.el
1417 @cindex .newsrc.eld
1418
1419 Now, you all know about the @file{.newsrc} file.  All subscription
1420 information is traditionally stored in this file.
1421
1422 Things got a bit more complicated with @sc{gnus}.  In addition to
1423 keeping the @file{.newsrc} file updated, it also used a file called
1424 @file{.newsrc.el} for storing all the information that didn't fit into
1425 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1426 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1427 files was the most recently saved, which enabled people to swap between
1428 @sc{gnus} and other newsreaders.
1429
1430 That was kinda silly, so Gnus went one better: In addition to the
1431 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1432 @file{.newsrc.eld}.  It will read whichever of these files that are most
1433 recent, but it will never write a @file{.newsrc.el} file.  You should
1434 never delete the @file{.newsrc.eld} file---it contains much information
1435 not stored in the @file{.newsrc} file.
1436
1437 @vindex gnus-save-newsrc-file
1438 @vindex gnus-read-newsrc-file
1439 You can turn off writing the @file{.newsrc} file by setting
1440 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1441 the file and save some space, as well as exiting from gnus faster.
1442 However, this will make it impossible to use other newsreaders than
1443 gnus.  But hey, who would want to, right?  Similarly, setting
1444 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1445 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1446 convenient if you have a tendency to use Netscape once in a while.
1447
1448 @vindex gnus-save-killed-list
1449 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1450 will not save the list of killed groups to the startup file.  This will
1451 save both time (when starting and quitting) and space (on disk).  It
1452 will also mean that Gnus has no record of what groups are new or old,
1453 so the automatic new groups subscription methods become meaningless.
1454 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1455 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1456 Groups}).  This variable can also be a regular expression.  If that's
1457 the case, remove all groups that do not match this regexp before
1458 saving.  This can be useful in certain obscure situations that involve
1459 several servers where not all servers support @code{ask-server}.
1460
1461 @vindex gnus-startup-file
1462 @vindex gnus-backup-startup-file
1463 @vindex version-control
1464 The @code{gnus-startup-file} variable says where the startup files are.
1465 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1466 file being whatever that one is, with a @samp{.eld} appended.
1467 If you want version control for this file, set
1468 @code{gnus-backup-startup-file}.  It respects the same values as the
1469 @code{version-control} variable.
1470
1471 @vindex gnus-save-newsrc-hook
1472 @vindex gnus-save-quick-newsrc-hook
1473 @vindex gnus-save-standard-newsrc-hook
1474 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1475 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1476 saving the @file{.newsrc.eld} file, and
1477 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1478 @file{.newsrc} file.  The latter two are commonly used to turn version
1479 control on or off.  Version control is on by default when saving the
1480 startup files.  If you want to turn backup creation off, say something like:
1481
1482 @lisp
1483 (defun turn-off-backup ()
1484   (set (make-local-variable 'backup-inhibited) t))
1485
1486 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1487 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1488 @end lisp
1489
1490 @vindex gnus-init-file
1491 @vindex gnus-site-init-file
1492 When gnus starts, it will read the @code{gnus-site-init-file}
1493 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1494 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1495 and can be used to avoid cluttering your @file{~/.emacs} and
1496 @file{site-init} files with gnus stuff.  Gnus will also check for files
1497 with the same names as these, but with @file{.elc} and @file{.el}
1498 suffixes.  In other words, if you have set @code{gnus-init-file} to
1499 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1500 and finally @file{~/.gnus} (in this order).
1501
1502
1503
1504 @node Auto Save
1505 @section Auto Save
1506 @cindex dribble file
1507 @cindex auto-save
1508
1509 Whenever you do something that changes the gnus data (reading articles,
1510 catching up, killing/subscribing groups), the change is added to a
1511 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1512 Emacs way.  If your Emacs should crash before you have saved the
1513 @file{.newsrc} files, all changes you have made can be recovered from
1514 this file.
1515
1516 If gnus detects this file at startup, it will ask the user whether to
1517 read it.  The auto save file is deleted whenever the real startup file is
1518 saved.
1519
1520 @vindex gnus-use-dribble-file
1521 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1522 maintain a dribble buffer.  The default is @code{t}.
1523
1524 @vindex gnus-dribble-directory
1525 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1526 this variable is @code{nil}, which it is by default, gnus will dribble
1527 into the directory where the @file{.newsrc} file is located.  (This is
1528 normally the user's home directory.)  The dribble file will get the same
1529 file permissions as the @file{.newsrc} file.
1530
1531 @vindex gnus-always-read-dribble-file
1532 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1533 read the dribble file on startup without querying the user.
1534
1535
1536 @node The Active File
1537 @section The Active File
1538 @cindex active file
1539 @cindex ignored groups
1540
1541 When gnus starts, or indeed whenever it tries to determine whether new
1542 articles have arrived, it reads the active file.  This is a very large
1543 file that lists all the active groups and articles on the server.
1544
1545 @vindex gnus-ignored-newsgroups
1546 Before examining the active file, gnus deletes all lines that match the
1547 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1548 any groups with bogus names, but you can use this variable to make gnus
1549 ignore hierarchies you aren't ever interested in.  However, this is not
1550 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1551 Groups} for an overview of other variables that can be used instead.
1552
1553 @c This variable is
1554 @c @code{nil} by default, and will slow down active file handling somewhat
1555 @c if you set it to anything else.
1556
1557 @vindex gnus-read-active-file
1558 @c @head
1559 The active file can be rather Huge, so if you have a slow network, you
1560 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1561 reading the active file.  This variable is @code{some} by default.
1562
1563 Gnus will try to make do by getting information just on the groups that
1564 you actually subscribe to.
1565
1566 Note that if you subscribe to lots and lots of groups, setting this
1567 variable to @code{nil} will probably make gnus slower, not faster.  At
1568 present, having this variable @code{nil} will slow gnus down
1569 considerably, unless you read news over a 2400 baud modem.
1570
1571 This variable can also have the value @code{some}.  Gnus will then
1572 attempt to read active info only on the subscribed groups.  On some
1573 servers this is quite fast (on sparkling, brand new INN servers that
1574 support the @code{LIST ACTIVE group} command), on others this isn't fast
1575 at all.  In any case, @code{some} should be faster than @code{nil}, and
1576 is certainly faster than @code{t} over slow lines.
1577
1578 Some news servers (old versions of Leafnode and old versions of INN, for
1579 instance) do not support the @code{LIST ACTIVE group}.  For these
1580 servers, @code{nil} is probably the most efficient value for this
1581 variable.
1582
1583 If this variable is @code{nil}, gnus will ask for group info in total
1584 lock-step, which isn't very fast.  If it is @code{some} and you use an
1585 @acronym{NNTP} server, gnus will pump out commands as fast as it can, and
1586 read all the replies in one swoop.  This will normally result in better
1587 performance, but if the server does not support the aforementioned
1588 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1589
1590 If you think that starting up Gnus takes too long, try all the three
1591 different values for this variable and see what works best for you.
1592
1593 In any case, if you use @code{some} or @code{nil}, you should definitely
1594 kill all groups that you aren't interested in to speed things up.
1595
1596 Note that this variable also affects active file retrieval from
1597 secondary select methods.
1598
1599
1600 @node Startup Variables
1601 @section Startup Variables
1602
1603 @table @code
1604
1605 @item gnus-load-hook
1606 @vindex gnus-load-hook
1607 A hook run while gnus is being loaded.  Note that this hook will
1608 normally be run just once in each Emacs session, no matter how many
1609 times you start gnus.
1610
1611 @item gnus-before-startup-hook
1612 @vindex gnus-before-startup-hook
1613 A hook run after starting up gnus successfully.
1614
1615 @item gnus-startup-hook
1616 @vindex gnus-startup-hook
1617 A hook run as the very last thing after starting up gnus
1618
1619 @item gnus-started-hook
1620 @vindex gnus-started-hook
1621 A hook that is run as the very last thing after starting up gnus
1622 successfully.
1623
1624 @item gnus-setup-news-hook
1625 @vindex gnus-setup-news-hook
1626 A hook that is run after reading the @file{.newsrc} file(s), but before
1627 generating the group buffer.
1628
1629 @item gnus-check-bogus-newsgroups
1630 @vindex gnus-check-bogus-newsgroups
1631 If non-@code{nil}, gnus will check for and delete all bogus groups at
1632 startup.  A @dfn{bogus group} is a group that you have in your
1633 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1634 bogus groups can take quite a while, so to save time and resources it's
1635 best to leave this option off, and do the checking for bogus groups once
1636 in a while from the group buffer instead (@pxref{Group Maintenance}).
1637
1638 @item gnus-inhibit-startup-message
1639 @vindex gnus-inhibit-startup-message
1640 If non-@code{nil}, the startup message won't be displayed.  That way,
1641 your boss might not notice as easily that you are reading news instead
1642 of doing your job.  Note that this variable is used before
1643 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1644
1645 @item gnus-no-groups-message
1646 @vindex gnus-no-groups-message
1647 Message displayed by gnus when no groups are available.
1648
1649 @item gnus-play-startup-jingle
1650 @vindex gnus-play-startup-jingle
1651 If non-@code{nil}, play the gnus jingle at startup.
1652
1653 @item gnus-startup-jingle
1654 @vindex gnus-startup-jingle
1655 Jingle to be played if the above variable is non-@code{nil}.  The
1656 default is @samp{Tuxedomoon.Jingle4.au}.
1657
1658 @end table
1659
1660
1661 @node Group Buffer
1662 @chapter Group Buffer
1663 @cindex group buffer
1664
1665 @c Alex Schroeder suggests to rearrange this as follows:
1666 @c
1667 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1668 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1669 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1670 @c   7. Group Score, 8. Group Buffer Format
1671 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1672 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1673 @c <kensanata> First, "Gnus considers groups... (default 9)."
1674 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1675 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1676 @c <kensanata> Then expand the next paragraph or add some more to it.
1677 @c    This short one sentence explains levels 1 and 2, therefore I understand
1678 @c    that I should keep important news at 3 and boring news at 4.
1679 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1680 @c    Maybe keep those that you don't want to read temporarily at 6,
1681 @c    those that you never want to read at 8, those that offend your
1682 @c    human rights at 9...
1683
1684
1685 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1686 is the first buffer shown when gnus starts, and will never be killed as
1687 long as gnus is active.
1688
1689 @iftex
1690 @iflatex
1691 \gnusfigure{The Group Buffer}{320}{
1692 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1693 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1694 \put(120,38){\vector(1,2){10}}
1695 \put(40,60){\makebox(0,0)[r]{Mode line}}
1696 \put(40,58){\vector(1,0){30}}
1697 \put(200,28){\makebox(0,0)[t]{Native select method}}
1698 \put(200,26){\vector(-1,2){15}}
1699 }
1700 @end iflatex
1701 @end iftex
1702
1703 @menu
1704 * Group Buffer Format::         Information listed and how you can change it.
1705 * Group Maneuvering::           Commands for moving in the group buffer.
1706 * Selecting a Group::           Actually reading news.
1707 * Subscription Commands::       Unsubscribing, killing, subscribing.
1708 * Group Data::                  Changing the info for a group.
1709 * Group Levels::                Levels? What are those, then?
1710 * Group Score::                 A mechanism for finding out what groups you like.
1711 * Marking Groups::              You can mark groups for later processing.
1712 * Foreign Groups::              Creating and editing groups.
1713 * Group Parameters::            Each group may have different parameters set.
1714 * Listing Groups::              Gnus can list various subsets of the groups.
1715 * Sorting Groups::              Re-arrange the group order.
1716 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1717 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1718 * Exiting Gnus::                Stop reading news and get some work done.
1719 * Group Topics::                A folding group mode divided into topics.
1720 * Misc Group Stuff::            Other stuff that you can to do.
1721 @end menu
1722
1723
1724 @node Group Buffer Format
1725 @section Group Buffer Format
1726
1727 @menu
1728 * Group Line Specification::    Deciding how the group buffer is to look.
1729 * Group Mode Line Specification::  The group buffer mode line.
1730 * Group Highlighting::          Having nice colors in the group buffer.
1731 @end menu
1732
1733
1734 @node Group Line Specification
1735 @subsection Group Line Specification
1736 @cindex group buffer format
1737
1738 The default format of the group buffer is nice and dull, but you can
1739 make it as exciting and ugly as you feel like.
1740
1741 Here's a couple of example group lines:
1742
1743 @example
1744      25: news.announce.newusers
1745  *    0: alt.fan.andrea-dworkin
1746 @end example
1747
1748 Quite simple, huh?
1749
1750 You can see that there are 25 unread articles in
1751 @samp{news.announce.newusers}.  There are no unread articles, but some
1752 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1753 asterisk at the beginning of the line?).
1754
1755 @vindex gnus-group-line-format
1756 You can change that format to whatever you want by fiddling with the
1757 @code{gnus-group-line-format} variable.  This variable works along the
1758 lines of a @code{format} specification, which is pretty much the same as
1759 a @code{printf} specifications, for those of you who use (feh!) C.
1760 @xref{Formatting Variables}.
1761
1762 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1763
1764 There should always be a colon on the line; the cursor always moves to
1765 the colon after performing an operation.  @xref{Positioning
1766 Point}.  Nothing else is required---not even the group name.  All
1767 displayed text is just window dressing, and is never examined by Gnus.
1768 Gnus stores all real information it needs using text properties.
1769
1770 (Note that if you make a really strange, wonderful, spreadsheet-like
1771 layout, everybody will believe you are hard at work with the accounting
1772 instead of wasting time reading news.)
1773
1774 Here's a list of all available format characters:
1775
1776 @table @samp
1777
1778 @item M
1779 An asterisk if the group only has marked articles.
1780
1781 @item S
1782 Whether the group is subscribed.
1783
1784 @item L
1785 Level of subscribedness.
1786
1787 @item N
1788 Number of unread articles.
1789
1790 @item I
1791 Number of dormant articles.
1792
1793 @item T
1794 Number of ticked articles.
1795
1796 @item R
1797 Number of read articles.
1798
1799 @item U
1800 Number of unseen articles.
1801
1802 @item t
1803 Estimated total number of articles.  (This is really @var{max-number}
1804 minus @var{min-number} plus 1.)
1805
1806 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1807 efficient access to @var{max-number} and @var{min-number} but getting
1808 the true unread message count is not possible efficiently.  For
1809 hysterical raisins, even the mail back ends, where the true number of
1810 unread messages might be available efficiently, use the same limited
1811 interface.  To remove this restriction from Gnus means that the back
1812 end interface has to be changed, which is not an easy job.  If you
1813 want to work on this, please contact the Gnus mailing list.
1814
1815 @item y
1816 Number of unread, unticked, non-dormant articles.
1817
1818 @item i
1819 Number of ticked and dormant articles.
1820
1821 @item g
1822 Full group name.
1823
1824 @item G
1825 Group name.
1826
1827 @item C
1828 Group comment (@pxref{Group Parameters}) or group name if there is no
1829 comment element in the group parameters.
1830
1831 @item D
1832 Newsgroup description.  You need to read the group descriptions
1833 before these will appear, and to do that, you either have to set
1834 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1835 command.
1836
1837 @item o
1838 @samp{m} if moderated.
1839
1840 @item O
1841 @samp{(m)} if moderated.
1842
1843 @item s
1844 Select method.
1845
1846 @item B
1847 If the summary buffer for the group is open or not.
1848
1849 @item n
1850 Select from where.
1851
1852 @item z
1853 A string that looks like @samp{<%s:%n>} if a foreign select method is
1854 used.
1855
1856 @item P
1857 Indentation based on the level of the topic (@pxref{Group Topics}).
1858
1859 @item c
1860 @vindex gnus-group-uncollapsed-levels
1861 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1862 variable says how many levels to leave at the end of the group name.
1863 The default is 1---this will mean that group names like
1864 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1865
1866 @item m
1867 @vindex gnus-new-mail-mark
1868 @cindex %
1869 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1870 the group lately.
1871
1872 @item p
1873 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1874
1875 @item d
1876 A string that says when you last read the group (@pxref{Group
1877 Timestamp}).
1878
1879 @item u
1880 User defined specifier.  The next character in the format string should
1881 be a letter.  Gnus will call the function
1882 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1883 following @samp{%u}.  The function will be passed a single dummy
1884 parameter as argument.  The function should return a string, which will
1885 be inserted into the buffer just like information from any other
1886 specifier.
1887 @end table
1888
1889 @cindex *
1890 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1891 if no info is available---for instance, if it is a non-activated foreign
1892 group, or a bogus native group.
1893
1894
1895 @node Group Mode Line Specification
1896 @subsection Group Mode Line Specification
1897 @cindex group mode line
1898
1899 @vindex gnus-group-mode-line-format
1900 The mode line can be changed by setting
1901 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1902 doesn't understand that many format specifiers:
1903
1904 @table @samp
1905 @item S
1906 The native news server.
1907 @item M
1908 The native select method.
1909 @end table
1910
1911
1912 @node Group Highlighting
1913 @subsection Group Highlighting
1914 @cindex highlighting
1915 @cindex group highlighting
1916
1917 @vindex gnus-group-highlight
1918 Highlighting in the group buffer is controlled by the
1919 @code{gnus-group-highlight} variable.  This is an alist with elements
1920 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1921 something non-@code{nil}, the @var{face} will be used on the line.
1922
1923 Here's an example value for this variable that might look nice if the
1924 background is dark:
1925
1926 @lisp
1927 (cond (window-system
1928        (setq custom-background-mode 'light)
1929        (defface my-group-face-1
1930          '((t (:foreground "Red" :bold t))) "First group face")
1931        (defface my-group-face-2
1932          '((t (:foreground "DarkSeaGreen4" :bold t)))
1933          "Second group face")
1934        (defface my-group-face-3
1935          '((t (:foreground "Green4" :bold t))) "Third group face")
1936        (defface my-group-face-4
1937          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1938        (defface my-group-face-5
1939          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1940
1941 (setq gnus-group-highlight
1942       '(((> unread 200) . my-group-face-1)
1943         ((and (< level 3) (zerop unread)) . my-group-face-2)
1944         ((< level 3) . my-group-face-3)
1945         ((zerop unread) . my-group-face-4)
1946         (t . my-group-face-5)))
1947 @end lisp
1948
1949 Also @pxref{Faces and Fonts}.
1950
1951 Variables that are dynamically bound when the forms are evaluated
1952 include:
1953
1954 @table @code
1955 @item group
1956 The group name.
1957 @item unread
1958 The number of unread articles in the group.
1959 @item method
1960 The select method.
1961 @item mailp
1962 Whether the group is a mail group.
1963 @item level
1964 The level of the group.
1965 @item score
1966 The score of the group.
1967 @item ticked
1968 The number of ticked articles in the group.
1969 @item total
1970 The total number of articles in the group.  Or rather,
1971 @var{max-number} minus @var{min-number} plus one.
1972 @item topic
1973 When using the topic minor mode, this variable is bound to the current
1974 topic being inserted.
1975 @end table
1976
1977 When the forms are @code{eval}ed, point is at the beginning of the line
1978 of the group in question, so you can use many of the normal gnus
1979 functions for snarfing info on the group.
1980
1981 @vindex gnus-group-update-hook
1982 @findex gnus-group-highlight-line
1983 @code{gnus-group-update-hook} is called when a group line is changed.
1984 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1985 calls @code{gnus-group-highlight-line} by default.
1986
1987
1988 @node Group Maneuvering
1989 @section Group Maneuvering
1990 @cindex group movement
1991
1992 All movement commands understand the numeric prefix and will behave as
1993 expected, hopefully.
1994
1995 @table @kbd
1996
1997 @item n
1998 @kindex n (Group)
1999 @findex gnus-group-next-unread-group
2000 Go to the next group that has unread articles
2001 (@code{gnus-group-next-unread-group}).
2002
2003 @item p
2004 @itemx DEL
2005 @kindex DEL (Group)
2006 @kindex p (Group)
2007 @findex gnus-group-prev-unread-group
2008 Go to the previous group that has unread articles
2009 (@code{gnus-group-prev-unread-group}).
2010
2011 @item N
2012 @kindex N (Group)
2013 @findex gnus-group-next-group
2014 Go to the next group (@code{gnus-group-next-group}).
2015
2016 @item P
2017 @kindex P (Group)
2018 @findex gnus-group-prev-group
2019 Go to the previous group (@code{gnus-group-prev-group}).
2020
2021 @item M-n
2022 @kindex M-n (Group)
2023 @findex gnus-group-next-unread-group-same-level
2024 Go to the next unread group on the same (or lower) level
2025 (@code{gnus-group-next-unread-group-same-level}).
2026
2027 @item M-p
2028 @kindex M-p (Group)
2029 @findex gnus-group-prev-unread-group-same-level
2030 Go to the previous unread group on the same (or lower) level
2031 (@code{gnus-group-prev-unread-group-same-level}).
2032 @end table
2033
2034 Three commands for jumping to groups:
2035
2036 @table @kbd
2037
2038 @item j
2039 @kindex j (Group)
2040 @findex gnus-group-jump-to-group
2041 Jump to a group (and make it visible if it isn't already)
2042 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2043 like living groups.
2044
2045 @item ,
2046 @kindex , (Group)
2047 @findex gnus-group-best-unread-group
2048 Jump to the unread group with the lowest level
2049 (@code{gnus-group-best-unread-group}).
2050
2051 @item .
2052 @kindex . (Group)
2053 @findex gnus-group-first-unread-group
2054 Jump to the first group with unread articles
2055 (@code{gnus-group-first-unread-group}).
2056 @end table
2057
2058 @vindex gnus-group-goto-unread
2059 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2060 commands will move to the next group, not the next unread group.  Even
2061 the commands that say they move to the next unread group.  The default
2062 is @code{t}.
2063
2064
2065 @node Selecting a Group
2066 @section Selecting a Group
2067 @cindex group selection
2068
2069 @table @kbd
2070
2071 @item SPACE
2072 @kindex SPACE (Group)
2073 @findex gnus-group-read-group
2074 Select the current group, switch to the summary buffer and display the
2075 first unread article (@code{gnus-group-read-group}).  If there are no
2076 unread articles in the group, or if you give a non-numerical prefix to
2077 this command, gnus will offer to fetch all the old articles in this
2078 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2079 determines the number of articles Gnus will fetch.  If @var{n} is
2080 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2081 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2082
2083 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2084 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2085 - 4 2 SPC} fetches the 42 oldest ones.
2086
2087 When you are in the group (in the Summary buffer), you can type
2088 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2089 ones.
2090
2091 @item RET
2092 @kindex RET (Group)
2093 @findex gnus-group-select-group
2094 Select the current group and switch to the summary buffer
2095 (@code{gnus-group-select-group}).  Takes the same arguments as
2096 @code{gnus-group-read-group}---the only difference is that this command
2097 does not display the first unread article automatically upon group
2098 entry.
2099
2100 @item M-RET
2101 @kindex M-RET (Group)
2102 @findex gnus-group-quick-select-group
2103 This does the same as the command above, but tries to do it with the
2104 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2105 scoring/killing will be performed, there will be no highlights and no
2106 expunging.  This might be useful if you're in a real hurry and have to
2107 enter some humongous group.  If you give a 0 prefix to this command
2108 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2109 which is useful if you want to toggle threading before generating the
2110 summary buffer (@pxref{Summary Generation Commands}).
2111
2112 @item M-SPACE
2113 @kindex M-SPACE (Group)
2114 @findex gnus-group-visible-select-group
2115 This is yet one more command that does the same as the @kbd{RET}
2116 command, but this one does it without expunging and hiding dormants
2117 (@code{gnus-group-visible-select-group}).
2118
2119 @item C-M-RET
2120 @kindex C-M-RET (Group)
2121 @findex gnus-group-select-group-ephemerally
2122 Finally, this command selects the current group ephemerally without
2123 doing any processing of its contents
2124 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2125 turned off.  Everything you do in the group after selecting it in this
2126 manner will have no permanent effects.
2127
2128 @end table
2129
2130 @vindex gnus-large-newsgroup
2131 The @code{gnus-large-newsgroup} variable says what Gnus should
2132 consider to be a big group.  If it is @code{nil}, no groups are
2133 considered big.  The default value is 200.  If the group has more
2134 (unread and/or ticked) articles than this, gnus will query the user
2135 before entering the group.  The user can then specify how many
2136 articles should be fetched from the server.  If the user specifies a
2137 negative number (@var{-n}), the @var{n} oldest articles will be
2138 fetched.  If it is positive, the @var{n} articles that have arrived
2139 most recently will be fetched.
2140
2141 @vindex gnus-large-ephemeral-newsgroup
2142 @code{gnus-large-ephemeral-newsgroup} is the same as
2143 @code{gnus-large-newsgroup}, but is only used for ephemeral
2144 newsgroups.
2145
2146 @vindex gnus-select-group-hook
2147 @vindex gnus-auto-select-first
2148 @vindex gnus-auto-select-subject
2149 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2150 automatically when entering a group with the @kbd{SPACE} command.
2151 Which article this is is controlled by the
2152 @code{gnus-auto-select-subject} variable.  Valid values for this
2153 variable is:
2154
2155 @table @code
2156
2157 @item unread
2158 Place point on the subject line of the first unread article.
2159
2160 @item first
2161 Place point on the subject line of the first article.
2162
2163 @item unseen
2164 Place point on the subject line of the first unseen article.
2165
2166 @item unseen-or-unread
2167 Place point on the subject line of the first unseen article, and if
2168 there is no such article, place point on the subject line of the first
2169 unread article.
2170
2171 @item best
2172 Place point on the subject line of the highest-scored unread article.
2173
2174 @end table
2175
2176 This variable can also be a function.  In that case, that function
2177 will be called to place point on a subject line.
2178
2179 If you want to prevent automatic selection in some group (say, in a
2180 binary group with Huge articles) you can set the
2181 @code{gnus-auto-select-first} variable to @code{nil} in
2182 @code{gnus-select-group-hook}, which is called when a group is
2183 selected.
2184
2185
2186 @node Subscription Commands
2187 @section Subscription Commands
2188 @cindex subscription
2189
2190 @table @kbd
2191
2192 @item S t
2193 @itemx u
2194 @kindex S t (Group)
2195 @kindex u (Group)
2196 @findex gnus-group-unsubscribe-current-group
2197 @c @icon{gnus-group-unsubscribe}
2198 Toggle subscription to the current group
2199 (@code{gnus-group-unsubscribe-current-group}).
2200
2201 @item S s
2202 @itemx U
2203 @kindex S s (Group)
2204 @kindex U (Group)
2205 @findex gnus-group-unsubscribe-group
2206 Prompt for a group to subscribe, and then subscribe it.  If it was
2207 subscribed already, unsubscribe it instead
2208 (@code{gnus-group-unsubscribe-group}).
2209
2210 @item S k
2211 @itemx C-k
2212 @kindex S k (Group)
2213 @kindex C-k (Group)
2214 @findex gnus-group-kill-group
2215 @c @icon{gnus-group-kill-group}
2216 Kill the current group (@code{gnus-group-kill-group}).
2217
2218 @item S y
2219 @itemx C-y
2220 @kindex S y (Group)
2221 @kindex C-y (Group)
2222 @findex gnus-group-yank-group
2223 Yank the last killed group (@code{gnus-group-yank-group}).
2224
2225 @item C-x C-t
2226 @kindex C-x C-t (Group)
2227 @findex gnus-group-transpose-groups
2228 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2229 really a subscription command, but you can use it instead of a
2230 kill-and-yank sequence sometimes.
2231
2232 @item S w
2233 @itemx C-w
2234 @kindex S w (Group)
2235 @kindex C-w (Group)
2236 @findex gnus-group-kill-region
2237 Kill all groups in the region (@code{gnus-group-kill-region}).
2238
2239 @item S z
2240 @kindex S z (Group)
2241 @findex gnus-group-kill-all-zombies
2242 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2243
2244 @item S C-k
2245 @kindex S C-k (Group)
2246 @findex gnus-group-kill-level
2247 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2248 These groups can't be yanked back after killing, so this command should
2249 be used with some caution.  The only time where this command comes in
2250 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2251 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2252 kill off all unsubscribed groups that do not have message numbers in the
2253 @file{.newsrc} file.
2254
2255 @end table
2256
2257 Also @pxref{Group Levels}.
2258
2259
2260 @node Group Data
2261 @section Group Data
2262
2263 @table @kbd
2264
2265 @item c
2266 @kindex c (Group)
2267 @findex gnus-group-catchup-current
2268 @vindex gnus-group-catchup-group-hook
2269 @c @icon{gnus-group-catchup-current}
2270 Mark all unticked articles in this group as read
2271 (@code{gnus-group-catchup-current}).
2272 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2273 the group buffer.
2274
2275 @item C
2276 @kindex C (Group)
2277 @findex gnus-group-catchup-current-all
2278 Mark all articles in this group, even the ticked ones, as read
2279 (@code{gnus-group-catchup-current-all}).
2280
2281 @item M-c
2282 @kindex M-c (Group)
2283 @findex gnus-group-clear-data
2284 Clear the data from the current group---nix out marks and the list of
2285 read articles (@code{gnus-group-clear-data}).
2286
2287 @item M-x gnus-group-clear-data-on-native-groups
2288 @kindex M-x gnus-group-clear-data-on-native-groups
2289 @findex gnus-group-clear-data-on-native-groups
2290 If you have switched from one @acronym{NNTP} server to another, all your marks
2291 and read ranges have become worthless.  You can use this command to
2292 clear out all data that you have on your native groups.  Use with
2293 caution.
2294
2295 @end table
2296
2297
2298 @node Group Levels
2299 @section Group Levels
2300 @cindex group level
2301 @cindex level
2302
2303 All groups have a level of @dfn{subscribedness}.  For instance, if a
2304 group is on level 2, it is more subscribed than a group on level 5.  You
2305 can ask gnus to just list groups on a given level or lower
2306 (@pxref{Listing Groups}), or to just check for new articles in groups on
2307 a given level or lower (@pxref{Scanning New Messages}).
2308
2309 Remember:  The higher the level of the group, the less important it is.
2310
2311 @table @kbd
2312
2313 @item S l
2314 @kindex S l (Group)
2315 @findex gnus-group-set-current-level
2316 Set the level of the current group.  If a numeric prefix is given, the
2317 next @var{n} groups will have their levels set.  The user will be
2318 prompted for a level.
2319 @end table
2320
2321 @vindex gnus-level-killed
2322 @vindex gnus-level-zombie
2323 @vindex gnus-level-unsubscribed
2324 @vindex gnus-level-subscribed
2325 Gnus considers groups from levels 1 to
2326 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2327 @code{gnus-level-subscribed} (exclusive) and
2328 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2329 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2330 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2331 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2332 same, but zombie and killed groups have no information on what articles
2333 you have read, etc, stored.  This distinction between dead and living
2334 groups isn't done because it is nice or clever, it is done purely for
2335 reasons of efficiency.
2336
2337 It is recommended that you keep all your mail groups (if any) on quite
2338 low levels (e.g. 1 or 2).
2339
2340 Maybe the following description of the default behavior of Gnus helps to
2341 understand what these levels are all about.  By default, Gnus shows you
2342 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2343 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2344 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2345 groups are hidden, in a way.
2346
2347 Zombie and killed groups are similar to unsubscribed groups in that they
2348 are hidden by default.  But they are different from subscribed and
2349 unsubscribed groups in that Gnus doesn't ask the news server for
2350 information (number of messages, number of unread messages) on zombie
2351 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2352 aren't interested in.  If most groups are killed, Gnus is faster.
2353
2354 Why does Gnus distinguish between zombie and killed groups?  Well, when
2355 a new group arrives on the server, Gnus by default makes it a zombie
2356 group.  This means that you are normally not bothered with new groups,
2357 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2358 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2359 list of killed groups.)
2360
2361 If you want to play with the level variables, you should show some care.
2362 Set them once, and don't touch them ever again.  Better yet, don't touch
2363 them at all unless you know exactly what you're doing.
2364
2365 @vindex gnus-level-default-unsubscribed
2366 @vindex gnus-level-default-subscribed
2367 Two closely related variables are @code{gnus-level-default-subscribed}
2368 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2369 which are the levels that new groups will be put on if they are
2370 (un)subscribed.  These two variables should, of course, be inside the
2371 relevant valid ranges.
2372
2373 @vindex gnus-keep-same-level
2374 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2375 will only move to groups of the same level (or lower).  In
2376 particular, going from the last article in one group to the next group
2377 will go to the next group of the same level (or lower).  This might be
2378 handy if you want to read the most important groups before you read the
2379 rest.
2380
2381 If this variable is @code{best}, Gnus will make the next newsgroup the
2382 one with the best level.
2383
2384 @vindex gnus-group-default-list-level
2385 All groups with a level less than or equal to
2386 @code{gnus-group-default-list-level} will be listed in the group buffer
2387 by default.
2388
2389 @vindex gnus-group-list-inactive-groups
2390 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2391 groups will be listed along with the unread groups.  This variable is
2392 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2393 listed.
2394
2395 @vindex gnus-group-use-permanent-levels
2396 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2397 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2398 use this level as the ``work'' level.
2399
2400 @vindex gnus-activate-level
2401 Gnus will normally just activate (i. e., query the server about) groups
2402 on level @code{gnus-activate-level} or less.  If you don't want to
2403 activate unsubscribed groups, for instance, you might set this variable
2404 to 5.  The default is 6.
2405
2406
2407 @node Group Score
2408 @section Group Score
2409 @cindex group score
2410 @cindex group rank
2411 @cindex rank
2412
2413 You would normally keep important groups on high levels, but that scheme
2414 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2415 group buffer according to how often you read groups, perhaps?  Within
2416 reason?
2417
2418 This is what @dfn{group score} is for.  You can have Gnus assign a score
2419 to each group through the mechanism described below.  You can then sort
2420 the group buffer based on this score.  Alternatively, you can sort on
2421 score and then level.  (Taken together, the level and the score is
2422 called the @dfn{rank} of the group.  A group that is on level 4 and has
2423 a score of 1 has a higher rank than a group on level 5 that has a score
2424 of 300.  (The level is the most significant part and the score is the
2425 least significant part.))
2426
2427 @findex gnus-summary-bubble-group
2428 If you want groups you read often to get higher scores than groups you
2429 read seldom you can add the @code{gnus-summary-bubble-group} function to
2430 the @code{gnus-summary-exit-hook} hook.  This will result (after
2431 sorting) in a bubbling sort of action.  If you want to see that in
2432 action after each summary exit, you can add
2433 @code{gnus-group-sort-groups-by-rank} or
2434 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2435 slow things down somewhat.
2436
2437
2438 @node Marking Groups
2439 @section Marking Groups
2440 @cindex marking groups
2441
2442 If you want to perform some command on several groups, and they appear
2443 subsequently in the group buffer, you would normally just give a
2444 numerical prefix to the command.  Most group commands will then do your
2445 bidding on those groups.
2446
2447 However, if the groups are not in sequential order, you can still
2448 perform a command on several groups.  You simply mark the groups first
2449 with the process mark and then execute the command.
2450
2451 @table @kbd
2452
2453 @item #
2454 @kindex # (Group)
2455 @itemx M m
2456 @kindex M m (Group)
2457 @findex gnus-group-mark-group
2458 Set the mark on the current group (@code{gnus-group-mark-group}).
2459
2460 @item M-#
2461 @kindex M-# (Group)
2462 @itemx M u
2463 @kindex M u (Group)
2464 @findex gnus-group-unmark-group
2465 Remove the mark from the current group
2466 (@code{gnus-group-unmark-group}).
2467
2468 @item M U
2469 @kindex M U (Group)
2470 @findex gnus-group-unmark-all-groups
2471 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2472
2473 @item M w
2474 @kindex M w (Group)
2475 @findex gnus-group-mark-region
2476 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2477
2478 @item M b
2479 @kindex M b (Group)
2480 @findex gnus-group-mark-buffer
2481 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2482
2483 @item M r
2484 @kindex M r (Group)
2485 @findex gnus-group-mark-regexp
2486 Mark all groups that match some regular expression
2487 (@code{gnus-group-mark-regexp}).
2488 @end table
2489
2490 Also @pxref{Process/Prefix}.
2491
2492 @findex gnus-group-universal-argument
2493 If you want to execute some command on all groups that have been marked
2494 with the process mark, you can use the @kbd{M-&}
2495 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2496 the command to be executed.
2497
2498
2499 @node Foreign Groups
2500 @section Foreign Groups
2501 @cindex foreign groups
2502
2503 Below are some group mode commands for making and editing general foreign
2504 groups, as well as commands to ease the creation of a few
2505 special-purpose groups.  All these commands insert the newly created
2506 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2507 consulted.
2508
2509 @table @kbd
2510
2511 @item G m
2512 @kindex G m (Group)
2513 @findex gnus-group-make-group
2514 @cindex making groups
2515 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2516 for a name, a method and possibly an @dfn{address}.  For an easier way
2517 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2518
2519 @item G r
2520 @kindex G r (Group)
2521 @findex gnus-group-rename-group
2522 @cindex renaming groups
2523 Rename the current group to something else
2524 (@code{gnus-group-rename-group}).  This is valid only on some
2525 groups---mail groups mostly.  This command might very well be quite slow
2526 on some back ends.
2527
2528 @item G c
2529 @kindex G c (Group)
2530 @cindex customizing
2531 @findex gnus-group-customize
2532 Customize the group parameters (@code{gnus-group-customize}).
2533
2534 @item G e
2535 @kindex G e (Group)
2536 @findex gnus-group-edit-group-method
2537 @cindex renaming groups
2538 Enter a buffer where you can edit the select method of the current
2539 group (@code{gnus-group-edit-group-method}).
2540
2541 @item G p
2542 @kindex G p (Group)
2543 @findex gnus-group-edit-group-parameters
2544 Enter a buffer where you can edit the group parameters
2545 (@code{gnus-group-edit-group-parameters}).
2546
2547 @item G E
2548 @kindex G E (Group)
2549 @findex gnus-group-edit-group
2550 Enter a buffer where you can edit the group info
2551 (@code{gnus-group-edit-group}).
2552
2553 @item G d
2554 @kindex G d (Group)
2555 @findex gnus-group-make-directory-group
2556 @cindex nndir
2557 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2558 for a directory name (@code{gnus-group-make-directory-group}).
2559
2560 @item G h
2561 @kindex G h (Group)
2562 @cindex help group
2563 @findex gnus-group-make-help-group
2564 Make the gnus help group (@code{gnus-group-make-help-group}).
2565
2566 @item G a
2567 @kindex G a (Group)
2568 @cindex (ding) archive
2569 @cindex archive group
2570 @findex gnus-group-make-archive-group
2571 @vindex gnus-group-archive-directory
2572 @vindex gnus-group-recent-archive-directory
2573 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2574 default a group pointing to the most recent articles will be created
2575 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2576 group will be created from @code{gnus-group-archive-directory}.
2577
2578 @item G k
2579 @kindex G k (Group)
2580 @findex gnus-group-make-kiboze-group
2581 @cindex nnkiboze
2582 Make a kiboze group.  You will be prompted for a name, for a regexp to
2583 match groups to be ``included'' in the kiboze group, and a series of
2584 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2585 @xref{Kibozed Groups}.
2586
2587 @item G D
2588 @kindex G D (Group)
2589 @findex gnus-group-enter-directory
2590 @cindex nneething
2591 Read an arbitrary directory as if it were a newsgroup with the
2592 @code{nneething} back end (@code{gnus-group-enter-directory}).
2593 @xref{Anything Groups}.
2594
2595 @item G f
2596 @kindex G f (Group)
2597 @findex gnus-group-make-doc-group
2598 @cindex ClariNet Briefs
2599 @cindex nndoc
2600 Make a group based on some file or other
2601 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2602 command, you will be prompted for a file name and a file type.
2603 Currently supported types are @code{mbox}, @code{babyl},
2604 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2605 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2606 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2607 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2608 you run this command without a prefix, Gnus will guess at the file
2609 type.  @xref{Document Groups}.
2610
2611 @item G u
2612 @kindex G u (Group)
2613 @vindex gnus-useful-groups
2614 @findex gnus-group-make-useful-group
2615 Create one of the groups mentioned in @code{gnus-useful-groups}
2616 (@code{gnus-group-make-useful-group}).
2617
2618 @item G w
2619 @kindex G w (Group)
2620 @findex gnus-group-make-web-group
2621 @cindex Google
2622 @cindex nnweb
2623 @cindex gmane
2624 Make an ephemeral group based on a web search
2625 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2626 command, make a solid group instead.  You will be prompted for the
2627 search engine type and the search string.  Valid search engine types
2628 include @code{google}, @code{dejanews}, and @code{gmane}.
2629 @xref{Web Searches}.
2630
2631 If you use the @code{google} search engine, you can limit the search
2632 to a particular group by using a match string like
2633 @samp{shaving group:alt.sysadmin.recovery}.
2634
2635 @item G DEL
2636 @kindex G DEL (Group)
2637 @findex gnus-group-delete-group
2638 This function will delete the current group
2639 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2640 actually delete all the articles in the group, and forcibly remove the
2641 group itself from the face of the Earth.  Use a prefix only if you are
2642 absolutely sure of what you are doing.  This command can't be used on
2643 read-only groups (like @code{nntp} group), though.
2644
2645 @item G V
2646 @kindex G V (Group)
2647 @findex gnus-group-make-empty-virtual
2648 Make a new, fresh, empty @code{nnvirtual} group
2649 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2650
2651 @item G v
2652 @kindex G v (Group)
2653 @findex gnus-group-add-to-virtual
2654 Add the current group to an @code{nnvirtual} group
2655 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2656 @end table
2657
2658 @xref{Select Methods}, for more information on the various select
2659 methods.
2660
2661 @vindex gnus-activate-foreign-newsgroups
2662 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2663 gnus will check all foreign groups with this level or lower at startup.
2664 This might take quite a while, especially if you subscribe to lots of
2665 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2666 @code{gnus-activate-level} also affects activation of foreign
2667 newsgroups.
2668
2669
2670 @node Group Parameters
2671 @section Group Parameters
2672 @cindex group parameters
2673
2674 The group parameters store information local to a particular group.
2675 Here's an example group parameter list:
2676
2677 @example
2678 ((to-address . "ding@@gnus.org")
2679  (auto-expire . t))
2680 @end example
2681
2682 We see that each element consists of a ``dotted pair''---the thing before
2683 the dot is the key, while the thing after the dot is the value.  All the
2684 parameters have this form @emph{except} local variable specs, which are
2685 not dotted pairs, but proper lists.
2686
2687 Some parameters have correspondent customizable variables, each of which
2688 is an alist of regexps and values.
2689
2690 The following group parameters can be used:
2691
2692 @table @code
2693 @item to-address
2694 @cindex to-address
2695 Address used by when doing followups and new posts.
2696
2697 @example
2698 (to-address . "some@@where.com")
2699 @end example
2700
2701 This is primarily useful in mail groups that represent closed mailing
2702 lists---mailing lists where it's expected that everybody that writes to
2703 the mailing list is subscribed to it.  Since using this parameter
2704 ensures that the mail only goes to the mailing list itself, it means
2705 that members won't receive two copies of your followups.
2706
2707 Using @code{to-address} will actually work whether the group is foreign
2708 or not.  Let's say there's a group on the server that is called
2709 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2710 the articles from a mail-to-news gateway.  Posting directly to this
2711 group is therefore impossible---you have to send mail to the mailing
2712 list address instead.
2713
2714 See also @code{gnus-parameter-to-address-alist}.
2715
2716 @item to-list
2717 @cindex to-list
2718 Address used when doing @kbd{a} in that group.
2719
2720 @example
2721 (to-list . "some@@where.com")
2722 @end example
2723
2724 It is totally ignored
2725 when doing a followup---except that if it is present in a news group,
2726 you'll get mail group semantics when doing @kbd{f}.
2727
2728 If you do an @kbd{a} command in a mail group and you have neither a
2729 @code{to-list} group parameter nor a @code{to-address} group parameter,
2730 then a @code{to-list} group parameter will be added automatically upon
2731 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2732 @vindex gnus-add-to-list
2733
2734 If you do an @kbd{a} command in a mail group and you don't have a
2735 @code{to-list} group parameter, one will be added automatically upon
2736 sending the message.
2737
2738 @findex gnus-mailing-list-mode
2739 @cindex mail list groups
2740 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2741 entering summary buffer.
2742
2743 See also @code{gnus-parameter-to-list-alist}.
2744
2745 @anchor{subscribed}
2746 @item subscribed
2747 @cindex subscribed
2748 If this parameter is set to @code{t}, Gnus will consider the
2749 to-address and to-list parameters for this group as addresses of
2750 mailing lists you are subscribed to.  Giving Gnus this information is
2751 (only) a first step in getting it to generate correct Mail-Followup-To
2752 headers for your posts to these lists.  @xref{Mailing Lists, ,Mailing
2753 Lists, message, The Message Manual}, for a complete treatment of
2754 available MFT support.
2755
2756 See also @code{gnus-find-subscribed-addresses}, the function that
2757 directly uses this group parameter.
2758
2759 @item visible
2760 @cindex visible
2761 If the group parameter list has the element @code{(visible . t)},
2762 that group will always be visible in the Group buffer, regardless
2763 of whether it has any unread articles.
2764
2765 @item broken-reply-to
2766 @cindex broken-reply-to
2767 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2768 headers in this group are to be ignored, and for the header to be hidden
2769 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2770 can be useful if you're reading a mailing list group where the listserv
2771 has inserted @code{Reply-To} headers that point back to the listserv
2772 itself.  That is broken behavior.  So there!
2773
2774 @item to-group
2775 @cindex to-group
2776 Elements like @code{(to-group . "some.group.name")} means that all
2777 posts in that group will be sent to @code{some.group.name}.
2778
2779 @item newsgroup
2780 @cindex newsgroup
2781 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2782 will treat all responses as if they were responses to news articles.
2783 This can be useful if you have a mail group that's really a mirror of a
2784 news group.
2785
2786 @item gcc-self
2787 @cindex gcc-self
2788 If @code{(gcc-self . t)} is present in the group parameter list, newly
2789 composed messages will be @code{Gcc}'d to the current group.  If
2790 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2791 generated, if @code{(gcc-self . "string")} is present, this string will
2792 be inserted literally as a @code{gcc} header.  This parameter takes
2793 precedence over any default @code{Gcc} rules as described later
2794 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2795 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2796 a @code{nntp} server doesn't accept articles.
2797
2798 @item auto-expire
2799 @cindex auto-expire
2800 If the group parameter has an element that looks like @code{(auto-expire
2801 . t)}, all articles read will be marked as expirable.  For an
2802 alternative approach, @pxref{Expiring Mail}.
2803
2804 See also @code{gnus-auto-expirable-newsgroups}.
2805
2806 @item total-expire
2807 @cindex total-expire
2808 If the group parameter has an element that looks like
2809 @code{(total-expire . t)}, all read articles will be put through the
2810 expiry process, even if they are not marked as expirable.  Use with
2811 caution.  Unread, ticked and dormant articles are not eligible for
2812 expiry.
2813
2814 See also @code{gnus-total-expirable-newsgroups}.
2815
2816 @item expiry-wait
2817 @cindex expiry-wait
2818 @vindex nnmail-expiry-wait-function
2819 If the group parameter has an element that looks like
2820 @code{(expiry-wait . 10)}, this value will override any
2821 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2822 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2823 can either be a number of days (not necessarily an integer) or the
2824 symbols @code{never} or @code{immediate}.
2825
2826 @item score-file
2827 @cindex score file group parameter
2828 Elements that look like @code{(score-file . "file")} will make
2829 @file{file} into the current score file for the group in question.  All
2830 interactive score entries will be put into this file.
2831
2832 @item adapt-file
2833 @cindex adapt file group parameter
2834 Elements that look like @code{(adapt-file . "file")} will make
2835 @file{file} into the current adaptive file for the group in question.
2836 All adaptive score entries will be put into this file.
2837
2838 @item admin-address
2839 @cindex admin-address
2840 When unsubscribing from a mailing list you should never send the
2841 unsubscription notice to the mailing list itself.  Instead, you'd send
2842 messages to the administrative address.  This parameter allows you to
2843 put the admin address somewhere convenient.
2844
2845 @item display
2846 @cindex display
2847 Elements that look like @code{(display . MODE)} say which articles to
2848 display on entering the group.  Valid values are:
2849
2850 @table @code
2851 @item all
2852 Display all articles, both read and unread.
2853
2854 @item an integer
2855 Display the last @var{integer} articles in the group.  This is the same as
2856 entering the group with @kbd{C-u @var{integer}}.
2857
2858 @item default
2859 Display the default visible articles, which normally includes unread and
2860 ticked articles.
2861
2862 @item an array
2863 Display articles that satisfy a predicate.
2864
2865 Here are some examples:
2866
2867 @table @code
2868 @item [unread]
2869 Display only unread articles.
2870
2871 @item [not expire]
2872 Display everything except expirable articles.
2873
2874 @item [and (not reply) (not expire)]
2875 Display everything except expirable and articles you've already
2876 responded to.
2877 @end table
2878
2879 The available operators are @code{not}, @code{and} and @code{or}.
2880 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2881 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2882 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2883 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2884
2885 @end table
2886
2887 The @code{display} parameter works by limiting the summary buffer to
2888 the subset specified.  You can pop the limit by using the @kbd{/ w}
2889 command (@pxref{Limiting}).
2890
2891 @item comment
2892 @cindex comment
2893 Elements that look like @code{(comment . "This is a comment")} are
2894 arbitrary comments on the group.  You can display comments in the
2895 group line (@pxref{Group Line Specification}).
2896
2897 @item charset
2898 @cindex charset
2899 Elements that look like @code{(charset . iso-8859-1)} will make
2900 @code{iso-8859-1} the default charset; that is, the charset that will be
2901 used for all articles that do not specify a charset.
2902
2903 See also @code{gnus-group-charset-alist}.
2904
2905 @item ignored-charsets
2906 @cindex ignored-charset
2907 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2908 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2909 default charset will be used for decoding articles.
2910
2911 See also @code{gnus-group-ignored-charsets-alist}.
2912
2913 @item posting-style
2914 @cindex posting-style
2915 You can store additional posting style information for this group
2916 here (@pxref{Posting Styles}).  The format is that of an entry in the
2917 @code{gnus-posting-styles} alist, except that there's no regexp matching
2918 the group name (of course).  Style elements in this group parameter will
2919 take precedence over the ones found in @code{gnus-posting-styles}.
2920
2921 For instance, if you want a funky name and signature in this group only,
2922 instead of hacking @code{gnus-posting-styles}, you could put something
2923 like this in the group parameters:
2924
2925 @example
2926 (posting-style
2927   (name "Funky Name")
2928   ("X-My-Header" "Funky Value")
2929   (signature "Funky Signature"))
2930 @end example
2931
2932 @item post-method
2933 @cindex post-method
2934 If it is set, the value is used as the method for posting message
2935 instead of @code{gnus-post-method}.
2936
2937 @item banner
2938 @cindex banner
2939 An item like @code{(banner . @var{regexp})} causes any part of an article
2940 that matches the regular expression @var{regexp} to be stripped.  Instead of
2941 @var{regexp}, you can also use the symbol @code{signature} which strips the
2942 last signature or any of the elements of the alist
2943 @code{gnus-article-banner-alist}.
2944
2945 @item sieve
2946 @cindex sieve
2947 This parameter contains a Sieve test that should match incoming mail
2948 that should be placed in this group.  From this group parameter, a
2949 Sieve @samp{IF} control structure is generated, having the test as the
2950 condition and @samp{fileinto "group.name";} as the body.
2951
2952 For example, if the INBOX.list.sieve group has the @code{(sieve
2953 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2954 translating the group parameter into a Sieve script (@pxref{Sieve
2955 Commands}) the following Sieve code is generated:
2956
2957 @example
2958 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2959         fileinto \"INBOX.list.sieve\";
2960 @}
2961 @end example
2962
2963 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2964 Emacs Sieve}.
2965
2966 @item (@var{variable} @var{form})
2967 You can use the group parameters to set variables local to the group you
2968 are entering.  If you want to turn threading off in @samp{news.answers},
2969 you could put @code{(gnus-show-threads nil)} in the group parameters of
2970 that group.  @code{gnus-show-threads} will be made into a local variable
2971 in the summary buffer you enter, and the form @code{nil} will be
2972 @code{eval}ed there.
2973
2974 Note that this feature sets the variable locally to the summary buffer.
2975 But some variables are evaluated in the article buffer, or in the
2976 message buffer (of a reply or followup or otherwise newly created
2977 message).  As a workaround, it might help to add the variable in
2978 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2979 Stuff}.  So if you want to set @code{message-from-style} via the group
2980 parameters, then you may need the following statement elsewhere in your
2981 @file{~/.gnus} file:
2982 @lisp
2983 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2984 @end lisp
2985
2986 @vindex gnus-list-identifiers
2987 A use for this feature is to remove a mailing list identifier tag in
2988 the subject fields of articles.  E.g. if the news group
2989 @example
2990 nntp+news.gnus.org:gmane.text.docbook.apps
2991 @end example
2992 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
2993 tag can be removed from the article subjects in the summary buffer for
2994 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
2995 into the group parameters for the group.
2996
2997 This can also be used as a group-specific hook function, if you'd like.
2998 If you want to hear a beep when you enter a group, you could put
2999 something like @code{(dummy-variable (ding))} in the parameters of that
3000 group.  @code{dummy-variable} will be set to the result of the
3001 @code{(ding)} form, but who cares?
3002
3003 @end table
3004
3005 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3006 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3007 presents you with a Customize-like interface.  The latter helps avoid
3008 silly Lisp errors.)  You might also be interested in reading about topic
3009 parameters (@pxref{Topic Parameters}).
3010
3011 @vindex gnus-parameters
3012 Group parameters can be set via the @code{gnus-parameters} variable too.
3013 But some variables, such as @code{visible}, have no effect.  For
3014 example:
3015
3016 @lisp
3017 (setq gnus-parameters
3018       '(("mail\\..*"
3019          (gnus-show-threads nil)
3020          (gnus-use-scoring nil)
3021          (gnus-summary-line-format
3022           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3023          (gcc-self . t)
3024          (display . all))
3025
3026         ("^nnimap:\\(foo.bar\\)$"
3027          (to-group . "\\1"))
3028
3029         ("mail\\.me"
3030          (gnus-use-scoring  t))
3031
3032         ("list\\..*"
3033          (total-expire . t)
3034          (broken-reply-to . t))))
3035 @end lisp
3036
3037 String value of parameters will be subjected to regexp substitution, as
3038 the @code{to-group} example shows.
3039
3040
3041 @node Listing Groups
3042 @section Listing Groups
3043 @cindex group listing
3044
3045 These commands all list various slices of the groups available.
3046
3047 @table @kbd
3048
3049 @item l
3050 @itemx A s
3051 @kindex A s (Group)
3052 @kindex l (Group)
3053 @findex gnus-group-list-groups
3054 List all groups that have unread articles
3055 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3056 command will list only groups of level ARG and lower.  By default, it
3057 only lists groups of level five (i.e.,
3058 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3059 groups).
3060
3061 @item L
3062 @itemx A u
3063 @kindex A u (Group)
3064 @kindex L (Group)
3065 @findex gnus-group-list-all-groups
3066 List all groups, whether they have unread articles or not
3067 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3068 this command will list only groups of level ARG and lower.  By default,
3069 it lists groups of level seven or lower (i.e., just subscribed and
3070 unsubscribed groups).
3071
3072 @item A l
3073 @kindex A l (Group)
3074 @findex gnus-group-list-level
3075 List all unread groups on a specific level
3076 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3077 with no unread articles.
3078
3079 @item A k
3080 @kindex A k (Group)
3081 @findex gnus-group-list-killed
3082 List all killed groups (@code{gnus-group-list-killed}).  If given a
3083 prefix argument, really list all groups that are available, but aren't
3084 currently (un)subscribed.  This could entail reading the active file
3085 from the server.
3086
3087 @item A z
3088 @kindex A z (Group)
3089 @findex gnus-group-list-zombies
3090 List all zombie groups (@code{gnus-group-list-zombies}).
3091
3092 @item A m
3093 @kindex A m (Group)
3094 @findex gnus-group-list-matching
3095 List all unread, subscribed groups with names that match a regexp
3096 (@code{gnus-group-list-matching}).
3097
3098 @item A M
3099 @kindex A M (Group)
3100 @findex gnus-group-list-all-matching
3101 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3102
3103 @item A A
3104 @kindex A A (Group)
3105 @findex gnus-group-list-active
3106 List absolutely all groups in the active file(s) of the
3107 server(s) you are connected to (@code{gnus-group-list-active}).  This
3108 might very well take quite a while.  It might actually be a better idea
3109 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3110 thing to match on.  Also note that this command may list groups that
3111 don't exist (yet)---these will be listed as if they were killed groups.
3112 Take the output with some grains of salt.
3113
3114 @item A a
3115 @kindex A a (Group)
3116 @findex gnus-group-apropos
3117 List all groups that have names that match a regexp
3118 (@code{gnus-group-apropos}).
3119
3120 @item A d
3121 @kindex A d (Group)
3122 @findex gnus-group-description-apropos
3123 List all groups that have names or descriptions that match a regexp
3124 (@code{gnus-group-description-apropos}).
3125
3126 @item A c
3127 @kindex A c (Group)
3128 @findex gnus-group-list-cached
3129 List all groups with cached articles (@code{gnus-group-list-cached}).
3130
3131 @item A ?
3132 @kindex A ? (Group)
3133 @findex gnus-group-list-dormant
3134 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3135
3136 @item A /
3137 @kindex A / (Group)
3138 @findex gnus-group-list-limit
3139 List groups limited within the current selection
3140 (@code{gnus-group-list-limit}).
3141
3142 @item A f
3143 @kindex A f (Group)
3144 @findex gnus-group-list-flush
3145 Flush groups from the current selection (@code{gnus-group-list-flush}).
3146
3147 @item A p
3148 @kindex A p (Group)
3149 @findex gnus-group-list-plus
3150 List groups plus the current selection (@code{gnus-group-list-plus}).
3151
3152 @end table
3153
3154 @vindex gnus-permanently-visible-groups
3155 @cindex visible group parameter
3156 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3157 always be shown, whether they have unread articles or not.  You can also
3158 add the @code{visible} element to the group parameters in question to
3159 get the same effect.
3160
3161 @vindex gnus-list-groups-with-ticked-articles
3162 Groups that have just ticked articles in it are normally listed in the
3163 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3164 @code{nil}, these groups will be treated just like totally empty
3165 groups.  It is @code{t} by default.
3166
3167
3168 @node Sorting Groups
3169 @section Sorting Groups
3170 @cindex sorting groups
3171
3172 @kindex C-c C-s (Group)
3173 @findex gnus-group-sort-groups
3174 @vindex gnus-group-sort-function
3175 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3176 group buffer according to the function(s) given by the
3177 @code{gnus-group-sort-function} variable.  Available sorting functions
3178 include:
3179
3180 @table @code
3181
3182 @item gnus-group-sort-by-alphabet
3183 @findex gnus-group-sort-by-alphabet
3184 Sort the group names alphabetically.  This is the default.
3185
3186 @item gnus-group-sort-by-real-name
3187 @findex gnus-group-sort-by-real-name
3188 Sort the group alphabetically on the real (unprefixed) group names.
3189
3190 @item gnus-group-sort-by-level
3191 @findex gnus-group-sort-by-level
3192 Sort by group level.
3193
3194 @item gnus-group-sort-by-score
3195 @findex gnus-group-sort-by-score
3196 Sort by group score.  @xref{Group Score}.
3197
3198 @item gnus-group-sort-by-rank
3199 @findex gnus-group-sort-by-rank
3200 Sort by group score and then the group level.  The level and the score
3201 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3202
3203 @item gnus-group-sort-by-unread
3204 @findex gnus-group-sort-by-unread
3205 Sort by number of unread articles.
3206
3207 @item gnus-group-sort-by-method
3208 @findex gnus-group-sort-by-method
3209 Sort alphabetically on the select method.
3210
3211 @item gnus-group-sort-by-server
3212 @findex gnus-group-sort-by-server
3213 Sort alphabetically on the Gnus server name.
3214
3215
3216 @end table
3217
3218 @code{gnus-group-sort-function} can also be a list of sorting
3219 functions.  In that case, the most significant sort key function must be
3220 the last one.
3221
3222
3223 There are also a number of commands for sorting directly according to
3224 some sorting criteria:
3225
3226 @table @kbd
3227 @item G S a
3228 @kindex G S a (Group)
3229 @findex gnus-group-sort-groups-by-alphabet
3230 Sort the group buffer alphabetically by group name
3231 (@code{gnus-group-sort-groups-by-alphabet}).
3232
3233 @item G S u
3234 @kindex G S u (Group)
3235 @findex gnus-group-sort-groups-by-unread
3236 Sort the group buffer by the number of unread articles
3237 (@code{gnus-group-sort-groups-by-unread}).
3238
3239 @item G S l
3240 @kindex G S l (Group)
3241 @findex gnus-group-sort-groups-by-level
3242 Sort the group buffer by group level
3243 (@code{gnus-group-sort-groups-by-level}).
3244
3245 @item G S v
3246 @kindex G S v (Group)
3247 @findex gnus-group-sort-groups-by-score
3248 Sort the group buffer by group score
3249 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3250
3251 @item G S r
3252 @kindex G S r (Group)
3253 @findex gnus-group-sort-groups-by-rank
3254 Sort the group buffer by group rank
3255 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3256
3257 @item G S m
3258 @kindex G S m (Group)
3259 @findex gnus-group-sort-groups-by-method
3260 Sort the group buffer alphabetically by back end name@*
3261 (@code{gnus-group-sort-groups-by-method}).
3262
3263 @item G S n
3264 @kindex G S n (Group)
3265 @findex gnus-group-sort-groups-by-real-name
3266 Sort the group buffer alphabetically by real (unprefixed) group name
3267 (@code{gnus-group-sort-groups-by-real-name}).
3268
3269 @end table
3270
3271 All the commands below obey the process/prefix convention
3272 (@pxref{Process/Prefix}).
3273
3274 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3275 commands will sort in reverse order.
3276
3277 You can also sort a subset of the groups:
3278
3279 @table @kbd
3280 @item G P a
3281 @kindex G P a (Group)
3282 @findex gnus-group-sort-selected-groups-by-alphabet
3283 Sort the groups alphabetically by group name
3284 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3285
3286 @item G P u
3287 @kindex G P u (Group)
3288 @findex gnus-group-sort-selected-groups-by-unread
3289 Sort the groups by the number of unread articles
3290 (@code{gnus-group-sort-selected-groups-by-unread}).
3291
3292 @item G P l
3293 @kindex G P l (Group)
3294 @findex gnus-group-sort-selected-groups-by-level
3295 Sort the groups by group level
3296 (@code{gnus-group-sort-selected-groups-by-level}).
3297
3298 @item G P v
3299 @kindex G P v (Group)
3300 @findex gnus-group-sort-selected-groups-by-score
3301 Sort the groups by group score
3302 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3303
3304 @item G P r
3305 @kindex G P r (Group)
3306 @findex gnus-group-sort-selected-groups-by-rank
3307 Sort the groups by group rank
3308 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3309
3310 @item G P m
3311 @kindex G P m (Group)
3312 @findex gnus-group-sort-selected-groups-by-method
3313 Sort the groups alphabetically by back end name@*
3314 (@code{gnus-group-sort-selected-groups-by-method}).
3315
3316 @item G P n
3317 @kindex G P n (Group)
3318 @findex gnus-group-sort-selected-groups-by-real-name
3319 Sort the groups alphabetically by real (unprefixed) group name
3320 (@code{gnus-group-sort-selected-groups-by-real-name}).
3321
3322 @item G P s
3323 @kindex G P s (Group)
3324 @findex gnus-group-sort-selected-groups
3325 Sort the groups according to @code{gnus-group-sort-function}.
3326
3327 @end table
3328
3329 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3330 move groups around.
3331
3332
3333 @node Group Maintenance
3334 @section Group Maintenance
3335 @cindex bogus groups
3336
3337 @table @kbd
3338 @item b
3339 @kindex b (Group)
3340 @findex gnus-group-check-bogus-groups
3341 Find bogus groups and delete them
3342 (@code{gnus-group-check-bogus-groups}).
3343
3344 @item F
3345 @kindex F (Group)
3346 @findex gnus-group-find-new-groups
3347 Find new groups and process them (@code{gnus-group-find-new-groups}).
3348 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3349 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3350 to query the server for new groups, and subscribe the new groups as
3351 zombies.
3352
3353 @item C-c C-x
3354 @kindex C-c C-x (Group)
3355 @findex gnus-group-expire-articles
3356 Run all expirable articles in the current group through the expiry
3357 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3358 all expirable articles in the group that have been around for a while.
3359 (@pxref{Expiring Mail}).
3360
3361 @item C-c C-M-x
3362 @kindex C-c C-M-x (Group)
3363 @findex gnus-group-expire-all-groups
3364 Run all expirable articles in all groups through the expiry process
3365 (@code{gnus-group-expire-all-groups}).
3366
3367 @end table
3368
3369
3370 @node Browse Foreign Server
3371 @section Browse Foreign Server
3372 @cindex foreign servers
3373 @cindex browsing servers
3374
3375 @table @kbd
3376 @item B
3377 @kindex B (Group)
3378 @findex gnus-group-browse-foreign-server
3379 You will be queried for a select method and a server name.  Gnus will
3380 then attempt to contact this server and let you browse the groups there
3381 (@code{gnus-group-browse-foreign-server}).
3382 @end table
3383
3384 @findex gnus-browse-mode
3385 A new buffer with a list of available groups will appear.  This buffer
3386 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3387 a lot) like a normal group buffer.
3388
3389 Here's a list of keystrokes available in the browse mode:
3390
3391 @table @kbd
3392 @item n
3393 @kindex n (Browse)
3394 @findex gnus-group-next-group
3395 Go to the next group (@code{gnus-group-next-group}).
3396
3397 @item p
3398 @kindex p (Browse)
3399 @findex gnus-group-prev-group
3400 Go to the previous group (@code{gnus-group-prev-group}).
3401
3402 @item SPACE
3403 @kindex SPACE (Browse)
3404 @findex gnus-browse-read-group
3405 Enter the current group and display the first article
3406 (@code{gnus-browse-read-group}).
3407
3408 @item RET
3409 @kindex RET (Browse)
3410 @findex gnus-browse-select-group
3411 Enter the current group (@code{gnus-browse-select-group}).
3412
3413 @item u
3414 @kindex u (Browse)
3415 @findex gnus-browse-unsubscribe-current-group
3416 Unsubscribe to the current group, or, as will be the case here,
3417 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3418
3419 @item l
3420 @itemx q
3421 @kindex q (Browse)
3422 @kindex l (Browse)
3423 @findex gnus-browse-exit
3424 Exit browse mode (@code{gnus-browse-exit}).
3425
3426 @item d
3427 @kindex d (Browse)
3428 @findex gnus-browse-describe-group
3429 Describe the current group (@code{gnus-browse-describe-group}).
3430
3431 @item ?
3432 @kindex ? (Browse)
3433 @findex gnus-browse-describe-briefly
3434 Describe browse mode briefly (well, there's not much to describe, is
3435 there) (@code{gnus-browse-describe-briefly}).
3436 @end table
3437
3438
3439 @node Exiting Gnus
3440 @section Exiting gnus
3441 @cindex exiting gnus
3442
3443 Yes, gnus is ex(c)iting.
3444
3445 @table @kbd
3446 @item z
3447 @kindex z (Group)
3448 @findex gnus-group-suspend
3449 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3450 but it kills all buffers except the Group buffer.  I'm not sure why this
3451 is a gain, but then who am I to judge?
3452
3453 @item q
3454 @kindex q (Group)
3455 @findex gnus-group-exit
3456 @c @icon{gnus-group-exit}
3457 Quit gnus (@code{gnus-group-exit}).
3458
3459 @item Q
3460 @kindex Q (Group)
3461 @findex gnus-group-quit
3462 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3463 The dribble file will be saved, though (@pxref{Auto Save}).
3464 @end table
3465
3466 @vindex gnus-exit-gnus-hook
3467 @vindex gnus-suspend-gnus-hook
3468 @vindex gnus-after-exiting-gnus-hook
3469 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3470 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3471 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3472 exiting gnus.
3473
3474 Note:
3475
3476 @quotation
3477 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3478 numbly heavy and herself fall into a hazy trance as the boy sitting
3479 behind her drew repeated lines with his pencil across the back of her
3480 plastic chair.
3481 @end quotation
3482
3483
3484 @node Group Topics
3485 @section Group Topics
3486 @cindex topics
3487
3488 If you read lots and lots of groups, it might be convenient to group
3489 them hierarchically according to topics.  You put your Emacs groups over
3490 here, your sex groups over there, and the rest (what, two groups or so?)
3491 you put in some misc section that you never bother with anyway.  You can
3492 even group the Emacs sex groups as a sub-topic to either the Emacs
3493 groups or the sex groups---or both!  Go wild!
3494
3495 @iftex
3496 @iflatex
3497 \gnusfigure{Group Topics}{400}{
3498 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3499 }
3500 @end iflatex
3501 @end iftex
3502
3503 Here's an example:
3504
3505 @example
3506 Gnus
3507   Emacs -- I wuw it!
3508      3: comp.emacs
3509      2: alt.religion.emacs
3510     Naughty Emacs
3511      452: alt.sex.emacs
3512        0: comp.talk.emacs.recovery
3513   Misc
3514      8: comp.binaries.fractals
3515     13: comp.sources.unix
3516 @end example
3517
3518 @findex gnus-topic-mode
3519 @kindex t (Group)
3520 To get this @emph{fab} functionality you simply turn on (ooh!) the
3521 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3522 is a toggling command.)
3523
3524 Go ahead, just try it.  I'll still be here when you get back.  La de
3525 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3526 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3527 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3528 Hot and bothered?
3529
3530 If you want this permanently enabled, you should add that minor mode to
3531 the hook for the group mode.  Put the following line in your
3532 @file{~/.gnus.el} file:
3533
3534 @lisp
3535 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3536 @end lisp
3537
3538 @menu
3539 * Topic Commands::              Interactive E-Z commands.
3540 * Topic Variables::             How to customize the topics the Lisp Way.
3541 * Topic Sorting::               Sorting each topic individually.
3542 * Topic Topology::              A map of the world.
3543 * Topic Parameters::            Parameters that apply to all groups in a topic.
3544 @end menu
3545
3546
3547 @node Topic Commands
3548 @subsection Topic Commands
3549 @cindex topic commands
3550
3551 When the topic minor mode is turned on, a new @kbd{T} submap will be
3552 available.  In addition, a few of the standard keys change their
3553 definitions slightly.
3554
3555 In general, the following kinds of operations are possible on topics.
3556 First of all, you want to create topics.  Secondly, you want to put
3557 groups in topics and to move them around until you have an order you
3558 like.  The third kind of operation is to show/hide parts of the whole
3559 shebang.  You might want to hide a topic including its subtopics and
3560 groups, to get a better overview of the other groups.
3561
3562 Here is a list of the basic keys that you might need to set up topics
3563 the way you like.
3564
3565 @table @kbd
3566
3567 @item T n
3568 @kindex T n (Topic)
3569 @findex gnus-topic-create-topic
3570 Prompt for a new topic name and create it
3571 (@code{gnus-topic-create-topic}).
3572
3573 @item T TAB
3574 @itemx TAB
3575 @kindex T TAB (Topic)
3576 @kindex TAB (Topic)
3577 @findex gnus-topic-indent
3578 ``Indent'' the current topic so that it becomes a sub-topic of the
3579 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3580 ``un-indent'' the topic instead.
3581
3582 @item M-TAB
3583 @kindex M-TAB (Topic)
3584 @findex gnus-topic-unindent
3585 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3586 parent of its current parent (@code{gnus-topic-unindent}).
3587
3588 @end table
3589
3590 The following two keys can be used to move groups and topics around.
3591 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3592 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3593 kill and yank rather than cut and paste.
3594
3595 @table @kbd
3596
3597 @item C-k
3598 @kindex C-k (Topic)
3599 @findex gnus-topic-kill-group
3600 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3601 topic will be removed along with the topic.
3602
3603 @item C-y
3604 @kindex C-y (Topic)
3605 @findex gnus-topic-yank-group
3606 Yank the previously killed group or topic
3607 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3608 before all groups.
3609
3610 So, to move a topic to the beginning of the list of topics, just hit
3611 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3612 move the cursor to the beginning of the buffer (just below the ``Gnus''
3613 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3614 paste.  Like I said -- E-Z.
3615
3616 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3617 you can move topics around as well as groups.
3618
3619 @end table
3620
3621 After setting up the topics the way you like them, you might wish to
3622 hide a topic, or to show it again.  That's why we have the following
3623 key.
3624
3625 @table @kbd
3626
3627 @item RET
3628 @kindex RET (Topic)
3629 @findex gnus-topic-select-group
3630 @itemx SPACE
3631 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3632 When you perform this command on a group, you'll enter the group, as
3633 usual.  When done on a topic line, the topic will be folded (if it was
3634 visible) or unfolded (if it was folded already).  So it's basically a
3635 toggling command on topics.  In addition, if you give a numerical
3636 prefix, group on that level (and lower) will be displayed.
3637
3638 @end table
3639
3640 Now for a list of other commands, in no particular order.
3641
3642 @table @kbd
3643
3644 @item T m
3645 @kindex T m (Topic)
3646 @findex gnus-topic-move-group
3647 Move the current group to some other topic
3648 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3649 convention (@pxref{Process/Prefix}).
3650
3651 @item T j
3652 @kindex T j (Topic)
3653 @findex gnus-topic-jump-to-topic
3654 Go to a topic (@code{gnus-topic-jump-to-topic}).
3655
3656 @item T c
3657 @kindex T c (Topic)
3658 @findex gnus-topic-copy-group
3659 Copy the current group to some other topic
3660 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3661 convention (@pxref{Process/Prefix}).
3662
3663 @item T h
3664 @kindex T h (Topic)
3665 @findex gnus-topic-hide-topic
3666 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3667 a prefix, hide the topic permanently.
3668
3669 @item T s
3670 @kindex T s (Topic)
3671 @findex gnus-topic-show-topic
3672 Show the current topic (@code{gnus-topic-show-topic}).  If given
3673 a prefix, show the topic permanently.
3674
3675 @item T D
3676 @kindex T D (Topic)
3677 @findex gnus-topic-remove-group
3678 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3679 This command is mainly useful if you have the same group in several
3680 topics and wish to remove it from one of the topics.  You may also
3681 remove a group from all topics, but in that case, Gnus will add it to
3682 the root topic the next time you start Gnus.  In fact, all new groups
3683 (which, naturally, don't belong to any topic) will show up in the root
3684 topic.
3685
3686 This command uses the process/prefix convention
3687 (@pxref{Process/Prefix}).
3688
3689 @item T M
3690 @kindex T M (Topic)
3691 @findex gnus-topic-move-matching
3692 Move all groups that match some regular expression to a topic
3693 (@code{gnus-topic-move-matching}).
3694
3695 @item T C
3696 @kindex T C (Topic)
3697 @findex gnus-topic-copy-matching
3698 Copy all groups that match some regular expression to a topic
3699 (@code{gnus-topic-copy-matching}).
3700
3701 @item T H
3702 @kindex T H (Topic)
3703 @findex gnus-topic-toggle-display-empty-topics
3704 Toggle hiding empty topics
3705 (@code{gnus-topic-toggle-display-empty-topics}).
3706
3707 @item T #
3708 @kindex T # (Topic)
3709 @findex gnus-topic-mark-topic
3710 Mark all groups in the current topic with the process mark
3711 (@code{gnus-topic-mark-topic}).  This command works recursively on
3712 sub-topics unless given a prefix.
3713
3714 @item T M-#
3715 @kindex T M-# (Topic)
3716 @findex gnus-topic-unmark-topic
3717 Remove the process mark from all groups in the current topic
3718 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3719 sub-topics unless given a prefix.
3720
3721 @item C-c C-x
3722 @kindex C-c C-x (Topic)
3723 @findex gnus-topic-expire-articles
3724 Run all expirable articles in the current group or topic through the
3725 expiry process (if any)
3726 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3727
3728 @item T r
3729 @kindex T r (Topic)
3730 @findex gnus-topic-rename
3731 Rename a topic (@code{gnus-topic-rename}).
3732
3733 @item T DEL
3734 @kindex T DEL (Topic)
3735 @findex gnus-topic-delete
3736 Delete an empty topic (@code{gnus-topic-delete}).
3737
3738 @item A T
3739 @kindex A T (Topic)
3740 @findex gnus-topic-list-active
3741 List all groups that gnus knows about in a topics-ified way
3742 (@code{gnus-topic-list-active}).
3743
3744 @item T M-n
3745 @kindex T M-n (Topic)
3746 @findex gnus-topic-goto-next-topic
3747 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3748
3749 @item T M-p
3750 @kindex T M-p (Topic)
3751 @findex gnus-topic-goto-previous-topic
3752 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3753
3754 @item G p
3755 @kindex G p (Topic)
3756 @findex gnus-topic-edit-parameters
3757 @cindex group parameters
3758 @cindex topic parameters
3759 @cindex parameters
3760 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3761 @xref{Topic Parameters}.
3762
3763 @end table
3764
3765
3766 @node Topic Variables
3767 @subsection Topic Variables
3768 @cindex topic variables
3769
3770 The previous section told you how to tell Gnus which topics to display.
3771 This section explains how to tell Gnus what to display about each topic.
3772
3773 @vindex gnus-topic-line-format
3774 The topic lines themselves are created according to the
3775 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3776 Valid elements are:
3777
3778 @table @samp
3779 @item i
3780 Indentation.
3781 @item n
3782 Topic name.
3783 @item v
3784 Visibility.
3785 @item l
3786 Level.
3787 @item g
3788 Number of groups in the topic.
3789 @item a
3790 Number of unread articles in the topic.
3791 @item A
3792 Number of unread articles in the topic and all its subtopics.
3793 @end table
3794
3795 @vindex gnus-topic-indent-level
3796 Each sub-topic (and the groups in the sub-topics) will be indented with
3797 @code{gnus-topic-indent-level} times the topic level number of spaces.
3798 The default is 2.
3799
3800 @vindex gnus-topic-mode-hook
3801 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3802
3803 @vindex gnus-topic-display-empty-topics
3804 The @code{gnus-topic-display-empty-topics} says whether to display even
3805 topics that have no unread articles in them.  The default is @code{t}.
3806
3807
3808 @node Topic Sorting
3809 @subsection Topic Sorting
3810 @cindex topic sorting
3811
3812 You can sort the groups in each topic individually with the following
3813 commands:
3814
3815
3816 @table @kbd
3817 @item T S a
3818 @kindex T S a (Topic)
3819 @findex gnus-topic-sort-groups-by-alphabet
3820 Sort the current topic alphabetically by group name
3821 (@code{gnus-topic-sort-groups-by-alphabet}).
3822
3823 @item T S u
3824 @kindex T S u (Topic)
3825 @findex gnus-topic-sort-groups-by-unread
3826 Sort the current topic by the number of unread articles
3827 (@code{gnus-topic-sort-groups-by-unread}).
3828
3829 @item T S l
3830 @kindex T S l (Topic)
3831 @findex gnus-topic-sort-groups-by-level
3832 Sort the current topic by group level
3833 (@code{gnus-topic-sort-groups-by-level}).
3834
3835 @item T S v
3836 @kindex T S v (Topic)
3837 @findex gnus-topic-sort-groups-by-score
3838 Sort the current topic by group score
3839 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3840
3841 @item T S r
3842 @kindex T S r (Topic)
3843 @findex gnus-topic-sort-groups-by-rank
3844 Sort the current topic by group rank
3845 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3846
3847 @item T S m
3848 @kindex T S m (Topic)
3849 @findex gnus-topic-sort-groups-by-method
3850 Sort the current topic alphabetically by back end name
3851 (@code{gnus-topic-sort-groups-by-method}).
3852
3853 @item T S e
3854 @kindex T S e (Topic)
3855 @findex gnus-topic-sort-groups-by-server
3856 Sort the current topic alphabetically by server name
3857 (@code{gnus-topic-sort-groups-by-server}).
3858
3859 @item T S s
3860 @kindex T S s
3861 @findex gnus-topic-sort-groups
3862 Sort the current topic according to the function(s) given by the
3863 @code{gnus-group-sort-function} variable
3864 (@code{gnus-topic-sort-groups}).
3865
3866 @end table
3867
3868 When given a prefix argument, all these commands will sort in reverse
3869 order.  @xref{Sorting Groups}, for more information about group
3870 sorting.
3871
3872
3873 @node Topic Topology
3874 @subsection Topic Topology
3875 @cindex topic topology
3876 @cindex topology
3877
3878 So, let's have a look at an example group buffer:
3879
3880 @example
3881 @group
3882 Gnus
3883   Emacs -- I wuw it!
3884      3: comp.emacs
3885      2: alt.religion.emacs
3886     Naughty Emacs
3887      452: alt.sex.emacs
3888        0: comp.talk.emacs.recovery
3889   Misc
3890      8: comp.binaries.fractals
3891     13: comp.sources.unix
3892 @end group
3893 @end example
3894
3895 So, here we have one top-level topic (@samp{Gnus}), two topics under
3896 that, and one sub-topic under one of the sub-topics.  (There is always
3897 just one (1) top-level topic).  This topology can be expressed as
3898 follows:
3899
3900 @lisp
3901 (("Gnus" visible)
3902  (("Emacs -- I wuw it!" visible)
3903   (("Naughty Emacs" visible)))
3904  (("Misc" visible)))
3905 @end lisp
3906
3907 @vindex gnus-topic-topology
3908 This is in fact how the variable @code{gnus-topic-topology} would look
3909 for the display above.  That variable is saved in the @file{.newsrc.eld}
3910 file, and shouldn't be messed with manually---unless you really want
3911 to.  Since this variable is read from the @file{.newsrc.eld} file,
3912 setting it in any other startup files will have no effect.
3913
3914 This topology shows what topics are sub-topics of what topics (right),
3915 and which topics are visible.  Two settings are currently
3916 allowed---@code{visible} and @code{invisible}.
3917
3918
3919 @node Topic Parameters
3920 @subsection Topic Parameters
3921 @cindex topic parameters
3922
3923 All groups in a topic will inherit group parameters from the parent (and
3924 ancestor) topic parameters.  All valid group parameters are valid topic
3925 parameters (@pxref{Group Parameters}).
3926
3927 In addition, the following parameters are only valid as topic
3928 parameters:
3929
3930 @table @code
3931 @item subscribe
3932 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3933 @code{subscribe} topic parameter says what groups go in what topic.  Its
3934 value should be a regexp to match the groups that should go in that
3935 topic.
3936
3937 @item subscribe-level
3938 When subscribing new groups by topic (see the @code{subscribe} parameter),
3939 the group will be subscribed with the level specified in the
3940 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3941
3942 @end table
3943
3944 Group parameters (of course) override topic parameters, and topic
3945 parameters in sub-topics override topic parameters in super-topics.  You
3946 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3947 verb, although you may feel free to disagree with me here.)
3948
3949 @example
3950 Gnus
3951   Emacs
3952      3: comp.emacs
3953      2: alt.religion.emacs
3954    452: alt.sex.emacs
3955     Relief
3956      452: alt.sex.emacs
3957        0: comp.talk.emacs.recovery
3958   Misc
3959      8: comp.binaries.fractals
3960     13: comp.sources.unix
3961    452: alt.sex.emacs
3962 @end example
3963
3964 The @samp{Emacs} topic has the topic parameter @code{(score-file
3965 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3966 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3967 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3968 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3969 . "religion.SCORE")}.
3970
3971 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3972 will get the @file{relief.SCORE} home score file.  If you enter the same
3973 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3974 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3975 get the @file{religion.SCORE} home score file.
3976
3977 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3978 there are some problems, especially with the @code{total-expiry}
3979 parameter.  Say you have a mail group in two topics; one with
3980 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3981 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3982 of these topics you mean to expire articles from, so anything may
3983 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3984 happens.  You just have to be careful if you do stuff like that.
3985
3986
3987 @node Misc Group Stuff
3988 @section Misc Group Stuff
3989
3990 @menu
3991 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3992 * Group Information::           Information and help on groups and Gnus.
3993 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3994 * File Commands::               Reading and writing the Gnus files.
3995 * Sieve Commands::              Managing Sieve scripts.
3996 @end menu
3997
3998 @table @kbd
3999
4000 @item ^
4001 @kindex ^ (Group)
4002 @findex gnus-group-enter-server-mode
4003 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4004 @xref{Server Buffer}.
4005
4006 @item a
4007 @kindex a (Group)
4008 @findex gnus-group-post-news
4009 Start composing a message (a news by default)
4010 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4011 under the point.  If the prefix is 1, prompt for a group to post to.
4012 Contrary to what the name of this function suggests, the prepared
4013 article might be a mail instead of a news, if a mail group is specified
4014 with the prefix argument.  @xref{Composing Messages}.
4015
4016 @item m
4017 @kindex m (Group)
4018 @findex gnus-group-mail
4019 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4020 use the posting style of the group under the point.  If the prefix is 1,
4021 prompt for a group name to find the posting style.
4022 @xref{Composing Messages}.
4023
4024 @item i
4025 @kindex i (Group)
4026 @findex gnus-group-news
4027 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4028 post to the group under the point.  If the prefix is 1, prompt
4029 for group to post to.  @xref{Composing Messages}.
4030
4031 This function actually prepares a news even when using mail groups.
4032 This is useful for ``posting'' messages to mail groups without actually
4033 sending them over the network: they're just saved directly to the group
4034 in question.  The corresponding back end must have a request-post method
4035 for this to work though.
4036
4037 @end table
4038
4039 Variables for the group buffer:
4040
4041 @table @code
4042
4043 @item gnus-group-mode-hook
4044 @vindex gnus-group-mode-hook
4045 is called after the group buffer has been
4046 created.
4047
4048 @item gnus-group-prepare-hook
4049 @vindex gnus-group-prepare-hook
4050 is called after the group buffer is
4051 generated.  It may be used to modify the buffer in some strange,
4052 unnatural way.
4053
4054 @item gnus-group-prepared-hook
4055 @vindex gnus-group-prepare-hook
4056 is called as the very last thing after the group buffer has been
4057 generated.  It may be used to move point around, for instance.
4058
4059 @item gnus-permanently-visible-groups
4060 @vindex gnus-permanently-visible-groups
4061 Groups matching this regexp will always be listed in the group buffer,
4062 whether they are empty or not.
4063
4064 @item gnus-group-name-charset-method-alist
4065 @vindex gnus-group-name-charset-method-alist
4066 An alist of method and the charset for group names.  It is used to show
4067 non-@acronym{ASCII} group names.
4068
4069 For example:
4070 @lisp
4071 (setq gnus-group-name-charset-method-alist
4072     '(((nntp "news.com.cn") . cn-gb-2312)))
4073 @end lisp
4074
4075 @item gnus-group-name-charset-group-alist
4076 @cindex UTF-8 group names
4077 @vindex gnus-group-name-charset-group-alist
4078 An alist of regexp of group name and the charset for group names.  It
4079 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4080 utf-8))} is the default value if UTF-8 is supported, otherwise the
4081 default is @code{nil}.
4082
4083 For example:
4084 @lisp
4085 (setq gnus-group-name-charset-group-alist
4086     '(("\\.com\\.cn:" . cn-gb-2312)))
4087 @end lisp
4088
4089 @end table
4090
4091 @node Scanning New Messages
4092 @subsection Scanning New Messages
4093 @cindex new messages
4094 @cindex scanning new news
4095
4096 @table @kbd
4097
4098 @item g
4099 @kindex g (Group)
4100 @findex gnus-group-get-new-news
4101 @c @icon{gnus-group-get-new-news}
4102 Check the server(s) for new articles.  If the numerical prefix is used,
4103 this command will check only groups of level @var{arg} and lower
4104 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4105 command will force a total re-reading of the active file(s) from the
4106 back end(s).
4107
4108 @item M-g
4109 @kindex M-g (Group)
4110 @findex gnus-group-get-new-news-this-group
4111 @vindex gnus-goto-next-group-when-activating
4112 @c @icon{gnus-group-get-new-news-this-group}
4113 Check whether new articles have arrived in the current group
4114 (@code{gnus-group-get-new-news-this-group}).
4115 @code{gnus-goto-next-group-when-activating} says whether this command is
4116 to move point to the next group or not.  It is @code{t} by default.
4117
4118 @findex gnus-activate-all-groups
4119 @cindex activating groups
4120 @item C-c M-g
4121 @kindex C-c M-g (Group)
4122 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4123
4124 @item R
4125 @kindex R (Group)
4126 @cindex restarting
4127 @findex gnus-group-restart
4128 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4129 file(s), closes the connection to all servers, clears up all run-time
4130 gnus variables, and then starts gnus all over again.
4131
4132 @end table
4133
4134 @vindex gnus-get-new-news-hook
4135 @code{gnus-get-new-news-hook} is run just before checking for new news.
4136
4137 @vindex gnus-after-getting-new-news-hook
4138 @code{gnus-after-getting-new-news-hook} is run after checking for new
4139 news.
4140
4141
4142 @node Group Information
4143 @subsection Group Information
4144 @cindex group information
4145 @cindex information on groups
4146
4147 @table @kbd
4148
4149
4150 @item H f
4151 @kindex H f (Group)
4152 @findex gnus-group-fetch-faq
4153 @vindex gnus-group-faq-directory
4154 @cindex FAQ
4155 @cindex ange-ftp
4156 Try to fetch the @acronym{FAQ} for the current group
4157 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4158 from @code{gnus-group-faq-directory}, which is usually a directory on
4159 a remote machine.  This variable can also be a list of directories.
4160 In that case, giving a prefix to this command will allow you to choose
4161 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4162 used for fetching the file.
4163
4164 If fetching from the first site is unsuccessful, gnus will attempt to go
4165 through @code{gnus-group-faq-directory} and try to open them one by one.
4166
4167 @item H c
4168 @kindex H c (Group)
4169 @findex gnus-group-fetch-charter
4170 @vindex gnus-group-charter-alist
4171 @cindex charter
4172 Try to open the charter for the current group in a web browser
4173 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4174 prefix argument.
4175
4176 Gnus will use @code{gnus-group-charter-alist} to find the location of
4177 the charter.  If no location is known, Gnus will fetch the control
4178 messages for the group, which in some cases includes the charter.
4179
4180 @item H C
4181 @kindex H C (Group)
4182 @findex gnus-group-fetch-control
4183 @vindex gnus-group-fetch-control-use-browse-url
4184 @cindex control message
4185 Fetch the control messages for the group from the archive at
4186 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4187 group if given a prefix argument.
4188
4189 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4190 Gnus will open the control messages in a browser using
4191 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4192 and displayed in an ephemeral group.
4193
4194 Note that the control messages are compressed.  To use this command
4195 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4196 Files, ,Compressed Files, emacs, The Emacs Manual}).
4197
4198 @item H d
4199 @itemx C-c C-d
4200 @c @icon{gnus-group-describe-group}
4201 @kindex H d (Group)
4202 @kindex C-c C-d (Group)
4203 @cindex describing groups
4204 @cindex group description
4205 @findex gnus-group-describe-group
4206 Describe the current group (@code{gnus-group-describe-group}).  If given
4207 a prefix, force Gnus to re-read the description from the server.
4208
4209 @item M-d
4210 @kindex M-d (Group)
4211 @findex gnus-group-describe-all-groups
4212 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4213 prefix, force gnus to re-read the description file from the server.
4214
4215 @item H v
4216 @itemx V
4217 @kindex V (Group)
4218 @kindex H v (Group)
4219 @cindex version
4220 @findex gnus-version
4221 Display current gnus version numbers (@code{gnus-version}).
4222
4223 @item ?
4224 @kindex ? (Group)
4225 @findex gnus-group-describe-briefly
4226 Give a very short help message (@code{gnus-group-describe-briefly}).
4227
4228 @item C-c C-i
4229 @kindex C-c C-i (Group)
4230 @cindex info
4231 @cindex manual
4232 @findex gnus-info-find-node
4233 Go to the gnus info node (@code{gnus-info-find-node}).
4234 @end table
4235
4236
4237 @node Group Timestamp
4238 @subsection Group Timestamp
4239 @cindex timestamps
4240 @cindex group timestamps
4241
4242 It can be convenient to let gnus keep track of when you last read a
4243 group.  To set the ball rolling, you should add
4244 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4245
4246 @lisp
4247 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4248 @end lisp
4249
4250 After doing this, each time you enter a group, it'll be recorded.
4251
4252 This information can be displayed in various ways---the easiest is to
4253 use the @samp{%d} spec in the group line format:
4254
4255 @lisp
4256 (setq gnus-group-line-format
4257       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4258 @end lisp
4259
4260 This will result in lines looking like:
4261
4262 @example
4263 *        0: mail.ding                                19961002T012943
4264          0: custom                                   19961002T012713
4265 @end example
4266
4267 As you can see, the date is displayed in compact ISO 8601 format.  This
4268 may be a bit too much, so to just display the date, you could say
4269 something like:
4270
4271 @lisp
4272 (setq gnus-group-line-format
4273       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4274 @end lisp
4275
4276 If you would like greater control of the time format, you can use a
4277 user-defined format spec.  Something like the following should do the
4278 trick:
4279
4280 @lisp
4281 (setq gnus-group-line-format
4282       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4283 (defun gnus-user-format-function-d (headers)
4284   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4285     (if time
4286         (format-time-string "%b %d  %H:%M" time)
4287       "")))
4288 @end lisp
4289
4290
4291 @node File Commands
4292 @subsection File Commands
4293 @cindex file commands
4294
4295 @table @kbd
4296
4297 @item r
4298 @kindex r (Group)
4299 @findex gnus-group-read-init-file
4300 @vindex gnus-init-file
4301 @cindex reading init file
4302 Re-read the init file (@code{gnus-init-file}, which defaults to
4303 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4304
4305 @item s
4306 @kindex s (Group)
4307 @findex gnus-group-save-newsrc
4308 @cindex saving .newsrc
4309 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4310 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4311 file(s) whether Gnus thinks it is necessary or not.
4312
4313 @c @item Z
4314 @c @kindex Z (Group)
4315 @c @findex gnus-group-clear-dribble
4316 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4317
4318 @end table
4319
4320
4321 @node Sieve Commands
4322 @subsection Sieve Commands
4323 @cindex group sieve commands
4324
4325 Sieve is a server-side mail filtering language.  In Gnus you can use
4326 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4327 sieve rules that should apply to each group.  Gnus provides two
4328 commands to translate all these group parameters into a proper Sieve
4329 script that can be transfered to the server somehow.
4330
4331 @vindex gnus-sieve-file
4332 @vindex gnus-sieve-region-start
4333 @vindex gnus-sieve-region-end
4334 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4335 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4336 between two delimiters, @code{gnus-sieve-region-start} and
4337 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4338 outside these delimiters that will not be removed the next time you
4339 regenerate the Sieve script.
4340
4341 @vindex gnus-sieve-crosspost
4342 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4343 is generated.  If it is non-@code{nil} (the default) articles is
4344 placed in all groups that have matching rules, otherwise the article
4345 is only placed in the group with the first matching rule.  For
4346 example, the group parameter @samp{(sieve address "sender"
4347 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4348 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4349 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4350 except that the line containing the call to @code{stop} is removed.)
4351
4352 @example
4353 if address "sender" "owner-ding@@hpc.uh.edu" @{
4354         fileinto "INBOX.ding";
4355         stop;
4356 @}
4357 @end example
4358
4359 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4360
4361 @table @kbd
4362
4363 @item D g
4364 @kindex D g (Group)
4365 @findex gnus-sieve-generate
4366 @vindex gnus-sieve-file
4367 @cindex generating sieve script
4368 Regenerate a Sieve script from the @code{sieve} group parameters and
4369 put you into the @code{gnus-sieve-file} without saving it.
4370
4371 @item D u
4372 @kindex D u (Group)
4373 @findex gnus-sieve-update
4374 @vindex gnus-sieve-file
4375 @cindex updating sieve script
4376 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4377 @code{sieve} group parameters, save the file and upload it to the
4378 server using the @code{sieveshell} program.
4379
4380 @end table
4381
4382
4383 @node Summary Buffer
4384 @chapter Summary Buffer
4385 @cindex summary buffer
4386
4387 A line for each article is displayed in the summary buffer.  You can
4388 move around, read articles, post articles and reply to articles.
4389
4390 The most common way to a summary buffer is to select a group from the
4391 group buffer (@pxref{Selecting a Group}).
4392
4393 You can have as many summary buffers open as you wish.
4394
4395 @menu
4396 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4397 * Summary Maneuvering::         Moving around the summary buffer.
4398 * Choosing Articles::           Reading articles.
4399 * Paging the Article::          Scrolling the current article.
4400 * Reply Followup and Post::     Posting articles.
4401 * Delayed Articles::            Send articles at a later time.
4402 * Marking Articles::            Marking articles as read, expirable, etc.
4403 * Limiting::                    You can limit the summary buffer.
4404 * Threading::                   How threads are made.
4405 * Sorting the Summary Buffer::  How articles and threads are sorted.
4406 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4407 * Article Caching::             You may store articles in a cache.
4408 * Persistent Articles::         Making articles expiry-resistant.
4409 * Article Backlog::             Having already read articles hang around.
4410 * Saving Articles::             Ways of customizing article saving.
4411 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4412 * Article Treatment::           The article buffer can be mangled at will.
4413 * MIME Commands::               Doing MIMEy things with the articles.
4414 * Charsets::                    Character set issues.
4415 * Article Commands::            Doing various things with the article buffer.
4416 * Summary Sorting::             Sorting the summary buffer in various ways.
4417 * Finding the Parent::          No child support? Get the parent.
4418 * Alternative Approaches::      Reading using non-default summaries.
4419 * Tree Display::                A more visual display of threads.
4420 * Mail Group Commands::         Some commands can only be used in mail groups.
4421 * Various Summary Stuff::       What didn't fit anywhere else.
4422 * Exiting the Summary Buffer::  Returning to the Group buffer,
4423                                 or reselecting the current group.
4424 * Crosspost Handling::          How crossposted articles are dealt with.
4425 * Duplicate Suppression::       An alternative when crosspost handling fails.
4426 * Security::                    Decrypt and Verify.
4427 * Mailing List::                Mailing list minor mode.
4428 @end menu
4429
4430
4431 @node Summary Buffer Format
4432 @section Summary Buffer Format
4433 @cindex summary buffer format
4434
4435 @iftex
4436 @iflatex
4437 \gnusfigure{The Summary Buffer}{180}{
4438 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4439 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4440 }
4441 @end iflatex
4442 @end iftex
4443
4444 @menu
4445 * Summary Buffer Lines::        You can specify how summary lines should look.
4446 * To From Newsgroups::          How to not display your own name.
4447 * Summary Buffer Mode Line::    You can say how the mode line should look.
4448 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4449 @end menu
4450
4451 @findex mail-extract-address-components
4452 @findex gnus-extract-address-components
4453 @vindex gnus-extract-address-components
4454 Gnus will use the value of the @code{gnus-extract-address-components}
4455 variable as a function for getting the name and address parts of a
4456 @code{From} header.  Three pre-defined functions exist:
4457 @code{gnus-extract-address-components}, which is the default, quite
4458 fast, and too simplistic solution;
4459 @code{mail-extract-address-components}, which works nicely, but is
4460 slower; and @code{std11-extract-address-components}, which works very
4461 nicely, but is slower.  The default function will return the wrong
4462 answer in 5% of the cases.  If this is unacceptable to you, use the
4463 other function instead:
4464
4465 @lisp
4466 (setq gnus-extract-address-components
4467       'mail-extract-address-components)
4468 @end lisp
4469
4470 @vindex gnus-summary-same-subject
4471 @code{gnus-summary-same-subject} is a string indicating that the current
4472 article has the same subject as the previous.  This string will be used
4473 with those specs that require it.  The default is @code{""}.
4474
4475
4476 @node Summary Buffer Lines
4477 @subsection Summary Buffer Lines
4478
4479 @vindex gnus-summary-line-format
4480 You can change the format of the lines in the summary buffer by changing
4481 the @code{gnus-summary-line-format} variable.  It works along the same
4482 lines as a normal @code{format} string, with some extensions
4483 (@pxref{Formatting Variables}).
4484
4485 There should always be a colon or a point position marker on the line;
4486 the cursor always moves to the point position marker or the colon after
4487 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4488 possible to change this.  Just write a new function
4489 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4490 @xref{Positioning Point}.
4491
4492 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4493
4494 The following format specification characters and extended format
4495 specification(s) are understood:
4496
4497 @table @samp
4498 @item N
4499 Article number.
4500 @item S
4501 Subject string.  List identifiers stripped,
4502 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4503 @item s
4504 Subject if the article is the root of the thread or the previous article
4505 had a different subject, @code{gnus-summary-same-subject} otherwise.
4506 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4507 @item F
4508 Full @code{From} header.
4509 @item n
4510 The name (from the @code{From} header).
4511 @item f
4512 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4513 From Newsgroups}).
4514 @item a
4515 The name (from the @code{From} header).  This differs from the @code{n}
4516 spec in that it uses the function designated by the
4517 @code{gnus-extract-address-components} variable, which is slower, but
4518 may be more thorough.
4519 @item A
4520 The address (from the @code{From} header).  This works the same way as
4521 the @code{a} spec.
4522 @item L
4523 Number of lines in the article.
4524 @item c
4525 Number of characters in the article.  This specifier is not supported
4526 in some methods (like nnfolder).
4527 @item k
4528 Pretty-printed version of the number of characters in the article;
4529 for example, @samp{1.2k} or @samp{0.4M}.
4530 @item I
4531 Indentation based on thread level (@pxref{Customizing Threading}).
4532 @item B
4533 A complex trn-style thread tree, showing response-connecting trace
4534 lines.  A thread could be drawn like this:
4535
4536 @example
4537 >
4538 +->
4539 | +->
4540 | | \->
4541 | |   \->
4542 | \->
4543 +->
4544 \->
4545 @end example
4546
4547 You can customize the appearance with the following options.  Note
4548 that it is possible to make the thread display look really neat by
4549 replacing the default @acronym{ASCII} characters with graphic
4550 line-drawing glyphs.
4551 @table @code
4552 @item gnus-sum-thread-tree-root
4553 @vindex gnus-sum-thread-tree-root
4554 Used for the root of a thread.  If @code{nil}, use subject
4555 instead.  The default is @samp{> }.
4556
4557 @item gnus-sum-thread-tree-false-root
4558 @vindex gnus-sum-thread-tree-false-root
4559 Used for the false root of a thread (@pxref{Loose Threads}).  If
4560 @code{nil}, use subject instead.  The default is @samp{> }.
4561
4562 @item gnus-sum-thread-tree-single-indent
4563 @vindex gnus-sum-thread-tree-single-indent
4564 Used for a thread with just one message.  If @code{nil}, use subject
4565 instead.  The default is @samp{}.
4566
4567 @item gnus-sum-thread-tree-vertical
4568 @vindex gnus-sum-thread-tree-vertical
4569 Used for drawing a vertical line.  The default is @samp{| }.
4570
4571 @item gnus-sum-thread-tree-indent
4572 @vindex gnus-sum-thread-tree-indent
4573 Used for indenting.  The default is @samp{  }.
4574
4575 @item gnus-sum-thread-tree-leaf-with-other
4576 @vindex gnus-sum-thread-tree-leaf-with-other
4577 Used for a leaf with brothers.  The default is @samp{+-> }.
4578
4579 @item gnus-sum-thread-tree-single-leaf
4580 @vindex gnus-sum-thread-tree-single-leaf
4581 Used for a leaf without brothers.  The default is @samp{\-> }
4582
4583 @end table
4584
4585 @item T
4586 Nothing if the article is a root and lots of spaces if it isn't (it
4587 pushes everything after it off the screen).
4588 @item [
4589 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4590 for adopted articles (@pxref{Customizing Threading}).
4591 @item ]
4592 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4593 for adopted articles.
4594 @item >
4595 One space for each thread level.
4596 @item <
4597 Twenty minus thread level spaces.
4598 @item U
4599 Unread.  @xref{Read Articles}.
4600
4601 @item R
4602 This misleadingly named specifier is the @dfn{secondary mark}.  This
4603 mark will say whether the article has been replied to, has been cached,
4604 or has been saved.  @xref{Other Marks}.
4605
4606 @item i
4607 Score as a number (@pxref{Scoring}).
4608 @item z
4609 @vindex gnus-summary-zcore-fuzz
4610 Zcore, @samp{+} if above the default level and @samp{-} if below the
4611 default level.  If the difference between
4612 @code{gnus-summary-default-score} and the score is less than
4613 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4614 @item V
4615 Total thread score.
4616 @item x
4617 @code{Xref}.
4618 @item D
4619 @code{Date}.
4620 @item d
4621 The @code{Date} in @code{DD-MMM} format.
4622 @item o
4623 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4624 @item M
4625 @code{Message-ID}.
4626 @item r
4627 @code{References}.
4628 @item t
4629 Number of articles in the current sub-thread.  Using this spec will slow
4630 down summary buffer generation somewhat.
4631 @item e
4632 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4633 article has any children.
4634 @item P
4635 The line number.
4636 @item O
4637 Download mark.
4638 @item &user-date;
4639 Age sensitive date format.  Various date format is defined in
4640 @code{gnus-user-date-format-alist}.
4641 @item u
4642 User defined specifier.  The next character in the format string should
4643 be a letter.  Gnus will call the function
4644 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4645 following @samp{%u}.  The function will be passed the current header as
4646 argument.  The function should return a string, which will be inserted
4647 into the summary just like information from any other summary specifier.
4648 @end table
4649
4650 Text between @samp{%(} and @samp{%)} will be highlighted with
4651 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4652 There can only be one such area.
4653
4654 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4655 have to be handled with care.  For reasons of efficiency, gnus will
4656 compute what column these characters will end up in, and ``hard-code''
4657 that.  This means that it is invalid to have these specs after a
4658 variable-length spec.  Well, you might not be arrested, but your summary
4659 buffer will look strange, which is bad enough.
4660
4661 The smart choice is to have these specs as far to the left as possible.
4662 (Isn't that the case with everything, though?  But I digress.)
4663
4664 This restriction may disappear in later versions of gnus.
4665
4666
4667 @node To From Newsgroups
4668 @subsection To From Newsgroups
4669 @cindex To
4670 @cindex Newsgroups
4671
4672 In some groups (particularly in archive groups), the @code{From} header
4673 isn't very interesting, since all the articles there are written by
4674 you.  To display the information in the @code{To} or @code{Newsgroups}
4675 headers instead, you need to decide three things: What information to
4676 gather; where to display it; and when to display it.
4677
4678 @enumerate
4679 @item
4680 @vindex gnus-extra-headers
4681 The reading of extra header information is controlled by the
4682 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4683 instance:
4684
4685 @lisp
4686 (setq gnus-extra-headers
4687       '(To Newsgroups X-Newsreader))
4688 @end lisp
4689
4690 This will result in Gnus trying to obtain these three headers, and
4691 storing it in header structures for later easy retrieval.
4692
4693 @item
4694 @findex gnus-extra-header
4695 The value of these extra headers can be accessed via the
4696 @code{gnus-extra-header} function.  Here's a format line spec that will
4697 access the @code{X-Newsreader} header:
4698
4699 @example
4700 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4701 @end example
4702
4703 @item
4704 @vindex gnus-ignored-from-addresses
4705 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4706 summary line spec returns the @code{To}, @code{Newsreader} or
4707 @code{From} header.  If this regexp matches the contents of the
4708 @code{From} header, the value of the @code{To} or @code{Newsreader}
4709 headers are used instead.
4710
4711 @end enumerate
4712
4713 @vindex nnmail-extra-headers
4714 A related variable is @code{nnmail-extra-headers}, which controls when
4715 to include extra headers when generating overview (@acronym{NOV}) files.
4716 If you have old overview files, you should regenerate them after
4717 changing this variable, by entering the server buffer using @kbd{^},
4718 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4719 regeneration.
4720
4721 @vindex gnus-summary-line-format
4722 You also have to instruct Gnus to display the data by changing the
4723 @code{%n} spec to the @code{%f} spec in the
4724 @code{gnus-summary-line-format} variable.
4725
4726 In summary, you'd typically put something like the following in
4727 @file{~/.gnus.el}:
4728
4729 @lisp
4730 (setq gnus-extra-headers
4731       '(To Newsgroups))
4732 (setq nnmail-extra-headers gnus-extra-headers)
4733 (setq gnus-summary-line-format
4734       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4735 (setq gnus-ignored-from-addresses
4736       "Your Name Here")
4737 @end lisp
4738
4739 (The values listed above are the default values in Gnus.  Alter them
4740 to fit your needs.)
4741
4742 A note for news server administrators, or for users who wish to try to
4743 convince their news server administrator to provide some additional
4744 support:
4745
4746 The above is mostly useful for mail groups, where you have control over
4747 the @acronym{NOV} files that are created.  However, if you can persuade your
4748 nntp admin to add (in the usual implementation, notably INN):
4749
4750 @example
4751 Newsgroups:full
4752 @end example
4753
4754 to the end of her @file{overview.fmt} file, then you can use that just
4755 as you would the extra headers from the mail groups.
4756
4757
4758 @node Summary Buffer Mode Line
4759 @subsection Summary Buffer Mode Line
4760
4761 @vindex gnus-summary-mode-line-format
4762 You can also change the format of the summary mode bar (@pxref{Mode Line
4763 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4764 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4765
4766 Here are the elements you can play with:
4767
4768 @table @samp
4769 @item G
4770 Group name.
4771 @item p
4772 Unprefixed group name.
4773 @item A
4774 Current article number.
4775 @item z
4776 Current article score.
4777 @item V
4778 Gnus version.
4779 @item U
4780 Number of unread articles in this group.
4781 @item e
4782 Number of unread articles in this group that aren't displayed in the
4783 summary buffer.
4784 @item Z
4785 A string with the number of unread and unselected articles represented
4786 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4787 articles, and just as @samp{<%U more>} if there are just unread articles
4788 and no unselected ones.
4789 @item g
4790 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4791 shortened to @samp{r.a.anime}.
4792 @item S
4793 Subject of the current article.
4794 @item u
4795 User-defined spec (@pxref{User-Defined Specs}).
4796 @item s
4797 Name of the current score file (@pxref{Scoring}).
4798 @item d
4799 Number of dormant articles (@pxref{Unread Articles}).
4800 @item t
4801 Number of ticked articles (@pxref{Unread Articles}).
4802 @item r
4803 Number of articles that have been marked as read in this session.
4804 @item E
4805 Number of articles expunged by the score files.
4806 @end table
4807
4808
4809 @node Summary Highlighting
4810 @subsection Summary Highlighting
4811
4812 @table @code
4813
4814 @item gnus-visual-mark-article-hook
4815 @vindex gnus-visual-mark-article-hook
4816 This hook is run after selecting an article.  It is meant to be used for
4817 highlighting the article in some way.  It is not run if
4818 @code{gnus-visual} is @code{nil}.
4819
4820 @item gnus-summary-update-hook
4821 @vindex gnus-summary-update-hook
4822 This hook is called when a summary line is changed.  It is not run if
4823 @code{gnus-visual} is @code{nil}.
4824
4825 @item gnus-summary-selected-face
4826 @vindex gnus-summary-selected-face
4827 This is the face (or @dfn{font} as some people call it) used to
4828 highlight the current article in the summary buffer.
4829
4830 @item gnus-summary-highlight
4831 @vindex gnus-summary-highlight
4832 Summary lines are highlighted according to this variable, which is a
4833 list where the elements are of the format @code{(@var{form}
4834 . @var{face})}.  If you would, for instance, like ticked articles to be
4835 italic and high-scored articles to be bold, you could set this variable
4836 to something like
4837 @lisp
4838 (((eq mark gnus-ticked-mark) . italic)
4839  ((> score default) . bold))
4840 @end lisp
4841 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4842 @var{face} will be applied to the line.
4843 @end table
4844
4845
4846 @node Summary Maneuvering
4847 @section Summary Maneuvering
4848 @cindex summary movement
4849
4850 All the straight movement commands understand the numeric prefix and
4851 behave pretty much as you'd expect.
4852
4853 None of these commands select articles.
4854
4855 @table @kbd
4856 @item G M-n
4857 @itemx M-n
4858 @kindex M-n (Summary)
4859 @kindex G M-n (Summary)
4860 @findex gnus-summary-next-unread-subject
4861 Go to the next summary line of an unread article
4862 (@code{gnus-summary-next-unread-subject}).
4863
4864 @item G M-p
4865 @itemx M-p
4866 @kindex M-p (Summary)
4867 @kindex G M-p (Summary)
4868 @findex gnus-summary-prev-unread-subject
4869 Go to the previous summary line of an unread article
4870 (@code{gnus-summary-prev-unread-subject}).
4871
4872 @item G g
4873 @kindex G g (Summary)
4874 @findex gnus-summary-goto-subject
4875 Ask for an article number and then go to the summary line of that article
4876 without displaying the article (@code{gnus-summary-goto-subject}).
4877 @end table
4878
4879 If gnus asks you to press a key to confirm going to the next group, you
4880 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4881 buffer, searching for the next group to read without actually returning
4882 to the group buffer.
4883
4884 Variables related to summary movement:
4885
4886 @table @code
4887
4888 @vindex gnus-auto-select-next
4889 @item gnus-auto-select-next
4890 If you issue one of the movement commands (like @kbd{n}) and there are
4891 no more unread articles after the current one, gnus will offer to go to
4892 the next group.  If this variable is @code{t} and the next group is
4893 empty, gnus will exit summary mode and return to the group buffer.  If
4894 this variable is neither @code{t} nor @code{nil}, gnus will select the
4895 next group with unread articles.  As a special case, if this variable
4896 is @code{quietly}, Gnus will select the next group without asking for
4897 confirmation.  If this variable is @code{almost-quietly}, the same
4898 will happen only if you are located on the last article in the group.
4899 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4900 command will go to the next group without confirmation.  Also
4901 @pxref{Group Levels}.
4902
4903 @item gnus-auto-select-same
4904 @vindex gnus-auto-select-same
4905 If non-@code{nil}, all the movement commands will try to go to the next
4906 article with the same subject as the current.  (@dfn{Same} here might
4907 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4908 for details (@pxref{Customizing Threading}).)  If there are no more
4909 articles with the same subject, go to the first unread article.
4910
4911 This variable is not particularly useful if you use a threaded display.
4912
4913 @item gnus-summary-check-current
4914 @vindex gnus-summary-check-current
4915 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4916 to the next (or previous) article if the current article is unread.
4917 Instead, they will choose the current article.
4918
4919 @item gnus-auto-center-summary
4920 @vindex gnus-auto-center-summary
4921 If non-@code{nil}, gnus will keep the point in the summary buffer
4922 centered at all times.  This makes things quite tidy, but if you have a
4923 slow network connection, or simply do not like this un-Emacsism, you can
4924 set this variable to @code{nil} to get the normal Emacs scrolling
4925 action.  This will also inhibit horizontal re-centering of the summary
4926 buffer, which might make it more inconvenient to read extremely long
4927 threads.
4928
4929 This variable can also be a number.  In that case, center the window at
4930 the given number of lines from the top.
4931
4932 @end table
4933
4934
4935 @node Choosing Articles
4936 @section Choosing Articles
4937 @cindex selecting articles
4938
4939 @menu
4940 * Choosing Commands::           Commands for choosing articles.
4941 * Choosing Variables::          Variables that influence these commands.
4942 @end menu
4943
4944
4945 @node Choosing Commands
4946 @subsection Choosing Commands
4947
4948 None of the following movement commands understand the numeric prefix,
4949 and they all select and display an article.
4950
4951 If you want to fetch new articles or redisplay the group, see
4952 @ref{Exiting the Summary Buffer}.
4953
4954 @table @kbd
4955 @item SPACE
4956 @kindex SPACE (Summary)
4957 @findex gnus-summary-next-page
4958 Select the current article, or, if that one's read already, the next
4959 unread article (@code{gnus-summary-next-page}).
4960
4961 If you have an article window open already and you press @kbd{SPACE}
4962 again, the article will be scrolled.  This lets you conveniently
4963 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
4964
4965 @item G n
4966 @itemx n
4967 @kindex n (Summary)
4968 @kindex G n (Summary)
4969 @findex gnus-summary-next-unread-article
4970 @c @icon{gnus-summary-next-unread}
4971 Go to next unread article (@code{gnus-summary-next-unread-article}).
4972
4973 @item G p
4974 @itemx p
4975 @kindex p (Summary)
4976 @findex gnus-summary-prev-unread-article
4977 @c @icon{gnus-summary-prev-unread}
4978 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4979
4980 @item G N
4981 @itemx N
4982 @kindex N (Summary)
4983 @kindex G N (Summary)
4984 @findex gnus-summary-next-article
4985 Go to the next article (@code{gnus-summary-next-article}).
4986
4987 @item G P
4988 @itemx P
4989 @kindex P (Summary)
4990 @kindex G P (Summary)
4991 @findex gnus-summary-prev-article
4992 Go to the previous article (@code{gnus-summary-prev-article}).
4993
4994 @item G C-n
4995 @kindex G C-n (Summary)
4996 @findex gnus-summary-next-same-subject
4997 Go to the next article with the same subject
4998 (@code{gnus-summary-next-same-subject}).
4999
5000 @item G C-p
5001 @kindex G C-p (Summary)
5002 @findex gnus-summary-prev-same-subject
5003 Go to the previous article with the same subject
5004 (@code{gnus-summary-prev-same-subject}).
5005
5006 @item G f
5007 @itemx .
5008 @kindex G f  (Summary)
5009 @kindex .  (Summary)
5010 @findex gnus-summary-first-unread-article
5011 Go to the first unread article
5012 (@code{gnus-summary-first-unread-article}).
5013
5014 @item G b
5015 @itemx ,
5016 @kindex G b (Summary)
5017 @kindex , (Summary)
5018 @findex gnus-summary-best-unread-article
5019 Go to the unread article with the highest score
5020 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5021 go to the first unread article that has a score over the default score.
5022
5023 @item G l
5024 @itemx l
5025 @kindex l (Summary)
5026 @kindex G l (Summary)
5027 @findex gnus-summary-goto-last-article
5028 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5029
5030 @item G o
5031 @kindex G o (Summary)
5032 @findex gnus-summary-pop-article
5033 @cindex history
5034 @cindex article history
5035 Pop an article off the summary history and go to this article
5036 (@code{gnus-summary-pop-article}).  This command differs from the
5037 command above in that you can pop as many previous articles off the
5038 history as you like, while @kbd{l} toggles the two last read articles.
5039 For a somewhat related issue (if you use these commands a lot),
5040 @pxref{Article Backlog}.
5041
5042 @item G j
5043 @itemx j
5044 @kindex j (Summary)
5045 @kindex G j (Summary)
5046 @findex gnus-summary-goto-article
5047 Ask for an article number or @code{Message-ID}, and then go to that
5048 article (@code{gnus-summary-goto-article}).
5049
5050 @end table
5051
5052
5053 @node Choosing Variables
5054 @subsection Choosing Variables
5055
5056 Some variables relevant for moving and selecting articles:
5057
5058 @table @code
5059 @item gnus-auto-extend-newsgroup
5060 @vindex gnus-auto-extend-newsgroup
5061 All the movement commands will try to go to the previous (or next)
5062 article, even if that article isn't displayed in the Summary buffer if
5063 this variable is non-@code{nil}.  Gnus will then fetch the article from
5064 the server and display it in the article buffer.
5065
5066 @item gnus-select-article-hook
5067 @vindex gnus-select-article-hook
5068 This hook is called whenever an article is selected.  By default it
5069 exposes any threads hidden under the selected article.  If you would
5070 like each article to be saved in the Agent as you read it, putting
5071 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5072
5073 @item gnus-mark-article-hook
5074 @vindex gnus-mark-article-hook
5075 @findex gnus-summary-mark-unread-as-read
5076 @findex gnus-summary-mark-read-and-unread-as-read
5077 @findex gnus-unread-mark
5078 This hook is called whenever an article is selected.  It is intended to
5079 be used for marking articles as read.  The default value is
5080 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5081 mark of almost any article you read to @code{gnus-unread-mark}.  The
5082 only articles not affected by this function are ticked, dormant, and
5083 expirable articles.  If you'd instead like to just have unread articles
5084 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5085 instead.  It will leave marks like @code{gnus-low-score-mark},
5086 @code{gnus-del-mark} (and so on) alone.
5087
5088 @end table
5089
5090
5091 @node Paging the Article
5092 @section Scrolling the Article
5093 @cindex article scrolling
5094
5095 @table @kbd
5096
5097 @item SPACE
5098 @kindex SPACE (Summary)
5099 @findex gnus-summary-next-page
5100 Pressing @kbd{SPACE} will scroll the current article forward one page,
5101 or, if you have come to the end of the current article, will choose the
5102 next article (@code{gnus-summary-next-page}).
5103
5104 @vindex gnus-article-boring-faces
5105 @vindex gnus-article-skip-boring
5106 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5107 the article consists only of citations and signature, then it will be
5108 skipped; the next article will be shown instead.  You can customize
5109 what is considered uninteresting with
5110 @code{gnus-article-boring-faces}.  You can manually view the article's
5111 pages, no matter how boring, using @kbd{C-M-v}.
5112
5113 @item DEL
5114 @kindex DEL (Summary)
5115 @findex gnus-summary-prev-page
5116 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5117
5118 @item RET
5119 @kindex RET (Summary)
5120 @findex gnus-summary-scroll-up
5121 Scroll the current article one line forward
5122 (@code{gnus-summary-scroll-up}).
5123
5124 @item M-RET
5125 @kindex M-RET (Summary)
5126 @findex gnus-summary-scroll-down
5127 Scroll the current article one line backward
5128 (@code{gnus-summary-scroll-down}).
5129
5130 @item A g
5131 @itemx g
5132 @kindex A g (Summary)
5133 @kindex g (Summary)
5134 @findex gnus-summary-show-article
5135 @vindex gnus-summary-show-article-charset-alist
5136 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5137 given a prefix, fetch the current article, but don't run any of the
5138 article treatment functions.  This will give you a ``raw'' article, just
5139 the way it came from the server.
5140
5141 If given a numerical prefix, you can do semi-manual charset stuff.
5142 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5143 encoded in the @code{cn-gb-2312} charset.  If you have
5144
5145 @lisp
5146 (setq gnus-summary-show-article-charset-alist
5147       '((1 . cn-gb-2312)
5148         (2 . big5)))
5149 @end lisp
5150
5151 then you can say @kbd{C-u 1 g} to get the same effect.
5152
5153 @item A <
5154 @itemx <
5155 @kindex < (Summary)
5156 @kindex A < (Summary)
5157 @findex gnus-summary-beginning-of-article
5158 Scroll to the beginning of the article
5159 (@code{gnus-summary-beginning-of-article}).
5160
5161 @item A >
5162 @itemx >
5163 @kindex > (Summary)
5164 @kindex A > (Summary)
5165 @findex gnus-summary-end-of-article
5166 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5167
5168 @item A s
5169 @itemx s
5170 @kindex A s (Summary)
5171 @kindex s (Summary)
5172 @findex gnus-summary-isearch-article
5173 Perform an isearch in the article buffer
5174 (@code{gnus-summary-isearch-article}).
5175
5176 @item h
5177 @kindex h (Summary)
5178 @findex gnus-summary-select-article-buffer
5179 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5180
5181 @end table
5182
5183
5184 @node Reply Followup and Post
5185 @section Reply, Followup and Post
5186
5187 @menu
5188 * Summary Mail Commands::       Sending mail.
5189 * Summary Post Commands::       Sending news.
5190 * Summary Message Commands::    Other Message-related commands.
5191 * Canceling and Superseding::
5192 @end menu
5193
5194
5195 @node Summary Mail Commands
5196 @subsection Summary Mail Commands
5197 @cindex mail
5198 @cindex composing mail
5199
5200 Commands for composing a mail message:
5201
5202 @table @kbd
5203
5204 @item S r
5205 @itemx r
5206 @kindex S r (Summary)
5207 @kindex r (Summary)
5208 @findex gnus-summary-reply
5209 @c @icon{gnus-summary-mail-reply}
5210 @c @icon{gnus-summary-reply}
5211 Mail a reply to the author of the current article
5212 (@code{gnus-summary-reply}).
5213
5214 @item S R
5215 @itemx R
5216 @kindex R (Summary)
5217 @kindex S R (Summary)
5218 @findex gnus-summary-reply-with-original
5219 @c @icon{gnus-summary-reply-with-original}
5220 Mail a reply to the author of the current article and include the
5221 original message (@code{gnus-summary-reply-with-original}).  This
5222 command uses the process/prefix convention.
5223
5224 @item S w
5225 @kindex S w (Summary)
5226 @findex gnus-summary-wide-reply
5227 Mail a wide reply to the author of the current article
5228 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5229 goes out to all people listed in the @code{To}, @code{From} (or
5230 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5231 present, that's used instead.
5232
5233 @item S W
5234 @kindex S W (Summary)
5235 @findex gnus-summary-wide-reply-with-original
5236 Mail a wide reply to the current article and include the original
5237 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5238 the process/prefix convention.
5239
5240 @item S v
5241 @kindex S v (Summary)
5242 @findex gnus-summary-very-wide-reply
5243 Mail a very wide reply to the author of the current article
5244 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5245 that goes out to all people listed in the @code{To}, @code{From} (or
5246 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5247 articles.  This command uses the process/prefix convention.
5248
5249 @item S V
5250 @kindex S V (Summary)
5251 @findex gnus-summary-very-wide-reply-with-original
5252 Mail a very wide reply to the author of the current article and include the
5253 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5254 command uses the process/prefix convention.
5255
5256 @item S B r
5257 @kindex S B r (Summary)
5258 @findex gnus-summary-reply-broken-reply-to
5259 Mail a reply to the author of the current article but ignore the
5260 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5261 If you need this because a mailing list incorrectly sets a
5262 @code{Reply-To} header pointing to the list, you probably want to set
5263 the @code{broken-reply-to} group parameter instead, so things will work
5264 correctly.  @xref{Group Parameters}.
5265
5266 @item S B R
5267 @kindex S B R (Summary)
5268 @findex gnus-summary-reply-broken-reply-to-with-original
5269 Mail a reply to the author of the current article and include the
5270 original message but ignore the @code{Reply-To} field
5271 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5272
5273 @item S o m
5274 @itemx C-c C-f
5275 @kindex S o m (Summary)
5276 @kindex C-c C-f (Summary)
5277 @findex gnus-summary-mail-forward
5278 @c @icon{gnus-summary-mail-forward}
5279 Forward the current article to some other person
5280 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5281 headers of the forwarded article.
5282
5283 @item S m
5284 @itemx m
5285 @kindex m (Summary)
5286 @kindex S m (Summary)
5287 @findex gnus-summary-mail-other-window
5288 @c @icon{gnus-summary-mail-originate}
5289 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5290 the posting style of the current group.  If given a prefix, disable that.
5291 If the prefix is 1, prompt for a group name to find the posting style.
5292
5293 @item S i
5294 @itemx i
5295 @kindex i (Summary)
5296 @kindex S i (Summary)
5297 @findex gnus-summary-news-other-window
5298 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5299 post to the current group.  If given a prefix, disable that.  If the
5300 prefix is 1, prompt for a group to post to.
5301
5302 This function actually prepares a news even when using mail groups.
5303 This is useful for ``posting'' messages to mail groups without actually
5304 sending them over the network: they're just saved directly to the group
5305 in question.  The corresponding back end must have a request-post method
5306 for this to work though.
5307
5308 @item S D b
5309 @kindex S D b (Summary)
5310 @findex gnus-summary-resend-bounced-mail
5311 @cindex bouncing mail
5312 If you have sent a mail, but the mail was bounced back to you for some
5313 reason (wrong address, transient failure), you can use this command to
5314 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5315 will be popped into a mail buffer where you can edit the headers before
5316 sending the mail off again.  If you give a prefix to this command, and
5317 the bounced mail is a reply to some other mail, gnus will try to fetch
5318 that mail and display it for easy perusal of its headers.  This might
5319 very well fail, though.
5320
5321 @item S D r
5322 @kindex S D r (Summary)
5323 @findex gnus-summary-resend-message
5324 Not to be confused with the previous command,
5325 @code{gnus-summary-resend-message} will prompt you for an address to
5326 send the current message off to, and then send it to that place.  The
5327 headers of the message won't be altered---but lots of headers that say
5328 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5329 means that you actually send a mail to someone that has a @code{To}
5330 header that (probably) points to yourself.  This will confuse people.
5331 So, natcherly you'll only do that if you're really eVIl.
5332
5333 This command is mainly used if you have several accounts and want to
5334 ship a mail to a different account of yours.  (If you're both
5335 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5336 to the @code{root} account, you may want to resend it to
5337 @code{postmaster}.  Ordnung muss sein!
5338
5339 This command understands the process/prefix convention
5340 (@pxref{Process/Prefix}).
5341
5342 @item S O m
5343 @kindex S O m (Summary)
5344 @findex gnus-summary-digest-mail-forward
5345 Digest the current series (@pxref{Decoding Articles}) and forward the
5346 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5347 command uses the process/prefix convention (@pxref{Process/Prefix}).
5348
5349 @item S M-c
5350 @kindex S M-c (Summary)
5351 @findex gnus-summary-mail-crosspost-complaint
5352 @cindex crossposting
5353 @cindex excessive crossposting
5354 Send a complaint about excessive crossposting to the author of the
5355 current article (@code{gnus-summary-mail-crosspost-complaint}).
5356
5357 @findex gnus-crosspost-complaint
5358 This command is provided as a way to fight back against the current
5359 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5360 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5361 command understands the process/prefix convention
5362 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5363
5364 @end table
5365
5366 Also @xref{Header Commands, ,Header Commands, message, The Message
5367 Manual}, for more information.
5368
5369
5370 @node Summary Post Commands
5371 @subsection Summary Post Commands
5372 @cindex post
5373 @cindex composing news
5374
5375 Commands for posting a news article:
5376
5377 @table @kbd
5378 @item S p
5379 @itemx a
5380 @kindex a (Summary)
5381 @kindex S p (Summary)
5382 @findex gnus-summary-post-news
5383 @c @icon{gnus-summary-post-news}
5384 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5385 default, post to the current group.  If given a prefix, disable that.
5386 If the prefix is 1, prompt for another group instead.
5387
5388 @item S f
5389 @itemx f
5390 @kindex f (Summary)
5391 @kindex S f (Summary)
5392 @findex gnus-summary-followup
5393 @c @icon{gnus-summary-followup}
5394 Post a followup to the current article (@code{gnus-summary-followup}).
5395
5396 @item S F
5397 @itemx F
5398 @kindex S F (Summary)
5399 @kindex F (Summary)
5400 @c @icon{gnus-summary-followup-with-original}
5401 @findex gnus-summary-followup-with-original
5402 Post a followup to the current article and include the original message
5403 (@code{gnus-summary-followup-with-original}).  This command uses the
5404 process/prefix convention.
5405
5406 @item S n
5407 @kindex S n (Summary)
5408 @findex gnus-summary-followup-to-mail
5409 Post a followup to the current article via news, even if you got the
5410 message through mail (@code{gnus-summary-followup-to-mail}).
5411
5412 @item S N
5413 @kindex S N (Summary)
5414 @findex gnus-summary-followup-to-mail-with-original
5415 Post a followup to the current article via news, even if you got the
5416 message through mail and include the original message
5417 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5418 the process/prefix convention.
5419
5420 @item S o p
5421 @kindex S o p (Summary)
5422 @findex gnus-summary-post-forward
5423 Forward the current article to a newsgroup
5424 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5425 headers of the forwarded article.
5426
5427 @item S O p
5428 @kindex S O p (Summary)
5429 @findex gnus-summary-digest-post-forward
5430 @cindex digests
5431 @cindex making digests
5432 Digest the current series and forward the result to a newsgroup
5433 (@code{gnus-summary-digest-post-forward}).  This command uses the
5434 process/prefix convention.
5435
5436 @item S u
5437 @kindex S u (Summary)
5438 @findex gnus-uu-post-news
5439 @c @icon{gnus-uu-post-news}
5440 Uuencode a file, split it into parts, and post it as a series
5441 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5442 @end table
5443
5444 Also @xref{Header Commands, ,Header Commands, message, The Message
5445 Manual}, for more information.
5446
5447
5448 @node Summary Message Commands
5449 @subsection Summary Message Commands
5450
5451 @table @kbd
5452 @item S y
5453 @kindex S y (Summary)
5454 @findex gnus-summary-yank-message
5455 Yank the current article into an already existing Message composition
5456 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5457 what message buffer you want to yank into, and understands the
5458 process/prefix convention (@pxref{Process/Prefix}).
5459
5460 @end table
5461
5462
5463 @node Canceling and Superseding
5464 @subsection Canceling Articles
5465 @cindex canceling articles
5466 @cindex superseding articles
5467
5468 Have you ever written something, and then decided that you really,
5469 really, really wish you hadn't posted that?
5470
5471 Well, you can't cancel mail, but you can cancel posts.
5472
5473 @findex gnus-summary-cancel-article
5474 @kindex C (Summary)
5475 @c @icon{gnus-summary-cancel-article}
5476 Find the article you wish to cancel (you can only cancel your own
5477 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5478 c} (@code{gnus-summary-cancel-article}).  Your article will be
5479 canceled---machines all over the world will be deleting your article.
5480 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5481
5482 Be aware, however, that not all sites honor cancels, so your article may
5483 live on here and there, while most sites will delete the article in
5484 question.
5485
5486 Gnus will use the ``current'' select method when canceling.  If you
5487 want to use the standard posting method, use the @samp{a} symbolic
5488 prefix (@pxref{Symbolic Prefixes}).
5489
5490 If you discover that you have made some mistakes and want to do some
5491 corrections, you can post a @dfn{superseding} article that will replace
5492 your original article.
5493
5494 @findex gnus-summary-supersede-article
5495 @kindex S (Summary)
5496 Go to the original article and press @kbd{S s}
5497 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5498 where you can edit the article all you want before sending it off the
5499 usual way.
5500
5501 The same goes for superseding as for canceling, only more so: Some
5502 sites do not honor superseding.  On those sites, it will appear that you
5503 have posted almost the same article twice.
5504
5505 If you have just posted the article, and change your mind right away,
5506 there is a trick you can use to cancel/supersede the article without
5507 waiting for the article to appear on your site first.  You simply return
5508 to the post buffer (which is called @code{*sent ...*}).  There you will
5509 find the article you just posted, with all the headers intact.  Change
5510 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5511 header by substituting one of those words for the word
5512 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5513 you would do normally.  The previous article will be
5514 canceled/superseded.
5515
5516 Just remember, kids: There is no 'c' in 'supersede'.
5517
5518 @node Delayed Articles
5519 @section Delayed Articles
5520 @cindex delayed sending
5521 @cindex send delayed
5522
5523 Sometimes, you might wish to delay the sending of a message.  For
5524 example, you might wish to arrange for a message to turn up just in time
5525 to remind your about the birthday of your Significant Other.  For this,
5526 there is the @code{gnus-delay} package.  Setup is simple:
5527
5528 @lisp
5529 (gnus-delay-initialize)
5530 @end lisp
5531
5532 @findex gnus-delay-article
5533 Normally, to send a message you use the @kbd{C-c C-c} command from
5534 Message mode.  To delay a message, use @kbd{C-c C-j}
5535 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5536 message should be delayed.  Possible answers are:
5537
5538 @itemize @bullet
5539 @item
5540 A time span.  Consists of an integer and a letter.  For example,
5541 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5542 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5543 (months) and @code{Y} (years).
5544
5545 @item
5546 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5547 delayed until that day, at a specific time (eight o'clock by default).
5548 See also @code{gnus-delay-default-hour}.
5549
5550 @item
5551 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5552 stuff.  The deadline will be at that time today, except if that time has
5553 already passed, then it's at the given time tomorrow.  So if it's ten
5554 o'clock in the morning and you specify @code{11:15}, then the deadline
5555 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5556 that means a time tomorrow.
5557 @end itemize
5558
5559 The action of the @code{gnus-delay-article} command is influenced by a
5560 couple of variables:
5561
5562 @table @code
5563 @item gnus-delay-default-hour
5564 @vindex gnus-delay-default-hour
5565 When you specify a specific date, the message will be due on that hour
5566 on the given date.  Possible values are integers 0 through 23.
5567
5568 @item gnus-delay-default-delay
5569 @vindex gnus-delay-default-delay
5570 This is a string and gives the default delay.  It can be of any of the
5571 formats described above.
5572
5573 @item gnus-delay-group
5574 @vindex gnus-delay-group
5575 Delayed articles will be kept in this group on the drafts server until
5576 they are due.  You probably don't need to change this.  The default
5577 value is @code{"delayed"}.
5578
5579 @item gnus-delay-header
5580 @vindex gnus-delay-header
5581 The deadline for each article will be stored in a header.  This variable
5582 is a string and gives the header name.  You probably don't need to
5583 change this.  The default value is @code{"X-Gnus-Delayed"}.
5584 @end table
5585
5586 The way delaying works is like this: when you use the
5587 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5588 calculates the deadline of the message and stores it in the
5589 @code{X-Gnus-Delayed} header and puts the message in the
5590 @code{nndraft:delayed} group.
5591
5592 @findex gnus-delay-send-queue
5593 And whenever you get new news, Gnus looks through the group for articles
5594 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5595 function for this.  By default, this function is added to the hook
5596 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5597 Maybe you want to use the demon to send drafts?  Just tell the demon to
5598 execute the @code{gnus-delay-send-queue} function.
5599
5600 @table @code
5601 @item gnus-delay-initialize
5602 @findex gnus-delay-initialize
5603
5604 By default, this function installs @code{gnus-delay-send-queue} in
5605 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5606 argument @code{no-check}.  If it is non-@code{nil},
5607 @code{gnus-get-new-news-hook} is not changed.  The optional first
5608 argument is ignored.
5609
5610 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5611 Presumably, you want to use the demon for sending due delayed articles.
5612 Just don't forget to set that up :-)
5613 @end table
5614
5615
5616 @node Marking Articles
5617 @section Marking Articles
5618 @cindex article marking
5619 @cindex article ticking
5620 @cindex marks
5621
5622 There are several marks you can set on an article.
5623
5624 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5625 neologism ohoy!) of the article.  Alphabetic marks generally mean
5626 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5627
5628 In addition, you also have marks that do not affect readedness.
5629
5630 @menu
5631 * Unread Articles::             Marks for unread articles.
5632 * Read Articles::               Marks for read articles.
5633 * Other Marks::                 Marks that do not affect readedness.
5634 @end menu
5635
5636 @ifinfo
5637 There's a plethora of commands for manipulating these marks:
5638 @end ifinfo
5639
5640 @menu
5641 * Setting Marks::             How to set and remove marks.
5642 * Generic Marking Commands::  How to customize the marking.
5643 * Setting Process Marks::     How to mark articles for later processing.
5644 @end menu
5645
5646
5647 @node Unread Articles
5648 @subsection Unread Articles
5649
5650 The following marks mark articles as (kinda) unread, in one form or
5651 other.
5652
5653 @table @samp
5654 @item !
5655 @vindex gnus-ticked-mark
5656 Marked as ticked (@code{gnus-ticked-mark}).
5657
5658 @dfn{Ticked articles} are articles that will remain visible always.  If
5659 you see an article that you find interesting, or you want to put off
5660 reading it, or replying to it, until sometime later, you'd typically
5661 tick it.  However, articles can be expired (from news servers by the
5662 news server software, Gnus itself never expires ticked messages), so if
5663 you want to keep an article forever, you'll have to make it persistent
5664 (@pxref{Persistent Articles}).
5665
5666 @item ?
5667 @vindex gnus-dormant-mark
5668 Marked as dormant (@code{gnus-dormant-mark}).
5669
5670 @dfn{Dormant articles} will only appear in the summary buffer if there
5671 are followups to it.  If you want to see them even if they don't have
5672 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5673 Otherwise (except for the visibility issue), they are just like ticked
5674 messages.
5675
5676 @item SPACE
5677 @vindex gnus-unread-mark
5678 Marked as unread (@code{gnus-unread-mark}).
5679
5680 @dfn{Unread articles} are articles that haven't been read at all yet.
5681 @end table
5682
5683
5684 @node Read Articles
5685 @subsection Read Articles
5686 @cindex expirable mark
5687
5688 All the following marks mark articles as read.
5689
5690 @table @samp
5691
5692 @item r
5693 @vindex gnus-del-mark
5694 These are articles that the user has marked as read with the @kbd{d}
5695 command manually, more or less (@code{gnus-del-mark}).
5696
5697 @item R
5698 @vindex gnus-read-mark
5699 Articles that have actually been read (@code{gnus-read-mark}).
5700
5701 @item O
5702 @vindex gnus-ancient-mark
5703 Articles that were marked as read in previous sessions and are now
5704 @dfn{old} (@code{gnus-ancient-mark}).
5705
5706 @item K
5707 @vindex gnus-killed-mark
5708 Marked as killed (@code{gnus-killed-mark}).
5709
5710 @item X
5711 @vindex gnus-kill-file-mark
5712 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5713
5714 @item Y
5715 @vindex gnus-low-score-mark
5716 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5717
5718 @item C
5719 @vindex gnus-catchup-mark
5720 Marked as read by a catchup (@code{gnus-catchup-mark}).
5721
5722 @item G
5723 @vindex gnus-canceled-mark
5724 Canceled article (@code{gnus-canceled-mark})
5725
5726 @item F
5727 @vindex gnus-souped-mark
5728 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5729
5730 @item Q
5731 @vindex gnus-sparse-mark
5732 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5733 Threading}.
5734
5735 @item M
5736 @vindex gnus-duplicate-mark
5737 Article marked as read by duplicate suppression
5738 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5739
5740 @end table
5741
5742 All these marks just mean that the article is marked as read, really.
5743 They are interpreted differently when doing adaptive scoring, though.
5744
5745 One more special mark, though:
5746
5747 @table @samp
5748 @item E
5749 @vindex gnus-expirable-mark
5750 Marked as expirable (@code{gnus-expirable-mark}).
5751
5752 Marking articles as @dfn{expirable} (or have them marked as such
5753 automatically) doesn't make much sense in normal groups---a user doesn't
5754 control expiring of news articles, but in mail groups, for instance,
5755 articles marked as @dfn{expirable} can be deleted by gnus at
5756 any time.
5757 @end table
5758
5759
5760 @node Other Marks
5761 @subsection Other Marks
5762 @cindex process mark
5763 @cindex bookmarks
5764
5765 There are some marks that have nothing to do with whether the article is
5766 read or not.
5767
5768 @itemize @bullet
5769
5770 @item
5771 You can set a bookmark in the current article.  Say you are reading a
5772 long thesis on cats' urinary tracts, and have to go home for dinner
5773 before you've finished reading the thesis.  You can then set a bookmark
5774 in the article, and gnus will jump to this bookmark the next time it
5775 encounters the article.  @xref{Setting Marks}.
5776
5777 @item
5778 @vindex gnus-replied-mark
5779 All articles that you have replied to or made a followup to (i.e., have
5780 answered) will be marked with an @samp{A} in the second column
5781 (@code{gnus-replied-mark}).
5782
5783 @item
5784 @vindex gnus-forwarded-mark
5785 All articles that you have forwarded will be marked with an @samp{F} in
5786 the second column (@code{gnus-forwarded-mark}).
5787
5788 @item
5789 @vindex gnus-cached-mark
5790 Articles stored in the article cache will be marked with an @samp{*} in
5791 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5792
5793 @item
5794 @vindex gnus-saved-mark
5795 Articles ``saved'' (in some manner or other; not necessarily
5796 religiously) are marked with an @samp{S} in the second column
5797 (@code{gnus-saved-mark}).
5798
5799 @item
5800 @vindex gnus-recent-mark
5801 Articles that according to the server haven't been shown to the user
5802 before are marked with a @samp{N} in the second column
5803 (@code{gnus-recent-mark}).  Note that not all servers support this
5804 mark, in which case it simply never appears.  Compare with
5805 @code{gnus-unseen-mark}.
5806
5807 @item
5808 @vindex gnus-unseen-mark
5809 Articles that haven't been seen before in Gnus by the user are marked
5810 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5811 Compare with @code{gnus-recent-mark}.
5812
5813 @item
5814 @vindex gnus-downloaded-mark
5815 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5816 downloaded for unplugged (offline) viewing.  If you are using the
5817 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5818 (The variable @code{gnus-downloaded-mark} controls which character to
5819 use.)
5820
5821 @item
5822 @vindex gnus-undownloaded-mark
5823 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5824 not have been downloaded.  Such articles cannot be viewed while you
5825 are unplugged (offline).  If you are using the @samp{%O} spec, these
5826 articles get the @samp{-} mark in that spec.  (The variable
5827 @code{gnus-undownloaded-mark} controls which character to use.)
5828
5829 @item
5830 @vindex gnus-downloadable-mark
5831 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5832 automatically, but it is also possible to explicitly mark articles for
5833 download, even if they would not be downloaded automatically.  Such
5834 explicitly-marked articles get the @samp{%} mark in the first column.
5835 (The variable @code{gnus-downloadable-mark} controls which character to
5836 use.)
5837
5838 @item
5839 @vindex gnus-not-empty-thread-mark
5840 @vindex gnus-empty-thread-mark
5841 If the @samp{%e} spec is used, the presence of threads or not will be
5842 marked with @code{gnus-not-empty-thread-mark} and
5843 @code{gnus-empty-thread-mark} in the third column, respectively.
5844
5845 @item
5846 @vindex gnus-process-mark
5847 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5848 variety of commands react to the presence of the process mark.  For
5849 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5850 all articles that have been marked with the process mark.  Articles
5851 marked with the process mark have a @samp{#} in the second column.
5852
5853 @end itemize
5854
5855 You might have noticed that most of these ``non-readedness'' marks
5856 appear in the second column by default.  So if you have a cached, saved,
5857 replied article that you have process-marked, what will that look like?
5858
5859 Nothing much.  The precedence rules go as follows: process -> cache ->
5860 replied -> saved.  So if the article is in the cache and is replied,
5861 you'll only see the cache mark and not the replied mark.
5862
5863
5864 @node Setting Marks
5865 @subsection Setting Marks
5866 @cindex setting marks
5867
5868 All the marking commands understand the numeric prefix.
5869
5870 @table @kbd
5871 @item M c
5872 @itemx M-u
5873 @kindex M c (Summary)
5874 @kindex M-u (Summary)
5875 @findex gnus-summary-clear-mark-forward
5876 @cindex mark as unread
5877 Clear all readedness-marks from the current article
5878 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5879 article as unread.
5880
5881 @item M t
5882 @itemx !
5883 @kindex ! (Summary)
5884 @kindex M t (Summary)
5885 @findex gnus-summary-tick-article-forward
5886 Tick the current article (@code{gnus-summary-tick-article-forward}).
5887 @xref{Article Caching}.
5888
5889 @item M ?
5890 @itemx ?
5891 @kindex ? (Summary)
5892 @kindex M ? (Summary)
5893 @findex gnus-summary-mark-as-dormant
5894 Mark the current article as dormant
5895 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5896
5897 @item M d
5898 @itemx d
5899 @kindex M d (Summary)
5900 @kindex d (Summary)
5901 @findex gnus-summary-mark-as-read-forward
5902 Mark the current article as read
5903 (@code{gnus-summary-mark-as-read-forward}).
5904
5905 @item D
5906 @kindex D (Summary)
5907 @findex gnus-summary-mark-as-read-backward
5908 Mark the current article as read and move point to the previous line
5909 (@code{gnus-summary-mark-as-read-backward}).
5910
5911 @item M k
5912 @itemx k
5913 @kindex k (Summary)
5914 @kindex M k (Summary)
5915 @findex gnus-summary-kill-same-subject-and-select
5916 Mark all articles that have the same subject as the current one as read,
5917 and then select the next unread article
5918 (@code{gnus-summary-kill-same-subject-and-select}).
5919
5920 @item M K
5921 @itemx C-k
5922 @kindex M K (Summary)
5923 @kindex C-k (Summary)
5924 @findex gnus-summary-kill-same-subject
5925 Mark all articles that have the same subject as the current one as read
5926 (@code{gnus-summary-kill-same-subject}).
5927
5928 @item M C
5929 @kindex M C (Summary)
5930 @findex gnus-summary-catchup
5931 @c @icon{gnus-summary-catchup}
5932 Mark all unread articles as read (@code{gnus-summary-catchup}).
5933
5934 @item M C-c
5935 @kindex M C-c (Summary)
5936 @findex gnus-summary-catchup-all
5937 Mark all articles in the group as read---even the ticked and dormant
5938 articles (@code{gnus-summary-catchup-all}).
5939
5940 @item M H
5941 @kindex M H (Summary)
5942 @findex gnus-summary-catchup-to-here
5943 Catchup the current group to point (before the point)
5944 (@code{gnus-summary-catchup-to-here}).
5945
5946 @item M h
5947 @kindex M h (Summary)
5948 @findex gnus-summary-catchup-from-here
5949 Catchup the current group from point (after the point)
5950 (@code{gnus-summary-catchup-from-here}).
5951
5952 @item C-w
5953 @kindex C-w (Summary)
5954 @findex gnus-summary-mark-region-as-read
5955 Mark all articles between point and mark as read
5956 (@code{gnus-summary-mark-region-as-read}).
5957
5958 @item M V k
5959 @kindex M V k (Summary)
5960 @findex gnus-summary-kill-below
5961 Kill all articles with scores below the default score (or below the
5962 numeric prefix) (@code{gnus-summary-kill-below}).
5963
5964 @item M e
5965 @itemx E
5966 @kindex M e (Summary)
5967 @kindex E (Summary)
5968 @findex gnus-summary-mark-as-expirable
5969 Mark the current article as expirable
5970 (@code{gnus-summary-mark-as-expirable}).
5971
5972 @item M b
5973 @kindex M b (Summary)
5974 @findex gnus-summary-set-bookmark
5975 Set a bookmark in the current article
5976 (@code{gnus-summary-set-bookmark}).
5977
5978 @item M B
5979 @kindex M B (Summary)
5980 @findex gnus-summary-remove-bookmark
5981 Remove the bookmark from the current article
5982 (@code{gnus-summary-remove-bookmark}).
5983
5984 @item M V c
5985 @kindex M V c (Summary)
5986 @findex gnus-summary-clear-above
5987 Clear all marks from articles with scores over the default score (or
5988 over the numeric prefix) (@code{gnus-summary-clear-above}).
5989
5990 @item M V u
5991 @kindex M V u (Summary)
5992 @findex gnus-summary-tick-above
5993 Tick all articles with scores over the default score (or over the
5994 numeric prefix) (@code{gnus-summary-tick-above}).
5995
5996 @item M V m
5997 @kindex M V m (Summary)
5998 @findex gnus-summary-mark-above
5999 Prompt for a mark, and mark all articles with scores over the default
6000 score (or over the numeric prefix) with this mark
6001 (@code{gnus-summary-clear-above}).
6002 @end table
6003
6004 @vindex gnus-summary-goto-unread
6005 The @code{gnus-summary-goto-unread} variable controls what action should
6006 be taken after setting a mark.  If non-@code{nil}, point will move to
6007 the next/previous unread article.  If @code{nil}, point will just move
6008 one line up or down.  As a special case, if this variable is
6009 @code{never}, all the marking commands as well as other commands (like
6010 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6011 The default is @code{t}.
6012
6013
6014 @node Generic Marking Commands
6015 @subsection Generic Marking Commands
6016
6017 Some people would like the command that ticks an article (@kbd{!}) go to
6018 the next article.  Others would like it to go to the next unread
6019 article.  Yet others would like it to stay on the current article.  And
6020 even though I haven't heard of anybody wanting it to go to the
6021 previous (unread) article, I'm sure there are people that want that as
6022 well.
6023
6024 Multiply these five behaviors with five different marking commands, and
6025 you get a potentially complex set of variable to control what each
6026 command should do.
6027
6028 To sidestep that mess, Gnus provides commands that do all these
6029 different things.  They can be found on the @kbd{M M} map in the summary
6030 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6031 to list in this manual.
6032
6033 While you can use these commands directly, most users would prefer
6034 altering the summary mode keymap.  For instance, if you would like the
6035 @kbd{!} command to go to the next article instead of the next unread
6036 article, you could say something like:
6037
6038 @lisp
6039 @group
6040 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6041 (defun my-alter-summary-map ()
6042   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6043 @end group
6044 @end lisp
6045
6046 @noindent
6047 or
6048
6049 @lisp
6050 (defun my-alter-summary-map ()
6051   (local-set-key "!" "MM!n"))
6052 @end lisp
6053
6054
6055 @node Setting Process Marks
6056 @subsection Setting Process Marks
6057 @cindex setting process marks
6058
6059 Process marks are displayed as @code{#} in the summary buffer, and are
6060 used for marking articles in such a way that other commands will
6061 process these articles.  For instance, if you process mark four
6062 articles and then use the @kbd{*} command, Gnus will enter these four
6063 commands into the cache.  For more information,
6064 @pxref{Process/Prefix}.
6065
6066 @table @kbd
6067
6068 @item M P p
6069 @itemx #
6070 @kindex # (Summary)
6071 @kindex M P p (Summary)
6072 @findex gnus-summary-mark-as-processable
6073 Mark the current article with the process mark
6074 (@code{gnus-summary-mark-as-processable}).
6075 @findex gnus-summary-unmark-as-processable
6076
6077 @item M P u
6078 @itemx M-#
6079 @kindex M P u (Summary)
6080 @kindex M-# (Summary)
6081 Remove the process mark, if any, from the current article
6082 (@code{gnus-summary-unmark-as-processable}).
6083
6084 @item M P U
6085 @kindex M P U (Summary)
6086 @findex gnus-summary-unmark-all-processable
6087 Remove the process mark from all articles
6088 (@code{gnus-summary-unmark-all-processable}).
6089
6090 @item M P i
6091 @kindex M P i (Summary)
6092 @findex gnus-uu-invert-processable
6093 Invert the list of process marked articles
6094 (@code{gnus-uu-invert-processable}).
6095
6096 @item M P R
6097 @kindex M P R (Summary)
6098 @findex gnus-uu-mark-by-regexp
6099 Mark articles that have a @code{Subject} header that matches a regular
6100 expression (@code{gnus-uu-mark-by-regexp}).
6101
6102 @item M P G
6103 @kindex M P G (Summary)
6104 @findex gnus-uu-unmark-by-regexp
6105 Unmark articles that have a @code{Subject} header that matches a regular
6106 expression (@code{gnus-uu-unmark-by-regexp}).
6107
6108 @item M P r
6109 @kindex M P r (Summary)
6110 @findex gnus-uu-mark-region
6111 Mark articles in region (@code{gnus-uu-mark-region}).
6112
6113 @item M P g
6114 @kindex M P g
6115 @findex gnus-uu-unmark-region
6116 Unmark articles in region (@code{gnus-uu-unmark-region}).
6117
6118 @item M P t
6119 @kindex M P t (Summary)
6120 @findex gnus-uu-mark-thread
6121 Mark all articles in the current (sub)thread
6122 (@code{gnus-uu-mark-thread}).
6123
6124 @item M P T
6125 @kindex M P T (Summary)
6126 @findex gnus-uu-unmark-thread
6127 Unmark all articles in the current (sub)thread
6128 (@code{gnus-uu-unmark-thread}).
6129
6130 @item M P v
6131 @kindex M P v (Summary)
6132 @findex gnus-uu-mark-over
6133 Mark all articles that have a score above the prefix argument
6134 (@code{gnus-uu-mark-over}).
6135
6136 @item M P s
6137 @kindex M P s (Summary)
6138 @findex gnus-uu-mark-series
6139 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6140
6141 @item M P S
6142 @kindex M P S (Summary)
6143 @findex gnus-uu-mark-sparse
6144 Mark all series that have already had some articles marked
6145 (@code{gnus-uu-mark-sparse}).
6146
6147 @item M P a
6148 @kindex M P a (Summary)
6149 @findex gnus-uu-mark-all
6150 Mark all articles in series order (@code{gnus-uu-mark-series}).
6151
6152 @item M P b
6153 @kindex M P b (Summary)
6154 @findex gnus-uu-mark-buffer
6155 Mark all articles in the buffer in the order they appear
6156 (@code{gnus-uu-mark-buffer}).
6157
6158 @item M P k
6159 @kindex M P k (Summary)
6160 @findex gnus-summary-kill-process-mark
6161 Push the current process mark set onto the stack and unmark all articles
6162 (@code{gnus-summary-kill-process-mark}).
6163
6164 @item M P y
6165 @kindex M P y (Summary)
6166 @findex gnus-summary-yank-process-mark
6167 Pop the previous process mark set from the stack and restore it
6168 (@code{gnus-summary-yank-process-mark}).
6169
6170 @item M P w
6171 @kindex M P w (Summary)
6172 @findex gnus-summary-save-process-mark
6173 Push the current process mark set onto the stack
6174 (@code{gnus-summary-save-process-mark}).
6175
6176 @end table
6177
6178 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6179 set process marks based on article body contents.
6180
6181
6182 @node Limiting
6183 @section Limiting
6184 @cindex limiting
6185
6186 It can be convenient to limit the summary buffer to just show some
6187 subset of the articles currently in the group.  The effect most limit
6188 commands have is to remove a few (or many) articles from the summary
6189 buffer.
6190
6191 All limiting commands work on subsets of the articles already fetched
6192 from the servers.  None of these commands query the server for
6193 additional articles.
6194
6195 @table @kbd
6196
6197 @item / /
6198 @itemx / s
6199 @kindex / / (Summary)
6200 @findex gnus-summary-limit-to-subject
6201 Limit the summary buffer to articles that match some subject
6202 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6203 matching articles.
6204
6205 @item / a
6206 @kindex / a (Summary)
6207 @findex gnus-summary-limit-to-author
6208 Limit the summary buffer to articles that match some author
6209 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6210 matching articles.
6211
6212 @item / x
6213 @kindex / x (Summary)
6214 @findex gnus-summary-limit-to-extra
6215 Limit the summary buffer to articles that match one of the ``extra''
6216 headers (@pxref{To From Newsgroups})
6217 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6218 matching articles.
6219
6220 @item / u
6221 @itemx x
6222 @kindex / u (Summary)
6223 @kindex x (Summary)
6224 @findex gnus-summary-limit-to-unread
6225 Limit the summary buffer to articles not marked as read
6226 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6227 buffer to articles strictly unread.  This means that ticked and
6228 dormant articles will also be excluded.
6229
6230 @item / m
6231 @kindex / m (Summary)
6232 @findex gnus-summary-limit-to-marks
6233 Ask for a mark and then limit to all articles that have been marked
6234 with that mark (@code{gnus-summary-limit-to-marks}).
6235
6236 @item / t
6237 @kindex / t (Summary)
6238 @findex gnus-summary-limit-to-age
6239 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6240 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6241 articles younger than that number of days.
6242
6243 @item / n
6244 @kindex / n (Summary)
6245 @findex gnus-summary-limit-to-articles
6246 Limit the summary buffer to the current article
6247 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6248 convention (@pxref{Process/Prefix}).
6249
6250 @item / w
6251 @kindex / w (Summary)
6252 @findex gnus-summary-pop-limit
6253 Pop the previous limit off the stack and restore it
6254 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6255 the stack.
6256
6257 @item / .
6258 @kindex / . (Summary)
6259 @findex gnus-summary-limit-to-unseen
6260 Limit the summary buffer to the unseen articles
6261 (@code{gnus-summary-limit-to-unseen}).
6262
6263 @item / v
6264 @kindex / v (Summary)
6265 @findex gnus-summary-limit-to-score
6266 Limit the summary buffer to articles that have a score at or above some
6267 score (@code{gnus-summary-limit-to-score}).
6268
6269 @item / p
6270 @kindex / p (Summary)
6271 @findex gnus-summary-limit-to-display-predicate
6272 Limit the summary buffer to articles that satisfy the @code{display}
6273 group parameter predicate
6274 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6275 Parameters}, for more on this predicate.
6276
6277 @item / E
6278 @itemx M S
6279 @kindex M S (Summary)
6280 @kindex / E (Summary)
6281 @findex gnus-summary-limit-include-expunged
6282 Include all expunged articles in the limit
6283 (@code{gnus-summary-limit-include-expunged}).
6284
6285 @item / D
6286 @kindex / D (Summary)
6287 @findex gnus-summary-limit-include-dormant
6288 Include all dormant articles in the limit
6289 (@code{gnus-summary-limit-include-dormant}).
6290
6291 @item / *
6292 @kindex / * (Summary)
6293 @findex gnus-summary-limit-include-cached
6294 Include all cached articles in the limit
6295 (@code{gnus-summary-limit-include-cached}).
6296
6297 @item / d
6298 @kindex / d (Summary)
6299 @findex gnus-summary-limit-exclude-dormant
6300 Exclude all dormant articles from the limit
6301 (@code{gnus-summary-limit-exclude-dormant}).
6302
6303 @item / M
6304 @kindex / M (Summary)
6305 @findex gnus-summary-limit-exclude-marks
6306 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6307
6308 @item / T
6309 @kindex / T (Summary)
6310 @findex gnus-summary-limit-include-thread
6311 Include all the articles in the current thread in the limit.
6312
6313 @item / c
6314 @kindex / c (Summary)
6315 @findex gnus-summary-limit-exclude-childless-dormant
6316 Exclude all dormant articles that have no children from the limit@*
6317 (@code{gnus-summary-limit-exclude-childless-dormant}).
6318
6319 @item / C
6320 @kindex / C (Summary)
6321 @findex gnus-summary-limit-mark-excluded-as-read
6322 Mark all excluded unread articles as read
6323 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6324 also mark excluded ticked and dormant articles as read.
6325
6326 @item / N
6327 @kindex / N (Summary)
6328 @findex gnus-summary-insert-new-articles
6329 Insert all new articles in the summary buffer.  It scans for new emails
6330 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6331
6332 @item / o
6333 @kindex / o (Summary)
6334 @findex gnus-summary-insert-old-articles
6335 Insert all old articles in the summary buffer.  If given a numbered
6336 prefix, fetch this number of articles.
6337
6338 @end table
6339
6340
6341 @node Threading
6342 @section Threading
6343 @cindex threading
6344 @cindex article threading
6345
6346 Gnus threads articles by default.  @dfn{To thread} is to put responses
6347 to articles directly after the articles they respond to---in a
6348 hierarchical fashion.
6349
6350 Threading is done by looking at the @code{References} headers of the
6351 articles.  In a perfect world, this would be enough to build pretty
6352 trees, but unfortunately, the @code{References} header is often broken
6353 or simply missing.  Weird news propagation exacerbates the problem,
6354 so one has to employ other heuristics to get pleasing results.  A
6355 plethora of approaches exists, as detailed in horrible detail in
6356 @ref{Customizing Threading}.
6357
6358 First, a quick overview of the concepts:
6359
6360 @table @dfn
6361 @item root
6362 The top-most article in a thread; the first article in the thread.
6363
6364 @item thread
6365 A tree-like article structure.
6366
6367 @item sub-thread
6368 A small(er) section of this tree-like structure.
6369
6370 @item loose threads
6371 Threads often lose their roots due to article expiry, or due to the root
6372 already having been read in a previous session, and not displayed in the
6373 summary buffer.  We then typically have many sub-threads that really
6374 belong to one thread, but are without connecting roots.  These are
6375 called loose threads.
6376
6377 @item thread gathering
6378 An attempt to gather loose threads into bigger threads.
6379
6380 @item sparse threads
6381 A thread where the missing articles have been ``guessed'' at, and are
6382 displayed as empty lines in the summary buffer.
6383
6384 @end table
6385
6386
6387 @menu
6388 * Customizing Threading::       Variables you can change to affect the threading.
6389 * Thread Commands::             Thread based commands in the summary buffer.
6390 @end menu
6391
6392
6393 @node Customizing Threading
6394 @subsection Customizing Threading
6395 @cindex customizing threading
6396
6397 @menu
6398 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6399 * Filling In Threads::          Making the threads displayed look fuller.
6400 * More Threading::              Even more variables for fiddling with threads.
6401 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6402 @end menu
6403
6404
6405 @node Loose Threads
6406 @subsubsection Loose Threads
6407 @cindex <
6408 @cindex >
6409 @cindex loose threads
6410
6411 @table @code
6412 @item gnus-summary-make-false-root
6413 @vindex gnus-summary-make-false-root
6414 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6415 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6416 Yup.)  Loose subtrees occur when the real root has expired, or you've
6417 read or killed the root in a previous session.
6418
6419 When there is no real root of a thread, gnus will have to fudge
6420 something.  This variable says what fudging method gnus should use.
6421 There are four possible values:
6422
6423 @iftex
6424 @iflatex
6425 \gnusfigure{The Summary Buffer}{390}{
6426 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6427 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6428 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6429 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6430 }
6431 @end iflatex
6432 @end iftex
6433
6434 @cindex adopting articles
6435
6436 @table @code
6437
6438 @item adopt
6439 Gnus will make the first of the orphaned articles the parent.  This
6440 parent will adopt all the other articles.  The adopted articles will be
6441 marked as such by pointy brackets (@samp{<>}) instead of the standard
6442 square brackets (@samp{[]}).  This is the default method.
6443
6444 @item dummy
6445 @vindex gnus-summary-dummy-line-format
6446 @vindex gnus-summary-make-false-root-always
6447 Gnus will create a dummy summary line that will pretend to be the
6448 parent.  This dummy line does not correspond to any real article, so
6449 selecting it will just select the first real article after the dummy
6450 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6451 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6452 which is the subject of the article.  @xref{Formatting Variables}.
6453 If you want all threads to have a dummy root, even the non-gathered
6454 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6455
6456 @item empty
6457 Gnus won't actually make any article the parent, but simply leave the
6458 subject field of all orphans except the first empty.  (Actually, it will
6459 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6460 Buffer Format}).)
6461
6462 @item none
6463 Don't make any article parent at all.  Just gather the threads and
6464 display them after one another.
6465
6466 @item nil
6467 Don't gather loose threads.
6468 @end table
6469
6470 @item gnus-summary-gather-subject-limit
6471 @vindex gnus-summary-gather-subject-limit
6472 Loose threads are gathered by comparing subjects of articles.  If this
6473 variable is @code{nil}, gnus requires an exact match between the
6474 subjects of the loose threads before gathering them into one big
6475 super-thread.  This might be too strict a requirement, what with the
6476 presence of stupid newsreaders that chop off long subject lines.  If
6477 you think so, set this variable to, say, 20 to require that only the
6478 first 20 characters of the subjects have to match.  If you set this
6479 variable to a really low number, you'll find that gnus will gather
6480 everything in sight into one thread, which isn't very helpful.
6481
6482 @cindex fuzzy article gathering
6483 If you set this variable to the special value @code{fuzzy}, gnus will
6484 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6485 Matching}).
6486
6487 @item gnus-simplify-subject-fuzzy-regexp
6488 @vindex gnus-simplify-subject-fuzzy-regexp
6489 This can either be a regular expression or list of regular expressions
6490 that match strings that will be removed from subjects if fuzzy subject
6491 simplification is used.
6492
6493 @item gnus-simplify-ignored-prefixes
6494 @vindex gnus-simplify-ignored-prefixes
6495 If you set @code{gnus-summary-gather-subject-limit} to something as low
6496 as 10, you might consider setting this variable to something sensible:
6497
6498 @c Written by Michael Ernst <mernst@cs.rice.edu>
6499 @lisp
6500 (setq gnus-simplify-ignored-prefixes
6501       (concat
6502        "\\`\\[?\\("
6503        (mapconcat
6504         'identity
6505         '("looking"
6506           "wanted" "followup" "summary\\( of\\)?"
6507           "help" "query" "problem" "question"
6508           "answer" "reference" "announce"
6509           "How can I" "How to" "Comparison of"
6510           ;; ...
6511           )
6512         "\\|")
6513        "\\)\\s *\\("
6514        (mapconcat 'identity
6515                   '("for" "for reference" "with" "about")
6516                   "\\|")
6517        "\\)?\\]?:?[ \t]*"))
6518 @end lisp
6519
6520 All words that match this regexp will be removed before comparing two
6521 subjects.
6522
6523 @item gnus-simplify-subject-functions
6524 @vindex gnus-simplify-subject-functions
6525 If non-@code{nil}, this variable overrides
6526 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6527 list of functions to apply to the @code{Subject} string iteratively to
6528 arrive at the simplified version of the string.
6529
6530 Useful functions to put in this list include:
6531
6532 @table @code
6533 @item gnus-simplify-subject-re
6534 @findex gnus-simplify-subject-re
6535 Strip the leading @samp{Re:}.
6536
6537 @item gnus-simplify-subject-fuzzy
6538 @findex gnus-simplify-subject-fuzzy
6539 Simplify fuzzily.
6540
6541 @item gnus-simplify-whitespace
6542 @findex gnus-simplify-whitespace
6543 Remove excessive whitespace.
6544
6545 @item gnus-simplify-all-whitespace
6546 @findex gnus-simplify-all-whitespace
6547 Remove all whitespace.
6548 @end table
6549
6550 You may also write your own functions, of course.
6551
6552
6553 @item gnus-summary-gather-exclude-subject
6554 @vindex gnus-summary-gather-exclude-subject
6555 Since loose thread gathering is done on subjects only, that might lead
6556 to many false hits, especially with certain common subjects like
6557 @samp{} and @samp{(none)}.  To make the situation slightly better,
6558 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6559 what subjects should be excluded from the gathering process.@*
6560 The default is @samp{^ *$\\|^(none)$}.
6561
6562 @item gnus-summary-thread-gathering-function
6563 @vindex gnus-summary-thread-gathering-function
6564 Gnus gathers threads by looking at @code{Subject} headers.  This means
6565 that totally unrelated articles may end up in the same ``thread'', which
6566 is confusing.  An alternate approach is to look at all the
6567 @code{Message-ID}s in all the @code{References} headers to find matches.
6568 This will ensure that no gathered threads ever include unrelated
6569 articles, but it also means that people who have posted with broken
6570 newsreaders won't be gathered properly.  The choice is yours---plague or
6571 cholera:
6572
6573 @table @code
6574 @item gnus-gather-threads-by-subject
6575 @findex gnus-gather-threads-by-subject
6576 This function is the default gathering function and looks at
6577 @code{Subject}s exclusively.
6578
6579 @item gnus-gather-threads-by-references
6580 @findex gnus-gather-threads-by-references
6581 This function looks at @code{References} headers exclusively.
6582 @end table
6583
6584 If you want to test gathering by @code{References}, you could say
6585 something like:
6586
6587 @lisp
6588 (setq gnus-summary-thread-gathering-function
6589       'gnus-gather-threads-by-references)
6590 @end lisp
6591
6592 @end table
6593
6594
6595 @node Filling In Threads
6596 @subsubsection Filling In Threads
6597
6598 @table @code
6599 @item gnus-fetch-old-headers
6600 @vindex gnus-fetch-old-headers
6601 If non-@code{nil}, gnus will attempt to build old threads by fetching
6602 more old headers---headers to articles marked as read.  If you
6603 would like to display as few summary lines as possible, but still
6604 connect as many loose threads as possible, you should set this variable
6605 to @code{some} or a number.  If you set it to a number, no more than
6606 that number of extra old headers will be fetched.  In either case,
6607 fetching old headers only works if the back end you are using carries
6608 overview files---this would normally be @code{nntp}, @code{nnspool},
6609 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6610 the thread has been expired by the server, there's not much Gnus can do
6611 about that.
6612
6613 This variable can also be set to @code{invisible}.  This won't have any
6614 visible effects, but is useful if you use the @kbd{A T} command a lot
6615 (@pxref{Finding the Parent}).
6616
6617 @item gnus-fetch-old-ephemeral-headers
6618 @vindex gnus-fetch-old-ephemeral-headers
6619 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6620 newsgroups.
6621
6622 @item gnus-build-sparse-threads
6623 @vindex gnus-build-sparse-threads
6624 Fetching old headers can be slow.  A low-rent similar effect can be
6625 gotten by setting this variable to @code{some}.  Gnus will then look at
6626 the complete @code{References} headers of all articles and try to string
6627 together articles that belong in the same thread.  This will leave
6628 @dfn{gaps} in the threading display where gnus guesses that an article
6629 is missing from the thread.  (These gaps appear like normal summary
6630 lines.  If you select a gap, gnus will try to fetch the article in
6631 question.)  If this variable is @code{t}, gnus will display all these
6632 ``gaps'' without regard for whether they are useful for completing the
6633 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6634 off sparse leaf nodes that don't lead anywhere.  This variable is
6635 @code{nil} by default.
6636
6637 @item gnus-read-all-available-headers
6638 @vindex gnus-read-all-available-headers
6639 This is a rather obscure variable that few will find useful.  It's
6640 intended for those non-news newsgroups where the back end has to fetch
6641 quite a lot to present the summary buffer, and where it's impossible to
6642 go back to parents of articles.  This is mostly the case in the
6643 web-based groups, like the @code{nnultimate} groups.
6644
6645 If you don't use those, then it's safe to leave this as the default
6646 @code{nil}.  If you want to use this variable, it should be a regexp
6647 that matches the group name, or @code{t} for all groups.
6648
6649 @end table
6650
6651
6652 @node More Threading
6653 @subsubsection More Threading
6654
6655 @table @code
6656 @item gnus-show-threads
6657 @vindex gnus-show-threads
6658 If this variable is @code{nil}, no threading will be done, and all of
6659 the rest of the variables here will have no effect.  Turning threading
6660 off will speed group selection up a bit, but it is sure to make reading
6661 slower and more awkward.
6662
6663 @item gnus-thread-hide-subtree
6664 @vindex gnus-thread-hide-subtree
6665 If non-@code{nil}, all threads will be hidden when the summary buffer is
6666 generated.
6667
6668 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6669 Available predicates are @code{gnus-article-unread-p} and
6670 @code{gnus-article-unseen-p}.
6671
6672 Here's an example:
6673
6674 @lisp
6675 (setq gnus-thread-hide-subtree
6676       '(or gnus-article-unread-p
6677            gnus-article-unseen-p))
6678 @end lisp
6679
6680 (It's a pretty nonsensical example, since all unseen articles are also
6681 unread, but you get my drift.)
6682
6683
6684 @item gnus-thread-expunge-below
6685 @vindex gnus-thread-expunge-below
6686 All threads that have a total score (as defined by
6687 @code{gnus-thread-score-function}) less than this number will be
6688 expunged.  This variable is @code{nil} by default, which means that no
6689 threads are expunged.
6690
6691 @item gnus-thread-hide-killed
6692 @vindex gnus-thread-hide-killed
6693 if you kill a thread and this variable is non-@code{nil}, the subtree
6694 will be hidden.
6695
6696 @item gnus-thread-ignore-subject
6697 @vindex gnus-thread-ignore-subject
6698 Sometimes somebody changes the subject in the middle of a thread.  If
6699 this variable is non-@code{nil}, which is the default, the subject
6700 change is ignored.  If it is @code{nil}, a change in the subject will
6701 result in a new thread.
6702
6703 @item gnus-thread-indent-level
6704 @vindex gnus-thread-indent-level
6705 This is a number that says how much each sub-thread should be indented.
6706 The default is 4.
6707
6708 @item gnus-sort-gathered-threads-function
6709 @vindex gnus-sort-gathered-threads-function
6710 Sometimes, particularly with mailing lists, the order in which mails
6711 arrive locally is not necessarily the same as the order in which they
6712 arrived on the mailing list.  Consequently, when sorting sub-threads
6713 using the default @code{gnus-thread-sort-by-number}, responses can end
6714 up appearing before the article to which they are responding to.
6715 Setting this variable to an alternate value
6716 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6717 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6718 more logical sub-thread ordering in such instances.
6719
6720 @end table
6721
6722
6723 @node Low-Level Threading
6724 @subsubsection Low-Level Threading
6725
6726 @table @code
6727
6728 @item gnus-parse-headers-hook
6729 @vindex gnus-parse-headers-hook
6730 Hook run before parsing any headers.  The default value is
6731 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6732 @code{default-mime-charset} in summary buffer based on variable
6733 @code{gnus-newsgroup-default-charset-alist}.
6734
6735 @item gnus-alter-header-function
6736 @vindex gnus-alter-header-function
6737 If non-@code{nil}, this function will be called to allow alteration of
6738 article header structures.  The function is called with one parameter,
6739 the article header vector, which it may alter in any way.  For instance,
6740 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6741 in systematic ways (by adding prefixes and such), you can use this
6742 variable to un-scramble the @code{Message-ID}s so that they are more
6743 meaningful.  Here's one example:
6744
6745 @lisp
6746 (setq gnus-alter-header-function 'my-alter-message-id)
6747
6748 (defun my-alter-message-id (header)
6749   (let ((id (mail-header-id header)))
6750     (when (string-match
6751            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6752       (mail-header-set-id
6753        (concat (match-string 1 id) "@@" (match-string 2 id))
6754        header))))
6755 @end lisp
6756
6757 @end table
6758
6759
6760 @node Thread Commands
6761 @subsection Thread Commands
6762 @cindex thread commands
6763
6764 @table @kbd
6765
6766 @item T k
6767 @itemx C-M-k
6768 @kindex T k (Summary)
6769 @kindex C-M-k (Summary)
6770 @findex gnus-summary-kill-thread
6771 Mark all articles in the current (sub-)thread as read
6772 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6773 remove all marks instead.  If the prefix argument is negative, tick
6774 articles instead.
6775
6776 @item T l
6777 @itemx C-M-l
6778 @kindex T l (Summary)
6779 @kindex C-M-l (Summary)
6780 @findex gnus-summary-lower-thread
6781 Lower the score of the current (sub-)thread
6782 (@code{gnus-summary-lower-thread}).
6783
6784 @item T i
6785 @kindex T i (Summary)
6786 @findex gnus-summary-raise-thread
6787 Increase the score of the current (sub-)thread
6788 (@code{gnus-summary-raise-thread}).
6789
6790 @item T #
6791 @kindex T # (Summary)
6792 @findex gnus-uu-mark-thread
6793 Set the process mark on the current (sub-)thread
6794 (@code{gnus-uu-mark-thread}).
6795
6796 @item T M-#
6797 @kindex T M-# (Summary)
6798 @findex gnus-uu-unmark-thread
6799 Remove the process mark from the current (sub-)thread
6800 (@code{gnus-uu-unmark-thread}).
6801
6802 @item T T
6803 @kindex T T (Summary)
6804 @findex gnus-summary-toggle-threads
6805 Toggle threading (@code{gnus-summary-toggle-threads}).
6806
6807 @item T s
6808 @kindex T s (Summary)
6809 @findex gnus-summary-show-thread
6810 Expose the (sub-)thread hidden under the current article, if any@*
6811 (@code{gnus-summary-show-thread}).
6812
6813 @item T h
6814 @kindex T h (Summary)
6815 @findex gnus-summary-hide-thread
6816 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6817
6818 @item T S
6819 @kindex T S (Summary)
6820 @findex gnus-summary-show-all-threads
6821 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6822
6823 @item T H
6824 @kindex T H (Summary)
6825 @findex gnus-summary-hide-all-threads
6826 Hide all threads (@code{gnus-summary-hide-all-threads}).
6827
6828 @item T t
6829 @kindex T t (Summary)
6830 @findex gnus-summary-rethread-current
6831 Re-thread the current article's thread
6832 (@code{gnus-summary-rethread-current}).  This works even when the
6833 summary buffer is otherwise unthreaded.
6834
6835 @item T ^
6836 @kindex T ^ (Summary)
6837 @findex gnus-summary-reparent-thread
6838 Make the current article the child of the marked (or previous) article
6839 (@code{gnus-summary-reparent-thread}).
6840
6841 @end table
6842
6843 The following commands are thread movement commands.  They all
6844 understand the numeric prefix.
6845
6846 @table @kbd
6847
6848 @item T n
6849 @kindex T n (Summary)
6850 @itemx C-M-f
6851 @kindex C-M-n (Summary)
6852 @itemx M-down
6853 @kindex M-down (Summary)
6854 @findex gnus-summary-next-thread
6855 Go to the next thread (@code{gnus-summary-next-thread}).
6856
6857 @item T p
6858 @kindex T p (Summary)
6859 @itemx C-M-b
6860 @kindex C-M-p (Summary)
6861 @itemx M-up
6862 @kindex M-up (Summary)
6863 @findex gnus-summary-prev-thread
6864 Go to the previous thread (@code{gnus-summary-prev-thread}).
6865
6866 @item T d
6867 @kindex T d (Summary)
6868 @findex gnus-summary-down-thread
6869 Descend the thread (@code{gnus-summary-down-thread}).
6870
6871 @item T u
6872 @kindex T u (Summary)
6873 @findex gnus-summary-up-thread
6874 Ascend the thread (@code{gnus-summary-up-thread}).
6875
6876 @item T o
6877 @kindex T o (Summary)
6878 @findex gnus-summary-top-thread
6879 Go to the top of the thread (@code{gnus-summary-top-thread}).
6880 @end table
6881
6882 @vindex gnus-thread-operation-ignore-subject
6883 If you ignore subject while threading, you'll naturally end up with
6884 threads that have several different subjects in them.  If you then issue
6885 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6886 wish to kill the entire thread, but just those parts of the thread that
6887 have the same subject as the current article.  If you like this idea,
6888 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6889 is non-@code{nil} (which it is by default), subjects will be ignored
6890 when doing thread commands.  If this variable is @code{nil}, articles in
6891 the same thread with different subjects will not be included in the
6892 operation in question.  If this variable is @code{fuzzy}, only articles
6893 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6894 Matching}).
6895
6896
6897 @node Sorting the Summary Buffer
6898 @section Sorting the Summary Buffer
6899
6900 @findex gnus-thread-sort-by-total-score
6901 @findex gnus-thread-sort-by-date
6902 @findex gnus-thread-sort-by-score
6903 @findex gnus-thread-sort-by-subject
6904 @findex gnus-thread-sort-by-author
6905 @findex gnus-thread-sort-by-number
6906 @findex gnus-thread-sort-by-random
6907 @vindex gnus-thread-sort-functions
6908 @findex gnus-thread-sort-by-most-recent-number
6909 @findex gnus-thread-sort-by-most-recent-date
6910 If you are using a threaded summary display, you can sort the threads by
6911 setting @code{gnus-thread-sort-functions}, which can be either a single
6912 function, a list of functions, or a list containing functions and
6913 @code{(not some-function)} elements.
6914
6915 By default, sorting is done on article numbers.  Ready-made sorting
6916 predicate functions include @code{gnus-thread-sort-by-number},
6917 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6918 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6919 @code{gnus-thread-sort-by-most-recent-number},
6920 @code{gnus-thread-sort-by-most-recent-date},
6921 @code{gnus-thread-sort-by-random} and
6922 @code{gnus-thread-sort-by-total-score}.
6923
6924 Each function takes two threads and returns non-@code{nil} if the first
6925 thread should be sorted before the other.  Note that sorting really is
6926 normally done by looking only at the roots of each thread.
6927
6928 If you use more than one function, the primary sort key should be the
6929 last function in the list.  You should probably always include
6930 @code{gnus-thread-sort-by-number} in the list of sorting
6931 functions---preferably first.  This will ensure that threads that are
6932 equal with respect to the other sort criteria will be displayed in
6933 ascending article order.
6934
6935 If you would like to sort by reverse score, then by subject, and finally
6936 by number, you could do something like:
6937
6938 @lisp
6939 (setq gnus-thread-sort-functions
6940       '(gnus-thread-sort-by-number
6941         gnus-thread-sort-by-subject
6942         (not gnus-thread-sort-by-total-score)))
6943 @end lisp
6944
6945 The threads that have highest score will be displayed first in the
6946 summary buffer.  When threads have the same score, they will be sorted
6947 alphabetically.  The threads that have the same score and the same
6948 subject will be sorted by number, which is (normally) the sequence in
6949 which the articles arrived.
6950
6951 If you want to sort by score and then reverse arrival order, you could
6952 say something like:
6953
6954 @lisp
6955 (setq gnus-thread-sort-functions
6956       '((lambda (t1 t2)
6957           (not (gnus-thread-sort-by-number t1 t2)))
6958         gnus-thread-sort-by-score))
6959 @end lisp
6960
6961 @vindex gnus-thread-score-function
6962 The function in the @code{gnus-thread-score-function} variable (default
6963 @code{+}) is used for calculating the total score of a thread.  Useful
6964 functions might be @code{max}, @code{min}, or squared means, or whatever
6965 tickles your fancy.
6966
6967 @findex gnus-article-sort-functions
6968 @findex gnus-article-sort-by-date
6969 @findex gnus-article-sort-by-score
6970 @findex gnus-article-sort-by-subject
6971 @findex gnus-article-sort-by-author
6972 @findex gnus-article-sort-by-random
6973 @findex gnus-article-sort-by-number
6974 If you are using an unthreaded display for some strange reason or
6975 other, you have to fiddle with the @code{gnus-article-sort-functions}
6976 variable.  It is very similar to the
6977 @code{gnus-thread-sort-functions}, except that it uses slightly
6978 different functions for article comparison.  Available sorting
6979 predicate functions are @code{gnus-article-sort-by-number},
6980 @code{gnus-article-sort-by-author},
6981 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6982 @code{gnus-article-sort-by-random}, and
6983 @code{gnus-article-sort-by-score}.
6984
6985 If you want to sort an unthreaded summary display by subject, you could
6986 say something like:
6987
6988 @lisp
6989 (setq gnus-article-sort-functions
6990       '(gnus-article-sort-by-number
6991         gnus-article-sort-by-subject))
6992 @end lisp
6993
6994
6995
6996 @node Asynchronous Fetching
6997 @section Asynchronous Article Fetching
6998 @cindex asynchronous article fetching
6999 @cindex article pre-fetch
7000 @cindex pre-fetch
7001
7002 If you read your news from an @acronym{NNTP} server that's far away, the
7003 network latencies may make reading articles a chore.  You have to wait
7004 for a while after pressing @kbd{n} to go to the next article before the
7005 article appears.  Why can't gnus just go ahead and fetch the article
7006 while you are reading the previous one?  Why not, indeed.
7007
7008 First, some caveats.  There are some pitfalls to using asynchronous
7009 article fetching, especially the way gnus does it.
7010
7011 Let's say you are reading article 1, which is short, and article 2 is
7012 quite long, and you are not interested in reading that.  Gnus does not
7013 know this, so it goes ahead and fetches article 2.  You decide to read
7014 article 3, but since gnus is in the process of fetching article 2, the
7015 connection is blocked.
7016
7017 To avoid these situations, gnus will open two (count 'em two)
7018 connections to the server.  Some people may think this isn't a very nice
7019 thing to do, but I don't see any real alternatives.  Setting up that
7020 extra connection takes some time, so gnus startup will be slower.
7021
7022 Gnus will fetch more articles than you will read.  This will mean that
7023 the link between your machine and the @acronym{NNTP} server will become more
7024 loaded than if you didn't use article pre-fetch.  The server itself will
7025 also become more loaded---both with the extra article requests, and the
7026 extra connection.
7027
7028 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7029 you really want to.
7030
7031 @vindex gnus-asynchronous
7032 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7033 happen automatically.
7034
7035 @vindex gnus-use-article-prefetch
7036 You can control how many articles are to be pre-fetched by setting
7037 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7038 that when you read an article in the group, the back end will pre-fetch
7039 the next 30 articles.  If this variable is @code{t}, the back end will
7040 pre-fetch all the articles it can without bound.  If it is
7041 @code{nil}, no pre-fetching will be done.
7042
7043 @vindex gnus-async-prefetch-article-p
7044 @findex gnus-async-read-p
7045 There are probably some articles that you don't want to pre-fetch---read
7046 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7047 variable controls whether an article is to be pre-fetched.  This
7048 function should return non-@code{nil} when the article in question is
7049 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7050 returns @code{nil} on read articles.  The function is called with an
7051 article data structure as the only parameter.
7052
7053 If, for instance, you wish to pre-fetch only unread articles shorter
7054 than 100 lines, you could say something like:
7055
7056 @lisp
7057 (defun my-async-short-unread-p (data)
7058   "Return non-nil for short, unread articles."
7059   (and (gnus-data-unread-p data)
7060        (< (mail-header-lines (gnus-data-header data))
7061           100)))
7062
7063 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7064 @end lisp
7065
7066 These functions will be called many, many times, so they should
7067 preferably be short and sweet to avoid slowing down gnus too much.
7068 It's probably a good idea to byte-compile things like this.
7069
7070 @vindex gnus-prefetched-article-deletion-strategy
7071 Articles have to be removed from the asynch buffer sooner or later.  The
7072 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7073 articles.  This is a list that may contain the following elements:
7074
7075 @table @code
7076 @item read
7077 Remove articles when they are read.
7078
7079 @item exit
7080 Remove articles when exiting the group.
7081 @end table
7082
7083 The default value is @code{(read exit)}.
7084
7085 @c @vindex gnus-use-header-prefetch
7086 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7087 @c from the next group.
7088
7089
7090 @node Article Caching
7091 @section Article Caching
7092 @cindex article caching
7093 @cindex caching
7094
7095 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7096 consider turning article caching on.  Each article will then be stored
7097 locally under your home directory.  As you may surmise, this could
7098 potentially use @emph{huge} amounts of disk space, as well as eat up all
7099 your inodes so fast it will make your head swim.  In vodka.
7100
7101 Used carefully, though, it could be just an easier way to save articles.
7102
7103 @vindex gnus-use-long-file-name
7104 @vindex gnus-cache-directory
7105 @vindex gnus-use-cache
7106 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7107 all articles ticked or marked as dormant will then be copied
7108 over to your local cache (@code{gnus-cache-directory}).  Whether this
7109 cache is flat or hierarchical is controlled by the
7110 @code{gnus-use-long-file-name} variable, as usual.
7111
7112 When re-selecting a ticked or dormant article, it will be fetched from the
7113 cache instead of from the server.  As articles in your cache will never
7114 expire, this might serve as a method of saving articles while still
7115 keeping them where they belong.  Just mark all articles you want to save
7116 as dormant, and don't worry.
7117
7118 When an article is marked as read, is it removed from the cache.
7119
7120 @vindex gnus-cache-remove-articles
7121 @vindex gnus-cache-enter-articles
7122 The entering/removal of articles from the cache is controlled by the
7123 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7124 variables.  Both are lists of symbols.  The first is @code{(ticked
7125 dormant)} by default, meaning that ticked and dormant articles will be
7126 put in the cache.  The latter is @code{(read)} by default, meaning that
7127 articles marked as read are removed from the cache.  Possibly
7128 symbols in these two lists are @code{ticked}, @code{dormant},
7129 @code{unread} and @code{read}.
7130
7131 @findex gnus-jog-cache
7132 So where does the massive article-fetching and storing come into the
7133 picture?  The @code{gnus-jog-cache} command will go through all
7134 subscribed newsgroups, request all unread articles, score them, and
7135 store them in the cache.  You should only ever, ever ever ever, use this
7136 command if 1) your connection to the @acronym{NNTP} server is really, really,
7137 really slow and 2) you have a really, really, really huge disk.
7138 Seriously.  One way to cut down on the number of articles downloaded is
7139 to score unwanted articles down and have them marked as read.  They will
7140 not then be downloaded by this command.
7141
7142 @vindex gnus-uncacheable-groups
7143 @vindex gnus-cacheable-groups
7144 It is likely that you do not want caching on all groups.  For instance,
7145 if your @code{nnml} mail is located under your home directory, it makes no
7146 sense to cache it somewhere else under your home directory.  Unless you
7147 feel that it's neat to use twice as much space.
7148
7149 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7150 regexp of groups to cache, @samp{^nntp} for instance, or set the
7151 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7152 Both variables are @code{nil} by default.  If a group matches both
7153 variables, the group is not cached.
7154
7155 @findex gnus-cache-generate-nov-databases
7156 @findex gnus-cache-generate-active
7157 @vindex gnus-cache-active-file
7158 The cache stores information on what articles it contains in its active
7159 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7160 of the cache) becomes all messed up for some reason or other, gnus
7161 offers two functions that will try to set things right.  @kbd{M-x
7162 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7163 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7164 file.
7165
7166 @findex gnus-cache-move-cache
7167 @code{gnus-cache-move-cache} will move your whole
7168 @code{gnus-cache-directory} to some other location.  You get asked to
7169 where, isn't that cool?
7170
7171 @node Persistent Articles
7172 @section Persistent Articles
7173 @cindex persistent articles
7174
7175 Closely related to article caching, we have @dfn{persistent articles}.
7176 In fact, it's just a different way of looking at caching, and much more
7177 useful in my opinion.
7178
7179 Say you're reading a newsgroup, and you happen on to some valuable gem
7180 that you want to keep and treasure forever.  You'd normally just save it
7181 (using one of the many saving commands) in some file.  The problem with
7182 that is that it's just, well, yucky.  Ideally you'd prefer just having
7183 the article remain in the group where you found it forever; untouched by
7184 the expiry going on at the news server.
7185
7186 This is what a @dfn{persistent article} is---an article that just won't
7187 be deleted.  It's implemented using the normal cache functions, but
7188 you use two explicit commands for managing persistent articles:
7189
7190 @table @kbd
7191
7192 @item *
7193 @kindex * (Summary)
7194 @findex gnus-cache-enter-article
7195 Make the current article persistent (@code{gnus-cache-enter-article}).
7196
7197 @item M-*
7198 @kindex M-* (Summary)
7199 @findex gnus-cache-remove-article
7200 Remove the current article from the persistent articles
7201 (@code{gnus-cache-remove-article}).  This will normally delete the
7202 article.
7203 @end table
7204
7205 Both these commands understand the process/prefix convention.
7206
7207 To avoid having all ticked articles (and stuff) entered into the cache,
7208 you should set @code{gnus-use-cache} to @code{passive} if you're just
7209 interested in persistent articles:
7210
7211 @lisp
7212 (setq gnus-use-cache 'passive)
7213 @end lisp
7214
7215
7216 @node Article Backlog
7217 @section Article Backlog
7218 @cindex backlog
7219 @cindex article backlog
7220
7221 If you have a slow connection, but the idea of using caching seems
7222 unappealing to you (and it is, really), you can help the situation some
7223 by switching on the @dfn{backlog}.  This is where gnus will buffer
7224 already read articles so that it doesn't have to re-fetch articles
7225 you've already read.  This only helps if you are in the habit of
7226 re-selecting articles you've recently read, of course.  If you never do
7227 that, turning the backlog on will slow gnus down a little bit, and
7228 increase memory usage some.
7229
7230 @vindex gnus-keep-backlog
7231 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7232 at most @var{n} old articles in a buffer for later re-fetching.  If this
7233 variable is non-@code{nil} and is not a number, gnus will store
7234 @emph{all} read articles, which means that your Emacs will grow without
7235 bound before exploding and taking your machine down with you.  I put
7236 that in there just to keep y'all on your toes.
7237
7238 The default value is 20.
7239
7240
7241 @node Saving Articles
7242 @section Saving Articles
7243 @cindex saving articles
7244
7245 Gnus can save articles in a number of ways.  Below is the documentation
7246 for saving articles in a fairly straight-forward fashion (i.e., little
7247 processing of the article is done before it is saved).  For a different
7248 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7249 (@pxref{Decoding Articles}).
7250
7251 For the commands listed here, the target is a file.  If you want to
7252 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7253 command (@pxref{Mail Group Commands}).
7254
7255 @vindex gnus-save-all-headers
7256 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7257 unwanted headers before saving the article.
7258
7259 @vindex gnus-saved-headers
7260 If the preceding variable is @code{nil}, all headers that match the
7261 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7262 deleted before saving.
7263
7264 @table @kbd
7265
7266 @item O o
7267 @itemx o
7268 @kindex O o (Summary)
7269 @kindex o (Summary)
7270 @findex gnus-summary-save-article
7271 @c @icon{gnus-summary-save-article}
7272 Save the current article using the default article saver
7273 (@code{gnus-summary-save-article}).
7274
7275 @item O m
7276 @kindex O m (Summary)
7277 @findex gnus-summary-save-article-mail
7278 Save the current article in mail format
7279 (@code{gnus-summary-save-article-mail}).
7280
7281 @item O r
7282 @kindex O r (Summary)
7283 @findex gnus-summary-save-article-rmail
7284 Save the current article in Rmail format
7285 (@code{gnus-summary-save-article-rmail}).
7286
7287 @item O f
7288 @kindex O f (Summary)
7289 @findex gnus-summary-save-article-file
7290 @c @icon{gnus-summary-save-article-file}
7291 Save the current article in plain file format
7292 (@code{gnus-summary-save-article-file}).
7293
7294 @item O F
7295 @kindex O F (Summary)
7296 @findex gnus-summary-write-article-file
7297 Write the current article in plain file format, overwriting any previous
7298 file contents (@code{gnus-summary-write-article-file}).
7299
7300 @item O b
7301 @kindex O b (Summary)
7302 @findex gnus-summary-save-article-body-file
7303 Save the current article body in plain file format
7304 (@code{gnus-summary-save-article-body-file}).
7305
7306 @item O h
7307 @kindex O h (Summary)
7308 @findex gnus-summary-save-article-folder
7309 Save the current article in mh folder format
7310 (@code{gnus-summary-save-article-folder}).
7311
7312 @item O v
7313 @kindex O v (Summary)
7314 @findex gnus-summary-save-article-vm
7315 Save the current article in a VM folder
7316 (@code{gnus-summary-save-article-vm}).
7317
7318 @item O p
7319 @itemx |
7320 @kindex O p (Summary)
7321 @kindex | (Summary)
7322 @findex gnus-summary-pipe-output
7323 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7324 the current article to a process (@code{gnus-summary-pipe-output}).
7325 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7326 complete headers in the piped output.
7327
7328 @item O P
7329 @kindex O P (Summary)
7330 @findex gnus-summary-muttprint
7331 @vindex gnus-summary-muttprint-program
7332 Save the current article into muttprint.  That is, print it using the
7333 external program @uref{http://muttprint.sourceforge.net/,
7334 Muttprint}.  The program name and options to use is controlled by the
7335 variable @code{gnus-summary-muttprint-program}.
7336 (@code{gnus-summary-muttprint}).
7337
7338 @end table
7339
7340 @vindex gnus-prompt-before-saving
7341 All these commands use the process/prefix convention
7342 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7343 functions, you might get tired of being prompted for files to save each
7344 and every article in.  The prompting action is controlled by
7345 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7346 default, giving you that excessive prompting action you know and
7347 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7348 just once for each series of articles you save.  If you like to really
7349 have Gnus do all your thinking for you, you can even set this variable
7350 to @code{nil}, which means that you will never be prompted for files to
7351 save articles in.  Gnus will simply save all the articles in the default
7352 files.
7353
7354
7355 @vindex gnus-default-article-saver
7356 You can customize the @code{gnus-default-article-saver} variable to make
7357 gnus do what you want it to.  You can use any of the six ready-made
7358 functions below, or you can create your own.
7359
7360 @table @code
7361
7362 @item gnus-summary-save-in-rmail
7363 @findex gnus-summary-save-in-rmail
7364 @vindex gnus-rmail-save-name
7365 @findex gnus-plain-save-name
7366 This is the default format, @dfn{Babyl}.  Uses the function in the
7367 @code{gnus-rmail-save-name} variable to get a file name to save the
7368 article in.  The default is @code{gnus-plain-save-name}.
7369
7370 @item gnus-summary-save-in-mail
7371 @findex gnus-summary-save-in-mail
7372 @vindex gnus-mail-save-name
7373 Save in a Unix mail (mbox) file.  Uses the function in the
7374 @code{gnus-mail-save-name} variable to get a file name to save the
7375 article in.  The default is @code{gnus-plain-save-name}.
7376
7377 @item gnus-summary-save-in-file
7378 @findex gnus-summary-save-in-file
7379 @vindex gnus-file-save-name
7380 @findex gnus-numeric-save-name
7381 Append the article straight to an ordinary file.  Uses the function in
7382 the @code{gnus-file-save-name} variable to get a file name to save the
7383 article in.  The default is @code{gnus-numeric-save-name}.
7384
7385 @item gnus-summary-write-to-file
7386 @findex gnus-summary-write-to-file
7387 Write the article straight to an ordinary file.  The file is
7388 overwritten if it exists.  Uses the function in the
7389 @code{gnus-file-save-name} variable to get a file name to save the
7390 article in.  The default is @code{gnus-numeric-save-name}.
7391
7392 @item gnus-summary-save-body-in-file
7393 @findex gnus-summary-save-body-in-file
7394 Append the article body to an ordinary file.  Uses the function in the
7395 @code{gnus-file-save-name} variable to get a file name to save the
7396 article in.  The default is @code{gnus-numeric-save-name}.
7397
7398 @item gnus-summary-save-in-folder
7399 @findex gnus-summary-save-in-folder
7400 @findex gnus-folder-save-name
7401 @findex gnus-Folder-save-name
7402 @vindex gnus-folder-save-name
7403 @cindex rcvstore
7404 @cindex MH folders
7405 Save the article to an MH folder using @code{rcvstore} from the MH
7406 library.  Uses the function in the @code{gnus-folder-save-name} variable
7407 to get a file name to save the article in.  The default is
7408 @code{gnus-folder-save-name}, but you can also use
7409 @code{gnus-Folder-save-name}, which creates capitalized names.
7410
7411 @item gnus-summary-save-in-vm
7412 @findex gnus-summary-save-in-vm
7413 Save the article in a VM folder.  You have to have the VM mail
7414 reader to use this setting.
7415 @end table
7416
7417 @vindex gnus-article-save-directory
7418 All of these functions, except for the last one, will save the article
7419 in the @code{gnus-article-save-directory}, which is initialized from the
7420 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7421 default.
7422
7423 As you can see above, the functions use different functions to find a
7424 suitable name of a file to save the article in.  Below is a list of
7425 available functions that generate names:
7426
7427 @table @code
7428
7429 @item gnus-Numeric-save-name
7430 @findex gnus-Numeric-save-name
7431 File names like @file{~/News/Alt.andrea-dworkin/45}.
7432
7433 @item gnus-numeric-save-name
7434 @findex gnus-numeric-save-name
7435 File names like @file{~/News/alt.andrea-dworkin/45}.
7436
7437 @item gnus-Plain-save-name
7438 @findex gnus-Plain-save-name
7439 File names like @file{~/News/Alt.andrea-dworkin}.
7440
7441 @item gnus-plain-save-name
7442 @findex gnus-plain-save-name
7443 File names like @file{~/News/alt.andrea-dworkin}.
7444
7445 @item gnus-sender-save-name
7446 @findex gnus-sender-save-name
7447 File names like @file{~/News/larsi}.
7448 @end table
7449
7450 @vindex gnus-split-methods
7451 You can have gnus suggest where to save articles by plonking a regexp into
7452 the @code{gnus-split-methods} alist.  For instance, if you would like to
7453 save articles related to gnus in the file @file{gnus-stuff}, and articles
7454 related to VM in @file{vm-stuff}, you could set this variable to something
7455 like:
7456
7457 @lisp
7458 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7459  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7460  (my-choosing-function "../other-dir/my-stuff")
7461  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7462 @end lisp
7463
7464 We see that this is a list where each element is a list that has two
7465 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7466 a string (in which case it is used as a regexp to match on the article
7467 head); it can be a symbol (which will be called as a function with the
7468 group name as a parameter); or it can be a list (which will be
7469 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7470 the @dfn{file} will be used as a default prompt.  In addition, the
7471 result of the operation itself will be used if the function or form
7472 called returns a string or a list of strings.
7473
7474 You basically end up with a list of file names that might be used when
7475 saving the current article.  (All ``matches'' will be used.)  You will
7476 then be prompted for what you really want to use as a name, with file
7477 name completion over the results from applying this variable.
7478
7479 This variable is @code{((gnus-article-archive-name))} by default, which
7480 means that gnus will look at the articles it saves for an
7481 @code{Archive-name} line and use that as a suggestion for the file
7482 name.
7483
7484 Here's an example function to clean up file names somewhat.  If you have
7485 lots of mail groups called things like
7486 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7487 these group names before creating the file name to save to.  The
7488 following will do just that:
7489
7490 @lisp
7491 (defun my-save-name (group)
7492   (when (string-match "^nnml:mail." group)
7493     (substring group (match-end 0))))
7494
7495 (setq gnus-split-methods
7496       '((gnus-article-archive-name)
7497         (my-save-name)))
7498 @end lisp
7499
7500
7501 @vindex gnus-use-long-file-name
7502 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7503 @code{nil}, all the preceding functions will replace all periods
7504 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7505 the functions will generate hierarchies of directories instead of having
7506 all the files in the top level directory
7507 (@file{~/News/alt/andrea-dworkin} instead of
7508 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7509 on most systems.  However, for historical reasons, this is @code{nil} on
7510 Xenix and usg-unix-v machines by default.
7511
7512 This function also affects kill and score file names.  If this variable
7513 is a list, and the list contains the element @code{not-score}, long file
7514 names will not be used for score files, if it contains the element
7515 @code{not-save}, long file names will not be used for saving, and if it
7516 contains the element @code{not-kill}, long file names will not be used
7517 for kill files.
7518
7519 If you'd like to save articles in a hierarchy that looks something like
7520 a spool, you could
7521
7522 @lisp
7523 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7524 (setq gnus-default-article-saver
7525       'gnus-summary-save-in-file)          ; @r{no encoding}
7526 @end lisp
7527
7528 Then just save with @kbd{o}.  You'd then read this hierarchy with
7529 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7530 the top level directory as the argument (@file{~/News/}).  Then just walk
7531 around to the groups/directories with @code{nneething}.
7532
7533
7534 @node Decoding Articles
7535 @section Decoding Articles
7536 @cindex decoding articles
7537
7538 Sometime users post articles (or series of articles) that have been
7539 encoded in some way or other.  Gnus can decode them for you.
7540
7541 @menu
7542 * Uuencoded Articles::          Uudecode articles.
7543 * Shell Archives::              Unshar articles.
7544 * PostScript Files::            Split PostScript.
7545 * Other Files::                 Plain save and binhex.
7546 * Decoding Variables::          Variables for a happy decoding.
7547 * Viewing Files::               You want to look at the result of the decoding?
7548 @end menu
7549
7550 @cindex series
7551 @cindex article series
7552 All these functions use the process/prefix convention
7553 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7554 the extension that a ``single article'' means ``a single series''.  Gnus
7555 can find out by itself what articles belong to a series, decode all the
7556 articles and unpack/view/save the resulting file(s).
7557
7558 Gnus guesses what articles are in the series according to the following
7559 simplish rule: The subjects must be (nearly) identical, except for the
7560 last two numbers of the line.  (Spaces are largely ignored, however.)
7561
7562 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7563 will find all the articles that match the regexp @samp{^cat.gif
7564 ([0-9]+/[0-9]+).*$}.
7565
7566 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7567 series}, will not be properly recognized by any of the automatic viewing
7568 commands, and you have to mark the articles manually with @kbd{#}.
7569
7570
7571 @node Uuencoded Articles
7572 @subsection Uuencoded Articles
7573 @cindex uudecode
7574 @cindex uuencoded articles
7575
7576 @table @kbd
7577
7578 @item X u
7579 @kindex X u (Summary)
7580 @findex gnus-uu-decode-uu
7581 @c @icon{gnus-uu-decode-uu}
7582 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7583
7584 @item X U
7585 @kindex X U (Summary)
7586 @findex gnus-uu-decode-uu-and-save
7587 Uudecodes and saves the current series
7588 (@code{gnus-uu-decode-uu-and-save}).
7589
7590 @item X v u
7591 @kindex X v u (Summary)
7592 @findex gnus-uu-decode-uu-view
7593 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7594
7595 @item X v U
7596 @kindex X v U (Summary)
7597 @findex gnus-uu-decode-uu-and-save-view
7598 Uudecodes, views and saves the current series
7599 (@code{gnus-uu-decode-uu-and-save-view}).
7600
7601 @end table
7602
7603 Remember that these all react to the presence of articles marked with
7604 the process mark.  If, for instance, you'd like to decode and save an
7605 entire newsgroup, you'd typically do @kbd{M P a}
7606 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7607 (@code{gnus-uu-decode-uu-and-save}).
7608
7609 All this is very much different from how @code{gnus-uu} worked with
7610 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7611 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7612 articles in some way (@pxref{Setting Process Marks}) and then press
7613 @kbd{X u}.
7614
7615 @vindex gnus-uu-notify-files
7616 Note: When trying to decode articles that have names matching
7617 @code{gnus-uu-notify-files}, which is hard-coded to
7618 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7619 automatically post an article on @samp{comp.unix.wizards} saying that
7620 you have just viewed the file in question.  This feature can't be turned
7621 off.
7622
7623
7624 @node Shell Archives
7625 @subsection Shell Archives
7626 @cindex unshar
7627 @cindex shell archives
7628 @cindex shared articles
7629
7630 Shell archives (``shar files'') used to be a popular way to distribute
7631 sources, but it isn't used all that much today.  In any case, we have
7632 some commands to deal with these:
7633
7634 @table @kbd
7635
7636 @item X s
7637 @kindex X s (Summary)
7638 @findex gnus-uu-decode-unshar
7639 Unshars the current series (@code{gnus-uu-decode-unshar}).
7640
7641 @item X S
7642 @kindex X S (Summary)
7643 @findex gnus-uu-decode-unshar-and-save
7644 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7645
7646 @item X v s
7647 @kindex X v s (Summary)
7648 @findex gnus-uu-decode-unshar-view
7649 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7650
7651 @item X v S
7652 @kindex X v S (Summary)
7653 @findex gnus-uu-decode-unshar-and-save-view
7654 Unshars, views and saves the current series
7655 (@code{gnus-uu-decode-unshar-and-save-view}).
7656 @end table
7657
7658
7659 @node PostScript Files
7660 @subsection PostScript Files
7661 @cindex PostScript
7662
7663 @table @kbd
7664
7665 @item X p
7666 @kindex X p (Summary)
7667 @findex gnus-uu-decode-postscript
7668 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7669
7670 @item X P
7671 @kindex X P (Summary)
7672 @findex gnus-uu-decode-postscript-and-save
7673 Unpack and save the current PostScript series
7674 (@code{gnus-uu-decode-postscript-and-save}).
7675
7676 @item X v p
7677 @kindex X v p (Summary)
7678 @findex gnus-uu-decode-postscript-view
7679 View the current PostScript series
7680 (@code{gnus-uu-decode-postscript-view}).
7681
7682 @item X v P
7683 @kindex X v P (Summary)
7684 @findex gnus-uu-decode-postscript-and-save-view
7685 View and save the current PostScript series
7686 (@code{gnus-uu-decode-postscript-and-save-view}).
7687 @end table
7688
7689
7690 @node Other Files
7691 @subsection Other Files
7692
7693 @table @kbd
7694 @item X o
7695 @kindex X o (Summary)
7696 @findex gnus-uu-decode-save
7697 Save the current series
7698 (@code{gnus-uu-decode-save}).
7699
7700 @item X b
7701 @kindex X b (Summary)
7702 @findex gnus-uu-decode-binhex
7703 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7704 doesn't really work yet.
7705 @end table
7706
7707
7708 @node Decoding Variables
7709 @subsection Decoding Variables
7710
7711 Adjective, not verb.
7712
7713 @menu
7714 * Rule Variables::              Variables that say how a file is to be viewed.
7715 * Other Decode Variables::      Other decode variables.
7716 * Uuencoding and Posting::      Variables for customizing uuencoding.
7717 @end menu
7718
7719
7720 @node Rule Variables
7721 @subsubsection Rule Variables
7722 @cindex rule variables
7723
7724 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7725 variables are of the form
7726
7727 @lisp
7728       (list '(regexp1 command2)
7729             '(regexp2 command2)
7730             ...)
7731 @end lisp
7732
7733 @table @code
7734
7735 @item gnus-uu-user-view-rules
7736 @vindex gnus-uu-user-view-rules
7737 @cindex sox
7738 This variable is consulted first when viewing files.  If you wish to use,
7739 for instance, @code{sox} to convert an @file{.au} sound file, you could
7740 say something like:
7741 @lisp
7742 (setq gnus-uu-user-view-rules
7743       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7744 @end lisp
7745
7746 @item gnus-uu-user-view-rules-end
7747 @vindex gnus-uu-user-view-rules-end
7748 This variable is consulted if gnus couldn't make any matches from the
7749 user and default view rules.
7750
7751 @item gnus-uu-user-archive-rules
7752 @vindex gnus-uu-user-archive-rules
7753 This variable can be used to say what commands should be used to unpack
7754 archives.
7755 @end table
7756
7757
7758 @node Other Decode Variables
7759 @subsubsection Other Decode Variables
7760
7761 @table @code
7762 @vindex gnus-uu-grabbed-file-functions
7763
7764 @item gnus-uu-grabbed-file-functions
7765 All functions in this list will be called right after each file has been
7766 successfully decoded---so that you can move or view files right away,
7767 and don't have to wait for all files to be decoded before you can do
7768 anything.  Ready-made functions you can put in this list are:
7769
7770 @table @code
7771
7772 @item gnus-uu-grab-view
7773 @findex gnus-uu-grab-view
7774 View the file.
7775
7776 @item gnus-uu-grab-move
7777 @findex gnus-uu-grab-move
7778 Move the file (if you're using a saving function.)
7779 @end table
7780
7781 @item gnus-uu-be-dangerous
7782 @vindex gnus-uu-be-dangerous
7783 Specifies what to do if unusual situations arise during decoding.  If
7784 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7785 that didn't work, and overwrite existing files.  Otherwise, ask each
7786 time.
7787
7788 @item gnus-uu-ignore-files-by-name
7789 @vindex gnus-uu-ignore-files-by-name
7790 Files with name matching this regular expression won't be viewed.
7791
7792 @item gnus-uu-ignore-files-by-type
7793 @vindex gnus-uu-ignore-files-by-type
7794 Files with a @acronym{MIME} type matching this variable won't be viewed.
7795 Note that Gnus tries to guess what type the file is based on the name.
7796 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7797 kludgey.
7798
7799 @item gnus-uu-tmp-dir
7800 @vindex gnus-uu-tmp-dir
7801 Where @code{gnus-uu} does its work.
7802
7803 @item gnus-uu-do-not-unpack-archives
7804 @vindex gnus-uu-do-not-unpack-archives
7805 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7806 looking for files to display.
7807
7808 @item gnus-uu-view-and-save
7809 @vindex gnus-uu-view-and-save
7810 Non-@code{nil} means that the user will always be asked to save a file
7811 after viewing it.
7812
7813 @item gnus-uu-ignore-default-view-rules
7814 @vindex gnus-uu-ignore-default-view-rules
7815 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7816 rules.
7817
7818 @item gnus-uu-ignore-default-archive-rules
7819 @vindex gnus-uu-ignore-default-archive-rules
7820 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7821 unpacking commands.
7822
7823 @item gnus-uu-kill-carriage-return
7824 @vindex gnus-uu-kill-carriage-return
7825 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7826 from articles.
7827
7828 @item gnus-uu-unmark-articles-not-decoded
7829 @vindex gnus-uu-unmark-articles-not-decoded
7830 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7831 decoded articles as unread.
7832
7833 @item gnus-uu-correct-stripped-uucode
7834 @vindex gnus-uu-correct-stripped-uucode
7835 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7836 uuencoded files that have had trailing spaces deleted.
7837
7838 @item gnus-uu-pre-uudecode-hook
7839 @vindex gnus-uu-pre-uudecode-hook
7840 Hook run before sending a message to @code{uudecode}.
7841
7842 @item gnus-uu-view-with-metamail
7843 @vindex gnus-uu-view-with-metamail
7844 @cindex metamail
7845 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7846 commands defined by the rule variables and just fudge a @acronym{MIME}
7847 content type based on the file name.  The result will be fed to
7848 @code{metamail} for viewing.
7849
7850 @item gnus-uu-save-in-digest
7851 @vindex gnus-uu-save-in-digest
7852 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7853 decoding, will save in digests.  If this variable is @code{nil},
7854 @code{gnus-uu} will just save everything in a file without any
7855 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7856 to specify any meaningful volume and issue numbers were found, so I
7857 simply dropped them.
7858
7859 @end table
7860
7861
7862 @node Uuencoding and Posting
7863 @subsubsection Uuencoding and Posting
7864
7865 @table @code
7866
7867 @item gnus-uu-post-include-before-composing
7868 @vindex gnus-uu-post-include-before-composing
7869 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7870 before you compose the article.  If this variable is @code{t}, you can
7871 either include an encoded file with @kbd{C-c C-i} or have one included
7872 for you when you post the article.
7873
7874 @item gnus-uu-post-length
7875 @vindex gnus-uu-post-length
7876 Maximum length of an article.  The encoded file will be split into how
7877 many articles it takes to post the entire file.
7878
7879 @item gnus-uu-post-threaded
7880 @vindex gnus-uu-post-threaded
7881 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7882 thread.  This may not be smart, as no other decoder I have seen is able
7883 to follow threads when collecting uuencoded articles.  (Well, I have
7884 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7885 think that counts@dots{}) Default is @code{nil}.
7886
7887 @item gnus-uu-post-separate-description
7888 @vindex gnus-uu-post-separate-description
7889 Non-@code{nil} means that the description will be posted in a separate
7890 article.  The first article will typically be numbered (0/x).  If this
7891 variable is @code{nil}, the description the user enters will be included
7892 at the beginning of the first article, which will be numbered (1/x).
7893 Default is @code{t}.
7894
7895 @end table
7896
7897
7898 @node Viewing Files
7899 @subsection Viewing Files
7900 @cindex viewing files
7901 @cindex pseudo-articles
7902
7903 After decoding, if the file is some sort of archive, gnus will attempt
7904 to unpack the archive and see if any of the files in the archive can be
7905 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7906 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7907 uncompress and de-tar the main file, and then view the two pictures.
7908 This unpacking process is recursive, so if the archive contains archives
7909 of archives, it'll all be unpacked.
7910
7911 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7912 extracted file into the summary buffer.  If you go to these
7913 ``articles'', you will be prompted for a command to run (usually Gnus
7914 will make a suggestion), and then the command will be run.
7915
7916 @vindex gnus-view-pseudo-asynchronously
7917 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7918 until the viewing is done before proceeding.
7919
7920 @vindex gnus-view-pseudos
7921 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7922 the pseudo-articles into the summary buffer, but view them
7923 immediately.  If this variable is @code{not-confirm}, the user won't even
7924 be asked for a confirmation before viewing is done.
7925
7926 @vindex gnus-view-pseudos-separately
7927 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7928 pseudo-article will be created for each file to be viewed.  If
7929 @code{nil}, all files that use the same viewing command will be given as
7930 a list of parameters to that command.
7931
7932 @vindex gnus-insert-pseudo-articles
7933 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7934 pseudo-articles when decoding.  It is @code{t} by default.
7935
7936 So; there you are, reading your @emph{pseudo-articles} in your
7937 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7938 Why isn't anything real anymore? How did we get here?
7939
7940
7941 @node Article Treatment
7942 @section Article Treatment
7943
7944 Reading through this huge manual, you may have quite forgotten that the
7945 object of newsreaders is to actually, like, read what people have
7946 written.  Reading articles.  Unfortunately, people are quite bad at
7947 writing, so there are tons of functions and variables to make reading
7948 these articles easier.
7949
7950 @menu
7951 * Article Highlighting::        You want to make the article look like fruit salad.
7952 * Article Fontisizing::         Making emphasized text look nice.
7953 * Article Hiding::              You also want to make certain info go away.
7954 * Article Washing::             Lots of way-neat functions to make life better.
7955 * Article Header::              Doing various header transformations.
7956 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7957 * Article Button Levels::       Controlling appearance of buttons.
7958 * Article Date::                Grumble, UT!
7959 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7960 * Article Signature::           What is a signature?
7961 * Article Miscellanea::         Various other stuff.
7962 @end menu
7963
7964
7965 @node Article Highlighting
7966 @subsection Article Highlighting
7967 @cindex highlighting
7968
7969 Not only do you want your article buffer to look like fruit salad, but
7970 you want it to look like technicolor fruit salad.
7971
7972 @table @kbd
7973
7974 @item W H a
7975 @kindex W H a (Summary)
7976 @findex gnus-article-highlight
7977 @findex gnus-article-maybe-highlight
7978 Do much highlighting of the current article
7979 (@code{gnus-article-highlight}).  This function highlights header, cited
7980 text, the signature, and adds buttons to the body and the head.
7981
7982 @item W H h
7983 @kindex W H h (Summary)
7984 @findex gnus-article-highlight-headers
7985 @vindex gnus-header-face-alist
7986 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7987 highlighting will be done according to the @code{gnus-header-face-alist}
7988 variable, which is a list where each element has the form
7989 @code{(@var{regexp} @var{name} @var{content})}.
7990 @var{regexp} is a regular expression for matching the
7991 header, @var{name} is the face used for highlighting the header name
7992 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7993 the header value.  The first match made will be used.  Note that
7994 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7995
7996 @item W H c
7997 @kindex W H c (Summary)
7998 @findex gnus-article-highlight-citation
7999 Highlight cited text (@code{gnus-article-highlight-citation}).
8000
8001 Some variables to customize the citation highlights:
8002
8003 @table @code
8004 @vindex gnus-cite-parse-max-size
8005
8006 @item gnus-cite-parse-max-size
8007 If the article size if bigger than this variable (which is 25000 by
8008 default), no citation highlighting will be performed.
8009
8010 @item gnus-cite-max-prefix
8011 @vindex gnus-cite-max-prefix
8012 Maximum possible length for a citation prefix (default 20).
8013
8014 @item gnus-cite-face-list
8015 @vindex gnus-cite-face-list
8016 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8017 When there are citations from multiple articles in the same message,
8018 gnus will try to give each citation from each article its own face.
8019 This should make it easier to see who wrote what.
8020
8021 @item gnus-supercite-regexp
8022 @vindex gnus-supercite-regexp
8023 Regexp matching normal Supercite attribution lines.
8024
8025 @item gnus-supercite-secondary-regexp
8026 @vindex gnus-supercite-secondary-regexp
8027 Regexp matching mangled Supercite attribution lines.
8028
8029 @item gnus-cite-minimum-match-count
8030 @vindex gnus-cite-minimum-match-count
8031 Minimum number of identical prefixes we have to see before we believe
8032 that it's a citation.
8033
8034 @item gnus-cite-attribution-prefix
8035 @vindex gnus-cite-attribution-prefix
8036 Regexp matching the beginning of an attribution line.
8037
8038 @item gnus-cite-attribution-suffix
8039 @vindex gnus-cite-attribution-suffix
8040 Regexp matching the end of an attribution line.
8041
8042 @item gnus-cite-attribution-face
8043 @vindex gnus-cite-attribution-face
8044 Face used for attribution lines.  It is merged with the face for the
8045 cited text belonging to the attribution.
8046
8047 @end table
8048
8049
8050 @item W H s
8051 @kindex W H s (Summary)
8052 @vindex gnus-signature-separator
8053 @vindex gnus-signature-face
8054 @findex gnus-article-highlight-signature
8055 Highlight the signature (@code{gnus-article-highlight-signature}).
8056 Everything after @code{gnus-signature-separator} (@pxref{Article
8057 Signature}) in an article will be considered a signature and will be
8058 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8059 default.
8060
8061 @end table
8062
8063 @xref{Customizing Articles}, for how to highlight articles automatically.
8064
8065
8066 @node Article Fontisizing
8067 @subsection Article Fontisizing
8068 @cindex emphasis
8069 @cindex article emphasis
8070
8071 @findex gnus-article-emphasize
8072 @kindex W e (Summary)
8073 People commonly add emphasis to words in news articles by writing things
8074 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8075 this look nicer by running the article through the @kbd{W e}
8076 (@code{gnus-article-emphasize}) command.
8077
8078 @vindex gnus-emphasis-alist
8079 How the emphasis is computed is controlled by the
8080 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8081 element is a regular expression to be matched.  The second is a number
8082 that says what regular expression grouping is used to find the entire
8083 emphasized word.  The third is a number that says what regexp grouping
8084 should be displayed and highlighted.  (The text between these two
8085 groupings will be hidden.)  The fourth is the face used for
8086 highlighting.
8087
8088 @lisp
8089 (setq gnus-emphasis-alist
8090       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8091         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8092 @end lisp
8093
8094 @cindex slash
8095 @cindex asterisk
8096 @cindex underline
8097 @cindex /
8098 @cindex *
8099
8100 @vindex gnus-emphasis-underline
8101 @vindex gnus-emphasis-bold
8102 @vindex gnus-emphasis-italic
8103 @vindex gnus-emphasis-underline-bold
8104 @vindex gnus-emphasis-underline-italic
8105 @vindex gnus-emphasis-bold-italic
8106 @vindex gnus-emphasis-underline-bold-italic
8107 By default, there are seven rules, and they use the following faces:
8108 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8109 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8110 @code{gnus-emphasis-underline-italic},
8111 @code{gnus-emphasis-underline-bold}, and
8112 @code{gnus-emphasis-underline-bold-italic}.
8113
8114 If you want to change these faces, you can either use @kbd{M-x
8115 customize}, or you can use @code{copy-face}.  For instance, if you want
8116 to make @code{gnus-emphasis-italic} use a red face instead, you could
8117 say something like:
8118
8119 @lisp
8120 (copy-face 'red 'gnus-emphasis-italic)
8121 @end lisp
8122
8123 @vindex gnus-group-highlight-words-alist
8124
8125 If you want to highlight arbitrary words, you can use the
8126 @code{gnus-group-highlight-words-alist} variable, which uses the same
8127 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8128 parameter (@pxref{Group Parameters}) can also be used.
8129
8130 @xref{Customizing Articles}, for how to fontize articles automatically.
8131
8132
8133 @node Article Hiding
8134 @subsection Article Hiding
8135 @cindex article hiding
8136
8137 Or rather, hiding certain things in each article.  There usually is much
8138 too much cruft in most articles.
8139
8140 @table @kbd
8141
8142 @item W W a
8143 @kindex W W a (Summary)
8144 @findex gnus-article-hide
8145 Do quite a lot of hiding on the article buffer
8146 (@kbd{gnus-article-hide}).  In particular, this function will hide
8147 headers, @acronym{PGP}, cited text and the signature.
8148
8149 @item W W h
8150 @kindex W W h (Summary)
8151 @findex gnus-article-hide-headers
8152 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8153 Headers}.
8154
8155 @item W W b
8156 @kindex W W b (Summary)
8157 @findex gnus-article-hide-boring-headers
8158 Hide headers that aren't particularly interesting
8159 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8160
8161 @item W W s
8162 @kindex W W s (Summary)
8163 @findex gnus-article-hide-signature
8164 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8165 Signature}.
8166
8167 @item W W l
8168 @kindex W W l (Summary)
8169 @findex gnus-article-hide-list-identifiers
8170 @vindex gnus-list-identifiers
8171 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8172 are strings some mailing list servers add to the beginning of all
8173 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8174 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8175 may not contain @code{\\(..\\)}.
8176
8177 @table @code
8178
8179 @item gnus-list-identifiers
8180 @vindex gnus-list-identifiers
8181 A regular expression that matches list identifiers to be removed from
8182 subject.  This can also be a list of regular expressions.
8183
8184 @end table
8185
8186 @item W W P
8187 @kindex W W P (Summary)
8188 @findex gnus-article-hide-pem
8189 Hide @acronym{PEM} (privacy enhanced messages) cruft
8190 (@code{gnus-article-hide-pem}).
8191
8192 @item W W B
8193 @kindex W W B (Summary)
8194 @findex gnus-article-strip-banner
8195 @vindex gnus-article-banner-alist
8196 @vindex gnus-article-address-banner-alist
8197 @cindex banner
8198 @cindex OneList
8199 @cindex stripping advertisements
8200 @cindex advertisements
8201 Strip the banner specified by the @code{banner} group parameter
8202 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8203 annoying banners and/or signatures that some mailing lists and moderated
8204 groups adds to all the messages.  The way to use this function is to add
8205 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8206 group you want banners stripped from.  The parameter either be a string,
8207 which will be interpreted as a regular expression matching text to be
8208 removed, or the symbol @code{signature}, meaning that the (last)
8209 signature should be removed, or other symbol, meaning that the
8210 corresponding regular expression in @code{gnus-article-banner-alist} is
8211 used.
8212
8213 Regardless of a group, you can hide things like advertisements only when
8214 the sender of an article has a certain mail address specified in
8215 @code{gnus-article-address-banner-alist}.
8216
8217 @table @code
8218
8219 @item gnus-article-address-banner-alist
8220 @vindex gnus-article-address-banner-alist
8221 Alist of mail addresses and banners.  Each element has the form
8222 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8223 matching a mail address in the From header, @var{banner} is one of a
8224 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8225 a regexp and @code{nil}.  If @var{address} matches author's mail
8226 address, it will remove things like advertisements.  For example, if a
8227 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8228 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8229 sends, you can use the following element to remove them:
8230
8231 @lisp
8232 ("@@yoo-hoo\\.co\\.jp\\'" .
8233  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8234 @end lisp
8235
8236 @end table
8237
8238 @item W W c
8239 @kindex W W c (Summary)
8240 @findex gnus-article-hide-citation
8241 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8242 customizing the hiding:
8243
8244 @table @code
8245
8246 @item gnus-cited-opened-text-button-line-format
8247 @itemx gnus-cited-closed-text-button-line-format
8248 @vindex gnus-cited-closed-text-button-line-format
8249 @vindex gnus-cited-opened-text-button-line-format
8250 Gnus adds buttons to show where the cited text has been hidden, and to
8251 allow toggle hiding the text.  The format of the variable is specified
8252 by these format-like variable (@pxref{Formatting Variables}).  These
8253 specs are valid:
8254
8255 @table @samp
8256 @item b
8257 Starting point of the hidden text.
8258 @item e
8259 Ending point of the hidden text.
8260 @item l
8261 Number of characters in the hidden region.
8262 @item n
8263 Number of lines of hidden text.
8264 @end table
8265
8266 @item gnus-cited-lines-visible
8267 @vindex gnus-cited-lines-visible
8268 The number of lines at the beginning of the cited text to leave
8269 shown.  This can also be a cons cell with the number of lines at the top
8270 and bottom of the text, respectively, to remain visible.
8271
8272 @end table
8273
8274 @item W W C-c
8275 @kindex W W C-c (Summary)
8276 @findex gnus-article-hide-citation-maybe
8277
8278 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8279 following two variables:
8280
8281 @table @code
8282 @item gnus-cite-hide-percentage
8283 @vindex gnus-cite-hide-percentage
8284 If the cited text is of a bigger percentage than this variable (default
8285 50), hide the cited text.
8286
8287 @item gnus-cite-hide-absolute
8288 @vindex gnus-cite-hide-absolute
8289 The cited text must have at least this length (default 10) before it
8290 is hidden.
8291 @end table
8292
8293 @item W W C
8294 @kindex W W C (Summary)
8295 @findex gnus-article-hide-citation-in-followups
8296 Hide cited text in articles that aren't roots
8297 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8298 useful as an interactive command, but might be a handy function to stick
8299 have happen automatically (@pxref{Customizing Articles}).
8300
8301 @end table
8302
8303 All these ``hiding'' commands are toggles, but if you give a negative
8304 prefix to these commands, they will show what they have previously
8305 hidden.  If you give a positive prefix, they will always hide.
8306
8307 Also @pxref{Article Highlighting} for further variables for
8308 citation customization.
8309
8310 @xref{Customizing Articles}, for how to hide article elements
8311 automatically.
8312
8313
8314 @node Article Washing
8315 @subsection Article Washing
8316 @cindex washing
8317 @cindex article washing
8318
8319 We call this ``article washing'' for a really good reason.  Namely, the
8320 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8321
8322 @dfn{Washing} is defined by us as ``changing something from something to
8323 something else'', but normally results in something looking better.
8324 Cleaner, perhaps.
8325
8326 @xref{Customizing Articles}, if you want to change how Gnus displays
8327 articles by default.
8328
8329 @table @kbd
8330
8331 @item C-u g
8332 This is not really washing, it's sort of the opposite of washing.  If
8333 you type this, you see the article exactly as it exists on disk or on
8334 the server.
8335
8336 @item g
8337 Force redisplaying of the current article
8338 (@code{gnus-summary-show-article}).  This is also not really washing.
8339 If you type this, you see the article without any previously applied
8340 interactive Washing functions but with all default treatments
8341 (@pxref{Customizing Articles}).
8342
8343 @item W l
8344 @kindex W l (Summary)
8345 @findex gnus-summary-stop-page-breaking
8346 Remove page breaks from the current article
8347 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8348 delimiters.
8349
8350 @item W r
8351 @kindex W r (Summary)
8352 @findex gnus-summary-caesar-message
8353 @c @icon{gnus-summary-caesar-message}
8354 Do a Caesar rotate (rot13) on the article buffer
8355 (@code{gnus-summary-caesar-message}).
8356 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8357 (Typically offensive jokes and such.)
8358
8359 It's commonly called ``rot13'' because each letter is rotated 13
8360 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8361 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8362 is rumored to have employed this form of, uh, somewhat weak encryption.
8363
8364 @item W m
8365 @kindex W m (Summary)
8366 @findex gnus-summary-morse-message
8367 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8368
8369 @item W t
8370 @item t
8371 @kindex W t (Summary)
8372 @kindex t (Summary)
8373 @findex gnus-summary-toggle-header
8374 Toggle whether to display all headers in the article buffer
8375 (@code{gnus-summary-toggle-header}).
8376
8377 @item W v
8378 @kindex W v (Summary)
8379 @findex gnus-summary-verbose-headers
8380 Toggle whether to display all headers in the article buffer permanently
8381 (@code{gnus-summary-verbose-headers}).
8382
8383 @item W m
8384 @kindex W m (Summary)
8385 @findex gnus-summary-toggle-mime
8386 Toggle whether to run the article through @acronym{MIME} before
8387 displaying (@code{gnus-summary-toggle-mime}).
8388
8389 @item W o
8390 @kindex W o (Summary)
8391 @findex gnus-article-treat-overstrike
8392 Treat overstrike (@code{gnus-article-treat-overstrike}).
8393
8394 @item W d
8395 @kindex W d (Summary)
8396 @findex gnus-article-treat-dumbquotes
8397 @vindex gnus-article-dumbquotes-map
8398 @cindex Smartquotes
8399 @cindex M****s*** sm*rtq**t*s
8400 @cindex Latin 1
8401 Treat M****s*** sm*rtq**t*s according to
8402 @code{gnus-article-dumbquotes-map}
8403 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8404 whether a character is a sm*rtq**t* or not, so it should only be used
8405 interactively.
8406
8407 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8408 an attempt to provide more quoting characters.  If you see something
8409 like @code{\222} or @code{\264} where you're expecting some kind of
8410 apostrophe or quotation mark, then try this wash.
8411
8412 @item W Y f
8413 @kindex W Y f (Summary)
8414 @findex gnus-article-outlook-deuglify-article
8415 @cindex Outlook Express
8416 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8417 unwrap lines, repair attribution and rearrange citation.
8418 (@code{gnus-article-outlook-deuglify-article}).
8419
8420 @item W Y u
8421 @kindex W Y u (Summary)
8422 @findex gnus-article-outlook-unwrap-lines
8423 @vindex gnus-outlook-deuglify-unwrap-min
8424 @vindex gnus-outlook-deuglify-unwrap-max
8425 Unwrap lines that appear to be wrapped citation lines.  You can control
8426 what lines will be unwrapped by frobbing
8427 @code{gnus-outlook-deuglify-unwrap-min} and
8428 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8429 maximum length of an unwrapped citation line.
8430 (@code{gnus-article-outlook-unwrap-lines}).
8431
8432 @item W Y a
8433 @kindex W Y a (Summary)
8434 @findex gnus-article-outlook-repair-attribution
8435 Repair a broken attribution line.@*
8436 (@code{gnus-article-outlook-repair-attribution}).
8437
8438 @item W Y c
8439 @kindex W Y c (Summary)
8440 @findex gnus-article-outlook-rearrange-citation
8441 Repair broken citations by rearranging the text.
8442 (@code{gnus-article-outlook-rearrange-citation}).
8443
8444 @item W w
8445 @kindex W w (Summary)
8446 @findex gnus-article-fill-cited-article
8447 Do word wrap (@code{gnus-article-fill-cited-article}).
8448
8449 You can give the command a numerical prefix to specify the width to use
8450 when filling.
8451
8452 @item W Q
8453 @kindex W Q (Summary)
8454 @findex gnus-article-fill-long-lines
8455 Fill long lines (@code{gnus-article-fill-long-lines}).
8456
8457 @item W C
8458 @kindex W C (Summary)
8459 @findex gnus-article-capitalize-sentences
8460 Capitalize the first word in each sentence
8461 (@code{gnus-article-capitalize-sentences}).
8462
8463 @item W c
8464 @kindex W c (Summary)
8465 @findex gnus-article-remove-cr
8466 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8467 (this takes care of DOS line endings), and then translate any remaining
8468 CRs into LF (this takes care of Mac line endings)
8469 (@code{gnus-article-remove-cr}).
8470
8471 @kindex W q (Summary)
8472 @findex gnus-article-de-quoted-unreadable
8473 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8474 Quoted-Printable is one common @acronym{MIME} encoding employed when
8475 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8476 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8477 doesn't look very readable to me.  Note that this is usually done
8478 automatically by Gnus if the message in question has a
8479 @code{Content-Transfer-Encoding} header that says that this encoding
8480 has been done.  If a prefix is given, a charset will be asked for.
8481
8482 @item W 6
8483 @kindex W 6 (Summary)
8484 @findex gnus-article-de-base64-unreadable
8485 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8486 one common @acronym{MIME} encoding employed when sending
8487 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8488 usually done automatically by Gnus if the message in question has a
8489 @code{Content-Transfer-Encoding} header that says that this encoding
8490 has been done.  If a prefix is given, a charset will be asked for.
8491
8492 @item W Z
8493 @kindex W Z (Summary)
8494 @findex gnus-article-decode-HZ
8495 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8496 common encoding employed when sending Chinese articles.  It typically
8497 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8498
8499 @item W u
8500 @kindex W u (Summary)
8501 @findex gnus-article-unsplit-urls
8502 Remove newlines from within URLs.  Some mailers insert newlines into
8503 outgoing email messages to keep lines short.  This reformatting can
8504 split long URLs onto multiple lines.  Repair those URLs by removing
8505 the newlines (@code{gnus-article-unsplit-urls}).
8506
8507 @item W h
8508 @kindex W h (Summary)
8509 @findex gnus-article-wash-html
8510 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8511 usually done automatically by Gnus if the message in question has a
8512 @code{Content-Type} header that says that the message is @acronym{HTML}.
8513
8514 If a prefix is given, a charset will be asked for.
8515
8516 @vindex gnus-article-wash-function
8517 The default is to use the function specified by
8518 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8519 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8520 @acronym{HTML}, but this is controlled by the
8521 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8522 can use include:
8523
8524 @table @code
8525 @item w3
8526 Use Emacs/w3.
8527
8528 @item w3m
8529 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8530
8531 @item links
8532 Use @uref{http://links.sf.net/, Links}.
8533
8534 @item lynx
8535 Use @uref{http://lynx.isc.org/, Lynx}.
8536
8537 @item html2text
8538 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8539
8540 @end table
8541
8542 @item W b
8543 @kindex W b (Summary)
8544 @findex gnus-article-add-buttons
8545 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8546 @xref{Article Buttons}.
8547
8548 @item W B
8549 @kindex W B (Summary)
8550 @findex gnus-article-add-buttons-to-head
8551 Add clickable buttons to the article headers
8552 (@code{gnus-article-add-buttons-to-head}).
8553
8554 @item W p
8555 @kindex W p (Summary)
8556 @findex gnus-article-verify-x-pgp-sig
8557 Verify a signed control message
8558 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8559 @code{newgroup} and @code{checkgroups} are usually signed by the
8560 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8561 the maintainer to your keyring to verify the
8562 message.@footnote{@acronym{PGP} keys for many hierarchies are
8563 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8564
8565 @item W s
8566 @kindex W s (Summary)
8567 @findex gnus-summary-force-verify-and-decrypt
8568 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8569 @acronym{S/MIME}) message
8570 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8571
8572 @item W a
8573 @kindex W a (Summary)
8574 @findex gnus-article-strip-headers-in-body
8575 Strip headers like the @code{X-No-Archive} header from the beginning of
8576 article bodies (@code{gnus-article-strip-headers-in-body}).
8577
8578 @item W E l
8579 @kindex W E l (Summary)
8580 @findex gnus-article-strip-leading-blank-lines
8581 Remove all blank lines from the beginning of the article
8582 (@code{gnus-article-strip-leading-blank-lines}).
8583
8584 @item W E m
8585 @kindex W E m (Summary)
8586 @findex gnus-article-strip-multiple-blank-lines
8587 Replace all blank lines with empty lines and then all multiple empty
8588 lines with a single empty line.
8589 (@code{gnus-article-strip-multiple-blank-lines}).
8590
8591 @item W E t
8592 @kindex W E t (Summary)
8593 @findex gnus-article-remove-trailing-blank-lines
8594 Remove all blank lines at the end of the article
8595 (@code{gnus-article-remove-trailing-blank-lines}).
8596
8597 @item W E a
8598 @kindex W E a (Summary)
8599 @findex gnus-article-strip-blank-lines
8600 Do all the three commands above
8601 (@code{gnus-article-strip-blank-lines}).
8602
8603 @item W E A
8604 @kindex W E A (Summary)
8605 @findex gnus-article-strip-all-blank-lines
8606 Remove all blank lines
8607 (@code{gnus-article-strip-all-blank-lines}).
8608
8609 @item W E s
8610 @kindex W E s (Summary)
8611 @findex gnus-article-strip-leading-space
8612 Remove all white space from the beginning of all lines of the article
8613 body (@code{gnus-article-strip-leading-space}).
8614
8615 @item W E e
8616 @kindex W E e (Summary)
8617 @findex gnus-article-strip-trailing-space
8618 Remove all white space from the end of all lines of the article
8619 body (@code{gnus-article-strip-trailing-space}).
8620
8621 @end table
8622
8623 @xref{Customizing Articles}, for how to wash articles automatically.
8624
8625
8626 @node Article Header
8627 @subsection Article Header
8628
8629 These commands perform various transformations of article header.
8630
8631 @table @kbd
8632
8633 @item W G u
8634 @kindex W G u (Summary)
8635 @findex gnus-article-treat-unfold-headers
8636 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8637
8638 @item W G n
8639 @kindex W G n (Summary)
8640 @findex gnus-article-treat-fold-newsgroups
8641 Fold the @code{Newsgroups} and @code{Followup-To} headers
8642 (@code{gnus-article-treat-fold-newsgroups}).
8643
8644 @item W G f
8645 @kindex W G f (Summary)
8646 @findex gnus-article-treat-fold-headers
8647 Fold all the message headers
8648 (@code{gnus-article-treat-fold-headers}).
8649
8650 @item W E w
8651 @kindex W E w
8652 @findex gnus-article-remove-leading-whitespace
8653 Remove excessive whitespace from all headers
8654 (@code{gnus-article-remove-leading-whitespace}).
8655
8656 @end table
8657
8658
8659 @node Article Buttons
8660 @subsection Article Buttons
8661 @cindex buttons
8662
8663 People often include references to other stuff in articles, and it would
8664 be nice if Gnus could just fetch whatever it is that people talk about
8665 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8666 button on these references.
8667
8668 @vindex gnus-button-man-handler
8669 Gnus adds @dfn{buttons} to certain standard references by default:
8670 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8671 Emacs or Gnus related references.  This is controlled by two variables,
8672 one that handles article bodies and one that handles article heads:
8673
8674 @table @code
8675
8676 @item gnus-button-alist
8677 @vindex gnus-button-alist
8678 This is an alist where each entry has this form:
8679
8680 @lisp
8681 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8682 @end lisp
8683
8684 @table @var
8685
8686 @item regexp
8687 All text that match this regular expression (case insensitive) will be
8688 considered an external reference.  Here's a typical regexp that matches
8689 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8690 variable containing a regexp, useful variables to use include
8691 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8692
8693 @item button-par
8694 Gnus has to know which parts of the matches is to be highlighted.  This
8695 is a number that says what sub-expression of the regexp is to be
8696 highlighted.  If you want it all highlighted, you use 0 here.
8697
8698 @item use-p
8699 This form will be @code{eval}ed, and if the result is non-@code{nil},
8700 this is considered a match.  This is useful if you want extra sifting to
8701 avoid false matches.  Often variables named
8702 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8703 Levels}, but any other form may be used too.
8704
8705 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8706
8707 @item function
8708 This function will be called when you click on this button.
8709
8710 @item data-par
8711 As with @var{button-par}, this is a sub-expression number, but this one
8712 says which part of the match is to be sent as data to @var{function}.
8713
8714 @end table
8715
8716 So the full entry for buttonizing URLs is then
8717
8718 @lisp
8719 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8720 @end lisp
8721
8722 @item gnus-header-button-alist
8723 @vindex gnus-header-button-alist
8724 This is just like the other alist, except that it is applied to the
8725 article head only, and that each entry has an additional element that is
8726 used to say what headers to apply the buttonize coding to:
8727
8728 @lisp
8729 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8730 @end lisp
8731
8732 @var{header} is a regular expression.
8733 @end table
8734
8735 @subsubsection Related variables and functions
8736
8737 @table @code
8738 @item gnus-button-@var{*}-level
8739 @xref{Article Button Levels}.
8740
8741 @c Stuff related to gnus-button-browse-level
8742
8743 @item gnus-button-url-regexp
8744 @vindex gnus-button-url-regexp
8745 A regular expression that matches embedded URLs.  It is used in the
8746 default values of the variables above.
8747
8748 @c Stuff related to gnus-button-man-level
8749
8750 @item gnus-button-man-handler
8751 @vindex gnus-button-man-handler
8752 The function to use for displaying man pages.  It must take at least one
8753 argument with a string naming the man page.
8754
8755 @c Stuff related to gnus-button-message-level
8756
8757 @item gnus-button-mid-or-mail-regexp
8758 @vindex gnus-button-mid-or-mail-regexp
8759 Regular expression that matches a message ID or a mail address.
8760
8761 @item gnus-button-prefer-mid-or-mail
8762 @vindex gnus-button-prefer-mid-or-mail
8763 This variable determines what to do when the button on a string as
8764 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8765 message ID or a mail address.  If it is one of the symbols @code{mid} or
8766 @code{mail}, Gnus will always assume that the string is a message ID or
8767 a mail address, respectively.  If this variable is set to the symbol
8768 @code{ask}, always query the user what do do.  If it is a function, this
8769 function will be called with the string as its only argument.  The
8770 function must return @code{mid}, @code{mail}, @code{invalid} or
8771 @code{ask}.  The default value is the function
8772 @code{gnus-button-mid-or-mail-heuristic}.
8773
8774 @item gnus-button-mid-or-mail-heuristic
8775 @findex gnus-button-mid-or-mail-heuristic
8776 Function that guesses whether its argument is a message ID or a mail
8777 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8778 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8779 string is invalid.
8780
8781 @item gnus-button-mid-or-mail-heuristic-alist
8782 @vindex gnus-button-mid-or-mail-heuristic-alist
8783 An alist of @code{(RATE . REGEXP)} pairs used by the function
8784 @code{gnus-button-mid-or-mail-heuristic}.
8785
8786 @c Stuff related to gnus-button-tex-level
8787
8788 @item gnus-button-ctan-handler
8789 @findex gnus-button-ctan-handler
8790 The function to use for displaying CTAN links.  It must take one
8791 argument, the string naming the URL.
8792
8793 @item gnus-ctan-url
8794 @vindex gnus-ctan-url
8795 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8796 by @code{gnus-button-ctan-handler}.
8797
8798 @c Misc stuff
8799
8800 @item gnus-article-button-face
8801 @vindex gnus-article-button-face
8802 Face used on buttons.
8803
8804 @item gnus-article-mouse-face
8805 @vindex gnus-article-mouse-face
8806 Face used when the mouse cursor is over a button.
8807
8808 @end table
8809
8810 @xref{Customizing Articles}, for how to buttonize articles automatically.
8811
8812
8813 @node Article Button Levels
8814 @subsection Article button levels
8815 @cindex button levels
8816 The higher the value of the variables @code{gnus-button-@var{*}-level},
8817 the more buttons will appear.  If the level is zero, no corresponding
8818 buttons are displayed.  With the default value (which is 5) you should
8819 already see quite a lot of buttons.  With higher levels, you will see
8820 more buttons, but you may also get more false positives.  To avoid them,
8821 you can set the variables @code{gnus-button-@var{*}-level} local to
8822 specific groups (@pxref{Group Parameters}).  Here's an example for the
8823 variable @code{gnus-parameters}:
8824
8825 @lisp
8826 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8827 (setq gnus-parameters
8828       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8829         ("\\<unix\\>"               (gnus-button-man-level 10))
8830         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8831 @end lisp
8832
8833 @table @code
8834
8835 @item gnus-button-browse-level
8836 @vindex gnus-button-browse-level
8837 Controls the display of references to message IDs, mail addresses and
8838 news URLs.  Related variables and functions include
8839 @code{gnus-button-url-regexp}, @code{browse-url}, and
8840 @code{browse-url-browser-function}.
8841
8842 @item gnus-button-emacs-level
8843 @vindex gnus-button-emacs-level
8844 Controls the display of Emacs or Gnus references.  Related functions are
8845 @code{gnus-button-handle-custom},
8846 @code{gnus-button-handle-describe-function},
8847 @code{gnus-button-handle-describe-variable},
8848 @code{gnus-button-handle-symbol},
8849 @code{gnus-button-handle-describe-key},
8850 @code{gnus-button-handle-apropos},
8851 @code{gnus-button-handle-apropos-command},
8852 @code{gnus-button-handle-apropos-variable},
8853 @code{gnus-button-handle-apropos-documentation}, and
8854 @code{gnus-button-handle-library}.
8855
8856 @item gnus-button-man-level
8857 @vindex gnus-button-man-level
8858 Controls the display of references to (Unix) man pages.
8859 See @code{gnus-button-man-handler}.
8860
8861 @item gnus-button-message-level
8862 @vindex gnus-button-message-level
8863 Controls the display of message IDs, mail addresses and news URLs.
8864 Related variables and functions include
8865 @code{gnus-button-mid-or-mail-regexp},
8866 @code{gnus-button-prefer-mid-or-mail},
8867 @code{gnus-button-mid-or-mail-heuristic}, and
8868 @code{gnus-button-mid-or-mail-heuristic-alist}.
8869
8870 @item gnus-button-tex-level
8871 @vindex gnus-button-tex-level
8872 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8873 URLs.  See the variables @code{gnus-ctan-url},
8874 @code{gnus-button-ctan-handler},
8875 @code{gnus-button-ctan-directory-regexp}, and
8876 @code{gnus-button-handle-ctan-bogus-regexp}.
8877
8878 @end table
8879
8880
8881 @node Article Date
8882 @subsection Article Date
8883
8884 The date is most likely generated in some obscure timezone you've never
8885 heard of, so it's quite nice to be able to find out what the time was
8886 when the article was sent.
8887
8888 @table @kbd
8889
8890 @item W T u
8891 @kindex W T u (Summary)
8892 @findex gnus-article-date-ut
8893 Display the date in UT (aka. GMT, aka ZULU)
8894 (@code{gnus-article-date-ut}).
8895
8896 @item W T i
8897 @kindex W T i (Summary)
8898 @findex gnus-article-date-iso8601
8899 @cindex ISO 8601
8900 Display the date in international format, aka. ISO 8601
8901 (@code{gnus-article-date-iso8601}).
8902
8903 @item W T l
8904 @kindex W T l (Summary)
8905 @findex gnus-article-date-local
8906 Display the date in the local timezone (@code{gnus-article-date-local}).
8907
8908 @item W T p
8909 @kindex W T p (Summary)
8910 @findex gnus-article-date-english
8911 Display the date in a format that's easily pronounceable in English
8912 (@code{gnus-article-date-english}).
8913
8914 @item W T s
8915 @kindex W T s (Summary)
8916 @vindex gnus-article-time-format
8917 @findex gnus-article-date-user
8918 @findex format-time-string
8919 Display the date using a user-defined format
8920 (@code{gnus-article-date-user}).  The format is specified by the
8921 @code{gnus-article-time-format} variable, and is a string that's passed
8922 to @code{format-time-string}.  See the documentation of that variable
8923 for a list of possible format specs.
8924
8925 @item W T e
8926 @kindex W T e (Summary)
8927 @findex gnus-article-date-lapsed
8928 @findex gnus-start-date-timer
8929 @findex gnus-stop-date-timer
8930 Say how much time has elapsed between the article was posted and now
8931 (@code{gnus-article-date-lapsed}).  It looks something like:
8932
8933 @example
8934 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8935 @end example
8936
8937 @vindex gnus-article-date-lapsed-new-header
8938 The value of @code{gnus-article-date-lapsed-new-header} determines
8939 whether this header will just be added below the old Date one, or will
8940 replace it.
8941
8942 An advantage of using Gnus to read mail is that it converts simple bugs
8943 into wonderful absurdities.
8944
8945 If you want to have this line updated continually, you can put
8946
8947 @lisp
8948 (gnus-start-date-timer)
8949 @end lisp
8950
8951 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8952 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8953 command.
8954
8955 @item W T o
8956 @kindex W T o (Summary)
8957 @findex gnus-article-date-original
8958 Display the original date (@code{gnus-article-date-original}).  This can
8959 be useful if you normally use some other conversion function and are
8960 worried that it might be doing something totally wrong.  Say, claiming
8961 that the article was posted in 1854.  Although something like that is
8962 @emph{totally} impossible.  Don't you trust me? *titter*
8963
8964 @end table
8965
8966 @xref{Customizing Articles}, for how to display the date in your
8967 preferred format automatically.
8968
8969
8970 @node Article Display
8971 @subsection Article Display
8972 @cindex picons
8973 @cindex x-face
8974 @cindex smileys
8975
8976 These commands add various frivolous display gimmicks to the article
8977 buffer in Emacs versions that support them.
8978
8979 @code{X-Face} headers are small black-and-white images supplied by the
8980 message headers (@pxref{X-Face}).
8981
8982 @code{Face} headers are small colored images supplied by the message
8983 headers (@pxref{Face}).
8984
8985 Smileys are those little @samp{:-)} symbols that people like to litter
8986 their messages with (@pxref{Smileys}).
8987
8988 Picons, on the other hand, reside on your own system, and Gnus will
8989 try to match the headers to what you have (@pxref{Picons}).
8990
8991 All these functions are toggles---if the elements already exist,
8992 they'll be removed.
8993
8994 @table @kbd
8995 @item W D x
8996 @kindex W D x (Summary)
8997 @findex gnus-article-display-x-face
8998 Display an @code{X-Face} in the @code{From} header.
8999 (@code{gnus-article-display-x-face}).
9000
9001 @item W D d
9002 @kindex W D d (Summary)
9003 @findex gnus-article-display-face
9004 Display a @code{Face} in the @code{From} header.
9005 (@code{gnus-article-display-face}).
9006
9007 @item W D s
9008 @kindex W D s (Summary)
9009 @findex gnus-treat-smiley
9010 Display smileys (@code{gnus-treat-smiley}).
9011
9012 @item W D f
9013 @kindex W D f (Summary)
9014 @findex gnus-treat-from-picon
9015 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9016
9017 @item W D m
9018 @kindex W D m (Summary)
9019 @findex gnus-treat-mail-picon
9020 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9021 (@code{gnus-treat-mail-picon}).
9022
9023 @item W D n
9024 @kindex W D n (Summary)
9025 @findex gnus-treat-newsgroups-picon
9026 Piconify all news headers (i. e., @code{Newsgroups} and
9027 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9028
9029 @item W D D
9030 @kindex W D D (Summary)
9031 @findex gnus-article-remove-images
9032 Remove all images from the article buffer
9033 (@code{gnus-article-remove-images}).
9034
9035 @end table
9036
9037
9038
9039 @node Article Signature
9040 @subsection Article Signature
9041 @cindex signatures
9042 @cindex article signature
9043
9044 @vindex gnus-signature-separator
9045 Each article is divided into two parts---the head and the body.  The
9046 body can be divided into a signature part and a text part.  The variable
9047 that says what is to be considered a signature is
9048 @code{gnus-signature-separator}.  This is normally the standard
9049 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9050 non-standard signature separators, so this variable can also be a list
9051 of regular expressions to be tested, one by one.  (Searches are done
9052 from the end of the body towards the beginning.)  One likely value is:
9053
9054 @lisp
9055 (setq gnus-signature-separator
9056       '("^-- $"         ; @r{The standard}
9057         "^-- *$"        ; @r{A common mangling}
9058         "^-------*$"    ; @r{Many people just use a looong}
9059                         ; @r{line of dashes.  Shame!}
9060         "^ *--------*$" ; @r{Double-shame!}
9061         "^________*$"   ; @r{Underscores are also popular}
9062         "^========*$")) ; @r{Pervert!}
9063 @end lisp
9064
9065 The more permissive you are, the more likely it is that you'll get false
9066 positives.
9067
9068 @vindex gnus-signature-limit
9069 @code{gnus-signature-limit} provides a limit to what is considered a
9070 signature when displaying articles.
9071
9072 @enumerate
9073 @item
9074 If it is an integer, no signature may be longer (in characters) than
9075 that integer.
9076 @item
9077 If it is a floating point number, no signature may be longer (in lines)
9078 than that number.
9079 @item
9080 If it is a function, the function will be called without any parameters,
9081 and if it returns @code{nil}, there is no signature in the buffer.
9082 @item
9083 If it is a string, it will be used as a regexp.  If it matches, the text
9084 in question is not a signature.
9085 @end enumerate
9086
9087 This variable can also be a list where the elements may be of the types
9088 listed above.  Here's an example:
9089
9090 @lisp
9091 (setq gnus-signature-limit
9092       '(200.0 "^---*Forwarded article"))
9093 @end lisp
9094
9095 This means that if there are more than 200 lines after the signature
9096 separator, or the text after the signature separator is matched by
9097 the regular expression @samp{^---*Forwarded article}, then it isn't a
9098 signature after all.
9099
9100
9101 @node Article Miscellanea
9102 @subsection Article Miscellanea
9103
9104 @table @kbd
9105 @item A t
9106 @kindex A t (Summary)
9107 @findex gnus-article-babel
9108 Translate the article from one language to another
9109 (@code{gnus-article-babel}).
9110
9111 @end table
9112
9113
9114 @node MIME Commands
9115 @section MIME Commands
9116 @cindex MIME decoding
9117 @cindex attachments
9118 @cindex viewing attachments
9119
9120 The following commands all understand the numerical prefix.  For
9121 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9122
9123 @table @kbd
9124 @item b
9125 @itemx K v
9126 @kindex b (Summary)
9127 @kindex K v (Summary)
9128 View the @acronym{MIME} part.
9129
9130 @item K o
9131 @kindex K o (Summary)
9132 Save the @acronym{MIME} part.
9133
9134 @item K c
9135 @kindex K c (Summary)
9136 Copy the @acronym{MIME} part.
9137
9138 @item K e
9139 @kindex K e (Summary)
9140 View the @acronym{MIME} part externally.
9141
9142 @item K i
9143 @kindex K i (Summary)
9144 View the @acronym{MIME} part internally.
9145
9146 @item K |
9147 @kindex K | (Summary)
9148 Pipe the @acronym{MIME} part to an external command.
9149 @end table
9150
9151 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9152 the same manner:
9153
9154 @table @kbd
9155 @item K b
9156 @kindex K b (Summary)
9157 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9158 mostly useful if you wish to save (or perform other actions) on inlined
9159 parts.
9160
9161 @item K m
9162 @kindex K m (Summary)
9163 @findex gnus-summary-repair-multipart
9164 Some multipart messages are transmitted with missing or faulty headers.
9165 This command will attempt to ``repair'' these messages so that they can
9166 be viewed in a more pleasant manner
9167 (@code{gnus-summary-repair-multipart}).
9168
9169 @item X m
9170 @kindex X m (Summary)
9171 @findex gnus-summary-save-parts
9172 Save all parts matching a @acronym{MIME} type to a directory
9173 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9174 convention (@pxref{Process/Prefix}).
9175
9176 @item M-t
9177 @kindex M-t (Summary)
9178 @findex gnus-summary-toggle-display-buttonized
9179 Toggle the buttonized display of the article buffer
9180 (@code{gnus-summary-toggle-display-buttonized}).
9181
9182 @item W M w
9183 @kindex W M w (Summary)
9184 @findex gnus-article-decode-mime-words
9185 Decode RFC 2047-encoded words in the article headers
9186 (@code{gnus-article-decode-mime-words}).
9187
9188 @item W M c
9189 @kindex W M c (Summary)
9190 @findex gnus-article-decode-charset
9191 Decode encoded article bodies as well as charsets
9192 (@code{gnus-article-decode-charset}).
9193
9194 This command looks in the @code{Content-Type} header to determine the
9195 charset.  If there is no such header in the article, you can give it a
9196 prefix, which will prompt for the charset to decode as.  In regional
9197 groups where people post using some common encoding (but do not
9198 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9199 parameter to the required charset (@pxref{Group Parameters}).
9200
9201 @item W M v
9202 @kindex W M v (Summary)
9203 @findex gnus-mime-view-all-parts
9204 View all the @acronym{MIME} parts in the current article
9205 (@code{gnus-mime-view-all-parts}).
9206
9207 @end table
9208
9209 Relevant variables:
9210
9211 @table @code
9212 @item gnus-ignored-mime-types
9213 @vindex gnus-ignored-mime-types
9214 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9215 this list will be completely ignored by Gnus.  The default value is
9216 @code{nil}.
9217
9218 To have all Vcards be ignored, you'd say something like this:
9219
9220 @lisp
9221 (setq gnus-ignored-mime-types
9222       '("text/x-vcard"))
9223 @end lisp
9224
9225 @item gnus-article-loose-mime
9226 @vindex gnus-article-loose-mime
9227 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9228 before interpreting the message as a @acronym{MIME} message.  This helps
9229 when reading messages from certain broken mail user agents.  The
9230 default is @code{nil}.
9231
9232 @item gnus-article-emulate-mime
9233 @vindex gnus-article-emulate-mime
9234 There are other, non-@acronym{MIME} encoding methods used.  The most common
9235 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9236 this variable is non-@code{nil}, Gnus will look in message bodies to
9237 see if it finds these encodings, and if so, it'll run them through the
9238 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9239
9240 @item gnus-unbuttonized-mime-types
9241 @vindex gnus-unbuttonized-mime-types
9242 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9243 this list won't have @acronym{MIME} buttons inserted unless they aren't
9244 displayed or this variable is overridden by
9245 @code{gnus-buttonized-mime-types}.  The default value is
9246 @code{(".*/.*")}.  This variable is only used when
9247 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9248
9249 @item gnus-buttonized-mime-types
9250 @vindex gnus-buttonized-mime-types
9251 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9252 this list will have @acronym{MIME} buttons inserted unless they aren't
9253 displayed.  This variable overrides
9254 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9255 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9256 is @code{nil}.
9257
9258 To see e.g. security buttons but no other buttons, you could set this
9259 variable to @code{("multipart/signed")} and leave
9260 @code{gnus-unbuttonized-mime-types} at the default value.
9261
9262 @item gnus-inhibit-mime-unbuttonizing
9263 @vindex gnus-inhibit-mime-unbuttonizing
9264 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9265 default value is @code{nil}.
9266
9267 @item gnus-article-mime-part-function
9268 @vindex gnus-article-mime-part-function
9269 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9270 handle as the parameter.  The function is meant to be used to allow
9271 users to gather information from the article (e. g., add Vcard info to
9272 the bbdb database) or to do actions based on parts (e. g., automatically
9273 save all jpegs into some directory).
9274
9275 Here's an example function the does the latter:
9276
9277 @lisp
9278 (defun my-save-all-jpeg-parts (handle)
9279   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9280     (with-temp-buffer
9281       (insert (mm-get-part handle))
9282       (write-region (point-min) (point-max)
9283                     (read-file-name "Save jpeg to: ")))))
9284 (setq gnus-article-mime-part-function
9285       'my-save-all-jpeg-parts)
9286 @end lisp
9287
9288 @vindex gnus-mime-multipart-functions
9289 @item gnus-mime-multipart-functions
9290 Alist of @acronym{MIME} multipart types and functions to handle them.
9291
9292 @vindex mm-file-name-rewrite-functions
9293 @item mm-file-name-rewrite-functions
9294 List of functions used for rewriting file names of @acronym{MIME} parts.
9295 Each function takes a file name as input and returns a file name.
9296
9297 Ready-made functions include@*
9298 @code{mm-file-name-delete-whitespace},
9299 @code{mm-file-name-trim-whitespace},
9300 @code{mm-file-name-collapse-whitespace}, and
9301 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9302 the variable @code{mm-file-name-replace-whitespace} to replace each
9303 whitespace character in a file name with that string; default value
9304 is @code{"_"} (a single underscore).
9305 @findex mm-file-name-delete-whitespace
9306 @findex mm-file-name-trim-whitespace
9307 @findex mm-file-name-collapse-whitespace
9308 @findex mm-file-name-replace-whitespace
9309 @vindex mm-file-name-replace-whitespace
9310
9311 The standard functions @code{capitalize}, @code{downcase},
9312 @code{upcase}, and @code{upcase-initials} may be useful, too.
9313
9314 Everybody knows that whitespace characters in file names are evil,
9315 except those who don't know.  If you receive lots of attachments from
9316 such unenlightened users, you can make live easier by adding
9317
9318 @lisp
9319 (setq mm-file-name-rewrite-functions
9320       '(mm-file-name-trim-whitespace
9321         mm-file-name-collapse-whitespace
9322         mm-file-name-replace-whitespace))
9323 @end lisp
9324
9325 @noindent
9326 to your @file{~/.gnus.el} file.
9327
9328 @end table
9329
9330
9331 @node Charsets
9332 @section Charsets
9333 @cindex charsets
9334
9335 People use different charsets, and we have @acronym{MIME} to let us know what
9336 charsets they use.  Or rather, we wish we had.  Many people use
9337 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9338 just send out messages without saying what character sets they use.  To
9339 help a bit with this, some local news hierarchies have policies that say
9340 what character set is the default.  For instance, the @samp{fj}
9341 hierarchy uses @code{iso-2022-jp-2}.
9342
9343 @vindex gnus-group-charset-alist
9344 This knowledge is encoded in the @code{gnus-group-charset-alist}
9345 variable, which is an alist of regexps (use the first item to match full
9346 group names) and default charsets to be used when reading these groups.
9347
9348 @vindex gnus-newsgroup-ignored-charsets
9349 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9350 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9351 even if they really are in @code{koi-8}.  To help here, the
9352 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9353 charsets that are listed here will be ignored.  The variable can be
9354 set on a group-by-group basis using the group parameters (@pxref{Group
9355 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9356 which includes values some agents insist on having in there.
9357
9358 @vindex gnus-group-posting-charset-alist
9359 When posting, @code{gnus-group-posting-charset-alist} is used to
9360 determine which charsets should not be encoded using the @acronym{MIME}
9361 encodings.  For instance, some hierarchies discourage using
9362 quoted-printable header encoding.
9363
9364 This variable is an alist of regexps and permitted unencoded charsets
9365 for posting.  Each element of the alist has the form @code{(}@var{test
9366 header body-list}@code{)}, where:
9367
9368 @table @var
9369 @item test
9370 is either a regular expression matching the newsgroup header or a
9371 variable to query,
9372 @item header
9373 is the charset which may be left unencoded in the header (@code{nil}
9374 means encode all charsets),
9375 @item body-list
9376 is a list of charsets which may be encoded using 8bit content-transfer
9377 encoding in the body, or one of the special values @code{nil} (always
9378 encode using quoted-printable) or @code{t} (always use 8bit).
9379 @end table
9380
9381 @cindex Russian
9382 @cindex koi8-r
9383 @cindex koi8-u
9384 @cindex iso-8859-5
9385 @cindex coding system aliases
9386 @cindex preferred charset
9387
9388 Other charset tricks that may be useful, although not Gnus-specific:
9389
9390 If there are several @acronym{MIME} charsets that encode the same Emacs
9391 charset, you can choose what charset to use by saying the following:
9392
9393 @lisp
9394 (put-charset-property 'cyrillic-iso8859-5
9395                       'preferred-coding-system 'koi8-r)
9396 @end lisp
9397
9398 This means that Russian will be encoded using @code{koi8-r} instead of
9399 the default @code{iso-8859-5} @acronym{MIME} charset.
9400
9401 If you want to read messages in @code{koi8-u}, you can cheat and say
9402
9403 @lisp
9404 (define-coding-system-alias 'koi8-u 'koi8-r)
9405 @end lisp
9406
9407 This will almost do the right thing.
9408
9409 And finally, to read charsets like @code{windows-1251}, you can say
9410 something like
9411
9412 @lisp
9413 (codepage-setup 1251)
9414 (define-coding-system-alias 'windows-1251 'cp1251)
9415 @end lisp
9416
9417
9418 @node Article Commands
9419 @section Article Commands
9420
9421 @table @kbd
9422
9423 @item A P
9424 @cindex PostScript
9425 @cindex printing
9426 @kindex A P (Summary)
9427 @vindex gnus-ps-print-hook
9428 @findex gnus-summary-print-article
9429 Generate and print a PostScript image of the article buffer
9430 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9431 be run just before printing the buffer.  An alternative way to print
9432 article is to use Muttprint (@pxref{Saving Articles}).
9433
9434 @end table
9435
9436
9437 @node Summary Sorting
9438 @section Summary Sorting
9439 @cindex summary sorting
9440
9441 You can have the summary buffer sorted in various ways, even though I
9442 can't really see why you'd want that.
9443
9444 @table @kbd
9445
9446 @item C-c C-s C-n
9447 @kindex C-c C-s C-n (Summary)
9448 @findex gnus-summary-sort-by-number
9449 Sort by article number (@code{gnus-summary-sort-by-number}).
9450
9451 @item C-c C-s C-a
9452 @kindex C-c C-s C-a (Summary)
9453 @findex gnus-summary-sort-by-author
9454 Sort by author (@code{gnus-summary-sort-by-author}).
9455
9456 @item C-c C-s C-s
9457 @kindex C-c C-s C-s (Summary)
9458 @findex gnus-summary-sort-by-subject
9459 Sort by subject (@code{gnus-summary-sort-by-subject}).
9460
9461 @item C-c C-s C-d
9462 @kindex C-c C-s C-d (Summary)
9463 @findex gnus-summary-sort-by-date
9464 Sort by date (@code{gnus-summary-sort-by-date}).
9465
9466 @item C-c C-s C-l
9467 @kindex C-c C-s C-l (Summary)
9468 @findex gnus-summary-sort-by-lines
9469 Sort by lines (@code{gnus-summary-sort-by-lines}).
9470
9471 @item C-c C-s C-c
9472 @kindex C-c C-s C-c (Summary)
9473 @findex gnus-summary-sort-by-chars
9474 Sort by article length (@code{gnus-summary-sort-by-chars}).
9475
9476 @item C-c C-s C-i
9477 @kindex C-c C-s C-i (Summary)
9478 @findex gnus-summary-sort-by-score
9479 Sort by score (@code{gnus-summary-sort-by-score}).
9480
9481 @item C-c C-s C-r
9482 @kindex C-c C-s C-r (Summary)
9483 @findex gnus-summary-sort-by-random
9484 Randomize (@code{gnus-summary-sort-by-random}).
9485
9486 @item C-c C-s C-o
9487 @kindex C-c C-s C-o (Summary)
9488 @findex gnus-summary-sort-by-original
9489 Sort using the default sorting method
9490 (@code{gnus-summary-sort-by-original}).
9491 @end table
9492
9493 These functions will work both when you use threading and when you don't
9494 use threading.  In the latter case, all summary lines will be sorted,
9495 line by line.  In the former case, sorting will be done on a
9496 root-by-root basis, which might not be what you were looking for.  To
9497 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9498 Commands}).
9499
9500
9501 @node Finding the Parent
9502 @section Finding the Parent
9503 @cindex parent articles
9504 @cindex referring articles
9505
9506 @table @kbd
9507 @item ^
9508 @kindex ^ (Summary)
9509 @findex gnus-summary-refer-parent-article
9510 If you'd like to read the parent of the current article, and it is not
9511 displayed in the summary buffer, you might still be able to.  That is,
9512 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9513 and the @code{References} in the current article are not mangled, you
9514 can just press @kbd{^} or @kbd{A r}
9515 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9516 you'll get the parent.  If the parent is already displayed in the
9517 summary buffer, point will just move to this article.
9518
9519 If given a positive numerical prefix, fetch that many articles back into
9520 the ancestry.  If given a negative numerical prefix, fetch just that
9521 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9522 grandparent and the grandgrandparent of the current article.  If you say
9523 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9524 article.
9525
9526 @item A R (Summary)
9527 @findex gnus-summary-refer-references
9528 @kindex A R (Summary)
9529 Fetch all articles mentioned in the @code{References} header of the
9530 article (@code{gnus-summary-refer-references}).
9531
9532 @item A T (Summary)
9533 @findex gnus-summary-refer-thread
9534 @kindex A T (Summary)
9535 Display the full thread where the current article appears
9536 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9537 headers in the current group to work, so it usually takes a while.  If
9538 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9539 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9540 visible effects normally, but it'll make this command work a whole lot
9541 faster.  Of course, it'll make group entry somewhat slow.
9542
9543 @vindex gnus-refer-thread-limit
9544 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9545 articles before the first displayed in the current group) headers to
9546 fetch when doing this command.  The default is 200.  If @code{t}, all
9547 the available headers will be fetched.  This variable can be overridden
9548 by giving the @kbd{A T} command a numerical prefix.
9549
9550 @item M-^ (Summary)
9551 @findex gnus-summary-refer-article
9552 @kindex M-^ (Summary)
9553 @cindex Message-ID
9554 @cindex fetching by Message-ID
9555 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9556 matter what group it belongs to.  @kbd{M-^}
9557 (@code{gnus-summary-refer-article}) will ask you for a
9558 @code{Message-ID}, which is one of those long, hard-to-read thingies
9559 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9560 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9561 @end table
9562
9563 The current select method will be used when fetching by
9564 @code{Message-ID} from non-news select method, but you can override this
9565 by giving this command a prefix.
9566
9567 @vindex gnus-refer-article-method
9568 If the group you are reading is located on a back end that does not
9569 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9570 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9571 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9572 updating the spool you are reading from, but that's not really
9573 necessary.
9574
9575 It can also be a list of select methods, as well as the special symbol
9576 @code{current}, which means to use the current select method.  If it
9577 is a list, Gnus will try all the methods in the list until it finds a
9578 match.
9579
9580 Here's an example setting that will first try the current method, and
9581 then ask Google if that fails:
9582
9583 @lisp
9584 (setq gnus-refer-article-method
9585       '(current
9586         (nnweb "google" (nnweb-type google))))
9587 @end lisp
9588
9589 Most of the mail back ends support fetching by @code{Message-ID}, but
9590 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9591 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9592 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9593 only able to locate articles that have been posted to the current group.
9594 (Anything else would be too time consuming.)  @code{nnmh} does not
9595 support this at all.
9596
9597
9598 @node Alternative Approaches
9599 @section Alternative Approaches
9600
9601 Different people like to read news using different methods.  This being
9602 gnus, we offer a small selection of minor modes for the summary buffers.
9603
9604 @menu
9605 * Pick and Read::               First mark articles and then read them.
9606 * Binary Groups::               Auto-decode all articles.
9607 @end menu
9608
9609
9610 @node Pick and Read
9611 @subsection Pick and Read
9612 @cindex pick and read
9613
9614 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9615 a two-phased reading interface.  The user first marks in a summary
9616 buffer the articles she wants to read.  Then she starts reading the
9617 articles with just an article buffer displayed.
9618
9619 @findex gnus-pick-mode
9620 @kindex M-x gnus-pick-mode
9621 Gnus provides a summary buffer minor mode that allows
9622 this---@code{gnus-pick-mode}.  This basically means that a few process
9623 mark commands become one-keystroke commands to allow easy marking, and
9624 it provides one additional command for switching to the summary buffer.
9625
9626 Here are the available keystrokes when using pick mode:
9627
9628 @table @kbd
9629 @item .
9630 @kindex . (Pick)
9631 @findex gnus-pick-article-or-thread
9632 Pick the article or thread on the current line
9633 (@code{gnus-pick-article-or-thread}).  If the variable
9634 @code{gnus-thread-hide-subtree} is true, then this key selects the
9635 entire thread when used at the first article of the thread.  Otherwise,
9636 it selects just the article.  If given a numerical prefix, go to that
9637 thread or article and pick it.  (The line number is normally displayed
9638 at the beginning of the summary pick lines.)
9639
9640 @item SPACE
9641 @kindex SPACE (Pick)
9642 @findex gnus-pick-next-page
9643 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9644 at the end of the buffer, start reading the picked articles.
9645
9646 @item u
9647 @kindex u (Pick)
9648 @findex gnus-pick-unmark-article-or-thread.
9649 Unpick the thread or article
9650 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9651 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9652 thread if used at the first article of the thread.  Otherwise it unpicks
9653 just the article.  You can give this key a numerical prefix to unpick
9654 the thread or article at that line.
9655
9656 @item RET
9657 @kindex RET (Pick)
9658 @findex gnus-pick-start-reading
9659 @vindex gnus-pick-display-summary
9660 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9661 given a prefix, mark all unpicked articles as read first.  If
9662 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9663 will still be visible when you are reading.
9664
9665 @end table
9666
9667 All the normal summary mode commands are still available in the
9668 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9669 which is mapped to the same function
9670 @code{gnus-summary-tick-article-forward}.
9671
9672 If this sounds like a good idea to you, you could say:
9673
9674 @lisp
9675 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9676 @end lisp
9677
9678 @vindex gnus-pick-mode-hook
9679 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9680
9681 @vindex gnus-mark-unpicked-articles-as-read
9682 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9683 all unpicked articles as read.  The default is @code{nil}.
9684
9685 @vindex gnus-summary-pick-line-format
9686 The summary line format in pick mode is slightly different from the
9687 standard format.  At the beginning of each line the line number is
9688 displayed.  The pick mode line format is controlled by the
9689 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9690 Variables}).  It accepts the same format specs that
9691 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9692
9693
9694 @node Binary Groups
9695 @subsection Binary Groups
9696 @cindex binary groups
9697
9698 @findex gnus-binary-mode
9699 @kindex M-x gnus-binary-mode
9700 If you spend much time in binary groups, you may grow tired of hitting
9701 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9702 is a minor mode for summary buffers that makes all ordinary Gnus article
9703 selection functions uudecode series of articles and display the result
9704 instead of just displaying the articles the normal way.
9705
9706 @kindex g (Binary)
9707 @findex gnus-binary-show-article
9708 The only way, in fact, to see the actual articles is the @kbd{g}
9709 command, when you have turned on this mode
9710 (@code{gnus-binary-show-article}).
9711
9712 @vindex gnus-binary-mode-hook
9713 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9714
9715
9716 @node Tree Display
9717 @section Tree Display
9718 @cindex trees
9719
9720 @vindex gnus-use-trees
9721 If you don't like the normal gnus summary display, you might try setting
9722 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9723 additional @dfn{tree buffer}.  You can execute all summary mode commands
9724 in the tree buffer.
9725
9726 There are a few variables to customize the tree display, of course:
9727
9728 @table @code
9729 @item gnus-tree-mode-hook
9730 @vindex gnus-tree-mode-hook
9731 A hook called in all tree mode buffers.
9732
9733 @item gnus-tree-mode-line-format
9734 @vindex gnus-tree-mode-line-format
9735 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9736 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9737 of valid specs, @pxref{Summary Buffer Mode Line}.
9738
9739 @item gnus-selected-tree-face
9740 @vindex gnus-selected-tree-face
9741 Face used for highlighting the selected article in the tree buffer.  The
9742 default is @code{modeline}.
9743
9744 @item gnus-tree-line-format
9745 @vindex gnus-tree-line-format
9746 A format string for the tree nodes.  The name is a bit of a misnomer,
9747 though---it doesn't define a line, but just the node.  The default value
9748 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9749 the name of the poster.  It is vital that all nodes are of the same
9750 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9751
9752 Valid specs are:
9753
9754 @table @samp
9755 @item n
9756 The name of the poster.
9757 @item f
9758 The @code{From} header.
9759 @item N
9760 The number of the article.
9761 @item [
9762 The opening bracket.
9763 @item ]
9764 The closing bracket.
9765 @item s
9766 The subject.
9767 @end table
9768
9769 @xref{Formatting Variables}.
9770
9771 Variables related to the display are:
9772
9773 @table @code
9774 @item gnus-tree-brackets
9775 @vindex gnus-tree-brackets
9776 This is used for differentiating between ``real'' articles and
9777 ``sparse'' articles.  The format is
9778 @example
9779 ((@var{real-open} . @var{real-close})
9780  (@var{sparse-open} . @var{sparse-close})
9781  (@var{dummy-open} . @var{dummy-close}))
9782 @end example
9783 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9784
9785 @item gnus-tree-parent-child-edges
9786 @vindex gnus-tree-parent-child-edges
9787 This is a list that contains the characters used for connecting parent
9788 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9789
9790 @end table
9791
9792 @item gnus-tree-minimize-window
9793 @vindex gnus-tree-minimize-window
9794 If this variable is non-@code{nil}, gnus will try to keep the tree
9795 buffer as small as possible to allow more room for the other gnus
9796 windows.  If this variable is a number, the tree buffer will never be
9797 higher than that number.  The default is @code{t}.  Note that if you
9798 have several windows displayed side-by-side in a frame and the tree
9799 buffer is one of these, minimizing the tree window will also resize all
9800 other windows displayed next to it.
9801
9802 You may also wish to add the following hook to keep the window minimized
9803 at all times:
9804
9805 @lisp
9806 (add-hook 'gnus-configure-windows-hook
9807           'gnus-tree-perhaps-minimize)
9808 @end lisp
9809
9810 @item gnus-generate-tree-function
9811 @vindex gnus-generate-tree-function
9812 @findex gnus-generate-horizontal-tree
9813 @findex gnus-generate-vertical-tree
9814 The function that actually generates the thread tree.  Two predefined
9815 functions are available: @code{gnus-generate-horizontal-tree} and
9816 @code{gnus-generate-vertical-tree} (which is the default).
9817
9818 @end table
9819
9820 Here's an example from a horizontal tree buffer:
9821
9822 @example
9823 @{***@}-(***)-[odd]-[Gun]
9824      |      \[Jan]
9825      |      \[odd]-[Eri]
9826      |      \(***)-[Eri]
9827      |            \[odd]-[Paa]
9828      \[Bjo]
9829      \[Gun]
9830      \[Gun]-[Jor]
9831 @end example
9832
9833 Here's the same thread displayed in a vertical tree buffer:
9834
9835 @example
9836 @group
9837 @{***@}
9838   |--------------------------\-----\-----\
9839 (***)                         [Bjo] [Gun] [Gun]
9840   |--\-----\-----\                          |
9841 [odd] [Jan] [odd] (***)                   [Jor]
9842   |           |     |--\
9843 [Gun]       [Eri] [Eri] [odd]
9844                           |
9845                         [Paa]
9846 @end group
9847 @end example
9848
9849 If you're using horizontal trees, it might be nice to display the trees
9850 side-by-side with the summary buffer.  You could add something like the
9851 following to your @file{~/.gnus.el} file:
9852
9853 @lisp
9854 (setq gnus-use-trees t
9855       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9856       gnus-tree-minimize-window nil)
9857 (gnus-add-configuration
9858  '(article
9859    (vertical 1.0
9860              (horizontal 0.25
9861                          (summary 0.75 point)
9862                          (tree 1.0))
9863              (article 1.0))))
9864 @end lisp
9865
9866 @xref{Window Layout}.
9867
9868
9869 @node Mail Group Commands
9870 @section Mail Group Commands
9871 @cindex mail group commands
9872
9873 Some commands only make sense in mail groups.  If these commands are
9874 invalid in the current group, they will raise a hell and let you know.
9875
9876 All these commands (except the expiry and edit commands) use the
9877 process/prefix convention (@pxref{Process/Prefix}).
9878
9879 @table @kbd
9880
9881 @item B e
9882 @kindex B e (Summary)
9883 @findex gnus-summary-expire-articles
9884 Run all expirable articles in the current group through the expiry
9885 process (@code{gnus-summary-expire-articles}).  That is, delete all
9886 expirable articles in the group that have been around for a while.
9887 (@pxref{Expiring Mail}).
9888
9889 @item B C-M-e
9890 @kindex B C-M-e (Summary)
9891 @findex gnus-summary-expire-articles-now
9892 Delete all the expirable articles in the group
9893 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9894 articles eligible for expiry in the current group will
9895 disappear forever into that big @file{/dev/null} in the sky.
9896
9897 @item B DEL
9898 @kindex B DEL (Summary)
9899 @findex gnus-summary-delete-article
9900 @c @icon{gnus-summary-mail-delete}
9901 Delete the mail article.  This is ``delete'' as in ``delete it from your
9902 disk forever and ever, never to return again.'' Use with caution.
9903 (@code{gnus-summary-delete-article}).
9904
9905 @item B m
9906 @kindex B m (Summary)
9907 @cindex move mail
9908 @findex gnus-summary-move-article
9909 @vindex gnus-preserve-marks
9910 Move the article from one mail group to another
9911 (@code{gnus-summary-move-article}).  Marks will be preserved if
9912 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9913
9914 @item B c
9915 @kindex B c (Summary)
9916 @cindex copy mail
9917 @findex gnus-summary-copy-article
9918 @c @icon{gnus-summary-mail-copy}
9919 Copy the article from one group (mail group or not) to a mail group
9920 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9921 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9922
9923 @item B B
9924 @kindex B B (Summary)
9925 @cindex crosspost mail
9926 @findex gnus-summary-crosspost-article
9927 Crosspost the current article to some other group
9928 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9929 the article in the other group, and the Xref headers of the article will
9930 be properly updated.
9931
9932 @item B i
9933 @kindex B i (Summary)
9934 @findex gnus-summary-import-article
9935 Import an arbitrary file into the current mail newsgroup
9936 (@code{gnus-summary-import-article}).  You will be prompted for a file
9937 name, a @code{From} header and a @code{Subject} header.
9938
9939 @item B I
9940 @kindex B I (Summary)
9941 @findex gnus-summary-create-article
9942 Create an empty article in the current mail newsgroups
9943 (@code{gnus-summary-create-article}).  You will be prompted for a
9944 @code{From} header and a @code{Subject} header.
9945
9946 @item B r
9947 @kindex B r (Summary)
9948 @findex gnus-summary-respool-article
9949 @vindex gnus-summary-respool-default-method
9950 Respool the mail article (@code{gnus-summary-respool-article}).
9951 @code{gnus-summary-respool-default-method} will be used as the default
9952 select method when respooling.  This variable is @code{nil} by default,
9953 which means that the current group select method will be used instead.
9954 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9955 (which is the default).
9956
9957 @item B w
9958 @itemx e
9959 @kindex B w (Summary)
9960 @kindex e (Summary)
9961 @findex gnus-summary-edit-article
9962 @kindex C-c C-c (Article)
9963 @findex gnus-summary-edit-article-done
9964 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9965 editing and make the changes permanent, type @kbd{C-c C-c}
9966 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9967 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9968
9969 @item B q
9970 @kindex B q (Summary)
9971 @findex gnus-summary-respool-query
9972 If you want to re-spool an article, you might be curious as to what group
9973 the article will end up in before you do the re-spooling.  This command
9974 will tell you (@code{gnus-summary-respool-query}).
9975
9976 @item B t
9977 @kindex B t (Summary)
9978 @findex gnus-summary-respool-trace
9979 Similarly, this command will display all fancy splitting patterns used
9980 when respooling, if any (@code{gnus-summary-respool-trace}).
9981
9982 @item B p
9983 @kindex B p (Summary)
9984 @findex gnus-summary-article-posted-p
9985 Some people have a tendency to send you ``courtesy'' copies when they
9986 follow up to articles you have posted.  These usually have a
9987 @code{Newsgroups} header in them, but not always.  This command
9988 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9989 article from your news server (or rather, from
9990 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9991 report back whether it found the article or not.  Even if it says that
9992 it didn't find the article, it may have been posted anyway---mail
9993 propagation is much faster than news propagation, and the news copy may
9994 just not have arrived yet.
9995
9996 @item K E
9997 @kindex K E (Summary)
9998 @findex gnus-article-encrypt-body
9999 @vindex gnus-article-encrypt-protocol
10000 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10001 The body is encrypted with the encryption protocol specified by the
10002 variable @code{gnus-article-encrypt-protocol}.
10003
10004 @end table
10005
10006 @vindex gnus-move-split-methods
10007 @cindex moving articles
10008 If you move (or copy) articles regularly, you might wish to have gnus
10009 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10010 variable that uses the same syntax as @code{gnus-split-methods}
10011 (@pxref{Saving Articles}).  You may customize that variable to create
10012 suggestions you find reasonable.  (Note that
10013 @code{gnus-move-split-methods} uses group names where
10014 @code{gnus-split-methods} uses file names.)
10015
10016 @lisp
10017 (setq gnus-move-split-methods
10018       '(("^From:.*Lars Magne" "nnml:junk")
10019         ("^Subject:.*gnus" "nnfolder:important")
10020         (".*" "nnml:misc")))
10021 @end lisp
10022
10023
10024 @node Various Summary Stuff
10025 @section Various Summary Stuff
10026
10027 @menu
10028 * Summary Group Information::   Information oriented commands.
10029 * Searching for Articles::      Multiple article commands.
10030 * Summary Generation Commands::
10031 * Really Various Summary Commands::  Those pesky non-conformant commands.
10032 @end menu
10033
10034 @table @code
10035 @vindex gnus-summary-display-while-building
10036 @item gnus-summary-display-while-building
10037 If non-@code{nil}, show and update the summary buffer as it's being
10038 built.  If @code{t}, update the buffer after every line is inserted.
10039 If the value is an integer, @var{n}, update the display every @var{n}
10040 lines.  The default is @code{nil}.
10041
10042 @vindex gnus-summary-display-arrow
10043 @item gnus-summary-display-arrow
10044 If non-@code{nil}, display an arrow in the fringe to indicate the
10045 current article.
10046
10047 @vindex gnus-summary-mode-hook
10048 @item gnus-summary-mode-hook
10049 This hook is called when creating a summary mode buffer.
10050
10051 @vindex gnus-summary-generate-hook
10052 @item gnus-summary-generate-hook
10053 This is called as the last thing before doing the threading and the
10054 generation of the summary buffer.  It's quite convenient for customizing
10055 the threading variables based on what data the newsgroup has.  This hook
10056 is called from the summary buffer after most summary buffer variables
10057 have been set.
10058
10059 @vindex gnus-summary-prepare-hook
10060 @item gnus-summary-prepare-hook
10061 It is called after the summary buffer has been generated.  You might use
10062 it to, for instance, highlight lines or modify the look of the buffer in
10063 some other ungodly manner.  I don't care.
10064
10065 @vindex gnus-summary-prepared-hook
10066 @item gnus-summary-prepared-hook
10067 A hook called as the very last thing after the summary buffer has been
10068 generated.
10069
10070 @vindex gnus-summary-ignore-duplicates
10071 @item gnus-summary-ignore-duplicates
10072 When gnus discovers two articles that have the same @code{Message-ID},
10073 it has to do something drastic.  No articles are allowed to have the
10074 same @code{Message-ID}, but this may happen when reading mail from some
10075 sources.  Gnus allows you to customize what happens with this variable.
10076 If it is @code{nil} (which is the default), gnus will rename the
10077 @code{Message-ID} (for display purposes only) and display the article as
10078 any other article.  If this variable is @code{t}, it won't display the
10079 article---it'll be as if it never existed.
10080
10081 @vindex gnus-alter-articles-to-read-function
10082 @item gnus-alter-articles-to-read-function
10083 This function, which takes two parameters (the group name and the list
10084 of articles to be selected), is called to allow the user to alter the
10085 list of articles to be selected.
10086
10087 For instance, the following function adds the list of cached articles to
10088 the list in one particular group:
10089
10090 @lisp
10091 (defun my-add-cached-articles (group articles)
10092   (if (string= group "some.group")
10093       (append gnus-newsgroup-cached articles)
10094     articles))
10095 @end lisp
10096
10097 @vindex gnus-newsgroup-variables
10098 @item gnus-newsgroup-variables
10099 A list of newsgroup (summary buffer) local variables, or cons of
10100 variables and their default values (when the default values are not
10101 @code{nil}), that should be made global while the summary buffer is
10102 active.  These variables can be used to set variables in the group
10103 parameters while still allowing them to affect operations done in
10104 other buffers.  For example:
10105
10106 @lisp
10107 (setq gnus-newsgroup-variables
10108       '(message-use-followup-to
10109         (gnus-visible-headers .
10110  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10111 @end lisp
10112
10113 @end table
10114
10115
10116 @node Summary Group Information
10117 @subsection Summary Group Information
10118
10119 @table @kbd
10120
10121 @item H f
10122 @kindex H f (Summary)
10123 @findex gnus-summary-fetch-faq
10124 @vindex gnus-group-faq-directory
10125 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10126 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10127 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10128 is usually a directory on a remote machine.  This variable can also be
10129 a list of directories.  In that case, giving a prefix to this command
10130 will allow you to choose between the various sites.  @code{ange-ftp}
10131 or @code{efs} will probably be used for fetching the file.
10132
10133 @item H d
10134 @kindex H d (Summary)
10135 @findex gnus-summary-describe-group
10136 Give a brief description of the current group
10137 (@code{gnus-summary-describe-group}).  If given a prefix, force
10138 rereading the description from the server.
10139
10140 @item H h
10141 @kindex H h (Summary)
10142 @findex gnus-summary-describe-briefly
10143 Give an extremely brief description of the most important summary
10144 keystrokes (@code{gnus-summary-describe-briefly}).
10145
10146 @item H i
10147 @kindex H i (Summary)
10148 @findex gnus-info-find-node
10149 Go to the gnus info node (@code{gnus-info-find-node}).
10150 @end table
10151
10152
10153 @node Searching for Articles
10154 @subsection Searching for Articles
10155
10156 @table @kbd
10157
10158 @item M-s
10159 @kindex M-s (Summary)
10160 @findex gnus-summary-search-article-forward
10161 Search through all subsequent (raw) articles for a regexp
10162 (@code{gnus-summary-search-article-forward}).
10163
10164 @item M-r
10165 @kindex M-r (Summary)
10166 @findex gnus-summary-search-article-backward
10167 Search through all previous (raw) articles for a regexp
10168 (@code{gnus-summary-search-article-backward}).
10169
10170 @item &
10171 @kindex & (Summary)
10172 @findex gnus-summary-execute-command
10173 This command will prompt you for a header, a regular expression to match
10174 on this field, and a command to be executed if the match is made
10175 (@code{gnus-summary-execute-command}).  If the header is an empty
10176 string, the match is done on the entire article.  If given a prefix,
10177 search backward instead.
10178
10179 For instance, @kbd{& RET some.*string #} will put the process mark on
10180 all articles that have heads or bodies that match @samp{some.*string}.
10181
10182 @item M-&
10183 @kindex M-& (Summary)
10184 @findex gnus-summary-universal-argument
10185 Perform any operation on all articles that have been marked with
10186 the process mark (@code{gnus-summary-universal-argument}).
10187 @end table
10188
10189 @node Summary Generation Commands
10190 @subsection Summary Generation Commands
10191
10192 @table @kbd
10193
10194 @item Y g
10195 @kindex Y g (Summary)
10196 @findex gnus-summary-prepare
10197 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10198
10199 @item Y c
10200 @kindex Y c (Summary)
10201 @findex gnus-summary-insert-cached-articles
10202 Pull all cached articles (for the current group) into the summary buffer
10203 (@code{gnus-summary-insert-cached-articles}).
10204
10205 @item Y d
10206 @kindex Y d (Summary)
10207 @findex gnus-summary-insert-dormant-articles
10208 Pull all dormant articles (for the current group) into the summary buffer
10209 (@code{gnus-summary-insert-dormant-articles}).
10210
10211 @end table
10212
10213
10214 @node Really Various Summary Commands
10215 @subsection Really Various Summary Commands
10216
10217 @table @kbd
10218
10219 @item A D
10220 @itemx C-d
10221 @kindex C-d (Summary)
10222 @kindex A D (Summary)
10223 @findex gnus-summary-enter-digest-group
10224 If the current article is a collection of other articles (for instance,
10225 a digest), you might use this command to enter a group based on the that
10226 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10227 guess what article type is currently displayed unless you give a prefix
10228 to this command, which forces a ``digest'' interpretation.  Basically,
10229 whenever you see a message that is a collection of other messages of
10230 some format, you @kbd{C-d} and read these messages in a more convenient
10231 fashion.
10232
10233 @item C-M-d
10234 @kindex C-M-d (Summary)
10235 @findex gnus-summary-read-document
10236 This command is very similar to the one above, but lets you gather
10237 several documents into one biiig group
10238 (@code{gnus-summary-read-document}).  It does this by opening several
10239 @code{nndoc} groups for each document, and then opening an
10240 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10241 command understands the process/prefix convention
10242 (@pxref{Process/Prefix}).
10243
10244 @item C-t
10245 @kindex C-t (Summary)
10246 @findex gnus-summary-toggle-truncation
10247 Toggle truncation of summary lines
10248 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10249 line centering function in the summary buffer, so it's not a good idea
10250 to have truncation switched off while reading articles.
10251
10252 @item =
10253 @kindex = (Summary)
10254 @findex gnus-summary-expand-window
10255 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10256 If given a prefix, force an @code{article} window configuration.
10257
10258 @item C-M-e
10259 @kindex C-M-e (Summary)
10260 @findex gnus-summary-edit-parameters
10261 Edit the group parameters (@pxref{Group Parameters}) of the current
10262 group (@code{gnus-summary-edit-parameters}).
10263
10264 @item C-M-a
10265 @kindex C-M-a (Summary)
10266 @findex gnus-summary-customize-parameters
10267 Customize the group parameters (@pxref{Group Parameters}) of the current
10268 group (@code{gnus-summary-customize-parameters}).
10269
10270 @end table
10271
10272
10273 @node Exiting the Summary Buffer
10274 @section Exiting the Summary Buffer
10275 @cindex summary exit
10276 @cindex exiting groups
10277
10278 Exiting from the summary buffer will normally update all info on the
10279 group and return you to the group buffer.
10280
10281 @table @kbd
10282
10283 @item Z Z
10284 @itemx q
10285 @kindex Z Z (Summary)
10286 @kindex q (Summary)
10287 @findex gnus-summary-exit
10288 @vindex gnus-summary-exit-hook
10289 @vindex gnus-summary-prepare-exit-hook
10290 @vindex gnus-group-no-more-groups-hook
10291 @c @icon{gnus-summary-exit}
10292 Exit the current group and update all information on the group
10293 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10294 called before doing much of the exiting, which calls
10295 @code{gnus-summary-expire-articles} by default.
10296 @code{gnus-summary-exit-hook} is called after finishing the exit
10297 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10298 group mode having no more (unread) groups.
10299
10300 @item Z E
10301 @itemx Q
10302 @kindex Z E (Summary)
10303 @kindex Q (Summary)
10304 @findex gnus-summary-exit-no-update
10305 Exit the current group without updating any information on the group
10306 (@code{gnus-summary-exit-no-update}).
10307
10308 @item Z c
10309 @itemx c
10310 @kindex Z c (Summary)
10311 @kindex c (Summary)
10312 @findex gnus-summary-catchup-and-exit
10313 @c @icon{gnus-summary-catchup-and-exit}
10314 Mark all unticked articles in the group as read and then exit
10315 (@code{gnus-summary-catchup-and-exit}).
10316
10317 @item Z C
10318 @kindex Z C (Summary)
10319 @findex gnus-summary-catchup-all-and-exit
10320 Mark all articles, even the ticked ones, as read and then exit
10321 (@code{gnus-summary-catchup-all-and-exit}).
10322
10323 @item Z n
10324 @kindex Z n (Summary)
10325 @findex gnus-summary-catchup-and-goto-next-group
10326 Mark all articles as read and go to the next group
10327 (@code{gnus-summary-catchup-and-goto-next-group}).
10328
10329 @item Z R
10330 @kindex Z R (Summary)
10331 @findex gnus-summary-reselect-current-group
10332 Exit this group, and then enter it again
10333 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10334 all articles, both read and unread.
10335
10336 @item Z G
10337 @itemx M-g
10338 @kindex Z G (Summary)
10339 @kindex M-g (Summary)
10340 @findex gnus-summary-rescan-group
10341 @c @icon{gnus-summary-mail-get}
10342 Exit the group, check for new articles in the group, and select the
10343 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10344 articles, both read and unread.
10345
10346 @item Z N
10347 @kindex Z N (Summary)
10348 @findex gnus-summary-next-group
10349 Exit the group and go to the next group
10350 (@code{gnus-summary-next-group}).
10351
10352 @item Z P
10353 @kindex Z P (Summary)
10354 @findex gnus-summary-prev-group
10355 Exit the group and go to the previous group
10356 (@code{gnus-summary-prev-group}).
10357
10358 @item Z s
10359 @kindex Z s (Summary)
10360 @findex gnus-summary-save-newsrc
10361 Save the current number of read/marked articles in the dribble buffer
10362 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10363 given a prefix, also save the @file{.newsrc} file(s).  Using this
10364 command will make exit without updating (the @kbd{Q} command) worthless.
10365 @end table
10366
10367 @vindex gnus-exit-group-hook
10368 @code{gnus-exit-group-hook} is called when you exit the current group
10369 with an ``updating'' exit.  For instance @kbd{Q}
10370 (@code{gnus-summary-exit-no-update}) does not call this hook.
10371
10372 @findex gnus-summary-wake-up-the-dead
10373 @findex gnus-dead-summary-mode
10374 @vindex gnus-kill-summary-on-exit
10375 If you're in the habit of exiting groups, and then changing your mind
10376 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10377 If you do that, gnus won't kill the summary buffer when you exit it.
10378 (Quelle surprise!)  Instead it will change the name of the buffer to
10379 something like @samp{*Dead Summary ... *} and install a minor mode
10380 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10381 buffer, you'll find that all keys are mapped to a function called
10382 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10383 summary buffer will result in a live, normal summary buffer.
10384
10385 There will never be more than one dead summary buffer at any one time.
10386
10387 @vindex gnus-use-cross-reference
10388 The data on the current group will be updated (which articles you have
10389 read, which articles you have replied to, etc.) when you exit the
10390 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10391 @code{t} (which is the default), articles that are cross-referenced to
10392 this group and are marked as read, will also be marked as read in the
10393 other subscribed groups they were cross-posted to.  If this variable is
10394 neither @code{nil} nor @code{t}, the article will be marked as read in
10395 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10396
10397
10398 @node Crosspost Handling
10399 @section Crosspost Handling
10400
10401 @cindex velveeta
10402 @cindex spamming
10403 Marking cross-posted articles as read ensures that you'll never have to
10404 read the same article more than once.  Unless, of course, somebody has
10405 posted it to several groups separately.  Posting the same article to
10406 several groups (not cross-posting) is called @dfn{spamming}, and you are
10407 by law required to send nasty-grams to anyone who perpetrates such a
10408 heinous crime.  You may want to try NoCeM handling to filter out spam
10409 (@pxref{NoCeM}).
10410
10411 Remember: Cross-posting is kinda ok, but posting the same article
10412 separately to several groups is not.  Massive cross-posting (aka.
10413 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10414 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10415 excessive crossposting (@pxref{Summary Mail Commands}).
10416
10417 @cindex cross-posting
10418 @cindex Xref
10419 @cindex @acronym{NOV}
10420 One thing that may cause Gnus to not do the cross-posting thing
10421 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10422 (which is very nice, because it speeds things up considerably) which
10423 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10424 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10425 even with @sc{xover} by registering the @code{Xref} lines of all
10426 articles you actually read, but if you kill the articles, or just mark
10427 them as read without reading them, Gnus will not get a chance to snoop
10428 the @code{Xref} lines out of these articles, and will be unable to use
10429 the cross reference mechanism.
10430
10431 @cindex LIST overview.fmt
10432 @cindex overview.fmt
10433 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10434 in its overview files, try @samp{telnet your.nntp.server nntp},
10435 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10436 overview.fmt}.  This may not work, but if it does, and the last line you
10437 get does not read @samp{Xref:full}, then you should shout and whine at
10438 your news admin until she includes the @code{Xref} header in the
10439 overview files.
10440
10441 @vindex gnus-nov-is-evil
10442 If you want Gnus to get the @code{Xref}s right all the time, you have to
10443 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10444 considerably.
10445
10446 C'est la vie.
10447
10448 For an alternative approach, @pxref{Duplicate Suppression}.
10449
10450
10451 @node Duplicate Suppression
10452 @section Duplicate Suppression
10453
10454 By default, gnus tries to make sure that you don't have to read the same
10455 article more than once by utilizing the crossposting mechanism
10456 (@pxref{Crosspost Handling}).  However, that simple and efficient
10457 approach may not work satisfactory for some users for various
10458 reasons.
10459
10460 @enumerate
10461 @item
10462 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10463 is evil and not very common.
10464
10465 @item
10466 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10467 @file{.overview} data bases.  This is evil and all too common, alas.
10468
10469 @item
10470 You may be reading the same group (or several related groups) from
10471 different @acronym{NNTP} servers.
10472
10473 @item
10474 You may be getting mail that duplicates articles posted to groups.
10475 @end enumerate
10476
10477 I'm sure there are other situations where @code{Xref} handling fails as
10478 well, but these four are the most common situations.
10479
10480 If, and only if, @code{Xref} handling fails for you, then you may
10481 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10482 will remember the @code{Message-ID}s of all articles you have read or
10483 otherwise marked as read, and then, as if by magic, mark them as read
10484 all subsequent times you see them---in @emph{all} groups.  Using this
10485 mechanism is quite likely to be somewhat inefficient, but not overly
10486 so.  It's certainly preferable to reading the same articles more than
10487 once.
10488
10489 Duplicate suppression is not a very subtle instrument.  It's more like a
10490 sledge hammer than anything else.  It works in a very simple
10491 fashion---if you have marked an article as read, it adds this Message-ID
10492 to a cache.  The next time it sees this Message-ID, it will mark the
10493 article as read with the @samp{M} mark.  It doesn't care what group it
10494 saw the article in.
10495
10496 @table @code
10497 @item gnus-suppress-duplicates
10498 @vindex gnus-suppress-duplicates
10499 If non-@code{nil}, suppress duplicates.
10500
10501 @item gnus-save-duplicate-list
10502 @vindex gnus-save-duplicate-list
10503 If non-@code{nil}, save the list of duplicates to a file.  This will
10504 make startup and shutdown take longer, so the default is @code{nil}.
10505 However, this means that only duplicate articles read in a single gnus
10506 session are suppressed.
10507
10508 @item gnus-duplicate-list-length
10509 @vindex gnus-duplicate-list-length
10510 This variable says how many @code{Message-ID}s to keep in the duplicate
10511 suppression list.  The default is 10000.
10512
10513 @item gnus-duplicate-file
10514 @vindex gnus-duplicate-file
10515 The name of the file to store the duplicate suppression list in.  The
10516 default is @file{~/News/suppression}.
10517 @end table
10518
10519 If you have a tendency to stop and start gnus often, setting
10520 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10521 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10522 the other hand, saving the list makes startup and shutdown much slower,
10523 so that means that if you stop and start gnus often, you should set
10524 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10525 to you to figure out, I think.
10526
10527 @node Security
10528 @section Security
10529
10530 Gnus is able to verify signed messages or decrypt encrypted messages.
10531 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10532 and @acronym{S/MIME}, however you need some external programs to get
10533 things to work:
10534
10535 @enumerate
10536 @item
10537 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10538 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10539 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10540 Manual}), but Mailcrypt and gpg.el are also supported.
10541
10542 @item
10543 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10544 or newer is recommended.
10545
10546 @end enumerate
10547
10548 More information on how to set things up can be found in the message
10549 manual (@pxref{Security, ,Security, message, Message Manual}).
10550
10551 @table @code
10552 @item mm-verify-option
10553 @vindex mm-verify-option
10554 Option of verifying signed parts.  @code{never}, not verify;
10555 @code{always}, always verify; @code{known}, only verify known
10556 protocols.  Otherwise, ask user.
10557
10558 @item mm-decrypt-option
10559 @vindex mm-decrypt-option
10560 Option of decrypting encrypted parts.  @code{never}, no decryption;
10561 @code{always}, always decrypt; @code{known}, only decrypt known
10562 protocols.  Otherwise, ask user.
10563
10564 @item mml1991-use
10565 @vindex mml1991-use
10566 Symbol indicating elisp interface to OpenPGP implementation for
10567 @acronym{PGP} messages.  The default is @code{pgg}, but
10568 @code{mailcrypt} and @code{gpg} are also supported although
10569 deprecated.
10570
10571 @item mml2015-use
10572 @vindex mml2015-use
10573 Symbol indicating elisp interface to OpenPGP implementation for
10574 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10575 @code{mailcrypt} and @code{gpg} are also supported although
10576 deprecated.
10577
10578 @end table
10579
10580 @cindex snarfing keys
10581 @cindex importing PGP keys
10582 @cindex PGP key ring import
10583 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10584 key ring) is not supported explicitly through a menu item or command,
10585 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10586 allowing you to specify whatever action you think is appropriate
10587 through the usual @acronym{MIME} infrastructure.  You can use a
10588 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10589 Emacs MIME Manual}) such as the following to import keys using GNU
10590 Privacy Guard when you click on the @acronym{MIME} button
10591 (@pxref{Using MIME}).
10592
10593 @example
10594 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10595 @end example
10596 @noindent
10597 This happens to also be the default action defined in
10598 @code{mailcap-mime-data}.
10599
10600 @node Mailing List
10601 @section Mailing List
10602 @cindex mailing list
10603 @cindex RFC 2396
10604
10605 @kindex A M (summary)
10606 @findex gnus-mailing-list-insinuate
10607 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10608 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10609 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10610 summary buffer.
10611
10612 That enables the following commands to the summary buffer:
10613
10614 @table @kbd
10615
10616 @item C-c C-n h
10617 @kindex C-c C-n h (Summary)
10618 @findex gnus-mailing-list-help
10619 Send a message to fetch mailing list help, if List-Help field exists.
10620
10621 @item C-c C-n s
10622 @kindex C-c C-n s (Summary)
10623 @findex gnus-mailing-list-subscribe
10624 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10625
10626 @item C-c C-n u
10627 @kindex C-c C-n u (Summary)
10628 @findex gnus-mailing-list-unsubscribe
10629 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10630 field exists.
10631
10632 @item C-c C-n p
10633 @kindex C-c C-n p (Summary)
10634 @findex gnus-mailing-list-post
10635 Post to the mailing list, if List-Post field exists.
10636
10637 @item C-c C-n o
10638 @kindex C-c C-n o (Summary)
10639 @findex gnus-mailing-list-owner
10640 Send a message to the mailing list owner, if List-Owner field exists.
10641
10642 @item C-c C-n a
10643 @kindex C-c C-n a (Summary)
10644 @findex gnus-mailing-list-owner
10645 Browse the mailing list archive, if List-Archive field exists.
10646
10647 @end table
10648
10649
10650 @node Article Buffer
10651 @chapter Article Buffer
10652 @cindex article buffer
10653
10654 The articles are displayed in the article buffer, of which there is only
10655 one.  All the summary buffers share the same article buffer unless you
10656 tell gnus otherwise.
10657
10658 @menu
10659 * Hiding Headers::              Deciding what headers should be displayed.
10660 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10661 * Customizing Articles::        Tailoring the look of the articles.
10662 * Article Keymap::              Keystrokes available in the article buffer.
10663 * Misc Article::                Other stuff.
10664 @end menu
10665
10666
10667 @node Hiding Headers
10668 @section Hiding Headers
10669 @cindex hiding headers
10670 @cindex deleting headers
10671
10672 The top section of each article is the @dfn{head}.  (The rest is the
10673 @dfn{body}, but you may have guessed that already.)
10674
10675 @vindex gnus-show-all-headers
10676 There is a lot of useful information in the head: the name of the person
10677 who wrote the article, the date it was written and the subject of the
10678 article.  That's well and nice, but there's also lots of information
10679 most people do not want to see---what systems the article has passed
10680 through before reaching you, the @code{Message-ID}, the
10681 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10682 of some of those lines.  If you want to keep all those lines in the
10683 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10684
10685 Gnus provides you with two variables for sifting headers:
10686
10687 @table @code
10688
10689 @item gnus-visible-headers
10690 @vindex gnus-visible-headers
10691 If this variable is non-@code{nil}, it should be a regular expression
10692 that says what headers you wish to keep in the article buffer.  All
10693 headers that do not match this variable will be hidden.
10694
10695 For instance, if you only want to see the name of the person who wrote
10696 the article and the subject, you'd say:
10697
10698 @lisp
10699 (setq gnus-visible-headers "^From:\\|^Subject:")
10700 @end lisp
10701
10702 This variable can also be a list of regexps to match headers to
10703 remain visible.
10704
10705 @item gnus-ignored-headers
10706 @vindex gnus-ignored-headers
10707 This variable is the reverse of @code{gnus-visible-headers}.  If this
10708 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10709 should be a regular expression that matches all lines that you want to
10710 hide.  All lines that do not match this variable will remain visible.
10711
10712 For instance, if you just want to get rid of the @code{References} field
10713 and the @code{Xref} field, you might say:
10714
10715 @lisp
10716 (setq gnus-ignored-headers "^References:\\|^Xref:")
10717 @end lisp
10718
10719 This variable can also be a list of regexps to match headers to
10720 be removed.
10721
10722 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10723 variable will have no effect.
10724
10725 @end table
10726
10727 @vindex gnus-sorted-header-list
10728 Gnus can also sort the headers for you.  (It does this by default.)  You
10729 can control the sorting by setting the @code{gnus-sorted-header-list}
10730 variable.  It is a list of regular expressions that says in what order
10731 the headers are to be displayed.
10732
10733 For instance, if you want the name of the author of the article first,
10734 and then the subject, you might say something like:
10735
10736 @lisp
10737 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10738 @end lisp
10739
10740 Any headers that are to remain visible, but are not listed in this
10741 variable, will be displayed in random order after all the headers listed in this variable.
10742
10743 @findex gnus-article-hide-boring-headers
10744 @vindex gnus-boring-article-headers
10745 You can hide further boring headers by setting
10746 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10747 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10748 list, but this list doesn't actually contain header names.  Instead is
10749 lists various @dfn{boring conditions} that Gnus can check and remove
10750 from sight.
10751
10752 These conditions are:
10753 @table @code
10754 @item empty
10755 Remove all empty headers.
10756 @item followup-to
10757 Remove the @code{Followup-To} header if it is identical to the
10758 @code{Newsgroups} header.
10759 @item reply-to
10760 Remove the @code{Reply-To} header if it lists the same address as the
10761 @code{From} header, or if the @code{broken-reply-to} group parameter is
10762 set.
10763 @item newsgroups
10764 Remove the @code{Newsgroups} header if it only contains the current group
10765 name.
10766 @item to-address
10767 Remove the @code{To} header if it only contains the address identical to
10768 the current group's @code{to-address} parameter.
10769 @item to-list
10770 Remove the @code{To} header if it only contains the address identical to
10771 the current group's @code{to-list} parameter.
10772 @item cc-list
10773 Remove the @code{CC} header if it only contains the address identical to
10774 the current group's @code{to-list} parameter.
10775 @item date
10776 Remove the @code{Date} header if the article is less than three days
10777 old.
10778 @item long-to
10779 Remove the @code{To} header if it is very long.
10780 @item many-to
10781 Remove all @code{To} headers if there are more than one.
10782 @end table
10783
10784 To include these three elements, you could say something like:
10785
10786 @lisp
10787 (setq gnus-boring-article-headers
10788       '(empty followup-to reply-to))
10789 @end lisp
10790
10791 This is also the default value for this variable.
10792
10793
10794 @node Using MIME
10795 @section Using MIME
10796 @cindex @acronym{MIME}
10797
10798 Mime is a standard for waving your hands through the air, aimlessly,
10799 while people stand around yawning.
10800
10801 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10802 while all newsreaders die of fear.
10803
10804 @acronym{MIME} may specify what character set the article uses, the encoding
10805 of the characters, and it also makes it possible to embed pictures and
10806 other naughty stuff in innocent-looking articles.
10807
10808 @vindex gnus-show-mime
10809 @vindex gnus-article-display-method-for-mime
10810 @findex gnus-article-display-mime-message
10811 gnus handles @acronym{MIME} by pushing the articles through
10812 @code{gnus-article-display-method-for-mime}, which is
10813 @code{gnus-article-display-mime-message} by default.  This function
10814 calls the @acronym{SEMI} MIME-View program to actually do the work.  For
10815 more information on @acronym{SEMI} MIME-View, see its manual page
10816 (however it is not existed yet, sorry).
10817
10818 Set @code{gnus-show-mime} to @code{t} if you want to use
10819 @acronym{MIME} all the time.  If you have @code{gnus-show-mime} set,
10820 then you'll see some unfortunate display glitches in the article buffer.
10821 These can't be avoided.
10822
10823 In GNUS or Gnus, it might be best to just use the toggling functions
10824 from the summary buffer to avoid getting nasty surprises. (For instance,
10825 you enter the group @samp{alt.sing-a-long} and, before you know it,
10826 @acronym{MIME} has decoded the sound file in the article and some
10827 horrible sing-a-long song comes screaming out your speakers, and you
10828 can't find the volume button, because there isn't one, and people are
10829 starting to look at you, and you try to stop the program, but you can't,
10830 and you can't find the program to control the volume, and everybody else
10831 in the room suddenly decides to look at you disdainfully, and you'll
10832 feel rather stupid.)
10833
10834 Any similarity to real events and people is purely coincidental.  Ahem.
10835
10836 To avoid such kind of situation, gnus stops to use
10837 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10838 non-@code{nil} every-time, then you can push button in the article
10839 buffer when there are nobody else.
10840
10841 Also @pxref{MIME Commands}.
10842
10843
10844 @node Customizing Articles
10845 @section Customizing Articles
10846 @cindex article customization
10847
10848 A slew of functions for customizing how the articles are to look like
10849 exist.  You can call these functions interactively
10850 (@pxref{Article Washing}), or you can have them
10851 called automatically when you select the articles.
10852
10853 To have them called automatically, you should set the corresponding
10854 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10855 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10856 be set, but first we discuss the values these variables can have.
10857
10858 Note: Some values, while valid, make little sense.  Check the list below
10859 for sensible values.
10860
10861 @enumerate
10862 @item
10863 @code{nil}: Don't do this treatment.
10864
10865 @item
10866 @code{t}: Do this treatment on all body parts.
10867
10868 @item
10869 @code{head}: Do the treatment on the headers.
10870
10871 @item
10872 @code{last}: Do this treatment on the last part.
10873
10874 @item
10875 An integer: Do this treatment on all body parts that have a length less
10876 than this number.
10877
10878 @item
10879 A list of strings: Do this treatment on all body parts that are in
10880 articles that are read in groups that have names that match one of the
10881 regexps in the list.
10882
10883 @item
10884 A list where the first element is not a string:
10885
10886 The list is evaluated recursively.  The first element of the list is a
10887 predicate.  The following predicates are recognized: @code{or},
10888 @code{and}, @code{not} and @code{typep}.  Here's an example:
10889
10890 @lisp
10891 (or last
10892     (typep "text/x-vcard"))
10893 @end lisp
10894
10895 @item
10896 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10897 non-nil.
10898
10899 @end enumerate
10900
10901 You may have noticed that the word @dfn{part} is used here.  This refers
10902 to the fact that some messages are @acronym{MIME} multipart articles that may
10903 be divided into several parts.  Articles that are not multiparts are
10904 considered to contain just a single part.
10905
10906 @vindex gnus-article-treat-types
10907 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10908 want to, but by default, only @samp{text/plain} parts are given the
10909 treatment.  This is controlled by the @code{gnus-article-treat-types}
10910 variable, which is a list of regular expressions that are matched to the
10911 type of the part.  This variable is ignored if the value of the
10912 controlling variable is a predicate list, as described above.
10913
10914 The following treatment options are available.  The easiest way to
10915 customize this is to examine the @code{gnus-article-treat} customization
10916 group.  Values in parenthesis are suggested sensible values.  Others are
10917 possible but those listed are probably sufficient for most people.
10918
10919 @table @code
10920 @item gnus-treat-buttonize (t, integer)
10921 @item gnus-treat-buttonize-head (head)
10922
10923 @xref{Article Buttons}.
10924
10925 @item gnus-treat-capitalize-sentences (t, integer)
10926 @item gnus-treat-overstrike (t, integer)
10927 @item gnus-treat-strip-cr (t, integer)
10928 @item gnus-treat-strip-headers-in-body (t, integer)
10929 @item gnus-treat-strip-leading-blank-lines (t, integer)
10930 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10931 @item gnus-treat-strip-pem (t, last, integer)
10932 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10933 @item gnus-treat-unsplit-urls (t, integer)
10934 @item gnus-treat-wash-html (t, integer)
10935 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10936
10937 @xref{Article Washing}.
10938
10939 @item gnus-treat-date-english (head)
10940 @item gnus-treat-date-iso8601 (head)
10941 @item gnus-treat-date-lapsed (head)
10942 @item gnus-treat-date-local (head)
10943 @item gnus-treat-date-original (head)
10944 @item gnus-treat-date-user-defined (head)
10945 @item gnus-treat-date-ut (head)
10946
10947 @xref{Article Date}.
10948
10949 @item gnus-treat-from-picon (head)
10950 @item gnus-treat-mail-picon (head)
10951 @item gnus-treat-newsgroups-picon (head)
10952
10953 @xref{Picons}.
10954
10955 @item gnus-treat-display-smileys (t, integer)
10956
10957 @item gnus-treat-body-boundary (head)
10958
10959 @vindex gnus-body-boundary-delimiter
10960 Adds a delimiter between header and body, the string used as delimiter
10961 is controlled by @code{gnus-body-boundary-delimiter}.
10962
10963 @xref{Smileys}.
10964
10965 @item gnus-treat-display-xface (head)
10966
10967 @xref{X-Face}.
10968
10969 @item gnus-treat-display-face (head)
10970
10971 @xref{Face}.
10972
10973 @item gnus-treat-emphasize (t, head, integer)
10974 @item gnus-treat-fill-article (t, integer)
10975 @item gnus-treat-fill-long-lines (t, integer)
10976 @item gnus-treat-hide-boring-headers (head)
10977 @item gnus-treat-hide-citation (t, integer)
10978 @item gnus-treat-hide-citation-maybe (t, integer)
10979 @item gnus-treat-hide-headers (head)
10980 @item gnus-treat-hide-signature (t, last)
10981 @item gnus-treat-strip-banner (t, last)
10982 @item gnus-treat-strip-list-identifiers (head)
10983
10984 @xref{Article Hiding}.
10985
10986 @item gnus-treat-highlight-citation (t, integer)
10987 @item gnus-treat-highlight-headers (head)
10988 @item gnus-treat-highlight-signature (t, last, integer)
10989
10990 @xref{Article Highlighting}.
10991
10992 @item gnus-treat-play-sounds
10993 @item gnus-treat-translate
10994 @item gnus-treat-x-pgp-sig (head)
10995
10996 @item gnus-treat-unfold-headers (head)
10997 @item gnus-treat-fold-headers (head)
10998 @item gnus-treat-fold-newsgroups (head)
10999 @item gnus-treat-leading-whitespace (head)
11000
11001 @xref{Article Header}.
11002
11003
11004 @end table
11005
11006 @vindex gnus-part-display-hook
11007 You can, of course, write your own functions to be called from
11008 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11009 part, and you can do anything you like, pretty much.  There is no
11010 information that you have to keep in the buffer---you can change
11011 everything.
11012
11013
11014 @node Article Keymap
11015 @section Article Keymap
11016
11017 Most of the keystrokes in the summary buffer can also be used in the
11018 article buffer.  They should behave as if you typed them in the summary
11019 buffer, which means that you don't actually have to have a summary
11020 buffer displayed while reading.  You can do it all from the article
11021 buffer.
11022
11023 A few additional keystrokes are available:
11024
11025 @table @kbd
11026
11027 @item SPACE
11028 @kindex SPACE (Article)
11029 @findex gnus-article-next-page
11030 Scroll forwards one page (@code{gnus-article-next-page}).
11031 This is exactly the same as @kbd{h SPACE h}.
11032
11033 @item DEL
11034 @kindex DEL (Article)
11035 @findex gnus-article-prev-page
11036 Scroll backwards one page (@code{gnus-article-prev-page}).
11037 This is exactly the same as @kbd{h DEL h}.
11038
11039 @item C-c ^
11040 @kindex C-c ^ (Article)
11041 @findex gnus-article-refer-article
11042 If point is in the neighborhood of a @code{Message-ID} and you press
11043 @kbd{C-c ^}, Gnus will try to get that article from the server
11044 (@code{gnus-article-refer-article}).
11045
11046 @item C-c C-m
11047 @kindex C-c C-m (Article)
11048 @findex gnus-article-mail
11049 Send a reply to the address near point (@code{gnus-article-mail}).  If
11050 given a prefix, include the mail.
11051
11052 @item s
11053 @kindex s (Article)
11054 @findex gnus-article-show-summary
11055 Reconfigure the buffers so that the summary buffer becomes visible
11056 (@code{gnus-article-show-summary}).
11057
11058 @item ?
11059 @kindex ? (Article)
11060 @findex gnus-article-describe-briefly
11061 Give a very brief description of the available keystrokes
11062 (@code{gnus-article-describe-briefly}).
11063
11064 @item TAB
11065 @kindex TAB (Article)
11066 @findex gnus-article-next-button
11067 Go to the next button, if any (@code{gnus-article-next-button}).  This
11068 only makes sense if you have buttonizing turned on.
11069
11070 @item M-TAB
11071 @kindex M-TAB (Article)
11072 @findex gnus-article-prev-button
11073 Go to the previous button, if any (@code{gnus-article-prev-button}).
11074
11075 @item R
11076 @kindex R (Article)
11077 @findex gnus-article-reply-with-original
11078 Send a reply to the current article and yank the current article
11079 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11080 wide reply.  If the region is active, only yank the text in the
11081 region.
11082
11083 @item F
11084 @kindex F (Article)
11085 @findex gnus-article-followup-with-original
11086 Send a followup to the current article and yank the current article
11087 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11088 a wide reply.  If the region is active, only yank the text in the
11089 region.
11090
11091
11092 @end table
11093
11094
11095 @node Misc Article
11096 @section Misc Article
11097
11098 @table @code
11099
11100 @item gnus-single-article-buffer
11101 @vindex gnus-single-article-buffer
11102 If non-@code{nil}, use the same article buffer for all the groups.
11103 (This is the default.)  If @code{nil}, each group will have its own
11104 article buffer.
11105
11106 @vindex gnus-article-decode-hook
11107 @item gnus-article-decode-hook
11108 @cindex @acronym{MIME}
11109 Hook used to decode @acronym{MIME} articles.  The default value is
11110 @code{(article-decode-charset article-decode-encoded-words)}
11111
11112 @vindex gnus-article-prepare-hook
11113 @item gnus-article-prepare-hook
11114 This hook is called right after the article has been inserted into the
11115 article buffer.  It is mainly intended for functions that do something
11116 depending on the contents; it should probably not be used for changing
11117 the contents of the article buffer.
11118
11119 @item gnus-article-mode-hook
11120 @vindex gnus-article-mode-hook
11121 Hook called in article mode buffers.
11122
11123 @item gnus-article-mode-syntax-table
11124 @vindex gnus-article-mode-syntax-table
11125 Syntax table used in article buffers.  It is initialized from
11126 @code{text-mode-syntax-table}.
11127
11128 @vindex gnus-article-over-scroll
11129 @item gnus-article-over-scroll
11130 If non-@code{nil}, allow scrolling the article buffer even when there
11131 no more new text to scroll in.  The default is @code{nil}.
11132
11133 @vindex gnus-article-mode-line-format
11134 @item gnus-article-mode-line-format
11135 This variable is a format string along the same lines as
11136 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11137 accepts the same format specifications as that variable, with two
11138 extensions:
11139
11140 @table @samp
11141
11142 @item w
11143 The @dfn{wash status} of the article.  This is a short string with one
11144 character for each possible article wash operation that may have been
11145 performed.  The characters and their meaning:
11146
11147 @table @samp
11148
11149 @item c
11150 Displayed when cited text may be hidden in the article buffer.
11151
11152 @item h
11153 Displayed when headers are hidden in the article buffer.
11154
11155 @item p
11156 Displayed when article is digitally signed or encrypted, and Gnus has
11157 hidden the security headers.  (N.B. does not tell anything about
11158 security status, i.e. good or bad signature.)
11159
11160 @item s
11161 Displayed when the signature has been hidden in the Article buffer.
11162
11163 @item o
11164 Displayed when Gnus has treated overstrike characters in the article buffer.
11165
11166 @item e
11167 Displayed when Gnus has treated emphasised strings in the article buffer.
11168
11169 @end table
11170
11171 @item m
11172 The number of @acronym{MIME} parts in the article.
11173
11174 @end table
11175
11176 @vindex gnus-break-pages
11177
11178 @item gnus-break-pages
11179 Controls whether @dfn{page breaking} is to take place.  If this variable
11180 is non-@code{nil}, the articles will be divided into pages whenever a
11181 page delimiter appears in the article.  If this variable is @code{nil},
11182 paging will not be done.
11183
11184 @item gnus-page-delimiter
11185 @vindex gnus-page-delimiter
11186 This is the delimiter mentioned above.  By default, it is @samp{^L}
11187 (formfeed).
11188
11189 @cindex IDNA
11190 @cindex internationalized domain names
11191 @vindex gnus-use-idna
11192 @item gnus-use-idna
11193 This variable controls whether Gnus performs IDNA decoding of
11194 internationalized domain names inside @samp{From}, @samp{To} and
11195 @samp{Cc} headers.  This requires
11196 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11197 variable is only enabled if you have installed it.
11198
11199 @end table
11200
11201
11202 @node Composing Messages
11203 @chapter Composing Messages
11204 @cindex composing messages
11205 @cindex messages
11206 @cindex mail
11207 @cindex sending mail
11208 @cindex reply
11209 @cindex followup
11210 @cindex post
11211 @cindex using gpg
11212 @cindex using s/mime
11213 @cindex using smime
11214
11215 @kindex C-c C-c (Post)
11216 All commands for posting and mailing will put you in a message buffer
11217 where you can edit the article all you like, before you send the
11218 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11219 Message Manual}.  Where the message will be posted/mailed to depends
11220 on your setup (@pxref{Posting Server}).
11221
11222 @menu
11223 * Mail::                        Mailing and replying.
11224 * Posting Server::              What server should you post and mail via?
11225 * Mail and Post::               Mailing and posting at the same time.
11226 * Archived Messages::           Where Gnus stores the messages you've sent.
11227 * Posting Styles::              An easier way to specify who you are.
11228 * Drafts::                      Postponing messages and rejected messages.
11229 * Rejected Articles::           What happens if the server doesn't like your article?
11230 * Signing and encrypting::      How to compose secure messages.
11231 @end menu
11232
11233 Also @pxref{Canceling and Superseding} for information on how to
11234 remove articles you shouldn't have posted.
11235
11236
11237 @node Mail
11238 @section Mail
11239
11240 Variables for customizing outgoing mail:
11241
11242 @table @code
11243 @item gnus-uu-digest-headers
11244 @vindex gnus-uu-digest-headers
11245 List of regexps to match headers included in digested messages.  The
11246 headers will be included in the sequence they are matched.  If
11247 @code{nil} include all headers.
11248
11249 @item gnus-add-to-list
11250 @vindex gnus-add-to-list
11251 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11252 that have none when you do a @kbd{a}.
11253
11254 @item gnus-confirm-mail-reply-to-news
11255 @vindex gnus-confirm-mail-reply-to-news
11256 This can also be a function receiving the group name as the only
11257 parameter which should return non-@code{nil} if a confirmation is
11258 needed, or a regular expression matching group names, where
11259 confirmation is should be asked for.
11260
11261 If you find yourself never wanting to reply to mail, but occasionally
11262 press R anyway, this variable might be for you.
11263
11264 @item gnus-confirm-treat-mail-like-news
11265 @vindex gnus-confirm-treat-mail-like-news
11266 If non-@code{nil}, Gnus also requests confirmation according to
11267 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11268 useful for treating mailing lists like newsgroups.
11269
11270 @end table
11271
11272
11273 @node Posting Server
11274 @section Posting Server
11275
11276 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11277 (extremely intelligent, of course) article, where does it go?
11278
11279 Thank you for asking.  I hate you.
11280
11281 It can be quite complicated.
11282
11283 @vindex gnus-post-method
11284 When posting news, Message usually invokes @code{message-send-news}
11285 (@pxref{News Variables, , News Variables, message, Message Manual}).
11286 Normally, Gnus will post using the same select method as you're
11287 reading from (which might be convenient if you're reading lots of
11288 groups from different private servers).  However.  If the server
11289 you're reading from doesn't allow posting, just reading, you probably
11290 want to use some other server to post your (extremely intelligent and
11291 fabulously interesting) articles.  You can then set the
11292 @code{gnus-post-method} to some other method:
11293
11294 @lisp
11295 (setq gnus-post-method '(nnspool ""))
11296 @end lisp
11297
11298 Now, if you've done this, and then this server rejects your article, or
11299 this server is down, what do you do then?  To override this variable you
11300 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11301 the ``current'' server, to get back the default behavior, for posting.
11302
11303 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11304 gnus will prompt you for what method to use for posting.
11305
11306 You can also set @code{gnus-post-method} to a list of select methods.
11307 If that's the case, gnus will always prompt you for what method to use
11308 for posting.
11309
11310 Finally, if you want to always post using the native select method,
11311 you can set this variable to @code{native}.
11312
11313 When sending mail, Message invokes @code{message-send-mail-function}.
11314 The default function, @code{message-send-mail-with-sendmail}, pipes
11315 your article to the @code{sendmail} binary for further queuing and
11316 sending.  When your local system is not configured for sending mail
11317 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11318 server, you can set @code{message-send-mail-function} to
11319 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11320 package correctly.  An example:
11321
11322 @lisp
11323 (setq message-send-mail-function 'smtpmail-send-it
11324       smtpmail-default-smtp-server "YOUR SMTP HOST")
11325 ;; The following variable needs to be set because of the FLIM version of
11326 ;; smtpmail.el.  Which smtpmail.el is used depends on the `load-path'.
11327 (setq smtp-default-smtp-server "YOUR SMTP HOST")
11328 @end lisp
11329
11330 To the thing similar to this, there is
11331 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11332 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11333 documentation for the function @code{mail-source-touch-pop}.
11334
11335 Other possible choices for @code{message-send-mail-function} includes
11336 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11337 and @code{feedmail-send-it}.
11338
11339 @node Mail and Post
11340 @section Mail and Post
11341
11342 Here's a list of variables relevant to both mailing and
11343 posting:
11344
11345 @table @code
11346 @item gnus-mailing-list-groups
11347 @findex gnus-mailing-list-groups
11348 @cindex mailing lists
11349
11350 If your news server offers groups that are really mailing lists
11351 gatewayed to the @acronym{NNTP} server, you can read those groups without
11352 problems, but you can't post/followup to them without some difficulty.
11353 One solution is to add a @code{to-address} to the group parameters
11354 (@pxref{Group Parameters}).  An easier thing to do is set the
11355 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11356 really are mailing lists.  Then, at least, followups to the mailing
11357 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11358 still a pain, though.
11359
11360 @item gnus-user-agent
11361 @vindex gnus-user-agent
11362 @cindex User-Agent
11363
11364 This variable controls which information should be exposed in the
11365 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11366 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11367 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11368 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11369 system type) or a custom string.  If you set it to a string, be sure to
11370 use a valid format, see RFC 2616.
11371
11372 @end table
11373
11374 You may want to do spell-checking on messages that you send out.  Or, if
11375 you don't want to spell-check by hand, you could add automatic
11376 spell-checking via the @code{ispell} package:
11377
11378 @cindex ispell
11379 @findex ispell-message
11380 @lisp
11381 (add-hook 'message-send-hook 'ispell-message)
11382 @end lisp
11383
11384 If you want to change the @code{ispell} dictionary based on what group
11385 you're in, you could say something like the following:
11386
11387 @lisp
11388 (add-hook 'gnus-select-group-hook
11389           (lambda ()
11390             (cond
11391              ((string-match
11392                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11393               (ispell-change-dictionary "deutsch"))
11394              (t
11395               (ispell-change-dictionary "english")))))
11396 @end lisp
11397
11398 Modify to suit your needs.
11399
11400
11401 @node Archived Messages
11402 @section Archived Messages
11403 @cindex archived messages
11404 @cindex sent messages
11405
11406 Gnus provides a few different methods for storing the mail and news you
11407 send.  The default method is to use the @dfn{archive virtual server} to
11408 store the messages.  If you want to disable this completely, the
11409 @code{gnus-message-archive-group} variable should be @code{nil}, which
11410 is the default.
11411
11412 For archiving interesting messages in a group you read, see the
11413 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11414 Group Commands}).
11415
11416 @vindex gnus-message-archive-method
11417 @code{gnus-message-archive-method} says what virtual server gnus is to
11418 use to store sent messages.  The default is:
11419
11420 @lisp
11421 (nnfolder "archive"
11422           (nnfolder-directory   "~/Mail/archive")
11423           (nnfolder-active-file "~/Mail/archive/active")
11424           (nnfolder-get-new-mail nil)
11425           (nnfolder-inhibit-expiry t))
11426 @end lisp
11427
11428 You can, however, use any mail select method (@code{nnml},
11429 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11430 for doing this sort of thing, though.  If you don't like the default
11431 directory chosen, you could say something like:
11432
11433 @lisp
11434 (setq gnus-message-archive-method
11435       '(nnfolder "archive"
11436                  (nnfolder-inhibit-expiry t)
11437                  (nnfolder-active-file "~/News/sent-mail/active")
11438                  (nnfolder-directory "~/News/sent-mail/")))
11439 @end lisp
11440
11441 @vindex gnus-message-archive-group
11442 @cindex Gcc
11443 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11444 to one or more group(s) on that server.  Which group to use is
11445 determined by the @code{gnus-message-archive-group} variable.
11446
11447 This variable can be used to do the following:
11448
11449 @itemize @bullet
11450 @item
11451 a string
11452 Messages will be saved in that group.
11453
11454 Note that you can include a select method in the group name, then the
11455 message will not be stored in the select method given by
11456 @code{gnus-message-archive-method}, but in the select method specified
11457 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11458 has the default value shown above.  Then setting
11459 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11460 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11461 value @code{"nnml:foo"}, then outgoing messages will be stored in
11462 @samp{nnml:foo}.
11463 @item
11464 a list of strings
11465 Messages will be saved in all those groups.
11466 @item
11467 an alist of regexps, functions and forms
11468 When a key ``matches'', the result is used.
11469 @item
11470 @code{nil}
11471 No message archiving will take place.  This is the default.
11472 @end itemize
11473
11474 Let's illustrate:
11475
11476 Just saving to a single group called @samp{MisK}:
11477 @lisp
11478 (setq gnus-message-archive-group "MisK")
11479 @end lisp
11480
11481 Saving to two groups, @samp{MisK} and @samp{safe}:
11482 @lisp
11483 (setq gnus-message-archive-group '("MisK" "safe"))
11484 @end lisp
11485
11486 Save to different groups based on what group you are in:
11487 @lisp
11488 (setq gnus-message-archive-group
11489       '(("^alt" "sent-to-alt")
11490         ("mail" "sent-to-mail")
11491         (".*" "sent-to-misc")))
11492 @end lisp
11493
11494 More complex stuff:
11495 @lisp
11496 (setq gnus-message-archive-group
11497       '((if (message-news-p)
11498             "misc-news"
11499           "misc-mail")))
11500 @end lisp
11501
11502 How about storing all news messages in one file, but storing all mail
11503 messages in one file per month:
11504
11505 @lisp
11506 (setq gnus-message-archive-group
11507       '((if (message-news-p)
11508             "misc-news"
11509           (concat "mail." (format-time-string "%Y-%m")))))
11510 @end lisp
11511
11512 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11513 @c use a different value for @code{gnus-message-archive-group} there.)
11514
11515 Now, when you send a message off, it will be stored in the appropriate
11516 group.  (If you want to disable storing for just one particular message,
11517 you can just remove the @code{Gcc} header that has been inserted.)  The
11518 archive group will appear in the group buffer the next time you start
11519 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11520 enter it and read the articles in it just like you'd read any other
11521 group.  If the group gets really big and annoying, you can simply rename
11522 if (using @kbd{G r} in the group buffer) to something
11523 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11524 continue to be stored in the old (now empty) group.
11525
11526 That's the default method of archiving sent messages.  Gnus offers a
11527 different way for the people who don't like the default method.  In that
11528 case you should set @code{gnus-message-archive-group} to @code{nil};
11529 this will disable archiving.
11530
11531 @table @code
11532 @item gnus-outgoing-message-group
11533 @vindex gnus-outgoing-message-group
11534 All outgoing messages will be put in this group.  If you want to store
11535 all your outgoing mail and articles in the group @samp{nnml:archive},
11536 you set this variable to that value.  This variable can also be a list of
11537 group names.
11538
11539 If you want to have greater control over what group to put each
11540 message in, you can set this variable to a function that checks the
11541 current newsgroup name and then returns a suitable group name (or list
11542 of names).
11543
11544 This variable can be used instead of @code{gnus-message-archive-group},
11545 but the latter is the preferred method.
11546
11547 @item gnus-gcc-mark-as-read
11548 @vindex gnus-gcc-mark-as-read
11549 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11550
11551 @item gnus-gcc-externalize-attachments
11552 @vindex gnus-gcc-externalize-attachments
11553 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11554 and matches the Gcc group name, attach files as external parts; if it is
11555 @code{all}, attach local files as external parts; if it is other
11556 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11557 changed in the future.
11558
11559 @end table
11560
11561
11562 @node Posting Styles
11563 @section Posting Styles
11564 @cindex posting styles
11565 @cindex styles
11566
11567 All them variables, they make my head swim.
11568
11569 So what if you want a different @code{Organization} and signature based
11570 on what groups you post to?  And you post both from your home machine
11571 and your work machine, and you want different @code{From} lines, and so
11572 on?
11573
11574 @vindex gnus-posting-styles
11575 One way to do stuff like that is to write clever hooks that change the
11576 variables you need to have changed.  That's a bit boring, so somebody
11577 came up with the bright idea of letting the user specify these things in
11578 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11579 variable:
11580
11581 @lisp
11582 ((".*"
11583   (signature "Peace and happiness")
11584   (organization "What me?"))
11585  ("^comp"
11586   (signature "Death to everybody"))
11587  ("comp.emacs.i-love-it"
11588   (organization "Emacs is it")))
11589 @end lisp
11590
11591 As you might surmise from this example, this alist consists of several
11592 @dfn{styles}.  Each style will be applicable if the first element
11593 ``matches'', in some form or other.  The entire alist will be iterated
11594 over, from the beginning towards the end, and each match will be
11595 applied, which means that attributes in later styles that match override
11596 the same attributes in earlier matching styles.  So
11597 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11598 signature and the @samp{What me?} @code{Organization} header.
11599
11600 The first element in each style is called the @code{match}.  If it's a
11601 string, then Gnus will try to regexp match it against the group name.
11602 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11603 will look in the original article for a header whose name is
11604 @var{match} and compare that @var{regexp}.  @var{match} and
11605 @var{regexp} are strings.  (There original article is the one you are
11606 replying or following up to.  If you are not composing a reply or a
11607 followup, then there is nothing to match against.)  If the
11608 @code{match} is a function symbol, that function will be called with
11609 no arguments.  If it's a variable symbol, then the variable will be
11610 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11611 any case, if this returns a non-@code{nil} value, then the style is
11612 said to @dfn{match}.
11613
11614 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11615 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11616 attribute name can be one of @code{signature}, @code{signature-file},
11617 @code{x-face-file}, @code{address} (overriding
11618 @code{user-mail-address}), @code{name} (overriding
11619 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11620 be a string or a symbol.  In that case, this will be used as a header
11621 name, and the value will be inserted in the headers of the article; if
11622 the value is @code{nil}, the header name will be removed.  If the
11623 attribute name is @code{eval}, the form is evaluated, and the result
11624 is thrown away.
11625
11626 The attribute value can be a string (used verbatim), a function with
11627 zero arguments (the return value will be used), a variable (its value
11628 will be used) or a list (it will be @code{eval}ed and the return value
11629 will be used).  The functions and sexps are called/@code{eval}ed in the
11630 message buffer that is being set up.  The headers of the current article
11631 are available through the @code{message-reply-headers} variable, which
11632 is a vector of the following headers: number subject from date id
11633 references chars lines xref extra.
11634
11635 @vindex message-reply-headers
11636
11637 If you wish to check whether the message you are about to compose is
11638 meant to be a news article or a mail message, you can check the values
11639 of the @code{message-news-p} and @code{message-mail-p} functions.
11640
11641 @findex message-mail-p
11642 @findex message-news-p
11643
11644 So here's a new example:
11645
11646 @lisp
11647 (setq gnus-posting-styles
11648       '((".*"
11649          (signature-file "~/.signature")
11650          (name "User Name")
11651          ("X-Home-Page" (getenv "WWW_HOME"))
11652          (organization "People's Front Against MWM"))
11653         ("^rec.humor"
11654          (signature my-funny-signature-randomizer))
11655         ((equal (system-name) "gnarly")  ;; @r{A form}
11656          (signature my-quote-randomizer))
11657         (message-news-p        ;; @r{A function symbol}
11658          (signature my-news-signature))
11659         (window-system         ;; @r{A value symbol}
11660          ("X-Window-System" (format "%s" window-system)))
11661         ;; @r{If I'm replying to Larsi, set the Organization header.}
11662         ((header "from" "larsi.*org")
11663          (Organization "Somewhere, Inc."))
11664         ((posting-from-work-p) ;; @r{A user defined function}
11665          (signature-file "~/.work-signature")
11666          (address "user@@bar.foo")
11667          (body "You are fired.\n\nSincerely, your boss.")
11668          (organization "Important Work, Inc"))
11669         ("nnml:.*"
11670          (From (save-excursion
11671                  (set-buffer gnus-article-buffer)
11672                  (message-fetch-field "to"))))
11673         ("^nn.+:"
11674          (signature-file "~/.mail-signature"))))
11675 @end lisp
11676
11677 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11678 @code{From} address in all your outgoing replies, which might be handy
11679 if you fill many roles.
11680
11681 Setting the @code{gnus-named-posting-styles} variable will make
11682 posting-styles allow to have distinctive names.  You can specify an
11683 arbitrary posting-style when article posting with @kbd{S P} in the
11684 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11685 the names to styles.  Once a posting-style is added to the alist, we can
11686 import it from @code{gnus-posting-styles}.  If an attribute whose name
11687 is @code{import} is found, Gnus will look for the attribute value in
11688 @code{gnus-named-posting-styles} and expand it in place.
11689
11690 Here's an example:
11691
11692 @lisp
11693 (setq gnus-named-posting-styles
11694       '(("Default"
11695          (signature-file "~/.signature")
11696          (name "User Name")
11697          ("X-Home-Page" (getenv "WWW_HOME"))
11698          (organization "People's Front Against MWM"))
11699         ("Emacs"
11700          (import "Default")
11701          (organization "The Church of Emacs"))))
11702 @end lisp
11703
11704 The posting-style named "Emacs" will inherit all the attributes from
11705 "Default" except @code{organization}.
11706
11707
11708 @node Drafts
11709 @section Drafts
11710 @cindex drafts
11711
11712 If you are writing a message (mail or news) and suddenly remember that
11713 you have a steak in the oven (or some pesto in the food processor, you
11714 craaazy vegetarians), you'll probably wish there was a method to save
11715 the message you are writing so that you can continue editing it some
11716 other day, and send it when you feel its finished.
11717
11718 Well, don't worry about it.  Whenever you start composing a message of
11719 some sort using the gnus mail and post commands, the buffer you get will
11720 automatically associate to an article in a special @dfn{draft} group.
11721 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11722 article will be saved there.  (Auto-save files also go to the draft
11723 group.)
11724
11725 @cindex nndraft
11726 @vindex nndraft-directory
11727 The draft group is a special group (which is implemented as an
11728 @code{nndraft} group, if you absolutely have to know) called
11729 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11730 @code{nndraft} is to store its files.  What makes this group special is
11731 that you can't tick any articles in it or mark any articles as
11732 read---all articles in the group are permanently unread.
11733
11734 If the group doesn't exist, it will be created and you'll be subscribed
11735 to it.  The only way to make it disappear from the Group buffer is to
11736 unsubscribe it.  The special properties of the draft group comes from
11737 a group property (@pxref{Group Parameters}), and if lost the group
11738 behaves like any other group.  This means the commands below will not
11739 be available.  To restore the special properties of the group, the
11740 simplest way is to kill the group, using @kbd{C-k}, and restart
11741 Gnus.  The group is automatically created again with the
11742 correct parameters.  The content of the group is not lost.
11743
11744 @c @findex gnus-dissociate-buffer-from-draft
11745 @c @kindex C-c M-d (Mail)
11746 @c @kindex C-c M-d (Post)
11747 @c @findex gnus-associate-buffer-with-draft
11748 @c @kindex C-c C-d (Mail)
11749 @c @kindex C-c C-d (Post)
11750 @c If you're writing some super-secret message that you later want to
11751 @c encode with PGP before sending, you may wish to turn the auto-saving
11752 @c (and association with the draft group) off.  You never know who might be
11753 @c interested in reading all your extremely valuable and terribly horrible
11754 @c and interesting secrets.  The @kbd{C-c M-d}
11755 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11756 @c If you change your mind and want to turn the auto-saving back on again,
11757 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11758 @c
11759 @c @vindex gnus-use-draft
11760 @c To leave association with the draft group off by default, set
11761 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11762
11763 @findex gnus-draft-edit-message
11764 @kindex D e (Draft)
11765 When you want to continue editing the article, you simply enter the
11766 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11767 that.  You will be placed in a buffer where you left off.
11768
11769 Rejected articles will also be put in this draft group (@pxref{Rejected
11770 Articles}).
11771
11772 @findex gnus-draft-send-all-messages
11773 @kindex D s (Draft)
11774 @findex gnus-draft-send-message
11775 @kindex D S (Draft)
11776 If you have lots of rejected messages you want to post (or mail) without
11777 doing further editing, you can use the @kbd{D s} command
11778 (@code{gnus-draft-send-message}).  This command understands the
11779 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11780 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11781 in the buffer.
11782
11783 @findex gnus-draft-toggle-sending
11784 @kindex D t (Draft)
11785 If you have some messages that you wish not to send, you can use the
11786 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11787 as unsendable.  This is a toggling command.
11788
11789
11790 @node Rejected Articles
11791 @section Rejected Articles
11792 @cindex rejected articles
11793
11794 Sometimes a news server will reject an article.  Perhaps the server
11795 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11796 @emph{there be demons}.  Perhaps you have included too much cited text.
11797 Perhaps the disk is full.  Perhaps the server is down.
11798
11799 These situations are, of course, totally beyond the control of gnus.
11800 (Gnus, of course, loves the way you look, always feels great, has angels
11801 fluttering around inside of it, doesn't care about how much cited text
11802 you include, never runs full and never goes down.)  So gnus saves these
11803 articles until some later time when the server feels better.
11804
11805 The rejected articles will automatically be put in a special draft group
11806 (@pxref{Drafts}).  When the server comes back up again, you'd then
11807 typically enter that group and send all the articles off.
11808
11809 @node Signing and encrypting
11810 @section Signing and encrypting
11811 @cindex using gpg
11812 @cindex using s/mime
11813 @cindex using smime
11814
11815 Gnus can digitally sign and encrypt your messages, using vanilla
11816 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11817 decoding such messages, see the @code{mm-verify-option} and
11818 @code{mm-decrypt-option} options (@pxref{Security}).
11819
11820 @vindex gnus-message-replysign
11821 @vindex gnus-message-replyencrypt
11822 @vindex gnus-message-replysignencrypted
11823 Often, you would like to sign replies to people who send you signed
11824 messages.  Even more often, you might want to encrypt messages which
11825 are in reply to encrypted messages.  Gnus offers
11826 @code{gnus-message-replysign} to enable the former, and
11827 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11828 @code{gnus-message-replysignencrypted} (on by default) will sign
11829 automatically encrypted messages.
11830
11831 Instructing MML to perform security operations on a @acronym{MIME} part is
11832 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11833 C-m c} key map for encryption, as follows.
11834
11835 @table @kbd
11836
11837 @item C-c C-m s s
11838 @kindex C-c C-m s s
11839 @findex mml-secure-message-sign-smime
11840
11841 Digitally sign current message using @acronym{S/MIME}.
11842
11843 @item C-c C-m s o
11844 @kindex C-c C-m s o
11845 @findex mml-secure-message-sign-pgp
11846
11847 Digitally sign current message using @acronym{PGP}.
11848
11849 @item C-c C-m s p
11850 @kindex C-c C-m s p
11851 @findex mml-secure-message-sign-pgp
11852
11853 Digitally sign current message using @acronym{PGP/MIME}.
11854
11855 @item C-c C-m c s
11856 @kindex C-c C-m c s
11857 @findex mml-secure-message-encrypt-smime
11858
11859 Digitally encrypt current message using @acronym{S/MIME}.
11860
11861 @item C-c C-m c o
11862 @kindex C-c C-m c o
11863 @findex mml-secure-message-encrypt-pgp
11864
11865 Digitally encrypt current message using @acronym{PGP}.
11866
11867 @item C-c C-m c p
11868 @kindex C-c C-m c p
11869 @findex mml-secure-message-encrypt-pgpmime
11870
11871 Digitally encrypt current message using @acronym{PGP/MIME}.
11872
11873 @item C-c C-m C-n
11874 @kindex C-c C-m C-n
11875 @findex mml-unsecure-message
11876 Remove security related MML tags from message.
11877
11878 @end table
11879
11880 @xref{Security, ,Security, message, Message Manual}, for more information.
11881
11882 @node Select Methods
11883 @chapter Select Methods
11884 @cindex foreign groups
11885 @cindex select methods
11886
11887 A @dfn{foreign group} is a group not read by the usual (or
11888 default) means.  It could be, for instance, a group from a different
11889 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11890 personal mail group.
11891
11892 A foreign group (or any group, really) is specified by a @dfn{name} and
11893 a @dfn{select method}.  To take the latter first, a select method is a
11894 list where the first element says what back end to use (e.g. @code{nntp},
11895 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11896 name}.  There may be additional elements in the select method, where the
11897 value may have special meaning for the back end in question.
11898
11899 One could say that a select method defines a @dfn{virtual server}---so
11900 we do just that (@pxref{Server Buffer}).
11901
11902 The @dfn{name} of the group is the name the back end will recognize the
11903 group as.
11904
11905 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11906 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11907 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11908 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11909 back end just knows this group as @samp{soc.motss}.
11910
11911 The different methods all have their peculiarities, of course.
11912
11913 @menu
11914 * Server Buffer::               Making and editing virtual servers.
11915 * Getting News::                Reading USENET news with Gnus.
11916 * Getting Mail::                Reading your personal mail with Gnus.
11917 * Browsing the Web::            Getting messages from a plethora of Web sources.
11918 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11919 * Other Sources::               Reading directories, files, SOUP packets.
11920 * Combined Groups::             Combining groups into one group.
11921 * Gnus Unplugged::              Reading news and mail offline.
11922 @end menu
11923
11924
11925 @node Server Buffer
11926 @section Server Buffer
11927
11928 Traditionally, a @dfn{server} is a machine or a piece of software that
11929 one connects to, and then requests information from.  Gnus does not
11930 connect directly to any real servers, but does all transactions through
11931 one back end or other.  But that's just putting one layer more between
11932 the actual media and Gnus, so we might just as well say that each
11933 back end represents a virtual server.
11934
11935 For instance, the @code{nntp} back end may be used to connect to several
11936 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11937 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11938 use, and what parameters to set by specifying a @dfn{select method}.
11939
11940 These select method specifications can sometimes become quite
11941 complicated---say, for instance, that you want to read from the
11942 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11943 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11944 Anyway, if you had to specify that for each group that used this
11945 server, that would be too much work, so Gnus offers a way of naming
11946 select methods, which is what you do in the server buffer.
11947
11948 To enter the server buffer, use the @kbd{^}
11949 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11950
11951 @menu
11952 * Server Buffer Format::        You can customize the look of this buffer.
11953 * Server Commands::             Commands to manipulate servers.
11954 * Example Methods::             Examples server specifications.
11955 * Creating a Virtual Server::   An example session.
11956 * Server Variables::            Which variables to set.
11957 * Servers and Methods::         You can use server names as select methods.
11958 * Unavailable Servers::         Some servers you try to contact may be down.
11959 @end menu
11960
11961 @vindex gnus-server-mode-hook
11962 @code{gnus-server-mode-hook} is run when creating the server buffer.
11963
11964
11965 @node Server Buffer Format
11966 @subsection Server Buffer Format
11967 @cindex server buffer format
11968
11969 @vindex gnus-server-line-format
11970 You can change the look of the server buffer lines by changing the
11971 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11972 variable, with some simple extensions:
11973
11974 @table @samp
11975
11976 @item h
11977 How the news is fetched---the back end name.
11978
11979 @item n
11980 The name of this server.
11981
11982 @item w
11983 Where the news is to be fetched from---the address.
11984
11985 @item s
11986 The opened/closed/denied status of the server.
11987 @end table
11988
11989 @vindex gnus-server-mode-line-format
11990 The mode line can also be customized by using the
11991 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11992 Formatting}).  The following specs are understood:
11993
11994 @table @samp
11995 @item S
11996 Server name.
11997
11998 @item M
11999 Server method.
12000 @end table
12001
12002 Also @pxref{Formatting Variables}.
12003
12004
12005 @node Server Commands
12006 @subsection Server Commands
12007 @cindex server commands
12008
12009 @table @kbd
12010
12011 @item a
12012 @kindex a (Server)
12013 @findex gnus-server-add-server
12014 Add a new server (@code{gnus-server-add-server}).
12015
12016 @item e
12017 @kindex e (Server)
12018 @findex gnus-server-edit-server
12019 Edit a server (@code{gnus-server-edit-server}).
12020
12021 @item SPACE
12022 @kindex SPACE (Server)
12023 @findex gnus-server-read-server
12024 Browse the current server (@code{gnus-server-read-server}).
12025
12026 @item q
12027 @kindex q (Server)
12028 @findex gnus-server-exit
12029 Return to the group buffer (@code{gnus-server-exit}).
12030
12031 @item k
12032 @kindex k (Server)
12033 @findex gnus-server-kill-server
12034 Kill the current server (@code{gnus-server-kill-server}).
12035
12036 @item y
12037 @kindex y (Server)
12038 @findex gnus-server-yank-server
12039 Yank the previously killed server (@code{gnus-server-yank-server}).
12040
12041 @item c
12042 @kindex c (Server)
12043 @findex gnus-server-copy-server
12044 Copy the current server (@code{gnus-server-copy-server}).
12045
12046 @item l
12047 @kindex l (Server)
12048 @findex gnus-server-list-servers
12049 List all servers (@code{gnus-server-list-servers}).
12050
12051 @item s
12052 @kindex s (Server)
12053 @findex gnus-server-scan-server
12054 Request that the server scan its sources for new articles
12055 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12056 servers.
12057
12058 @item g
12059 @kindex g (Server)
12060 @findex gnus-server-regenerate-server
12061 Request that the server regenerate all its data structures
12062 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12063 a mail back end that has gotten out of sync.
12064
12065 @end table
12066
12067
12068 @node Example Methods
12069 @subsection Example Methods
12070
12071 Most select methods are pretty simple and self-explanatory:
12072
12073 @lisp
12074 (nntp "news.funet.fi")
12075 @end lisp
12076
12077 Reading directly from the spool is even simpler:
12078
12079 @lisp
12080 (nnspool "")
12081 @end lisp
12082
12083 As you can see, the first element in a select method is the name of the
12084 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12085 will.
12086
12087 After these two elements, there may be an arbitrary number of
12088 @code{(@var{variable} @var{form})} pairs.
12089
12090 To go back to the first example---imagine that you want to read from
12091 port 15 on that machine.  This is what the select method should
12092 look like then:
12093
12094 @lisp
12095 (nntp "news.funet.fi" (nntp-port-number 15))
12096 @end lisp
12097
12098 You should read the documentation to each back end to find out what
12099 variables are relevant, but here's an @code{nnmh} example:
12100
12101 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12102 you have two structures that you wish to access: One is your private
12103 mail spool, and the other is a public one.  Here's the possible spec for
12104 your private mail:
12105
12106 @lisp
12107 (nnmh "private" (nnmh-directory "~/private/mail/"))
12108 @end lisp
12109
12110 (This server is then called @samp{private}, but you may have guessed
12111 that.)
12112
12113 Here's the method for a public spool:
12114
12115 @lisp
12116 (nnmh "public"
12117       (nnmh-directory "/usr/information/spool/")
12118       (nnmh-get-new-mail nil))
12119 @end lisp
12120
12121 @cindex proxy
12122 @cindex firewall
12123
12124 If you are behind a firewall and only have access to the @acronym{NNTP}
12125 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12126 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12127 Doing this can be rather fiddly, but your virtual server definition
12128 should probably look something like this:
12129
12130 @lisp
12131 (nntp "firewall"
12132       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12133       (nntp-via-address "the.firewall.machine")
12134       (nntp-address "the.real.nntp.host")
12135       (nntp-end-of-line "\n"))
12136 @end lisp
12137
12138 If you want to use the wonderful @code{ssh} program to provide a
12139 compressed connection over the modem line, you could add the following
12140 configuration to the example above:
12141
12142 @lisp
12143       (nntp-via-rlogin-command "ssh")
12144 @end lisp
12145
12146 See also @code{nntp-via-rlogin-command-switches}.
12147
12148 If you're behind a firewall, but have direct access to the outside world
12149 through a wrapper command like "runsocks", you could open a socksified
12150 telnet connection to the news server as follows:
12151
12152 @lisp
12153 (nntp "outside"
12154       (nntp-pre-command "runsocks")
12155       (nntp-open-connection-function nntp-open-via-telnet)
12156       (nntp-address "the.news.server")
12157       (nntp-end-of-line "\n"))
12158 @end lisp
12159
12160 This means that you have to have set up @code{ssh-agent} correctly to
12161 provide automatic authorization, of course.  And to get a compressed
12162 connection, you have to have the @samp{Compression} option in the
12163 @code{ssh} @file{config} file.
12164
12165
12166 @node Creating a Virtual Server
12167 @subsection Creating a Virtual Server
12168
12169 If you're saving lots of articles in the cache by using persistent
12170 articles, you may want to create a virtual server to read the cache.
12171
12172 First you need to add a new server.  The @kbd{a} command does that.  It
12173 would probably be best to use @code{nnspool} to read the cache.  You
12174 could also use @code{nnml} or @code{nnmh}, though.
12175
12176 Type @kbd{a nnspool RET cache RET}.
12177
12178 You should now have a brand new @code{nnspool} virtual server called
12179 @samp{cache}.  You now need to edit it to have the right definitions.
12180 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12181 will contain the following:
12182
12183 @lisp
12184 (nnspool "cache")
12185 @end lisp
12186
12187 Change that to:
12188
12189 @lisp
12190 (nnspool "cache"
12191          (nnspool-spool-directory "~/News/cache/")
12192          (nnspool-nov-directory "~/News/cache/")
12193          (nnspool-active-file "~/News/cache/active"))
12194 @end lisp
12195
12196 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12197 @kbd{RET} over this virtual server, you should be entered into a browse
12198 buffer, and you should be able to enter any of the groups displayed.
12199
12200
12201 @node Server Variables
12202 @subsection Server Variables
12203 @cindex server variables
12204 @cindex server parameters
12205
12206 One sticky point when defining variables (both on back ends and in Emacs
12207 in general) is that some variables are typically initialized from other
12208 variables when the definition of the variables is being loaded.  If you
12209 change the ``base'' variable after the variables have been loaded, you
12210 won't change the ``derived'' variables.
12211
12212 This typically affects directory and file variables.  For instance,
12213 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12214 directory variables are initialized from that variable, so
12215 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12216 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12217 @code{nnml-directory}---you have to explicitly set all the file
12218 variables to be what you want them to be.  For a complete list of
12219 variables for each back end, see each back end's section later in this
12220 manual, but here's an example @code{nnml} definition:
12221
12222 @lisp
12223 (nnml "public"
12224       (nnml-directory "~/my-mail/")
12225       (nnml-active-file "~/my-mail/active")
12226       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12227 @end lisp
12228
12229 Server variables are often called @dfn{server parameters}.
12230
12231 @node Servers and Methods
12232 @subsection Servers and Methods
12233
12234 Wherever you would normally use a select method
12235 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12236 when browsing a foreign server) you can use a virtual server name
12237 instead.  This could potentially save lots of typing.  And it's nice all
12238 over.
12239
12240
12241 @node Unavailable Servers
12242 @subsection Unavailable Servers
12243
12244 If a server seems to be unreachable, Gnus will mark that server as
12245 @code{denied}.  That means that any subsequent attempt to make contact
12246 with that server will just be ignored.  ``It can't be opened,'' Gnus
12247 will tell you, without making the least effort to see whether that is
12248 actually the case or not.
12249
12250 That might seem quite naughty, but it does make sense most of the time.
12251 Let's say you have 10 groups subscribed to on server
12252 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12253 away from you and the machine is quite slow, so it takes 1 minute just
12254 to find out that it refuses connection to you today.  If Gnus were to
12255 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12256 attempt to do that.  Once it has gotten a single ``connection refused'',
12257 it will regard that server as ``down''.
12258
12259 So, what happens if the machine was only feeling unwell temporarily?
12260 How do you test to see whether the machine has come up again?
12261
12262 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12263 with the following commands:
12264
12265 @table @kbd
12266
12267 @item O
12268 @kindex O (Server)
12269 @findex gnus-server-open-server
12270 Try to establish connection to the server on the current line
12271 (@code{gnus-server-open-server}).
12272
12273 @item C
12274 @kindex C (Server)
12275 @findex gnus-server-close-server
12276 Close the connection (if any) to the server
12277 (@code{gnus-server-close-server}).
12278
12279 @item D
12280 @kindex D (Server)
12281 @findex gnus-server-deny-server
12282 Mark the current server as unreachable
12283 (@code{gnus-server-deny-server}).
12284
12285 @item M-o
12286 @kindex M-o (Server)
12287 @findex gnus-server-open-all-servers
12288 Open the connections to all servers in the buffer
12289 (@code{gnus-server-open-all-servers}).
12290
12291 @item M-c
12292 @kindex M-c (Server)
12293 @findex gnus-server-close-all-servers
12294 Close the connections to all servers in the buffer
12295 (@code{gnus-server-close-all-servers}).
12296
12297 @item R
12298 @kindex R (Server)
12299 @findex gnus-server-remove-denials
12300 Remove all marks to whether Gnus was denied connection from any servers
12301 (@code{gnus-server-remove-denials}).
12302
12303 @item L
12304 @kindex L (Server)
12305 @findex gnus-server-offline-server
12306 Set server status to offline (@code{gnus-server-offline-server}).
12307
12308 @end table
12309
12310
12311 @node Getting News
12312 @section Getting News
12313 @cindex reading news
12314 @cindex news back ends
12315
12316 A newsreader is normally used for reading news.  Gnus currently provides
12317 only two methods of getting news---it can read from an @acronym{NNTP} server,
12318 or it can read from a local spool.
12319
12320 @menu
12321 * NNTP::                        Reading news from an @acronym{NNTP} server.
12322 * News Spool::                  Reading news from the local spool.
12323 @end menu
12324
12325
12326 @node NNTP
12327 @subsection NNTP
12328 @cindex nntp
12329
12330 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12331 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12332 server as the, uhm, address.
12333
12334 If the @acronym{NNTP} server is located at a non-standard port, setting the
12335 third element of the select method to this port number should allow you
12336 to connect to the right port.  You'll have to edit the group info for
12337 that (@pxref{Foreign Groups}).
12338
12339 The name of the foreign group can be the same as a native group.  In
12340 fact, you can subscribe to the same group from as many different servers
12341 you feel like.  There will be no name collisions.
12342
12343 The following variables can be used to create a virtual @code{nntp}
12344 server:
12345
12346 @table @code
12347
12348 @item nntp-server-opened-hook
12349 @vindex nntp-server-opened-hook
12350 @cindex @sc{mode reader}
12351 @cindex authinfo
12352 @cindex authentification
12353 @cindex nntp authentification
12354 @findex nntp-send-authinfo
12355 @findex nntp-send-mode-reader
12356 is run after a connection has been made.  It can be used to send
12357 commands to the @acronym{NNTP} server after it has been contacted.  By
12358 default it sends the command @code{MODE READER} to the server with the
12359 @code{nntp-send-mode-reader} function.  This function should always be
12360 present in this hook.
12361
12362 @item nntp-authinfo-function
12363 @vindex nntp-authinfo-function
12364 @findex nntp-send-authinfo
12365 @vindex nntp-authinfo-file
12366 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12367 server.  The default function is @code{nntp-send-authinfo}, which looks
12368 through your @file{~/.authinfo} (or whatever you've set the
12369 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12370 are found, it will prompt you for a login name and a password.  The
12371 format of the @file{~/.authinfo} file is (almost) the same as the
12372 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12373 manual page, but here are the salient facts:
12374
12375 @enumerate
12376 @item
12377 The file contains one or more line, each of which define one server.
12378
12379 @item
12380 Each line may contain an arbitrary number of token/value pairs.
12381
12382 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12383 @samp{default}.  In addition Gnus introduces two new tokens, not present
12384 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12385 @samp{force}.  (This is the only way the @file{.authinfo} file format
12386 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12387 indicate what port on the server the credentials apply to and
12388 @samp{force} is explained below.
12389
12390 @end enumerate
12391
12392 Here's an example file:
12393
12394 @example
12395 machine news.uio.no login larsi password geheimnis
12396 machine nntp.ifi.uio.no login larsi force yes
12397 @end example
12398
12399 The token/value pairs may appear in any order; @samp{machine} doesn't
12400 have to be first, for instance.
12401
12402 In this example, both login name and password have been supplied for the
12403 former server, while the latter has only the login name listed, and the
12404 user will be prompted for the password.  The latter also has the
12405 @samp{force} tag, which means that the authinfo will be sent to the
12406 @var{nntp} server upon connection; the default (i.e., when there is not
12407 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12408 until the @var{nntp} server asks for it.
12409
12410 You can also add @samp{default} lines that will apply to all servers
12411 that don't have matching @samp{machine} lines.
12412
12413 @example
12414 default force yes
12415 @end example
12416
12417 This will force sending @samp{AUTHINFO} commands to all servers not
12418 previously mentioned.
12419
12420 Remember to not leave the @file{~/.authinfo} file world-readable.
12421
12422 @item nntp-server-action-alist
12423 @vindex nntp-server-action-alist
12424 This is a list of regexps to match on server types and actions to be
12425 taken when matches are made.  For instance, if you want Gnus to beep
12426 every time you connect to innd, you could say something like:
12427
12428 @lisp
12429 (setq nntp-server-action-alist
12430       '(("innd" (ding))))
12431 @end lisp
12432
12433 You probably don't want to do that, though.
12434
12435 The default value is
12436
12437 @lisp
12438 '(("nntpd 1\\.5\\.11t"
12439    (remove-hook 'nntp-server-opened-hook
12440                 'nntp-send-mode-reader)))
12441 @end lisp
12442
12443 This ensures that Gnus doesn't send the @code{MODE READER} command to
12444 nntpd 1.5.11t, since that command chokes that server, I've been told.
12445
12446 @item nntp-maximum-request
12447 @vindex nntp-maximum-request
12448 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12449 will collect headers by sending a series of @code{head} commands.  To
12450 speed things up, the back end sends lots of these commands without
12451 waiting for reply, and then reads all the replies.  This is controlled
12452 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12453 your network is buggy, you should set this to 1.
12454
12455 @item nntp-connection-timeout
12456 @vindex nntp-connection-timeout
12457 If you have lots of foreign @code{nntp} groups that you connect to
12458 regularly, you're sure to have problems with @acronym{NNTP} servers not
12459 responding properly, or being too loaded to reply within reasonable
12460 time.  This is can lead to awkward problems, which can be helped
12461 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12462 that says how many seconds the @code{nntp} back end should wait for a
12463 connection before giving up.  If it is @code{nil}, which is the default,
12464 no timeouts are done.
12465
12466 @c @item nntp-command-timeout
12467 @c @vindex nntp-command-timeout
12468 @c @cindex PPP connections
12469 @c @cindex dynamic IP addresses
12470 @c If you're running Gnus on a machine that has a dynamically assigned
12471 @c address, Gnus may become confused.  If the address of your machine
12472 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12473 @c waiting forever for replies from the server.  To help with this
12474 @c unfortunate problem, you can set this command to a number.  Gnus will
12475 @c then, if it sits waiting for a reply from the server longer than that
12476 @c number of seconds, shut down the connection, start a new one, and resend
12477 @c the command.  This should hopefully be transparent to the user.  A
12478 @c likely number is 30 seconds.
12479 @c
12480 @c @item nntp-retry-on-break
12481 @c @vindex nntp-retry-on-break
12482 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12483 @c hangs.  This will have much the same effect as the command timeout
12484 @c described above.
12485
12486 @item nntp-server-hook
12487 @vindex nntp-server-hook
12488 This hook is run as the last step when connecting to an @acronym{NNTP}
12489 server.
12490
12491 @item nntp-buggy-select
12492 @vindex nntp-buggy-select
12493 Set this to non-@code{nil} if your select routine is buggy.
12494
12495 @item nntp-nov-is-evil
12496 @vindex nntp-nov-is-evil
12497 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12498 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12499 can be used.
12500
12501 @item nntp-xover-commands
12502 @vindex nntp-xover-commands
12503 @cindex @acronym{NOV}
12504 @cindex XOVER
12505 List of strings used as commands to fetch @acronym{NOV} lines from a
12506 server.  The default value of this variable is @code{("XOVER"
12507 "XOVERVIEW")}.
12508
12509 @item nntp-nov-gap
12510 @vindex nntp-nov-gap
12511 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12512 the server.  The server responds with one huge list of lines.  However,
12513 if you have read articles 2-5000 in the group, and only want to read
12514 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12515 lines that you will not need.  This variable says how
12516 big a gap between two consecutive articles is allowed to be before the
12517 @code{XOVER} request is split into several request.  Note that if your
12518 network is fast, setting this variable to a really small number means
12519 that fetching will probably be slower.  If this variable is @code{nil},
12520 @code{nntp} will never split requests.  The default is 5.
12521
12522 @item nntp-prepare-server-hook
12523 @vindex nntp-prepare-server-hook
12524 A hook run before attempting to connect to an @acronym{NNTP} server.
12525
12526 @item nntp-warn-about-losing-connection
12527 @vindex nntp-warn-about-losing-connection
12528 If this variable is non-@code{nil}, some noise will be made when a
12529 server closes connection.
12530
12531 @item nntp-record-commands
12532 @vindex nntp-record-commands
12533 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12534 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12535 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12536 that doesn't seem to work.
12537
12538 @item nntp-open-connection-function
12539 @vindex nntp-open-connection-function
12540 It is possible to customize how the connection to the nntp server will
12541 be opened.  If you specify an @code{nntp-open-connection-function}
12542 parameter, Gnus will use that function to establish the connection.
12543 Five pre-made functions are supplied.  These functions can be grouped in
12544 two categories: direct connection functions (three pre-made), and
12545 indirect ones (two pre-made).
12546
12547 @item nntp-prepare-post-hook
12548 @vindex nntp-prepare-post-hook
12549 A hook run just before posting an article.  If there is no
12550 @code{Message-ID} header in the article and the news server provides the
12551 recommended ID, it will be added to the article before running this
12552 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12553 inhibit Gnus to add a @code{Message-ID} header, you could say:
12554
12555 @lisp
12556 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12557 @end lisp
12558
12559 Note that not all servers support the recommended ID.  This works for
12560 INN versions 2.3.0 and later, for instance.
12561
12562 @item nntp-read-timeout
12563 @vindex nntp-read-timeout
12564 How long nntp should wait between checking for the end of output.
12565 Shorter values mean quicker response, but is more CPU intensive.  The
12566 default is 0.1 seconds.  If you have a slow line to the server (and
12567 don't like to see Emacs eat your available CPU power), you might set
12568 this to, say, 1.
12569
12570 @item nntp-list-options
12571 @vindex nntp-list-options
12572 List of newsgroup name used for a option of the LIST command to restrict
12573 the listing output to only the specified newsgroups.  Each newsgroup name
12574 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12575 etc.  Fortunately, if the server can accept such a option, it will
12576 probably make gnus run faster.  You may use it as a server variable as
12577 follows:
12578
12579 @lisp
12580 (setq gnus-select-method
12581       '(nntp "news.somewhere.edu"
12582              (nntp-list-options ("fj.*" "japan.*"))))
12583 @end lisp
12584
12585 @item nntp-options-subscribe
12586 @vindex nntp-options-subscribe
12587 Regexp matching the newsgroup names which will be subscribed
12588 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12589 It may be effective as well as @code{nntp-list-options} even though the
12590 server could not accept a shell-style wildcard as a option of the LIST
12591 command.  You may use it as a server variable as follows:
12592
12593 @lisp
12594 (setq gnus-select-method
12595       '(nntp "news.somewhere.edu"
12596              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12597 @end lisp
12598
12599 @item nntp-options-not-subscribe
12600 @vindex nntp-options-not-subscribe
12601 Regexp matching the newsgroup names which will not be subscribed
12602 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12603 It may be effective as well as @code{nntp-list-options} even though the
12604 server could not accept a shell-style wildcard as a option of the LIST
12605 command.  You may use it as a server variable as follows:
12606
12607 @lisp
12608 (setq gnus-select-method
12609       '(nntp "news.somewhere.edu"
12610              (nntp-options-not-subscribe "\\.binaries\\.")))
12611 @end lisp
12612 @end table
12613
12614 @menu
12615 * Direct Functions::            Connecting directly to the server.
12616 * Indirect Functions::          Connecting indirectly to the server.
12617 * Common Variables::            Understood by several connection functions.
12618 @end menu
12619
12620
12621 @node Direct Functions
12622 @subsubsection Direct Functions
12623 @cindex direct connection functions
12624
12625 These functions are called direct because they open a direct connection
12626 between your machine and the @acronym{NNTP} server.  The behavior of these
12627 functions is also affected by commonly understood variables
12628 (@pxref{Common Variables}).
12629
12630 @table @code
12631 @findex nntp-open-network-stream
12632 @item nntp-open-network-stream
12633 This is the default, and simply connects to some port or other on the
12634 remote system.
12635
12636 @findex nntp-open-tls-stream
12637 @item nntp-open-tls-stream
12638 Opens a connection to a server over a @dfn{secure} channel.  To use
12639 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12640 installed.  You then define a server as follows:
12641
12642 @lisp
12643 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12644 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12645 ;;
12646 (nntp "snews.bar.com"
12647       (nntp-open-connection-function nntp-open-tls-stream)
12648       (nntp-port-number )
12649       (nntp-address "snews.bar.com"))
12650 @end lisp
12651
12652 @findex nntp-open-ssl-stream
12653 @item nntp-open-ssl-stream
12654 Opens a connection to a server over a @dfn{secure} channel.  To use
12655 this you must have @uref{http://www.openssl.org, OpenSSL} or
12656 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12657 then define a server as follows:
12658
12659 @lisp
12660 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12661 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12662 ;;
12663 (nntp "snews.bar.com"
12664       (nntp-open-connection-function nntp-open-ssl-stream)
12665       (nntp-port-number 563)
12666       (nntp-address "snews.bar.com"))
12667 @end lisp
12668
12669 @findex nntp-open-telnet-stream
12670 @item nntp-open-telnet-stream
12671 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12672 it.  You might wonder why this function exists, since we have the
12673 default @code{nntp-open-network-stream} which would do the job.  (One
12674 of) the reason(s) is that if you are behind a firewall but have direct
12675 connections to the outside world thanks to a command wrapper like
12676 @code{runsocks}, you can use it like this:
12677
12678 @lisp
12679 (nntp "socksified"
12680       (nntp-pre-command "runsocks")
12681       (nntp-open-connection-function nntp-open-telnet-stream)
12682       (nntp-address "the.news.server"))
12683 @end lisp
12684
12685 With the default method, you would need to wrap your whole Emacs
12686 session, which is not a good idea.
12687 @end table
12688
12689
12690 @node Indirect Functions
12691 @subsubsection Indirect Functions
12692 @cindex indirect connection functions
12693
12694 These functions are called indirect because they connect to an
12695 intermediate host before actually connecting to the @acronym{NNTP} server.
12696 All of these functions and related variables are also said to belong to
12697 the ``via'' family of connection: they're all prefixed with ``via'' to make
12698 things cleaner.  The behavior of these functions is also affected by
12699 commonly understood variables (@pxref{Common Variables}).
12700
12701 @table @code
12702 @item nntp-open-via-rlogin-and-telnet
12703 @findex nntp-open-via-rlogin-and-telnet
12704 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12705 to the real @acronym{NNTP} server from there.  This is useful for instance if
12706 you need to connect to a firewall machine first.
12707
12708 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12709
12710 @table @code
12711 @item nntp-via-rlogin-command
12712 @vindex nntp-via-rlogin-command
12713 Command used to log in on the intermediate host.  The default is
12714 @samp{rsh}, but @samp{ssh} is a popular alternative.
12715
12716 @item nntp-via-rlogin-command-switches
12717 @vindex nntp-via-rlogin-command-switches
12718 List of strings to be used as the switches to
12719 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12720 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12721 @samp{("-C")} in order to compress all data connections, otherwise set
12722 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12723 the telnet command requires a pseudo-tty allocation on an intermediate
12724 host.
12725 @end table
12726
12727 @item nntp-open-via-telnet-and-telnet
12728 @findex nntp-open-via-telnet-and-telnet
12729 Does essentially the same, but uses @samp{telnet} instead of
12730 @samp{rlogin} to connect to the intermediate host.
12731
12732 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12733
12734 @table @code
12735 @item nntp-via-telnet-command
12736 @vindex nntp-via-telnet-command
12737 Command used to @code{telnet} the intermediate host.  The default is
12738 @samp{telnet}.
12739
12740 @item nntp-via-telnet-switches
12741 @vindex nntp-via-telnet-switches
12742 List of strings to be used as the switches to the
12743 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12744
12745 @item nntp-via-user-password
12746 @vindex nntp-via-user-password
12747 Password to use when logging in on the intermediate host.
12748
12749 @item nntp-via-envuser
12750 @vindex nntp-via-envuser
12751 If non-@code{nil}, the intermediate @code{telnet} session (client and
12752 server both) will support the @code{ENVIRON} option and not prompt for
12753 login name.  This works for Solaris @code{telnet}, for instance.
12754
12755 @item nntp-via-shell-prompt
12756 @vindex nntp-via-shell-prompt
12757 Regexp matching the shell prompt on the intermediate host.  The default
12758 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12759
12760 @end table
12761
12762 @end table
12763
12764
12765 Here are some additional variables that are understood by all the above
12766 functions:
12767
12768 @table @code
12769
12770 @item nntp-via-user-name
12771 @vindex nntp-via-user-name
12772 User name to use when connecting to the intermediate host.
12773
12774 @item nntp-via-address
12775 @vindex nntp-via-address
12776 Address of the intermediate host to connect to.
12777
12778 @end table
12779
12780
12781 @node Common Variables
12782 @subsubsection Common Variables
12783
12784 The following variables affect the behavior of all, or several of the
12785 pre-made connection functions.  When not specified, all functions are
12786 affected.
12787
12788 @table @code
12789
12790 @item nntp-pre-command
12791 @vindex nntp-pre-command
12792 A command wrapper to use when connecting through a non native
12793 connection function (all except @code{nntp-open-network-stream},
12794 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12795 where you would put a @samp{SOCKS} wrapper for instance.
12796
12797 @item nntp-address
12798 @vindex nntp-address
12799 The address of the @acronym{NNTP} server.
12800
12801 @item nntp-port-number
12802 @vindex nntp-port-number
12803 Port number to connect to the @acronym{NNTP} server.  The default is
12804 @samp{nntp}.  If you use @acronym{NNTP} over
12805 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
12806 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12807 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12808 not work with named ports.
12809
12810 @item nntp-end-of-line
12811 @vindex nntp-end-of-line
12812 String to use as end-of-line marker when talking to the @acronym{NNTP}
12813 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12814 using a non native connection function.
12815
12816 @item nntp-telnet-command
12817 @vindex nntp-telnet-command
12818 Command to use when connecting to the @acronym{NNTP} server through
12819 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12820 just for the real @acronym{NNTP} server.  The default is
12821 @samp{telnet}.
12822
12823 @item nntp-telnet-switches
12824 @vindex nntp-telnet-switches
12825 A list of switches to pass to @code{nntp-telnet-command}.  The default
12826 is @samp{("-8")}.
12827
12828 @end table
12829
12830
12831 @node News Spool
12832 @subsection News Spool
12833 @cindex nnspool
12834 @cindex news spool
12835
12836 Subscribing to a foreign group from the local spool is extremely easy,
12837 and might be useful, for instance, to speed up reading groups that
12838 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12839 instance.
12840
12841 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12842 anything else) as the address.
12843
12844 If you have access to a local spool, you should probably use that as the
12845 native select method (@pxref{Finding the News}).  It is normally faster
12846 than using an @code{nntp} select method, but might not be.  It depends.
12847 You just have to try to find out what's best at your site.
12848
12849 @table @code
12850
12851 @item nnspool-inews-program
12852 @vindex nnspool-inews-program
12853 Program used to post an article.
12854
12855 @item nnspool-inews-switches
12856 @vindex nnspool-inews-switches
12857 Parameters given to the inews program when posting an article.
12858
12859 @item nnspool-spool-directory
12860 @vindex nnspool-spool-directory
12861 Where @code{nnspool} looks for the articles.  This is normally
12862 @file{/usr/spool/news/}.
12863
12864 @item nnspool-nov-directory
12865 @vindex nnspool-nov-directory
12866 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12867 @file{/usr/spool/news/over.view/}.
12868
12869 @item nnspool-lib-dir
12870 @vindex nnspool-lib-dir
12871 Where the news lib dir is (@file{/usr/lib/news/} by default).
12872
12873 @item nnspool-active-file
12874 @vindex nnspool-active-file
12875 The name of the active file.
12876
12877 @item nnspool-newsgroups-file
12878 @vindex nnspool-newsgroups-file
12879 The name of the group descriptions file.
12880
12881 @item nnspool-history-file
12882 @vindex nnspool-history-file
12883 The name of the news history file.
12884
12885 @item nnspool-active-times-file
12886 @vindex nnspool-active-times-file
12887 The name of the active date file.
12888
12889 @item nnspool-nov-is-evil
12890 @vindex nnspool-nov-is-evil
12891 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12892 that it finds.
12893
12894 @item nnspool-sift-nov-with-sed
12895 @vindex nnspool-sift-nov-with-sed
12896 @cindex sed
12897 If non-@code{nil}, which is the default, use @code{sed} to get the
12898 relevant portion from the overview file.  If @code{nil},
12899 @code{nnspool} will load the entire file into a buffer and process it
12900 there.
12901
12902 @end table
12903
12904
12905 @node Getting Mail
12906 @section Getting Mail
12907 @cindex reading mail
12908 @cindex mail
12909
12910 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12911 course.
12912
12913 @menu
12914 * Mail in a Newsreader::        Important introductory notes.
12915 * Getting Started Reading Mail::  A simple cookbook example.
12916 * Splitting Mail::              How to create mail groups.
12917 * Mail Sources::                How to tell Gnus where to get mail from.
12918 * Mail Back End Variables::     Variables for customizing mail handling.
12919 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12920 * Group Mail Splitting::        Use group customize to drive mail splitting.
12921 * Incorporating Old Mail::      What about the old mail you have?
12922 * Expiring Mail::               Getting rid of unwanted mail.
12923 * Washing Mail::                Removing cruft from the mail you get.
12924 * Duplicates::                  Dealing with duplicated mail.
12925 * Not Reading Mail::            Using mail back ends for reading other files.
12926 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12927 @end menu
12928
12929
12930 @node Mail in a Newsreader
12931 @subsection Mail in a Newsreader
12932
12933 If you are used to traditional mail readers, but have decided to switch
12934 to reading mail with Gnus, you may find yourself experiencing something
12935 of a culture shock.
12936
12937 Gnus does not behave like traditional mail readers.  If you want to make
12938 it behave that way, you can, but it's an uphill battle.
12939
12940 Gnus, by default, handles all its groups using the same approach.  This
12941 approach is very newsreaderly---you enter a group, see the new/unread
12942 messages, and when you read the messages, they get marked as read, and
12943 you don't see them any more.  (Unless you explicitly ask for them.)
12944
12945 In particular, you do not do anything explicitly to delete messages.
12946
12947 Does this mean that all the messages that have been marked as read are
12948 deleted?  How awful!
12949
12950 But, no, it means that old messages are @dfn{expired} according to some
12951 scheme or other.  For news messages, the expire process is controlled by
12952 the news administrator; for mail, the expire process is controlled by
12953 you.  The expire process for mail is covered in depth in @ref{Expiring
12954 Mail}.
12955
12956 What many Gnus users find, after using it a while for both news and
12957 mail, is that the transport mechanism has very little to do with how
12958 they want to treat a message.
12959
12960 Many people subscribe to several mailing lists.  These are transported
12961 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12962 answering, or even reading these messages very carefully.  We may not
12963 need to save them because if we should need to read one again, they are
12964 archived somewhere else.
12965
12966 Some people have local news groups which have only a handful of readers.
12967 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12968 to read and answer a large fraction of the messages very carefully in
12969 order to do our work.  And there may not be an archive, so we may need
12970 to save the interesting messages the same way we would personal mail.
12971
12972 The important distinction turns out to be not the transport mechanism,
12973 but other factors such as how interested we are in the subject matter,
12974 or how easy it is to retrieve the message if we need to read it again.
12975
12976 Gnus provides many options for sorting mail into ``groups'' which behave
12977 like newsgroups, and for treating each group (whether mail or news)
12978 differently.
12979
12980 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12981 that Gnus should grow up and be a male, er, mail reader.  It is possible
12982 to whip Gnus into a more mailreaderly being, but, as said before, it's
12983 not easy.  People who prefer proper mail readers should try @sc{vm}
12984 instead, which is an excellent, and proper, mail reader.
12985
12986 I don't mean to scare anybody off, but I want to make it clear that you
12987 may be required to learn a new way of thinking about messages.  After
12988 you've been subjected to The Gnus Way, you will come to love it.  I can
12989 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12990 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12991 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12992 You Do.)
12993
12994
12995 @node Getting Started Reading Mail
12996 @subsection Getting Started Reading Mail
12997
12998 It's quite easy to use Gnus to read your new mail.  You just plonk the
12999 mail back end of your choice into @code{gnus-secondary-select-methods},
13000 and things will happen automatically.
13001
13002 For instance, if you want to use @code{nnml} (which is a ``one file per
13003 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13004
13005 @lisp
13006 (setq gnus-secondary-select-methods '((nnml "")))
13007 @end lisp
13008
13009 Now, the next time you start Gnus, this back end will be queried for new
13010 articles, and it will move all the messages in your spool file to its
13011 directory, which is @file{~/Mail/} by default.  The new group that will
13012 be created (@samp{mail.misc}) will be subscribed, and you can read it
13013 like any other group.
13014
13015 You will probably want to split the mail into several groups, though:
13016
13017 @lisp
13018 (setq nnmail-split-methods
13019       '(("junk" "^From:.*Lars Ingebrigtsen")
13020         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13021         ("other" "")))
13022 @end lisp
13023
13024 This will result in three new @code{nnml} mail groups being created:
13025 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13026 mail that doesn't fit into the first two groups will be placed in the
13027 last group.
13028
13029 This should be sufficient for reading mail with Gnus.  You might want to
13030 give the other sections in this part of the manual a perusal, though.
13031 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13032
13033
13034 @node Splitting Mail
13035 @subsection Splitting Mail
13036 @cindex splitting mail
13037 @cindex mail splitting
13038 @cindex mail filtering (splitting)
13039
13040 @vindex nnmail-split-methods
13041 The @code{nnmail-split-methods} variable says how the incoming mail is
13042 to be split into groups.
13043
13044 @lisp
13045 (setq nnmail-split-methods
13046   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13047     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13048     ("mail.other" "")))
13049 @end lisp
13050
13051 This variable is a list of lists, where the first element of each of
13052 these lists is the name of the mail group (they do not have to be called
13053 something beginning with @samp{mail}, by the way), and the second
13054 element is a regular expression used on the header of each mail to
13055 determine if it belongs in this mail group.  The first string may
13056 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13057 insert sub-expressions from the matched text.  For instance:
13058
13059 @lisp
13060 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13061 @end lisp
13062
13063 The second element can also be a function.  In that case, it will be
13064 called narrowed to the headers with the first element of the rule as the
13065 argument.  It should return a non-@code{nil} value if it thinks that the
13066 mail belongs in that group.
13067
13068 The last of these groups should always be a general one, and the regular
13069 expression should @emph{always} be @samp{*} so that it matches any mails
13070 that haven't been matched by any of the other regexps.  (These rules are
13071 processed from the beginning of the alist toward the end.  The first
13072 rule to make a match will ``win'', unless you have crossposting enabled.
13073 In that case, all matching rules will ``win''.)
13074
13075 If you like to tinker with this yourself, you can set this variable to a
13076 function of your choice.  This function will be called without any
13077 arguments in a buffer narrowed to the headers of an incoming mail
13078 message.  The function should return a list of group names that it
13079 thinks should carry this mail message.
13080
13081 Note that the mail back ends are free to maul the poor, innocent,
13082 incoming headers all they want to.  They all add @code{Lines} headers;
13083 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13084 @code{From<SPACE>} line to something else.
13085
13086 @vindex nnmail-crosspost
13087 The mail back ends all support cross-posting.  If several regexps match,
13088 the mail will be ``cross-posted'' to all those groups.
13089 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13090 that no articles are crossposted to the general (@samp{*}) group.
13091
13092 @vindex nnmail-crosspost-link-function
13093 @cindex crosspost
13094 @cindex links
13095 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13096 the crossposted articles.  However, not all file systems support hard
13097 links.  If that's the case for you, set
13098 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13099 variable is @code{add-name-to-file} by default.)
13100
13101 @kindex M-x nnmail-split-history
13102 @findex nnmail-split-history
13103 If you wish to see where the previous mail split put the messages, you
13104 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13105 where re-spooling messages would put the messages, you can use
13106 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13107 Group Commands}).
13108
13109 @vindex nnmail-split-header-length-limit
13110 Header lines longer than the value of
13111 @code{nnmail-split-header-length-limit} are excluded from the split
13112 function.
13113
13114 @vindex nnmail-mail-splitting-charset
13115 @vindex nnmail-mail-splitting-decodes
13116 By default the splitting codes @acronym{MIME} decodes headers so you
13117 can match on non-@acronym{ASCII} strings.  The
13118 @code{nnmail-mail-splitting-charset} variable specifies the default
13119 charset for decoding.  The behaviour can be turned off completely by
13120 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13121 useful if you want to match articles based on the raw header data.
13122
13123 @vindex nnmail-resplit-incoming
13124 By default, splitting is performed on all incoming messages.  If you
13125 specify a @code{directory} entry for the variable @code{mail-sources}
13126 (@pxref{Mail Source Specifiers}), however, then splitting does
13127 @emph{not} happen by default.  You can set the variable
13128 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13129 splitting happen even in this case.  (This variable has no effect on
13130 other kinds of entries.)
13131
13132 Gnus gives you all the opportunity you could possibly want for shooting
13133 yourself in the foot.  Let's say you create a group that will contain
13134 all the mail you get from your boss.  And then you accidentally
13135 unsubscribe from the group.  Gnus will still put all the mail from your
13136 boss in the unsubscribed group, and so, when your boss mails you ``Have
13137 that report ready by Monday or you're fired!'', you'll never see it and,
13138 come Tuesday, you'll still believe that you're gainfully employed while
13139 you really should be out collecting empty bottles to save up for next
13140 month's rent money.
13141
13142
13143 @node Mail Sources
13144 @subsection Mail Sources
13145
13146 Mail can be gotten from many different sources---the mail spool, from
13147 a @acronym{POP} mail server, from a procmail directory, or from a
13148 maildir, for instance.
13149
13150 @menu
13151 * Mail Source Specifiers::      How to specify what a mail source is.
13152 * Mail Source Customization::   Some variables that influence things.
13153 * Fetching Mail::               Using the mail source specifiers.
13154 @end menu
13155
13156
13157 @node Mail Source Specifiers
13158 @subsubsection Mail Source Specifiers
13159 @cindex POP
13160 @cindex mail server
13161 @cindex procmail
13162 @cindex mail spool
13163 @cindex mail source
13164
13165 You tell Gnus how to fetch mail by setting @code{mail-sources}
13166 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13167
13168 Here's an example:
13169
13170 @lisp
13171 (pop :server "pop3.mailserver.com" :user "myname")
13172 @end lisp
13173
13174 As can be observed, a mail source specifier is a list where the first
13175 element is a @dfn{mail source type}, followed by an arbitrary number of
13176 @dfn{keywords}.  Keywords that are not explicitly specified are given
13177 default values.
13178
13179 The following mail source types are available:
13180
13181 @table @code
13182 @item file
13183 Get mail from a single file; typically from the mail spool.
13184
13185 Keywords:
13186
13187 @table @code
13188 @item :path
13189 The file name.  Defaults to the value of the @env{MAIL}
13190 environment variable or the value of @code{rmail-spool-directory}
13191 (usually something like @file{/usr/mail/spool/user-name}).
13192
13193 @item :prescript
13194 @itemx :postscript
13195 Script run before/after fetching mail.
13196 @end table
13197
13198 An example file mail source:
13199
13200 @lisp
13201 (file :path "/usr/spool/mail/user-name")
13202 @end lisp
13203
13204 Or using the default file name:
13205
13206 @lisp
13207 (file)
13208 @end lisp
13209
13210 If the mail spool file is not located on the local machine, it's best
13211 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13212 You can not use ange-ftp file names here---it has no way to lock the
13213 mail spool while moving the mail.
13214
13215 If it's impossible to set up a proper server, you can use ssh instead.
13216
13217 @lisp
13218 (setq mail-sources
13219       '((file :prescript "ssh host bin/getmail >%t")))
13220 @end lisp
13221
13222 The @samp{getmail} script would look something like the following:
13223
13224 @example
13225 #!/bin/sh
13226 #  getmail - move mail from spool to stdout
13227 #  flu@@iki.fi
13228
13229 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13230 TMP=$HOME/Mail/tmp
13231 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13232 @end example
13233
13234 Alter this script to fit find the @samp{movemail} you want to use.
13235
13236
13237 @item directory
13238 @vindex nnmail-scan-directory-mail-source-once
13239 Get mail from several files in a directory.  This is typically used
13240 when you have procmail split the incoming mail into several files.
13241 That is, there is a one-to-one correspondence between files in that
13242 directory and groups, so that mail from the file @file{foo.bar.spool}
13243 will be put in the group @code{foo.bar}.  (You can change the suffix
13244 to be used instead of @code{.spool}.)  Setting
13245 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13246 Gnus to scan the mail source only once.  This is particularly useful
13247 if you want to scan mail groups at a specified level.
13248
13249 @vindex nnmail-resplit-incoming
13250 There is also the variable @code{nnmail-resplit-incoming}, if you set
13251 that to a non-@code{nil} value, then the normal splitting process is
13252 applied to all the files from the directory, @ref{Splitting Mail}.
13253
13254 Keywords:
13255
13256 @table @code
13257 @item :path
13258 The name of the directory where the files are.  There is no default
13259 value.
13260
13261 @item :suffix
13262 Only files ending with this suffix are used.  The default is
13263 @samp{.spool}.
13264
13265 @item :predicate
13266 Only files that have this predicate return non-@code{nil} are returned.
13267 The default is @code{identity}.  This is used as an additional
13268 filter---only files that have the right suffix @emph{and} satisfy this
13269 predicate are considered.
13270
13271 @item :prescript
13272 @itemx :postscript
13273 Script run before/after fetching mail.
13274
13275 @end table
13276
13277 An example directory mail source:
13278
13279 @lisp
13280 (directory :path "/home/user-name/procmail-dir/"
13281            :suffix ".prcml")
13282 @end lisp
13283
13284 @item pop
13285 Get mail from a @acronym{POP} server.
13286
13287 Keywords:
13288
13289 @table @code
13290 @item :server
13291 The name of the @acronym{POP} server.  The default is taken from the
13292 @env{MAILHOST} environment variable.
13293
13294 @item :port
13295 The port number of the @acronym{POP} server.  This can be a number (eg,
13296 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13297 string, it should be a service name as listed in @file{/etc/services} on
13298 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13299 need to specify it as @samp{"pop-3"} instead.
13300
13301 @item :user
13302 The user name to give to the @acronym{POP} server.  The default is the login
13303 name.
13304
13305 @item :password
13306 The password to give to the @acronym{POP} server.  If not specified,
13307 the user is prompted.
13308
13309 @item :program
13310 The program to use to fetch mail from the @acronym{POP} server.  This
13311 should be a @code{format}-like string.  Here's an example:
13312
13313 @example
13314 fetchmail %u@@%s -P %p %t
13315 @end example
13316
13317 The valid format specifier characters are:
13318
13319 @table @samp
13320 @item t
13321 The name of the file the mail is to be moved to.  This must always be
13322 included in this string.
13323
13324 @item s
13325 The name of the server.
13326
13327 @item P
13328 The port number of the server.
13329
13330 @item u
13331 The user name to use.
13332
13333 @item p
13334 The password to use.
13335 @end table
13336
13337 The values used for these specs are taken from the values you give the
13338 corresponding keywords.
13339
13340 @item :prescript
13341 A script to be run before fetching the mail.  The syntax is the same as
13342 the @code{:program} keyword.  This can also be a function to be run.
13343
13344 @item :postscript
13345 A script to be run after fetching the mail.  The syntax is the same as
13346 the @code{:program} keyword.  This can also be a function to be run.
13347
13348 @item :function
13349 The function to use to fetch mail from the @acronym{POP} server.  The
13350 function is called with one parameter---the name of the file where the
13351 mail should be moved to.
13352
13353 @item :authentication
13354 This can be either the symbol @code{password} or the symbol @code{apop}
13355 and says what authentication scheme to use.  The default is
13356 @code{password}.
13357
13358 @item :connection
13359 What stream to use for connecting to the server, this can be the symbol
13360 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
13361 and use insecure connections.  Note that for SSL/TLS, you need external
13362 programs and libraries:
13363
13364 @itemize @bullet
13365 @item
13366 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
13367 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
13368 library @samp{ssl.el}.
13369 @item
13370 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
13371 Requires the external library @samp{starttls.el} and program
13372 @samp{starttls}.
13373 @end itemize
13374
13375 @item :leave
13376 Non-@code{nil} if mail is to be left on the server and UIDL used for
13377 message retrieval.  The default is @code{nil}.
13378
13379 @end table
13380
13381 If the @code{:program} and @code{:function} keywords aren't specified,
13382 @code{pop3-movemail} will be used.
13383
13384 Here are some examples.  Fetch from the default @acronym{POP} server,
13385 using the default user name, and default fetcher:
13386
13387 @lisp
13388 (pop)
13389 @end lisp
13390
13391 Fetch from a named server with a named user and password:
13392
13393 @lisp
13394 (pop :server "my.pop.server"
13395      :user "user-name" :password "secret")
13396 @end lisp
13397
13398 Use @samp{movemail} to move the mail:
13399
13400 @lisp
13401 (pop :program "movemail po:%u %t %p")
13402 @end lisp
13403
13404 @item maildir
13405 Get mail from a maildir.  This is a type of mailbox that is supported by
13406 at least qmail and postfix, where each file in a special directory
13407 contains exactly one mail.
13408
13409 Keywords:
13410
13411 @table @code
13412 @item :path
13413 The name of the directory where the mails are stored.  The default is
13414 taken from the @env{MAILDIR} environment variable or
13415 @file{~/Maildir/}.
13416 @item :subdirs
13417 The subdirectories of the Maildir.  The default is
13418 @samp{("new" "cur")}.
13419
13420 @c If you sometimes look at your mail through a pop3 daemon before fetching
13421 @c them with Gnus, you may also have to fetch your mails from the
13422 @c @code{cur} directory inside the maildir, like in the first example
13423 @c below.
13424
13425 You can also get mails from remote hosts (because maildirs don't suffer
13426 from locking problems).
13427
13428 @end table
13429
13430 Two example maildir mail sources:
13431
13432 @lisp
13433 (maildir :path "/home/user-name/Maildir/"
13434          :subdirs ("cur" "new"))
13435 @end lisp
13436
13437 @lisp
13438 (maildir :path "/user@@remotehost.org:~/Maildir/"
13439          :subdirs ("new"))
13440 @end lisp
13441
13442 @item imap
13443 Get mail from a @acronym{IMAP} server.  If you don't want to use
13444 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13445 with nnimap), for some reason or other, Gnus let you treat it similar
13446 to a @acronym{POP} server and fetches articles from a given
13447 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13448
13449 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13450 may need external programs and libraries, @xref{IMAP}.
13451
13452 Keywords:
13453
13454 @table @code
13455 @item :server
13456 The name of the @acronym{IMAP} server.  The default is taken from the
13457 @env{MAILHOST} environment variable.
13458
13459 @item :port
13460 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13461 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13462
13463 @item :user
13464 The user name to give to the @acronym{IMAP} server.  The default is the login
13465 name.
13466
13467 @item :password
13468 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13469 prompted.
13470
13471 @item :stream
13472 What stream to use for connecting to the server, this is one of the
13473 symbols in @code{imap-stream-alist}.  Right now, this means
13474 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13475 @samp{ssl}, @samp{shell} or the default @samp{network}.
13476
13477 @item :authentication
13478 Which authenticator to use for authenticating to the server, this is
13479 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13480 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13481 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13482
13483 @item :program
13484 When using the `shell' :stream, the contents of this variable is
13485 mapped into the @code{imap-shell-program} variable.  This should be a
13486 @code{format}-like string (or list of strings).  Here's an example:
13487
13488 @example
13489 ssh %s imapd
13490 @end example
13491
13492 The valid format specifier characters are:
13493
13494 @table @samp
13495 @item s
13496 The name of the server.
13497
13498 @item l
13499 User name from @code{imap-default-user}.
13500
13501 @item p
13502 The port number of the server.
13503 @end table
13504
13505 The values used for these specs are taken from the values you give the
13506 corresponding keywords.
13507
13508 @item :mailbox
13509 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13510 which normally is the mailbox which receive incoming mail.
13511
13512 @item :predicate
13513 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13514 UNDELETED}, is probably the best choice for most people, but if you
13515 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13516 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13517 Then all articles in the mailbox is fetched, no matter what.  For a
13518 complete list of predicates, see RFC 2060 section 6.4.4.
13519
13520 @item :fetchflag
13521 How to flag fetched articles on the server, the default @samp{\Deleted}
13522 will mark them as deleted, an alternative would be @samp{\Seen} which
13523 would simply mark them as read.  These are the two most likely choices,
13524 but more flags are defined in RFC 2060 section 2.3.2.
13525
13526 @item :dontexpunge
13527 If non-@code{nil}, don't remove all articles marked as deleted in the
13528 mailbox after finishing the fetch.
13529
13530 @end table
13531
13532 An example @acronym{IMAP} mail source:
13533
13534 @lisp
13535 (imap :server "mail.mycorp.com"
13536       :stream kerberos4
13537       :fetchflag "\\Seen")
13538 @end lisp
13539
13540 @item webmail
13541 Get mail from a webmail server, such as @uref{www.hotmail.com},
13542 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13543 @uref{mail.yahoo.com}.
13544
13545 NOTE: Webmail largely depends cookies.  A "one-line-cookie" patch is
13546 required for url "4.0pre.46".
13547
13548 WARNING: Mails may be lost.  NO WARRANTY.
13549
13550 Keywords:
13551
13552 @table @code
13553 @item :subtype
13554 The type of the webmail server.  The default is @code{hotmail}.  The
13555 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13556
13557 @item :user
13558 The user name to give to the webmail server.  The default is the login
13559 name.
13560
13561 @item :password
13562 The password to give to the webmail server.  If not specified, the user is
13563 prompted.
13564
13565 @item :dontexpunge
13566 If non-@code{nil}, only fetch unread articles and don't move them to
13567 trash folder after finishing the fetch.
13568
13569 @end table
13570
13571 An example webmail source:
13572
13573 @lisp
13574 (webmail :subtype 'hotmail
13575          :user "user-name"
13576          :password "secret")
13577 @end lisp
13578 @end table
13579
13580 @table @dfn
13581 @item Common Keywords
13582 Common keywords can be used in any type of mail source.
13583
13584 Keywords:
13585
13586 @table @code
13587 @item :plugged
13588 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13589 use directory source to get mail, you can specify it as in this
13590 example:
13591
13592 @lisp
13593 (setq mail-sources
13594       '((directory :path "/home/pavel/.Spool/"
13595                    :suffix ""
13596                    :plugged t)))
13597 @end lisp
13598
13599 Gnus will then fetch your mail even when you are unplugged.  This is
13600 useful when you use local mail and news.
13601
13602 @end table
13603 @end table
13604
13605 @subsubsection Function Interface
13606
13607 Some of the above keywords specify a Lisp function to be executed.
13608 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13609 the value of the keyword while the function is executing.  For example,
13610 consider the following mail-source setting:
13611
13612 @lisp
13613 (setq mail-sources '((pop :user "jrl"
13614                           :server "pophost" :function fetchfunc)))
13615 @end lisp
13616
13617 While the function @code{fetchfunc} is executing, the symbol @code{user}
13618 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13619 @code{"pophost"}.  The symbols @code{port}, @code{password},
13620 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13621 and @code{authentication} are also bound (to their default values).
13622
13623 See above for a list of keywords for each type of mail source.
13624
13625
13626 @node Mail Source Customization
13627 @subsubsection Mail Source Customization
13628
13629 The following is a list of variables that influence how the mail is
13630 fetched.  You would normally not need to set or change any of these
13631 variables.
13632
13633 @table @code
13634 @item mail-source-crash-box
13635 @vindex mail-source-crash-box
13636 File where mail will be stored while processing it.  The default is@*
13637 @file{~/.emacs-mail-crash-box}.
13638
13639 @item mail-source-delete-incoming
13640 @vindex mail-source-delete-incoming
13641 If non-@code{nil}, delete incoming files after handling them.  If
13642 @code{t}, delete the files immediately, if @code{nil}, never delete any
13643 files.  If a positive number, delete files older than number of days
13644 (This will only happen, when receiving new mail).  You may also set
13645 @code{mail-source-delete-incoming} to @code{nil} and call
13646 @code{mail-source-delete-old-incoming} from a hook or interactively.
13647
13648 @item mail-source-delete-old-incoming-confirm
13649 @vindex mail-source-delete-old-incoming-confirm
13650 If non-@code{nil}, ask for for confirmation before deleting old incoming
13651 files.  This variable only applies when
13652 @code{mail-source-delete-incoming} is a positive number.
13653
13654 @item mail-source-ignore-errors
13655 @vindex mail-source-ignore-errors
13656 If non-@code{nil}, ignore errors when reading mail from a mail source.
13657
13658 @item mail-source-directory
13659 @vindex mail-source-directory
13660 Directory where files (if any) will be stored.  The default is
13661 @file{~/Mail/}.  At present, the only thing this is used for is to say
13662 where the incoming files will be stored if the previous variable is
13663 @code{nil}.
13664
13665 @item mail-source-incoming-file-prefix
13666 @vindex mail-source-incoming-file-prefix
13667 Prefix for file name for storing incoming mail.  The default is
13668 @file{Incoming}, in which case files will end up with names like
13669 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13670 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13671
13672 @item mail-source-default-file-modes
13673 @vindex mail-source-default-file-modes
13674 All new mail files will get this file mode.  The default is 384.
13675
13676 @item mail-source-movemail-program
13677 @vindex mail-source-movemail-program
13678 If non-@code{nil}, name of program for fetching new mail.  If
13679 @code{nil}, @code{movemail} in @var{exec-directory}.
13680
13681 @end table
13682
13683
13684 @node Fetching Mail
13685 @subsubsection Fetching Mail
13686
13687 @vindex mail-sources
13688 @vindex nnmail-spool-file
13689 The way to actually tell Gnus where to get new mail from is to set
13690 @code{mail-sources} to a list of mail source specifiers
13691 (@pxref{Mail Source Specifiers}).
13692
13693 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13694 @code{nil}, the mail back ends will never attempt to fetch mail by
13695 themselves.
13696
13697 If you want to fetch mail both from your local spool as well as a
13698 @acronym{POP} mail server, you'd say something like:
13699
13700 @lisp
13701 (setq mail-sources
13702       '((file)
13703         (pop :server "pop3.mail.server"
13704              :password "secret")))
13705 @end lisp
13706
13707 Or, if you don't want to use any of the keyword defaults:
13708
13709 @lisp
13710 (setq mail-sources
13711       '((file :path "/var/spool/mail/user-name")
13712         (pop :server "pop3.mail.server"
13713              :user "user-name"
13714              :port "pop3"
13715              :password "secret")))
13716 @end lisp
13717
13718
13719 When you use a mail back end, Gnus will slurp all your mail from your
13720 inbox and plonk it down in your home directory.  Gnus doesn't move any
13721 mail if you're not using a mail back end---you have to do a lot of magic
13722 invocations first.  At the time when you have finished drawing the
13723 pentagram, lightened the candles, and sacrificed the goat, you really
13724 shouldn't be too surprised when Gnus moves your mail.
13725
13726
13727
13728 @node Mail Back End Variables
13729 @subsection Mail Back End Variables
13730
13731 These variables are (for the most part) pertinent to all the various
13732 mail back ends.
13733
13734 @table @code
13735 @vindex nnmail-read-incoming-hook
13736 @item nnmail-read-incoming-hook
13737 The mail back ends all call this hook after reading new mail.  You can
13738 use this hook to notify any mail watch programs, if you want to.
13739
13740 @vindex nnmail-split-hook
13741 @item nnmail-split-hook
13742 @findex gnus-article-decode-encoded-words
13743 @cindex RFC 1522 decoding
13744 @cindex RFC 2047 decoding
13745 Hook run in the buffer where the mail headers of each message is kept
13746 just before the splitting based on these headers is done.  The hook is
13747 free to modify the buffer contents in any way it sees fit---the buffer
13748 is discarded after the splitting has been done, and no changes performed
13749 in the buffer will show up in any files.
13750 @code{gnus-article-decode-encoded-words} is one likely function to add
13751 to this hook.
13752
13753 @vindex nnmail-pre-get-new-mail-hook
13754 @vindex nnmail-post-get-new-mail-hook
13755 @item nnmail-pre-get-new-mail-hook
13756 @itemx nnmail-post-get-new-mail-hook
13757 These are two useful hooks executed when treating new incoming
13758 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13759 starting to handle the new mail) and
13760 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13761 is done).  Here's and example of using these two hooks to change the
13762 default file modes the new mail files get:
13763
13764 @lisp
13765 (add-hook 'nnmail-pre-get-new-mail-hook
13766           (lambda () (set-default-file-modes 511)))
13767
13768 (add-hook 'nnmail-post-get-new-mail-hook
13769           (lambda () (set-default-file-modes 551)))
13770 @end lisp
13771
13772 @item nnmail-use-long-file-names
13773 @vindex nnmail-use-long-file-names
13774 If non-@code{nil}, the mail back ends will use long file and directory
13775 names.  Groups like @samp{mail.misc} will end up in directories
13776 (assuming use of @code{nnml} back end) or files (assuming use of
13777 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13778 the same group will end up in @file{mail/misc}.
13779
13780 @item nnmail-delete-file-function
13781 @vindex nnmail-delete-file-function
13782 @findex delete-file
13783 Function called to delete files.  It is @code{delete-file} by default.
13784
13785 @item nnmail-cache-accepted-message-ids
13786 @vindex nnmail-cache-accepted-message-ids
13787 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13788 the back end (via @code{Gcc}, for instance) into the mail duplication
13789 discovery cache.  The default is @code{nil}.
13790
13791 @item nnmail-cache-ignore-groups
13792 @vindex nnmail-cache-ignore-groups
13793 This can be a regular expression or a list of regular expressions.
13794 Group names that match any of the regular expressions will never be
13795 recorded in the @code{Message-ID} cache.
13796
13797 This can be useful, for example, when using Fancy Splitting
13798 (@pxref{Fancy Mail Splitting}) together with the function
13799 @code{nnmail-split-fancy-with-parent}.
13800
13801 @end table
13802
13803
13804 @node Fancy Mail Splitting
13805 @subsection Fancy Mail Splitting
13806 @cindex mail splitting
13807 @cindex fancy mail splitting
13808
13809 @vindex nnmail-split-fancy
13810 @findex nnmail-split-fancy
13811 If the rather simple, standard method for specifying how to split mail
13812 doesn't allow you to do what you want, you can set
13813 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13814 play with the @code{nnmail-split-fancy} variable.
13815
13816 Let's look at an example value of this variable first:
13817
13818 @lisp
13819 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13820 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13821 ;; @r{from real errors.}
13822 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13823                    "mail.misc"))
13824    ;; @r{Non-error messages are crossposted to all relevant}
13825    ;; @r{groups, but we don't crosspost between the group for the}
13826    ;; @r{(ding) list and the group for other (ding) related mail.}
13827    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13828          ("subject" "ding" "ding.misc"))
13829       ;; @r{Other mailing lists@dots{}}
13830       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13831       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13832       ;; @r{Both lists below have the same suffix, so prevent}
13833       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13834       ;; @r{the bugs- list, but allow cross-posting when the}
13835       ;; @r{message was really cross-posted.}
13836       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13837       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13838       ;; @r{People@dots{}}
13839       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13840    ;; @r{Unmatched mail goes to the catch all group.}
13841    "misc.misc")
13842 @end lisp
13843
13844 This variable has the format of a @dfn{split}.  A split is a (possibly)
13845 recursive structure where each split may contain other splits.  Here are
13846 the five possible split syntaxes:
13847
13848 @enumerate
13849
13850 @item
13851 @samp{group}: If the split is a string, that will be taken as a group
13852 name.  Normal regexp match expansion will be done.  See below for
13853 examples.
13854
13855 @item
13856 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13857 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13858 first element of which is a string, then store the message as
13859 specified by @var{split}, if header @var{field} (a regexp) contains
13860 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13861 matches some string after @var{field} and before the end of the
13862 matched @var{value}, the @var{split} is ignored.  If none of the
13863 @var{restrict} clauses match, @var{split} is processed.
13864
13865 @item
13866 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13867 element is @code{|} (vertical bar), then process each @var{split} until
13868 one of them matches.  A @var{split} is said to match if it will cause
13869 the mail message to be stored in one or more groups.
13870
13871 @item
13872 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13873 element is @code{&}, then process all @var{split}s in the list.
13874
13875 @item
13876 @code{junk}: If the split is the symbol @code{junk}, then don't save
13877 (i.e., delete) this message.  Use with extreme caution.
13878
13879 @item
13880 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13881 a list, and the first element is @code{:}, then the second element will
13882 be called as a function with @var{args} given as arguments.  The
13883 function should return a @var{split}.
13884
13885 @cindex body split
13886 For instance, the following function could be used to split based on the
13887 body of the messages:
13888
13889 @lisp
13890 (defun split-on-body ()
13891   (save-excursion
13892     (set-buffer " *nnmail incoming*")
13893     (goto-char (point-min))
13894     (when (re-search-forward "Some.*string" nil t)
13895       "string.group")))
13896 @end lisp
13897
13898 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13899 when the @code{:} function is run.
13900
13901 @item
13902 @code{(! @var{func} @var{split})}: If the split is a list, and the
13903 first element is @code{!}, then @var{split} will be processed, and
13904 @var{func} will be called as a function with the result of @var{split}
13905 as argument.  @var{func} should return a split.
13906
13907 @item
13908 @code{nil}: If the split is @code{nil}, it is ignored.
13909
13910 @end enumerate
13911
13912 In these splits, @var{field} must match a complete field name.
13913 @var{value} must match a complete word according to the fundamental mode
13914 syntax table.  You can use @code{.*} in the regexps to match partial
13915 field names or words.  In other words, all @var{value}'s are wrapped in
13916 @samp{\<} and @samp{\>} pairs.
13917
13918 @vindex nnmail-split-abbrev-alist
13919 @var{field} and @var{value} can also be Lisp symbols, in that case
13920 they are expanded as specified by the variable
13921 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
13922 where the @code{car} of a cell contains the key, and the @code{cdr}
13923 contains the associated value.  Predefined entries in
13924 @code{nnmail-split-abbrev-alist} include:
13925
13926 @table @code
13927 @item from
13928 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
13929 @item to
13930 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
13931 @samp{Resent-To} and @samp{Resent-Cc} fields.
13932 @item any
13933 Is the union of the @code{from} and @code{to} entries.
13934 @end table
13935
13936 @vindex nnmail-split-fancy-syntax-table
13937 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13938 when all this splitting is performed.
13939
13940 If you want to have Gnus create groups dynamically based on some
13941 information in the headers (i.e., do @code{replace-match}-like
13942 substitutions in the group names), you can say things like:
13943
13944 @example
13945 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13946 @end example
13947
13948 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13949 will be filed in @samp{mail.debian.foo}.
13950
13951 If the string contains the element @samp{\&}, then the previously
13952 matched string will be substituted.  Similarly, the elements @samp{\\1}
13953 up to @samp{\\9} will be substituted with the text matched by the
13954 groupings 1 through 9.
13955
13956 @findex nnmail-split-fancy-with-parent
13957 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13958 split followups into the same groups their parents are in.  Sometimes
13959 you can't make splitting rules for all your mail.  For example, your
13960 boss might send you personal mail regarding different projects you are
13961 working on, and as you can't tell your boss to put a distinguishing
13962 string into the subject line, you have to resort to manually moving the
13963 messages into the right group.  With this function, you only have to do
13964 it once per thread.
13965
13966 To use this feature, you have to set @code{nnmail-treat-duplicates}
13967 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13968 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13969 using the colon feature, like so:
13970 @lisp
13971 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13972       nnmail-cache-accepted-message-ids t
13973       nnmail-split-fancy
13974       '(| (: nnmail-split-fancy-with-parent)
13975           ;; @r{other splits go here}
13976         ))
13977 @end lisp
13978
13979 This feature works as follows: when @code{nnmail-treat-duplicates} is
13980 non-@code{nil}, Gnus records the message id of every message it sees
13981 in the file specified by the variable
13982 @code{nnmail-message-id-cache-file}, together with the group it is in
13983 (the group is omitted for non-mail messages).  When mail splitting is
13984 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13985 at the References (and In-Reply-To) header of each message to split
13986 and searches the file specified by @code{nnmail-message-id-cache-file}
13987 for the message ids.  When it has found a parent, it returns the
13988 corresponding group name unless the group name matches the regexp
13989 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13990 recommended that you set @code{nnmail-message-id-cache-length} to a
13991 somewhat higher number than the default so that the message ids are
13992 still in the cache.  (A value of 5000 appears to create a file some
13993 300 kBytes in size.)
13994 @vindex nnmail-cache-accepted-message-ids
13995 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13996 also records the message ids of moved articles, so that the followup
13997 messages goes into the new group.
13998
13999 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
14000 want certain groups to be recorded in the cache.  For example, if all
14001 outgoing messages are written to an ``outgoing'' group, you could set
14002 @code{nnmail-cache-ignore-groups} to match that group name.
14003 Otherwise, answers to all your messages would end up in the
14004 ``outgoing'' group.
14005
14006
14007 @node Group Mail Splitting
14008 @subsection Group Mail Splitting
14009 @cindex mail splitting
14010 @cindex group mail splitting
14011
14012 @findex gnus-group-split
14013 If you subscribe to dozens of mailing lists but you don't want to
14014 maintain mail splitting rules manually, group mail splitting is for you.
14015 You just have to set @var{to-list} and/or @var{to-address} in group
14016 parameters or group customization and set @code{nnmail-split-methods} to
14017 @code{gnus-group-split}.  This splitting function will scan all groups
14018 for those parameters and split mail accordingly, i.e., messages posted
14019 from or to the addresses specified in the parameters @var{to-list} or
14020 @var{to-address} of a mail group will be stored in that group.
14021
14022 Sometimes, mailing lists have multiple addresses, and you may want mail
14023 splitting to recognize them all: just set the @var{extra-aliases} group
14024 parameter to the list of additional addresses and it's done.  If you'd
14025 rather use a regular expression, set @var{split-regexp}.
14026
14027 All these parameters in a group will be used to create an
14028 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14029 the @var{value} is a single regular expression that matches
14030 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
14031 matches of @var{split-regexp}, and the @var{split} is the name of the
14032 group.  @var{restrict}s are also supported: just set the
14033 @var{split-exclude} parameter to a list of regular expressions.
14034
14035 If you can't get the right split to be generated using all these
14036 parameters, or you just need something fancier, you can set the
14037 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
14038 this case, all other aforementioned parameters will be ignored by
14039 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
14040 @code{nil}, in which case the group will be ignored by
14041 @code{gnus-group-split}.
14042
14043 @vindex gnus-group-split-default-catch-all-group
14044 @code{gnus-group-split} will do cross-posting on all groups that match,
14045 by defining a single @code{&} fancy split containing one split for each
14046 group.  If a message doesn't match any split, it will be stored in the
14047 group named in @code{gnus-group-split-default-catch-all-group}, unless
14048 some group has @var{split-spec} set to @code{catch-all}, in which case
14049 that group is used as the catch-all group.  Even though this variable is
14050 often used just to name a group, it may also be set to an arbitrarily
14051 complex fancy split (after all, a group name is a fancy split), and this
14052 may be useful to split mail that doesn't go to any mailing list to
14053 personal mail folders.  Note that this fancy split is added as the last
14054 element of a @code{|} split list that also contains a @code{&} split
14055 with the rules extracted from group parameters.
14056
14057 It's time for an example.  Assume the following group parameters have
14058 been defined:
14059
14060 @example
14061 nnml:mail.bar:
14062 ((to-address . "bar@@femail.com")
14063  (split-regexp . ".*@@femail\\.com"))
14064 nnml:mail.foo:
14065 ((to-list . "foo@@nowhere.gov")
14066  (extra-aliases "foo@@localhost" "foo-redist@@home")
14067  (split-exclude "bugs-foo" "rambling-foo")
14068  (admin-address . "foo-request@@nowhere.gov"))
14069 nnml:mail.others:
14070 ((split-spec . catch-all))
14071 @end example
14072
14073 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14074 behave as if @code{nnmail-split-fancy} had been selected and variable
14075 @code{nnmail-split-fancy} had been set as follows:
14076
14077 @lisp
14078 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14079       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14080            - "bugs-foo" - "rambling-foo" "mail.foo"))
14081    "mail.others")
14082 @end lisp
14083
14084 @findex gnus-group-split-fancy
14085 If you'd rather not use group splitting for all your mail groups, you
14086 may use it for only some of them, by using @code{nnmail-split-fancy}
14087 splits like this:
14088
14089 @lisp
14090 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14091 @end lisp
14092
14093 @var{groups} may be a regular expression or a list of group names whose
14094 parameters will be scanned to generate the output split.
14095 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14096 single @code{|} split will be output.  @var{catch-all} is the fall back
14097 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14098 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14099 empty string in any selected group, no catch-all split will be issued.
14100 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14101 this group will override the value of the @var{catch-all} argument.
14102
14103 @findex gnus-group-split-setup
14104 Unfortunately, scanning all groups and their parameters can be quite
14105 slow, especially considering that it has to be done for every message.
14106 But don't despair!  The function @code{gnus-group-split-setup} can be
14107 used to enable @code{gnus-group-split} in a much more efficient way.  It
14108 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14109 @code{nnmail-split-fancy} to the split produced by
14110 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14111 scanned once, no matter how many messages are split.
14112
14113 @findex gnus-group-split-update
14114 However, if you change group parameters, you'd have to update
14115 @code{nnmail-split-fancy} manually.  You can do it by running
14116 @code{gnus-group-split-update}.  If you'd rather have it updated
14117 automatically, just tell @code{gnus-group-split-setup} to do it for
14118 you.  For example, add to your @file{~/.gnus.el}:
14119
14120 @lisp
14121 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14122 @end lisp
14123
14124 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14125 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14126 have to worry about updating @code{nnmail-split-fancy} again.  If you
14127 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14128 @code{gnus-group-split-default-catch-all-group} will be set to its
14129 value.
14130
14131 @vindex gnus-group-split-updated-hook
14132 Because you may want to change @code{nnmail-split-fancy} after it is set
14133 by @code{gnus-group-split-update}, this function will run
14134 @code{gnus-group-split-updated-hook} just before finishing.
14135
14136 @node Incorporating Old Mail
14137 @subsection Incorporating Old Mail
14138 @cindex incorporating old mail
14139 @cindex import old mail
14140
14141 Most people have lots of old mail stored in various file formats.  If
14142 you have set up Gnus to read mail using one of the spiffy Gnus mail
14143 back ends, you'll probably wish to have that old mail incorporated into
14144 your mail groups.
14145
14146 Doing so can be quite easy.
14147
14148 To take an example: You're reading mail using @code{nnml}
14149 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14150 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14151 file filled with important, but old, mail.  You want to move it into
14152 your @code{nnml} groups.
14153
14154 Here's how:
14155
14156 @enumerate
14157 @item
14158 Go to the group buffer.
14159
14160 @item
14161 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14162 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14163
14164 @item
14165 Type @kbd{SPACE} to enter the newly created group.
14166
14167 @item
14168 Type @kbd{M P b} to process-mark all articles in this group's buffer
14169 (@pxref{Setting Process Marks}).
14170
14171 @item
14172 Type @kbd{B r} to respool all the process-marked articles, and answer
14173 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14174 @end enumerate
14175
14176 All the mail messages in the mbox file will now also be spread out over
14177 all your @code{nnml} groups.  Try entering them and check whether things
14178 have gone without a glitch.  If things look ok, you may consider
14179 deleting the mbox file, but I wouldn't do that unless I was absolutely
14180 sure that all the mail has ended up where it should be.
14181
14182 Respooling is also a handy thing to do if you're switching from one mail
14183 back end to another.  Just respool all the mail in the old mail groups
14184 using the new mail back end.
14185
14186
14187 @node Expiring Mail
14188 @subsection Expiring Mail
14189 @cindex article expiry
14190
14191 Traditional mail readers have a tendency to remove mail articles when
14192 you mark them as read, in some way.  Gnus takes a fundamentally
14193 different approach to mail reading.
14194
14195 Gnus basically considers mail just to be news that has been received in
14196 a rather peculiar manner.  It does not think that it has the power to
14197 actually change the mail, or delete any mail messages.  If you enter a
14198 mail group, and mark articles as ``read'', or kill them in some other
14199 fashion, the mail articles will still exist on the system.  I repeat:
14200 Gnus will not delete your old, read mail.  Unless you ask it to, of
14201 course.
14202
14203 To make Gnus get rid of your unwanted mail, you have to mark the
14204 articles as @dfn{expirable}.  (With the default key bindings, this means
14205 that you have to type @kbd{E}.)  This does not mean that the articles
14206 will disappear right away, however.  In general, a mail article will be
14207 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14208 more than one week old.  If you do not mark an article as expirable, it
14209 will remain on your system until hell freezes over.  This bears
14210 repeating one more time, with some spurious capitalizations: IF you do
14211 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14212
14213 You do not have to mark articles as expirable by hand.  Gnus provides
14214 two features, called ``auto-expire'' and ``total-expire'', that can help you
14215 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14216 for you when you select an article.  And ``total-expire'' means that Gnus
14217 considers all articles as expirable that are read.  So, in addition to
14218 the articles marked @samp{E}, also the articles marked @samp{r},
14219 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14220 expirable.
14221
14222 When should either auto-expire or total-expire be used?  Most people
14223 who are subscribed to mailing lists split each list into its own group
14224 and then turn on auto-expire or total-expire for those groups.
14225 (@xref{Splitting Mail}, for more information on splitting each list
14226 into its own group.)
14227
14228 Which one is better, auto-expire or total-expire?  It's not easy to
14229 answer.  Generally speaking, auto-expire is probably faster.  Another
14230 advantage of auto-expire is that you get more marks to work with: for
14231 the articles that are supposed to stick around, you can still choose
14232 between tick and dormant and read marks.  But with total-expire, you
14233 only have dormant and ticked to choose from.  The advantage of
14234 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14235 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14236 scoring.
14237
14238 @vindex gnus-auto-expirable-newsgroups
14239 Groups that match the regular expression
14240 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14241 read marked as expirable automatically.  All articles marked as
14242 expirable have an @samp{E} in the first column in the summary buffer.
14243
14244 By default, if you have auto expiry switched on, Gnus will mark all the
14245 articles you read as expirable, no matter if they were read or unread
14246 before.  To avoid having articles marked as read marked as expirable
14247 automatically, you can put something like the following in your
14248 @file{~/.gnus.el} file:
14249
14250 @vindex gnus-mark-article-hook
14251 @lisp
14252 (remove-hook 'gnus-mark-article-hook
14253              'gnus-summary-mark-read-and-unread-as-read)
14254 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14255 @end lisp
14256
14257 Note that making a group auto-expirable doesn't mean that all read
14258 articles are expired---only the articles marked as expirable
14259 will be expired.  Also note that using the @kbd{d} command won't make
14260 articles expirable---only semi-automatic marking of articles as read will
14261 mark the articles as expirable in auto-expirable groups.
14262
14263 Let's say you subscribe to a couple of mailing lists, and you want the
14264 articles you have read to disappear after a while:
14265
14266 @lisp
14267 (setq gnus-auto-expirable-newsgroups
14268       "mail.nonsense-list\\|mail.nice-list")
14269 @end lisp
14270
14271 Another way to have auto-expiry happen is to have the element
14272 @code{auto-expire} in the group parameters of the group.
14273
14274 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14275 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14276 don't really mix very well.
14277
14278 @vindex nnmail-expiry-wait
14279 The @code{nnmail-expiry-wait} variable supplies the default time an
14280 expirable article has to live.  Gnus starts counting days from when the
14281 message @emph{arrived}, not from when it was sent.  The default is seven
14282 days.
14283
14284 Gnus also supplies a function that lets you fine-tune how long articles
14285 are to live, based on what group they are in.  Let's say you want to
14286 have one month expiry period in the @samp{mail.private} group, a one day
14287 expiry period in the @samp{mail.junk} group, and a six day expiry period
14288 everywhere else:
14289
14290 @vindex nnmail-expiry-wait-function
14291 @lisp
14292 (setq nnmail-expiry-wait-function
14293       (lambda (group)
14294        (cond ((string= group "mail.private")
14295                31)
14296              ((string= group "mail.junk")
14297                1)
14298              ((string= group "important")
14299                'never)
14300              (t
14301                6))))
14302 @end lisp
14303
14304 The group names this function is fed are ``unadorned'' group
14305 names---no @samp{nnml:} prefixes and the like.
14306
14307 The @code{nnmail-expiry-wait} variable and
14308 @code{nnmail-expiry-wait-function} function can either be a number (not
14309 necessarily an integer) or one of the symbols @code{immediate} or
14310 @code{never}.
14311
14312 You can also use the @code{expiry-wait} group parameter to selectively
14313 change the expiry period (@pxref{Group Parameters}).
14314
14315 @vindex nnmail-expiry-target
14316 The normal action taken when expiring articles is to delete them.
14317 However, in some circumstances it might make more sense to move them
14318 to other groups instead of deleting them.  The variable
14319 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14320 parameter) controls this.  The variable supplies a default value for
14321 all groups, which can be overridden for specific groups by the group
14322 parameter.  default value is @code{delete}, but this can also be a
14323 string (which should be the name of the group the message should be
14324 moved to), or a function (which will be called in a buffer narrowed to
14325 the message in question, and with the name of the group being moved
14326 from as its parameter) which should return a target---either a group
14327 name or @code{delete}.
14328
14329 Here's an example for specifying a group name:
14330 @lisp
14331 (setq nnmail-expiry-target "nnml:expired")
14332 @end lisp
14333
14334 @findex nnmail-fancy-expiry-target
14335 @vindex nnmail-fancy-expiry-targets
14336 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14337 expire mail to groups according to the variable
14338 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14339
14340 @lisp
14341  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14342        nnmail-fancy-expiry-targets
14343        '((to-from "boss" "nnfolder:Work")
14344          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14345          ("from" ".*" "nnfolder:Archive-%Y")))
14346 @end lisp
14347
14348 With this setup, any mail that has @code{IMPORTANT} in its Subject
14349 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14350 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14351 From or To header contains the string @code{boss}, it will get expired
14352 to @code{nnfolder:Work}.  All other mail will get expired to
14353 @code{nnfolder:Archive-YYYY}.
14354
14355 @vindex nnmail-keep-last-article
14356 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14357 expire the final article in a mail newsgroup.  This is to make life
14358 easier for procmail users.
14359
14360 @vindex gnus-total-expirable-newsgroups
14361 By the way: That line up there, about Gnus never expiring non-expirable
14362 articles, is a lie.  If you put @code{total-expire} in the group
14363 parameters, articles will not be marked as expirable, but all read
14364 articles will be put through the expiry process.  Use with extreme
14365 caution.  Even more dangerous is the
14366 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14367 this regexp will have all read articles put through the expiry process,
14368 which means that @emph{all} old mail articles in the groups in question
14369 will be deleted after a while.  Use with extreme caution, and don't come
14370 crying to me when you discover that the regexp you used matched the
14371 wrong group and all your important mail has disappeared.  Be a
14372 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14373 with!  So there!
14374
14375 Most people make most of their mail groups total-expirable, though.
14376
14377 @vindex gnus-inhibit-user-auto-expire
14378 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14379 commands will not mark an article as expirable, even if the group has
14380 auto-expire turned on.
14381
14382
14383 @node Washing Mail
14384 @subsection Washing Mail
14385 @cindex mail washing
14386 @cindex list server brain damage
14387 @cindex incoming mail treatment
14388
14389 Mailers and list servers are notorious for doing all sorts of really,
14390 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14391 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14392 end of all lines passing through our server, so let's do that!!!!1!''
14393 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14394 considered to be self-evident were not discussed.  So.  Here we are.
14395
14396 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14397 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14398 be shocked and dismayed by this, but I haven't got the energy.  It is to
14399 laugh.
14400
14401 Gnus provides a plethora of functions for washing articles while
14402 displaying them, but it might be nicer to do the filtering before
14403 storing the mail to disk.  For that purpose, we have three hooks and
14404 various functions that can be put in these hooks.
14405
14406 @table @code
14407 @item nnmail-prepare-incoming-hook
14408 @vindex nnmail-prepare-incoming-hook
14409 This hook is called before doing anything with the mail and is meant for
14410 grand, sweeping gestures.  It is called in a buffer that contains all
14411 the new, incoming mail.  Functions to be used include:
14412
14413 @table @code
14414 @item nnheader-ms-strip-cr
14415 @findex nnheader-ms-strip-cr
14416 Remove trailing carriage returns from each line.  This is default on
14417 Emacs running on MS machines.
14418
14419 @end table
14420
14421 @item nnmail-prepare-incoming-header-hook
14422 @vindex nnmail-prepare-incoming-header-hook
14423 This hook is called narrowed to each header.  It can be used when
14424 cleaning up the headers.  Functions that can be used include:
14425
14426 @table @code
14427 @item nnmail-remove-leading-whitespace
14428 @findex nnmail-remove-leading-whitespace
14429 Clear leading white space that ``helpful'' listservs have added to the
14430 headers to make them look nice.  Aaah.
14431
14432 (Note that this function works on both the header on the body of all
14433 messages, so it is a potentially dangerous function to use (if a body
14434 of a message contains something that looks like a header line).  So
14435 rather than fix the bug, it is of course the right solution to make it
14436 into a feature by documenting it.)
14437
14438 @item nnmail-remove-list-identifiers
14439 @findex nnmail-remove-list-identifiers
14440 Some list servers add an identifier---for example, @samp{(idm)}---to the
14441 beginning of all @code{Subject} headers.  I'm sure that's nice for
14442 people who use stone age mail readers.  This function will remove
14443 strings that match the @code{nnmail-list-identifiers} regexp, which can
14444 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14445 @code{\\(..\\)}.
14446
14447 For instance, if you want to remove the @samp{(idm)} and the
14448 @samp{nagnagnag} identifiers:
14449
14450 @lisp
14451 (setq nnmail-list-identifiers
14452       '("(idm)" "nagnagnag"))
14453 @end lisp
14454
14455 This can also be done non-destructively with
14456 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14457
14458 @item nnmail-remove-tabs
14459 @findex nnmail-remove-tabs
14460 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14461
14462 @item nnmail-fix-eudora-headers
14463 @findex nnmail-fix-eudora-headers
14464 @cindex Eudora
14465 Eudora produces broken @code{References} headers, but OK
14466 @code{In-Reply-To} headers.  This function will get rid of the
14467 @code{References} headers.
14468
14469 @end table
14470
14471 @item nnmail-prepare-incoming-message-hook
14472 @vindex nnmail-prepare-incoming-message-hook
14473 This hook is called narrowed to each message.  Functions to be used
14474 include:
14475
14476 @table @code
14477 @item article-de-quoted-unreadable
14478 @findex article-de-quoted-unreadable
14479 Decode Quoted Readable encoding.
14480
14481 @end table
14482 @end table
14483
14484
14485 @node Duplicates
14486 @subsection Duplicates
14487
14488 @vindex nnmail-treat-duplicates
14489 @vindex nnmail-message-id-cache-length
14490 @vindex nnmail-message-id-cache-file
14491 @cindex duplicate mails
14492 If you are a member of a couple of mailing lists, you will sometimes
14493 receive two copies of the same mail.  This can be quite annoying, so
14494 @code{nnmail} checks for and treats any duplicates it might find.  To do
14495 this, it keeps a cache of old @code{Message-ID}s---
14496 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14497 default.  The approximate maximum number of @code{Message-ID}s stored
14498 there is controlled by the @code{nnmail-message-id-cache-length}
14499 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14500 stored.) If all this sounds scary to you, you can set
14501 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14502 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14503 will insert a warning into the head of the mail saying that it thinks
14504 that this is a duplicate of a different message.
14505
14506 This variable can also be a function.  If that's the case, the function
14507 will be called from a buffer narrowed to the message in question with
14508 the @code{Message-ID} as a parameter.  The function must return either
14509 @code{nil}, @code{warn}, or @code{delete}.
14510
14511 You can turn this feature off completely by setting the variable to
14512 @code{nil}.
14513
14514 If you want all the duplicate mails to be put into a special
14515 @dfn{duplicates} group, you could do that using the normal mail split
14516 methods:
14517
14518 @lisp
14519 (setq nnmail-split-fancy
14520       '(| ;; @r{Messages duplicates go to a separate group.}
14521         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14522         ;; @r{Message from daemons, postmaster, and the like to another.}
14523         (any mail "mail.misc")
14524         ;; @r{Other rules.}
14525         [...] ))
14526 @end lisp
14527 @noindent
14528 Or something like:
14529 @lisp
14530 (setq nnmail-split-methods
14531       '(("duplicates" "^Gnus-Warning:.*duplicate")
14532         ;; @r{Other rules.}
14533         [...]))
14534 @end lisp
14535
14536 Here's a neat feature: If you know that the recipient reads her mail
14537 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14538 @code{delete}, you can send her as many insults as you like, just by
14539 using a @code{Message-ID} of a mail that you know that she's already
14540 received.  Think of all the fun!  She'll never see any of it!  Whee!
14541
14542
14543 @node Not Reading Mail
14544 @subsection Not Reading Mail
14545
14546 If you start using any of the mail back ends, they have the annoying
14547 habit of assuming that you want to read mail with them.  This might not
14548 be unreasonable, but it might not be what you want.
14549
14550 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14551 @code{nil}, none of the back ends will ever attempt to read incoming
14552 mail, which should help.
14553
14554 @vindex nnbabyl-get-new-mail
14555 @vindex nnmbox-get-new-mail
14556 @vindex nnml-get-new-mail
14557 @vindex nnmh-get-new-mail
14558 @vindex nnfolder-get-new-mail
14559 This might be too much, if, for instance, you are reading mail quite
14560 happily with @code{nnml} and just want to peek at some old Rmail
14561 file you have stashed away with @code{nnbabyl}.  All back ends have
14562 variables called back-end-@code{get-new-mail}.  If you want to disable
14563 the @code{nnbabyl} mail reading, you edit the virtual server for the
14564 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14565
14566 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14567 narrowed to the article to be saved before saving it when reading
14568 incoming mail.
14569
14570
14571 @node Choosing a Mail Back End
14572 @subsection Choosing a Mail Back End
14573
14574 Gnus will read the mail spool when you activate a mail group.  The mail
14575 file is first copied to your home directory.  What happens after that
14576 depends on what format you want to store your mail in.
14577
14578 There are six different mail back ends in the standard Gnus, and more
14579 back ends are available separately.  The mail back end most people use
14580 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14581 Spool}).
14582
14583 @menu
14584 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14585 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14586 * Mail Spool::                  Store your mail in a private spool?
14587 * MH Spool::                    An mhspool-like back end.
14588 * Maildir::                     Another one-file-per-message format.
14589 * Mail Folders::                Having one file for each group.
14590 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14591 @end menu
14592
14593
14594 @node Unix Mail Box
14595 @subsubsection Unix Mail Box
14596 @cindex nnmbox
14597 @cindex unix mail box
14598
14599 @vindex nnmbox-active-file
14600 @vindex nnmbox-mbox-file
14601 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14602 mail.  @code{nnmbox} will add extra headers to each mail article to say
14603 which group it belongs in.
14604
14605 Virtual server settings:
14606
14607 @table @code
14608 @item nnmbox-mbox-file
14609 @vindex nnmbox-mbox-file
14610 The name of the mail box in the user's home directory.  Default is
14611 @file{~/mbox}.
14612
14613 @item nnmbox-active-file
14614 @vindex nnmbox-active-file
14615 The name of the active file for the mail box.  Default is
14616 @file{~/.mbox-active}.
14617
14618 @item nnmbox-get-new-mail
14619 @vindex nnmbox-get-new-mail
14620 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14621 into groups.  Default is @code{t}.
14622 @end table
14623
14624
14625 @node Rmail Babyl
14626 @subsubsection Rmail Babyl
14627 @cindex nnbabyl
14628 @cindex Rmail mbox
14629
14630 @vindex nnbabyl-active-file
14631 @vindex nnbabyl-mbox-file
14632 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14633 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14634 mail article to say which group it belongs in.
14635
14636 Virtual server settings:
14637
14638 @table @code
14639 @item nnbabyl-mbox-file
14640 @vindex nnbabyl-mbox-file
14641 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14642
14643 @item nnbabyl-active-file
14644 @vindex nnbabyl-active-file
14645 The name of the active file for the rmail box.  The default is
14646 @file{~/.rmail-active}
14647
14648 @item nnbabyl-get-new-mail
14649 @vindex nnbabyl-get-new-mail
14650 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14651 @code{t}
14652 @end table
14653
14654
14655 @node Mail Spool
14656 @subsubsection Mail Spool
14657 @cindex nnml
14658 @cindex mail @acronym{NOV} spool
14659
14660 The @dfn{nnml} spool mail format isn't compatible with any other known
14661 format.  It should be used with some caution.
14662
14663 @vindex nnml-directory
14664 If you use this back end, Gnus will split all incoming mail into files,
14665 one file for each mail, and put the articles into the corresponding
14666 directories under the directory specified by the @code{nnml-directory}
14667 variable.  The default value is @file{~/Mail/}.
14668
14669 You do not have to create any directories beforehand; Gnus will take
14670 care of all that.
14671
14672 If you have a strict limit as to how many files you are allowed to store
14673 in your account, you should not use this back end.  As each mail gets its
14674 own file, you might very well occupy thousands of inodes within a few
14675 weeks.  If this is no problem for you, and it isn't a problem for you
14676 having your friendly systems administrator walking around, madly,
14677 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14678 know that this is probably the fastest format to use.  You do not have
14679 to trudge through a big mbox file just to read your new mail.
14680
14681 @code{nnml} is probably the slowest back end when it comes to article
14682 splitting.  It has to create lots of files, and it also generates
14683 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14684 fastest back end when it comes to reading mail.
14685
14686 @cindex self contained nnml servers
14687 @cindex marks
14688 When the marks file is used (which it is by default), @code{nnml}
14689 servers have the property that you may backup them using @code{tar} or
14690 similar, and later be able to restore them into Gnus (by adding the
14691 proper @code{nnml} server) and have all your marks be preserved.  Marks
14692 for a group is usually stored in the @code{.marks} file (but see
14693 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14694 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14695 to restore the group (after restoring the backup into the nnml
14696 directory).
14697
14698 If for some reason you believe your @file{.marks} files are screwed
14699 up, you can just delete them all.  Gnus will then correctly regenerate
14700 them next time it starts.
14701
14702 Virtual server settings:
14703
14704 @table @code
14705 @item nnml-directory
14706 @vindex nnml-directory
14707 All @code{nnml} directories will be placed under this directory.  The
14708 default is the value of @code{message-directory} (whose default value
14709 is @file{~/Mail}).
14710
14711 @item nnml-active-file
14712 @vindex nnml-active-file
14713 The active file for the @code{nnml} server.  The default is
14714 @file{~/Mail/active}.
14715
14716 @item nnml-newsgroups-file
14717 @vindex nnml-newsgroups-file
14718 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14719 Format}.  The default is @file{~/Mail/newsgroups}.
14720
14721 @item nnml-get-new-mail
14722 @vindex nnml-get-new-mail
14723 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14724 @code{t}.
14725
14726 @item nnml-nov-is-evil
14727 @vindex nnml-nov-is-evil
14728 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14729 default is @code{nil}.
14730
14731 @item nnml-nov-file-name
14732 @vindex nnml-nov-file-name
14733 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14734
14735 @item nnml-prepare-save-mail-hook
14736 @vindex nnml-prepare-save-mail-hook
14737 Hook run narrowed to an article before saving.
14738
14739 @item nnml-marks-is-evil
14740 @vindex nnml-marks-is-evil
14741 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14742 default is @code{nil}.
14743
14744 @item nnml-marks-file-name
14745 @vindex nnml-marks-file-name
14746 The name of the @dfn{marks} files.  The default is @file{.marks}.
14747
14748 @item nnml-use-compressed-files
14749 @vindex nnml-use-compressed-files
14750 If non-@code{nil}, @code{nnml} will allow using compressed message
14751 files.
14752
14753 @end table
14754
14755 @findex nnml-generate-nov-databases
14756 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14757 you can do a complete update by typing @kbd{M-x
14758 nnml-generate-nov-databases}.  This command will trawl through the
14759 entire @code{nnml} hierarchy, looking at each and every article, so it
14760 might take a while to complete.  A better interface to this
14761 functionality can be found in the server buffer (@pxref{Server
14762 Commands}).
14763
14764
14765 @node MH Spool
14766 @subsubsection MH Spool
14767 @cindex nnmh
14768 @cindex mh-e mail spool
14769
14770 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14771 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14772 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14773 but it also makes it easier to write procmail scripts for.
14774
14775 Virtual server settings:
14776
14777 @table @code
14778 @item nnmh-directory
14779 @vindex nnmh-directory
14780 All @code{nnmh} directories will be located under this directory.  The
14781 default is the value of @code{message-directory} (whose default is
14782 @file{~/Mail})
14783
14784 @item nnmh-get-new-mail
14785 @vindex nnmh-get-new-mail
14786 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14787 @code{t}.
14788
14789 @item nnmh-be-safe
14790 @vindex nnmh-be-safe
14791 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14792 sure that the articles in the folder are actually what Gnus thinks they
14793 are.  It will check date stamps and stat everything in sight, so
14794 setting this to @code{t} will mean a serious slow-down.  If you never
14795 use anything but Gnus to read the @code{nnmh} articles, you do not have
14796 to set this variable to @code{t}.  The default is @code{nil}.
14797 @end table
14798
14799
14800 @node Maildir
14801 @subsubsection Maildir
14802 @cindex nnmaildir
14803 @cindex maildir
14804
14805 @code{nnmaildir} stores mail in the maildir format, with each maildir
14806 corresponding to a group in Gnus.  This format is documented here:
14807 @uref{http://cr.yp.to/proto/maildir.html} and here:
14808 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14809 stores extra information in the @file{.nnmaildir/} directory within a
14810 maildir.
14811
14812 Maildir format was designed to allow concurrent deliveries and
14813 reading, without needing locks.  With other back ends, you would have
14814 your mail delivered to a spool of some kind, and then you would
14815 configure Gnus to split mail from that spool into your groups.  You
14816 can still do that with nnmaildir, but the more common configuration is
14817 to have your mail delivered directly to the maildirs that appear as
14818 group in Gnus.
14819
14820 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14821 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14822 data in the filesystem.
14823
14824 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14825 can copy a whole maildir from one Gnus setup to another, and you will
14826 keep your marks.
14827
14828 Virtual server settings:
14829
14830 @table @code
14831 @item directory
14832 For each of your nnmaildir servers (it's very unlikely that you'd need
14833 more than one), you need to create a directory and populate it with
14834 maildirs or symlinks to maildirs (and nothing else; do not choose a
14835 directory already used for other purposes).  Each maildir will be
14836 represented in Gnus as a newsgroup on that server; the filename of the
14837 symlink will be the name of the group.  Any filenames in the directory
14838 starting with @samp{.} are ignored.  The directory is scanned when you
14839 first start Gnus, and each time you type @kbd{g} in the group buffer;
14840 if any maildirs have been removed or added, nnmaildir notices at these
14841 times.
14842
14843 The value of the @code{directory} parameter should be a Lisp form
14844 which is processed by @code{eval} and @code{expand-file-name} to get
14845 the path of the directory for this server.  The form is @code{eval}ed
14846 only when the server is opened; the resulting string is used until the
14847 server is closed.  (If you don't know about forms and @code{eval},
14848 don't worry---a simple string will work.)  This parameter is not
14849 optional; you must specify it.  I don't recommend using
14850 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14851 use that directory by default for various things, and may get confused
14852 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14853
14854 @item target-prefix
14855 This should be a Lisp form which is processed by @code{eval} and
14856 @code{expand-file-name}.  The form is @code{eval}ed only when the
14857 server is opened; the resulting string is used until the server is
14858 closed.
14859
14860 When you create a group on an nnmaildir server, the maildir is created
14861 with @code{target-prefix} prepended to its name, and a symlink
14862 pointing to that maildir is created, named with the plain group name.
14863 So if @code{directory} is @code{"~/.nnmaildir"} and
14864 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14865 the group @code{foo}, nnmaildir will create
14866 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14867 @file{~/.nnmaildir/foo} as a symlink pointing to
14868 @file{../maildirs/foo}.
14869
14870 You can set @code{target-prefix} to a string without any slashes to
14871 create both maildirs and symlinks in the same @code{directory}; in
14872 this case, any maildirs found in @code{directory} whose names start
14873 with @code{target-prefix} will not be listed as groups (but the
14874 symlinks pointing to them will be).
14875
14876 As a special case, if @code{target-prefix} is @code{""} (the default),
14877 then when you create a group, the maildir will be created in
14878 @code{directory} without a corresponding symlink.  Beware that you
14879 cannot use @code{gnus-group-delete-group} on such groups without the
14880 @code{force} argument.
14881
14882 @item directory-files
14883 This should be a function with the same interface as
14884 @code{directory-files} (such as @code{directory-files} itself).  It is
14885 used to scan the server's @code{directory} for maildirs.  This
14886 parameter is optional; the default is
14887 @code{nnheader-directory-files-safe} if
14888 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14889 @code{directory-files} otherwise.
14890 (@code{nnheader-directory-files-is-safe} is checked only once when the
14891 server is opened; if you want to check it each time the directory is
14892 scanned, you'll have to provide your own function that does that.)
14893
14894 @item get-new-mail
14895 If non-@code{nil}, then after scanning for new mail in the group
14896 maildirs themselves as usual, this server will also incorporate mail
14897 the conventional Gnus way, from @code{mail-sources} according to
14898 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14899 value is @code{nil}.
14900
14901 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14902 an nnmaildir group.  The results might happen to be useful, but that
14903 would be by chance, not by design, and the results might be different
14904 in the future.  If your split rules create new groups, remember to
14905 supply a @code{create-directory} server parameter.
14906 @end table
14907
14908 @subsubsection Group parameters
14909
14910 nnmaildir uses several group parameters.  It's safe to ignore all
14911 this; the default behavior for nnmaildir is the same as the default
14912 behavior for other mail back ends: articles are deleted after one week,
14913 etc.  Except for the expiry parameters, all this functionality is
14914 unique to nnmaildir, so you can ignore it if you're just trying to
14915 duplicate the behavior you already have with another back end.
14916
14917 If the value of any of these parameters is a vector, the first element
14918 is evaluated as a Lisp form and the result is used, rather than the
14919 original value.  If the value is not a vector, the value itself is
14920 evaluated as a Lisp form.  (This is why these parameters use names
14921 different from those of other, similar parameters supported by other
14922 back ends: they have different, though similar, meanings.)  (For
14923 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14924 @code{eval} business again; for other values, remember to use an extra
14925 quote and wrap the value in a vector when appropriate.)
14926
14927 @table @code
14928 @item expire-age
14929 An integer specifying the minimum age, in seconds, of an article before
14930 it will be expired, or the symbol @code{never} to specify that
14931 articles should never be expired.  If this parameter is not set,
14932 nnmaildir falls back to the usual
14933 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14934 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14935 wanted a value of 3 days, you could use something like @code{[(* 3 24
14936 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14937 article's age is measured starting from the article file's
14938 modification time.  Normally, this is the same as the article's
14939 delivery time, but editing an article makes it younger.  Moving an
14940 article (other than via expiry) may also make an article younger.
14941
14942 @item expire-group
14943 If this is set to a string such as a full Gnus group name, like
14944 @example
14945 "backend+server.address.string:group.name"
14946 @end example
14947 and if it is not the name of the same group that the parameter belongs
14948 to, then articles will be moved to the specified group during expiry
14949 before being deleted.  @emph{If this is set to an nnmaildir group, the
14950 article will be just as old in the destination group as it was in the
14951 source group.}  So be careful with @code{expire-age} in the
14952 destination group.  If this is set to the name of the same group that
14953 the parameter belongs to, then the article is not expired at all.  If
14954 you use the vector form, the first element is evaluated once for each
14955 article.  So that form can refer to
14956 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14957 article.  @emph{If this parameter is not set, nnmaildir does not fall
14958 back to the @code{expiry-target} group parameter or the
14959 @code{nnmail-expiry-target} variable.}
14960
14961 @item read-only
14962 If this is set to @code{t}, nnmaildir will treat the articles in this
14963 maildir as read-only.  This means: articles are not renamed from
14964 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14965 not @file{cur/}; articles are never deleted; articles cannot be
14966 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14967 directory of another maildir---e.g., a system-wide mailbox containing
14968 a mailing list of common interest.  Everything in the maildir outside
14969 @file{new/} is @emph{not} treated as read-only, so for a shared
14970 mailbox, you do still need to set up your own maildir (or have write
14971 permission to the shared mailbox); your maildir just won't contain
14972 extra copies of the articles.
14973
14974 @item directory-files
14975 A function with the same interface as @code{directory-files}.  It is
14976 used to scan the directories in the maildir corresponding to this
14977 group to find articles.  The default is the function specified by the
14978 server's @code{directory-files} parameter.
14979
14980 @item distrust-Lines:
14981 If non-@code{nil}, nnmaildir will always count the lines of an
14982 article, rather than use the @code{Lines:} header field.  If
14983 @code{nil}, the header field will be used if present.
14984
14985 @item always-marks
14986 A list of mark symbols, such as
14987 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14988 article marks, nnmaildir will say that all articles have these
14989 marks, regardless of whether the marks stored in the filesystem
14990 say so.  This is a proof-of-concept feature that will probably be
14991 removed eventually; it ought to be done in Gnus proper, or
14992 abandoned if it's not worthwhile.
14993
14994 @item never-marks
14995 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14996 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14997 articles have these marks, regardless of whether the marks stored in
14998 the filesystem say so.  @code{never-marks} overrides
14999 @code{always-marks}.  This is a proof-of-concept feature that will
15000 probably be removed eventually; it ought to be done in Gnus proper, or
15001 abandoned if it's not worthwhile.
15002
15003 @item nov-cache-size
15004 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
15005 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
15006 articles in each group.  (This is probably not worthwhile, and will
15007 probably be removed in the future.)  This parameter's value is noticed
15008 only the first time a group is seen after the server is opened---i.e.,
15009 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
15010 until the server is closed and reopened.  The default is an estimate
15011 of the number of articles that would be displayed in the summary
15012 buffer: a count of articles that are either marked with @code{tick} or
15013 not marked with @code{read}, plus a little extra.
15014 @end table
15015
15016 @subsubsection Article identification
15017 Articles are stored in the @file{cur/} subdirectory of each maildir.
15018 Each article file is named like @code{uniq:info}, where @code{uniq}
15019 contains no colons.  nnmaildir ignores, but preserves, the
15020 @code{:info} part.  (Other maildir readers typically use this part of
15021 the filename to store marks.)  The @code{uniq} part uniquely
15022 identifies the article, and is used in various places in the
15023 @file{.nnmaildir/} subdirectory of the maildir to store information
15024 about the corresponding article.  The full pathname of an article is
15025 available in the variable @code{nnmaildir-article-file-name} after you
15026 request the article in the summary buffer.
15027
15028 @subsubsection NOV data
15029 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15030 generate lines in the summary buffer) stored in
15031 @code{.nnmaildir/nov/uniq}.  There is no
15032 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15033 need for it---an article's @acronym{NOV} data is updated automatically when the
15034 article or @code{nnmail-extra-headers} has changed.)  You can force
15035 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15036 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15037 cause nnmaildir to assign a new article number for this article, which
15038 may cause trouble with @code{seen} marks, the Agent, and the cache.
15039
15040 @subsubsection Article marks
15041 An article identified by @code{uniq} is considered to have the mark
15042 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15043 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15044 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15045 to store a new set of marks, nnmaildir creates and deletes the
15046 corresponding files as needed.  (Actually, rather than create a new
15047 file for each mark, it just creates hard links to
15048 @file{.nnmaildir/markfile}, to save inodes.)
15049
15050 You can invent new marks by creating a new directory in
15051 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15052 your server, untar it later, and keep your marks.  You can add and
15053 remove marks yourself by creating and deleting mark files.  If you do
15054 this while Gnus is running and your nnmaildir server is open, it's
15055 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15056 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15057 group buffer afterwards.  Otherwise, Gnus might not pick up the
15058 changes, and might undo them.
15059
15060
15061 @node Mail Folders
15062 @subsubsection Mail Folders
15063 @cindex nnfolder
15064 @cindex mbox folders
15065 @cindex mail folders
15066
15067 @code{nnfolder} is a back end for storing each mail group in a separate
15068 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15069 will add extra headers to keep track of article numbers and arrival
15070 dates.
15071
15072 @cindex self contained nnfolder servers
15073 @cindex marks
15074 When the marks file is used (which it is by default), @code{nnfolder}
15075 servers have the property that you may backup them using @code{tar} or
15076 similar, and later be able to restore them into Gnus (by adding the
15077 proper @code{nnfolder} server) and have all your marks be preserved.
15078 Marks for a group is usually stored in a file named as the mbox file
15079 with @code{.mrk} concatenated to it (but see
15080 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15081 Individual @code{nnfolder} groups are also possible to backup, use
15082 @kbd{G m} to restore the group (after restoring the backup into the
15083 @code{nnfolder} directory).
15084
15085 Virtual server settings:
15086
15087 @table @code
15088 @item nnfolder-directory
15089 @vindex nnfolder-directory
15090 All the @code{nnfolder} mail boxes will be stored under this directory.
15091 The default is the value of @code{message-directory} (whose default is
15092 @file{~/Mail})
15093
15094 @item nnfolder-active-file
15095 @vindex nnfolder-active-file
15096 The name of the active file.  The default is @file{~/Mail/active}.
15097
15098 @item nnfolder-newsgroups-file
15099 @vindex nnfolder-newsgroups-file
15100 The name of the group descriptions file.  @xref{Newsgroups File
15101 Format}.  The default is @file{~/Mail/newsgroups}
15102
15103 @item nnfolder-get-new-mail
15104 @vindex nnfolder-get-new-mail
15105 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15106 is @code{t}
15107
15108 @item nnfolder-save-buffer-hook
15109 @vindex nnfolder-save-buffer-hook
15110 @cindex backup files
15111 Hook run before saving the folders.  Note that Emacs does the normal
15112 backup renaming of files even with the @code{nnfolder} buffers.  If you
15113 wish to switch this off, you could say something like the following in
15114 your @file{.emacs} file:
15115
15116 @lisp
15117 (defun turn-off-backup ()
15118   (set (make-local-variable 'backup-inhibited) t))
15119
15120 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15121 @end lisp
15122
15123 @item nnfolder-delete-mail-hook
15124 @vindex nnfolder-delete-mail-hook
15125 Hook run in a buffer narrowed to the message that is to be deleted.
15126 This function can be used to copy the message to somewhere else, or to
15127 extract some information from it before removing it.
15128
15129 @item nnfolder-nov-is-evil
15130 @vindex nnfolder-nov-is-evil
15131 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15132 default is @code{nil}.
15133
15134 @item nnfolder-nov-file-suffix
15135 @vindex nnfolder-nov-file-suffix
15136 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15137
15138 @item nnfolder-nov-directory
15139 @vindex nnfolder-nov-directory
15140 The directory where the @acronym{NOV} files should be stored.  If
15141 @code{nil}, @code{nnfolder-directory} is used.
15142
15143 @item nnfolder-marks-is-evil
15144 @vindex nnfolder-marks-is-evil
15145 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15146 default is @code{nil}.
15147
15148 @item nnfolder-marks-file-suffix
15149 @vindex nnfolder-marks-file-suffix
15150 The extension for @sc{marks} files.  The default is @file{.mrk}.
15151
15152 @item nnfolder-marks-directory
15153 @vindex nnfolder-marks-directory
15154 The directory where the @sc{marks} files should be stored.  If
15155 @code{nil}, @code{nnfolder-directory} is used.
15156
15157 @end table
15158
15159
15160 @findex nnfolder-generate-active-file
15161 @kindex M-x nnfolder-generate-active-file
15162 If you have lots of @code{nnfolder}-like files you'd like to read with
15163 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15164 command to make @code{nnfolder} aware of all likely files in
15165 @code{nnfolder-directory}.  This only works if you use long file names,
15166 though.
15167
15168 @node Comparing Mail Back Ends
15169 @subsubsection Comparing Mail Back Ends
15170
15171 First, just for terminology, the @dfn{back end} is the common word for a
15172 low-level access method---a transport, if you will, by which something
15173 is acquired.  The sense is that one's mail has to come from somewhere,
15174 and so selection of a suitable back end is required in order to get that
15175 mail within spitting distance of Gnus.
15176
15177 The same concept exists for Usenet itself: Though access to articles is
15178 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15179 in the world got at Usenet by running a reader on the machine where the
15180 articles lay (the machine which today we call an @acronym{NNTP} server), and
15181 access was by the reader stepping into the articles' directory spool
15182 area directly.  One can still select between either the @code{nntp} or
15183 @code{nnspool} back ends, to select between these methods, if one happens
15184 actually to live on the server (or can see its spool directly, anyway,
15185 via NFS).
15186
15187 The goal in selecting a mail back end is to pick one which
15188 simultaneously represents a suitable way of dealing with the original
15189 format plus leaving mail in a form that is convenient to use in the
15190 future.  Here are some high and low points on each:
15191
15192 @table @code
15193 @item nnmbox
15194
15195 UNIX systems have historically had a single, very common, and well-
15196 defined format.  All messages arrive in a single @dfn{spool file}, and
15197 they are delineated by a line whose regular expression matches
15198 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15199 to make it clear in this instance that this is not the RFC-specified
15200 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15201 historically from the Unix environment, it is simplest if one does not
15202 mess a great deal with the original mailbox format, so if one chooses
15203 this back end, Gnus' primary activity in getting mail from the real spool
15204 area to Gnus' preferred directory is simply to copy it, with no
15205 (appreciable) format change in the process.  It is the ``dumbest'' way
15206 to move mail into availability in the Gnus environment.  This makes it
15207 fast to move into place, but slow to parse, when Gnus has to look at
15208 what's where.
15209
15210 @item nnbabyl
15211
15212 Once upon a time, there was the DEC-10 and DEC-20, running operating
15213 systems called TOPS and related things, and the usual (only?) mail
15214 reading environment was a thing called Babyl.  I don't know what format
15215 was used for mail landing on the system, but Babyl had its own internal
15216 format to which mail was converted, primarily involving creating a
15217 spool-file-like entity with a scheme for inserting Babyl-specific
15218 headers and status bits above the top of each message in the file.
15219 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15220 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15221 to understand the mail files folks already had in existence.  Gnus (and
15222 VM, for that matter) continue to support this format because it's
15223 perceived as having some good qualities in those mailer-specific
15224 headers/status bits stuff.  Rmail itself still exists as well, of
15225 course, and is still maintained by Stallman.
15226
15227 Both of the above forms leave your mail in a single file on your
15228 file system, and they must parse that entire file each time you take a
15229 look at your mail.
15230
15231 @item nnml
15232
15233 @code{nnml} is the back end which smells the most as though you were
15234 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15235 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15236 lo these years ago.)  One's mail is taken from the original spool file,
15237 and is then cut up into individual message files, 1:1.  It maintains a
15238 Usenet-style active file (analogous to what one finds in an INN- or
15239 CNews-based news system in (for instance) @file{/var/lib/news/active},
15240 or what is returned via the @samp{NNTP LIST} verb) and also creates
15241 @dfn{overview} files for efficient group entry, as has been defined for
15242 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15243 due to the creation of lots of files, updates to the @code{nnml} active
15244 file, and additions to overview files on a per-message basis, but it is
15245 extremely fast on access because of what amounts to the indexing support
15246 provided by the active file and overviews.
15247
15248 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15249 resource which defines available places in the file system to put new
15250 files.  Sysadmins take a dim view of heavy inode occupation within
15251 tight, shared file systems.  But if you live on a personal machine where
15252 the file system is your own and space is not at a premium, @code{nnml}
15253 wins big.
15254
15255 It is also problematic using this back end if you are living in a
15256 FAT16-based Windows world, since much space will be wasted on all these
15257 tiny files.
15258
15259 @item nnmh
15260
15261 The Rand MH mail-reading system has been around UNIX systems for a very
15262 long time; it operates by splitting one's spool file of messages into
15263 individual files, but with little or no indexing support---@code{nnmh}
15264 is considered to be semantically equivalent to ``@code{nnml} without
15265 active file or overviews''.  This is arguably the worst choice, because
15266 one gets the slowness of individual file creation married to the
15267 slowness of access parsing when learning what's new in one's groups.
15268
15269 @item nnfolder
15270
15271 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15272 method described above) on a per-group basis.  That is, @code{nnmbox}
15273 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15274 little bit of optimization to this so that each of one's mail groups has
15275 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15276 can be parsed separately, and still provides the simple Unix mail box
15277 format requiring minimal effort in moving the mail around.  In addition,
15278 it maintains an ``active'' file making it much faster for Gnus to figure
15279 out how many messages there are in each separate group.
15280
15281 If you have groups that are expected to have a massive amount of
15282 messages, @code{nnfolder} is not the best choice, but if you receive
15283 only a moderate amount of mail, @code{nnfolder} is probably the most
15284 friendly mail back end all over.
15285
15286 @item nnmaildir
15287
15288 For configuring expiry and other things, @code{nnmaildir} uses
15289 incompatible group parameters, slightly different from those of other
15290 mail back ends.
15291
15292 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15293 differences.  Each message is stored in a separate file, but the
15294 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15295 also stores the equivalent of @code{nnml}'s overview files in one file
15296 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15297 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15298 you down or takes up very much space, consider switching to
15299 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15300 file system.
15301
15302 Since maildirs don't require locking for delivery, the maildirs you use
15303 as groups can also be the maildirs your mail is directly delivered to.
15304 This means you can skip Gnus' mail splitting if your mail is already
15305 organized into different mailboxes during delivery.  A @code{directory}
15306 entry in @code{mail-sources} would have a similar effect, but would
15307 require one set of mailboxes for spooling deliveries (in mbox format,
15308 thus damaging message bodies), and another set to be used as groups (in
15309 whatever format you like).  A maildir has a built-in spool, in the
15310 @code{new/} subdirectory.  Beware that currently, mail moved from
15311 @code{new/} to @code{cur/} instead of via mail splitting will not
15312 undergo treatment such as duplicate checking.
15313
15314 @code{nnmaildir} stores article marks for a given group in the
15315 corresponding maildir, in a way designed so that it's easy to manipulate
15316 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15317 else, and still have your marks.  @code{nnml} also stores marks, but
15318 it's not as easy to work with them from outside Gnus as with
15319 @code{nnmaildir}.
15320
15321 @code{nnmaildir} uses a significant amount of memory to speed things up.
15322 (It keeps in memory some of the things that @code{nnml} stores in files
15323 and that @code{nnmh} repeatedly parses out of message files.)  If this
15324 is a problem for you, you can set the @code{nov-cache-size} group
15325 parameter to something small (0 would probably not work, but 1 probably
15326 would) to make it use less memory.  This caching will probably be
15327 removed in the future.
15328
15329 Startup is likely to be slower with @code{nnmaildir} than with other
15330 back ends.  Everything else is likely to be faster, depending in part
15331 on your file system.
15332
15333 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15334 to write an @code{nnmaildir}-derived back end.
15335
15336 @end table
15337
15338
15339 @node Browsing the Web
15340 @section Browsing the Web
15341 @cindex web
15342 @cindex browsing the web
15343 @cindex www
15344 @cindex http
15345
15346 Web-based discussion forums are getting more and more popular.  On many
15347 subjects, the web-based forums have become the most important forums,
15348 eclipsing the importance of mailing lists and news groups.  The reason
15349 is easy to understand---they are friendly to new users; you just point
15350 and click, and there's the discussion.  With mailing lists, you have to
15351 go through a cumbersome subscription procedure, and most people don't
15352 even know what a news group is.
15353
15354 The problem with this scenario is that web browsers are not very good at
15355 being newsreaders.  They do not keep track of what articles you've read;
15356 they do not allow you to score on subjects you're interested in; they do
15357 not allow off-line browsing; they require you to click around and drive
15358 you mad in the end.
15359
15360 So---if web browsers suck at reading discussion forums, why not use Gnus
15361 to do it instead?
15362
15363 Gnus has been getting a bit of a collection of back ends for providing
15364 interfaces to these sources.
15365
15366 @menu
15367 * Archiving Mail::
15368 * Web Searches::                Creating groups from articles that match a string.
15369 * Slashdot::                    Reading the Slashdot comments.
15370 * Ultimate::                    The Ultimate Bulletin Board systems.
15371 * Web Archive::                 Reading mailing list archived on web.
15372 * RSS::                         Reading RDF site summary.
15373 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15374 @end menu
15375
15376 All the web sources require Emacs/w3 and the url library to work.
15377
15378 The main caveat with all these web sources is that they probably won't
15379 work for a very long time.  Gleaning information from the @acronym{HTML} data
15380 is guesswork at best, and when the layout is altered, the Gnus back end
15381 will fail.  If you have reasonably new versions of these back ends,
15382 though, you should be ok.
15383
15384 One thing all these Web methods have in common is that the Web sources
15385 are often down, unavailable or just plain too slow to be fun.  In those
15386 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15387 Unplugged}) handle downloading articles, and then you can read them at
15388 leisure from your local disk.  No more World Wide Wait for you.
15389
15390 @node Archiving Mail
15391 @subsection Archiving Mail
15392 @cindex archiving mail
15393 @cindex backup of mail
15394
15395 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15396 @code{nnmaildir}, now actually store the article marks with each group.
15397 For these servers, archiving and restoring a group while preserving
15398 marks is fairly simple.
15399
15400 (Preserving the group level and group parameters as well still
15401 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15402 though.)
15403
15404 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15405 server, take a recursive copy of the server directory.  There is no need
15406 to shut down Gnus, so archiving may be invoked by @code{cron} or
15407 similar.  You restore the data by restoring the directory tree, and
15408 adding a server definition pointing to that directory in Gnus.  The
15409 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15410 might interfere with overwriting data, so you may want to shut down Gnus
15411 before you restore the data.
15412
15413 It is also possible to archive individual @code{nnml},
15414 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15415 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15416 directory.  For @code{nnfolder} you need to copy both the base folder
15417 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15418 this example).  Restoring the group is done with @kbd{G m} from the Group
15419 buffer.  The last step makes Gnus notice the new directory.
15420 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15421 is unnecessary in that case.
15422
15423 @node Web Searches
15424 @subsection Web Searches
15425 @cindex nnweb
15426 @cindex Google
15427 @cindex dejanews
15428 @cindex gmane
15429 @cindex Usenet searches
15430 @cindex searching the Usenet
15431
15432 It's, like, too neat to search the Usenet for articles that match a
15433 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15434 those, like, Web browsers, and you, like, have to, rilly, like, look at
15435 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15436 searches without having to use a browser.
15437
15438 The @code{nnweb} back end allows an easy interface to the mighty search
15439 engine.  You create an @code{nnweb} group, enter a search pattern, and
15440 then enter the group and read the articles like you would any normal
15441 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15442 Groups}) will do this in an easy-to-use fashion.
15443
15444 @code{nnweb} groups don't really lend themselves to being solid
15445 groups---they have a very fleeting idea of article numbers.  In fact,
15446 each time you enter an @code{nnweb} group (not even changing the search
15447 pattern), you are likely to get the articles ordered in a different
15448 manner.  Not even using duplicate suppression (@pxref{Duplicate
15449 Suppression}) will help, since @code{nnweb} doesn't even know the
15450 @code{Message-ID} of the articles before reading them using some search
15451 engines (Google, for instance).  The only possible way to keep track
15452 of which articles you've read is by scoring on the @code{Date}
15453 header---mark all articles posted before the last date you read the
15454 group as read.
15455
15456 If the search engine changes its output substantially, @code{nnweb}
15457 won't be able to parse it and will fail.  One could hardly fault the Web
15458 providers if they were to do this---their @emph{raison d'être} is to
15459 make money off of advertisements, not to provide services to the
15460 community.  Since @code{nnweb} washes the ads off all the articles, one
15461 might think that the providers might be somewhat miffed.  We'll see.
15462
15463 You must have the @code{url} and @code{w3} package installed to be able
15464 to use @code{nnweb}.
15465
15466 Virtual server variables:
15467
15468 @table @code
15469 @item nnweb-type
15470 @vindex nnweb-type
15471 What search engine type is being used.  The currently supported types
15472 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15473 @code{dejanews} is an alias to @code{google}.
15474
15475 @item nnweb-search
15476 @vindex nnweb-search
15477 The search string to feed to the search engine.
15478
15479 @item nnweb-max-hits
15480 @vindex nnweb-max-hits
15481 Advisory maximum number of hits per search to display.  The default is
15482 999.
15483
15484 @item nnweb-type-definition
15485 @vindex nnweb-type-definition
15486 Type-to-definition alist.  This alist says what @code{nnweb} should do
15487 with the various search engine types.  The following elements must be
15488 present:
15489
15490 @table @code
15491 @item article
15492 Function to decode the article and provide something that Gnus
15493 understands.
15494
15495 @item map
15496 Function to create an article number to message header and URL alist.
15497
15498 @item search
15499 Function to send the search string to the search engine.
15500
15501 @item address
15502 The address the aforementioned function should send the search string
15503 to.
15504
15505 @item id
15506 Format string URL to fetch an article by @code{Message-ID}.
15507 @end table
15508
15509 @end table
15510
15511
15512 @node Slashdot
15513 @subsection Slashdot
15514 @cindex Slashdot
15515 @cindex nnslashdot
15516
15517 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15518 lively discussion following the news articles.  @code{nnslashdot} will
15519 let you read this forum in a convenient manner.
15520
15521 The easiest way to read this source is to put something like the
15522 following in your @file{~/.gnus.el} file:
15523
15524 @lisp
15525 (setq gnus-secondary-select-methods
15526       '((nnslashdot "")))
15527 @end lisp
15528
15529 This will make Gnus query the @code{nnslashdot} back end for new comments
15530 and groups.  The @kbd{F} command will subscribe each new news article as
15531 a new Gnus group, and you can read the comments by entering these
15532 groups.  (Note that the default subscription method is to subscribe new
15533 groups as zombies.  Other methods are available (@pxref{Subscription
15534 Methods}).
15535
15536 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15537 command is the most handy tool (@pxref{Foreign Groups}).
15538
15539 When following up to @code{nnslashdot} comments (or posting new
15540 comments), some light @acronym{HTML}izations will be performed.  In
15541 particular, text quoted with @samp{> } will be quoted with
15542 @code{blockquote} instead, and signatures will have @code{br} added to
15543 the end of each line.  Other than that, you can just write @acronym{HTML}
15544 directly into the message buffer.  Note that Slashdot filters out some
15545 @acronym{HTML} forms.
15546
15547 The following variables can be altered to change its behavior:
15548
15549 @table @code
15550 @item nnslashdot-threaded
15551 Whether @code{nnslashdot} should display threaded groups or not.  The
15552 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15553 has to retrieve absolutely all comments in a group upon entry.  If a
15554 threaded display is not required, @code{nnslashdot} will only retrieve
15555 the comments that are actually wanted by the user.  Threading is nicer,
15556 but much, much slower than unthreaded.
15557
15558 @item nnslashdot-login-name
15559 @vindex nnslashdot-login-name
15560 The login name to use when posting.
15561
15562 @item nnslashdot-password
15563 @vindex nnslashdot-password
15564 The password to use when posting.
15565
15566 @item nnslashdot-directory
15567 @vindex nnslashdot-directory
15568 Where @code{nnslashdot} will store its files.  The default is
15569 @file{~/News/slashdot/}.
15570
15571 @item nnslashdot-active-url
15572 @vindex nnslashdot-active-url
15573 The @sc{url} format string that will be used to fetch the information on
15574 news articles and comments.  The default is@*
15575 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15576
15577 @item nnslashdot-comments-url
15578 @vindex nnslashdot-comments-url
15579 The @sc{url} format string that will be used to fetch comments.  The
15580 default is
15581 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15582
15583 @item nnslashdot-article-url
15584 @vindex nnslashdot-article-url
15585 The @sc{url} format string that will be used to fetch the news article.  The
15586 default is
15587 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15588
15589 @item nnslashdot-threshold
15590 @vindex nnslashdot-threshold
15591 The score threshold.  The default is -1.
15592
15593 @item nnslashdot-group-number
15594 @vindex nnslashdot-group-number
15595 The number of old groups, in addition to the ten latest, to keep
15596 updated.  The default is 0.
15597
15598 @end table
15599
15600
15601
15602 @node Ultimate
15603 @subsection Ultimate
15604 @cindex nnultimate
15605 @cindex Ultimate Bulletin Board
15606
15607 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15608 probably the most popular Web bulletin board system used.  It has a
15609 quite regular and nice interface, and it's possible to get the
15610 information Gnus needs to keep groups updated.
15611
15612 The easiest way to get started with @code{nnultimate} is to say
15613 something like the following in the group buffer:  @kbd{B nnultimate RET
15614 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15615 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15616 you're interested in; there's quite a list of them on the Ultimate web
15617 site.)  Then subscribe to the groups you're interested in from the
15618 server buffer, and read them from the group buffer.
15619
15620 The following @code{nnultimate} variables can be altered:
15621
15622 @table @code
15623 @item nnultimate-directory
15624 @vindex nnultimate-directory
15625 The directory where @code{nnultimate} stores its files.  The default is@*
15626 @file{~/News/ultimate/}.
15627 @end table
15628
15629
15630 @node Web Archive
15631 @subsection Web Archive
15632 @cindex nnwarchive
15633 @cindex Web Archive
15634
15635 Some mailing lists only have archives on Web servers, such as
15636 @uref{http://www.egroups.com/} and
15637 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15638 interface, and it's possible to get the information Gnus needs to keep
15639 groups updated.
15640
15641 @findex gnus-group-make-warchive-group
15642 The easiest way to get started with @code{nnwarchive} is to say
15643 something like the following in the group buffer: @kbd{M-x
15644 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15645 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15646 @var{an_egroup} with the mailing list you subscribed, the
15647 @var{your@@email.address} with your email address.), or to browse the
15648 back end by @kbd{B nnwarchive RET mail-archive RET}.
15649
15650 The following @code{nnwarchive} variables can be altered:
15651
15652 @table @code
15653 @item nnwarchive-directory
15654 @vindex nnwarchive-directory
15655 The directory where @code{nnwarchive} stores its files.  The default is@*
15656 @file{~/News/warchive/}.
15657
15658 @item nnwarchive-login
15659 @vindex nnwarchive-login
15660 The account name on the web server.
15661
15662 @item nnwarchive-passwd
15663 @vindex nnwarchive-passwd
15664 The password for your account on the web server.
15665 @end table
15666
15667 @node RSS
15668 @subsection RSS
15669 @cindex nnrss
15670 @cindex RSS
15671
15672 Some sites have RDF site summary (RSS)
15673 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15674 interface, and it's possible to get the information Gnus needs to keep
15675 groups updated.
15676
15677 The easiest way to get started with @code{nnrss} is to say something
15678 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15679 subscribe groups.
15680
15681 The following @code{nnrss} variables can be altered:
15682
15683 @table @code
15684 @item nnrss-directory
15685 @vindex nnrss-directory
15686 The directory where @code{nnrss} stores its files.  The default is
15687 @file{~/News/rss/}.
15688
15689 @end table
15690
15691 The following code may be helpful, if you want to show the description in
15692 the summary buffer.
15693
15694 @lisp
15695 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15696 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15697
15698 (defun gnus-user-format-function-X (header)
15699   (let ((descr
15700          (assq nnrss-description-field (mail-header-extra header))))
15701     (if descr (concat "\n\t" (cdr descr)) "")))
15702 @end lisp
15703
15704 The following code may be useful to open an nnrss url directly from the
15705 summary buffer.
15706 @lisp
15707 (require 'browse-url)
15708
15709 (defun browse-nnrss-url( arg )
15710   (interactive "p")
15711   (let ((url (assq nnrss-url-field
15712                    (mail-header-extra
15713                     (gnus-data-header
15714                      (assq (gnus-summary-article-number)
15715                            gnus-newsgroup-data))))))
15716     (if url
15717         (progn
15718           (browse-url (cdr url))
15719           (gnus-summary-mark-as-read-forward 1))
15720       (gnus-summary-scroll-up arg))))
15721
15722 (eval-after-load "gnus"
15723   #'(define-key gnus-summary-mode-map
15724       (kbd "<RET>") 'browse-nnrss-url))
15725 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15726 @end lisp
15727
15728 @node Customizing w3
15729 @subsection Customizing w3
15730 @cindex w3
15731 @cindex html
15732 @cindex url
15733 @cindex Netscape
15734
15735 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15736 pages.  Emacs/w3 is documented in its own manual, but there are some
15737 things that may be more relevant for Gnus users.
15738
15739 For instance, a common question is how to make Emacs/w3 follow links
15740 using the @code{browse-url} functions (which will call some external web
15741 browser like Netscape).  Here's one way:
15742
15743 @lisp
15744 (eval-after-load "w3"
15745   '(progn
15746     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15747     (defun w3-fetch (&optional url target)
15748       (interactive (list (w3-read-url-with-default)))
15749       (if (eq major-mode 'gnus-article-mode)
15750           (browse-url url)
15751         (w3-fetch-orig url target)))))
15752 @end lisp
15753
15754 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15755 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15756 follow the link.
15757
15758
15759 @node IMAP
15760 @section IMAP
15761 @cindex nnimap
15762 @cindex @acronym{IMAP}
15763
15764 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15765 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15766 server is much similar to connecting to a news server, you just
15767 specify the network address of the server.
15768
15769 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15770 everything that @acronym{POP} can, it can hence be viewed as a
15771 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15772 similar to @acronym{NNTP} being a news storage protocol---however,
15773 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15774 is more or less read-only whereas mail is read-write.
15775
15776 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15777 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15778 the @acronym{IMAP} server and store them on the local disk.  This is
15779 not the usage described in this section---@xref{Mail Sources}.
15780
15781 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15782 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15783 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15784 usage explained in this section.
15785
15786 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15787 servers might look something like the following.  (Note that for
15788 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15789 see below.)
15790
15791 @lisp
15792 (setq gnus-secondary-select-methods
15793       '((nnimap "simpleserver") ; @r{no special configuration}
15794         ; @r{perhaps a ssh port forwarded server:}
15795         (nnimap "dolk"
15796                 (nnimap-address "localhost")
15797                 (nnimap-server-port 1430))
15798         ; @r{a UW server running on localhost}
15799         (nnimap "barbar"
15800                 (nnimap-server-port 143)
15801                 (nnimap-address "localhost")
15802                 (nnimap-list-pattern ("INBOX" "mail/*")))
15803         ; @r{anonymous public cyrus server:}
15804         (nnimap "cyrus.andrew.cmu.edu"
15805                 (nnimap-authenticator anonymous)
15806                 (nnimap-list-pattern "archive.*")
15807                 (nnimap-stream network))
15808         ; @r{a ssl server on a non-standard port:}
15809         (nnimap "vic20"
15810                 (nnimap-address "vic20.somewhere.com")
15811                 (nnimap-server-port 9930)
15812                 (nnimap-stream ssl))))
15813 @end lisp
15814
15815 After defining the new server, you can subscribe to groups on the
15816 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15817 (@pxref{Subscription Commands}) or via the Server Buffer
15818 (@pxref{Server Buffer}).
15819
15820 The following variables can be used to create a virtual @code{nnimap}
15821 server:
15822
15823 @table @code
15824
15825 @item nnimap-address
15826 @vindex nnimap-address
15827
15828 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15829 server name if not specified.
15830
15831 @item nnimap-server-port
15832 @vindex nnimap-server-port
15833 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15834
15835 Note that this should be an integer, example server specification:
15836
15837 @lisp
15838 (nnimap "mail.server.com"
15839         (nnimap-server-port 4711))
15840 @end lisp
15841
15842 @item nnimap-list-pattern
15843 @vindex nnimap-list-pattern
15844 String or list of strings of mailboxes to limit available groups to.
15845 This is used when the server has very many mailboxes and you're only
15846 interested in a few---some servers export your home directory via
15847 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15848 @file{~/Mail/*} then.
15849
15850 The string can also be a cons of REFERENCE and the string as above, what
15851 REFERENCE is used for is server specific, but on the University of
15852 Washington server it's a directory that will be concatenated with the
15853 mailbox.
15854
15855 Example server specification:
15856
15857 @lisp
15858 (nnimap "mail.server.com"
15859         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15860                                ("~friend/Mail/" . "list/*"))))
15861 @end lisp
15862
15863 @item nnimap-stream
15864 @vindex nnimap-stream
15865 The type of stream used to connect to your server.  By default, nnimap
15866 will detect and automatically use all of the below, with the exception
15867 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
15868 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
15869 be automatically detected, but it's not widely deployed yet.)
15870
15871 Example server specification:
15872
15873 @lisp
15874 (nnimap "mail.server.com"
15875         (nnimap-stream ssl))
15876 @end lisp
15877
15878 Please note that the value of @code{nnimap-stream} is a symbol!
15879
15880 @itemize @bullet
15881 @item
15882 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
15883 @samp{gsasl} or @samp{imtest} program.
15884 @item
15885 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
15886 @item
15887 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15888 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15889 @samp{starttls}.
15890 @item
15891 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15892 @samp{gnutls-cli}).
15893 @item
15894 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15895 @samp{openssl}) or SSLeay (@samp{s_client}).
15896 @item
15897 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15898 @item
15899 @dfn{network:} Plain, TCP/IP network connection.
15900 @end itemize
15901
15902 @vindex imap-kerberos4-program
15903 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15904 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15905 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15906 to make @code{imap.el} use a pty instead of a pipe when communicating
15907 with @samp{imtest}.  You will then suffer from a line length
15908 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15909 indefinitely if you have many articles in a mailbox.  The variable
15910 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15911 program.
15912
15913 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15914 needed.  It is available from
15915 @uref{http://www.gnu.org/software/gnutls/}.
15916
15917 @vindex imap-gssapi-program
15918 This parameter specifies a list of command lines that invoke a GSSAPI
15919 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15920 sequentially until a connection is made, or the list has been
15921 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15922 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15923 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15924 tried.
15925
15926 @vindex imap-ssl-program
15927 For @acronym{SSL} connections, the OpenSSL program is available from
15928 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
15929 and nnimap support it too---although the most recent versions of
15930 SSLeay, 0.9.x, are known to have serious bugs making it
15931 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
15932 work.  The variable @code{imap-ssl-program} contain parameters to pass
15933 to OpenSSL/SSLeay.
15934
15935 @vindex imap-shell-program
15936 @vindex imap-shell-host
15937 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15938 @code{imap-shell-program} specify what program to call.
15939
15940 @item nnimap-authenticator
15941 @vindex nnimap-authenticator
15942
15943 The authenticator used to connect to the server.  By default, nnimap
15944 will use the most secure authenticator your server is capable of.
15945
15946 Example server specification:
15947
15948 @lisp
15949 (nnimap "mail.server.com"
15950         (nnimap-authenticator anonymous))
15951 @end lisp
15952
15953 Please note that the value of @code{nnimap-authenticator} is a symbol!
15954
15955 @itemize @bullet
15956 @item
15957 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
15958 external program @code{gsasl} or @code{imtest}.
15959 @item
15960 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
15961 @code{imtest}.
15962 @item
15963 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
15964 external library @code{digest-md5.el}.
15965 @item
15966 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15967 @item
15968 @dfn{login:} Plain-text username/password via LOGIN.
15969 @item
15970 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
15971 @end itemize
15972
15973 @item nnimap-expunge-on-close
15974 @cindex expunging
15975 @vindex nnimap-expunge-on-close
15976 Unlike Parmenides the @acronym{IMAP} designers have decided things that
15977 don't exist actually do exist.  More specifically, @acronym{IMAP} has
15978 this concept of marking articles @code{Deleted} which doesn't actually
15979 delete them, and this (marking them @code{Deleted}, that is) is what
15980 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
15981 similar).
15982
15983 Since the articles aren't really removed when we mark them with the
15984 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15985 running in circles yet?
15986
15987 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15988 when closing a mailbox but this is now configurable by this server
15989 variable.
15990
15991 The possible options are:
15992
15993 @table @code
15994
15995 @item always
15996 The default behavior, delete all articles marked as ``Deleted'' when
15997 closing a mailbox.
15998 @item never
15999 Never actually delete articles.  Currently there is no way of showing
16000 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16001 may allow you to do this.  If you ever want to run the EXPUNGE command
16002 manually, @xref{Expunging mailboxes}.
16003 @item ask
16004 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16005 articles or not.
16006
16007 @end table
16008
16009 @item nnimap-importantize-dormant
16010 @vindex nnimap-importantize-dormant
16011
16012 If non-@code{nil} (the default), marks dormant articles as ticked (as
16013 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16014 naturally still (only) be marked as dormant.  This is to make dormant
16015 articles stand out, just like ticked articles, in other @acronym{IMAP}
16016 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16017 has only one.)
16018
16019 Probably the only reason for frobing this would be if you're trying
16020 enable per-user persistent dormant flags, using something like:
16021
16022 @lisp
16023 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16024         (format "gnus-dormant-%s" (user-login-name)))
16025 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16026         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16027 @end lisp
16028
16029 In this case, you would not want the per-user dormant flag showing up
16030 as ticked for other users.
16031
16032 @item nnimap-expunge-search-string
16033 @cindex expunging
16034 @vindex nnimap-expunge-search-string
16035
16036 This variable contain the @acronym{IMAP} search command sent to server when
16037 searching for articles eligible for expiring.  The default is
16038 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16039 UID set and the second @code{%s} is replaced by a date.
16040
16041 Probably the only useful value to change this to is
16042 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16043 messages instead of the internal article date.  See section 6.4.4 of
16044 RFC 2060 for more information on valid strings.
16045
16046 @item nnimap-authinfo-file
16047 @vindex nnimap-authinfo-file
16048
16049 A file containing credentials used to log in on servers.  The format is
16050 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16051 variable @code{nntp-authinfo-file} for exact syntax; also see
16052 @ref{NNTP}.
16053
16054 @item nnimap-need-unselect-to-notice-new-mail
16055 @vindex nnimap-need-unselect-to-notice-new-mail
16056
16057 Unselect mailboxes before looking for new mail in them.  Some servers
16058 seem to need this under some circumstances; it was reported that
16059 Courier 1.7.1 did.
16060
16061 @end table
16062
16063 @menu
16064 * Splitting in IMAP::           Splitting mail with nnimap.
16065 * Expiring in IMAP::            Expiring mail with nnimap.
16066 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16067 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16068 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16069 @end menu
16070
16071
16072
16073 @node Splitting in IMAP
16074 @subsection Splitting in IMAP
16075 @cindex splitting imap mail
16076
16077 Splitting is something Gnus users have loved and used for years, and now
16078 the rest of the world is catching up.  Yeah, dream on, not many
16079 @acronym{IMAP} servers have server side splitting and those that have
16080 splitting seem to use some non-standard protocol.  This means that
16081 @acronym{IMAP} support for Gnus has to do its own splitting.
16082
16083 And it does.
16084
16085 (Incidentally, people seem to have been dreaming on, and Sieve has
16086 gaining a market share and is supported by several IMAP servers.
16087 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16088
16089 Here are the variables of interest:
16090
16091 @table @code
16092
16093 @item nnimap-split-crosspost
16094 @cindex splitting, crosspost
16095 @cindex crosspost
16096 @vindex nnimap-split-crosspost
16097
16098 If non-@code{nil}, do crossposting if several split methods match the
16099 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16100 found will be used.
16101
16102 Nnmail equivalent: @code{nnmail-crosspost}.
16103
16104 @item nnimap-split-inbox
16105 @cindex splitting, inbox
16106 @cindex inbox
16107 @vindex nnimap-split-inbox
16108
16109 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16110 mailboxes to split from.  Defaults to @code{nil}, which means that
16111 splitting is disabled!
16112
16113 @lisp
16114 (setq nnimap-split-inbox
16115       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16116 @end lisp
16117
16118 No nnmail equivalent.
16119
16120 @item nnimap-split-rule
16121 @cindex splitting, rules
16122 @vindex nnimap-split-rule
16123
16124 New mail found in @code{nnimap-split-inbox} will be split according to
16125 this variable.
16126
16127 This variable contains a list of lists, where the first element in the
16128 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16129 matching the regexp in the second element in the sublist.  Got that?
16130 Neither did I, we need examples.
16131
16132 @lisp
16133 (setq nnimap-split-rule
16134       '(("INBOX.nnimap"
16135          "^Sender: owner-nnimap@@vic20.globalcom.se")
16136         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16137         ("INBOX.private" "")))
16138 @end lisp
16139
16140 This will put all articles from the nnimap mailing list into mailbox
16141 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16142 into INBOX.junk and everything else in INBOX.private.
16143
16144 The first string may contain @samp{\\1} forms, like the ones used by
16145 replace-match to insert sub-expressions from the matched text.  For
16146 instance:
16147
16148 @lisp
16149 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16150 @end lisp
16151
16152 The first element can also be the symbol @code{junk} to indicate that
16153 matching messages should simply be deleted.  Use with care.
16154
16155 The second element can also be a function.  In that case, it will be
16156 called with the first element of the rule as the argument, in a buffer
16157 containing the headers of the article.  It should return a
16158 non-@code{nil} value if it thinks that the mail belongs in that group.
16159
16160 Nnmail users might recollect that the last regexp had to be empty to
16161 match all articles (like in the example above).  This is not required in
16162 nnimap.  Articles not matching any of the regexps will not be moved out
16163 of your inbox.  (This might affect performance if you keep lots of
16164 unread articles in your inbox, since the splitting code would go over
16165 them every time you fetch new mail.)
16166
16167 These rules are processed from the beginning of the alist toward the
16168 end.  The first rule to make a match will ``win'', unless you have
16169 crossposting enabled.  In that case, all matching rules will ``win''.
16170
16171 This variable can also have a function as its value, the function will
16172 be called with the headers narrowed and should return a group where it
16173 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16174
16175 The splitting code tries to create mailboxes if it needs to.
16176
16177 To allow for different split rules on different virtual servers, and
16178 even different split rules in different inboxes on the same server,
16179 the syntax of this variable have been extended along the lines of:
16180
16181 @lisp
16182 (setq nnimap-split-rule
16183       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16184                                ("junk"    "From:.*Simon"))))
16185         ("my2server"    ("INBOX" nnimap-split-fancy))
16186         ("my[34]server" (".*" (("private" "To:.*Simon")
16187                                ("junk"    my-junk-func))))))
16188 @end lisp
16189
16190 The virtual server name is in fact a regexp, so that the same rules
16191 may apply to several servers.  In the example, the servers
16192 @code{my3server} and @code{my4server} both use the same rules.
16193 Similarly, the inbox string is also a regexp.  The actual splitting
16194 rules are as before, either a function, or a list with group/regexp or
16195 group/function elements.
16196
16197 Nnmail equivalent: @code{nnmail-split-methods}.
16198
16199 @item nnimap-split-predicate
16200 @cindex splitting
16201 @vindex nnimap-split-predicate
16202
16203 Mail matching this predicate in @code{nnimap-split-inbox} will be
16204 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16205
16206 This might be useful if you use another @acronym{IMAP} client to read mail in
16207 your inbox but would like Gnus to split all articles in the inbox
16208 regardless of readedness.  Then you might change this to
16209 @samp{UNDELETED}.
16210
16211 @item nnimap-split-fancy
16212 @cindex splitting, fancy
16213 @findex nnimap-split-fancy
16214 @vindex nnimap-split-fancy
16215
16216 It's possible to set @code{nnimap-split-rule} to
16217 @code{nnmail-split-fancy} if you want to use fancy
16218 splitting.  @xref{Fancy Mail Splitting}.
16219
16220 However, to be able to have different fancy split rules for nnmail and
16221 nnimap back ends you can set @code{nnimap-split-rule} to
16222 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16223 rule in @code{nnimap-split-fancy}.
16224
16225 Example:
16226
16227 @lisp
16228 (setq nnimap-split-rule 'nnimap-split-fancy
16229       nnimap-split-fancy ...)
16230 @end lisp
16231
16232 Nnmail equivalent: @code{nnmail-split-fancy}.
16233
16234 @item nnimap-split-download-body
16235 @findex nnimap-split-download-body
16236 @vindex nnimap-split-download-body
16237
16238 Set to non-@code{nil} to download entire articles during splitting.
16239 This is generally not required, and will slow things down
16240 considerably.  You may need it if you want to use an advanced
16241 splitting function that analyses the body to split the article.
16242
16243 @end table
16244
16245 @node Expiring in IMAP
16246 @subsection Expiring in IMAP
16247 @cindex expiring imap mail
16248
16249 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16250 end, it supports most features in regular expiring (@pxref{Expiring
16251 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16252 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16253 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16254 follows below are the variables used by the @code{nnimap} expiry
16255 process.
16256
16257 A note on how the expire mark is stored on the @acronym{IMAP} server is
16258 appropriate here as well.  The expire mark is translated into a
16259 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16260 message.  This means that likely only Gnus will understand and treat
16261 the @code{gnus-expire} mark properly, although other clients may allow
16262 you to view client specific flags on the message.  It also means that
16263 your server must support permanent storage of client specific flags on
16264 messages.  Most do, fortunately.
16265
16266 @table @code
16267
16268 @item nnmail-expiry-wait
16269 @item nnmail-expiry-wait-function
16270
16271 These variables are fully supported.  The expire value can be a
16272 number, the symbol @code{immediate} or @code{never}.
16273
16274 @item nnmail-expiry-target
16275
16276 This variable is supported, and internally implemented by calling the
16277 @code{nnmail} functions that handle this.  It contains an optimization
16278 that if the destination is a @acronym{IMAP} group on the same server, the
16279 article is copied instead of appended (that is, uploaded again).
16280
16281 @end table
16282
16283 @node Editing IMAP ACLs
16284 @subsection Editing IMAP ACLs
16285 @cindex editing imap acls
16286 @cindex Access Control Lists
16287 @cindex Editing @acronym{IMAP} ACLs
16288 @kindex G l
16289 @findex gnus-group-nnimap-edit-acl
16290
16291 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16292 limiting (or enabling) other users access to your mail boxes.  Not all
16293 @acronym{IMAP} servers support this, this function will give an error if it
16294 doesn't.
16295
16296 To edit an ACL for a mailbox, type @kbd{G l}
16297 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16298 editing window with detailed instructions.
16299
16300 Some possible uses:
16301
16302 @itemize @bullet
16303 @item
16304 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16305 on your mailing list mailboxes enables other users on the same server to
16306 follow the list without subscribing to it.
16307 @item
16308 At least with the Cyrus server, you are required to give the user
16309 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16310 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16311 INBOX.mailbox).
16312 @end itemize
16313
16314 @node Expunging mailboxes
16315 @subsection Expunging mailboxes
16316 @cindex expunging
16317
16318 @cindex expunge
16319 @cindex manual expunging
16320 @kindex G x
16321 @findex gnus-group-nnimap-expunge
16322
16323 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16324 you may want the option of expunging all deleted articles in a mailbox
16325 manually.  This is exactly what @kbd{G x} does.
16326
16327 Currently there is no way of showing deleted articles, you can just
16328 delete them.
16329
16330 @node A note on namespaces
16331 @subsection A note on namespaces
16332 @cindex IMAP namespace
16333 @cindex namespaces
16334
16335 The @acronym{IMAP} protocol has a concept called namespaces, described
16336 by the following text in the RFC:
16337
16338 @display
16339 5.1.2.  Mailbox Namespace Naming Convention
16340
16341    By convention, the first hierarchical element of any mailbox name
16342    which begins with "#" identifies the "namespace" of the remainder of
16343    the name.  This makes it possible to disambiguate between different
16344    types of mailbox stores, each of which have their own namespaces.
16345
16346       For example, implementations which offer access to USENET
16347       newsgroups MAY use the "#news" namespace to partition the USENET
16348       newsgroup namespace from that of other mailboxes.  Thus, the
16349       comp.mail.misc newsgroup would have an mailbox name of
16350       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16351       to a different object (e.g. a user's private mailbox).
16352 @end display
16353
16354 While there is nothing in this text that warrants concern for the
16355 @acronym{IMAP} implementation in Gnus, some servers use namespace
16356 prefixes in a way that does not work with how Gnus uses mailbox names.
16357
16358 Specifically, University of Washington's @acronym{IMAP} server uses
16359 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16360 in the @sc{create} and @sc{append} commands.  After the mailbox is
16361 created (or a messages is appended to a mailbox), it must be accessed
16362 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16363 not make it possible for the user to guarantee that user entered
16364 mailbox names will only be used with the CREATE and APPEND commands,
16365 you should simply not use the namespace prefixed mailbox names in
16366 Gnus.
16367
16368 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16369 for more information on how to use the prefixes.  They are a power
16370 tool and should be used only if you are sure what the effects are.
16371
16372 @node Other Sources
16373 @section Other Sources
16374
16375 Gnus can do more than just read news or mail.  The methods described
16376 below allow Gnus to view directories and files as if they were
16377 newsgroups.
16378
16379 @menu
16380 * Directory Groups::            You can read a directory as if it was a newsgroup.
16381 * Anything Groups::             Dired?  Who needs dired?
16382 * Document Groups::             Single files can be the basis of a group.
16383 * SOUP::                        Reading @sc{soup} packets ``offline''.
16384 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16385 @end menu
16386
16387
16388 @node Directory Groups
16389 @subsection Directory Groups
16390 @cindex nndir
16391 @cindex directory groups
16392
16393 If you have a directory that has lots of articles in separate files in
16394 it, you might treat it as a newsgroup.  The files have to have numerical
16395 names, of course.
16396
16397 This might be an opportune moment to mention @code{ange-ftp} (and its
16398 successor @code{efs}), that most wonderful of all wonderful Emacs
16399 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16400 back end to read directories.  Big deal.
16401
16402 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16403 enter the @code{ange-ftp} file name
16404 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16405 @code{ange-ftp} or @code{efs} will actually allow you to read this
16406 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16407
16408 @code{nndir} will use @acronym{NOV} files if they are present.
16409
16410 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16411 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16412 whatever you use @code{nndir} for, so you could switch to any of those
16413 methods if you feel the need to have a non-read-only @code{nndir}.
16414
16415
16416 @node Anything Groups
16417 @subsection Anything Groups
16418 @cindex nneething
16419
16420 From the @code{nndir} back end (which reads a single spool-like
16421 directory), it's just a hop and a skip to @code{nneething}, which
16422 pretends that any arbitrary directory is a newsgroup.  Strange, but
16423 true.
16424
16425 When @code{nneething} is presented with a directory, it will scan this
16426 directory and assign article numbers to each file.  When you enter such
16427 a group, @code{nneething} must create ``headers'' that Gnus can use.
16428 After all, Gnus is a newsreader, in case you're forgetting.
16429 @code{nneething} does this in a two-step process.  First, it snoops each
16430 file in question.  If the file looks like an article (i.e., the first
16431 few lines look like headers), it will use this as the head.  If this is
16432 just some arbitrary file without a head (e.g. a C source file),
16433 @code{nneething} will cobble up a header out of thin air.  It will use
16434 file ownership, name and date and do whatever it can with these
16435 elements.
16436
16437 All this should happen automatically for you, and you will be presented
16438 with something that looks very much like a newsgroup.  Totally like a
16439 newsgroup, to be precise.  If you select an article, it will be displayed
16440 in the article buffer, just as usual.
16441
16442 If you select a line that represents a directory, Gnus will pop you into
16443 a new summary buffer for this @code{nneething} group.  And so on.  You can
16444 traverse the entire disk this way, if you feel like, but remember that
16445 Gnus is not dired, really, and does not intend to be, either.
16446
16447 There are two overall modes to this action---ephemeral or solid.  When
16448 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16449 will not store information on what files you have read, and what files
16450 are new, and so on.  If you create a solid @code{nneething} group the
16451 normal way with @kbd{G m}, Gnus will store a mapping table between
16452 article numbers and file names, and you can treat this group like any
16453 other groups.  When you activate a solid @code{nneething} group, you will
16454 be told how many unread articles it contains, etc., etc.
16455
16456 Some variables:
16457
16458 @table @code
16459 @item nneething-map-file-directory
16460 @vindex nneething-map-file-directory
16461 All the mapping files for solid @code{nneething} groups will be stored
16462 in this directory, which defaults to @file{~/.nneething/}.
16463
16464 @item nneething-exclude-files
16465 @vindex nneething-exclude-files
16466 All files that match this regexp will be ignored.  Nice to use to exclude
16467 auto-save files and the like, which is what it does by default.
16468
16469 @item nneething-include-files
16470 @vindex nneething-include-files
16471 Regexp saying what files to include in the group.  If this variable is
16472 non-@code{nil}, only files matching this regexp will be included.
16473
16474 @item nneething-map-file
16475 @vindex nneething-map-file
16476 Name of the map files.
16477 @end table
16478
16479
16480 @node Document Groups
16481 @subsection Document Groups
16482 @cindex nndoc
16483 @cindex documentation group
16484 @cindex help group
16485
16486 @code{nndoc} is a cute little thing that will let you read a single file
16487 as a newsgroup.  Several files types are supported:
16488
16489 @table @code
16490 @cindex Babyl
16491 @cindex Rmail mbox
16492
16493 @item babyl
16494 The Babyl (Rmail) mail box.
16495 @cindex mbox
16496 @cindex Unix mbox
16497
16498 @item mbox
16499 The standard Unix mbox file.
16500
16501 @cindex MMDF mail box
16502 @item mmdf
16503 The MMDF mail box format.
16504
16505 @item news
16506 Several news articles appended into a file.
16507
16508 @item rnews
16509 @cindex rnews batch files
16510 The rnews batch transport format.
16511 @cindex forwarded messages
16512
16513 @item forward
16514 Forwarded articles.
16515
16516 @item nsmail
16517 Netscape mail boxes.
16518
16519 @item mime-parts
16520 @acronym{MIME} multipart messages.
16521
16522 @item standard-digest
16523 The standard (RFC 1153) digest format.
16524
16525 @item mime-digest
16526 A @acronym{MIME} digest of messages.
16527
16528 @item lanl-gov-announce
16529 Announcement messages from LANL Gov Announce.
16530
16531 @item rfc822-forward
16532 A message forwarded according to RFC822.
16533
16534 @item outlook
16535 The Outlook mail box.
16536
16537 @item oe-dbx
16538 The Outlook Express dbx mail box.
16539
16540 @item exim-bounce
16541 A bounce message from the Exim MTA.
16542
16543 @item forward
16544 A message forwarded according to informal rules.
16545
16546 @item rfc934
16547 An RFC934-forwarded message.
16548
16549 @item mailman
16550 A mailman digest.
16551
16552 @item clari-briefs
16553 A digest of Clarinet brief news items.
16554
16555 @item slack-digest
16556 Non-standard digest format---matches most things, but does it badly.
16557
16558 @item mail-in-mail
16559 The last resort.
16560 @end table
16561
16562 You can also use the special ``file type'' @code{guess}, which means
16563 that @code{nndoc} will try to guess what file type it is looking at.
16564 @code{digest} means that @code{nndoc} should guess what digest type the
16565 file is.
16566
16567 @code{nndoc} will not try to change the file or insert any extra headers into
16568 it---it will simply, like, let you use the file as the basis for a
16569 group.  And that's it.
16570
16571 If you have some old archived articles that you want to insert into your
16572 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16573 that.  Say you have an old @file{RMAIL} file with mail that you now want
16574 to split into your new @code{nnml} groups.  You look at that file using
16575 @code{nndoc} (using the @kbd{G f} command in the group buffer
16576 (@pxref{Foreign Groups})), set the process mark on all the articles in
16577 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16578 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16579 file is now also stored in lots of @code{nnml} directories, and you can
16580 delete that pesky @file{RMAIL} file.  If you have the guts!
16581
16582 Virtual server variables:
16583
16584 @table @code
16585 @item nndoc-article-type
16586 @vindex nndoc-article-type
16587 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16588 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16589 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16590 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16591 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16592
16593 @item nndoc-post-type
16594 @vindex nndoc-post-type
16595 This variable says whether Gnus is to consider the group a news group or
16596 a mail group.  There are two valid values:  @code{mail} (the default)
16597 and @code{news}.
16598 @end table
16599
16600 @menu
16601 * Document Server Internals::   How to add your own document types.
16602 @end menu
16603
16604
16605 @node Document Server Internals
16606 @subsubsection Document Server Internals
16607
16608 Adding new document types to be recognized by @code{nndoc} isn't
16609 difficult.  You just have to whip up a definition of what the document
16610 looks like, write a predicate function to recognize that document type,
16611 and then hook into @code{nndoc}.
16612
16613 First, here's an example document type definition:
16614
16615 @example
16616 (mmdf
16617  (article-begin .  "^\^A\^A\^A\^A\n")
16618  (body-end .  "^\^A\^A\^A\^A\n"))
16619 @end example
16620
16621 The definition is simply a unique @dfn{name} followed by a series of
16622 regexp pseudo-variable settings.  Below are the possible
16623 variables---don't be daunted by the number of variables; most document
16624 types can be defined with very few settings:
16625
16626 @table @code
16627 @item first-article
16628 If present, @code{nndoc} will skip past all text until it finds
16629 something that match this regexp.  All text before this will be
16630 totally ignored.
16631
16632 @item article-begin
16633 This setting has to be present in all document type definitions.  It
16634 says what the beginning of each article looks like.
16635
16636 @item head-begin-function
16637 If present, this should be a function that moves point to the head of
16638 the article.
16639
16640 @item nndoc-head-begin
16641 If present, this should be a regexp that matches the head of the
16642 article.
16643
16644 @item nndoc-head-end
16645 This should match the end of the head of the article.  It defaults to
16646 @samp{^$}---the empty line.
16647
16648 @item body-begin-function
16649 If present, this function should move point to the beginning of the body
16650 of the article.
16651
16652 @item body-begin
16653 This should match the beginning of the body of the article.  It defaults
16654 to @samp{^\n}.
16655
16656 @item body-end-function
16657 If present, this function should move point to the end of the body of
16658 the article.
16659
16660 @item body-end
16661 If present, this should match the end of the body of the article.
16662
16663 @item file-end
16664 If present, this should match the end of the file.  All text after this
16665 regexp will be totally ignored.
16666
16667 @end table
16668
16669 So, using these variables @code{nndoc} is able to dissect a document
16670 file into a series of articles, each with a head and a body.  However, a
16671 few more variables are needed since not all document types are all that
16672 news-like---variables needed to transform the head or the body into
16673 something that's palatable for Gnus:
16674
16675 @table @code
16676 @item prepare-body-function
16677 If present, this function will be called when requesting an article.  It
16678 will be called with point at the start of the body, and is useful if the
16679 document has encoded some parts of its contents.
16680
16681 @item article-transform-function
16682 If present, this function is called when requesting an article.  It's
16683 meant to be used for more wide-ranging transformation of both head and
16684 body of the article.
16685
16686 @item generate-head-function
16687 If present, this function is called to generate a head that Gnus can
16688 understand.  It is called with the article number as a parameter, and is
16689 expected to generate a nice head for the article in question.  It is
16690 called when requesting the headers of all articles.
16691
16692 @end table
16693
16694 Let's look at the most complicated example I can come up with---standard
16695 digests:
16696
16697 @example
16698 (standard-digest
16699  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16700  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16701  (prepare-body-function . nndoc-unquote-dashes)
16702  (body-end-function . nndoc-digest-body-end)
16703  (head-end . "^ ?$")
16704  (body-begin . "^ ?\n")
16705  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16706  (subtype digest guess))
16707 @end example
16708
16709 We see that all text before a 70-width line of dashes is ignored; all
16710 text after a line that starts with that @samp{^End of} is also ignored;
16711 each article begins with a 30-width line of dashes; the line separating
16712 the head from the body may contain a single space; and that the body is
16713 run through @code{nndoc-unquote-dashes} before being delivered.
16714
16715 To hook your own document definition into @code{nndoc}, use the
16716 @code{nndoc-add-type} function.  It takes two parameters---the first
16717 is the definition itself and the second (optional) parameter says
16718 where in the document type definition alist to put this definition.
16719 The alist is traversed sequentially, and
16720 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16721 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16722 @code{mmdf} type, and so on.  These type predicates should return
16723 @code{nil} if the document is not of the correct type; @code{t} if it
16724 is of the correct type; and a number if the document might be of the
16725 correct type.  A high number means high probability; a low number
16726 means low probability with @samp{0} being the lowest valid number.
16727
16728
16729 @node SOUP
16730 @subsection SOUP
16731 @cindex SOUP
16732 @cindex offline
16733
16734 In the PC world people often talk about ``offline'' newsreaders.  These
16735 are thingies that are combined reader/news transport monstrosities.
16736 With built-in modem programs.  Yecchh!
16737
16738 Of course, us Unix Weenie types of human beans use things like
16739 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16740 transport things like Ghod intended.  And then we just use normal
16741 newsreaders.
16742
16743 However, it can sometimes be convenient to do something that's a bit
16744 easier on the brain if you have a very slow modem, and you're not really
16745 that interested in doing things properly.
16746
16747 A file format called @sc{soup} has been developed for transporting news
16748 and mail from servers to home machines and back again.  It can be a bit
16749 fiddly.
16750
16751 First some terminology:
16752
16753 @table @dfn
16754
16755 @item server
16756 This is the machine that is connected to the outside world and where you
16757 get news and/or mail from.
16758
16759 @item home machine
16760 This is the machine that you want to do the actual reading and responding
16761 on.  It is typically not connected to the rest of the world in any way.
16762
16763 @item packet
16764 Something that contains messages and/or commands.  There are two kinds
16765 of packets:
16766
16767 @table @dfn
16768 @item message packets
16769 These are packets made at the server, and typically contain lots of
16770 messages for you to read.  These are called @file{SoupoutX.tgz} by
16771 default, where @var{x} is a number.
16772
16773 @item response packets
16774 These are packets made at the home machine, and typically contains
16775 replies that you've written.  These are called @file{SoupinX.tgz} by
16776 default, where @var{x} is a number.
16777
16778 @end table
16779
16780 @end table
16781
16782
16783 @enumerate
16784
16785 @item
16786 You log in on the server and create a @sc{soup} packet.  You can either
16787 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16788 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16789 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16790
16791 @item
16792 You transfer the packet home.  Rail, boat, car or modem will do fine.
16793
16794 @item
16795 You put the packet in your home directory.
16796
16797 @item
16798 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16799 the native or secondary server.
16800
16801 @item
16802 You read articles and mail and answer and followup to the things you
16803 want (@pxref{SOUP Replies}).
16804
16805 @item
16806 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16807 packet.
16808
16809 @item
16810 You transfer this packet to the server.
16811
16812 @item
16813 You use Gnus to mail this packet out with the @kbd{G s s} command.
16814
16815 @item
16816 You then repeat until you die.
16817
16818 @end enumerate
16819
16820 So you basically have a bipartite system---you use @code{nnsoup} for
16821 reading and Gnus for packing/sending these @sc{soup} packets.
16822
16823 @menu
16824 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16825 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16826 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16827 @end menu
16828
16829
16830 @node SOUP Commands
16831 @subsubsection SOUP Commands
16832
16833 These are commands for creating and manipulating @sc{soup} packets.
16834
16835 @table @kbd
16836 @item G s b
16837 @kindex G s b (Group)
16838 @findex gnus-group-brew-soup
16839 Pack all unread articles in the current group
16840 (@code{gnus-group-brew-soup}).  This command understands the
16841 process/prefix convention.
16842
16843 @item G s w
16844 @kindex G s w (Group)
16845 @findex gnus-soup-save-areas
16846 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16847
16848 @item G s s
16849 @kindex G s s (Group)
16850 @findex gnus-soup-send-replies
16851 Send all replies from the replies packet
16852 (@code{gnus-soup-send-replies}).
16853
16854 @item G s p
16855 @kindex G s p (Group)
16856 @findex gnus-soup-pack-packet
16857 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16858
16859 @item G s r
16860 @kindex G s r (Group)
16861 @findex nnsoup-pack-replies
16862 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16863
16864 @item O s
16865 @kindex O s (Summary)
16866 @findex gnus-soup-add-article
16867 This summary-mode command adds the current article to a @sc{soup} packet
16868 (@code{gnus-soup-add-article}).  It understands the process/prefix
16869 convention (@pxref{Process/Prefix}).
16870
16871 @end table
16872
16873
16874 There are a few variables to customize where Gnus will put all these
16875 thingies:
16876
16877 @table @code
16878
16879 @item gnus-soup-directory
16880 @vindex gnus-soup-directory
16881 Directory where Gnus will save intermediate files while composing
16882 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16883
16884 @item gnus-soup-replies-directory
16885 @vindex gnus-soup-replies-directory
16886 This is what Gnus will use as a temporary directory while sending our
16887 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16888
16889 @item gnus-soup-prefix-file
16890 @vindex gnus-soup-prefix-file
16891 Name of the file where Gnus stores the last used prefix.  The default is
16892 @samp{gnus-prefix}.
16893
16894 @item gnus-soup-packer
16895 @vindex gnus-soup-packer
16896 A format string command for packing a @sc{soup} packet.  The default is
16897 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16898
16899 @item gnus-soup-unpacker
16900 @vindex gnus-soup-unpacker
16901 Format string command for unpacking a @sc{soup} packet.  The default is
16902 @samp{gunzip -c %s | tar xvf -}.
16903
16904 @item gnus-soup-packet-directory
16905 @vindex gnus-soup-packet-directory
16906 Where Gnus will look for reply packets.  The default is @file{~/}.
16907
16908 @item gnus-soup-packet-regexp
16909 @vindex gnus-soup-packet-regexp
16910 Regular expression matching @sc{soup} reply packets in
16911 @code{gnus-soup-packet-directory}.
16912
16913 @end table
16914
16915
16916 @node SOUP Groups
16917 @subsubsection SOUP Groups
16918 @cindex nnsoup
16919
16920 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16921 read incoming packets, unpack them, and put them in a directory where
16922 you can read them at leisure.
16923
16924 These are the variables you can use to customize its behavior:
16925
16926 @table @code
16927
16928 @item nnsoup-tmp-directory
16929 @vindex nnsoup-tmp-directory
16930 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16931 directory.  (@file{/tmp/} by default.)
16932
16933 @item nnsoup-directory
16934 @vindex nnsoup-directory
16935 @code{nnsoup} then moves each message and index file to this directory.
16936 The default is @file{~/SOUP/}.
16937
16938 @item nnsoup-replies-directory
16939 @vindex nnsoup-replies-directory
16940 All replies will be stored in this directory before being packed into a
16941 reply packet.  The default is @file{~/SOUP/replies/}.
16942
16943 @item nnsoup-replies-format-type
16944 @vindex nnsoup-replies-format-type
16945 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16946 (rnews), and I don't think you should touch that variable.  I probably
16947 shouldn't even have documented it.  Drats!  Too late!
16948
16949 @item nnsoup-replies-index-type
16950 @vindex nnsoup-replies-index-type
16951 The index type of the replies packet.  The default is @samp{?n}, which
16952 means ``none''.  Don't fiddle with this one either!
16953
16954 @item nnsoup-active-file
16955 @vindex nnsoup-active-file
16956 Where @code{nnsoup} stores lots of information.  This is not an ``active
16957 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16958 this file or mess it up in any way, you're dead.  The default is
16959 @file{~/SOUP/active}.
16960
16961 @item nnsoup-packer
16962 @vindex nnsoup-packer
16963 Format string command for packing a reply @sc{soup} packet.  The default
16964 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16965
16966 @item nnsoup-unpacker
16967 @vindex nnsoup-unpacker
16968 Format string command for unpacking incoming @sc{soup} packets.  The
16969 default is @samp{gunzip -c %s | tar xvf -}.
16970
16971 @item nnsoup-packet-directory
16972 @vindex nnsoup-packet-directory
16973 Where @code{nnsoup} will look for incoming packets.  The default is
16974 @file{~/}.
16975
16976 @item nnsoup-packet-regexp
16977 @vindex nnsoup-packet-regexp
16978 Regular expression matching incoming @sc{soup} packets.  The default is
16979 @samp{Soupout}.
16980
16981 @item nnsoup-always-save
16982 @vindex nnsoup-always-save
16983 If non-@code{nil}, save the replies buffer after each posted message.
16984
16985 @end table
16986
16987
16988 @node SOUP Replies
16989 @subsubsection SOUP Replies
16990
16991 Just using @code{nnsoup} won't mean that your postings and mailings end
16992 up in @sc{soup} reply packets automagically.  You have to work a bit
16993 more for that to happen.
16994
16995 @findex nnsoup-set-variables
16996 The @code{nnsoup-set-variables} command will set the appropriate
16997 variables to ensure that all your followups and replies end up in the
16998 @sc{soup} system.
16999
17000 In specific, this is what it does:
17001
17002 @lisp
17003 (setq message-send-news-function 'nnsoup-request-post)
17004 (setq message-send-mail-function 'nnsoup-request-mail)
17005 @end lisp
17006
17007 And that's it, really.  If you only want news to go into the @sc{soup}
17008 system you just use the first line.  If you only want mail to be
17009 @sc{soup}ed you use the second.
17010
17011
17012 @node Mail-To-News Gateways
17013 @subsection Mail-To-News Gateways
17014 @cindex mail-to-news gateways
17015 @cindex gateways
17016
17017 If your local @code{nntp} server doesn't allow posting, for some reason
17018 or other, you can post using one of the numerous mail-to-news gateways.
17019 The @code{nngateway} back end provides the interface.
17020
17021 Note that you can't read anything from this back end---it can only be
17022 used to post with.
17023
17024 Server variables:
17025
17026 @table @code
17027 @item nngateway-address
17028 @vindex nngateway-address
17029 This is the address of the mail-to-news gateway.
17030
17031 @item nngateway-header-transformation
17032 @vindex nngateway-header-transformation
17033 News headers often have to be transformed in some odd way or other
17034 for the mail-to-news gateway to accept it.  This variable says what
17035 transformation should be called, and defaults to
17036 @code{nngateway-simple-header-transformation}.  The function is called
17037 narrowed to the headers to be transformed and with one parameter---the
17038 gateway address.
17039
17040 This default function just inserts a new @code{To} header based on the
17041 @code{Newsgroups} header and the gateway address.
17042 For instance, an article with this @code{Newsgroups} header:
17043
17044 @example
17045 Newsgroups: alt.religion.emacs
17046 @end example
17047
17048 will get this @code{To} header inserted:
17049
17050 @example
17051 To: alt-religion-emacs@@GATEWAY
17052 @end example
17053
17054 The following pre-defined functions exist:
17055
17056 @findex nngateway-simple-header-transformation
17057 @table @code
17058
17059 @item nngateway-simple-header-transformation
17060 Creates a @code{To} header that looks like
17061 @var{newsgroup}@@@code{nngateway-address}.
17062
17063 @findex nngateway-mail2news-header-transformation
17064
17065 @item nngateway-mail2news-header-transformation
17066 Creates a @code{To} header that looks like
17067 @code{nngateway-address}.
17068 @end table
17069
17070 @end table
17071
17072 Here's an example:
17073
17074 @lisp
17075 (setq gnus-post-method
17076       '(nngateway
17077         "mail2news@@replay.com"
17078         (nngateway-header-transformation
17079          nngateway-mail2news-header-transformation)))
17080 @end lisp
17081
17082 So, to use this, simply say something like:
17083
17084 @lisp
17085 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17086 @end lisp
17087
17088
17089
17090 @node Combined Groups
17091 @section Combined Groups
17092
17093 Gnus allows combining a mixture of all the other group types into bigger
17094 groups.
17095
17096 @menu
17097 * Virtual Groups::              Combining articles from many groups.
17098 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17099 @end menu
17100
17101
17102 @node Virtual Groups
17103 @subsection Virtual Groups
17104 @cindex nnvirtual
17105 @cindex virtual groups
17106 @cindex merging groups
17107
17108 An @dfn{nnvirtual group} is really nothing more than a collection of
17109 other groups.
17110
17111 For instance, if you are tired of reading many small groups, you can
17112 put them all in one big group, and then grow tired of reading one
17113 big, unwieldy group.  The joys of computing!
17114
17115 You specify @code{nnvirtual} as the method.  The address should be a
17116 regexp to match component groups.
17117
17118 All marks in the virtual group will stick to the articles in the
17119 component groups.  So if you tick an article in a virtual group, the
17120 article will also be ticked in the component group from whence it
17121 came.  (And vice versa---marks from the component groups will also be
17122 shown in the virtual group.).  To create an empty virtual group, run
17123 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17124 and edit the method regexp with @kbd{M-e}
17125 (@code{gnus-group-edit-group-method})
17126
17127 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17128 newsgroups into one, big, happy newsgroup:
17129
17130 @lisp
17131 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17132 @end lisp
17133
17134 The component groups can be native or foreign; everything should work
17135 smoothly, but if your computer explodes, it was probably my fault.
17136
17137 Collecting the same group from several servers might actually be a good
17138 idea if users have set the Distribution header to limit distribution.
17139 If you would like to read @samp{soc.motss} both from a server in Japan
17140 and a server in Norway, you could use the following as the group regexp:
17141
17142 @example
17143 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17144 @end example
17145
17146 (Remember, though, that if you're creating the group with @kbd{G m}, you
17147 shouldn't double the backslashes, and you should leave off the quote
17148 characters at the beginning and the end of the string.)
17149
17150 This should work kinda smoothly---all articles from both groups should
17151 end up in this one, and there should be no duplicates.  Threading (and
17152 the rest) will still work as usual, but there might be problems with the
17153 sequence of articles.  Sorting on date might be an option here
17154 (@pxref{Selecting a Group}).
17155
17156 One limitation, however---all groups included in a virtual
17157 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17158 zombie groups can't be component groups for @code{nnvirtual} groups.
17159
17160 @vindex nnvirtual-always-rescan
17161 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17162 @code{nnvirtual} will always scan groups for unread articles when
17163 entering a virtual group.  If this variable is @code{nil} (which is the
17164 default) and you read articles in a component group after the virtual
17165 group has been activated, the read articles from the component group
17166 will show up when you enter the virtual group.  You'll also see this
17167 effect if you have two virtual groups that have a component group in
17168 common.  If that's the case, you should set this variable to @code{t}.
17169 Or you can just tap @code{M-g} on the virtual group every time before
17170 you enter it---it'll have much the same effect.
17171
17172 @code{nnvirtual} can have both mail and news groups as component groups.
17173 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17174 has to ask the back end of the component group the article comes from
17175 whether it is a news or mail back end.  However, when you do a @kbd{^},
17176 there is typically no sure way for the component back end to know this,
17177 and in that case @code{nnvirtual} tells Gnus that the article came from a
17178 not-news back end.  (Just to be on the safe side.)
17179
17180 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17181 line from the article you respond to in these cases.
17182
17183 @code{nnvirtual} groups do not inherit anything but articles and marks
17184 from component groups---group parameters, for instance, are not
17185 inherited.
17186
17187
17188 @node Kibozed Groups
17189 @subsection Kibozed Groups
17190 @cindex nnkiboze
17191 @cindex kibozing
17192
17193 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17194 the news feed''.  @code{nnkiboze} is a back end that will do this for
17195 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17196 with useless requests!  Oh happiness!
17197
17198 @kindex G k (Group)
17199 To create a kibozed group, use the @kbd{G k} command in the group
17200 buffer.
17201
17202 The address field of the @code{nnkiboze} method is, as with
17203 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17204 @code{nnkiboze} group.  That's where most similarities between
17205 @code{nnkiboze} and @code{nnvirtual} end.
17206
17207 In addition to this regexp detailing component groups, an
17208 @code{nnkiboze} group must have a score file to say what articles are
17209 to be included in the group (@pxref{Scoring}).
17210
17211 @kindex M-x nnkiboze-generate-groups
17212 @findex nnkiboze-generate-groups
17213 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17214 @code{nnkiboze} groups you want to have.  This command will take time.
17215 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17216 headers from all the articles in all the component groups and run them
17217 through the scoring process to determine if there are any articles in
17218 the groups that are to be part of the @code{nnkiboze} groups.
17219
17220 Please limit the number of component groups by using restrictive
17221 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17222 @acronym{NNTP} site may throw you off and never let you back in again.
17223 Stranger things have happened.
17224
17225 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17226 and they can be foreign.  No restrictions.
17227
17228 @vindex nnkiboze-directory
17229 The generation of an @code{nnkiboze} group means writing two files in
17230 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17231 contains the @acronym{NOV} header lines for all the articles in the group,
17232 and the other is an additional @file{.newsrc} file to store information
17233 on what groups have been searched through to find component articles.
17234
17235 Articles marked as read in the @code{nnkiboze} group will have
17236 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17237
17238
17239 @node Gnus Unplugged
17240 @section Gnus Unplugged
17241 @cindex offline
17242 @cindex unplugged
17243 @cindex agent
17244 @cindex Gnus agent
17245 @cindex Gnus unplugged
17246
17247 In olden times (ca. February '88), people used to run their newsreaders
17248 on big machines with permanent connections to the net.  News transport
17249 was dealt with by news servers, and all the newsreaders had to do was to
17250 read news.  Believe it or not.
17251
17252 Nowadays most people read news and mail at home, and use some sort of
17253 modem to connect to the net.  To avoid running up huge phone bills, it
17254 would be nice to have a way to slurp down all the news and mail, hang up
17255 the phone, read for several hours, and then upload any responses you
17256 have to make.  And then you repeat the procedure.
17257
17258 Of course, you can use news servers for doing this as well.  I've used
17259 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17260 for some years, but doing that's a bore.  Moving the news server
17261 functionality up to the newsreader makes sense if you're the only person
17262 reading news on a machine.
17263
17264 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17265 fact, you don't even have to configure anything.
17266
17267 Of course, to use it as such, you have to learn a few new commands.
17268
17269 @menu
17270 * Agent Basics::                How it all is supposed to work.
17271 * Agent Categories::            How to tell the Gnus Agent what to download.
17272 * Agent Commands::              New commands for all the buffers.
17273 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17274 * Agent as Cache::              The Agent is a big cache too.
17275 * Agent Expiry::                How to make old articles go away.
17276 * Agent Regeneration::          How to recover from lost connections and other accidents.
17277 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17278 * Outgoing Messages::           What happens when you post/mail something?
17279 * Agent Variables::             Customizing is fun.
17280 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17281 * Batching Agents::             How to fetch news from a @code{cron} job.
17282 * Agent Caveats::               What you think it'll do and what it does.
17283 @end menu
17284
17285
17286 @node Agent Basics
17287 @subsection Agent Basics
17288
17289 First, let's get some terminology out of the way.
17290
17291 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17292 connection to the net (and notified the Agent that this is the case).
17293 When the connection to the net is up again (and Gnus knows this), the
17294 Agent is @dfn{plugged}.
17295
17296 The @dfn{local} machine is the one you're running on, and which isn't
17297 connected to the net continuously.
17298
17299 @dfn{Downloading} means fetching things from the net to your local
17300 machine.  @dfn{Uploading} is doing the opposite.
17301
17302 You know that Gnus gives you all the opportunity you'd ever want for
17303 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17304 is also customizable to a great extent, which means that the user has a
17305 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17306 you in your foot, but with Gnus, you have a choice!
17307
17308 Gnus is never really in plugged or unplugged state.  Rather, it applies
17309 that state to each server individually.  This means that some servers
17310 can be plugged while others can be unplugged.  Additionally, some
17311 servers can be ignored by the Agent altogether (which means that
17312 they're kinda like plugged always).
17313
17314 So when you unplug the Agent and then wonder why is Gnus opening a
17315 connection to the Net, the next step to do is to look whether all
17316 servers are agentized.  If there is an unagentized server, you found
17317 the culprit.
17318
17319 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17320 reachable.  When Gnus notices this, it asks you whether you want the
17321 server to be switched to offline state.  If you say yes, then the
17322 server will behave somewhat as if it was unplugged, except that Gnus
17323 will ask you whether you want to switch it back online again.
17324
17325 Let's take a typical Gnus session using the Agent.
17326
17327 @itemize @bullet
17328
17329 @item
17330 @findex gnus-unplugged
17331 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17332 Agent in a disconnected state.  You can read all the news that you have
17333 already fetched while in this mode.
17334
17335 @item
17336 You then decide to see whether any new news has arrived.  You connect
17337 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17338 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17339 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17340 Source Specifiers}).
17341
17342 @item
17343 You can then read the new news immediately, or you can download the
17344 news onto your local machine.  If you want to do the latter, you press
17345 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17346 all the eligible articles in all the groups.  (To let Gnus know which
17347 articles you want to download, @pxref{Agent Categories}).
17348
17349 @item
17350 After fetching the articles, you press @kbd{J j} to make Gnus become
17351 unplugged again, and you shut down the PPP thing (or whatever).  And
17352 then you read the news offline.
17353
17354 @item
17355 And then you go to step 2.
17356 @end itemize
17357
17358 Here are some things you should do the first time (or so) that you use
17359 the Agent.
17360
17361 @itemize @bullet
17362
17363 @item
17364 Decide which servers should be covered by the Agent.  If you have a mail
17365 back end, it would probably be nonsensical to have it covered by the
17366 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17367 @kbd{J a} on the server (or servers) that you wish to have covered by the
17368 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17369 added servers you do not wish to have covered by the Agent.  By default,
17370 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17371 @code{gnus-secondary-select-methods} are agentized.
17372
17373 @item
17374 Decide on download policy.  It's fairly simple once you decide whether
17375 you are going to use agent categories, topic parameters, and/or group
17376 parameters to implement your policy.  If you're new to gnus, it
17377 is probably best to start with a category, @xref{Agent Categories}.
17378
17379 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17380 (@pxref{Agent Categories}) provide for setting a policy that applies
17381 to multiple groups.  Which you use is entirely up to you.  Topic
17382 parameters do override categories so, if you mix the two, you'll have
17383 to take that into account.  If you have a few groups that deviate from
17384 your policy, you can use group parameters (@pxref{Group Parameters}) to
17385 configure them.
17386
17387 @item
17388 Uhm@dots{} that's it.
17389 @end itemize
17390
17391
17392 @node Agent Categories
17393 @subsection Agent Categories
17394
17395 One of the main reasons to integrate the news transport layer into the
17396 newsreader is to allow greater control over what articles to download.
17397 There's not much point in downloading huge amounts of articles, just to
17398 find out that you're not interested in reading any of them.  It's better
17399 to be somewhat more conservative in choosing what to download, and then
17400 mark the articles for downloading manually if it should turn out that
17401 you're interested in the articles anyway.
17402
17403 One of the more effective methods for controlling what is to be
17404 downloaded is to create a @dfn{category} and then assign some (or all)
17405 groups to this category.  Groups that do not belong in any other
17406 category belong to the @code{default} category.  Gnus has its own
17407 buffer for creating and managing categories.
17408
17409 If you prefer, you can also use group parameters (@pxref{Group
17410 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17411 alternative approach to controlling the agent.  The only real
17412 difference is that categories are specific to the agent (so there is
17413 less to learn) while group and topic parameters include the kitchen
17414 sink.
17415
17416 Since you can set agent parameters in several different places we have
17417 a rule to decide which source to believe.  This rule specifies that
17418 the parameter sources are checked in the following order: group
17419 parameters, topic parameters, agent category, and finally customizable
17420 variables.  So you can mix all of these sources to produce a wide range
17421 of behavior, just don't blame me if you don't remember where you put
17422 your settings.
17423
17424 @menu
17425 * Category Syntax::             What a category looks like.
17426 * Category Buffer::             A buffer for maintaining categories.
17427 * Category Variables::          Customize'r'Us.
17428 @end menu
17429
17430
17431 @node Category Syntax
17432 @subsubsection Category Syntax
17433
17434 A category consists of a name, the list of groups belonging to the
17435 category, and a number of optional parameters that override the
17436 customizable variables.  The complete list of agent parameters are
17437 listed below.
17438
17439 @table @code
17440 @item gnus-agent-cat-name
17441 The name of the category.
17442
17443 @item gnus-agent-cat-groups
17444 The list of groups that are in this category.
17445
17446 @item gnus-agent-cat-predicate
17447 A predicate which (generally) gives a rough outline of which articles
17448 are eligible for downloading; and
17449
17450 @item gnus-agent-cat-score-file
17451 a score rule which (generally) gives you a finer granularity when
17452 deciding what articles to download.  (Note that this @dfn{download
17453 score} is not necessarily related to normal scores.)
17454
17455 @item gnus-agent-cat-enable-expiration
17456 a boolean indicating whether the agent should expire old articles in
17457 this group.  Most groups should be expired to conserve disk space.  In
17458 fact, its probably safe to say that the gnus.* hierarchy contains the
17459 only groups that should not be expired.
17460
17461 @item gnus-agent-cat-days-until-old
17462 an integer indicating the number of days that the agent should wait
17463 before deciding that a read article is safe to expire.
17464
17465 @item gnus-agent-cat-low-score
17466 an integer that overrides the value of @code{gnus-agent-low-score}.
17467
17468 @item gnus-agent-cat-high-score
17469 an integer that overrides the value of @code{gnus-agent-high-score}.
17470
17471 @item gnus-agent-cat-length-when-short
17472 an integer that overrides the value of
17473 @code{gnus-agent-short-article}.
17474
17475 @item gnus-agent-cat-length-when-long
17476 an integer that overrides the value of @code{gnus-agent-long-article}.
17477 @end table
17478
17479 The name of a category can not be changed once the category has been
17480 created.
17481
17482 Each category maintains a list of groups that are exclusive members of
17483 that category.  The exclusivity rule is automatically enforced, add a
17484 group to a new category and it is automatically removed from its old
17485 category.
17486
17487 A predicate in its simplest form can be a single predicate such as
17488 @code{true} or @code{false}.  These two will download every available
17489 article or nothing respectively.  In the case of these two special
17490 predicates an additional score rule is superfluous.
17491
17492 Predicates of @code{high} or @code{low} download articles in respect of
17493 their scores in relationship to @code{gnus-agent-high-score} and
17494 @code{gnus-agent-low-score} as described below.
17495
17496 To gain even finer control of what is to be regarded eligible for
17497 download a predicate can consist of a number of predicates with logical
17498 operators sprinkled in between.
17499
17500 Perhaps some examples are in order.
17501
17502 Here's a simple predicate.  (It's the default predicate, in fact, used
17503 for all groups that don't belong to any other category.)
17504
17505 @lisp
17506 short
17507 @end lisp
17508
17509 Quite simple, eh?  This predicate is true if and only if the article is
17510 short (for some value of ``short'').
17511
17512 Here's a more complex predicate:
17513
17514 @lisp
17515 (or high
17516     (and
17517      (not low)
17518      (not long)))
17519 @end lisp
17520
17521 This means that an article should be downloaded if it has a high score,
17522 or if the score is not low and the article is not long.  You get the
17523 drift.
17524
17525 The available logical operators are @code{or}, @code{and} and
17526 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17527 @samp{|}, @code{&} and @code{!} instead.)
17528
17529 The following predicates are pre-defined, but if none of these fit what
17530 you want to do, you can write your own.
17531
17532 When evaluating each of these predicates, the named constant will be
17533 bound to the value determined by calling
17534 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17535 example, gnus-agent-short-article will be bound to
17536 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17537 means that you can specify a predicate in your category then tune that
17538 predicate to individual groups.
17539
17540 @table @code
17541 @item short
17542 True iff the article is shorter than @code{gnus-agent-short-article}
17543 lines; default 100.
17544
17545 @item long
17546 True iff the article is longer than @code{gnus-agent-long-article}
17547 lines; default 200.
17548
17549 @item low
17550 True iff the article has a download score less than
17551 @code{gnus-agent-low-score}; default 0.
17552
17553 @item high
17554 True iff the article has a download score greater than
17555 @code{gnus-agent-high-score}; default 0.
17556
17557 @item spam
17558 True iff the Gnus Agent guesses that the article is spam.  The
17559 heuristics may change over time, but at present it just computes a
17560 checksum and sees whether articles match.
17561
17562 @item true
17563 Always true.
17564
17565 @item false
17566 Always false.
17567 @end table
17568
17569 If you want to create your own predicate function, here's what you have
17570 to know:  The functions are called with no parameters, but the
17571 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17572 useful values.
17573
17574 For example, you could decide that you don't want to download articles
17575 that were posted more than a certain number of days ago (e.g. posted
17576 more than @code{gnus-agent-expire-days} ago) you might write a function
17577 something along the lines of the following:
17578
17579 @lisp
17580 (defun my-article-old-p ()
17581   "Say whether an article is old."
17582   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17583      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17584 @end lisp
17585
17586 with the predicate then defined as:
17587
17588 @lisp
17589 (not my-article-old-p)
17590 @end lisp
17591
17592 or you could append your predicate to the predefined
17593 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17594 wherever.
17595
17596 @lisp
17597 (require 'gnus-agent)
17598 (setq  gnus-category-predicate-alist
17599   (append gnus-category-predicate-alist
17600          '((old . my-article-old-p))))
17601 @end lisp
17602
17603 and simply specify your predicate as:
17604
17605 @lisp
17606 (not old)
17607 @end lisp
17608
17609 If/when using something like the above, be aware that there are many
17610 misconfigured systems/mailers out there and so an article's date is not
17611 always a reliable indication of when it was posted.  Hell, some people
17612 just don't give a damn.
17613
17614 The above predicates apply to @emph{all} the groups which belong to the
17615 category.  However, if you wish to have a specific predicate for an
17616 individual group within a category, or you're just too lazy to set up a
17617 new category, you can enter a group's individual predicate in its group
17618 parameters like so:
17619
17620 @lisp
17621 (agent-predicate . short)
17622 @end lisp
17623
17624 This is the group/topic parameter equivalent of the agent category default.
17625 Note that when specifying a single word predicate like this, the
17626 @code{agent-predicate} specification must be in dotted pair notation.
17627
17628 The equivalent of the longer example from above would be:
17629
17630 @lisp
17631 (agent-predicate or high (and (not low) (not long)))
17632 @end lisp
17633
17634 The outer parenthesis required in the category specification are not
17635 entered here as, not being in dotted pair notation, the value of the
17636 predicate is assumed to be a list.
17637
17638
17639 Now, the syntax of the download score is the same as the syntax of
17640 normal score files, except that all elements that require actually
17641 seeing the article itself are verboten.  This means that only the
17642 following headers can be scored on: @code{Subject}, @code{From},
17643 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17644 @code{Lines}, and @code{Xref}.
17645
17646 As with predicates, the specification of the @code{download score rule}
17647 to use in respect of a group can be in either the category definition if
17648 it's to be applicable to all groups in therein, or a group's parameters
17649 if it's to be specific to that group.
17650
17651 In both of these places the @code{download score rule} can take one of
17652 three forms:
17653
17654 @enumerate
17655 @item
17656 Score rule
17657
17658 This has the same syntax as a normal gnus score file except only a
17659 subset of scoring keywords are available as mentioned above.
17660
17661 example:
17662
17663 @itemize @bullet
17664 @item
17665 Category specification
17666
17667 @lisp
17668 (("from"
17669        ("Lars Ingebrigtsen" 1000000 nil s))
17670 ("lines"
17671        (500 -100 nil <)))
17672 @end lisp
17673
17674 @item
17675 Group/Topic Parameter specification
17676
17677 @lisp
17678 (agent-score ("from"
17679                    ("Lars Ingebrigtsen" 1000000 nil s))
17680              ("lines"
17681                    (500 -100 nil <)))
17682 @end lisp
17683
17684 Again, note the omission of the outermost parenthesis here.
17685 @end itemize
17686
17687 @item
17688 Agent score file
17689
17690 These score files must @emph{only} contain the permitted scoring
17691 keywords stated above.
17692
17693 example:
17694
17695 @itemize @bullet
17696 @item
17697 Category specification
17698
17699 @lisp
17700 ("~/News/agent.SCORE")
17701 @end lisp
17702
17703 or perhaps
17704
17705 @lisp
17706 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17707 @end lisp
17708
17709 @item
17710 Group Parameter specification
17711
17712 @lisp
17713 (agent-score "~/News/agent.SCORE")
17714 @end lisp
17715
17716 Additional score files can be specified as above.  Need I say anything
17717 about parenthesis?
17718 @end itemize
17719
17720 @item
17721 Use @code{normal} score files
17722
17723 If you don't want to maintain two sets of scoring rules for a group, and
17724 your desired @code{downloading} criteria for a group are the same as your
17725 @code{reading} criteria then you can tell the agent to refer to your
17726 @code{normal} score files when deciding what to download.
17727
17728 These directives in either the category definition or a group's
17729 parameters will cause the agent to read in all the applicable score
17730 files for a group, @emph{filtering out} those sections that do not
17731 relate to one of the permitted subset of scoring keywords.
17732
17733 @itemize @bullet
17734 @item
17735 Category Specification
17736
17737 @lisp
17738 file
17739 @end lisp
17740
17741 @item
17742 Group Parameter specification
17743
17744 @lisp
17745 (agent-score . file)
17746 @end lisp
17747 @end itemize
17748 @end enumerate
17749
17750 @node Category Buffer
17751 @subsubsection Category Buffer
17752
17753 You'd normally do all category maintenance from the category buffer.
17754 When you enter it for the first time (with the @kbd{J c} command from
17755 the group buffer), you'll only see the @code{default} category.
17756
17757 The following commands are available in this buffer:
17758
17759 @table @kbd
17760 @item q
17761 @kindex q (Category)
17762 @findex gnus-category-exit
17763 Return to the group buffer (@code{gnus-category-exit}).
17764
17765 @item e
17766 @kindex e (Category)
17767 @findex gnus-category-customize-category
17768 Use a customization buffer to set all of the selected category's
17769 parameters at one time (@code{gnus-category-customize-category}).
17770
17771 @item k
17772 @kindex k (Category)
17773 @findex gnus-category-kill
17774 Kill the current category (@code{gnus-category-kill}).
17775
17776 @item c
17777 @kindex c (Category)
17778 @findex gnus-category-copy
17779 Copy the current category (@code{gnus-category-copy}).
17780
17781 @item a
17782 @kindex a (Category)
17783 @findex gnus-category-add
17784 Add a new category (@code{gnus-category-add}).
17785
17786 @item p
17787 @kindex p (Category)
17788 @findex gnus-category-edit-predicate
17789 Edit the predicate of the current category
17790 (@code{gnus-category-edit-predicate}).
17791
17792 @item g
17793 @kindex g (Category)
17794 @findex gnus-category-edit-groups
17795 Edit the list of groups belonging to the current category
17796 (@code{gnus-category-edit-groups}).
17797
17798 @item s
17799 @kindex s (Category)
17800 @findex gnus-category-edit-score
17801 Edit the download score rule of the current category
17802 (@code{gnus-category-edit-score}).
17803
17804 @item l
17805 @kindex l (Category)
17806 @findex gnus-category-list
17807 List all the categories (@code{gnus-category-list}).
17808 @end table
17809
17810
17811 @node Category Variables
17812 @subsubsection Category Variables
17813
17814 @table @code
17815 @item gnus-category-mode-hook
17816 @vindex gnus-category-mode-hook
17817 Hook run in category buffers.
17818
17819 @item gnus-category-line-format
17820 @vindex gnus-category-line-format
17821 Format of the lines in the category buffer (@pxref{Formatting
17822 Variables}).  Valid elements are:
17823
17824 @table @samp
17825 @item c
17826 The name of the category.
17827
17828 @item g
17829 The number of groups in the category.
17830 @end table
17831
17832 @item gnus-category-mode-line-format
17833 @vindex gnus-category-mode-line-format
17834 Format of the category mode line (@pxref{Mode Line Formatting}).
17835
17836 @item gnus-agent-short-article
17837 @vindex gnus-agent-short-article
17838 Articles that have fewer lines than this are short.  Default 100.
17839
17840 @item gnus-agent-long-article
17841 @vindex gnus-agent-long-article
17842 Articles that have more lines than this are long.  Default 200.
17843
17844 @item gnus-agent-low-score
17845 @vindex gnus-agent-low-score
17846 Articles that have a score lower than this have a low score.  Default
17847 0.
17848
17849 @item gnus-agent-high-score
17850 @vindex gnus-agent-high-score
17851 Articles that have a score higher than this have a high score.  Default
17852 0.
17853
17854 @item gnus-agent-expire-days
17855 @vindex gnus-agent-expire-days
17856 The number of days that a @samp{read} article must stay in the agent's
17857 local disk before becoming eligible for expiration (While the name is
17858 the same, this doesn't mean expiring the article on the server.  It
17859 just means deleting the local copy of the article).  What is also
17860 important to understand is that the counter starts with the time the
17861 article was written to the local disk and not the time the article was
17862 read.
17863 Default 7.
17864
17865 @item gnus-agent-enable-expiration
17866 @vindex gnus-agent-enable-expiration
17867 Determines whether articles in a group are, by default, expired or
17868 retained indefinitely.  The default is @code{ENABLE} which means that
17869 you'll have to disable expiration when desired.  On the other hand,
17870 you could set this to @code{DISABLE}.  In that case, you would then
17871 have to enable expiration in selected groups.
17872
17873 @end table
17874
17875
17876 @node Agent Commands
17877 @subsection Agent Commands
17878 @findex gnus-agent-toggle-plugged
17879 @kindex J j (Agent)
17880
17881 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17882 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17883 toggles the plugged/unplugged state of the Gnus Agent.
17884
17885
17886 @menu
17887 * Group Agent Commands::        Configure groups and fetch their contents.
17888 * Summary Agent Commands::      Manually select then fetch specific articles.
17889 * Server Agent Commands::       Select the servers that are supported by the agent.
17890 @end menu
17891
17892
17893
17894
17895 @node Group Agent Commands
17896 @subsubsection Group Agent Commands
17897
17898 @table @kbd
17899 @item J u
17900 @kindex J u (Agent Group)
17901 @findex gnus-agent-fetch-groups
17902 Fetch all eligible articles in the current group
17903 (@code{gnus-agent-fetch-groups}).
17904
17905 @item J c
17906 @kindex J c (Agent Group)
17907 @findex gnus-enter-category-buffer
17908 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17909
17910 @item J s
17911 @kindex J s (Agent Group)
17912 @findex gnus-agent-fetch-session
17913 Fetch all eligible articles in all groups
17914 (@code{gnus-agent-fetch-session}).
17915
17916 @item J S
17917 @kindex J S (Agent Group)
17918 @findex gnus-group-send-queue
17919 Send all sendable messages in the queue group
17920 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17921
17922 @item J a
17923 @kindex J a (Agent Group)
17924 @findex gnus-agent-add-group
17925 Add the current group to an Agent category
17926 (@code{gnus-agent-add-group}).  This command understands the
17927 process/prefix convention (@pxref{Process/Prefix}).
17928
17929 @item J r
17930 @kindex J r (Agent Group)
17931 @findex gnus-agent-remove-group
17932 Remove the current group from its category, if any
17933 (@code{gnus-agent-remove-group}).  This command understands the
17934 process/prefix convention (@pxref{Process/Prefix}).
17935
17936 @item J Y
17937 @kindex J Y (Agent Group)
17938 @findex gnus-agent-synchronize-flags
17939 Synchronize flags changed while unplugged with remote server, if any.
17940
17941
17942 @end table
17943
17944
17945 @node Summary Agent Commands
17946 @subsubsection Summary Agent Commands
17947
17948 @table @kbd
17949 @item J #
17950 @kindex J # (Agent Summary)
17951 @findex gnus-agent-mark-article
17952 Mark the article for downloading (@code{gnus-agent-mark-article}).
17953
17954 @item J M-#
17955 @kindex J M-# (Agent Summary)
17956 @findex gnus-agent-unmark-article
17957 Remove the downloading mark from the article
17958 (@code{gnus-agent-unmark-article}).
17959
17960 @cindex %
17961 @item @@
17962 @kindex @@ (Agent Summary)
17963 @findex gnus-agent-toggle-mark
17964 Toggle whether to download the article
17965 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17966 default.
17967
17968 @item J c
17969 @kindex J c (Agent Summary)
17970 @findex gnus-agent-catchup
17971 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17972
17973 @item J S
17974 @kindex J S (Agent Summary)
17975 @findex gnus-agent-fetch-group
17976 Download all eligible (@pxref{Agent Categories}) articles in this group.
17977 (@code{gnus-agent-fetch-group}).
17978
17979 @item J s
17980 @kindex J s (Agent Summary)
17981 @findex gnus-agent-fetch-series
17982 Download all processable articles in this group.
17983 (@code{gnus-agent-fetch-series}).
17984
17985 @item J u
17986 @kindex J u (Agent Summary)
17987 @findex gnus-agent-summary-fetch-group
17988 Download all downloadable articles in the current group
17989 (@code{gnus-agent-summary-fetch-group}).
17990
17991 @end table
17992
17993
17994 @node Server Agent Commands
17995 @subsubsection Server Agent Commands
17996
17997 @table @kbd
17998 @item J a
17999 @kindex J a (Agent Server)
18000 @findex gnus-agent-add-server
18001 Add the current server to the list of servers covered by the Gnus Agent
18002 (@code{gnus-agent-add-server}).
18003
18004 @item J r
18005 @kindex J r (Agent Server)
18006 @findex gnus-agent-remove-server
18007 Remove the current server from the list of servers covered by the Gnus
18008 Agent (@code{gnus-agent-remove-server}).
18009
18010 @end table
18011
18012
18013 @node Agent Visuals
18014 @subsection Agent Visuals
18015
18016 If you open a summary while unplugged and, Gnus knows from the group's
18017 active range that there are more articles than the headers currently
18018 stored in the Agent, you may see some articles whose subject looks
18019 something like @samp{[Undownloaded article #####]}.  These are
18020 placeholders for the missing headers.  Aside from setting a mark,
18021 there is not much that can be done with one of these placeholders.
18022 When Gnus finally gets a chance to fetch the group's headers, the
18023 placeholders will automatically be replaced by the actual headers.
18024 You can configure the summary buffer's maneuvering to skip over the
18025 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18026
18027 While it may be obvious to all, the only headers and articles
18028 available while unplugged are those headers and articles that were
18029 fetched into the Agent while previously plugged.  To put it another
18030 way, "If you forget to fetch something while plugged, you might have a
18031 less than satisfying unplugged session".  For this reason, the Agent
18032 adds two visual effects to your summary buffer.  These effects display
18033 the download status of each article so that you always know which
18034 articles will be available when unplugged.
18035
18036 The first visual effect is the @samp{%O} spec.  If you customize
18037 @code{gnus-summary-line-format} to include this specifier, you will add
18038 a single character field that indicates an article's download status.
18039 Articles that have been fetched into either the Agent or the Cache,
18040 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18041 other articles will display @code{gnus-undownloaded-mark} (defaults to
18042 @samp{-}).  If you open a group that has not been agentized, a space
18043 (@samp{ }) will be displayed.
18044
18045 The second visual effect are the undownloaded faces.  The faces, there
18046 are three indicating the article's score (low, normal, high), seem to
18047 result in a love/hate response from many Gnus users.  The problem is
18048 that the face selection is controlled by a list of condition tests and
18049 face names (See @code{gnus-summary-highlight}).  Each condition is
18050 tested in the order in which it appears in the list so early
18051 conditions have precedence over later conditions.  All of this means
18052 that, if you tick an undownloaded article, the article will continue
18053 to be displayed in the undownloaded face rather than the ticked face.
18054
18055 If you use the Agent as a cache (to avoid downloading the same article
18056 each time you visit it or to minimize your connection time), the
18057 undownloaded face will probably seem like a good idea.  The reason
18058 being that you do all of our work (marking, reading, deleting) with
18059 downloaded articles so the normal faces always appear.
18060
18061 For occasional Agent users, the undownloaded faces may appear to be an
18062 absolutely horrible idea.  The issue being that, since most of their
18063 articles have not been fetched into the Agent, most of the normal
18064 faces will be obscured by the undownloaded faces.  If this is your
18065 situation, you have two choices available.  First, you can completely
18066 disable the undownload faces by customizing
18067 @code{gnus-summary-highlight} to delete the three cons-cells that
18068 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18069 you prefer to take a more fine-grained approach, you may set the
18070 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18071 parameter, like all other agent parameters, may be set on an Agent
18072 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18073 Parameters}), or an individual group (@pxref{Group Parameters}).
18074
18075 @node Agent as Cache
18076 @subsection Agent as Cache
18077
18078 When Gnus is plugged, it is not efficient to download headers or
18079 articles from the server again, if they are already stored in the
18080 Agent.  So, Gnus normally only downloads headers once, and stores them
18081 in the Agent.  These headers are later used when generating the summary
18082 buffer, regardless of whether you are plugged or unplugged.  Articles
18083 are not cached in the Agent by default though (that would potentially
18084 consume lots of disk space), but if you have already downloaded an
18085 article into the Agent, Gnus will not download the article from the
18086 server again but use the locally stored copy instead.
18087
18088 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18089 @pxref{Agent Variables}) to always download headers and articles while
18090 plugged.  Gnus will almost certainly be slower, but it will be kept
18091 synchronized with the server.  That last point probably won't make any
18092 sense if you are using a nntp or nnimap back end.
18093
18094 @node Agent Expiry
18095 @subsection Agent Expiry
18096
18097 @vindex gnus-agent-expire-days
18098 @findex gnus-agent-expire
18099 @kindex M-x gnus-agent-expire
18100 @kindex M-x gnus-agent-expire-group
18101 @findex gnus-agent-expire-group
18102 @cindex agent expiry
18103 @cindex Gnus agent expiry
18104 @cindex expiry
18105
18106 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18107 least it doesn't handle it like other back ends.  Instead, there are
18108 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18109 commands that will expire all read articles that are older than
18110 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18111 that you're running out of space.  Neither are particularly fast or
18112 efficient, and it's not a particularly good idea to interrupt them (with
18113 @kbd{C-g} or anything else) once you've started one of them.
18114
18115 Note that other functions, e.g. @code{gnus-request-expire-articles},
18116 might run @code{gnus-agent-expire} for you to keep the agent
18117 synchronized with the group.
18118
18119 The agent parameter @code{agent-enable-expiration} may be used to
18120 prevent expiration in selected groups.
18121
18122 @vindex gnus-agent-expire-all
18123 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18124 expiration commands will expire all articles---unread, read, ticked
18125 and dormant.  If @code{nil} (which is the default), only read articles
18126 are eligible for expiry, and unread, ticked and dormant articles will
18127 be kept indefinitely.
18128
18129 If you find that some articles eligible for expiry are never expired,
18130 perhaps some Gnus Agent files are corrupted.  There's are special
18131 commands, @code{gnus-agent-regenerate} and
18132 @code{gnus-agent-regenerate-group}, to fix possible problems.
18133
18134 @node Agent Regeneration
18135 @subsection Agent Regeneration
18136
18137 @cindex agent regeneration
18138 @cindex Gnus agent regeneration
18139 @cindex regeneration
18140
18141 The local data structures used by @code{nnagent} may become corrupted
18142 due to certain exceptional conditions.  When this happens,
18143 @code{nnagent} functionality may degrade or even fail.  The solution
18144 to this problem is to repair the local data structures by removing all
18145 internal inconsistencies.
18146
18147 For example, if your connection to your server is lost while
18148 downloaded articles into the agent, the local data structures will not
18149 know about articles successfully downloaded prior to the connection
18150 failure.  Running @code{gnus-agent-regenerate} or
18151 @code{gnus-agent-regenerate-group} will update the data structures
18152 such that you don't need to download these articles a second time.
18153
18154 @findex gnus-agent-regenerate
18155 @kindex M-x gnus-agent-regenerate
18156 The command @code{gnus-agent-regenerate} will perform
18157 @code{gnus-agent-regenerate-group} on every agentized group.  While
18158 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18159 recommended that you first close all summary buffers.
18160
18161 @findex gnus-agent-regenerate-group
18162 @kindex M-x gnus-agent-regenerate-group
18163 The command @code{gnus-agent-regenerate-group} uses the local copies
18164 of individual articles to repair the local @acronym{NOV}(header) database.  It
18165 then updates the internal data structures that document which articles
18166 are stored locally.  An optional argument will mark articles in the
18167 agent as unread.
18168
18169 @node Agent and IMAP
18170 @subsection Agent and IMAP
18171
18172 The Agent works with any Gnus back end, including nnimap.  However,
18173 since there are some conceptual differences between @acronym{NNTP} and
18174 @acronym{IMAP}, this section (should) provide you with some information to
18175 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18176
18177 The first thing to keep in mind is that all flags (read, ticked, etc)
18178 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18179 case for nntp.  Thus Gnus need to remember flag changes when
18180 disconnected, and synchronize these flags when you plug back in.
18181
18182 Gnus keeps track of flag changes when reading nnimap groups under the
18183 Agent.  When you plug back in, Gnus will check if you have any changed
18184 any flags and ask if you wish to synchronize these with the server.
18185 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18186
18187 @vindex gnus-agent-synchronize-flags
18188 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18189 never automatically synchronize flags.  If it is @code{ask}, which is
18190 the default, the Agent will check if you made any changes and if so
18191 ask if you wish to synchronize these when you re-connect.  If it has
18192 any other value, all flags will be synchronized automatically.
18193
18194 If you do not wish to synchronize flags automatically when you
18195 re-connect, you can do it manually with the
18196 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18197 in the group buffer.
18198
18199 Some things are currently not implemented in the Agent that you'd might
18200 expect from a disconnected @acronym{IMAP} client, including:
18201
18202 @itemize @bullet
18203
18204 @item
18205 Copying/moving articles into nnimap groups when unplugged.
18206
18207 @item
18208 Creating/deleting nnimap groups when unplugged.
18209
18210 @end itemize
18211
18212 Technical note: the synchronization algorithm does not work by ``pushing''
18213 all local flags to the server, but rather incrementally update the
18214 server view of flags by changing only those flags that were changed by
18215 the user.  Thus, if you set one flag on an article, quit the group and
18216 re-select the group and remove the flag; the flag will be set and
18217 removed from the server when you ``synchronize''.  The queued flag
18218 operations can be found in the per-server @code{flags} file in the Agent
18219 directory.  It's emptied when you synchronize flags.
18220
18221
18222 @node Outgoing Messages
18223 @subsection Outgoing Messages
18224
18225 When Gnus is unplugged, all outgoing messages (both mail and news) are
18226 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18227 them there after posting, and edit them at will.
18228
18229 When Gnus is plugged again, you can send the messages either from the
18230 draft group with the special commands available there, or you can use
18231 the @kbd{J S} command in the group buffer to send all the sendable
18232 messages in the draft group.
18233
18234
18235
18236 @node Agent Variables
18237 @subsection Agent Variables
18238
18239 @table @code
18240 @item gnus-agent-directory
18241 @vindex gnus-agent-directory
18242 Where the Gnus Agent will store its files.  The default is
18243 @file{~/News/agent/}.
18244
18245 @item gnus-agent-handle-level
18246 @vindex gnus-agent-handle-level
18247 Groups on levels (@pxref{Group Levels}) higher than this variable will
18248 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18249 which means that only subscribed group will be considered by the Agent
18250 by default.
18251
18252 @item gnus-agent-plugged-hook
18253 @vindex gnus-agent-plugged-hook
18254 Hook run when connecting to the network.
18255
18256 @item gnus-agent-unplugged-hook
18257 @vindex gnus-agent-unplugged-hook
18258 Hook run when disconnecting from the network.
18259
18260 @item gnus-agent-fetched-hook
18261 @vindex gnus-agent-fetched-hook
18262 Hook run when finished fetching articles.
18263
18264 @item gnus-agent-cache
18265 @vindex gnus-agent-cache
18266 Variable to control whether use the locally stored @acronym{NOV} and
18267 articles when plugged, e.g. essentially using the Agent as a cache.
18268 The default is non-@code{nil}, which means to use the Agent as a cache.
18269
18270 @item gnus-agent-go-online
18271 @vindex gnus-agent-go-online
18272 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18273 automatically switch offline servers into online status.  If it is
18274 @code{ask}, the default, the Agent will ask if you wish to switch
18275 offline servers into online status when you re-connect.  If it has any
18276 other value, all offline servers will be automatically switched into
18277 online status.
18278
18279 @item gnus-agent-mark-unread-after-downloaded
18280 @vindex gnus-agent-mark-unread-after-downloaded
18281 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18282 mark articles as unread after downloading.  This is usually a safe
18283 thing to do as the newly downloaded article has obviously not been
18284 read.  The default is t.
18285
18286 @item gnus-agent-consider-all-articles
18287 @vindex gnus-agent-consider-all-articles
18288 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18289 agent will fetch all missing headers.  When @code{nil}, the agent will
18290 fetch only new headers.  The default is @code{nil}.
18291
18292 @item gnus-agent-max-fetch-size
18293 @vindex gnus-agent-max-fetch-size
18294 The agent fetches articles into a temporary buffer prior to parsing
18295 them into individual files.  To avoid exceeding the max. buffer size,
18296 the agent alternates between fetching and parsing until all articles
18297 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18298 limit to control how often the cycling occurs.  A large value improves
18299 performance.  A small value minimizes the time lost should the
18300 connection be lost while fetching (You may need to run
18301 @code{gnus-agent-regenerate-group} to update the group's state.
18302 However, all articles parsed prior to loosing the connection will be
18303 available while unplugged).  The default is 10M so it is unusual to
18304 see any cycling.
18305
18306 @item gnus-server-unopen-status
18307 @vindex gnus-server-unopen-status
18308 Perhaps not an Agent variable, but closely related to the Agent, this
18309 variable says what will happen if Gnus cannot open a server.  If the
18310 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18311 whether to deny the server or whether to unplug the agent.  If the
18312 Agent is disabled, Gnus always simply deny the server.  Other choices
18313 for this variable include @code{denied} and @code{offline} the latter
18314 is only valid if the Agent is used.
18315
18316 @item gnus-auto-goto-ignores
18317 @vindex gnus-auto-goto-ignores
18318 Another variable that isn't an Agent variable, yet so closely related
18319 that most will look for it here, this variable tells the summary
18320 buffer how to maneuver around undownloaded (only headers stored in the
18321 agent) and unfetched (neither article nor headers stored) articles.
18322
18323 The legal values are @code{nil} (maneuver to any article),
18324 @code{undownloaded} (maneuvering while unplugged ignores articles that
18325 have not been fetched), @code{always-undownloaded} (maneuvering always
18326 ignores articles that have not been fetched), @code{unfetched}
18327 (maneuvering ignores articles whose headers have not been fetched).
18328
18329 @end table
18330
18331
18332 @node Example Setup
18333 @subsection Example Setup
18334
18335 If you don't want to read this manual, and you have a fairly standard
18336 setup, you may be able to use something like the following as your
18337 @file{~/.gnus.el} file to get started.
18338
18339 @lisp
18340 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18341 ;;; @r{from your ISP's server.}
18342 (setq gnus-select-method '(nntp "news.your-isp.com"))
18343
18344 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18345 ;;; @r{your ISP's @acronym{POP} server.}
18346 (setq mail-sources '((pop :server "pop.your-isp.com")))
18347
18348 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18349 (setq gnus-secondary-select-methods '((nnml "")))
18350
18351 ;;; @r{Make Gnus into an offline newsreader.}
18352 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18353 ;;; (setq gnus-agent t) ; @r{Now the default.}
18354 @end lisp
18355
18356 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18357 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18358 gnus}.
18359
18360 If this is the first time you've run Gnus, you will be subscribed
18361 automatically to a few default newsgroups.  You'll probably want to
18362 subscribe to more groups, and to do that, you have to query the
18363 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18364 command.  This usually takes quite a while, but you only have to do it
18365 once.
18366
18367 After reading and parsing a while, you'll be presented with a list of
18368 groups.  Subscribe to the ones you want to read with the @kbd{u}
18369 command.  @kbd{l} to make all the killed groups disappear after you've
18370 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18371 back all the killed groups.)
18372
18373 You can now read the groups at once, or you can download the articles
18374 with the @kbd{J s} command.  And then read the rest of this manual to
18375 find out which of the other gazillion things you want to customize.
18376
18377
18378 @node Batching Agents
18379 @subsection Batching Agents
18380 @findex gnus-agent-batch
18381
18382 Having the Gnus Agent fetch articles (and post whatever messages you've
18383 written) is quite easy once you've gotten things set up properly.  The
18384 following shell script will do everything that is necessary:
18385
18386 You can run a complete batch command from the command line with the
18387 following incantation:
18388
18389 @example
18390 #!/bin/sh
18391 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18392 @end example
18393
18394
18395 @node Agent Caveats
18396 @subsection Agent Caveats
18397
18398 The Gnus Agent doesn't seem to work like most other offline
18399 newsreaders.  Here are some common questions that some imaginary people
18400 may ask:
18401
18402 @table @dfn
18403 @item If I read an article while plugged, do they get entered into the Agent?
18404
18405 @strong{No}.  If you want this behaviour, add
18406 @code{gnus-agent-fetch-selected-article} to
18407 @code{gnus-select-article-hook}.
18408
18409 @item If I read an article while plugged, and the article already exists in
18410 the Agent, will it get downloaded once more?
18411
18412 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18413
18414 @end table
18415
18416 In short, when Gnus is unplugged, it only looks into the locally stored
18417 articles; when it's plugged, it talks to your ISP and may also use the
18418 locally stored articles.
18419
18420
18421 @node Scoring
18422 @chapter Scoring
18423 @cindex scoring
18424
18425 Other people use @dfn{kill files}, but we here at Gnus Towers like
18426 scoring better than killing, so we'd rather switch than fight.  They do
18427 something completely different as well, so sit up straight and pay
18428 attention!
18429
18430 @vindex gnus-summary-mark-below
18431 All articles have a default score (@code{gnus-summary-default-score}),
18432 which is 0 by default.  This score may be raised or lowered either
18433 interactively or by score files.  Articles that have a score lower than
18434 @code{gnus-summary-mark-below} are marked as read.
18435
18436 Gnus will read any @dfn{score files} that apply to the current group
18437 before generating the summary buffer.
18438
18439 There are several commands in the summary buffer that insert score
18440 entries based on the current article.  You can, for instance, ask Gnus to
18441 lower or increase the score of all articles with a certain subject.
18442
18443 There are two sorts of scoring entries: Permanent and temporary.
18444 Temporary score entries are self-expiring entries.  Any entries that are
18445 temporary and have not been used for, say, a week, will be removed
18446 silently to help keep the sizes of the score files down.
18447
18448 @menu
18449 * Summary Score Commands::      Adding score entries for the current group.
18450 * Group Score Commands::        General score commands.
18451 * Score Variables::             Customize your scoring.  (My, what terminology).
18452 * Score File Format::           What a score file may contain.
18453 * Score File Editing::          You can edit score files by hand as well.
18454 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18455 * Home Score File::             How to say where new score entries are to go.
18456 * Followups To Yourself::       Having Gnus notice when people answer you.
18457 * Scoring On Other Headers::    Scoring on non-standard headers.
18458 * Scoring Tips::                How to score effectively.
18459 * Reverse Scoring::             That problem child of old is not problem.
18460 * Global Score Files::          Earth-spanning, ear-splitting score files.
18461 * Kill Files::                  They are still here, but they can be ignored.
18462 * Converting Kill Files::       Translating kill files to score files.
18463 * GroupLens::                   Getting predictions on what you like to read.
18464 * Advanced Scoring::            Using logical expressions to build score rules.
18465 * Score Decays::                It can be useful to let scores wither away.
18466 @end menu
18467
18468
18469 @node Summary Score Commands
18470 @section Summary Score Commands
18471 @cindex score commands
18472
18473 The score commands that alter score entries do not actually modify real
18474 score files.  That would be too inefficient.  Gnus maintains a cache of
18475 previously loaded score files, one of which is considered the
18476 @dfn{current score file alist}.  The score commands simply insert
18477 entries into this list, and upon group exit, this list is saved.
18478
18479 The current score file is by default the group's local score file, even
18480 if no such score file actually exists.  To insert score commands into
18481 some other score file (e.g. @file{all.SCORE}), you must first make this
18482 score file the current one.
18483
18484 General score commands that don't actually change the score file:
18485
18486 @table @kbd
18487
18488 @item V s
18489 @kindex V s (Summary)
18490 @findex gnus-summary-set-score
18491 Set the score of the current article (@code{gnus-summary-set-score}).
18492
18493 @item V S
18494 @kindex V S (Summary)
18495 @findex gnus-summary-current-score
18496 Display the score of the current article
18497 (@code{gnus-summary-current-score}).
18498
18499 @item V t
18500 @kindex V t (Summary)
18501 @findex gnus-score-find-trace
18502 Display all score rules that have been used on the current article
18503 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18504 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18505 When point is on a string within the match element, @kbd{e} will try to
18506 bring you to this string in the score file.
18507
18508 @item V w
18509 @kindex V w (Summary)
18510 @findex gnus-score-find-favourite-words
18511 List words used in scoring (@code{gnus-score-find-favourite-words}).
18512
18513 @item V R
18514 @kindex V R (Summary)
18515 @findex gnus-summary-rescore
18516 Run the current summary through the scoring process
18517 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18518 around with your score files behind Gnus' back and want to see the
18519 effect you're having.
18520
18521 @item V c
18522 @kindex V c (Summary)
18523 @findex gnus-score-change-score-file
18524 Make a different score file the current
18525 (@code{gnus-score-change-score-file}).
18526
18527 @item V e
18528 @kindex V e (Summary)
18529 @findex gnus-score-edit-current-scores
18530 Edit the current score file (@code{gnus-score-edit-current-scores}).
18531 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18532 File Editing}).
18533
18534 @item V f
18535 @kindex V f (Summary)
18536 @findex gnus-score-edit-file
18537 Edit a score file and make this score file the current one
18538 (@code{gnus-score-edit-file}).
18539
18540 @item V F
18541 @kindex V F (Summary)
18542 @findex gnus-score-flush-cache
18543 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18544 after editing score files.
18545
18546 @item V C
18547 @kindex V C (Summary)
18548 @findex gnus-score-customize
18549 Customize a score file in a visually pleasing manner
18550 (@code{gnus-score-customize}).
18551
18552 @end table
18553
18554 The rest of these commands modify the local score file.
18555
18556 @table @kbd
18557
18558 @item V m
18559 @kindex V m (Summary)
18560 @findex gnus-score-set-mark-below
18561 Prompt for a score, and mark all articles with a score below this as
18562 read (@code{gnus-score-set-mark-below}).
18563
18564 @item V x
18565 @kindex V x (Summary)
18566 @findex gnus-score-set-expunge-below
18567 Prompt for a score, and add a score rule to the current score file to
18568 expunge all articles below this score
18569 (@code{gnus-score-set-expunge-below}).
18570 @end table
18571
18572 The keystrokes for actually making score entries follow a very regular
18573 pattern, so there's no need to list all the commands.  (Hundreds of
18574 them.)
18575
18576 @findex gnus-summary-increase-score
18577 @findex gnus-summary-lower-score
18578
18579 @enumerate
18580 @item
18581 The first key is either @kbd{I} (upper case i) for increasing the score
18582 or @kbd{L} for lowering the score.
18583 @item
18584 The second key says what header you want to score on.  The following
18585 keys are available:
18586 @table @kbd
18587
18588 @item a
18589 Score on the author name.
18590
18591 @item s
18592 Score on the subject line.
18593
18594 @item x
18595 Score on the @code{Xref} line---i.e., the cross-posting line.
18596
18597 @item r
18598 Score on the @code{References} line.
18599
18600 @item d
18601 Score on the date.
18602
18603 @item l
18604 Score on the number of lines.
18605
18606 @item i
18607 Score on the @code{Message-ID} header.
18608
18609 @item e
18610 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18611 if your @acronym{NNTP} server tracks additional header data in overviews.
18612
18613 @item f
18614 Score on followups---this matches the author name, and adds scores to
18615 the followups to this author.  (Using this key leads to the creation of
18616 @file{ADAPT} files.)
18617
18618 @item b
18619 Score on the body.
18620
18621 @item h
18622 Score on the head.
18623
18624 @item t
18625 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18626 files.)
18627
18628 @end table
18629
18630 @item
18631 The third key is the match type.  Which match types are valid depends on
18632 what headers you are scoring on.
18633
18634 @table @code
18635
18636 @item strings
18637
18638 @table @kbd
18639
18640 @item e
18641 Exact matching.
18642
18643 @item s
18644 Substring matching.
18645
18646 @item f
18647 Fuzzy matching (@pxref{Fuzzy Matching}).
18648
18649 @item r
18650 Regexp matching
18651 @end table
18652
18653 @item date
18654 @table @kbd
18655
18656 @item b
18657 Before date.
18658
18659 @item a
18660 After date.
18661
18662 @item n
18663 This date.
18664 @end table
18665
18666 @item number
18667 @table @kbd
18668
18669 @item <
18670 Less than number.
18671
18672 @item =
18673 Equal to number.
18674
18675 @item >
18676 Greater than number.
18677 @end table
18678 @end table
18679
18680 @item
18681 The fourth and usually final key says whether this is a temporary (i.e.,
18682 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18683 or whether it is to be done immediately, without adding to the score
18684 file.
18685 @table @kbd
18686
18687 @item t
18688 Temporary score entry.
18689
18690 @item p
18691 Permanent score entry.
18692
18693 @item i
18694 Immediately scoring.
18695 @end table
18696
18697 @item
18698 If you are scoring on `e' (extra) headers, you will then be prompted for
18699 the header name on which you wish to score.  This must be a header named
18700 in gnus-extra-headers, and @samp{TAB} completion is available.
18701
18702 @end enumerate
18703
18704 So, let's say you want to increase the score on the current author with
18705 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18706 score based on the subject line, using substring matching, and make a
18707 temporary score entry: @kbd{L s s t}.  Pretty easy.
18708
18709 To make things a bit more complicated, there are shortcuts.  If you use
18710 a capital letter on either the second or third keys, Gnus will use
18711 defaults for the remaining one or two keystrokes.  The defaults are
18712 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18713 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18714
18715 These functions take both the numerical prefix and the symbolic prefix
18716 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18717 (or increase) the score of the article.  A symbolic prefix of @code{a}
18718 says to use the @file{all.SCORE} file for the command instead of the
18719 current score file.
18720
18721 @vindex gnus-score-mimic-keymap
18722 The @code{gnus-score-mimic-keymap} says whether these commands will
18723 pretend they are keymaps or not.
18724
18725
18726 @node Group Score Commands
18727 @section Group Score Commands
18728 @cindex group score commands
18729
18730 There aren't many of these as yet, I'm afraid.
18731
18732 @table @kbd
18733
18734 @item W f
18735 @kindex W f (Group)
18736 @findex gnus-score-flush-cache
18737 Gnus maintains a cache of score alists to avoid having to reload them
18738 all the time.  This command will flush the cache
18739 (@code{gnus-score-flush-cache}).
18740
18741 @end table
18742
18743 You can do scoring from the command line by saying something like:
18744
18745 @findex gnus-batch-score
18746 @cindex batch scoring
18747 @example
18748 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18749 @end example
18750
18751
18752 @node Score Variables
18753 @section Score Variables
18754 @cindex score variables
18755
18756 @table @code
18757
18758 @item gnus-use-scoring
18759 @vindex gnus-use-scoring
18760 If @code{nil}, Gnus will not check for score files, and will not, in
18761 general, do any score-related work.  This is @code{t} by default.
18762
18763 @item gnus-kill-killed
18764 @vindex gnus-kill-killed
18765 If this variable is @code{nil}, Gnus will never apply score files to
18766 articles that have already been through the kill process.  While this
18767 may save you lots of time, it also means that if you apply a kill file
18768 to a group, and then change the kill file and want to run it over you
18769 group again to kill more articles, it won't work.  You have to set this
18770 variable to @code{t} to do that.  (It is @code{t} by default.)
18771
18772 @item gnus-kill-files-directory
18773 @vindex gnus-kill-files-directory
18774 All kill and score files will be stored in this directory, which is
18775 initialized from the @env{SAVEDIR} environment variable by default.
18776 This is @file{~/News/} by default.
18777
18778 @item gnus-score-file-suffix
18779 @vindex gnus-score-file-suffix
18780 Suffix to add to the group name to arrive at the score file name
18781 (@file{SCORE} by default.)
18782
18783 @item gnus-score-uncacheable-files
18784 @vindex gnus-score-uncacheable-files
18785 @cindex score cache
18786 All score files are normally cached to avoid excessive re-loading of
18787 score files.  However, if this might make your Emacs grow big and
18788 bloated, so this regexp can be used to weed out score files unlikely
18789 to be needed again.  It would be a bad idea to deny caching of
18790 @file{all.SCORE}, while it might be a good idea to not cache
18791 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18792 variable is @samp{ADAPT$} by default, so no adaptive score files will
18793 be cached.
18794
18795 @item gnus-save-score
18796 @vindex gnus-save-score
18797 If you have really complicated score files, and do lots of batch
18798 scoring, then you might set this variable to @code{t}.  This will make
18799 Gnus save the scores into the @file{.newsrc.eld} file.
18800
18801 If you do not set this to @code{t}, then manual scores (like those set
18802 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18803 across group visits.
18804
18805 @item gnus-score-interactive-default-score
18806 @vindex gnus-score-interactive-default-score
18807 Score used by all the interactive raise/lower commands to raise/lower
18808 score with.  Default is 1000, which may seem excessive, but this is to
18809 ensure that the adaptive scoring scheme gets enough room to play with.
18810 We don't want the small changes from the adaptive scoring to overwrite
18811 manually entered data.
18812
18813 @item gnus-summary-default-score
18814 @vindex gnus-summary-default-score
18815 Default score of an article, which is 0 by default.
18816
18817 @item gnus-summary-expunge-below
18818 @vindex gnus-summary-expunge-below
18819 Don't display the summary lines of articles that have scores lower than
18820 this variable.  This is @code{nil} by default, which means that no
18821 articles will be hidden.  This variable is local to the summary buffers,
18822 and has to be set from @code{gnus-summary-mode-hook}.
18823
18824 @item gnus-score-over-mark
18825 @vindex gnus-score-over-mark
18826 Mark (in the third column) used for articles with a score over the
18827 default.  Default is @samp{+}.
18828
18829 @item gnus-score-below-mark
18830 @vindex gnus-score-below-mark
18831 Mark (in the third column) used for articles with a score below the
18832 default.  Default is @samp{-}.
18833
18834 @item gnus-score-find-score-files-function
18835 @vindex gnus-score-find-score-files-function
18836 Function used to find score files for the current group.  This function
18837 is called with the name of the group as the argument.
18838
18839 Predefined functions available are:
18840 @table @code
18841
18842 @item gnus-score-find-single
18843 @findex gnus-score-find-single
18844 Only apply the group's own score file.
18845
18846 @item gnus-score-find-bnews
18847 @findex gnus-score-find-bnews
18848 Apply all score files that match, using bnews syntax.  This is the
18849 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18850 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18851 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18852 @samp{all} in the score file names are translated into @samp{.*}, and
18853 then a regexp match is done.
18854
18855 This means that if you have some score entries that you want to apply to
18856 all groups, then you put those entries in the @file{all.SCORE} file.
18857
18858 The score files are applied in a semi-random order, although Gnus will
18859 try to apply the more general score files before the more specific score
18860 files.  It does this by looking at the number of elements in the score
18861 file names---discarding the @samp{all} elements.
18862
18863 @item gnus-score-find-hierarchical
18864 @findex gnus-score-find-hierarchical
18865 Apply all score files from all the parent groups.  This means that you
18866 can't have score files like @file{all.SCORE}, but you can have
18867 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18868 server.
18869
18870 @end table
18871 This variable can also be a list of functions.  In that case, all
18872 these functions will be called with the group name as argument, and
18873 all the returned lists of score files will be applied.  These
18874 functions can also return lists of lists of score alists directly.  In
18875 that case, the functions that return these non-file score alists
18876 should probably be placed before the ``real'' score file functions, to
18877 ensure that the last score file returned is the local score file.
18878 Phu.
18879
18880 For example, to do hierarchical scoring but use a non-server-specific
18881 overall score file, you could use the value
18882 @example
18883 (list (lambda (group) ("all.SCORE"))
18884       'gnus-score-find-hierarchical)
18885 @end example
18886
18887 @item gnus-score-expiry-days
18888 @vindex gnus-score-expiry-days
18889 This variable says how many days should pass before an unused score file
18890 entry is expired.  If this variable is @code{nil}, no score file entries
18891 are expired.  It's 7 by default.
18892
18893 @item gnus-update-score-entry-dates
18894 @vindex gnus-update-score-entry-dates
18895 If this variable is non-@code{nil}, temporary score entries that have
18896 been triggered (matched) will have their dates updated.  (This is how Gnus
18897 controls expiry---all non-matched-entries will become too old while
18898 matched entries will stay fresh and young.)  However, if you set this
18899 variable to @code{nil}, even matched entries will grow old and will
18900 have to face that oh-so grim reaper.
18901
18902 @item gnus-score-after-write-file-function
18903 @vindex gnus-score-after-write-file-function
18904 Function called with the name of the score file just written.
18905
18906 @item gnus-score-thread-simplify
18907 @vindex gnus-score-thread-simplify
18908 If this variable is non-@code{nil}, article subjects will be
18909 simplified for subject scoring purposes in the same manner as with
18910 threading---according to the current value of
18911 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18912 @code{substring} or @code{exact} matching, the match will also be
18913 simplified in this manner.
18914
18915 @end table
18916
18917
18918 @node Score File Format
18919 @section Score File Format
18920 @cindex score file format
18921
18922 A score file is an @code{emacs-lisp} file that normally contains just a
18923 single form.  Casual users are not expected to edit these files;
18924 everything can be changed from the summary buffer.
18925
18926 Anyway, if you'd like to dig into it yourself, here's an example:
18927
18928 @lisp
18929 (("from"
18930   ("Lars Ingebrigtsen" -10000)
18931   ("Per Abrahamsen")
18932   ("larsi\\|lmi" -50000 nil R))
18933  ("subject"
18934   ("Ding is Badd" nil 728373))
18935  ("xref"
18936   ("alt.politics" -1000 728372 s))
18937  ("lines"
18938   (2 -100 nil <))
18939  (mark 0)
18940  (expunge -1000)
18941  (mark-and-expunge -10)
18942  (read-only nil)
18943  (orphan -10)
18944  (adapt t)
18945  (files "/hom/larsi/News/gnu.SCORE")
18946  (exclude-files "all.SCORE")
18947  (local (gnus-newsgroup-auto-expire t)
18948         (gnus-summary-make-false-root empty))
18949  (eval (ding)))
18950 @end lisp
18951
18952 This example demonstrates most score file elements.  @xref{Advanced
18953 Scoring}, for a different approach.
18954
18955 Even though this looks much like Lisp code, nothing here is actually
18956 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18957 has to be valid syntactically, if not semantically.
18958
18959 Six keys are supported by this alist:
18960
18961 @table @code
18962
18963 @item STRING
18964 If the key is a string, it is the name of the header to perform the
18965 match on.  Scoring can only be performed on these eight headers:
18966 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18967 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18968 these headers, there are three strings to tell Gnus to fetch the entire
18969 article and do the match on larger parts of the article: @code{Body}
18970 will perform the match on the body of the article, @code{Head} will
18971 perform the match on the head of the article, and @code{All} will
18972 perform the match on the entire article.  Note that using any of these
18973 last three keys will slow down group entry @emph{considerably}.  The
18974 final ``header'' you can score on is @code{Followup}.  These score
18975 entries will result in new score entries being added for all follow-ups
18976 to articles that matches these score entries.
18977
18978 Following this key is an arbitrary number of score entries, where each
18979 score entry has one to four elements.
18980 @enumerate
18981
18982 @item
18983 The first element is the @dfn{match element}.  On most headers this will
18984 be a string, but on the Lines and Chars headers, this must be an
18985 integer.
18986
18987 @item
18988 If the second element is present, it should be a number---the @dfn{score
18989 element}.  This number should be an integer in the neginf to posinf
18990 interval.  This number is added to the score of the article if the match
18991 is successful.  If this element is not present, the
18992 @code{gnus-score-interactive-default-score} number will be used
18993 instead.  This is 1000 by default.
18994
18995 @item
18996 If the third element is present, it should be a number---the @dfn{date
18997 element}.  This date says when the last time this score entry matched,
18998 which provides a mechanism for expiring the score entries.  It this
18999 element is not present, the score entry is permanent.  The date is
19000 represented by the number of days since December 31, 1 BCE.
19001
19002 @item
19003 If the fourth element is present, it should be a symbol---the @dfn{type
19004 element}.  This element specifies what function should be used to see
19005 whether this score entry matches the article.  What match types that can
19006 be used depends on what header you wish to perform the match on.
19007 @table @dfn
19008
19009 @item From, Subject, References, Xref, Message-ID
19010 For most header types, there are the @code{r} and @code{R} (regexp), as
19011 well as @code{s} and @code{S} (substring) types, and @code{e} and
19012 @code{E} (exact match), and @code{w} (word match) types.  If this
19013 element is not present, Gnus will assume that substring matching should
19014 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19015 that the matches will be done in a case-sensitive manner.  All these
19016 one-letter types are really just abbreviations for the @code{regexp},
19017 @code{string}, @code{exact}, and @code{word} types, which you can use
19018 instead, if you feel like.
19019
19020 @item Extra
19021 Just as for the standard string overview headers, if you are using
19022 gnus-extra-headers, you can score on these headers' values.  In this
19023 case, there is a 5th element in the score entry, being the name of the
19024 header to be scored.  The following entry is useful in your
19025 @file{all.SCORE} file in case of spam attacks from a single origin host,
19026 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
19027
19028 @lisp
19029 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
19030 @end lisp
19031
19032 @item Lines, Chars
19033 These two headers use different match types: @code{<}, @code{>},
19034 @code{=}, @code{>=} and @code{<=}.
19035
19036 These predicates are true if
19037
19038 @example
19039 (PREDICATE HEADER MATCH)
19040 @end example
19041
19042 evaluates to non-@code{nil}.  For instance, the advanced match
19043 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19044 following form:
19045
19046 @lisp
19047 (< header-value 4)
19048 @end lisp
19049
19050 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19051 the match, we get the score added if the article has less than 4 lines.
19052 (It's easy to get confused and think it's the other way around.  But
19053 it's not.  I think.)
19054
19055 When matching on @code{Lines}, be careful because some back ends (like
19056 @code{nndir}) do not generate @code{Lines} header, so every article ends
19057 up being marked as having 0 lines.  This can lead to strange results if
19058 you happen to lower score of the articles with few lines.
19059
19060 @item Date
19061 For the Date header we have three kinda silly match types:
19062 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19063 ever being useful, but, like, it would feel kinda silly not to provide
19064 this function.  Just in case.  You never know.  Better safe than sorry.
19065 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19066 sex on a first date.  (I have been told that at least one person, and I
19067 quote, ``found this function indispensable'', however.)
19068
19069 @cindex ISO8601
19070 @cindex date
19071 A more useful match type is @code{regexp}.  With it, you can match the
19072 date string using a regular expression.  The date is normalized to
19073 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19074 you want to match all articles that have been posted on April 1st in
19075 every year, you could use @samp{....0401.........} as a match string,
19076 for instance.  (Note that the date is kept in its original time zone, so
19077 this will match articles that were posted when it was April 1st where
19078 the article was posted from.  Time zones are such wholesome fun for the
19079 whole family, eh?)
19080
19081 @item Head, Body, All
19082 These three match keys use the same match types as the @code{From} (etc)
19083 header uses.
19084
19085 @item Followup
19086 This match key is somewhat special, in that it will match the
19087 @code{From} header, and affect the score of not only the matching
19088 articles, but also all followups to the matching articles.  This allows
19089 you e.g. increase the score of followups to your own articles, or
19090 decrease the score of followups to the articles of some known
19091 trouble-maker.  Uses the same match types as the @code{From} header
19092 uses.  (Using this match key will lead to creation of @file{ADAPT}
19093 files.)
19094
19095 @item Thread
19096 This match key works along the same lines as the @code{Followup} match
19097 key.  If you say that you want to score on a (sub-)thread started by an
19098 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19099 match.  This will add a new @samp{thread} match for each article that
19100 has @var{x} in its @code{References} header.  (These new @samp{thread}
19101 matches will use the @code{Message-ID}s of these matching articles.)
19102 This will ensure that you can raise/lower the score of an entire thread,
19103 even though some articles in the thread may not have complete
19104 @code{References} headers.  Note that using this may lead to
19105 undeterministic scores of the articles in the thread.  (Using this match
19106 key will lead to creation of @file{ADAPT} files.)
19107 @end table
19108 @end enumerate
19109
19110 @cindex score file atoms
19111 @item mark
19112 The value of this entry should be a number.  Any articles with a score
19113 lower than this number will be marked as read.
19114
19115 @item expunge
19116 The value of this entry should be a number.  Any articles with a score
19117 lower than this number will be removed from the summary buffer.
19118
19119 @item mark-and-expunge
19120 The value of this entry should be a number.  Any articles with a score
19121 lower than this number will be marked as read and removed from the
19122 summary buffer.
19123
19124 @item thread-mark-and-expunge
19125 The value of this entry should be a number.  All articles that belong to
19126 a thread that has a total score below this number will be marked as read
19127 and removed from the summary buffer.  @code{gnus-thread-score-function}
19128 says how to compute the total score for a thread.
19129
19130 @item files
19131 The value of this entry should be any number of file names.  These files
19132 are assumed to be score files as well, and will be loaded the same way
19133 this one was.
19134
19135 @item exclude-files
19136 The clue of this entry should be any number of files.  These files will
19137 not be loaded, even though they would normally be so, for some reason or
19138 other.
19139
19140 @item eval
19141 The value of this entry will be @code{eval}el.  This element will be
19142 ignored when handling global score files.
19143
19144 @item read-only
19145 Read-only score files will not be updated or saved.  Global score files
19146 should feature this atom (@pxref{Global Score Files}).  (Note:
19147 @dfn{Global} here really means @dfn{global}; not your personal
19148 apply-to-all-groups score files.)
19149
19150 @item orphan
19151 The value of this entry should be a number.  Articles that do not have
19152 parents will get this number added to their scores.  Imagine you follow
19153 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19154 will only follow a few of the threads, also want to see any new threads.
19155
19156 You can do this with the following two score file entries:
19157
19158 @example
19159         (orphan -500)
19160         (mark-and-expunge -100)
19161 @end example
19162
19163 When you enter the group the first time, you will only see the new
19164 threads.  You then raise the score of the threads that you find
19165 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19166 rest.  Next time you enter the group, you will see new articles in the
19167 interesting threads, plus any new threads.
19168
19169 I.e.---the orphan score atom is for high-volume groups where a few
19170 interesting threads which can't be found automatically by ordinary
19171 scoring rules exist.
19172
19173 @item adapt
19174 This entry controls the adaptive scoring.  If it is @code{t}, the
19175 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19176 adaptive scoring will be performed on this group.  If it is a list, this
19177 list will be used as the adaptive scoring rules.  If it isn't present,
19178 or is something other than @code{t} or @code{ignore}, the default
19179 adaptive scoring rules will be used.  If you want to use adaptive
19180 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19181 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19182 not want adaptive scoring.  If you only want adaptive scoring in a few
19183 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19184 insert @code{(adapt t)} in the score files of the groups where you want
19185 it.
19186
19187 @item adapt-file
19188 All adaptive score entries will go to the file named by this entry.  It
19189 will also be applied when entering the group.  This atom might be handy
19190 if you want to adapt on several groups at once, using the same adaptive
19191 file for a number of groups.
19192
19193 @item local
19194 @cindex local variables
19195 The value of this entry should be a list of @code{(@var{var}
19196 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19197 current summary buffer, and set to the value specified.  This is a
19198 convenient, if somewhat strange, way of setting variables in some
19199 groups if you don't like hooks much.  Note that the @var{value} won't
19200 be evaluated.
19201 @end table
19202
19203
19204 @node Score File Editing
19205 @section Score File Editing
19206
19207 You normally enter all scoring commands from the summary buffer, but you
19208 might feel the urge to edit them by hand as well, so we've supplied you
19209 with a mode for that.
19210
19211 It's simply a slightly customized @code{emacs-lisp} mode, with these
19212 additional commands:
19213
19214 @table @kbd
19215
19216 @item C-c C-c
19217 @kindex C-c C-c (Score)
19218 @findex gnus-score-edit-done
19219 Save the changes you have made and return to the summary buffer
19220 (@code{gnus-score-edit-done}).
19221
19222 @item C-c C-d
19223 @kindex C-c C-d (Score)
19224 @findex gnus-score-edit-insert-date
19225 Insert the current date in numerical format
19226 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19227 you were wondering.
19228
19229 @item C-c C-p
19230 @kindex C-c C-p (Score)
19231 @findex gnus-score-pretty-print
19232 The adaptive score files are saved in an unformatted fashion.  If you
19233 intend to read one of these files, you want to @dfn{pretty print} it
19234 first.  This command (@code{gnus-score-pretty-print}) does that for
19235 you.
19236
19237 @end table
19238
19239 Type @kbd{M-x gnus-score-mode} to use this mode.
19240
19241 @vindex gnus-score-mode-hook
19242 @code{gnus-score-menu-hook} is run in score mode buffers.
19243
19244 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19245 e} to begin editing score files.
19246
19247
19248 @node Adaptive Scoring
19249 @section Adaptive Scoring
19250 @cindex adaptive scoring
19251
19252 If all this scoring is getting you down, Gnus has a way of making it all
19253 happen automatically---as if by magic.  Or rather, as if by artificial
19254 stupidity, to be precise.
19255
19256 @vindex gnus-use-adaptive-scoring
19257 When you read an article, or mark an article as read, or kill an
19258 article, you leave marks behind.  On exit from the group, Gnus can sniff
19259 these marks and add score elements depending on what marks it finds.
19260 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19261 @code{t} or @code{(line)}.  If you want score adaptively on separate
19262 words appearing in the subjects, you should set this variable to
19263 @code{(word)}.  If you want to use both adaptive methods, set this
19264 variable to @code{(word line)}.
19265
19266 @vindex gnus-default-adaptive-score-alist
19267 To give you complete control over the scoring process, you can customize
19268 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19269 might look something like this:
19270
19271 @lisp
19272 (setq gnus-default-adaptive-score-alist
19273   '((gnus-unread-mark)
19274     (gnus-ticked-mark (from 4))
19275     (gnus-dormant-mark (from 5))
19276     (gnus-del-mark (from -4) (subject -1))
19277     (gnus-read-mark (from 4) (subject 2))
19278     (gnus-expirable-mark (from -1) (subject -1))
19279     (gnus-killed-mark (from -1) (subject -3))
19280     (gnus-kill-file-mark)
19281     (gnus-ancient-mark)
19282     (gnus-low-score-mark)
19283     (gnus-catchup-mark (from -1) (subject -1))))
19284 @end lisp
19285
19286 As you see, each element in this alist has a mark as a key (either a
19287 variable name or a ``real'' mark---a character).  Following this key is
19288 a arbitrary number of header/score pairs.  If there are no header/score
19289 pairs following the key, no adaptive scoring will be done on articles
19290 that have that key as the article mark.  For instance, articles with
19291 @code{gnus-unread-mark} in the example above will not get adaptive score
19292 entries.
19293
19294 Each article can have only one mark, so just a single of these rules
19295 will be applied to each article.
19296
19297 To take @code{gnus-del-mark} as an example---this alist says that all
19298 articles that have that mark (i.e., are marked with @samp{e}) will have a
19299 score entry added to lower based on the @code{From} header by -4, and
19300 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19301
19302 If you have marked 10 articles with the same subject with
19303 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19304 That means that that subject will get a score of ten times -1, which
19305 should be, unless I'm much mistaken, -10.
19306
19307 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19308 the read articles will be marked with the @samp{E} mark.  This'll
19309 probably make adaptive scoring slightly impossible, so auto-expiring and
19310 adaptive scoring doesn't really mix very well.
19311
19312 The headers you can score on are @code{from}, @code{subject},
19313 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19314 @code{chars} and @code{date}.  In addition, you can score on
19315 @code{followup}, which will create an adaptive score entry that matches
19316 on the @code{References} header using the @code{Message-ID} of the
19317 current article, thereby matching the following thread.
19318
19319 If you use this scheme, you should set the score file atom @code{mark}
19320 to something small---like -300, perhaps, to avoid having small random
19321 changes result in articles getting marked as read.
19322
19323 After using adaptive scoring for a week or so, Gnus should start to
19324 become properly trained and enhance the authors you like best, and kill
19325 the authors you like least, without you having to say so explicitly.
19326
19327 You can control what groups the adaptive scoring is to be performed on
19328 by using the score files (@pxref{Score File Format}).  This will also
19329 let you use different rules in different groups.
19330
19331 @vindex gnus-adaptive-file-suffix
19332 The adaptive score entries will be put into a file where the name is the
19333 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19334 is @file{ADAPT}.
19335
19336 @vindex gnus-score-exact-adapt-limit
19337 When doing adaptive scoring, substring or fuzzy matching would probably
19338 give you the best results in most cases.  However, if the header one
19339 matches is short, the possibility for false positives is great, so if
19340 the length of the match is less than
19341 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19342 this variable is @code{nil}, exact matching will always be used to avoid
19343 this problem.
19344
19345 @vindex gnus-default-adaptive-word-score-alist
19346 As mentioned above, you can adapt either on individual words or entire
19347 headers.  If you adapt on words, the
19348 @code{gnus-default-adaptive-word-score-alist} variable says what score
19349 each instance of a word should add given a mark.
19350
19351 @lisp
19352 (setq gnus-default-adaptive-word-score-alist
19353       `((,gnus-read-mark . 30)
19354         (,gnus-catchup-mark . -10)
19355         (,gnus-killed-mark . -20)
19356         (,gnus-del-mark . -15)))
19357 @end lisp
19358
19359 This is the default value.  If you have adaption on words enabled, every
19360 word that appears in subjects of articles marked with
19361 @code{gnus-read-mark} will result in a score rule that increase the
19362 score with 30 points.
19363
19364 @vindex gnus-default-ignored-adaptive-words
19365 @vindex gnus-ignored-adaptive-words
19366 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19367 will be ignored.  If you wish to add more words to be ignored, use the
19368 @code{gnus-ignored-adaptive-words} list instead.
19369
19370 @vindex gnus-adaptive-word-length-limit
19371 Some may feel that short words shouldn't count when doing adaptive
19372 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19373 an integer.  Words shorter than this number will be ignored.  This
19374 variable defaults to @code{nil}.
19375
19376 @vindex gnus-adaptive-word-syntax-table
19377 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19378 syntax table in effect.  It is similar to the standard syntax table, but
19379 it considers numbers to be non-word-constituent characters.
19380
19381 @vindex gnus-adaptive-word-minimum
19382 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19383 word scoring process will never bring down the score of an article to
19384 below this number.  The default is @code{nil}.
19385
19386 @vindex gnus-adaptive-word-no-group-words
19387 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19388 won't adaptively word score any of the words in the group name.  Useful
19389 for groups like @samp{comp.editors.emacs}, where most of the subject
19390 lines contain the word @samp{emacs}.
19391
19392 After using this scheme for a while, it might be nice to write a
19393 @code{gnus-psychoanalyze-user} command to go through the rules and see
19394 what words you like and what words you don't like.  Or perhaps not.
19395
19396 Note that the adaptive word scoring thing is highly experimental and is
19397 likely to change in the future.  Initial impressions seem to indicate
19398 that it's totally useless as it stands.  Some more work (involving more
19399 rigorous statistical methods) will have to be done to make this useful.
19400
19401
19402 @node Home Score File
19403 @section Home Score File
19404
19405 The score file where new score file entries will go is called the
19406 @dfn{home score file}.  This is normally (and by default) the score file
19407 for the group itself.  For instance, the home score file for
19408 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19409
19410 However, this may not be what you want.  It is often convenient to share
19411 a common home score file among many groups---all @samp{emacs} groups
19412 could perhaps use the same home score file.
19413
19414 @vindex gnus-home-score-file
19415 The variable that controls this is @code{gnus-home-score-file}.  It can
19416 be:
19417
19418 @enumerate
19419 @item
19420 A string.  Then this file will be used as the home score file for all
19421 groups.
19422
19423 @item
19424 A function.  The result of this function will be used as the home score
19425 file.  The function will be called with the name of the group as the
19426 parameter.
19427
19428 @item
19429 A list.  The elements in this list can be:
19430
19431 @enumerate
19432 @item
19433 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19434 group name, the @var{file-name} will be used as the home score file.
19435
19436 @item
19437 A function.  If the function returns non-@code{nil}, the result will
19438 be used as the home score file.
19439
19440 @item
19441 A string.  Use the string as the home score file.
19442 @end enumerate
19443
19444 The list will be traversed from the beginning towards the end looking
19445 for matches.
19446
19447 @end enumerate
19448
19449 So, if you want to use just a single score file, you could say:
19450
19451 @lisp
19452 (setq gnus-home-score-file
19453       "my-total-score-file.SCORE")
19454 @end lisp
19455
19456 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19457 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19458
19459 @findex gnus-hierarchial-home-score-file
19460 @lisp
19461 (setq gnus-home-score-file
19462       'gnus-hierarchial-home-score-file)
19463 @end lisp
19464
19465 This is a ready-made function provided for your convenience.
19466 Other functions include
19467
19468 @table @code
19469 @item gnus-current-home-score-file
19470 @findex gnus-current-home-score-file
19471 Return the ``current'' regular score file.  This will make scoring
19472 commands add entry to the ``innermost'' matching score file.
19473
19474 @end table
19475
19476 If you want to have one score file for the @samp{emacs} groups and
19477 another for the @samp{comp} groups, while letting all other groups use
19478 their own home score files:
19479
19480 @lisp
19481 (setq gnus-home-score-file
19482       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19483       '(("\\.emacs" "emacs.SCORE")
19484         ;; @r{All the comp groups in one score file}
19485         ("^comp" "comp.SCORE")))
19486 @end lisp
19487
19488 @vindex gnus-home-adapt-file
19489 @code{gnus-home-adapt-file} works exactly the same way as
19490 @code{gnus-home-score-file}, but says what the home adaptive score file
19491 is instead.  All new adaptive file entries will go into the file
19492 specified by this variable, and the same syntax is allowed.
19493
19494 In addition to using @code{gnus-home-score-file} and
19495 @code{gnus-home-adapt-file}, you can also use group parameters
19496 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19497 Parameters}) to achieve much the same.  Group and topic parameters take
19498 precedence over this variable.
19499
19500
19501 @node Followups To Yourself
19502 @section Followups To Yourself
19503
19504 Gnus offers two commands for picking out the @code{Message-ID} header in
19505 the current buffer.  Gnus will then add a score rule that scores using
19506 this @code{Message-ID} on the @code{References} header of other
19507 articles.  This will, in effect, increase the score of all articles that
19508 respond to the article in the current buffer.  Quite useful if you want
19509 to easily note when people answer what you've said.
19510
19511 @table @code
19512
19513 @item gnus-score-followup-article
19514 @findex gnus-score-followup-article
19515 This will add a score to articles that directly follow up your own
19516 article.
19517
19518 @item gnus-score-followup-thread
19519 @findex gnus-score-followup-thread
19520 This will add a score to all articles that appear in a thread ``below''
19521 your own article.
19522 @end table
19523
19524 @vindex message-sent-hook
19525 These two functions are both primarily meant to be used in hooks like
19526 @code{message-sent-hook}, like this:
19527 @lisp
19528 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19529 @end lisp
19530
19531
19532 If you look closely at your own @code{Message-ID}, you'll notice that
19533 the first two or three characters are always the same.  Here's two of
19534 mine:
19535
19536 @example
19537 <x6u3u47icf.fsf@@eyesore.no>
19538 <x6sp9o7ibw.fsf@@eyesore.no>
19539 @end example
19540
19541 So ``my'' ident on this machine is @samp{x6}.  This can be
19542 exploited---the following rule will raise the score on all followups to
19543 myself:
19544
19545 @lisp
19546 ("references"
19547  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19548   1000 nil r))
19549 @end lisp
19550
19551 Whether it's the first two or first three characters that are ``yours''
19552 is system-dependent.
19553
19554
19555 @node Scoring On Other Headers
19556 @section Scoring On Other Headers
19557 @cindex scoring on other headers
19558
19559 Gnus is quite fast when scoring the ``traditional''
19560 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19561 other headers requires writing a @code{head} scoring rule, which means
19562 that Gnus has to request every single article from the back end to find
19563 matches.  This takes a long time in big groups.
19564
19565 Now, there's not much you can do about this for news groups, but for
19566 mail groups, you have greater control.  In @ref{To From Newsgroups},
19567 it's explained in greater detail what this mechanism does, but here's
19568 a cookbook example for @code{nnml} on how to allow scoring on the
19569 @samp{To} and @samp{Cc} headers.
19570
19571 Put the following in your @file{~/.gnus.el} file.
19572
19573 @lisp
19574 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19575       nnmail-extra-headers gnus-extra-headers)
19576 @end lisp
19577
19578 Restart Gnus and rebuild your @code{nnml} overview files with the
19579 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19580 time if you have much mail.
19581
19582 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19583 so: @kbd{I e s p To RET <your name> RET}.
19584
19585 See?  Simple.
19586
19587
19588 @node Scoring Tips
19589 @section Scoring Tips
19590 @cindex scoring tips
19591
19592 @table @dfn
19593
19594 @item Crossposts
19595 @cindex crossposts
19596 @cindex scoring crossposts
19597 If you want to lower the score of crossposts, the line to match on is
19598 the @code{Xref} header.
19599 @lisp
19600 ("xref" (" talk.politics.misc:" -1000))
19601 @end lisp
19602
19603 @item Multiple crossposts
19604 If you want to lower the score of articles that have been crossposted to
19605 more than, say, 3 groups:
19606 @lisp
19607 ("xref"
19608   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19609    -1000 nil r))
19610 @end lisp
19611
19612 @item Matching on the body
19613 This is generally not a very good idea---it takes a very long time.
19614 Gnus actually has to fetch each individual article from the server.  But
19615 you might want to anyway, I guess.  Even though there are three match
19616 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19617 and stick with it in each score file.  If you use any two, each article
19618 will be fetched @emph{twice}.  If you want to match a bit on the
19619 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19620 the matches.
19621
19622 @item Marking as read
19623 You will probably want to mark articles that have scores below a certain
19624 number as read.  This is most easily achieved by putting the following
19625 in your @file{all.SCORE} file:
19626 @lisp
19627 ((mark -100))
19628 @end lisp
19629 You may also consider doing something similar with @code{expunge}.
19630
19631 @item Negated character classes
19632 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19633 That will match newlines, which might lead to, well, The Unknown.  Say
19634 @code{[^abcd\n]*} instead.
19635 @end table
19636
19637
19638 @node Reverse Scoring
19639 @section Reverse Scoring
19640 @cindex reverse scoring
19641
19642 If you want to keep just articles that have @samp{Sex with Emacs} in the
19643 subject header, and expunge all other articles, you could put something
19644 like this in your score file:
19645
19646 @lisp
19647 (("subject"
19648   ("Sex with Emacs" 2))
19649  (mark 1)
19650  (expunge 1))
19651 @end lisp
19652
19653 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19654 rest as read, and expunge them to boot.
19655
19656
19657 @node Global Score Files
19658 @section Global Score Files
19659 @cindex global score files
19660
19661 Sure, other newsreaders have ``global kill files''.  These are usually
19662 nothing more than a single kill file that applies to all groups, stored
19663 in the user's home directory.  Bah!  Puny, weak newsreaders!
19664
19665 What I'm talking about here are Global Score Files.  Score files from
19666 all over the world, from users everywhere, uniting all nations in one
19667 big, happy score file union!  Ange-score!  New and untested!
19668
19669 @vindex gnus-global-score-files
19670 All you have to do to use other people's score files is to set the
19671 @code{gnus-global-score-files} variable.  One entry for each score file,
19672 or each score file directory.  Gnus will decide by itself what score
19673 files are applicable to which group.
19674
19675 To use the score file
19676 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19677 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19678 say this:
19679
19680 @lisp
19681 (setq gnus-global-score-files
19682       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19683         "/ftp@@ftp.some-where:/pub/score/"))
19684 @end lisp
19685
19686 @findex gnus-score-search-global-directories
19687 @noindent
19688 Simple, eh?  Directory names must end with a @samp{/}.  These
19689 directories are typically scanned only once during each Gnus session.
19690 If you feel the need to manually re-scan the remote directories, you can
19691 use the @code{gnus-score-search-global-directories} command.
19692
19693 Note that, at present, using this option will slow down group entry
19694 somewhat.  (That is---a lot.)
19695
19696 If you want to start maintaining score files for other people to use,
19697 just put your score file up for anonymous ftp and announce it to the
19698 world.  Become a retro-moderator!  Participate in the retro-moderator
19699 wars sure to ensue, where retro-moderators battle it out for the
19700 sympathy of the people, luring them to use their score files on false
19701 premises!  Yay!  The net is saved!
19702
19703 Here are some tips for the would-be retro-moderator, off the top of my
19704 head:
19705
19706 @itemize @bullet
19707
19708 @item
19709 Articles heavily crossposted are probably junk.
19710 @item
19711 To lower a single inappropriate article, lower by @code{Message-ID}.
19712 @item
19713 Particularly brilliant authors can be raised on a permanent basis.
19714 @item
19715 Authors that repeatedly post off-charter for the group can safely be
19716 lowered out of existence.
19717 @item
19718 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19719 articles completely.
19720
19721 @item
19722 Use expiring score entries to keep the size of the file down.  You
19723 should probably have a long expiry period, though, as some sites keep
19724 old articles for a long time.
19725 @end itemize
19726
19727 @dots{} I wonder whether other newsreaders will support global score files
19728 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19729 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19730 holding our breath yet?
19731
19732
19733 @node Kill Files
19734 @section Kill Files
19735 @cindex kill files
19736
19737 Gnus still supports those pesky old kill files.  In fact, the kill file
19738 entries can now be expiring, which is something I wrote before Daniel
19739 Quinlan thought of doing score files, so I've left the code in there.
19740
19741 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19742 than score processing, so it might be a good idea to rewrite your kill
19743 files into score files.
19744
19745 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19746 forms into this file, which means that you can use kill files as some
19747 sort of primitive hook function to be run on group entry, even though
19748 that isn't a very good idea.
19749
19750 Normal kill files look like this:
19751
19752 @lisp
19753 (gnus-kill "From" "Lars Ingebrigtsen")
19754 (gnus-kill "Subject" "ding")
19755 (gnus-expunge "X")
19756 @end lisp
19757
19758 This will mark every article written by me as read, and remove the
19759 marked articles from the summary buffer.  Very useful, you'll agree.
19760
19761 Other programs use a totally different kill file syntax.  If Gnus
19762 encounters what looks like a @code{rn} kill file, it will take a stab at
19763 interpreting it.
19764
19765 Two summary functions for editing a @sc{gnus} kill file:
19766
19767 @table @kbd
19768
19769 @item M-k
19770 @kindex M-k (Summary)
19771 @findex gnus-summary-edit-local-kill
19772 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19773
19774 @item M-K
19775 @kindex M-K (Summary)
19776 @findex gnus-summary-edit-global-kill
19777 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19778 @end table
19779
19780 Two group mode functions for editing the kill files:
19781
19782 @table @kbd
19783
19784 @item M-k
19785 @kindex M-k (Group)
19786 @findex gnus-group-edit-local-kill
19787 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19788
19789 @item M-K
19790 @kindex M-K (Group)
19791 @findex gnus-group-edit-global-kill
19792 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19793 @end table
19794
19795 Kill file variables:
19796
19797 @table @code
19798 @item gnus-kill-file-name
19799 @vindex gnus-kill-file-name
19800 A kill file for the group @samp{soc.motss} is normally called
19801 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19802 this file name is detailed by the @code{gnus-kill-file-name} variable.
19803 The ``global'' kill file (not in the score file sense of ``global'', of
19804 course) is just called @file{KILL}.
19805
19806 @vindex gnus-kill-save-kill-file
19807 @item gnus-kill-save-kill-file
19808 If this variable is non-@code{nil}, Gnus will save the
19809 kill file after processing, which is necessary if you use expiring
19810 kills.
19811
19812 @item gnus-apply-kill-hook
19813 @vindex gnus-apply-kill-hook
19814 @findex gnus-apply-kill-file-unless-scored
19815 @findex gnus-apply-kill-file
19816 A hook called to apply kill files to a group.  It is
19817 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19818 kill file if you have a score file for the same group, you can set this
19819 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19820 kill files to be processed, you should set this variable to @code{nil}.
19821
19822 @item gnus-kill-file-mode-hook
19823 @vindex gnus-kill-file-mode-hook
19824 A hook called in kill-file mode buffers.
19825
19826 @end table
19827
19828
19829 @node Converting Kill Files
19830 @section Converting Kill Files
19831 @cindex kill files
19832 @cindex converting kill files
19833
19834 If you have loads of old kill files, you may want to convert them into
19835 score files.  If they are ``regular'', you can use
19836 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19837 by hand.
19838
19839 The kill to score conversion package isn't included in Gnus by default.
19840 You can fetch it from
19841 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19842
19843 If your old kill files are very complex---if they contain more
19844 non-@code{gnus-kill} forms than not, you'll have to convert them by
19845 hand.  Or just let them be as they are.  Gnus will still use them as
19846 before.
19847
19848
19849 @node GroupLens
19850 @section GroupLens
19851 @cindex GroupLens
19852
19853 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19854 collaborative filtering system that helps you work together with other
19855 people to find the quality news articles out of the huge volume of
19856 news articles generated every day.
19857
19858 To accomplish this the GroupLens system combines your opinions about
19859 articles you have already read with the opinions of others who have done
19860 likewise and gives you a personalized prediction for each unread news
19861 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19862 rate articles, and finds other people that rate articles the same way.
19863 Once it has found some people you agree with it tells you, in the form
19864 of a prediction, what they thought of the article.  You can use this
19865 prediction to help you decide whether or not you want to read the
19866 article.
19867
19868 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19869 so this section is mostly of historical interest.
19870
19871 @menu
19872 * Using GroupLens::             How to make Gnus use GroupLens.
19873 * Rating Articles::             Letting GroupLens know how you rate articles.
19874 * Displaying Predictions::      Displaying predictions given by GroupLens.
19875 * GroupLens Variables::         Customizing GroupLens.
19876 @end menu
19877
19878
19879 @node Using GroupLens
19880 @subsection Using GroupLens
19881
19882 To use GroupLens you must register a pseudonym with your local
19883 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19884 Bureau (BBB)} is the only better bit in town at the moment.
19885
19886 Once you have registered you'll need to set a couple of variables.
19887
19888 @table @code
19889
19890 @item gnus-use-grouplens
19891 @vindex gnus-use-grouplens
19892 Setting this variable to a non-@code{nil} value will make Gnus hook into
19893 all the relevant GroupLens functions.
19894
19895 @item grouplens-pseudonym
19896 @vindex grouplens-pseudonym
19897 This variable should be set to the pseudonym you got when registering
19898 with the Better Bit Bureau.
19899
19900 @item grouplens-newsgroups
19901 @vindex grouplens-newsgroups
19902 A list of groups that you want to get GroupLens predictions for.
19903
19904 @end table
19905
19906 That's the minimum of what you need to get up and running with GroupLens.
19907 Once you've registered, GroupLens will start giving you scores for
19908 articles based on the average of what other people think.  But, to get
19909 the real benefit of GroupLens you need to start rating articles
19910 yourself.  Then the scores GroupLens gives you will be personalized for
19911 you, based on how the people you usually agree with have already rated.
19912
19913
19914 @node Rating Articles
19915 @subsection Rating Articles
19916
19917 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19918 Where 1 means something like this article is a waste of bandwidth and 5
19919 means that the article was really good.  The basic question to ask
19920 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19921 like this one?''
19922
19923 There are four ways to enter a rating for an article in GroupLens.
19924
19925 @table @kbd
19926
19927 @item r
19928 @kindex r (GroupLens)
19929 @findex bbb-summary-rate-article
19930 This function will prompt you for a rating on a scale of one to five.
19931
19932 @item k
19933 @kindex k (GroupLens)
19934 @findex grouplens-score-thread
19935 This function will prompt you for a rating, and rate all the articles in
19936 the thread.  This is really useful for some of those long running giant
19937 threads in rec.humor.
19938
19939 @end table
19940
19941 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19942 the score of the article you're reading.
19943
19944 @table @kbd
19945
19946 @item 1-5 n
19947 @kindex n (GroupLens)
19948 @findex grouplens-next-unread-article
19949 Rate the article and go to the next unread article.
19950
19951 @item 1-5 ,
19952 @kindex , (GroupLens)
19953 @findex grouplens-best-unread-article
19954 Rate the article and go to the next unread article with the highest score.
19955
19956 @end table
19957
19958 If you want to give the current article a score of 4 and then go to the
19959 next article, just type @kbd{4 n}.
19960
19961
19962 @node Displaying Predictions
19963 @subsection Displaying Predictions
19964
19965 GroupLens makes a prediction for you about how much you will like a
19966 news article.  The predictions from GroupLens are on a scale from 1 to
19967 5, where 1 is the worst and 5 is the best.  You can use the predictions
19968 from GroupLens in one of three ways controlled by the variable
19969 @code{gnus-grouplens-override-scoring}.
19970
19971 @vindex gnus-grouplens-override-scoring
19972 There are three ways to display predictions in grouplens.  You may
19973 choose to have the GroupLens scores contribute to, or override the
19974 regular gnus scoring mechanism.  override is the default; however, some
19975 people prefer to see the Gnus scores plus the grouplens scores.  To get
19976 the separate scoring behavior you need to set
19977 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19978 GroupLens predictions combined with the grouplens scores set it to
19979 @code{'override} and to combine the scores set
19980 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19981 the combine option you will also want to set the values for
19982 @code{grouplens-prediction-offset} and
19983 @code{grouplens-score-scale-factor}.
19984
19985 @vindex grouplens-prediction-display
19986 In either case, GroupLens gives you a few choices for how you would like
19987 to see your predictions displayed.  The display of predictions is
19988 controlled by the @code{grouplens-prediction-display} variable.
19989
19990 The following are valid values for that variable.
19991
19992 @table @code
19993 @item prediction-spot
19994 The higher the prediction, the further to the right an @samp{*} is
19995 displayed.
19996
19997 @item confidence-interval
19998 A numeric confidence interval.
19999
20000 @item prediction-bar
20001 The higher the prediction, the longer the bar.
20002
20003 @item confidence-bar
20004 Numerical confidence.
20005
20006 @item confidence-spot
20007 The spot gets bigger with more confidence.
20008
20009 @item prediction-num
20010 Plain-old numeric value.
20011
20012 @item confidence-plus-minus
20013 Prediction +/- confidence.
20014
20015 @end table
20016
20017
20018 @node GroupLens Variables
20019 @subsection GroupLens Variables
20020
20021 @table @code
20022
20023 @item gnus-summary-grouplens-line-format
20024 The summary line format used in GroupLens-enhanced summary buffers.  It
20025 accepts the same specs as the normal summary line format (@pxref{Summary
20026 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20027 %s\n}.
20028
20029 @item grouplens-bbb-host
20030 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20031 default.
20032
20033 @item grouplens-bbb-port
20034 Port of the host running the bbbd server.  The default is 9000.
20035
20036 @item grouplens-score-offset
20037 Offset the prediction by this value.  In other words, subtract the
20038 prediction value by this number to arrive at the effective score.  The
20039 default is 0.
20040
20041 @item grouplens-score-scale-factor
20042 This variable allows the user to magnify the effect of GroupLens scores.
20043 The scale factor is applied after the offset.  The default is 1.
20044
20045 @end table
20046
20047
20048 @node Advanced Scoring
20049 @section Advanced Scoring
20050
20051 Scoring on Subjects and From headers is nice enough, but what if you're
20052 really interested in what a person has to say only when she's talking
20053 about a particular subject?  Or what if you really don't want to
20054 read what person A has to say when she's following up to person B, but
20055 want to read what she says when she's following up to person C?
20056
20057 By using advanced scoring rules you may create arbitrarily complex
20058 scoring patterns.
20059
20060 @menu
20061 * Advanced Scoring Syntax::     A definition.
20062 * Advanced Scoring Examples::   What they look like.
20063 * Advanced Scoring Tips::       Getting the most out of it.
20064 @end menu
20065
20066
20067 @node Advanced Scoring Syntax
20068 @subsection Advanced Scoring Syntax
20069
20070 Ordinary scoring rules have a string as the first element in the rule.
20071 Advanced scoring rules have a list as the first element.  The second
20072 element is the score to be applied if the first element evaluated to a
20073 non-@code{nil} value.
20074
20075 These lists may consist of three logical operators, one redirection
20076 operator, and various match operators.
20077
20078 Logical operators:
20079
20080 @table @code
20081 @item &
20082 @itemx and
20083 This logical operator will evaluate each of its arguments until it finds
20084 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20085 evaluate to @code{true} values, then this operator will return
20086 @code{true}.
20087
20088 @item |
20089 @itemx or
20090 This logical operator will evaluate each of its arguments until it finds
20091 one that evaluates to @code{true}.  If no arguments are @code{true},
20092 then this operator will return @code{false}.
20093
20094 @item !
20095 @itemx not
20096 @itemx Â¬
20097 This logical operator only takes a single argument.  It returns the
20098 logical negation of the value of its argument.
20099
20100 @end table
20101
20102 There is an @dfn{indirection operator} that will make its arguments
20103 apply to the ancestors of the current article being scored.  For
20104 instance, @code{1-} will make score rules apply to the parent of the
20105 current article.  @code{2-} will make score rules apply to the
20106 grandparent of the current article.  Alternatively, you can write
20107 @code{^^}, where the number of @code{^}s (carets) says how far back into
20108 the ancestry you want to go.
20109
20110 Finally, we have the match operators.  These are the ones that do the
20111 real work.  Match operators are header name strings followed by a match
20112 and a match type.  A typical match operator looks like @samp{("from"
20113 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20114 simple scoring, and the match types are also the same.
20115
20116
20117 @node Advanced Scoring Examples
20118 @subsection Advanced Scoring Examples
20119
20120 Please note that the following examples are score file rules.  To
20121 make a complete score file from them, surround them with another pair
20122 of parentheses.
20123
20124 Let's say you want to increase the score of articles written by Lars
20125 when he's talking about Gnus:
20126
20127 @example
20128 @group
20129 ((&
20130   ("from" "Lars Ingebrigtsen")
20131   ("subject" "Gnus"))
20132  1000)
20133 @end group
20134 @end example
20135
20136 Quite simple, huh?
20137
20138 When he writes long articles, he sometimes has something nice to say:
20139
20140 @example
20141 ((&
20142   ("from" "Lars Ingebrigtsen")
20143   (|
20144    ("subject" "Gnus")
20145    ("lines" 100 >)))
20146  1000)
20147 @end example
20148
20149 However, when he responds to things written by Reig Eigil Logge, you
20150 really don't want to read what he's written:
20151
20152 @example
20153 ((&
20154   ("from" "Lars Ingebrigtsen")
20155   (1- ("from" "Reig Eigir Logge")))
20156  -100000)
20157 @end example
20158
20159 Everybody that follows up Redmondo when he writes about disappearing
20160 socks should have their scores raised, but only when they talk about
20161 white socks.  However, when Lars talks about socks, it's usually not
20162 very interesting:
20163
20164 @example
20165 ((&
20166   (1-
20167    (&
20168     ("from" "redmondo@@.*no" r)
20169     ("body" "disappearing.*socks" t)))
20170   (! ("from" "Lars Ingebrigtsen"))
20171   ("body" "white.*socks"))
20172  1000)
20173 @end example
20174
20175 The possibilities are endless.
20176
20177
20178 @node Advanced Scoring Tips
20179 @subsection Advanced Scoring Tips
20180
20181 The @code{&} and @code{|} logical operators do short-circuit logic.
20182 That is, they stop processing their arguments when it's clear what the
20183 result of the operation will be.  For instance, if one of the arguments
20184 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20185 the rest of the arguments.  This means that you should put slow matches
20186 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20187 @samp{subject}) first.
20188
20189 The indirection arguments (@code{1-} and so on) will make their
20190 arguments work on previous generations of the thread.  If you say
20191 something like:
20192
20193 @example
20194 ...
20195 (1-
20196  (1-
20197   ("from" "lars")))
20198 ...
20199 @end example
20200
20201 Then that means "score on the from header of the grandparent of the
20202 current article".  An indirection is quite fast, but it's better to say:
20203
20204 @example
20205 (1-
20206  (&
20207   ("from" "Lars")
20208   ("subject" "Gnus")))
20209 @end example
20210
20211 than it is to say:
20212
20213 @example
20214 (&
20215  (1- ("from" "Lars"))
20216  (1- ("subject" "Gnus")))
20217 @end example
20218
20219
20220 @node Score Decays
20221 @section Score Decays
20222 @cindex score decays
20223 @cindex decays
20224
20225 You may find that your scores have a tendency to grow without
20226 bounds, especially if you're using adaptive scoring.  If scores get too
20227 big, they lose all meaning---they simply max out and it's difficult to
20228 use them in any sensible way.
20229
20230 @vindex gnus-decay-scores
20231 @findex gnus-decay-score
20232 @vindex gnus-decay-score-function
20233 Gnus provides a mechanism for decaying scores to help with this problem.
20234 When score files are loaded and @code{gnus-decay-scores} is
20235 non-@code{nil}, Gnus will run the score files through the decaying
20236 mechanism thereby lowering the scores of all non-permanent score rules.
20237 The decay itself if performed by the @code{gnus-decay-score-function}
20238 function, which is @code{gnus-decay-score} by default.  Here's the
20239 definition of that function:
20240
20241 @lisp
20242 (defun gnus-decay-score (score)
20243   "Decay SCORE.
20244 This is done according to `gnus-score-decay-constant'
20245 and `gnus-score-decay-scale'."
20246   (floor
20247    (- score
20248       (* (if (< score 0) 1 -1)
20249          (min (abs score)
20250               (max gnus-score-decay-constant
20251                    (* (abs score)
20252                       gnus-score-decay-scale)))))))
20253 @end lisp
20254
20255 @vindex gnus-score-decay-scale
20256 @vindex gnus-score-decay-constant
20257 @code{gnus-score-decay-constant} is 3 by default and
20258 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20259
20260 @enumerate
20261 @item
20262 Scores between -3 and 3 will be set to 0 when this function is called.
20263
20264 @item
20265 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20266
20267 @item
20268 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20269 score.
20270 @end enumerate
20271
20272 If you don't like this decay function, write your own.  It is called
20273 with the score to be decayed as its only parameter, and it should return
20274 the new score, which should be an integer.
20275
20276 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20277 four days, Gnus will decay the scores four times, for instance.
20278
20279 @iftex
20280 @iflatex
20281 @chapter Message
20282 @include message.texi
20283 @chapter Emacs MIME
20284 @include emacs-mime.texi
20285 @chapter Sieve
20286 @include sieve.texi
20287 @c @chapter PGG
20288 @c @include pgg.texi
20289 @end iflatex
20290 @end iftex
20291
20292 @node Various
20293 @chapter Various
20294
20295 @menu
20296 * Process/Prefix::              A convention used by many treatment commands.
20297 * Interactive::                 Making Gnus ask you many questions.
20298 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20299 * Formatting Variables::        You can specify what buffers should look like.
20300 * Window Layout::               Configuring the Gnus buffer windows.
20301 * Faces and Fonts::             How to change how faces look.
20302 * Compilation::                 How to speed Gnus up.
20303 * Mode Lines::                  Displaying information in the mode lines.
20304 * Highlighting and Menus::      Making buffers look all nice and cozy.
20305 * Buttons::                     Get tendinitis in ten easy steps!
20306 * Daemons::                     Gnus can do things behind your back.
20307 * NoCeM::                       How to avoid spam and other fatty foods.
20308 * Undo::                        Some actions can be undone.
20309 * Predicate Specifiers::        Specifying predicates.
20310 * Moderation::                  What to do if you're a moderator.
20311 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20312 * Fuzzy Matching::              What's the big fuzz?
20313 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20314 * Various Various::             Things that are really various.
20315 @end menu
20316
20317
20318 @node Process/Prefix
20319 @section Process/Prefix
20320 @cindex process/prefix convention
20321
20322 Many functions, among them functions for moving, decoding and saving
20323 articles, use what is known as the @dfn{Process/Prefix convention}.
20324
20325 This is a method for figuring out what articles the user wants the
20326 command to be performed on.
20327
20328 It goes like this:
20329
20330 If the numeric prefix is N, perform the operation on the next N
20331 articles, starting with the current one.  If the numeric prefix is
20332 negative, perform the operation on the previous N articles, starting
20333 with the current one.
20334
20335 @vindex transient-mark-mode
20336 If @code{transient-mark-mode} in non-@code{nil} and the region is
20337 active, all articles in the region will be worked upon.
20338
20339 If there is no numeric prefix, but some articles are marked with the
20340 process mark, perform the operation on the articles marked with
20341 the process mark.
20342
20343 If there is neither a numeric prefix nor any articles marked with the
20344 process mark, just perform the operation on the current article.
20345
20346 Quite simple, really, but it needs to be made clear so that surprises
20347 are avoided.
20348
20349 Commands that react to the process mark will push the current list of
20350 process marked articles onto a stack and will then clear all process
20351 marked articles.  You can restore the previous configuration with the
20352 @kbd{M P y} command (@pxref{Setting Process Marks}).
20353
20354 @vindex gnus-summary-goto-unread
20355 One thing that seems to shock & horrify lots of people is that, for
20356 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20357 Since each @kbd{d} (which marks the current article as read) by default
20358 goes to the next unread article after marking, this means that @kbd{3 d}
20359 will mark the next three unread articles as read, no matter what the
20360 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20361 @code{nil} for a more straightforward action.
20362
20363 Many commands do not use the process/prefix convention.  All commands
20364 that do explicitly say so in this manual.  To apply the process/prefix
20365 convention to commands that do not use it, you can use the @kbd{M-&}
20366 command.  For instance, to mark all the articles in the group as
20367 expirable, you could say @kbd{M P b M-& E}.
20368
20369
20370 @node Interactive
20371 @section Interactive
20372 @cindex interaction
20373
20374 @table @code
20375
20376 @item gnus-novice-user
20377 @vindex gnus-novice-user
20378 If this variable is non-@code{nil}, you are either a newcomer to the
20379 World of Usenet, or you are very cautious, which is a nice thing to be,
20380 really.  You will be given questions of the type ``Are you sure you want
20381 to do this?'' before doing anything dangerous.  This is @code{t} by
20382 default.
20383
20384 @item gnus-expert-user
20385 @vindex gnus-expert-user
20386 If this variable is non-@code{nil}, you will seldom be asked any
20387 questions by Gnus.  It will simply assume you know what you're doing, no
20388 matter how strange.
20389
20390 @item gnus-interactive-catchup
20391 @vindex gnus-interactive-catchup
20392 Require confirmation before catching up a group if non-@code{nil}.  It
20393 is @code{t} by default.
20394
20395 @item gnus-interactive-exit
20396 @vindex gnus-interactive-exit
20397 Require confirmation before exiting Gnus.  This variable is @code{t} by
20398 default.
20399 @end table
20400
20401
20402 @node Symbolic Prefixes
20403 @section Symbolic Prefixes
20404 @cindex symbolic prefixes
20405
20406 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20407 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20408 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20409 rule of 900 to the current article.
20410
20411 This is all nice and well, but what if you want to give a command some
20412 additional information?  Well, what most commands do is interpret the
20413 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20414 doesn't want a backup file to be created when saving the current buffer,
20415 for instance.  But what if you want to save without making a backup
20416 file, and you want Emacs to flash lights and play a nice tune at the
20417 same time?  You can't, and you're probably perfectly happy that way.
20418
20419 @kindex M-i (Summary)
20420 @findex gnus-symbolic-argument
20421 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20422 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20423 character typed in is the value.  You can stack as many @kbd{M-i}
20424 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20425 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20426 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20427 @code{b}''.  You get the drift.
20428
20429 Typing in symbolic prefixes to commands that don't accept them doesn't
20430 hurt, but it doesn't do any good either.  Currently not many Gnus
20431 functions make use of the symbolic prefix.
20432
20433 If you're interested in how Gnus implements this, @pxref{Extended
20434 Interactive}.
20435
20436
20437 @node Formatting Variables
20438 @section Formatting Variables
20439 @cindex formatting variables
20440
20441 Throughout this manual you've probably noticed lots of variables called
20442 things like @code{gnus-group-line-format} and
20443 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20444 output lines in the various buffers.  There's quite a lot of them.
20445 Fortunately, they all use the same syntax, so there's not that much to
20446 be annoyed by.
20447
20448 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20449 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20450 lots of percentages everywhere.
20451
20452 @menu
20453 * Formatting Basics::           A formatting variable is basically a format string.
20454 * Mode Line Formatting::        Some rules about mode line formatting variables.
20455 * Advanced Formatting::         Modifying output in various ways.
20456 * User-Defined Specs::          Having Gnus call your own functions.
20457 * Formatting Fonts::            Making the formatting look colorful and nice.
20458 * Positioning Point::           Moving point to a position after an operation.
20459 * Tabulation::                  Tabulating your output.
20460 * Wide Characters::             Dealing with wide characters.
20461 @end menu
20462
20463 Currently Gnus uses the following formatting variables:
20464 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20465 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20466 @code{gnus-group-mode-line-format},
20467 @code{gnus-summary-mode-line-format},
20468 @code{gnus-article-mode-line-format},
20469 @code{gnus-server-mode-line-format}, and
20470 @code{gnus-summary-pick-line-format}.
20471
20472 All these format variables can also be arbitrary elisp forms.  In that
20473 case, they will be @code{eval}ed to insert the required lines.
20474
20475 @kindex M-x gnus-update-format
20476 @findex gnus-update-format
20477 Gnus includes a command to help you while creating your own format
20478 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20479 update the spec in question and pop you to a buffer where you can
20480 examine the resulting Lisp code to be run to generate the line.
20481
20482
20483
20484 @node Formatting Basics
20485 @subsection Formatting Basics
20486
20487 Each @samp{%} element will be replaced by some string or other when the
20488 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20489 spec, and pad with spaces to get a 5-character field''.
20490
20491 As with normal C and Emacs Lisp formatting strings, the numerical
20492 modifier between the @samp{%} and the formatting type character will
20493 @dfn{pad} the output so that it is always at least that long.
20494 @samp{%5y} will make the field always (at least) five characters wide by
20495 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20496 the right instead.
20497
20498 You may also wish to limit the length of the field to protect against
20499 particularly wide values.  For that you can say @samp{%4,6y}, which
20500 means that the field will never be more than 6 characters wide and never
20501 less than 4 characters wide.
20502
20503 Also Gnus supports some extended format specifications, such as
20504 @samp{%&user-date;}.
20505
20506
20507 @node Mode Line Formatting
20508 @subsection Mode Line Formatting
20509
20510 Mode line formatting variables (e.g.,
20511 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20512 buffer line oriented formatting variables (@pxref{Formatting Basics})
20513 with the following two differences:
20514
20515 @enumerate
20516
20517 @item
20518 There must be no newline (@samp{\n}) at the end.
20519
20520 @item
20521 The special @samp{%%b} spec can be used to display the buffer name.
20522 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20523 @samp{%} to allow it to pass through the formatting machinery unmangled,
20524 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20525 display interprets to mean ``show the buffer name''.  For a full list of
20526 mode line specs Emacs understands, see the documentation of the
20527 @code{mode-line-format} variable.
20528
20529 @end enumerate
20530
20531
20532 @node Advanced Formatting
20533 @subsection Advanced Formatting
20534
20535 It is frequently useful to post-process the fields in some way.
20536 Padding, limiting, cutting off parts and suppressing certain values can
20537 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20538 look like @samp{%~(cut 3)~(ignore "0")y}.
20539
20540 These are the valid modifiers:
20541
20542 @table @code
20543 @item pad
20544 @itemx pad-left
20545 Pad the field to the left with spaces until it reaches the required
20546 length.
20547
20548 @item pad-right
20549 Pad the field to the right with spaces until it reaches the required
20550 length.
20551
20552 @item max
20553 @itemx max-left
20554 Cut off characters from the left until it reaches the specified length.
20555
20556 @item max-right
20557 Cut off characters from the right until it reaches the specified
20558 length.
20559
20560 @item cut
20561 @itemx cut-left
20562 Cut off the specified number of characters from the left.
20563
20564 @item cut-right
20565 Cut off the specified number of characters from the right.
20566
20567 @item ignore
20568 Return an empty string if the field is equal to the specified value.
20569
20570 @item form
20571 Use the specified form as the field value when the @samp{@@} spec is
20572 used.
20573
20574 Here's an example:
20575
20576 @lisp
20577 "~(form (current-time-string))@@"
20578 @end lisp
20579
20580 @end table
20581
20582 Let's take an example.  The @samp{%o} spec in the summary mode lines
20583 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20584 This is quite a mouthful, so we want to shave off the century number and
20585 the time, leaving us with a six-character date.  That would be
20586 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20587 maxing, and we need the padding to ensure that the date is never less
20588 than 6 characters to make it look nice in columns.)
20589
20590 Ignoring is done first; then cutting; then maxing; and then as the very
20591 last operation, padding.
20592
20593 @vindex gnus-compile-user-specs
20594 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
20595 default) with your strong personality, and use a lots of these advanced
20596 thingies, you'll find that Gnus gets quite slow.  This can be helped
20597 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
20598 the look of your lines.
20599 @xref{Compilation}.
20600
20601
20602 @node User-Defined Specs
20603 @subsection User-Defined Specs
20604
20605 All the specs allow for inserting user defined specifiers---@samp{u}.
20606 The next character in the format string should be a letter.  Gnus
20607 will call the function @code{gnus-user-format-function-}@samp{X}, where
20608 @samp{X} is the letter following @samp{%u}.  The function will be passed
20609 a single parameter---what the parameter means depends on what buffer
20610 it's being called from.  The function should return a string, which will
20611 be inserted into the buffer just like information from any other
20612 specifier.  This function may also be called with dummy values, so it
20613 should protect against that.
20614
20615 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20616 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20617
20618 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20619 much the same without defining new functions.  Here's an example:
20620 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20621 given here will be evaluated to yield the current line number, and then
20622 inserted.
20623
20624
20625 @node Formatting Fonts
20626 @subsection Formatting Fonts
20627
20628 There are specs for highlighting, and these are shared by all the format
20629 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20630 the special @code{mouse-face} property set, which means that it will be
20631 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20632 over it.
20633
20634 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20635 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20636 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20637 and so on.  Create as many faces as you wish.  The same goes for the
20638 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20639 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20640
20641 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20642 special @code{balloon-help} property set to
20643 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20644 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20645 variables should be either strings or symbols naming functions that
20646 return a string.  When the mouse passes over text with this property
20647 set, a balloon window will appear and display the string.  Please
20648 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20649 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20650 XEmacs) for more information on this.  (For technical reasons, the
20651 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20652 paragraph.)
20653
20654 Here's an alternative recipe for the group buffer:
20655
20656 @lisp
20657 ;; @r{Create three face types.}
20658 (setq gnus-face-1 'bold)
20659 (setq gnus-face-3 'italic)
20660
20661 ;; @r{We want the article count to be in}
20662 ;; @r{a bold and green face.  So we create}
20663 ;; @r{a new face called @code{my-green-bold}.}
20664 (copy-face 'bold 'my-green-bold)
20665 ;; @r{Set the color.}
20666 (set-face-foreground 'my-green-bold "ForestGreen")
20667 (setq gnus-face-2 'my-green-bold)
20668
20669 ;; @r{Set the new & fancy format.}
20670 (setq gnus-group-line-format
20671       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20672 @end lisp
20673
20674 I'm sure you'll be able to use this scheme to create totally unreadable
20675 and extremely vulgar displays.  Have fun!
20676
20677 Note that the @samp{%(} specs (and friends) do not make any sense on the
20678 mode-line variables.
20679
20680 @node Positioning Point
20681 @subsection Positioning Point
20682
20683 Gnus usually moves point to a pre-defined place on each line in most
20684 buffers.  By default, point move to the first colon character on the
20685 line.  You can customize this behaviour in three different ways.
20686
20687 You can move the colon character to somewhere else on the line.
20688
20689 @findex gnus-goto-colon
20690 You can redefine the function that moves the point to the colon.  The
20691 function is called @code{gnus-goto-colon}.
20692
20693 But perhaps the most convenient way to deal with this, if you don't want
20694 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20695 put a @samp{%*} somewhere in your format line definition, Gnus will
20696 place point there.
20697
20698
20699 @node Tabulation
20700 @subsection Tabulation
20701
20702 You can usually line up your displays by padding and cutting your
20703 strings.  However, when combining various strings of different size, it
20704 can often be more convenient to just output the strings, and then worry
20705 about lining up the following text afterwards.
20706
20707 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20708 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20709
20710 @samp{%50=} will insert space characters to pad the line up to column
20711 50.  If the text is already past column 50, nothing will be inserted.
20712 This is the soft tabulator.
20713
20714 @samp{%-50=} will insert space characters to pad the line up to column
20715 50.  If the text is already past column 50, the excess text past column
20716 50 will be removed.  This is the hard tabulator.
20717
20718
20719 @node Wide Characters
20720 @subsection Wide Characters
20721
20722 Fixed width fonts in most countries have characters of the same width.
20723 Some countries, however, use Latin characters mixed with wider
20724 characters---most notable East Asian countries.
20725
20726 The problem is that when formatting, Gnus assumes that if a string is 10
20727 characters wide, it'll be 10 Latin characters wide on the screen.  In
20728 these countries, that's not true.
20729
20730 @vindex gnus-use-correct-string-widths
20731 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20732 @code{t}.  This makes buffer generation slower, but the results will be
20733 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20734 for Emacs.
20735
20736
20737 @node Window Layout
20738 @section Window Layout
20739 @cindex window layout
20740
20741 No, there's nothing here about X, so be quiet.
20742
20743 @vindex gnus-use-full-window
20744 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20745 other windows and occupy the entire Emacs screen by itself.  It is
20746 @code{t} by default.
20747
20748 Setting this variable to @code{nil} kinda works, but there are
20749 glitches.  Use at your own peril.
20750
20751 @vindex gnus-buffer-configuration
20752 @code{gnus-buffer-configuration} describes how much space each Gnus
20753 buffer should be given.  Here's an excerpt of this variable:
20754
20755 @lisp
20756 ((group (vertical 1.0 (group 1.0 point)
20757                       (if gnus-carpal (group-carpal 4))))
20758  (article (vertical 1.0 (summary 0.25 point)
20759                         (article 1.0))))
20760 @end lisp
20761
20762 This is an alist.  The @dfn{key} is a symbol that names some action or
20763 other.  For instance, when displaying the group buffer, the window
20764 configuration function will use @code{group} as the key.  A full list of
20765 possible names is listed below.
20766
20767 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20768 should occupy.  To take the @code{article} split as an example -
20769
20770 @lisp
20771 (article (vertical 1.0 (summary 0.25 point)
20772                        (article 1.0)))
20773 @end lisp
20774
20775 This @dfn{split} says that the summary buffer should occupy 25% of upper
20776 half of the screen, and that it is placed over the article buffer.  As
20777 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20778 reaching for that calculator there).  However, the special number
20779 @code{1.0} is used to signal that this buffer should soak up all the
20780 rest of the space available after the rest of the buffers have taken
20781 whatever they need.  There should be only one buffer with the @code{1.0}
20782 size spec per split.
20783
20784 Point will be put in the buffer that has the optional third element
20785 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20786 split where the tag @code{frame-focus} is a member (i.e. is the third or
20787 fourth element in the list, depending on whether the @code{point} tag is
20788 present) gets focus.
20789
20790 Here's a more complicated example:
20791
20792 @lisp
20793 (article (vertical 1.0 (group 4)
20794                        (summary 0.25 point)
20795                        (if gnus-carpal (summary-carpal 4))
20796                        (article 1.0)))
20797 @end lisp
20798
20799 If the size spec is an integer instead of a floating point number,
20800 then that number will be used to say how many lines a buffer should
20801 occupy, not a percentage.
20802
20803 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20804 precise---if the @code{car} of the split is a function or a subr), this
20805 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20806 be used as a split.  This means that there will be three buffers if
20807 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20808 is non-@code{nil}.
20809
20810 Not complicated enough for you?  Well, try this on for size:
20811
20812 @lisp
20813 (article (horizontal 1.0
20814              (vertical 0.5
20815                  (group 1.0)
20816                  (gnus-carpal 4))
20817              (vertical 1.0
20818                  (summary 0.25 point)
20819                  (summary-carpal 4)
20820                  (article 1.0))))
20821 @end lisp
20822
20823 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20824 @code{horizontal} thingie?
20825
20826 If the first element in one of the split is @code{horizontal}, Gnus will
20827 split the window horizontally, giving you two windows side-by-side.
20828 Inside each of these strips you may carry on all you like in the normal
20829 fashion.  The number following @code{horizontal} says what percentage of
20830 the screen is to be given to this strip.
20831
20832 For each split, there @emph{must} be one element that has the 100% tag.
20833 The splitting is never accurate, and this buffer will eat any leftover
20834 lines from the splits.
20835
20836 To be slightly more formal, here's a definition of what a valid split
20837 may look like:
20838
20839 @example
20840 @group
20841 split      = frame | horizontal | vertical | buffer | form
20842 frame      = "(frame " size *split ")"
20843 horizontal = "(horizontal " size *split ")"
20844 vertical   = "(vertical " size *split ")"
20845 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20846 size       = number | frame-params
20847 buf-name   = group | article | summary ...
20848 @end group
20849 @end example
20850
20851 The limitations are that the @code{frame} split can only appear as the
20852 top-level split.  @var{form} should be an Emacs Lisp form that should
20853 return a valid split.  We see that each split is fully recursive, and
20854 may contain any number of @code{vertical} and @code{horizontal} splits.
20855
20856 @vindex gnus-window-min-width
20857 @vindex gnus-window-min-height
20858 @cindex window height
20859 @cindex window width
20860 Finding the right sizes can be a bit complicated.  No window may be less
20861 than @code{gnus-window-min-height} (default 1) characters high, and all
20862 windows must be at least @code{gnus-window-min-width} (default 1)
20863 characters wide.  Gnus will try to enforce this before applying the
20864 splits.  If you want to use the normal Emacs window width/height limit,
20865 you can just set these two variables to @code{nil}.
20866
20867 If you're not familiar with Emacs terminology, @code{horizontal} and
20868 @code{vertical} splits may work the opposite way of what you'd expect.
20869 Windows inside a @code{horizontal} split are shown side-by-side, and
20870 windows within a @code{vertical} split are shown above each other.
20871
20872 @findex gnus-configure-frame
20873 If you want to experiment with window placement, a good tip is to call
20874 @code{gnus-configure-frame} directly with a split.  This is the function
20875 that does all the real work when splitting buffers.  Below is a pretty
20876 nonsensical configuration with 5 windows; two for the group buffer and
20877 three for the article buffer.  (I said it was nonsensical.)  If you
20878 @code{eval} the statement below, you can get an idea of how that would
20879 look straight away, without going through the normal Gnus channels.
20880 Play with it until you're satisfied, and then use
20881 @code{gnus-add-configuration} to add your new creation to the buffer
20882 configuration list.
20883
20884 @lisp
20885 (gnus-configure-frame
20886  '(horizontal 1.0
20887     (vertical 10
20888       (group 1.0)
20889       (article 0.3 point))
20890     (vertical 1.0
20891       (article 1.0)
20892       (horizontal 4
20893         (group 1.0)
20894         (article 10)))))
20895 @end lisp
20896
20897 You might want to have several frames as well.  No prob---just use the
20898 @code{frame} split:
20899
20900 @lisp
20901 (gnus-configure-frame
20902  '(frame 1.0
20903          (vertical 1.0
20904                    (summary 0.25 point frame-focus)
20905                    (article 1.0))
20906          (vertical ((height . 5) (width . 15)
20907                     (user-position . t)
20908                     (left . -1) (top . 1))
20909                    (picon 1.0))))
20910
20911 @end lisp
20912
20913 This split will result in the familiar summary/article window
20914 configuration in the first (or ``main'') frame, while a small additional
20915 frame will be created where picons will be shown.  As you can see,
20916 instead of the normal @code{1.0} top-level spec, each additional split
20917 should have a frame parameter alist as the size spec.
20918 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20919 Reference Manual}.  Under XEmacs, a frame property list will be
20920 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20921 is such a plist.
20922 The list of all possible keys for @code{gnus-buffer-configuration} can
20923 be found in its default value.
20924
20925 Note that the @code{message} key is used for both
20926 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20927 it is desirable to distinguish between the two, something like this
20928 might be used:
20929
20930 @lisp
20931 (message (horizontal 1.0
20932                      (vertical 1.0 (message 1.0 point))
20933                      (vertical 0.24
20934                                (if (buffer-live-p gnus-summary-buffer)
20935                                    '(summary 0.5))
20936                                (group 1.0))))
20937 @end lisp
20938
20939 One common desire for a multiple frame split is to have a separate frame
20940 for composing mail and news while leaving the original frame intact.  To
20941 accomplish that, something like the following can be done:
20942
20943 @lisp
20944 (message
20945   (frame 1.0
20946          (if (not (buffer-live-p gnus-summary-buffer))
20947              (car (cdr (assoc 'group gnus-buffer-configuration)))
20948            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20949          (vertical ((user-position . t) (top . 1) (left . 1)
20950                     (name . "Message"))
20951                    (message 1.0 point))))
20952 @end lisp
20953
20954 @findex gnus-add-configuration
20955 Since the @code{gnus-buffer-configuration} variable is so long and
20956 complicated, there's a function you can use to ease changing the config
20957 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20958 you want to change the @code{article} setting, you could say:
20959
20960 @lisp
20961 (gnus-add-configuration
20962  '(article (vertical 1.0
20963                (group 4)
20964                (summary .25 point)
20965                (article 1.0))))
20966 @end lisp
20967
20968 You'd typically stick these @code{gnus-add-configuration} calls in your
20969 @file{~/.gnus.el} file or in some startup hook---they should be run after
20970 Gnus has been loaded.
20971
20972 @vindex gnus-always-force-window-configuration
20973 If all windows mentioned in the configuration are already visible, Gnus
20974 won't change the window configuration.  If you always want to force the
20975 ``right'' window configuration, you can set
20976 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20977
20978 If you're using tree displays (@pxref{Tree Display}), and the tree
20979 window is displayed vertically next to another window, you may also want
20980 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20981 windows resized.
20982
20983 @subsection Example Window Configurations
20984
20985 @itemize @bullet
20986 @item
20987 Narrow left hand side occupied by group buffer.  Right hand side split
20988 between summary buffer (top one-sixth) and article buffer (bottom).
20989
20990 @ifinfo
20991 @example
20992 +---+---------+
20993 | G | Summary |
20994 | r +---------+
20995 | o |         |
20996 | u | Article |
20997 | p |         |
20998 +---+---------+
20999 @end example
21000 @end ifinfo
21001
21002 @lisp
21003 (gnus-add-configuration
21004  '(article
21005    (horizontal 1.0
21006                (vertical 25 (group 1.0))
21007                (vertical 1.0
21008                          (summary 0.16 point)
21009                          (article 1.0)))))
21010
21011 (gnus-add-configuration
21012  '(summary
21013    (horizontal 1.0
21014                (vertical 25 (group 1.0))
21015                (vertical 1.0 (summary 1.0 point)))))
21016 @end lisp
21017
21018 @end itemize
21019
21020
21021 @node Faces and Fonts
21022 @section Faces and Fonts
21023 @cindex faces
21024 @cindex fonts
21025 @cindex colors
21026
21027 Fiddling with fonts and faces used to be very difficult, but these days
21028 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21029 the face you want to alter, and alter it via the standard Customize
21030 interface.
21031
21032
21033 @node Compilation
21034 @section Compilation
21035 @cindex compilation
21036 @cindex byte-compilation
21037
21038 @findex gnus-compile
21039
21040 Remember all those line format specification variables?
21041 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21042 on.  By default, T-gnus will use the byte-compiled codes of these
21043 variables and we can keep a slow-down to a minimum.  However, if you set
21044 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
21045 unfortunately, changing them will mean a quite significant slow-down.
21046 (The default values of these variables have byte-compiled functions
21047 associated with them, while the user-generated versions do not, of
21048 course.)
21049
21050 To help with this, you can run @kbd{M-x gnus-compile} after you've
21051 fiddled around with the variables and feel that you're (kind of)
21052 satisfied.  This will result in the new specs being byte-compiled, and
21053 you'll get top speed again.  Note that T-gnus will not save these
21054 compiled specs in the @file{.newsrc.eld} file.
21055
21056 @table @code
21057 @item gnus-compile-user-specs
21058 @vindex gnus-compile-user-specs
21059 If it is non-nil, the user-defined format specs will be byte-compiled
21060 automatically.  The default value of this variable is @code{t}.  It has
21061 an effect on the values of @code{gnus-*-line-format-spec}.
21062 @end table
21063
21064
21065 @node Mode Lines
21066 @section Mode Lines
21067 @cindex mode lines
21068
21069 @vindex gnus-updated-mode-lines
21070 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21071 lines updated.  It is a list of symbols.  Supported symbols include
21072 @code{group}, @code{article}, @code{summary}, @code{server},
21073 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21074 Gnus will keep that mode line updated with information that may be
21075 pertinent.  If this variable is @code{nil}, screen refresh may be
21076 quicker.
21077
21078 @cindex display-time
21079
21080 @vindex gnus-mode-non-string-length
21081 By default, Gnus displays information on the current article in the mode
21082 lines of the summary and article buffers.  The information Gnus wishes
21083 to display (e.g. the subject of the article) is often longer than the
21084 mode lines, and therefore have to be cut off at some point.  The
21085 @code{gnus-mode-non-string-length} variable says how long the other
21086 elements on the line is (i.e., the non-info part).  If you put
21087 additional elements on the mode line (e.g. a clock), you should modify
21088 this variable:
21089
21090 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21091 @lisp
21092 (add-hook 'display-time-hook
21093           (lambda () (setq gnus-mode-non-string-length
21094                            (+ 21
21095                               (if line-number-mode 5 0)
21096                               (if column-number-mode 4 0)
21097                               (length display-time-string)))))
21098 @end lisp
21099
21100 If this variable is @code{nil} (which is the default), the mode line
21101 strings won't be chopped off, and they won't be padded either.  Note
21102 that the default is unlikely to be desirable, as even the percentage
21103 complete in the buffer may be crowded off the mode line; the user should
21104 configure this variable appropriately for her configuration.
21105
21106
21107 @node Highlighting and Menus
21108 @section Highlighting and Menus
21109 @cindex visual
21110 @cindex highlighting
21111 @cindex menus
21112
21113 @vindex gnus-visual
21114 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21115 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21116 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21117 file.
21118
21119 This variable can be a list of visual properties that are enabled.  The
21120 following elements are valid, and are all included by default:
21121
21122 @table @code
21123 @item group-highlight
21124 Do highlights in the group buffer.
21125 @item summary-highlight
21126 Do highlights in the summary buffer.
21127 @item article-highlight
21128 Do highlights in the article buffer.
21129 @item highlight
21130 Turn on highlighting in all buffers.
21131 @item group-menu
21132 Create menus in the group buffer.
21133 @item summary-menu
21134 Create menus in the summary buffers.
21135 @item article-menu
21136 Create menus in the article buffer.
21137 @item browse-menu
21138 Create menus in the browse buffer.
21139 @item server-menu
21140 Create menus in the server buffer.
21141 @item score-menu
21142 Create menus in the score buffers.
21143 @item menu
21144 Create menus in all buffers.
21145 @end table
21146
21147 So if you only want highlighting in the article buffer and menus in all
21148 buffers, you could say something like:
21149
21150 @lisp
21151 (setq gnus-visual '(article-highlight menu))
21152 @end lisp
21153
21154 If you want highlighting only and no menus whatsoever, you'd say:
21155
21156 @lisp
21157 (setq gnus-visual '(highlight))
21158 @end lisp
21159
21160 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21161 in all Gnus buffers.
21162
21163 Other general variables that influence the look of all buffers include:
21164
21165 @table @code
21166 @item gnus-mouse-face
21167 @vindex gnus-mouse-face
21168 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21169 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21170
21171 @end table
21172
21173 There are hooks associated with the creation of all the different menus:
21174
21175 @table @code
21176
21177 @item gnus-article-menu-hook
21178 @vindex gnus-article-menu-hook
21179 Hook called after creating the article mode menu.
21180
21181 @item gnus-group-menu-hook
21182 @vindex gnus-group-menu-hook
21183 Hook called after creating the group mode menu.
21184
21185 @item gnus-summary-menu-hook
21186 @vindex gnus-summary-menu-hook
21187 Hook called after creating the summary mode menu.
21188
21189 @item gnus-server-menu-hook
21190 @vindex gnus-server-menu-hook
21191 Hook called after creating the server mode menu.
21192
21193 @item gnus-browse-menu-hook
21194 @vindex gnus-browse-menu-hook
21195 Hook called after creating the browse mode menu.
21196
21197 @item gnus-score-menu-hook
21198 @vindex gnus-score-menu-hook
21199 Hook called after creating the score mode menu.
21200
21201 @end table
21202
21203
21204 @node Buttons
21205 @section Buttons
21206 @cindex buttons
21207 @cindex mouse
21208 @cindex click
21209
21210 Those new-fangled @dfn{mouse} contraptions is very popular with the
21211 young, hep kids who don't want to learn the proper way to do things
21212 these days.  Why, I remember way back in the summer of '89, when I was
21213 using Emacs on a Tops 20 system.  Three hundred users on one single
21214 machine, and every user was running Simula compilers.  Bah!
21215
21216 Right.
21217
21218 @vindex gnus-carpal
21219 Well, you can make Gnus display bufferfuls of buttons you can click to
21220 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21221 really.  Tell the chiropractor I sent you.
21222
21223
21224 @table @code
21225
21226 @item gnus-carpal-mode-hook
21227 @vindex gnus-carpal-mode-hook
21228 Hook run in all carpal mode buffers.
21229
21230 @item gnus-carpal-button-face
21231 @vindex gnus-carpal-button-face
21232 Face used on buttons.
21233
21234 @item gnus-carpal-header-face
21235 @vindex gnus-carpal-header-face
21236 Face used on carpal buffer headers.
21237
21238 @item gnus-carpal-group-buffer-buttons
21239 @vindex gnus-carpal-group-buffer-buttons
21240 Buttons in the group buffer.
21241
21242 @item gnus-carpal-summary-buffer-buttons
21243 @vindex gnus-carpal-summary-buffer-buttons
21244 Buttons in the summary buffer.
21245
21246 @item gnus-carpal-server-buffer-buttons
21247 @vindex gnus-carpal-server-buffer-buttons
21248 Buttons in the server buffer.
21249
21250 @item gnus-carpal-browse-buffer-buttons
21251 @vindex gnus-carpal-browse-buffer-buttons
21252 Buttons in the browse buffer.
21253 @end table
21254
21255 All the @code{buttons} variables are lists.  The elements in these list
21256 are either cons cells where the @code{car} contains a text to be displayed and
21257 the @code{cdr} contains a function symbol, or a simple string.
21258
21259
21260 @node Daemons
21261 @section Daemons
21262 @cindex demons
21263 @cindex daemons
21264
21265 Gnus, being larger than any program ever written (allegedly), does lots
21266 of strange stuff that you may wish to have done while you're not
21267 present.  For instance, you may want it to check for new mail once in a
21268 while.  Or you may want it to close down all connections to all servers
21269 when you leave Emacs idle.  And stuff like that.
21270
21271 Gnus will let you do stuff like that by defining various
21272 @dfn{handlers}.  Each handler consists of three elements:  A
21273 @var{function}, a @var{time}, and an @var{idle} parameter.
21274
21275 Here's an example of a handler that closes connections when Emacs has
21276 been idle for thirty minutes:
21277
21278 @lisp
21279 (gnus-demon-close-connections nil 30)
21280 @end lisp
21281
21282 Here's a handler that scans for @acronym{PGP} headers every hour when
21283 Emacs is idle:
21284
21285 @lisp
21286 (gnus-demon-scan-pgp 60 t)
21287 @end lisp
21288
21289 This @var{time} parameter and that @var{idle} parameter work together
21290 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21291 @code{nil}, then the function will be called every @var{time} minutes.
21292
21293 If @var{idle} is @code{t}, then the function will be called after
21294 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21295 the function will never be called.  But once Emacs goes idle, the
21296 function will be called every @var{time} minutes.
21297
21298 If @var{idle} is a number and @var{time} is a number, the function will
21299 be called every @var{time} minutes only when Emacs has been idle for
21300 @var{idle} minutes.
21301
21302 If @var{idle} is a number and @var{time} is @code{nil}, the function
21303 will be called once every time Emacs has been idle for @var{idle}
21304 minutes.
21305
21306 And if @var{time} is a string, it should look like @samp{07:31}, and
21307 the function will then be called once every day somewhere near that
21308 time.  Modified by the @var{idle} parameter, of course.
21309
21310 @vindex gnus-demon-timestep
21311 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21312 seconds.  This is 60 by default.  If you change that variable,
21313 all the timings in the handlers will be affected.)
21314
21315 So, if you want to add a handler, you could put something like this in
21316 your @file{~/.gnus.el} file:
21317
21318 @findex gnus-demon-add-handler
21319 @lisp
21320 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21321 @end lisp
21322
21323 @findex gnus-demon-add-nocem
21324 @findex gnus-demon-add-scanmail
21325 @findex gnus-demon-add-rescan
21326 @findex gnus-demon-add-scan-timestamps
21327 @findex gnus-demon-add-disconnection
21328 Some ready-made functions to do this have been created:
21329 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21330 @code{gnus-demon-add-nntp-close-connection},
21331 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21332 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21333 @file{~/.gnus.el} if you want those abilities.
21334
21335 @findex gnus-demon-init
21336 @findex gnus-demon-cancel
21337 @vindex gnus-demon-handlers
21338 If you add handlers to @code{gnus-demon-handlers} directly, you should
21339 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21340 daemons, you can use the @code{gnus-demon-cancel} function.
21341
21342 Note that adding daemons can be pretty naughty if you over do it.  Adding
21343 functions that scan all news and mail from all servers every two seconds
21344 is a sure-fire way of getting booted off any respectable system.  So
21345 behave.
21346
21347
21348 @node NoCeM
21349 @section NoCeM
21350 @cindex nocem
21351 @cindex spam
21352
21353 @dfn{Spamming} is posting the same article lots and lots of times.
21354 Spamming is bad.  Spamming is evil.
21355
21356 Spamming is usually canceled within a day or so by various anti-spamming
21357 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21358 NoCeM is pronounced ``no see-'em'', and means what the name
21359 implies---these are messages that make the offending articles, like, go
21360 away.
21361
21362 What use are these NoCeM messages if the articles are canceled anyway?
21363 Some sites do not honor cancel messages and some sites just honor cancels
21364 from a select few people.  Then you may wish to make use of the NoCeM
21365 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21366
21367 Gnus can read and parse the messages in this group automatically, and
21368 this will make spam disappear.
21369
21370 There are some variables to customize, of course:
21371
21372 @table @code
21373 @item gnus-use-nocem
21374 @vindex gnus-use-nocem
21375 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21376 by default.
21377
21378 @item gnus-nocem-groups
21379 @vindex gnus-nocem-groups
21380 Gnus will look for NoCeM messages in the groups in this list.  The
21381 default is
21382 @lisp
21383 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21384  "alt.nocem.misc" "news.admin.net-abuse.announce")
21385 @end lisp
21386
21387 @item gnus-nocem-issuers
21388 @vindex gnus-nocem-issuers
21389 There are many people issuing NoCeM messages.  This list says what
21390 people you want to listen to.  The default is
21391 @lisp
21392 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21393  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21394 @end lisp
21395 fine, upstanding citizens all of them.
21396
21397 Known despammers that you can put in this list are listed at@*
21398 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21399
21400 You do not have to heed NoCeM messages from all these people---just the
21401 ones you want to listen to.  You also don't have to accept all NoCeM
21402 messages from the people you like.  Each NoCeM message has a @dfn{type}
21403 header that gives the message a (more or less, usually less) rigorous
21404 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21405 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21406 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21407 Each condition is either a string (which is a regexp that matches types
21408 you want to use) or a list on the form @code{(not @var{string})}, where
21409 @var{string} is a regexp that matches types you don't want to use.
21410
21411 For instance, if you want all NoCeM messages from Chris Lewis except his
21412 @samp{troll} messages, you'd say:
21413
21414 @lisp
21415 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21416 @end lisp
21417
21418 On the other hand, if you just want nothing but his @samp{spam} and
21419 @samp{spew} messages, you'd say:
21420
21421 @lisp
21422 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21423 @end lisp
21424
21425 The specs are applied left-to-right.
21426
21427
21428 @item gnus-nocem-verifyer
21429 @vindex gnus-nocem-verifyer
21430 @findex mc-verify
21431 This should be a function for verifying that the NoCeM issuer is who she
21432 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21433 function.  If this is too slow and you don't care for verification
21434 (which may be dangerous), you can set this variable to @code{nil}.
21435
21436 If you want signed NoCeM messages to be verified and unsigned messages
21437 not to be verified (but used anyway), you could do something like:
21438
21439 @lisp
21440 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21441
21442 (defun my-gnus-mc-verify ()
21443   (not (eq 'forged
21444            (ignore-errors
21445              (if (mc-verify)
21446                  t
21447                'forged)))))
21448 @end lisp
21449
21450 This might be dangerous, though.
21451
21452 @item gnus-nocem-directory
21453 @vindex gnus-nocem-directory
21454 This is where Gnus will store its NoCeM cache files.  The default is@*
21455 @file{~/News/NoCeM/}.
21456
21457 @item gnus-nocem-expiry-wait
21458 @vindex gnus-nocem-expiry-wait
21459 The number of days before removing old NoCeM entries from the cache.
21460 The default is 15.  If you make it shorter Gnus will be faster, but you
21461 might then see old spam.
21462
21463 @item gnus-nocem-check-from
21464 @vindex gnus-nocem-check-from
21465 Non-@code{nil} means check for valid issuers in message bodies.
21466 Otherwise don't bother fetching articles unless their author matches a
21467 valid issuer; that is much faster if you are selective about the
21468 issuers.
21469
21470 @item gnus-nocem-check-article-limit
21471 @vindex gnus-nocem-check-article-limit
21472 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21473 group.  NoCeM groups can be huge and very slow to process.
21474
21475 @end table
21476
21477 Using NoCeM could potentially be a memory hog.  If you have many living
21478 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21479 big.  If this is a problem, you should kill off all (or most) of your
21480 unsubscribed groups (@pxref{Subscription Commands}).
21481
21482
21483 @node Undo
21484 @section Undo
21485 @cindex undo
21486
21487 It is very useful to be able to undo actions one has done.  In normal
21488 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21489 In Gnus buffers, however, it isn't that simple.
21490
21491 The things Gnus displays in its buffer is of no value whatsoever to
21492 Gnus---it's all just data designed to look nice to the user.
21493 Killing a group in the group buffer with @kbd{C-k} makes the line
21494 disappear, but that's just a side-effect of the real action---the
21495 removal of the group in question from the internal Gnus structures.
21496 Undoing something like that can't be done by the normal Emacs
21497 @code{undo} function.
21498
21499 Gnus tries to remedy this somewhat by keeping track of what the user
21500 does and coming up with actions that would reverse the actions the user
21501 takes.  When the user then presses the @code{undo} key, Gnus will run
21502 the code to reverse the previous action, or the previous actions.
21503 However, not all actions are easily reversible, so Gnus currently offers
21504 a few key functions to be undoable.  These include killing groups,
21505 yanking groups, and changing the list of read articles of groups.
21506 That's it, really.  More functions may be added in the future, but each
21507 added function means an increase in data to be stored, so Gnus will
21508 never be totally undoable.
21509
21510 @findex gnus-undo-mode
21511 @vindex gnus-use-undo
21512 @findex gnus-undo
21513 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21514 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21515 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21516 command, which should feel kinda like the normal Emacs @code{undo}
21517 command.
21518
21519
21520 @node Predicate Specifiers
21521 @section Predicate Specifiers
21522 @cindex predicate specifiers
21523
21524 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21525 form that allows flexible specification of predicates without having
21526 to type all that much.
21527
21528 These specifiers are lists consisting of functions, symbols and lists.
21529
21530 Here's an example:
21531
21532 @lisp
21533 (or gnus-article-unseen-p
21534     gnus-article-unread-p)
21535 @end lisp
21536
21537 The available symbols are @code{or}, @code{and} and @code{not}.  The
21538 functions all take one parameter.
21539
21540 @findex gnus-make-predicate
21541 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21542 to create a function that can be called.  This input parameter to this
21543 function will be passed along to all the functions in the predicate
21544 specifier.
21545
21546
21547 @node Moderation
21548 @section Moderation
21549 @cindex moderation
21550
21551 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21552 It is not included in the standard Gnus package.  Write a mail to
21553 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21554 get a copy.
21555
21556 The moderation package is implemented as a minor mode for summary
21557 buffers.  Put
21558
21559 @lisp
21560 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21561 @end lisp
21562
21563 in your @file{~/.gnus.el} file.
21564
21565 If you are the moderator of @samp{rec.zoofle}, this is how it's
21566 supposed to work:
21567
21568 @enumerate
21569 @item
21570 You split your incoming mail by matching on
21571 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21572 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21573
21574 @item
21575 You enter that group once in a while and post articles using the @kbd{e}
21576 (edit-and-post) or @kbd{s} (just send unedited) commands.
21577
21578 @item
21579 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21580 articles that weren't approved by you, you can cancel them with the
21581 @kbd{c} command.
21582 @end enumerate
21583
21584 To use moderation mode in these two groups, say:
21585
21586 @lisp
21587 (setq gnus-moderated-list
21588       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21589 @end lisp
21590
21591
21592 @node Image Enhancements
21593 @section Image Enhancements
21594
21595 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21596 support images yet.}, is able to display pictures and stuff, so Gnus has
21597 taken advantage of that.
21598
21599 @menu
21600 * X-Face::                      Display a funky, teensy black-and-white image.
21601 * Face::                        Display a funkier, teensier colored image.
21602 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21603 * Picons::                      How to display pictures of what you're reading.
21604 * XVarious::                    Other XEmacsy Gnusey variables.
21605 @end menu
21606
21607
21608 @node X-Face
21609 @subsection X-Face
21610 @cindex x-face
21611
21612 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21613 depth) image that's supposed to represent the author of the message.
21614 It seems to be supported by an ever-growing number of mail and news
21615 readers.
21616
21617 @cindex x-face
21618 @findex gnus-article-display-x-face
21619 @vindex gnus-article-x-face-command
21620 @vindex gnus-article-x-face-too-ugly
21621 @iftex
21622 @iflatex
21623 \include{xface}
21624 @end iflatex
21625 @end iftex
21626 @c @anchor{X-Face}
21627
21628 Decoding an @code{X-Face} header either requires an Emacs that has
21629 @samp{compface} support (which most XEmacs versions has), or that you
21630 have @samp{compface} installed on your system.  If either is true,
21631 Gnus will default to displaying @code{X-Face} headers.
21632
21633 The variable that controls this is the
21634 @code{gnus-article-x-face-command} variable.  If this variable is a
21635 string, this string will be executed in a sub-shell.  If it is a
21636 function, this function will be called with the face as the argument.
21637 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21638 the @code{From} header, the face will not be shown.
21639
21640 The default action under Emacs 20 is to fork off the @code{display}
21641 program@footnote{@code{display} is from the ImageMagick package.  For
21642 the @code{uncompface} and @code{icontopbm} programs look for a package
21643 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21644 view the face.
21645
21646 Under XEmacs or Emacs 21+ with suitable image support, the default
21647 action is to display the face before the @code{From} header.  (It's
21648 nicer if XEmacs has been compiled with @code{X-Face} support---that
21649 will make display somewhat faster.  If there's no native @code{X-Face}
21650 support, Gnus will try to convert the @code{X-Face} header using
21651 external programs from the @code{pbmplus} package and
21652 friends.@footnote{On a GNU/Linux system look for packages with names
21653 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21654
21655 (Note: @code{x-face} is used in the variable/function names, not
21656 @code{xface}).
21657
21658 Gnus provides a few convenience functions and variables to allow
21659 easier insertion of X-Face headers in outgoing messages.
21660
21661 @findex gnus-random-x-face
21662 @vindex gnus-convert-pbm-to-x-face-command
21663 @vindex gnus-x-face-directory
21664 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21665 @code{gnus-x-face-directory} and picks one at random, and then
21666 converts it to the X-Face format by using the
21667 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21668 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21669 header data as a string.
21670
21671 @findex gnus-insert-random-x-face-header
21672 @code{gnus-insert-random-x-face-header} calls
21673 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21674 randomly generated data.
21675
21676 @findex gnus-x-face-from-file
21677 @vindex gnus-convert-image-to-x-face-command
21678 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21679 converts the file to X-Face format by using the
21680 @code{gnus-convert-image-to-x-face-command} shell command.
21681
21682 Here's how you would typically use the first function.  Put something
21683 like the following in your @file{~/.gnus.el} file:
21684
21685 @lisp
21686 (setq message-required-news-headers
21687       (nconc message-required-news-headers
21688              (list '(X-Face . gnus-random-x-face))))
21689 @end lisp
21690
21691 Using the last function would be something like this:
21692
21693 @lisp
21694 (setq message-required-news-headers
21695       (nconc message-required-news-headers
21696              (list '(X-Face . (lambda ()
21697                                 (gnus-x-face-from-file
21698                                  "~/My-face.gif"))))))
21699 @end lisp
21700
21701
21702 @node Face
21703 @subsection Face
21704 @cindex face
21705
21706 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21707
21708 @code{Face} headers are essentially a funkier version of @code{X-Face}
21709 ones. They describe a 48x48 pixel colored image that's supposed to
21710 represent the author of the message.
21711
21712 @cindex face
21713 @findex gnus-article-display-face
21714 The contents of a @code{Face} header must be a base64 encoded PNG image.
21715 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21716 specifications.
21717
21718 Gnus provides a few convenience functions and variables to allow
21719 easier insertion of Face headers in outgoing messages.
21720
21721 @findex gnus-convert-png-to-face
21722 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21723 726 bytes long, and converts it to a face.
21724
21725 @findex gnus-face-from-file
21726 @vindex gnus-convert-image-to-face-command
21727 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21728 converts the file to Face format by using the
21729 @code{gnus-convert-image-to-face-command} shell command.
21730
21731 Here's how you would typically use this function. Put something like the
21732 following in your @file{~/.gnus.el} file:
21733
21734 @lisp
21735 (setq message-required-news-headers
21736       (nconc message-required-news-headers
21737              (list '(Face . (lambda ()
21738                               (gnus-face-from-file "~/face.jpg"))))))
21739 @end lisp
21740
21741
21742 @node Smileys
21743 @subsection Smileys
21744 @cindex smileys
21745
21746 @iftex
21747 @iflatex
21748 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21749 \input{smiley}
21750 @end iflatex
21751 @end iftex
21752
21753 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21754 currently the only package that uses Smiley, it is documented here.
21755
21756 In short---to use Smiley in Gnus, put the following in your
21757 @file{~/.gnus.el} file:
21758
21759 @lisp
21760 (setq gnus-treat-display-smileys t)
21761 @end lisp
21762
21763 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21764 the like---to pictures and displays those instead of the text smiley
21765 faces.  The conversion is controlled by a list of regexps that matches
21766 text and maps that to file names.
21767
21768 @vindex smiley-regexp-alist
21769 The alist used is specified by the @code{smiley-regexp-alist}
21770 variable.  The first item in each element is the regexp to be matched;
21771 the second element is the regexp match group that is to be replaced by
21772 the picture; and the third element is the name of the file to be
21773 displayed.
21774
21775 The following variables customize where Smiley will look for these
21776 files:
21777
21778 @table @code
21779
21780 @item smiley-data-directory
21781 @vindex smiley-data-directory
21782 Where Smiley will look for smiley faces files.
21783
21784 @item gnus-smiley-file-types
21785 @vindex gnus-smiley-file-types
21786 List of suffixes on smiley file names to try.
21787
21788 @end table
21789
21790
21791 @node Picons
21792 @subsection Picons
21793
21794 @iftex
21795 @iflatex
21796 \include{picons}
21797 @end iflatex
21798 @end iftex
21799
21800 So@dots{}  You want to slow down your news reader even more!  This is a
21801 good way to do so.  It's also a great way to impress people staring
21802 over your shoulder as you read news.
21803
21804 What are Picons?  To quote directly from the Picons Web site:
21805
21806 @iftex
21807 @iflatex
21808 \margindex{}
21809 @end iflatex
21810 @end iftex
21811
21812 @quotation
21813 @dfn{Picons} is short for ``personal icons''.  They're small,
21814 constrained images used to represent users and domains on the net,
21815 organized into databases so that the appropriate image for a given
21816 e-mail address can be found.  Besides users and domains, there are picon
21817 databases for Usenet newsgroups and weather forecasts.  The picons are
21818 in either monochrome @code{XBM} format or color @code{XPM} and
21819 @code{GIF} formats.
21820 @end quotation
21821
21822 @vindex gnus-picon-databases
21823 For instructions on obtaining and installing the picons databases,
21824 point your Web browser at
21825 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21826
21827 If you are using Debian GNU/Linux, saying @samp{apt-get install
21828 picons.*} will install the picons where Gnus can find them.
21829
21830 To enable displaying picons, simply make sure that
21831 @code{gnus-picon-databases} points to the directory containing the
21832 Picons databases.
21833
21834 The following variables offer control over where things are located.
21835
21836 @table @code
21837
21838 @item gnus-picon-databases
21839 @vindex gnus-picon-databases
21840 The location of the picons database.  This is a list of directories
21841 containing the @file{news}, @file{domains}, @file{users} (and so on)
21842 subdirectories.  Defaults to @code{("/usr/lib/picon"
21843 "/usr/local/faces")}.
21844
21845 @item gnus-picon-news-directories
21846 @vindex gnus-picon-news-directories
21847 List of subdirectories to search in @code{gnus-picon-databases} for
21848 newsgroups faces.  @code{("news")} is the default.
21849
21850 @item gnus-picon-user-directories
21851 @vindex gnus-picon-user-directories
21852 List of subdirectories to search in @code{gnus-picon-databases} for user
21853 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21854
21855 @item gnus-picon-domain-directories
21856 @vindex gnus-picon-domain-directories
21857 List of subdirectories to search in @code{gnus-picon-databases} for
21858 domain name faces.  Defaults to @code{("domains")}.  Some people may
21859 want to add @samp{"unknown"} to this list.
21860
21861 @item gnus-picon-file-types
21862 @vindex gnus-picon-file-types
21863 Ordered list of suffixes on picon file names to try.  Defaults to
21864 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21865
21866 @end table
21867
21868
21869 @node XVarious
21870 @subsection Various XEmacs Variables
21871
21872 @table @code
21873 @item gnus-xmas-glyph-directory
21874 @vindex gnus-xmas-glyph-directory
21875 This is where Gnus will look for pictures.  Gnus will normally
21876 auto-detect this directory, but you may set it manually if you have an
21877 unusual directory structure.
21878
21879 @item gnus-xmas-logo-color-alist
21880 @vindex gnus-xmas-logo-color-alist
21881 This is an alist where the key is a type symbol and the values are the
21882 foreground and background color of the splash page glyph.
21883
21884 @item gnus-xmas-logo-color-style
21885 @vindex gnus-xmas-logo-color-style
21886 This is the key used to look up the color in the alist described above.
21887 Valid values include @code{flame}, @code{pine}, @code{moss},
21888 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21889 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21890
21891 @item gnus-xmas-modeline-glyph
21892 @vindex gnus-xmas-modeline-glyph
21893 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21894 default.
21895
21896 @end table
21897
21898 @subsubsection Toolbar
21899
21900 @table @code
21901
21902 @item gnus-use-toolbar
21903 @vindex gnus-use-toolbar
21904 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21905 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21906 @code{right-toolbar}, or @code{left-toolbar}.
21907
21908 @item gnus-group-toolbar
21909 @vindex gnus-group-toolbar
21910 The toolbar in the group buffer.
21911
21912 @item gnus-summary-toolbar
21913 @vindex gnus-summary-toolbar
21914 The toolbar in the summary buffer.
21915
21916 @item gnus-summary-mail-toolbar
21917 @vindex gnus-summary-mail-toolbar
21918 The toolbar in the summary buffer of mail groups.
21919
21920 @end table
21921
21922 @iftex
21923 @iflatex
21924 \margindex{}
21925 @end iflatex
21926 @end iftex
21927
21928
21929 @node Fuzzy Matching
21930 @section Fuzzy Matching
21931 @cindex fuzzy matching
21932
21933 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21934 things like scoring, thread gathering and thread comparison.
21935
21936 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21937 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21938 means, and the implementation has changed over time.
21939
21940 Basically, it tries to remove all noise from lines before comparing.
21941 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21942 out of the strings before comparing the results.  This often leads to
21943 adequate results---even when faced with strings generated by text
21944 manglers masquerading as newsreaders.
21945
21946
21947 @node Thwarting Email Spam
21948 @section Thwarting Email Spam
21949 @cindex email spam
21950 @cindex spam
21951 @cindex UCE
21952 @cindex unsolicited commercial email
21953
21954 In these last days of the Usenet, commercial vultures are hanging about
21955 and grepping through news like crazy to find email addresses they can
21956 foist off their scams and products to.  As a reaction to this, many
21957 people have started putting nonsense addresses into their @code{From}
21958 lines.  I think this is counterproductive---it makes it difficult for
21959 people to send you legitimate mail in response to things you write, as
21960 well as making it difficult to see who wrote what.  This rewriting may
21961 perhaps be a bigger menace than the unsolicited commercial email itself
21962 in the end.
21963
21964 The biggest problem I have with email spam is that it comes in under
21965 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21966 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21967 mail group, only to find two pyramid schemes, seven advertisements
21968 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21969 and one mail asking me to repent and find some god.
21970
21971 This is annoying.  Here's what you can do about it.
21972
21973 @menu
21974 * The problem of spam::         Some background, and some solutions
21975 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21976 * SpamAssassin::                How to use external anti-spam tools.
21977 * Hashcash::                    Reduce spam by burning CPU time.
21978 * Filtering Spam Using The Spam ELisp Package::
21979 * Filtering Spam Using Statistics with spam-stat::
21980 @end menu
21981
21982 @node The problem of spam
21983 @subsection The problem of spam
21984 @cindex email spam
21985 @cindex spam filtering approaches
21986 @cindex filtering approaches, spam
21987 @cindex UCE
21988 @cindex unsolicited commercial email
21989
21990 First, some background on spam.
21991
21992 If you have access to e-mail, you are familiar with spam (technically
21993 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21994 because e-mail delivery is very cheap compared to paper mail, so only
21995 a very small percentage of people need to respond to an UCE to make it
21996 worthwhile to the advertiser.  Ironically, one of the most common
21997 spams is the one offering a database of e-mail addresses for further
21998 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21999 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
22000
22001 Spam comes from a wide variety of sources.  It is simply impossible to
22002 dispose of all spam without discarding useful messages.  A good
22003 example is the TMDA system, which requires senders
22004 unknown to you to confirm themselves as legitimate senders before
22005 their e-mail can reach you.  Without getting into the technical side
22006 of TMDA, a downside is clearly that e-mail from legitimate sources may
22007 be discarded if those sources can't or won't confirm themselves
22008 through the TMDA system.  Another problem with TMDA is that it
22009 requires its users to have a basic understanding of e-mail delivery
22010 and processing.
22011
22012 The simplest approach to filtering spam is filtering.  If you get 200
22013 spam messages per day from @samp{random-address@@vmadmin.com}, you
22014 block @samp{vmadmin.com}.  If you get 200 messages about
22015 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22016 message.  This, unfortunately, is a great way to discard legitimate
22017 e-mail.  For instance, the very informative and useful RISKS digest
22018 has been blocked by overzealous mail filters because it
22019 @strong{contained} words that were common in spam messages.
22020 Nevertheless, in isolated cases, with great care, direct filtering of
22021 mail can be useful.
22022
22023 Another approach to filtering e-mail is the distributed spam
22024 processing, for instance DCC implements such a system.  In essence,
22025 @var{N} systems around the world agree that a machine @var{X} in
22026 China, Ghana, or California is sending out spam e-mail, and these
22027 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22028 a database.  The criteria for spam detection vary---it may be the
22029 number of messages sent, the content of the messages, and so on.  When
22030 a user of the distributed processing system wants to find out if a
22031 message is spam, he consults one of those @var{N} systems.
22032
22033 Distributed spam processing works very well against spammers that send
22034 a large number of messages at once, but it requires the user to set up
22035 fairly complicated checks.  There are commercial and free distributed
22036 spam processing systems.  Distributed spam processing has its risks as
22037 well.  For instance legitimate e-mail senders have been accused of
22038 sending spam, and their web sites have been shut down for some time
22039 because of the incident.
22040
22041 The statistical approach to spam filtering is also popular.  It is
22042 based on a statistical analysis of previous spam messages.  Usually
22043 the analysis is a simple word frequency count, with perhaps pairs of
22044 words or 3-word combinations thrown into the mix.  Statistical
22045 analysis of spam works very well in most of the cases, but it can
22046 classify legitimate e-mail as spam in some cases.  It takes time to
22047 run the analysis, the full message must be analyzed, and the user has
22048 to store the database of spam analyses.
22049
22050 @node Anti-Spam Basics
22051 @subsection Anti-Spam Basics
22052 @cindex email spam
22053 @cindex spam
22054 @cindex UCE
22055 @cindex unsolicited commercial email
22056
22057 One way of dealing with spam is having Gnus split out all spam into a
22058 @samp{spam} mail group (@pxref{Splitting Mail}).
22059
22060 First, pick one (1) valid mail address that you can be reached at, and
22061 put it in your @code{From} header of all your news articles.  (I've
22062 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22063 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22064 sysadmin whether your sendmail installation accepts keywords in the local
22065 part of the mail address.)
22066
22067 @lisp
22068 (setq message-default-news-headers
22069       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22070 @end lisp
22071
22072 Then put the following split rule in @code{nnmail-split-fancy}
22073 (@pxref{Fancy Mail Splitting}):
22074
22075 @lisp
22076 (
22077  ...
22078  (to "larsi@@trym.ifi.uio.no"
22079       (| ("subject" "re:.*" "misc")
22080          ("references" ".*@@.*" "misc")
22081          "spam"))
22082  ...
22083 )
22084 @end lisp
22085
22086 This says that all mail to this address is suspect, but if it has a
22087 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22088 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22089 (This idea probably comes from Tim Pierce.)
22090
22091 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22092 and do not include your email address explicitly in the @code{To}
22093 header.  Why they do this is unknown---perhaps it's to thwart this
22094 thwarting scheme?  In any case, this is trivial to deal with---you just
22095 put anything not addressed to you in the @samp{spam} group by ending
22096 your fancy split rule in this way:
22097
22098 @lisp
22099 (
22100  ...
22101  (to "larsi" "misc")
22102  "spam")
22103 @end lisp
22104
22105 In my experience, this will sort virtually everything into the right
22106 group.  You still have to check the @samp{spam} group from time to time to
22107 check for legitimate mail, though.  If you feel like being a good net
22108 citizen, you can even send off complaints to the proper authorities on
22109 each unsolicited commercial email---at your leisure.
22110
22111 This works for me.  It allows people an easy way to contact me (they can
22112 just press @kbd{r} in the usual way), and I'm not bothered at all with
22113 spam.  It's a win-win situation.  Forging @code{From} headers to point
22114 to non-existent domains is yucky, in my opinion.
22115
22116
22117
22118 @node SpamAssassin
22119 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22120 @cindex SpamAssassin
22121 @cindex Vipul's Razor
22122 @cindex DCC
22123
22124 The days where the hints in the previous section was sufficient in
22125 avoiding spam are coming to an end.  There are many tools out there
22126 that claim to reduce the amount of spam you get.  This section could
22127 easily become outdated fast, as new products replace old, but
22128 fortunately most of these tools seem to have similar interfaces.  Even
22129 though this section will use SpamAssassin as an example, it should be
22130 easy to adapt it to most other tools.
22131
22132 If the tool you are using is not installed on the mail server, you
22133 need to invoke it yourself.  Ideas on how to use the
22134 @code{:postscript} mail source parameter (@pxref{Mail Source
22135 Specifiers}) follow.
22136
22137 @lisp
22138 (setq mail-sources
22139       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22140         (pop :user "jrl"
22141              :server "pophost"
22142              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22143 @end lisp
22144
22145 Once you manage to process your incoming spool somehow, thus making
22146 the mail contain e.g.@: a header indicating it is spam, you are ready to
22147 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22148
22149 @lisp
22150 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22151                              ...))
22152 @end lisp
22153
22154 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22155
22156 @lisp
22157 (setq nnmail-split-methods 'nnmail-split-fancy
22158       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22159                              ...))
22160 @end lisp
22161
22162 Some people might not like the idea of piping the mail through various
22163 programs using a @code{:prescript} (if some program is buggy, you
22164 might lose all mail).  If you are one of them, another solution is to
22165 call the external tools during splitting.  Example fancy split method:
22166
22167 @lisp
22168 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22169                              ...))
22170 (defun kevin-spamassassin ()
22171   (save-excursion
22172     (let ((buf (or (get-buffer " *nnmail incoming*")
22173                    (get-buffer " *nnml move*"))))
22174       (if (not buf)
22175           (progn (message "Oops, cannot find message buffer") nil)
22176         (set-buffer buf)
22177         (if (eq 1 (call-process-region (point-min) (point-max)
22178                                        "spamc" nil nil nil "-c"))
22179             "spam")))))
22180 @end lisp
22181
22182 That is about it.  As some spam is likely to get through anyway, you
22183 might want to have a nifty function to call when you happen to read
22184 spam.  And here is the nifty function:
22185
22186 @lisp
22187  (defun my-gnus-raze-spam ()
22188   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22189   (interactive)
22190   (gnus-summary-show-raw-article)
22191   (gnus-summary-save-in-pipe "razor-report -f -d")
22192   (gnus-summary-mark-as-expirable 1))
22193 @end lisp
22194
22195 @node Hashcash
22196 @subsection Hashcash
22197 @cindex hashcash
22198
22199 A novel technique to fight spam is to require senders to do something
22200 costly for each message they send.  This has the obvious drawback that
22201 you cannot rely on everyone in the world using this technique,
22202 since it is not part of the Internet standards, but it may be useful
22203 in smaller communities.
22204
22205 While the tools in the previous section work well in practice, they
22206 work only because the tools are constantly maintained and updated as
22207 new form of spam appears.  This means that a small percentage of spam
22208 will always get through.  It also means that somewhere, someone needs
22209 to read lots of spam to update these tools.  Hashcash avoids that, but
22210 instead requires that everyone you communicate with supports the
22211 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22212 The approaches have their own advantages and disadvantages, but as
22213 often in the real world, a combination of them is stronger than either
22214 one of them separately.
22215
22216 @cindex X-Hashcash
22217 The ``something costly'' is to burn CPU time, more specifically to
22218 compute a hash collision up to a certain number of bits.  The
22219 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22220 header.  For more details, and for the external application
22221 @code{hashcash} you need to install to use this feature, see
22222 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22223 information can be found at @uref{http://www.camram.org/}.
22224
22225 If you wish to call hashcash for each message you send, say something
22226 like:
22227
22228 @lisp
22229 (require 'hashcash)
22230 (add-hook 'message-send-hook 'mail-add-payment)
22231 @end lisp
22232
22233 The @file{hashcash.el} library can be found in the Gnus development
22234 contrib directory or at
22235 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22236
22237 You will need to set up some additional variables as well:
22238
22239 @table @code
22240
22241 @item hashcash-default-payment
22242 @vindex hashcash-default-payment
22243 This variable indicates the default number of bits the hash collision
22244 should consist of.  By default this is 0, meaning nothing will be
22245 done.  Suggested useful values include 17 to 29.
22246
22247 @item hashcash-payment-alist
22248 @vindex hashcash-payment-alist
22249 Some receivers may require you to spend burn more CPU time than the
22250 default.  This variable contains a list of @samp{(@var{addr}
22251 @var{amount})} cells, where @var{addr} is the receiver (email address
22252 or newsgroup) and @var{amount} is the number of bits in the collision
22253 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22254 @var{amount})} cells, where the @var{string} is the string to use
22255 (normally the email address or newsgroup name is used).
22256
22257 @item hashcash
22258 @vindex hashcash
22259 Where the @code{hashcash} binary is installed.
22260
22261 @end table
22262
22263 Currently there is no built in functionality in Gnus to verify
22264 hashcash cookies, it is expected that this is performed by your hand
22265 customized mail filtering scripts.  Improvements in this area would be
22266 a useful contribution, however.
22267
22268 @node Filtering Spam Using The Spam ELisp Package
22269 @subsection Filtering Spam Using The Spam ELisp Package
22270 @cindex spam filtering
22271 @cindex spam
22272
22273 The idea behind @file{spam.el} is to have a control center for spam detection
22274 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22275 filters incoming mail, and it analyzes mail known to be spam or ham.
22276 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22277 non-spam messages.
22278
22279 So, what happens when you load @file{spam.el}?  
22280
22281 First of all, you @strong{must} set the variable
22282 @code{spam-install-hooks} to @code{t} and install the @code{spam.el} hooks:
22283
22284 @example
22285 (setq spam-install-hooks t)
22286 (spam-install-hooks-function)
22287 @end example
22288
22289 This is automatically done for you if you load @code{spam.el}
22290 @emph{after} one of the @code{spam-use-*} variables explained later
22291 are set.  So you should load @code{spam.el} after you set one of the
22292 @code{spam-use-*} variables:
22293
22294 @example
22295 (setq spam-use-bogofilter t)
22296 (require 'spam)
22297 @end example
22298
22299 You get the following keyboard commands:
22300
22301 @table @kbd
22302
22303 @item M-d
22304 @itemx M s x
22305 @itemx S x
22306 @kindex M-d
22307 @kindex S x
22308 @kindex M s x
22309 @findex gnus-summary-mark-as-spam
22310 @code{gnus-summary-mark-as-spam}.
22311
22312 Mark current article as spam, showing it with the @samp{$} mark.
22313 Whenever you see a spam article, make sure to mark its summary line
22314 with @kbd{M-d} before leaving the group.  This is done automatically
22315 for unread articles in @emph{spam} groups.
22316
22317 @item M s t
22318 @itemx S t
22319 @kindex M s t
22320 @kindex S t
22321 @findex spam-bogofilter-score
22322 @code{spam-bogofilter-score}.
22323
22324 You must have Bogofilter installed for that command to work properly.
22325
22326 @xref{Bogofilter}.
22327
22328 @end table
22329
22330 Also, when you load @file{spam.el}, you will be able to customize its
22331 variables.  Try @code{customize-group} on the @samp{spam} variable
22332 group.
22333
22334 @vindex gnus-spam-process-newsgroups
22335 The concepts of ham processors and spam processors are very important.
22336 Ham processors and spam processors for a group can be set with the
22337 @code{spam-process} group parameter, or the
22338 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22339 mail known to be non-spam (@emph{ham}) and process it in some way so
22340 that later similar mail will also be considered non-spam.  Spam
22341 processors take mail known to be spam and process it so similar spam
22342 will be detected later.
22343
22344 @vindex gnus-spam-newsgroup-contents
22345 Gnus learns from the spam you get.  You have to collect your spam in
22346 one or more spam groups, and set or customize the variable
22347 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22348 groups to contain spam by setting their group parameter
22349 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22350 by customizing the corresponding variable
22351 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22352 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22353 also be used to declare groups as @emph{ham} groups if you set their
22354 classification to @code{gnus-group-spam-classification-ham}.  If
22355 groups are not classified by means of @code{spam-junk-mailgroups},
22356 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22357 considered @emph{unclassified}.  All groups are unclassified by
22358 default.
22359
22360 @vindex gnus-spam-mark
22361 @cindex $
22362 In spam groups, all messages are considered to be spam by default:
22363 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22364 group.  If you have seen a message, had it marked as spam, then
22365 unmarked it, it won't be marked as spam when you enter the group
22366 thereafter.  You can disable that behavior, so all unread messages
22367 will get the @samp{$} mark, if you set the
22368 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22369 remove the @samp{$} mark when you are in the group summary buffer for
22370 every message that is not spam after all.  To remove the @samp{$}
22371 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22372 declaring it read the non-spam way.  When you leave a group, all
22373 spam-marked (@samp{$}) articles are sent to a spam processor which
22374 will study them as spam samples.
22375
22376 Messages may also be deleted in various other ways, and unless
22377 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22378 and @samp{r} for default read or explicit delete, marks @samp{X} and
22379 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22380 low scores, are all considered to be associated with articles which
22381 are not spam.  This assumption might be false, in particular if you
22382 use kill files or score files as means for detecting genuine spam, you
22383 should then adjust the @code{ham-marks} group parameter.
22384
22385 @defvar ham-marks
22386 You can customize this group or topic parameter to be the list of
22387 marks you want to consider ham.  By default, the list contains the
22388 deleted, read, killed, kill-filed, and low-score marks.
22389 @end defvar
22390
22391 @defvar spam-marks
22392 You can customize this group or topic parameter to be the list of
22393 marks you want to consider spam.  By default, the list contains only
22394 the spam mark.
22395 @end defvar
22396
22397 When you leave @emph{any} group, regardless of its
22398 @code{spam-contents} classification, all spam-marked articles are sent
22399 to a spam processor, which will study these as spam samples.  If you
22400 explicit kill a lot, you might sometimes end up with articles marked
22401 @samp{K} which you never saw, and which might accidentally contain
22402 spam.  Best is to make sure that real spam is marked with @samp{$},
22403 and nothing else.
22404
22405 @vindex gnus-ham-process-destinations
22406 When you leave a @emph{spam} group, all spam-marked articles are
22407 marked as expired after processing with the spam processor.  This is
22408 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22409 @strong{ham} articles in a spam group will be moved to a location
22410 determined by either the @code{ham-process-destination} group
22411 parameter or a match in the @code{gnus-ham-process-destinations}
22412 variable, which is a list of regular expressions matched with group
22413 names (it's easiest to customize this variable with
22414 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22415 location is a group name.  If the @code{ham-process-destination}
22416 parameter is not set, ham articles are left in place.  If the
22417 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22418 set, the ham articles are marked as unread before being moved.
22419
22420 When you leave a @emph{ham} group, all ham-marked articles are sent to
22421 a ham processor, which will study these as non-spam samples.
22422
22423 @vindex gnus-spam-process-destinations
22424 When you leave a @emph{ham} or @emph{unclassified} group, all
22425 @strong{spam} articles are moved to a location determined by either
22426 the @code{spam-process-destination} group parameter or a match in the
22427 @code{gnus-spam-process-destinations} variable, which is a list of
22428 regular expressions matched with group names (it's easiest to
22429 customize this variable with @code{customize-variable
22430 gnus-spam-process-destinations}).  The ultimate location is a group
22431 name.  If the @code{spam-process-destination} parameter is not set,
22432 the spam articles are only expired.
22433
22434 To use the @file{spam.el} facilities for incoming mail filtering, you
22435 must add the following to your fancy split list
22436 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22437
22438 @example
22439 (: spam-split)
22440 @end example
22441
22442 Note that the fancy split may be called @code{nnmail-split-fancy} or
22443 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22444 nnimap back ends to retrieve your mail.
22445
22446 The @code{spam-split} function will process incoming mail and send the
22447 mail considered to be spam into the group name given by the variable
22448 @code{spam-split-group}.  By default that group name is @samp{spam},
22449 but you can customize @code{spam-split-group}.
22450
22451 You can also give @code{spam-split} a parameter,
22452 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22453
22454 Take these split rules (with @code{spam-use-regex-headers} and
22455 @code{spam-use-blackholes} set):
22456
22457 @example
22458  nnimap-split-fancy '(|
22459                       (any "ding" "ding")
22460                       (: spam-split)
22461                       ;; default mailbox
22462                       "mail")
22463 @end example
22464
22465 Now, the problem is that you want all ding messages to make it to the
22466 ding folder.  But that will let obvious spam (for example, spam
22467 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22468 when it's sent to the ding list.  On the other hand, some messages to
22469 the ding list are from a mail server in the blackhole list, so the
22470 invocation of @code{spam-split} can't be before the ding rule.
22471
22472 You can let SpamAssassin headers supercede ding rules, but all other
22473 @code{spam-split} rules (including a second invocation of the
22474 regex-headers check) will be after the ding rule:
22475
22476 @example
22477  nnimap-split-fancy '(|
22478                       (: spam-split 'spam-use-regex-headers)
22479                       (any "ding" "ding")
22480                       (: spam-split)
22481                       ;; default mailbox
22482                       "mail")
22483 @end example
22484
22485 Basically, this lets you invoke specific @code{spam-split} checks
22486 depending on your particular needs.  You don't have to throw all mail
22487 into all the spam tests.  Another reason why this is nice is that
22488 messages to mailing lists you have rules for don't have to have
22489 resource-intensive blackhole checks performed on them.  You could also
22490 specify different spam checks for your nnmail split vs. your nnimap
22491 split.  Go crazy.
22492
22493 You still have to have specific checks such as
22494 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22495 invoke @code{spam-split} with the check.  The reason is that when
22496 loading @file{spam.el}, some conditional loading is done depending on
22497 what @code{spam-use-xyz} variables you have set.
22498
22499 @emph{Note for IMAP users}
22500
22501 The boolean variable @code{nnimap-split-download-body} needs to be
22502 set, if you want to split based on the whole message instead of just
22503 the headers.  By default, the nnimap back end will only retrieve the
22504 message headers.  If you use @code{spam-check-bogofilter},
22505 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22506 can benefit from the full message body), you should set this variable.
22507 It is not set by default because it will slow @acronym{IMAP} down, and
22508 that is not an appropriate decision to make on behalf of the user.
22509
22510 @xref{Splitting in IMAP}.
22511
22512 @emph{TODO: Currently, spam.el only supports insertion of articles
22513 into a back end.  There is no way to tell spam.el that an article is no
22514 longer spam or ham.}
22515
22516 @emph{TODO: spam.el needs to provide a uniform way of training all the
22517 statistical databases.  Some have that functionality built-in, others
22518 don't.}
22519
22520 The following are the methods you can use to control the behavior of
22521 @code{spam-split} and their corresponding spam and ham processors:
22522
22523 @menu
22524 * Blacklists and Whitelists::
22525 * BBDB Whitelists::
22526 * Gmane Spam Reporting::
22527 * Anti-spam Hashcash Payments::
22528 * Blackholes::
22529 * Regular Expressions Header Matching::
22530 * Bogofilter::
22531 * ifile spam filtering::
22532 * spam-stat spam filtering::
22533 * SpamOracle::
22534 * Extending the spam elisp package::
22535 @end menu
22536
22537 @node Blacklists and Whitelists
22538 @subsubsection Blacklists and Whitelists
22539 @cindex spam filtering
22540 @cindex whitelists, spam filtering
22541 @cindex blacklists, spam filtering
22542 @cindex spam
22543
22544 @defvar spam-use-blacklist
22545
22546 Set this variable to @code{t} if you want to use blacklists when
22547 splitting incoming mail.  Messages whose senders are in the blacklist
22548 will be sent to the @code{spam-split-group}.  This is an explicit
22549 filter, meaning that it acts only on mail senders @emph{declared} to
22550 be spammers.
22551
22552 @end defvar
22553
22554 @defvar spam-use-whitelist
22555
22556 Set this variable to @code{t} if you want to use whitelists when
22557 splitting incoming mail.  Messages whose senders are not in the
22558 whitelist will be sent to the next spam-split rule.  This is an
22559 explicit filter, meaning that unless someone is in the whitelist, their
22560 messages are not assumed to be spam or ham.
22561
22562 @end defvar
22563
22564 @defvar spam-use-whitelist-exclusive
22565
22566 Set this variable to @code{t} if you want to use whitelists as an
22567 implicit filter, meaning that every message will be considered spam
22568 unless the sender is in the whitelist.  Use with care.
22569
22570 @end defvar
22571
22572 @defvar gnus-group-spam-exit-processor-blacklist
22573
22574 Add this symbol to a group's @code{spam-process} parameter by
22575 customizing the group parameters or the
22576 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22577 added to a group's @code{spam-process} parameter, the senders of
22578 spam-marked articles will be added to the blacklist.
22579
22580 @end defvar
22581
22582 @defvar gnus-group-ham-exit-processor-whitelist
22583
22584 Add this symbol to a group's @code{spam-process} parameter by
22585 customizing the group parameters or the
22586 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22587 added to a group's @code{spam-process} parameter, the senders of
22588 ham-marked articles in @emph{ham} groups will be added to the
22589 whitelist.  Note that this ham processor has no effect in @emph{spam}
22590 or @emph{unclassified} groups.
22591
22592 @end defvar
22593
22594 Blacklists are lists of regular expressions matching addresses you
22595 consider to be spam senders.  For instance, to block mail from any
22596 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22597 blacklist.  You start out with an empty blacklist.  Blacklist entries
22598 use the Emacs regular expression syntax.
22599
22600 Conversely, whitelists tell Gnus what addresses are considered
22601 legitimate.  All messages from whitelisted addresses are considered
22602 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22603 Emacs regular expression syntax.
22604
22605 The blacklist and whitelist file locations can be customized with the
22606 @code{spam-directory} variable (@file{~/News/spam} by default), or
22607 the @code{spam-whitelist} and @code{spam-blacklist} variables
22608 directly.  The whitelist and blacklist files will by default be in the
22609 @code{spam-directory} directory, named @file{whitelist} and
22610 @file{blacklist} respectively.
22611
22612 @node BBDB Whitelists
22613 @subsubsection BBDB Whitelists
22614 @cindex spam filtering
22615 @cindex BBDB whitelists, spam filtering
22616 @cindex BBDB, spam filtering
22617 @cindex spam
22618
22619 @defvar spam-use-BBDB
22620
22621 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22622 Whitelists}), but uses the BBDB as the source of whitelisted
22623 addresses, without regular expressions.  You must have the BBDB loaded
22624 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22625 not in the BBDB will be sent to the next spam-split rule.  This is an
22626 explicit filter, meaning that unless someone is in the BBDB, their
22627 messages are not assumed to be spam or ham.
22628
22629 @end defvar
22630
22631 @defvar spam-use-BBDB-exclusive
22632
22633 Set this variable to @code{t} if you want to use the BBDB as an
22634 implicit filter, meaning that every message will be considered spam
22635 unless the sender is in the BBDB.  Use with care.  Only sender
22636 addresses in the BBDB will be allowed through; all others will be
22637 classified as spammers.
22638
22639 @end defvar
22640
22641 @defvar gnus-group-ham-exit-processor-BBDB
22642
22643 Add this symbol to a group's @code{spam-process} parameter by
22644 customizing the group parameters or the
22645 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22646 added to a group's @code{spam-process} parameter, the senders of
22647 ham-marked articles in @emph{ham} groups will be added to the
22648 BBDB.  Note that this ham processor has no effect in @emph{spam}
22649 or @emph{unclassified} groups.
22650
22651 @end defvar
22652
22653 @node Gmane Spam Reporting
22654 @subsubsection Gmane Spam Reporting
22655 @cindex spam reporting
22656 @cindex Gmane, spam reporting
22657 @cindex Gmane, spam reporting
22658 @cindex spam
22659
22660 @defvar gnus-group-spam-exit-processor-report-gmane
22661
22662 Add this symbol to a group's @code{spam-process} parameter by
22663 customizing the group parameters or the
22664 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22665 added to a group's @code{spam-process} parameter, the spam-marked
22666 articles groups will be reported to the Gmane administrators.
22667
22668 @end defvar
22669
22670 @node Anti-spam Hashcash Payments
22671 @subsubsection Anti-spam Hashcash Payments
22672 @cindex spam filtering
22673 @cindex hashcash, spam filtering
22674 @cindex spam
22675
22676 @defvar spam-use-hashcash
22677
22678 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22679 Whitelists}), but uses hashcash tokens for whitelisting messages
22680 instead of the sender address.  You must have the @code{hashcash.el}
22681 package loaded for @code{spam-use-hashcash} to work properly.
22682 Messages without a hashcash payment token will be sent to the next
22683 spam-split rule.  This is an explicit filter, meaning that unless a
22684 hashcash token is found, the messages are not assumed to be spam or
22685 ham.
22686
22687 @end defvar
22688
22689 @node Blackholes
22690 @subsubsection Blackholes
22691 @cindex spam filtering
22692 @cindex blackholes, spam filtering
22693 @cindex spam
22694
22695 @defvar spam-use-blackholes
22696
22697 This option is disabled by default.  You can let Gnus consult the
22698 blackhole-type distributed spam processing systems (DCC, for instance)
22699 when you set this option.  The variable @code{spam-blackhole-servers}
22700 holds the list of blackhole servers Gnus will consult.  The current
22701 list is fairly comprehensive, but make sure to let us know if it
22702 contains outdated servers.
22703
22704 The blackhole check uses the @code{dig.el} package, but you can tell
22705 @file{spam.el} to use @code{dns.el} instead for better performance if
22706 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22707 this time to set @code{spam-use-dig} to @code{nil} despite the
22708 possible performance improvements, because some users may be unable to
22709 use it, but you can try it and see if it works for you.
22710
22711 @end defvar
22712
22713 @defvar spam-blackhole-servers
22714
22715 The list of servers to consult for blackhole checks.
22716
22717 @end defvar
22718
22719 @defvar spam-blackhole-good-server-regex
22720
22721 A regular expression for IPs that should not be checked against the
22722 blackhole server list.  When set to @code{nil}, it has no effect.
22723
22724 @end defvar
22725
22726 @defvar spam-use-dig
22727
22728 Use the @code{dig.el} package instead of the @code{dns.el} package.
22729 The default setting of @code{t} is recommended.
22730
22731 @end defvar
22732
22733 Blackhole checks are done only on incoming mail.  There is no spam or
22734 ham processor for blackholes.
22735
22736 @node Regular Expressions Header Matching
22737 @subsubsection Regular Expressions Header Matching
22738 @cindex spam filtering
22739 @cindex regular expressions header matching, spam filtering
22740 @cindex spam
22741
22742 @defvar spam-use-regex-headers
22743
22744 This option is disabled by default.  You can let Gnus check the
22745 message headers against lists of regular expressions when you set this
22746 option.  The variables @code{spam-regex-headers-spam} and
22747 @code{spam-regex-headers-ham} hold the list of regular expressions.
22748 Gnus will check against the message headers to determine if the
22749 message is spam or ham, respectively.
22750
22751 @end defvar
22752
22753 @defvar spam-regex-headers-spam
22754
22755 The list of regular expressions that, when matched in the headers of
22756 the message, positively identify it as spam.
22757
22758 @end defvar
22759
22760 @defvar spam-regex-headers-ham
22761
22762 The list of regular expressions that, when matched in the headers of
22763 the message, positively identify it as ham.
22764
22765 @end defvar
22766
22767 Regular expression header checks are done only on incoming mail.
22768 There is no specific spam or ham processor for regular expressions.
22769
22770 @node Bogofilter
22771 @subsubsection Bogofilter
22772 @cindex spam filtering
22773 @cindex bogofilter, spam filtering
22774 @cindex spam
22775
22776 @defvar spam-use-bogofilter
22777
22778 Set this variable if you want @code{spam-split} to use Eric Raymond's
22779 speedy Bogofilter.
22780
22781 With a minimum of care for associating the @samp{$} mark for spam
22782 articles only, Bogofilter training all gets fairly automatic.  You
22783 should do this until you get a few hundreds of articles in each
22784 category, spam or not.  The command @kbd{S t} in summary mode, either
22785 for debugging or for curiosity, shows the @emph{spamicity} score of
22786 the current article (between 0.0 and 1.0).
22787
22788 Bogofilter determines if a message is spam based on a specific
22789 threshold.  That threshold can be customized, consult the Bogofilter
22790 documentation.
22791
22792 If the @code{bogofilter} executable is not in your path, Bogofilter
22793 processing will be turned off.
22794
22795 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22796
22797 @end defvar
22798
22799 @defvar spam-use-bogofilter-headers
22800
22801 Set this variable if you want @code{spam-split} to use Eric Raymond's
22802 speedy Bogofilter, looking only at the message headers.  It works
22803 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22804 must be in the message already.  Normally you would do this with a
22805 procmail recipe or something similar; consult the Bogofilter
22806 installation documents for details.
22807
22808 You should not enable this if you use @code{spam-use-bogofilter}.
22809
22810 @end defvar
22811
22812 @defvar gnus-group-spam-exit-processor-bogofilter
22813 Add this symbol to a group's @code{spam-process} parameter by
22814 customizing the group parameters or the
22815 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22816 added to a group's @code{spam-process} parameter, spam-marked articles
22817 will be added to the Bogofilter spam database.
22818 @end defvar
22819
22820 @defvar gnus-group-ham-exit-processor-bogofilter
22821 Add this symbol to a group's @code{spam-process} parameter by
22822 customizing the group parameters or the
22823 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22824 added to a group's @code{spam-process} parameter, the ham-marked
22825 articles in @emph{ham} groups will be added to the Bogofilter database
22826 of non-spam messages.  Note that this ham processor has no effect in
22827 @emph{spam} or @emph{unclassified} groups.
22828 @end defvar
22829
22830 @defvar spam-bogofilter-database-directory
22831
22832 This is the directory where Bogofilter will store its databases.  It
22833 is not specified by default, so Bogofilter will use its own default
22834 database directory.
22835
22836 @end defvar
22837
22838 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22839 purpose.  A ham and a spam processor are provided, plus the
22840 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22841 variables to indicate to spam-split that Bogofilter should either be
22842 used, or has already been used on the article.  The 0.9.2.1 version of
22843 Bogofilter was used to test this functionality.
22844
22845 @node ifile spam filtering
22846 @subsubsection ifile spam filtering
22847 @cindex spam filtering
22848 @cindex ifile, spam filtering
22849 @cindex spam
22850
22851 @defvar spam-use-ifile
22852
22853 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22854 statistical analyzer similar to Bogofilter.
22855
22856 @end defvar
22857
22858 @defvar spam-ifile-all-categories
22859
22860 Enable this variable if you want @code{spam-use-ifile} to give you all
22861 the ifile categories, not just spam/non-spam.  If you use this, make
22862 sure you train ifile as described in its documentation.
22863
22864 @end defvar
22865
22866 @defvar spam-ifile-spam-category
22867
22868 This is the category of spam messages as far as ifile is concerned.
22869 The actual string used is irrelevant, but you probably want to leave
22870 the default value of @samp{spam}.
22871 @end defvar
22872
22873 @defvar spam-ifile-database-path
22874
22875 This is the filename for the ifile database.  It is not specified by
22876 default, so ifile will use its own default database name.
22877
22878 @end defvar
22879
22880 The ifile mail classifier is similar to Bogofilter in intent and
22881 purpose.  A ham and a spam processor are provided, plus the
22882 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22883 should be used.  The 1.2.1 version of ifile was used to test this
22884 functionality.
22885
22886 @node spam-stat spam filtering
22887 @subsubsection spam-stat spam filtering
22888 @cindex spam filtering
22889 @cindex spam-stat, spam filtering
22890 @cindex spam-stat
22891 @cindex spam
22892
22893 @xref{Filtering Spam Using Statistics with spam-stat}.
22894
22895 @defvar spam-use-stat
22896
22897 Enable this variable if you want @code{spam-split} to use
22898 spam-stat.el, an Emacs Lisp statistical analyzer.
22899
22900 @end defvar
22901
22902 @defvar gnus-group-spam-exit-processor-stat
22903 Add this symbol to a group's @code{spam-process} parameter by
22904 customizing the group parameters or the
22905 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22906 added to a group's @code{spam-process} parameter, the spam-marked
22907 articles will be added to the spam-stat database of spam messages.
22908 @end defvar
22909
22910 @defvar gnus-group-ham-exit-processor-stat
22911 Add this symbol to a group's @code{spam-process} parameter by
22912 customizing the group parameters or the
22913 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22914 added to a group's @code{spam-process} parameter, the ham-marked
22915 articles in @emph{ham} groups will be added to the spam-stat database
22916 of non-spam messages.  Note that this ham processor has no effect in
22917 @emph{spam} or @emph{unclassified} groups.
22918 @end defvar
22919
22920 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
22921 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
22922 which unlike ifile or Bogofilter does not require external programs.
22923 A spam and a ham processor, and the @code{spam-use-stat} variable for
22924 @code{spam-split} are provided.
22925
22926 @node SpamOracle
22927 @subsubsection Using SpamOracle with Gnus
22928 @cindex spam filtering
22929 @cindex SpamOracle
22930 @cindex spam
22931
22932 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
22933 statistical mail filtering tool written by Xavier Leroy and needs to be
22934 installed separately.
22935
22936 There are several ways to use SpamOracle with Gnus.  In all cases, your
22937 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
22938 then enter an @samp{X-Spam} header indicating whether it regards the
22939 mail as a spam mail or not.
22940
22941 One possibility is to run SpamOracle as a @code{:prescript} from the
22942 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
22943 the advantage that the user can see the @emph{X-Spam} headers.
22944
22945 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
22946 Using The Spam ELisp Package}) call SpamOracle.
22947
22948 @vindex spam-use-spamoracle
22949 To enable SpamOracle usage by @file{spam.el}, set the variable
22950 @code{spam-use-spamoracle} to @code{t} and configure the
22951 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
22952 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
22953 this example the @samp{INBOX} of an nnimap server is filtered using
22954 SpamOracle.  Mails recognized as spam mails will be moved to
22955 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
22956 in @samp{INBOX}:
22957
22958 @example
22959 (setq spam-use-spamoracle t
22960       spam-split-group "Junk"
22961       nnimap-split-inbox '("INBOX")
22962       nnimap-split-rule 'nnimap-split-fancy
22963       nnimap-split-fancy '(| (: spam-split) "INBOX"))
22964 @end example
22965
22966 @defvar spam-use-spamoracle
22967 Set to @code{t} if you want Gnus to enable spam filtering using
22968 SpamOracle.
22969 @end defvar
22970
22971 @defvar spam-spamoracle-binary
22972 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
22973 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
22974 can be customized.
22975 @end defvar
22976
22977 @defvar spam-spamoracle-database
22978 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
22979 store its analyses.  This is controlled by the variable
22980 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
22981 the default SpamOracle database will be used.  In case you want your
22982 database to live somewhere special, set
22983 @code{spam-spamoracle-database} to this path.
22984 @end defvar
22985
22986 SpamOracle employs a statistical algorithm to determine whether a
22987 message is spam or ham.  In order to get good results, meaning few
22988 false hits or misses, SpamOracle needs training.  SpamOracle learns the
22989 characteristics of your spam mails.  Using the @emph{add} mode
22990 (training mode) one has to feed good (ham) and spam mails to
22991 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
22992 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
22993 spam- and ham-processors, which is much more convenient.  For a
22994 detailed description of spam- and ham-processors, @xref{Filtering Spam
22995 Using The Spam ELisp Package}.
22996
22997 @defvar gnus-group-spam-exit-processor-spamoracle
22998 Add this symbol to a group's @code{spam-process} parameter by
22999 customizing the group parameter or the
23000 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23001 to a group's @code{spam-process} parameter, spam-marked articles will be
23002 sent to SpamOracle as spam samples.
23003 @end defvar
23004
23005 @defvar gnus-group-ham-exit-processor-spamoracle
23006 Add this symbol to a group's @code{spam-process} parameter by
23007 customizing the group parameter or the
23008 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23009 to a grup's @code{spam-process} parameter, the ham-marked articles in
23010 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23011 messages.  Note that this ham processor has no effect in @emph{spam} or
23012 @emph{unclassified} groups.
23013 @end defvar
23014
23015 @emph{Example:} These are the Group Parameters of an group that has been
23016 classified as a ham group, meaning that it should only contain ham
23017 messages.
23018 @example
23019  ((spam-contents gnus-group-spam-classification-ham)
23020   (spam-process
23021    (gnus-group-spam-exit-processor-spamoracle)))
23022 @end example
23023 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
23024 installed.  If the group contains spam message (e.g. because SpamOracle
23025 has not had enough sample messages yet) and the user marks some
23026 messages as spam messages, these messages will be processed by
23027 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23028 the messages to SpamOracle as new samples for spam.
23029
23030 @node Extending the spam elisp package
23031 @subsubsection Extending the spam elisp package
23032 @cindex spam filtering
23033 @cindex spam elisp package, extending
23034 @cindex extending the spam elisp package
23035
23036 Say you want to add a new back end called blackbox.  For filtering
23037 incoming mail, provide the following:
23038
23039 @enumerate
23040
23041 @item
23042 code
23043
23044 @lisp
23045 (defvar spam-use-blackbox nil
23046   "True if blackbox should be used.")
23047 @end lisp
23048
23049 Add
23050 @example
23051     (spam-use-blackbox   . spam-check-blackbox)
23052 @end example
23053 to @code{spam-list-of-checks}.
23054
23055 @item
23056 functionality
23057
23058 Write the @code{spam-check-blackbox} function.  It should return
23059 @samp{nil} or @code{spam-split-group}.  See the existing
23060 @code{spam-check-*} functions for examples of what you can do.
23061
23062 Make sure to add @code{spam-use-blackbox} to
23063 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23064 mail analyzer that needs the full message body to operate.
23065
23066 @end enumerate
23067
23068 For processing spam and ham messages, provide the following:
23069
23070 @enumerate
23071
23072 @item
23073 code
23074
23075 Note you don't have to provide a spam or a ham processor.  Only
23076 provide them if Blackbox supports spam or ham processing.
23077
23078 @lisp
23079 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23080   "The Blackbox summary exit spam processor.
23081 Only applicable to spam groups.")
23082
23083 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23084   "The whitelist summary exit ham processor.
23085 Only applicable to non-spam (unclassified and ham) groups.")
23086
23087 @end lisp
23088
23089 @item
23090 functionality
23091
23092 @lisp
23093 (defun spam-blackbox-register-spam-routine ()
23094   (spam-generic-register-routine
23095    ;; @r{the spam function}
23096    (lambda (article)
23097      (let ((from (spam-fetch-field-from-fast article)))
23098        (when (stringp from)
23099            (blackbox-do-something-with-this-spammer from))))
23100    ;; @r{the ham function}
23101    nil))
23102
23103 (defun spam-blackbox-register-ham-routine ()
23104   (spam-generic-register-routine
23105    ;; @r{the spam function}
23106    nil
23107    ;; @r{the ham function}
23108    (lambda (article)
23109      (let ((from (spam-fetch-field-from-fast article)))
23110        (when (stringp from)
23111            (blackbox-do-something-with-this-ham-sender from))))))
23112 @end lisp
23113
23114 Write the @code{blackbox-do-something-with-this-ham-sender} and
23115 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23116 more complex code than fetching the message sender, but keep in mind
23117 that retrieving the whole message takes significantly longer than the
23118 sender through @code{spam-fetch-field-from-fast}, because the message
23119 senders are kept in memory by Gnus.
23120
23121 @end enumerate
23122
23123
23124 @node Filtering Spam Using Statistics with spam-stat
23125 @subsection Filtering Spam Using Statistics with spam-stat
23126 @cindex Paul Graham
23127 @cindex Graham, Paul
23128 @cindex naive Bayesian spam filtering
23129 @cindex Bayesian spam filtering, naive
23130 @cindex spam filtering, naive Bayesian
23131
23132 Paul Graham has written an excellent essay about spam filtering using
23133 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23134 Spam}.  In it he describes the inherent deficiency of rule-based
23135 filtering as used by SpamAssassin, for example: Somebody has to write
23136 the rules, and everybody else has to install these rules.  You are
23137 always late.  It would be much better, he argues, to filter mail based
23138 on whether it somehow resembles spam or non-spam.  One way to measure
23139 this is word distribution.  He then goes on to describe a solution
23140 that checks whether a new mail resembles any of your other spam mails
23141 or not.
23142
23143 The basic idea is this:  Create a two collections of your mail, one
23144 with spam, one with non-spam.  Count how often each word appears in
23145 either collection, weight this by the total number of mails in the
23146 collections, and store this information in a dictionary.  For every
23147 word in a new mail, determine its probability to belong to a spam or a
23148 non-spam mail.  Use the 15 most conspicuous words, compute the total
23149 probability of the mail being spam.  If this probability is higher
23150 than a certain threshold, the mail is considered to be spam.
23151
23152 Gnus supports this kind of filtering.  But it needs some setting up.
23153 First, you need two collections of your mail, one with spam, one with
23154 non-spam.  Then you need to create a dictionary using these two
23155 collections, and save it.  And last but not least, you need to use
23156 this dictionary in your fancy mail splitting rules.
23157
23158 @menu
23159 * Creating a spam-stat dictionary::
23160 * Splitting mail using spam-stat::
23161 * Low-level interface to the spam-stat dictionary::
23162 @end menu
23163
23164 @node Creating a spam-stat dictionary
23165 @subsubsection Creating a spam-stat dictionary
23166
23167 Before you can begin to filter spam based on statistics, you must
23168 create these statistics based on two mail collections, one with spam,
23169 one with non-spam.  These statistics are then stored in a dictionary
23170 for later use.  In order for these statistics to be meaningful, you
23171 need several hundred emails in both collections.
23172
23173 Gnus currently supports only the nnml back end for automated dictionary
23174 creation.  The nnml back end stores all mails in a directory, one file
23175 per mail.  Use the following:
23176
23177 @defun spam-stat-process-spam-directory
23178 Create spam statistics for every file in this directory.  Every file
23179 is treated as one spam mail.
23180 @end defun
23181
23182 @defun spam-stat-process-non-spam-directory
23183 Create non-spam statistics for every file in this directory.  Every
23184 file is treated as one non-spam mail.
23185 @end defun
23186
23187 Usually you would call @code{spam-stat-process-spam-directory} on a
23188 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23189 the the group @samp{nnml:mail.spam}), and you would call
23190 @code{spam-stat-process-non-spam-directory} on a directory such as
23191 @file{~/Mail/mail/misc} (this usually corresponds the the group
23192 @samp{nnml:mail.misc}).
23193
23194 When you are using @acronym{IMAP}, you won't have the mails available
23195 locally, so that will not work.  One solution is to use the Gnus Agent
23196 to cache the articles.  Then you can use directories such as
23197 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23198 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23199
23200 @defvar spam-stat
23201 This variable holds the hash-table with all the statistics---the
23202 dictionary we have been talking about.  For every word in either
23203 collection, this hash-table stores a vector describing how often the
23204 word appeared in spam and often it appeared in non-spam mails.
23205 @end defvar
23206
23207 If you want to regenerate the statistics from scratch, you need to
23208 reset the dictionary.
23209
23210 @defun spam-stat-reset
23211 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23212 @end defun
23213
23214 When you are done, you must save the dictionary.  The dictionary may
23215 be rather large.  If you will not update the dictionary incrementally
23216 (instead, you will recreate it once a month, for example), then you
23217 can reduce the size of the dictionary by deleting all words that did
23218 not appear often enough or that do not clearly belong to only spam or
23219 only non-spam mails.
23220
23221 @defun spam-stat-reduce-size
23222 Reduce the size of the dictionary.  Use this only if you do not want
23223 to update the dictionary incrementally.
23224 @end defun
23225
23226 @defun spam-stat-save
23227 Save the dictionary.
23228 @end defun
23229
23230 @defvar spam-stat-file
23231 The filename used to store the dictionary.  This defaults to
23232 @file{~/.spam-stat.el}.
23233 @end defvar
23234
23235 @node Splitting mail using spam-stat
23236 @subsubsection Splitting mail using spam-stat
23237
23238 In order to use @code{spam-stat} to split your mail, you need to add the
23239 following to your @file{~/.gnus.el} file:
23240
23241 @lisp
23242 (require 'spam-stat)
23243 (spam-stat-load)
23244 @end lisp
23245
23246 This will load the necessary Gnus code, and the dictionary you
23247 created.
23248
23249 Next, you need to adapt your fancy splitting rules:  You need to
23250 determine how to use @code{spam-stat}.  The following examples are for
23251 the nnml back end.  Using the nnimap back end works just as well.  Just
23252 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23253
23254 In the simplest case, you only have two groups, @samp{mail.misc} and
23255 @samp{mail.spam}.  The following expression says that mail is either
23256 spam or it should go into @samp{mail.misc}.  If it is spam, then
23257 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23258
23259 @lisp
23260 (setq nnmail-split-fancy
23261       `(| (: spam-stat-split-fancy)
23262           "mail.misc"))
23263 @end lisp
23264
23265 @defvar spam-stat-split-fancy-spam-group
23266 The group to use for spam.  Default is @samp{mail.spam}.
23267 @end defvar
23268
23269 If you also filter mail with specific subjects into other groups, use
23270 the following expression.  Only mails not matching the regular
23271 expression are considered potential spam.
23272
23273 @lisp
23274 (setq nnmail-split-fancy
23275       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23276           (: spam-stat-split-fancy)
23277           "mail.misc"))
23278 @end lisp
23279
23280 If you want to filter for spam first, then you must be careful when
23281 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23282 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23283 non-spam, therefore both should be in your collection of non-spam
23284 mails, when creating the dictionary!
23285
23286 @lisp
23287 (setq nnmail-split-fancy
23288       `(| (: spam-stat-split-fancy)
23289           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23290           "mail.misc"))
23291 @end lisp
23292
23293 You can combine this with traditional filtering.  Here, we move all
23294 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23295 @code{spam-stat-split-fancy} will never see them, the mails in
23296 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23297 nor in your collection of non-spam mails, when creating the
23298 dictionary!
23299
23300 @lisp
23301 (setq nnmail-split-fancy
23302       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23303           (: spam-stat-split-fancy)
23304           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23305           "mail.misc"))
23306 @end lisp
23307
23308
23309 @node Low-level interface to the spam-stat dictionary
23310 @subsubsection Low-level interface to the spam-stat dictionary
23311
23312 The main interface to using @code{spam-stat}, are the following functions:
23313
23314 @defun spam-stat-buffer-is-spam
23315 Called in a buffer, that buffer is considered to be a new spam mail.
23316 Use this for new mail that has not been processed before.
23317 @end defun
23318
23319 @defun spam-stat-buffer-is-no-spam
23320 Called in a buffer, that buffer is considered to be a new non-spam
23321 mail.  Use this for new mail that has not been processed before.
23322 @end defun
23323
23324 @defun spam-stat-buffer-change-to-spam
23325 Called in a buffer, that buffer is no longer considered to be normal
23326 mail but spam.  Use this to change the status of a mail that has
23327 already been processed as non-spam.
23328 @end defun
23329
23330 @defun spam-stat-buffer-change-to-non-spam
23331 Called in a buffer, that buffer is no longer considered to be spam but
23332 normal mail.  Use this to change the status of a mail that has already
23333 been processed as spam.
23334 @end defun
23335
23336 @defun spam-stat-save
23337 Save the hash table to the file.  The filename used is stored in the
23338 variable @code{spam-stat-file}.
23339 @end defun
23340
23341 @defun spam-stat-load
23342 Load the hash table from a file.  The filename used is stored in the
23343 variable @code{spam-stat-file}.
23344 @end defun
23345
23346 @defun spam-stat-score-word
23347 Return the spam score for a word.
23348 @end defun
23349
23350 @defun spam-stat-score-buffer
23351 Return the spam score for a buffer.
23352 @end defun
23353
23354 @defun spam-stat-split-fancy
23355 Use this function for fancy mail splitting.  Add the rule @samp{(:
23356 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23357 @end defun
23358
23359 Make sure you load the dictionary before using it.  This requires the
23360 following in your @file{~/.gnus.el} file:
23361
23362 @lisp
23363 (require 'spam-stat)
23364 (spam-stat-load)
23365 @end lisp
23366
23367 Typical test will involve calls to the following functions:
23368
23369 @smallexample
23370 Reset: (setq spam-stat (make-hash-table :test 'equal))
23371 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23372 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23373 Save table: (spam-stat-save)
23374 File size: (nth 7 (file-attributes spam-stat-file))
23375 Number of words: (hash-table-count spam-stat)
23376 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23377 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23378 Reduce table size: (spam-stat-reduce-size)
23379 Save table: (spam-stat-save)
23380 File size: (nth 7 (file-attributes spam-stat-file))
23381 Number of words: (hash-table-count spam-stat)
23382 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23383 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23384 @end smallexample
23385
23386 Here is how you would create your dictionary:
23387
23388 @smallexample
23389 Reset: (setq spam-stat (make-hash-table :test 'equal))
23390 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23391 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23392 Repeat for any other non-spam group you need...
23393 Reduce table size: (spam-stat-reduce-size)
23394 Save table: (spam-stat-save)
23395 @end smallexample
23396
23397 @node Various Various
23398 @section Various Various
23399 @cindex mode lines
23400 @cindex highlights
23401
23402 @table @code
23403
23404 @item gnus-home-directory
23405 @vindex gnus-home-directory
23406 All Gnus file and directory variables will be initialized from this
23407 variable, which defaults to @file{~/}.
23408
23409 @item gnus-directory
23410 @vindex gnus-directory
23411 Most Gnus storage file and directory variables will be initialized from
23412 this variable, which defaults to the @env{SAVEDIR} environment
23413 variable, or @file{~/News/} if that variable isn't set.
23414
23415 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
23416 This means that other directory variables that are initialized from this
23417 variable won't be set properly if you set this variable in
23418 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
23419
23420 @item gnus-default-directory
23421 @vindex gnus-default-directory
23422 Not related to the above variable at all---this variable says what the
23423 default directory of all Gnus buffers should be.  If you issue commands
23424 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23425 default directory.  If this variable is @code{nil} (which is the
23426 default), the default directory will be the default directory of the
23427 buffer you were in when you started Gnus.
23428
23429 @item gnus-verbose
23430 @vindex gnus-verbose
23431 This variable is an integer between zero and ten.  The higher the value,
23432 the more messages will be displayed.  If this variable is zero, Gnus
23433 will never flash any messages, if it is seven (which is the default),
23434 most important messages will be shown, and if it is ten, Gnus won't ever
23435 shut up, but will flash so many messages it will make your head swim.
23436
23437 @item gnus-verbose-backends
23438 @vindex gnus-verbose-backends
23439 This variable works the same way as @code{gnus-verbose}, but it applies
23440 to the Gnus back ends instead of Gnus proper.
23441
23442 @item nnheader-max-head-length
23443 @vindex nnheader-max-head-length
23444 When the back ends read straight heads of articles, they all try to read
23445 as little as possible.  This variable (default 4096) specifies
23446 the absolute max length the back ends will try to read before giving up
23447 on finding a separator line between the head and the body.  If this
23448 variable is @code{nil}, there is no upper read bound.  If it is
23449 @code{t}, the back ends won't try to read the articles piece by piece,
23450 but read the entire articles.  This makes sense with some versions of
23451 @code{ange-ftp} or @code{efs}.
23452
23453 @item nnheader-head-chop-length
23454 @vindex nnheader-head-chop-length
23455 This variable (default 2048) says how big a piece of each article to
23456 read when doing the operation described above.
23457
23458 @item nnheader-file-name-translation-alist
23459 @vindex nnheader-file-name-translation-alist
23460 @cindex file names
23461 @cindex invalid characters in file names
23462 @cindex characters in file names
23463 This is an alist that says how to translate characters in file names.
23464 For instance, if @samp{:} is invalid as a file character in file names
23465 on your system (you OS/2 user you), you could say something like:
23466
23467 @lisp
23468 @group
23469 (setq nnheader-file-name-translation-alist
23470       '((?: . ?_)))
23471 @end group
23472 @end lisp
23473
23474 In fact, this is the default value for this variable on OS/2 and MS
23475 Windows (phooey) systems.
23476
23477 @item gnus-hidden-properties
23478 @vindex gnus-hidden-properties
23479 This is a list of properties to use to hide ``invisible'' text.  It is
23480 @code{(invisible t intangible t)} by default on most systems, which
23481 makes invisible text invisible and intangible.
23482
23483 @item gnus-parse-headers-hook
23484 @vindex gnus-parse-headers-hook
23485 A hook called before parsing headers.  It can be used, for instance, to
23486 gather statistics on the headers fetched, or perhaps you'd like to prune
23487 some headers.  I don't see why you'd want that, though.
23488
23489 @item gnus-shell-command-separator
23490 @vindex gnus-shell-command-separator
23491 String used to separate two shell commands.  The default is @samp{;}.
23492
23493 @item gnus-invalid-group-regexp
23494 @vindex gnus-invalid-group-regexp
23495
23496 Regexp to match ``invalid'' group names when querying user for a group
23497 name.  The default value catches some @strong{really} invalid group
23498 names who could possibly mess up Gnus internally (like allowing
23499 @samp{:} in a group name, which is normally used to delimit method and
23500 group).
23501
23502 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23503
23504
23505 @end table
23506
23507 @node The End
23508 @chapter The End
23509
23510 Well, that's the manual---you can get on with your life now.  Keep in
23511 touch.  Say hello to your cats from me.
23512
23513 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23514
23515 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23516
23517 @quotation
23518 @strong{Te Deum}
23519
23520 @sp 1
23521 Not because of victories @*
23522 I sing,@*
23523 having none,@*
23524 but for the common sunshine,@*
23525 the breeze,@*
23526 the largess of the spring.
23527
23528 @sp 1
23529 Not for victory@*
23530 but for the day's work done@*
23531 as well as I was able;@*
23532 not for a seat upon the dais@*
23533 but at the common table.@*
23534 @end quotation
23535
23536
23537 @node Appendices
23538 @chapter Appendices
23539
23540 @menu
23541 * XEmacs::                      Requirements for installing under XEmacs.
23542 * History::                     How Gnus got where it is today.
23543 * On Writing Manuals::          Why this is not a beginner's guide.
23544 * Terminology::                 We use really difficult, like, words here.
23545 * Customization::               Tailoring Gnus to your needs.
23546 * Troubleshooting::             What you might try if things do not work.
23547 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23548 * Emacs for Heathens::          A short introduction to Emacsian terms.
23549 * Frequently Asked Questions::  The Gnus FAQ
23550 @end menu
23551
23552
23553 @node XEmacs
23554 @section XEmacs
23555 @cindex XEmacs
23556 @cindex installing under XEmacs
23557
23558 XEmacs is distributed as a collection of packages.  You should install
23559 whatever packages the Gnus XEmacs package requires.  The current
23560 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23561 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23562 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23563 @samp{misc-games} package is required for Morse decoding.
23564
23565
23566 @node History
23567 @section History
23568
23569 @cindex history
23570 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23571 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23572
23573 If you want to investigate the person responsible for this outrage,
23574 you can point your (feh!) web browser to
23575 @uref{http://quimby.gnus.org/}.  This is also the primary
23576 distribution point for the new and spiffy versions of Gnus, and is
23577 known as The Site That Destroys Newsrcs And Drives People Mad.
23578
23579 During the first extended alpha period of development, the new Gnus was
23580 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23581 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23582 (Besides, the ``Gnus'' in this abbreviation should probably be
23583 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23584 appropriate name, don't you think?)
23585
23586 In any case, after spending all that energy on coming up with a new and
23587 spunky name, we decided that the name was @emph{too} spunky, so we
23588 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23589 ``@sc{gnus}''.  New vs. old.
23590
23591 @menu
23592 * Gnus Versions::               What Gnus versions have been released.
23593 * Other Gnus Versions::         Other Gnus versions that also have been released.
23594 * Why?::                        What's the point of Gnus?
23595 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23596 * Conformity::                  Gnus tries to conform to all standards.
23597 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23598 * Gnus Development::            How Gnus is developed.
23599 * Contributors::                Oodles of people.
23600 * New Features::                Pointers to some of the new stuff in Gnus.
23601 @end menu
23602
23603
23604 @node Gnus Versions
23605 @subsection Gnus Versions
23606 @cindex ding Gnus
23607 @cindex September Gnus
23608 @cindex Red Gnus
23609 @cindex Quassia Gnus
23610 @cindex Pterodactyl Gnus
23611 @cindex Oort Gnus
23612 @cindex No Gnus
23613 @cindex Gnus versions
23614
23615 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23616 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23617 plus 15 Gnus 5.0 releases).
23618
23619 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23620 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23621
23622 On July 28th 1996 work on Red Gnus was begun, and it was released on
23623 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23624
23625 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23626 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23627
23628 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23629 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23630 1999.
23631
23632 On the 26th of October 2000, Oort Gnus was begun.
23633
23634 If you happen upon a version of Gnus that has a prefixed name --
23635 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23636 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23637 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23638 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23639 released version of Gnus and snuggle up to that instead.
23640
23641
23642 @node Other Gnus Versions
23643 @subsection Other Gnus Versions
23644 @cindex Semi-gnus
23645
23646 In addition to the versions of Gnus which have had their releases
23647 coordinated by Lars, one major development has been Semi-gnus from
23648 Japan.  It's based on a library called @acronym{SEMI}, which provides
23649 @acronym{MIME} capabilities.
23650
23651 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23652 Collectively, they are called ``Semi-gnus'', and different strains are
23653 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23654 @acronym{MIME} and multilingualization things, especially important for
23655 Japanese users.
23656
23657
23658 @node Why?
23659 @subsection Why?
23660
23661 What's the point of Gnus?
23662
23663 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23664 newsreader, that lets you do anything you can think of.  That was my
23665 original motivation, but while working on Gnus, it has become clear to
23666 me that this generation of newsreaders really belong in the stone age.
23667 Newsreaders haven't developed much since the infancy of the net.  If the
23668 volume continues to rise with the current rate of increase, all current
23669 newsreaders will be pretty much useless.  How do you deal with
23670 newsgroups that have thousands of new articles each day?  How do you
23671 keep track of millions of people who post?
23672
23673 Gnus offers no real solutions to these questions, but I would very much
23674 like to see Gnus being used as a testing ground for new methods of
23675 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23676 to separate the newsreader from the back ends, Gnus now offers a simple
23677 interface for anybody who wants to write new back ends for fetching mail
23678 and news from different sources.  I have added hooks for customizations
23679 everywhere I could imagine it being useful.  By doing so, I'm inviting
23680 every one of you to explore and invent.
23681
23682 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23683 @kbd{C-u 100 M-x all-hail-xemacs}.
23684
23685
23686 @node Compatibility
23687 @subsection Compatibility
23688
23689 @cindex compatibility
23690 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23691 bindings have been kept.  More key bindings have been added, of course,
23692 but only in one or two obscure cases have old bindings been changed.
23693
23694 Our motto is:
23695 @quotation
23696 @cartouche
23697 @center In a cloud bones of steel.
23698 @end cartouche
23699 @end quotation
23700
23701 All commands have kept their names.  Some internal functions have changed
23702 their names.
23703
23704 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23705 Articles}.
23706
23707 One major compatibility question is the presence of several summary
23708 buffers.  All variables relevant while reading a group are
23709 buffer-local to the summary buffer they belong in.  Although many
23710 important variables have their values copied into their global
23711 counterparts whenever a command is executed in the summary buffer, this
23712 change might lead to incorrect values being used unless you are careful.
23713
23714 All code that relies on knowledge of @sc{gnus} internals will probably
23715 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23716 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23717 maintains a hash table that points to the entries in this alist (which
23718 speeds up many functions), and changing the alist directly will lead to
23719 peculiar results.
23720
23721 @cindex hilit19
23722 @cindex highlighting
23723 Old hilit19 code does not work at all.  In fact, you should probably
23724 remove all hilit code from all Gnus hooks
23725 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23726 Gnus provides various integrated functions for highlighting.  These are
23727 faster and more accurate.  To make life easier for everybody, Gnus will
23728 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23729 Away!
23730
23731 Packages like @code{expire-kill} will no longer work.  As a matter of
23732 fact, you should probably remove all old @sc{gnus} packages (and other
23733 code) when you start using Gnus.  More likely than not, Gnus already
23734 does what you have written code to make @sc{gnus} do.  (Snicker.)
23735
23736 Even though old methods of doing things are still supported, only the
23737 new methods are documented in this manual.  If you detect a new method of
23738 doing something while reading this manual, that does not mean you have
23739 to stop doing it the old way.
23740
23741 Gnus understands all @sc{gnus} startup files.
23742
23743 @kindex M-x gnus-bug
23744 @findex gnus-bug
23745 @cindex reporting bugs
23746 @cindex bugs
23747 Overall, a casual user who hasn't written much code that depends on
23748 @sc{gnus} internals should suffer no problems.  If problems occur,
23749 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23750
23751 @vindex gnus-bug-create-help-buffer
23752 If you are in the habit of sending bug reports @emph{very} often, you
23753 may find the helpful help buffer annoying after a while.  If so, set
23754 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23755 up at you.
23756
23757
23758 @node Conformity
23759 @subsection Conformity
23760
23761 No rebels without a clue here, ma'am.  We conform to all standards known
23762 to (wo)man.  Except for those standards and/or conventions we disagree
23763 with, of course.
23764
23765 @table @strong
23766
23767 @item RFC (2)822
23768 @cindex RFC 822
23769 @cindex RFC 2822
23770 There are no known breaches of this standard.
23771
23772 @item RFC 1036
23773 @cindex RFC 1036
23774 There are no known breaches of this standard, either.
23775
23776 @item Son-of-RFC 1036
23777 @cindex Son-of-RFC 1036
23778 We do have some breaches to this one.
23779
23780 @table @emph
23781
23782 @item X-Newsreader
23783 @itemx User-Agent
23784 These are considered to be ``vanity headers'', while I consider them
23785 to be consumer information.  After seeing so many badly formatted
23786 articles coming from @code{tin} and @code{Netscape} I know not to use
23787 either of those for posting articles.  I would not have known that if
23788 it wasn't for the @code{X-Newsreader} header.
23789 @end table
23790
23791 @item USEFOR
23792 @cindex USEFOR
23793 USEFOR is an IETF working group writing a successor to RFC 1036, based
23794 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23795 various changes to the format of news articles.  The Gnus towers will
23796 look into implementing the changes when the draft is accepted as an RFC.
23797
23798 @item MIME - RFC 2045-2049 etc
23799 @cindex @acronym{MIME}
23800 All the various @acronym{MIME} RFCs are supported.
23801
23802 @item Disposition Notifications - RFC 2298
23803 Message Mode is able to request notifications from the receiver.
23804
23805 @item PGP - RFC 1991 and RFC 2440
23806 @cindex RFC 1991
23807 @cindex RFC 2440
23808 RFC 1991 is the original @acronym{PGP} message specification,
23809 published as an informational RFC.  RFC 2440 was the follow-up, now
23810 called Open PGP, and put on the Standards Track.  Both document a
23811 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23812 encoding (signing and encryption) and decoding (verification and
23813 decryption).
23814
23815 @item PGP/MIME - RFC 2015/3156
23816 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23817 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23818 Gnus supports both encoding and decoding.
23819
23820 @item S/MIME - RFC 2633
23821 RFC 2633 describes the @acronym{S/MIME} format.
23822
23823 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23824 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23825 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23826 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23827 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23828 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23829 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23830 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23831
23832 @end table
23833
23834 If you ever notice Gnus acting non-compliant with regards to the texts
23835 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23836 know.
23837
23838
23839 @node Emacsen
23840 @subsection Emacsen
23841 @cindex Emacsen
23842 @cindex XEmacs
23843 @cindex Mule
23844 @cindex Emacs
23845
23846 Gnus should work on :
23847
23848 @itemize @bullet
23849
23850 @item
23851 Emacs 20.3 and up.
23852
23853 @item
23854 XEmacs 21.1.1 and up.
23855
23856 @end itemize
23857
23858 This Gnus version will absolutely not work on any Emacsen older than
23859 that.  Not reliably, at least.  Older versions of Gnus may work on older
23860 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
23861 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
23862 See the file ``README'' in the T-gnus distribution for more details.
23863
23864 There are some vague differences between Gnus on the various
23865 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23866 other than that, things should look pretty much the same under all
23867 Emacsen.
23868
23869
23870 @node Gnus Development
23871 @subsection Gnus Development
23872
23873 Gnus is developed in a two-phased cycle.  The first phase involves much
23874 discussion on the @samp{ding@@gnus.org} mailing list, where people
23875 propose changes and new features, post patches and new back ends.  This
23876 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23877 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23878 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23879 unstable and should not be used by casual users.  Gnus alpha releases
23880 have names like ``Red Gnus'' and ``Quassia Gnus''.
23881
23882 After futzing around for 50-100 alpha releases, Gnus is declared
23883 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23884 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23885 supposed to be able to use these, and these are mostly discussed on the
23886 @samp{gnu.emacs.gnus} newsgroup.
23887
23888 @cindex Incoming*
23889 @vindex mail-source-delete-incoming
23890 Some variable defaults differ between alpha Gnusae and released Gnusae.
23891 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23892 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23893 lossage of mail if an alpha release hiccups while handling the mail.
23894
23895 The division of discussion between the ding mailing list and the Gnus
23896 newsgroup is not purely based on publicity concerns.  It's true that
23897 having people write about the horrible things that an alpha Gnus release
23898 can do (sometimes) in a public forum may scare people off, but more
23899 importantly, talking about new experimental features that have been
23900 introduced may confuse casual users.  New features are frequently
23901 introduced, fiddled with, and judged to be found wanting, and then
23902 either discarded or totally rewritten.  People reading the mailing list
23903 usually keep up with these rapid changes, while people on the newsgroup
23904 can't be assumed to do so.
23905
23906
23907
23908 @node Contributors
23909 @subsection Contributors
23910 @cindex contributors
23911
23912 The new Gnus version couldn't have been done without the help of all the
23913 people on the (ding) mailing list.  Every day for over a year I have
23914 gotten billions of nice bug reports from them, filling me with joy,
23915 every single one of them.  Smooches.  The people on the list have been
23916 tried beyond endurance, what with my ``oh, that's a neat idea <type
23917 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23918 work at all <type type>, yup, I'll ship that one off right away <ship
23919 off> no, wait, that absolutely does not work'' policy for releases.
23920 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23921 ``worser''? ``much worser''?  ``worsest''?)
23922
23923 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23924 wrong show.
23925
23926 @itemize @bullet
23927
23928 @item
23929 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23930
23931 @item
23932 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23933 nnwarchive and many, many other things connected with @acronym{MIME} and
23934 other types of en/decoding, as well as general bug fixing, new
23935 functionality and stuff.
23936
23937 @item
23938 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23939 well as numerous other things).
23940
23941 @item
23942 Luis Fernandes---design and graphics.
23943
23944 @item
23945 Joe Reiss---creator of the smiley faces.
23946
23947 @item
23948 Justin Sheehy---the @acronym{FAQ} maintainer.
23949
23950 @item
23951 Erik Naggum---help, ideas, support, code and stuff.
23952
23953 @item
23954 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23955 @dfn{picons} (@pxref{Picons}).
23956
23957 @item
23958 Kim-Minh Kaplan---further work on the picon code.
23959
23960 @item
23961 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23962 (@pxref{GroupLens}).
23963
23964 @item
23965 Sudish Joseph---innumerable bug fixes.
23966
23967 @item
23968 Ilja Weis---@file{gnus-topic.el}.
23969
23970 @item
23971 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23972
23973 @item
23974 Vladimir Alexiev---the refcard and reference booklets.
23975
23976 @item
23977 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23978 distribution by Felix Lee and JWZ.
23979
23980 @item
23981 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23982
23983 @item
23984 Peter Mutsaers---orphan article scoring code.
23985
23986 @item
23987 Ken Raeburn---POP mail support.
23988
23989 @item
23990 Hallvard B Furuseth---various bits and pieces, especially dealing with
23991 .newsrc files.
23992
23993 @item
23994 Brian Edmonds---@file{gnus-bbdb.el}.
23995
23996 @item
23997 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23998
23999 @item
24000 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24001
24002 @item
24003 François Pinard---many, many interesting and thorough bug reports, as
24004 well as autoconf support.
24005
24006 @end itemize
24007
24008 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24009 Borges, and Jost Krieger proof-reading parts of the manual.
24010
24011 The following people have contributed many patches and suggestions:
24012
24013 Christopher Davis,
24014 Andrew Eskilsson,
24015 Kai Grossjohann,
24016 Kevin Greiner,
24017 Jesper Harder,
24018 Paul Jarc,
24019 Simon Josefsson,
24020 David KÃ¥gedal,
24021 Richard Pieri,
24022 Fabrice Popineau,
24023 Daniel Quinlan,
24024 Michael Shields,
24025 Reiner Steib,
24026 Jason L. Tibbitts, III,
24027 Jack Vinson,
24028 Katsumi Yamaoka, @c Yamaoka
24029 and
24030 Teodor Zlatanov.
24031
24032 Also thanks to the following for patches and stuff:
24033
24034 Jari Aalto,
24035 Adrian Aichner,
24036 Vladimir Alexiev,
24037 Russ Allbery,
24038 Peter Arius,
24039 Matt Armstrong,
24040 Marc Auslander,
24041 Miles Bader,
24042 Alexei V. Barantsev,
24043 Frank Bennett,
24044 Robert Bihlmeyer,
24045 Chris Bone,
24046 Mark Borges,
24047 Mark Boyns,
24048 Lance A. Brown,
24049 Rob Browning,
24050 Kees de Bruin,
24051 Martin Buchholz,
24052 Joe Buehler,
24053 Kevin Buhr,
24054 Alastair Burt,
24055 Joao Cachopo,
24056 Zlatko Calusic,
24057 Massimo Campostrini,
24058 Castor,
24059 David Charlap,
24060 Dan Christensen,
24061 Kevin Christian,
24062 Jae-you Chung, @c ?
24063 James H. Cloos, Jr.,
24064 Laura Conrad,
24065 Michael R. Cook,
24066 Glenn Coombs,
24067 Andrew J. Cosgriff,
24068 Neil Crellin,
24069 Frank D. Cringle,
24070 Geoffrey T. Dairiki,
24071 Andre Deparade,
24072 Ulrik Dickow,
24073 Dave Disser,
24074 Rui-Tao Dong, @c ?
24075 Joev Dubach,
24076 Michael Welsh Duggan,
24077 Dave Edmondson,
24078 Paul Eggert,
24079 Mark W. Eichin,
24080 Karl Eichwalder,
24081 Enami Tsugutomo, @c Enami
24082 Michael Ernst,
24083 Luc Van Eycken,
24084 Sam Falkner,
24085 Nelson Jose dos Santos Ferreira,
24086 Sigbjorn Finne,
24087 Sven Fischer,
24088 Paul Fisher,
24089 Decklin Foster,
24090 Gary D. Foster,
24091 Paul Franklin,
24092 Guy Geens,
24093 Arne Georg Gleditsch,
24094 David S. Goldberg,
24095 Michelangelo Grigni,
24096 Dale Hagglund,
24097 D. Hall,
24098 Magnus Hammerin,
24099 Kenichi Handa, @c Handa
24100 Raja R. Harinath,
24101 Yoshiki Hayashi, @c Hayashi
24102 P. E. Jareth Hein,
24103 Hisashige Kenji, @c Hisashige
24104 Scott Hofmann,
24105 Marc Horowitz,
24106 Gunnar Horrigmo,
24107 Richard Hoskins,
24108 Brad Howes,
24109 Miguel de Icaza,
24110 François Felix Ingrand,
24111 Tatsuya Ichikawa, @c Ichikawa
24112 Ishikawa Ichiro, @c Ishikawa
24113 Lee Iverson,
24114 Iwamuro Motonori, @c Iwamuro
24115 Rajappa Iyer,
24116 Andreas Jaeger,
24117 Adam P. Jenkins,
24118 Randell Jesup,
24119 Fred Johansen,
24120 Gareth Jones,
24121 Greg Klanderman,
24122 Karl Kleinpaste,
24123 Michael Klingbeil,
24124 Peter Skov Knudsen,
24125 Shuhei Kobayashi, @c Kobayashi
24126 Petr Konecny,
24127 Koseki Yoshinori, @c Koseki
24128 Thor Kristoffersen,
24129 Jens Lautenbacher,
24130 Martin Larose,
24131 Seokchan Lee, @c Lee
24132 Joerg Lenneis,
24133 Carsten Leonhardt,
24134 James LewisMoss,
24135 Christian Limpach,
24136 Markus Linnala,
24137 Dave Love,
24138 Mike McEwan,
24139 Tonny Madsen,
24140 Shlomo Mahlab,
24141 Nat Makarevitch,
24142 Istvan Marko,
24143 David Martin,
24144 Jason R. Mastaler,
24145 Gordon Matzigkeit,
24146 Timo Metzemakers,
24147 Richard Mlynarik,
24148 Lantz Moore,
24149 Morioka Tomohiko, @c Morioka
24150 Erik Toubro Nielsen,
24151 Hrvoje Niksic,
24152 Andy Norman,
24153 Fred Oberhauser,
24154 C. R. Oldham,
24155 Alexandre Oliva,
24156 Ken Olstad,
24157 Masaharu Onishi, @c Onishi
24158 Hideki Ono, @c Ono
24159 Ettore Perazzoli,
24160 William Perry,
24161 Stephen Peters,
24162 Jens-Ulrik Holger Petersen,
24163 Ulrich Pfeifer,
24164 Matt Pharr,
24165 Andy Piper,
24166 John McClary Prevost,
24167 Bill Pringlemeir,
24168 Mike Pullen,
24169 Jim Radford,
24170 Colin Rafferty,
24171 Lasse Rasinen,
24172 Lars Balker Rasmussen,
24173 Joe Reiss,
24174 Renaud Rioboo,
24175 Roland B. Roberts,
24176 Bart Robinson,
24177 Christian von Roques,
24178 Markus Rost,
24179 Jason Rumney,
24180 Wolfgang Rupprecht,
24181 Jay Sachs,
24182 Dewey M. Sasser,
24183 Conrad Sauerwald,
24184 Loren Schall,
24185 Dan Schmidt,
24186 Ralph Schleicher,
24187 Philippe Schnoebelen,
24188 Andreas Schwab,
24189 Randal L. Schwartz,
24190 Danny Siu,
24191 Matt Simmons,
24192 Paul D. Smith,
24193 Jeff Sparkes,
24194 Toby Speight,
24195 Michael Sperber,
24196 Darren Stalder,
24197 Richard Stallman,
24198 Greg Stark,
24199 Sam Steingold,
24200 Paul Stevenson,
24201 Jonas Steverud,
24202 Paul Stodghill,
24203 Kiyokazu Suto, @c Suto
24204 Kurt Swanson,
24205 Samuel Tardieu,
24206 Teddy,
24207 Chuck Thompson,
24208 Tozawa Akihiko, @c Tozawa
24209 Philippe Troin,
24210 James Troup,
24211 Trung Tran-Duc,
24212 Jack Twilley,
24213 Aaron M. Ucko,
24214 Aki Vehtari,
24215 Didier Verna,
24216 Vladimir Volovich,
24217 Jan Vroonhof,
24218 Stefan Waldherr,
24219 Pete Ware,
24220 Barry A. Warsaw,
24221 Christoph Wedler,
24222 Joe Wells,
24223 Lee Willis,
24224 and
24225 Lloyd Zusman.
24226
24227
24228 For a full overview of what each person has done, the ChangeLogs
24229 included in the Gnus alpha distributions should give ample reading
24230 (550kB and counting).
24231
24232 Apologies to everybody that I've forgotten, of which there are many, I'm
24233 sure.
24234
24235 Gee, that's quite a list of people.  I guess that must mean that there
24236 actually are people who are using Gnus.  Who'd'a thunk it!
24237
24238
24239 @node New Features
24240 @subsection New Features
24241 @cindex new features
24242
24243 @menu
24244 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24245 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24246 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24247 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24248 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24249 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24250 @end menu
24251
24252 These lists are, of course, just @emph{short} overviews of the
24253 @emph{most} important new features.  No, really.  There are tons more.
24254 Yes, we have feeping creaturism in full effect.
24255
24256 @node ding Gnus
24257 @subsubsection (ding) Gnus
24258
24259 New features in Gnus 5.0/5.1:
24260
24261 @itemize @bullet
24262
24263 @item
24264 The look of all buffers can be changed by setting format-like variables
24265 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24266
24267 @item
24268 Local spool and several @acronym{NNTP} servers can be used at once
24269 (@pxref{Select Methods}).
24270
24271 @item
24272 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24273
24274 @item
24275 You can read a number of different mail formats (@pxref{Getting Mail}).
24276 All the mail back ends implement a convenient mail expiry scheme
24277 (@pxref{Expiring Mail}).
24278
24279 @item
24280 Gnus can use various strategies for gathering threads that have lost
24281 their roots (thereby gathering loose sub-threads into one thread) or it
24282 can go back and retrieve enough headers to build a complete thread
24283 (@pxref{Customizing Threading}).
24284
24285 @item
24286 Killed groups can be displayed in the group buffer, and you can read
24287 them as well (@pxref{Listing Groups}).
24288
24289 @item
24290 Gnus can do partial group updates---you do not have to retrieve the
24291 entire active file just to check for new articles in a few groups
24292 (@pxref{The Active File}).
24293
24294 @item
24295 Gnus implements a sliding scale of subscribedness to groups
24296 (@pxref{Group Levels}).
24297
24298 @item
24299 You can score articles according to any number of criteria
24300 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24301 articles for you (@pxref{Adaptive Scoring}).
24302
24303 @item
24304 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24305 manner, so it should be difficult to lose much data on what you have
24306 read if your machine should go down (@pxref{Auto Save}).
24307
24308 @item
24309 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24310 cluttering up the @file{.emacs} file.
24311
24312 @item
24313 You can set the process mark on both groups and articles and perform
24314 operations on all the marked items (@pxref{Process/Prefix}).
24315
24316 @item
24317 You can grep through a subset of groups and create a group from the
24318 results (@pxref{Kibozed Groups}).
24319
24320 @item
24321 You can list subsets of groups according to, well, anything
24322 (@pxref{Listing Groups}).
24323
24324 @item
24325 You can browse foreign servers and subscribe to groups from those
24326 servers (@pxref{Browse Foreign Server}).
24327
24328 @item
24329 Gnus can fetch articles, asynchronously, on a second connection to the
24330 server (@pxref{Asynchronous Fetching}).
24331
24332 @item
24333 You can cache articles locally (@pxref{Article Caching}).
24334
24335 @item
24336 The uudecode functions have been expanded and generalized
24337 (@pxref{Decoding Articles}).
24338
24339 @item
24340 You can still post uuencoded articles, which was a little-known feature
24341 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24342
24343 @item
24344 Fetching parents (and other articles) now actually works without
24345 glitches (@pxref{Finding the Parent}).
24346
24347 @item
24348 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24349
24350 @item
24351 Digests (and other files) can be used as the basis for groups
24352 (@pxref{Document Groups}).
24353
24354 @item
24355 Articles can be highlighted and customized (@pxref{Customizing
24356 Articles}).
24357
24358 @item
24359 URLs and other external references can be buttonized (@pxref{Article
24360 Buttons}).
24361
24362 @item
24363 You can do lots of strange stuff with the Gnus window & frame
24364 configuration (@pxref{Window Layout}).
24365
24366 @item
24367 You can click on buttons instead of using the keyboard
24368 (@pxref{Buttons}).
24369
24370 @end itemize
24371
24372
24373 @node September Gnus
24374 @subsubsection September Gnus
24375
24376 @iftex
24377 @iflatex
24378 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24379 @end iflatex
24380 @end iftex
24381
24382 New features in Gnus 5.2/5.3:
24383
24384 @itemize @bullet
24385
24386 @item
24387 A new message composition mode is used.  All old customization variables
24388 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24389 now obsolete.
24390
24391 @item
24392 Gnus is now able to generate @dfn{sparse} threads---threads where
24393 missing articles are represented by empty nodes (@pxref{Customizing
24394 Threading}).
24395
24396 @lisp
24397 (setq gnus-build-sparse-threads 'some)
24398 @end lisp
24399
24400 @item
24401 Outgoing articles are stored on a special archive server
24402 (@pxref{Archived Messages}).
24403
24404 @item
24405 Partial thread regeneration now happens when articles are
24406 referred.
24407
24408 @item
24409 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24410
24411 @item
24412 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24413
24414 @item
24415 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24416
24417 @lisp
24418 (setq gnus-use-trees t)
24419 @end lisp
24420
24421 @item
24422 An @code{nn}-like pick-and-read minor mode is available for the summary
24423 buffers (@pxref{Pick and Read}).
24424
24425 @lisp
24426 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24427 @end lisp
24428
24429 @item
24430 In binary groups you can use a special binary minor mode (@pxref{Binary
24431 Groups}).
24432
24433 @item
24434 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24435 Topics}).
24436
24437 @lisp
24438 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24439 @end lisp
24440
24441 @item
24442 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24443
24444 @item
24445 Groups can now have a score, and bubbling based on entry frequency
24446 is possible (@pxref{Group Score}).
24447
24448 @lisp
24449 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24450 @end lisp
24451
24452 @item
24453 Groups can be process-marked, and commands can be performed on
24454 groups of groups (@pxref{Marking Groups}).
24455
24456 @item
24457 Caching is possible in virtual groups.
24458
24459 @item
24460 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24461 news batches, ClariNet briefs collections, and just about everything
24462 else (@pxref{Document Groups}).
24463
24464 @item
24465 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24466 (@pxref{SOUP}).
24467
24468 @item
24469 The Gnus cache is much faster.
24470
24471 @item
24472 Groups can be sorted according to many criteria (@pxref{Sorting
24473 Groups}).
24474
24475 @item
24476 New group parameters have been introduced to set list-addresses and
24477 expiry times (@pxref{Group Parameters}).
24478
24479 @item
24480 All formatting specs allow specifying faces to be used
24481 (@pxref{Formatting Fonts}).
24482
24483 @item
24484 There are several more commands for setting/removing/acting on process
24485 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24486
24487 @item
24488 The summary buffer can be limited to show parts of the available
24489 articles based on a wide range of criteria.  These commands have been
24490 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24491
24492 @item
24493 Articles can be made persistent with the @kbd{*} command
24494 (@pxref{Persistent Articles}).
24495
24496 @item
24497 All functions for hiding article elements are now toggles.
24498
24499 @item
24500 Article headers can be buttonized (@pxref{Article Washing}).
24501
24502 @item
24503 All mail back ends support fetching articles by @code{Message-ID}.
24504
24505 @item
24506 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24507
24508 @item
24509 All summary mode commands are available directly from the article
24510 buffer (@pxref{Article Keymap}).
24511
24512 @item
24513 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24514 Layout}).
24515
24516 @item
24517 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24518 @iftex
24519 @iflatex
24520 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24521 @end iflatex
24522 @end iftex
24523
24524 @item
24525 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24526
24527 @lisp
24528 (setq gnus-use-nocem t)
24529 @end lisp
24530
24531 @item
24532 Groups can be made permanently visible (@pxref{Listing Groups}).
24533
24534 @lisp
24535 (setq gnus-permanently-visible-groups "^nnml:")
24536 @end lisp
24537
24538 @item
24539 Many new hooks have been introduced to make customizing easier.
24540
24541 @item
24542 Gnus respects the @code{Mail-Copies-To} header.
24543
24544 @item
24545 Threads can be gathered by looking at the @code{References} header
24546 (@pxref{Customizing Threading}).
24547
24548 @lisp
24549 (setq gnus-summary-thread-gathering-function
24550       'gnus-gather-threads-by-references)
24551 @end lisp
24552
24553 @item
24554 Read articles can be stored in a special backlog buffer to avoid
24555 refetching (@pxref{Article Backlog}).
24556
24557 @lisp
24558 (setq gnus-keep-backlog 50)
24559 @end lisp
24560
24561 @item
24562 A clean copy of the current article is always stored in a separate
24563 buffer to allow easier treatment.
24564
24565 @item
24566 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24567
24568 @item
24569 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24570 Articles}).
24571
24572 @lisp
24573 (setq gnus-prompt-before-saving t)
24574 @end lisp
24575
24576 @item
24577 @code{gnus-uu} can view decoded files asynchronously while fetching
24578 articles (@pxref{Other Decode Variables}).
24579
24580 @lisp
24581 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24582 @end lisp
24583
24584 @item
24585 Filling in the article buffer now works properly on cited text
24586 (@pxref{Article Washing}).
24587
24588 @item
24589 Hiding cited text adds buttons to toggle hiding, and how much
24590 cited text to hide is now customizable (@pxref{Article Hiding}).
24591
24592 @lisp
24593 (setq gnus-cited-lines-visible 2)
24594 @end lisp
24595
24596 @item
24597 Boring headers can be hidden (@pxref{Article Hiding}).
24598
24599 @item
24600 Default scoring values can now be set from the menu bar.
24601
24602 @item
24603 Further syntax checking of outgoing articles have been added.
24604
24605 @end itemize
24606
24607
24608 @node Red Gnus
24609 @subsubsection Red Gnus
24610
24611 New features in Gnus 5.4/5.5:
24612
24613 @iftex
24614 @iflatex
24615 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24616 @end iflatex
24617 @end iftex
24618
24619 @itemize @bullet
24620
24621 @item
24622 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24623
24624 @item
24625 Article prefetching functionality has been moved up into
24626 Gnus (@pxref{Asynchronous Fetching}).
24627
24628 @item
24629 Scoring can now be performed with logical operators like @code{and},
24630 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24631 Scoring}).
24632
24633 @item
24634 Article washing status can be displayed in the
24635 article mode line (@pxref{Misc Article}).
24636
24637 @item
24638 @file{gnus.el} has been split into many smaller files.
24639
24640 @item
24641 Suppression of duplicate articles based on Message-ID can be done
24642 (@pxref{Duplicate Suppression}).
24643
24644 @lisp
24645 (setq gnus-suppress-duplicates t)
24646 @end lisp
24647
24648 @item
24649 New variables for specifying what score and adapt files are to be
24650 considered home score and adapt files (@pxref{Home Score File}) have
24651 been added.
24652
24653 @item
24654 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24655 Server Internals}).
24656
24657 @item
24658 Groups can inherit group parameters from parent topics (@pxref{Topic
24659 Parameters}).
24660
24661 @item
24662 Article editing has been revamped and is now actually usable.
24663
24664 @item
24665 Signatures can be recognized in more intelligent fashions
24666 (@pxref{Article Signature}).
24667
24668 @item
24669 Summary pick mode has been made to look more @code{nn}-like.  Line
24670 numbers are displayed and the @kbd{.} command can be used to pick
24671 articles (@code{Pick and Read}).
24672
24673 @item
24674 Commands for moving the @file{.newsrc.eld} from one server to
24675 another have been added (@pxref{Changing Servers}).
24676
24677 @item
24678 There's a way now to specify that ``uninteresting'' fields be suppressed
24679 when generating lines in buffers (@pxref{Advanced Formatting}).
24680
24681 @item
24682 Several commands in the group buffer can be undone with @kbd{C-M-_}
24683 (@pxref{Undo}).
24684
24685 @item
24686 Scoring can be done on words using the new score type @code{w}
24687 (@pxref{Score File Format}).
24688
24689 @item
24690 Adaptive scoring can be done on a Subject word-by-word basis
24691 (@pxref{Adaptive Scoring}).
24692
24693 @lisp
24694 (setq gnus-use-adaptive-scoring '(word))
24695 @end lisp
24696
24697 @item
24698 Scores can be decayed (@pxref{Score Decays}).
24699
24700 @lisp
24701 (setq gnus-decay-scores t)
24702 @end lisp
24703
24704 @item
24705 Scoring can be performed using a regexp on the Date header.  The Date is
24706 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24707
24708 @item
24709 A new command has been added to remove all data on articles from
24710 the native server (@pxref{Changing Servers}).
24711
24712 @item
24713 A new command for reading collections of documents
24714 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24715 (@pxref{Really Various Summary Commands}).
24716
24717 @item
24718 Process mark sets can be pushed and popped (@pxref{Setting Process
24719 Marks}).
24720
24721 @item
24722 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24723 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24724
24725 @item
24726 A new back end for reading searches from Web search engines
24727 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24728 (@pxref{Web Searches}).
24729
24730 @item
24731 Groups inside topics can now be sorted using the standard sorting
24732 functions, and each topic can be sorted independently (@pxref{Topic
24733 Sorting}).
24734
24735 @item
24736 Subsets of the groups can be sorted independently (@code{Sorting
24737 Groups}).
24738
24739 @item
24740 Cached articles can be pulled into the groups (@pxref{Summary Generation
24741 Commands}).
24742 @iftex
24743 @iflatex
24744 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24745 @end iflatex
24746 @end iftex
24747
24748 @item
24749 Score files are now applied in a more reliable order (@pxref{Score
24750 Variables}).
24751
24752 @item
24753 Reports on where mail messages end up can be generated (@pxref{Splitting
24754 Mail}).
24755
24756 @item
24757 More hooks and functions have been added to remove junk from incoming
24758 mail before saving the mail (@pxref{Washing Mail}).
24759
24760 @item
24761 Emphasized text can be properly fontisized:
24762
24763 @end itemize
24764
24765
24766 @node Quassia Gnus
24767 @subsubsection Quassia Gnus
24768
24769 New features in Gnus 5.6:
24770
24771 @itemize @bullet
24772
24773 @item
24774 New functionality for using Gnus as an offline newsreader has been
24775 added.  A plethora of new commands and modes have been added.
24776 @xref{Gnus Unplugged}, for the full story.
24777
24778 @item
24779 The @code{nndraft} back end has returned, but works differently than
24780 before.  All Message buffers are now also articles in the @code{nndraft}
24781 group, which is created automatically.
24782
24783 @item
24784 @code{gnus-alter-header-function} can now be used to alter header
24785 values.
24786
24787 @item
24788 @code{gnus-summary-goto-article} now accept Message-ID's.
24789
24790 @item
24791 A new Message command for deleting text in the body of a message
24792 outside the region: @kbd{C-c C-v}.
24793
24794 @item
24795 You can now post to component group in @code{nnvirtual} groups with
24796 @kbd{C-u C-c C-c}.
24797
24798 @item
24799  @code{nntp-rlogin-program}---new variable to ease customization.
24800
24801 @item
24802 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24803 re-highlighting of the article buffer.
24804
24805 @item
24806 New element in @code{gnus-boring-article-headers}---@code{long-to}.
24807
24808 @item
24809 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
24810 details.
24811
24812 @item
24813 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24814 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24815
24816 @item
24817 @code{gnus-simplify-subject-functions} variable to allow greater
24818 control over simplification.
24819
24820 @item
24821 @kbd{A T}---new command for fetching the current thread.
24822
24823 @item
24824 @kbd{/ T}---new command for including the current thread in the
24825 limit.
24826
24827 @item
24828 @kbd{M-RET} is a new Message command for breaking cited text.
24829
24830 @item
24831 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24832
24833 @item
24834 The @code{custom-face-lookup} function has been removed.
24835 If you used this function in your initialization files, you must
24836 rewrite them to use @code{face-spec-set} instead.
24837
24838 @item
24839 Canceling now uses the current select method.  Symbolic prefix
24840 @kbd{a} forces normal posting method.
24841
24842 @item
24843 New command to translate M******** sm*rtq**t*s into proper
24844 text---@kbd{W d}.
24845
24846 @item
24847 For easier debugging of @code{nntp}, you can set
24848 @code{nntp-record-commands} to a non-@code{nil} value.
24849
24850 @item
24851 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24852 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24853
24854 @item
24855 A command for editing group parameters from the summary buffer
24856 has been added.
24857
24858 @item
24859 A history of where mails have been split is available.
24860
24861 @item
24862 A new article date command has been added---@code{article-date-iso8601}.
24863
24864 @item
24865 Subjects can be simplified when threading by setting
24866 @code{gnus-score-thread-simplify}.
24867
24868 @item
24869 A new function for citing in Message has been
24870 added---@code{message-cite-original-without-signature}.
24871
24872 @item
24873 @code{article-strip-all-blank-lines}---new article command.
24874
24875 @item
24876 A new Message command to kill to the end of the article has
24877 been added.
24878
24879 @item
24880 A minimum adaptive score can be specified by using the
24881 @code{gnus-adaptive-word-minimum} variable.
24882
24883 @item
24884 The ``lapsed date'' article header can be kept continually
24885 updated by the @code{gnus-start-date-timer} command.
24886
24887 @item
24888 Web listserv archives can be read with the @code{nnlistserv} back end.
24889
24890 @item
24891 Old dejanews archives can now be read by @code{nnweb}.
24892
24893 @end itemize
24894
24895 @node Pterodactyl Gnus
24896 @subsubsection Pterodactyl Gnus
24897
24898 New features in Gnus 5.8:
24899
24900 @itemize @bullet
24901
24902 @item
24903 The mail-fetching functions have changed.  See the manual for the
24904 many details.  In particular, all procmail fetching variables are gone.
24905
24906 If you used procmail like in
24907
24908 @lisp
24909 (setq nnmail-use-procmail t)
24910 (setq nnmail-spool-file 'procmail)
24911 (setq nnmail-procmail-directory "~/mail/incoming/")
24912 (setq nnmail-procmail-suffix "\\.in")
24913 @end lisp
24914
24915 this now has changed to
24916
24917 @lisp
24918 (setq mail-sources
24919       '((directory :path "~/mail/incoming/"
24920                    :suffix ".in")))
24921 @end lisp
24922
24923 @xref{Mail Source Specifiers}.
24924
24925 @item
24926 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24927 Gnus, and adds a slew of new commands.  See the manual for details.
24928
24929 @item
24930 Gnus has also been multilingualized.  This also affects too
24931 many parts of Gnus to summarize here, and adds many new variables.
24932
24933 @item
24934 @code{gnus-auto-select-first} can now be a function to be
24935 called to position point.
24936
24937 @item
24938 The user can now decide which extra headers should be included in
24939 summary buffers and @acronym{NOV} files.
24940
24941 @item
24942 @code{gnus-article-display-hook} has been removed.  Instead, a number
24943 of variables starting with @code{gnus-treat-} have been added.
24944
24945 @item
24946 The Gnus posting styles have been redone again and now works in a
24947 subtly different manner.
24948
24949 @item
24950 New web-based back ends have been added: @code{nnslashdot},
24951 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24952 again, to keep up with ever-changing layouts.
24953
24954 @item
24955 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24956
24957 @end itemize
24958
24959 @node Oort Gnus
24960 @subsubsection Oort Gnus
24961 @cindex Oort Gnus
24962
24963 New features in Gnus 5.10:
24964
24965 @itemize @bullet
24966
24967 @item
24968 The revised Gnus @acronym{FAQ} is included in the manual,
24969 @xref{Frequently Asked Questions}.
24970
24971 @item
24972 Upgrading from previous (stable) version if you have used Oort.
24973
24974 If you have tried Oort (the unstable Gnus branch leading to this
24975 release) but went back to a stable version, be careful when upgrading to
24976 this version.  In particular, you will probably want to remove all
24977 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24978 read from your @file{.newsrc.eld} instead of from the
24979 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24980 later entry for more information about marks.  Note that downgrading
24981 isn't save in general.
24982
24983 @item
24984 Article Buttons
24985
24986 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24987 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24988 variables @code{gnus-button-@var{*}-level} can be used to control the
24989 appearance of all article buttons.  @xref{Article Button Levels}.
24990
24991 @item
24992 Dired integration
24993
24994 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24995 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
24996 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24997 (@kbd{C-c P}).  It is enabled with
24998 @lisp
24999 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
25000 @end lisp
25001
25002 @item
25003 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25004
25005 @item
25006 Single-part yenc encoded attachments can be decoded.
25007
25008 @item
25009 Picons
25010
25011 The picons code has been reimplemented to work in GNU Emacs---some of
25012 the previous options have been removed or renamed.
25013
25014 Picons are small ``personal icons'' representing users, domain and
25015 newsgroups, which can be displayed in the Article buffer.
25016 @xref{Picons}.
25017
25018 @item
25019 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25020 boundary line is drawn at the end of the headers.
25021
25022 @item
25023 Retrieval of charters and control messages
25024
25025 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25026 control messages (@kbd{H C}).
25027
25028 @item
25029 Delayed articles
25030
25031 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25032 buffer.  The messages are delivered at specified time.  This is useful
25033 for sending yourself reminders.  @xref{Delayed Articles}.
25034
25035 @item
25036 If @code{auto-compression-mode} is enabled, attachments are automatically
25037 decompressed when activated.
25038
25039 @item
25040 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25041 the nnml back end allows compressed message files.
25042
25043 @item
25044 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25045
25046 @item
25047 The Summary Buffer uses an arrow in the fringe to indicate the current
25048 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25049
25050 @item
25051 Warn about email replies to news
25052
25053 Do you often find yourself replying to news by email by mistake?  Then
25054 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25055 you.
25056
25057 @item
25058 If the new option @code{gnus-summary-display-while-building} is
25059 non-@code{nil}, the summary buffer is shown and updated as it's being
25060 built.
25061
25062 @item
25063 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25064 opposed to old but unread messages).
25065
25066 @item
25067 The new option @code{gnus-gcc-mark-as-read} automatically marks
25068 Gcc articles as read.
25069
25070 @item
25071 The nndoc back end now supports mailman digests and exim bounces.
25072
25073 @item
25074 Gnus supports RFC 2369 mailing list headers, and adds a number of
25075 related commands in mailing list groups.  @xref{Mailing List}.
25076
25077 @item
25078 The Date header can be displayed in a format that can be read aloud
25079 in English.  @xref{Article Date}.
25080
25081 @item
25082 The envelope sender address can be customized when using Sendmail.
25083 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25084
25085 @item
25086 diffs are automatically highlighted in groups matching
25087 @code{mm-uu-diff-groups-regexp}
25088
25089 @item
25090 @acronym{TLS} wrapper shipped with Gnus
25091
25092 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25093 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25094 @acronym{TLS}/@acronym{SSL} support via (external third party)
25095 @file{ssl.el} and OpenSSL still works.
25096
25097 @item
25098 New @file{make.bat} for compiling and installing Gnus under MS Windows
25099
25100 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25101 first argument to the batch-program should be the directory where
25102 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25103 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25104 the second parameter.
25105
25106 @file{make.bat} has been rewritten from scratch, it now features
25107 automatic recognition of XEmacs and GNU Emacs, generates
25108 @file{gnus-load.el}, checks if errors occur while compilation and
25109 generation of info files and reports them at the end of the build
25110 process.  It now uses @code{makeinfo} if it is available and falls
25111 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25112 install all files which are necessary to run Gnus and be generally a
25113 complete replacement for the @code{configure; make; make install}
25114 cycle used under Unix systems.
25115
25116 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25117 been removed.
25118
25119 @item
25120 Support for non-@acronym{ASCII} domain names
25121
25122 Message supports non-@acronym{ASCII} domain names in From:, To: and
25123 Cc: and will query you whether to perform encoding when you try to
25124 send a message.  The variable @code{message-use-idna} controls this.
25125 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25126 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25127 controls this.
25128
25129 @item
25130 Better handling of Microsoft citation styles
25131
25132 Gnus now tries to recognize the mangled header block that some Microsoft
25133 mailers use to indicate that the rest of the message is a citation, even
25134 though it is not quoted in any way.  The variable
25135 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25136 citations.
25137
25138 @item
25139 @code{gnus-article-skip-boring}
25140
25141 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25142 not scroll down to show you a page that contains only boring text,
25143 which by default means cited text and signature.  You can customize
25144 what is skippable using @code{gnus-article-boring-faces}.
25145
25146 This feature is especially useful if you read many articles that
25147 consist of a little new content at the top with a long, untrimmed
25148 message cited below.
25149
25150 @item
25151 The format spec @code{%C} for positioning point has changed to @code{%*}.
25152
25153 @item
25154 The new variable @code{gnus-parameters} can be used to set group parameters.
25155
25156 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25157 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25158 enjoy the powers of customize, and simplified backups since you set the
25159 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25160 variable maps regular expressions matching group names to group
25161 parameters, a'la:
25162 @lisp
25163 (setq gnus-parameters
25164       '(("mail\\..*"
25165          (gnus-show-threads nil)
25166          (gnus-use-scoring nil))
25167         ("^nnimap:\\(foo.bar\\)$"
25168          (to-group . "\\1"))))
25169 @end lisp
25170
25171 @item
25172 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25173
25174 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25175 disable it.
25176
25177 @item
25178 Gnus no longer generate the Sender: header automatically.
25179
25180 Earlier it was generated iff the user configurable email address was
25181 different from the Gnus guessed default user address.  As the guessing
25182 algorithm is rarely correct these days, and (more controversially) the
25183 only use of the Sender: header was to check if you are entitled to
25184 cancel/supersede news (which is now solved by Cancel Locks instead,
25185 see another entry), generation of the header has been disabled by
25186 default.  See the variables @code{message-required-headers},
25187 @code{message-required-news-headers}, and
25188 @code{message-required-mail-headers}.
25189
25190 @item
25191 Features from third party @file{message-utils.el} added to @file{message.el}.
25192
25193 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25194 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25195 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25196 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25197 appropriate headers and a note in the body for cross-postings and
25198 followups (see the variables @code{message-cross-post-@var{*}}).
25199
25200 @item
25201 References and X-Draft-Headers are no longer generated when you start
25202 composing messages and @code{message-generate-headers-first} is
25203 @code{nil}.
25204
25205 @item
25206 Improved anti-spam features.
25207
25208 Gnus is now able to take out spam from your mail and news streams
25209 using a wide variety of programs and filter rules.  Among the supported
25210 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25211 for easy use of external packages such as SpamAssassin and Hashcash
25212 are also new.  @xref{Thwarting Email Spam}.
25213
25214 @item
25215 Easy inclusion of X-Faces headers.
25216
25217 @item
25218 Face headers handling.
25219
25220 @item
25221 In the summary buffer, the new command @kbd{/ N} inserts new messages
25222 and @kbd{/ o} inserts old messages.
25223
25224 @item
25225 Gnus decodes morse encoded messages if you press @kbd{W m}.
25226
25227 @item
25228 Unread count correct in nnimap groups.
25229
25230 The estimated number of unread articles in the group buffer should now
25231 be correct for nnimap groups.  This is achieved by calling
25232 @code{nnimap-fixup-unread-after-getting-new-news} from the
25233 @code{gnus-setup-news-hook} (called on startup) and
25234 @code{gnus-after-getting-new-news-hook}. (called after getting new
25235 mail).  If you have modified those variables from the default, you may
25236 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25237 you were happy with the estimate and want to save some (minimal) time
25238 when getting new mail, remove the function.
25239
25240 @item
25241 Group Carbon Copy (GCC) quoting
25242
25243 To support groups that contains SPC and other weird characters, groups
25244 are quoted before they are placed in the Gcc: header.  This means
25245 variables such as @code{gnus-message-archive-group} should no longer
25246 contain quote characters to make groups containing SPC work.  Also, if
25247 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25248 into two groups) you must change it to return the list
25249 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25250 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25251 was incorrect earlier, it just didn't generate any problems since it
25252 was inserted directly.
25253
25254 @item
25255 @file{~/News/overview/} not used.
25256
25257 As a result of the following change, the @file{~/News/overview/}
25258 directory is not used any more.  You can safely delete the entire
25259 hierarchy.
25260
25261 @item
25262 @code{gnus-agent}
25263
25264 The Gnus Agent has seen a major updated and is now enabled by default,
25265 and all nntp and nnimap servers from @code{gnus-select-method} and
25266 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25267 only the server in @code{gnus-select-method} was agentized by the
25268 default, and the agent was disabled by default.  When the agent is
25269 enabled, headers are now also retrieved from the Agent cache instead
25270 of the back ends when possible.  Earlier this only happened in the
25271 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25272 @kbd{J r} in the server buffer.  Gnus will not download articles into
25273 the Agent cache, unless you instruct it to do so, though, by using
25274 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25275 behaviour of having the Agent disabled with @code{(setq gnus-agent
25276 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25277 is not needed any more.
25278
25279 @item
25280 @code{gnus-summary-line-format}
25281
25282 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25283 %s\n}.  Moreover @code{gnus-extra-headers},
25284 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25285 changed their default so that the users name will be replaced by the
25286 recipient's name or the group name posting to for @acronym{NNTP}
25287 groups.
25288
25289 @item
25290 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25291
25292 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25293 broken Outlook (Express) articles.
25294
25295 @item
25296 @code{(require 'gnus-load)}
25297
25298 If you use a stand-alone Gnus distribution, you'd better add
25299 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25300 lisp directory into load-path.
25301
25302 File @file{gnus-load.el} contains autoload commands, functions and variables,
25303 some of which may not be included in distributions of Emacsen.
25304
25305 @item
25306 @code{gnus-slave-unplugged}
25307
25308 A new command which starts Gnus offline in slave mode.
25309
25310 @item
25311 @code{message-insinuate-rmail}
25312
25313 Adding @code{(message-insinuate-rmail)} and @code{(setq
25314 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25315 compose, reply and forward messages in message-mode, where you can
25316 enjoy the power of @acronym{MML}.
25317
25318 @item
25319 @code{message-minibuffer-local-map}
25320
25321 The line below enables BBDB in resending a message:
25322 @lisp
25323 (define-key message-minibuffer-local-map [(tab)]
25324   'bbdb-complete-name)
25325 @end lisp
25326
25327 @item
25328 Externalizing and deleting of attachments.
25329
25330 If @code{gnus-gcc-externalize-attachments} or
25331 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25332 local files as external parts.
25333
25334 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25335 on @acronym{MIME} buttons) saves a part and replaces the part with an
25336 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25337 @acronym{MIME} buttons) removes a part.  It works only on back ends
25338 that support editing.
25339
25340 @item
25341 @code{gnus-default-charset}
25342
25343 The default value is determined from the
25344 @code{current-language-environment} variable, instead of
25345 @code{iso-8859-1}.  Also the @samp{.*} item in
25346 @code{gnus-group-charset-alist} is removed.
25347
25348 @item
25349 @code{gnus-posting-styles}
25350
25351 Add a new format of match like
25352 @lisp
25353 ((header "to" "larsi.*org")
25354  (Organization "Somewhere, Inc."))
25355 @end lisp
25356 The old format like the lines below is obsolete, but still accepted.
25357 @lisp
25358 (header "to" "larsi.*org"
25359         (Organization "Somewhere, Inc."))
25360 @end lisp
25361
25362 @item
25363 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25364
25365 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25366 added into these two variables.  If you customized those, perhaps you
25367 need add those two headers too.
25368
25369 @item
25370 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25371
25372 If one reads an article while plugged, and the article already exists
25373 in the Agent, it won't get downloaded once more.  @code{(setq
25374 gnus-agent-cache nil)} reverts to the old behavior.
25375
25376 @item
25377 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25378 composing messages, it is enabled by @code{use-hard-newlines}.
25379 Decoding format=flowed was present but not documented in earlier
25380 versions.
25381
25382 @item
25383 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25384
25385 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25386
25387 @item
25388 Gnus supports Maildir groups.
25389
25390 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25391
25392 @item
25393 Printing capabilities are enhanced.
25394
25395 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25396 Article buffers.  Also, each individual @acronym{MIME} part can be
25397 printed using @kbd{p} on the @acronym{MIME} button.
25398
25399 @item
25400 Message supports the Importance: (RFC 2156) header.
25401
25402 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25403 the valid values.
25404
25405 @item
25406 Gnus supports Cancel Locks in News.
25407
25408 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25409 used to determine if you wrote an article or not (for cancelling and
25410 superseding).  Gnus generates a random password string the first time
25411 you post a message, and saves it in your @file{~/.emacs} using the Custom
25412 system.  While the variable is called @code{canlock-password}, it is not
25413 security sensitive data.  Publishing your canlock string on the web
25414 will not allow anyone to be able to anything she could not already do.
25415 The behaviour can be changed by customizing @code{message-insert-canlock}.
25416
25417 @item
25418 Gnus supports server-side mail filtering using Sieve.
25419
25420 Sieve rules can be added as Group Parameters for groups, and the
25421 complete Sieve script is generated using @kbd{D g} from the Group
25422 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25423 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25424 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25425
25426 @item
25427 Extended format specs.
25428
25429 Format spec @samp{%&user-date;} is added into
25430 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25431 format specs are supported.  The extended format specs look like
25432 @samp{%u&foo;}, which invokes function
25433 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25434 escape character, old user defined format @samp{%u&} is no longer supported.
25435
25436 @item
25437 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25438
25439 It was aliased to @kbd{Y c}
25440 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25441 out other articles.
25442
25443 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25444
25445 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25446 s}, @kbd{/ a}, and @kbd{/ x}
25447 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25448 result will be to display all articles that do not match the expression.
25449
25450 @item
25451 Group names are treated as UTF-8 by default.
25452
25453 This is supposedly what USEFOR wanted to migrate to.  See
25454 @code{gnus-group-name-charset-group-alist} and
25455 @code{gnus-group-name-charset-method-alist} for customization.
25456
25457 @item
25458 The nnml and nnfolder back ends store marks for each groups.
25459
25460 This makes it possible to take backup of nnml/nnfolder servers/groups
25461 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25462 makes it possible to share articles and marks between users (without
25463 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25464 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25465 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25466 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25467 another machine, Gnus will automatically use the @file{.marks} or
25468 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25469 The new server variables @code{nnml-marks-is-evil} and
25470 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25471
25472 @item
25473 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25474 been renamed to ``Gnus''.
25475
25476 @item
25477 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25478 renamed to ``Attachments''.  Note that this menu also contains security
25479 related stuff, like signing and encryption (@pxref{Security, Security,,
25480 message, Message Manual}).
25481
25482 @item
25483 @code{gnus-group-charset-alist} and
25484 @code{gnus-group-ignored-charsets-alist}.
25485
25486 The regexps in these variables are compared with full group names
25487 instead of real group names in 5.8.  Users who customize these
25488 variables should change those regexps accordingly.  For example:
25489 @lisp
25490 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25491 @end lisp
25492
25493 @item
25494 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25495 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25496
25497 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25498 additional Lisp libraries.  This add several menu items to the
25499 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25500 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25501
25502 @item
25503 Gnus inlines external parts (message/external).
25504
25505 @item
25506 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25507 C-m}.
25508
25509 This change was made to avoid conflict with the standard binding of
25510 @code{back-to-indentation}, which is also useful in message mode.
25511 @end itemize
25512
25513 @iftex
25514
25515 @page
25516 @node The Manual
25517 @section The Manual
25518 @cindex colophon
25519 @cindex manual
25520
25521 This manual was generated from a TeXinfo file and then run through
25522 either @code{texi2dvi}
25523 @iflatex
25524 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25525 and then run through @code{latex} and @code{dvips}
25526 @end iflatex
25527 to get what you hold in your hands now.
25528
25529 The following conventions have been used:
25530
25531 @enumerate
25532
25533 @item
25534 This is a @samp{string}
25535
25536 @item
25537 This is a @kbd{keystroke}
25538
25539 @item
25540 This is a @file{file}
25541
25542 @item
25543 This is a @code{symbol}
25544
25545 @end enumerate
25546
25547 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25548 mean:
25549
25550 @lisp
25551 (setq flargnoze "yes")
25552 @end lisp
25553
25554 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25555
25556 @lisp
25557 (setq flumphel 'yes)
25558 @end lisp
25559
25560 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25561 ever get them confused.
25562
25563 @iflatex
25564 @c @head
25565 Of course, everything in this manual is of vital interest, so you should
25566 read it all.  Several times.  However, if you feel like skimming the
25567 manual, look for that gnu head you should see in the margin over
25568 there---it means that what's being discussed is of more importance than
25569 the rest of the stuff.  (On the other hand, if everything is infinitely
25570 important, how can anything be more important than that?  Just one more
25571 of the mysteries of this world, I guess.)
25572 @end iflatex
25573
25574 @end iftex
25575
25576
25577 @node On Writing Manuals
25578 @section On Writing Manuals
25579
25580 I guess most manuals are written after-the-fact; documenting a program
25581 that's already there.  This is not how this manual is written.  When
25582 implementing something, I write the manual entry for that something
25583 straight away.  I then see that it's difficult to explain the
25584 functionality, so I write how it's supposed to be, and then I change the
25585 implementation.  Writing the documentation and writing the code goes
25586 hand in hand.
25587
25588 This, of course, means that this manual has no, or little, flow.  It
25589 documents absolutely everything in Gnus, but often not where you're
25590 looking for it.  It is a reference manual, and not a guide to how to get
25591 started with Gnus.
25592
25593 That would be a totally different book, that should be written using the
25594 reference manual as source material.  It would look quite differently.
25595
25596
25597 @page
25598 @node Terminology
25599 @section Terminology
25600
25601 @cindex terminology
25602 @table @dfn
25603
25604 @item news
25605 @cindex news
25606 This is what you are supposed to use this thing for---reading news.
25607 News is generally fetched from a nearby @acronym{NNTP} server, and is
25608 generally publicly available to everybody.  If you post news, the entire
25609 world is likely to read just what you have written, and they'll all
25610 snigger mischievously.  Behind your back.
25611
25612 @item mail
25613 @cindex mail
25614 Everything that's delivered to you personally is mail.  Some news/mail
25615 readers (like Gnus) blur the distinction between mail and news, but
25616 there is a difference.  Mail is private.  News is public.  Mailing is
25617 not posting, and replying is not following up.
25618
25619 @item reply
25620 @cindex reply
25621 Send a mail to the person who has written what you are reading.
25622
25623 @item follow up
25624 @cindex follow up
25625 Post an article to the current newsgroup responding to the article you
25626 are reading.
25627
25628 @item back end
25629 @cindex back end
25630 Gnus considers mail and news to be mostly the same, really.  The only
25631 difference is how to access the actual articles.  News articles are
25632 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25633 messages could be read from a file on the local disk.  The internal
25634 architecture of Gnus thus comprises a ``front end'' and a number of
25635 ``back ends''.  Internally, when you enter a group (by hitting
25636 @key{RET}, say), you thereby invoke a function in the front end in
25637 Gnus.  The front end then ``talks'' to a back end and says things like
25638 ``Give me the list of articles in the foo group'' or ``Show me article
25639 number 4711''.
25640
25641 So a back end mainly defines either a protocol (the @code{nntp} back
25642 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25643 accesses mail via @acronym{IMAP}) or a file format and directory
25644 layout (the @code{nnspool} back end accesses news via the common
25645 ``spool directory'' format, the @code{nnml} back end access mail via a
25646 file format and directory layout that's quite similar).
25647
25648 Gnus does not handle the underlying media, so to speak---this is all
25649 done by the back ends.  A back end is a collection of functions to
25650 access the articles.
25651
25652 However, sometimes the term ``back end'' is also used where ``server''
25653 would have been more appropriate.  And then there is the term ``select
25654 method'' which can mean either.  The Gnus terminology can be quite
25655 confusing.
25656
25657 @item native
25658 @cindex native
25659 Gnus will always use one method (and back end) as the @dfn{native}, or
25660 default, way of getting news.
25661
25662 @item foreign
25663 @cindex foreign
25664 You can also have any number of foreign groups active at the same time.
25665 These are groups that use non-native non-secondary back ends for getting
25666 news.
25667
25668 @item secondary
25669 @cindex secondary
25670 Secondary back ends are somewhere half-way between being native and being
25671 foreign, but they mostly act like they are native.
25672
25673 @item article
25674 @cindex article
25675 A message that has been posted as news.
25676
25677 @item mail message
25678 @cindex mail message
25679 A message that has been mailed.
25680
25681 @item message
25682 @cindex message
25683 A mail message or news article
25684
25685 @item head
25686 @cindex head
25687 The top part of a message, where administrative information (etc.) is
25688 put.
25689
25690 @item body
25691 @cindex body
25692 The rest of an article.  Everything not in the head is in the
25693 body.
25694
25695 @item header
25696 @cindex header
25697 A line from the head of an article.
25698
25699 @item headers
25700 @cindex headers
25701 A collection of such lines, or a collection of heads.  Or even a
25702 collection of @acronym{NOV} lines.
25703
25704 @item @acronym{NOV}
25705 @cindex @acronym{NOV}
25706 When Gnus enters a group, it asks the back end for the headers of all
25707 unread articles in the group.  Most servers support the News OverView
25708 format, which is more compact and much faster to read and parse than the
25709 normal @sc{head} format.
25710
25711 @item level
25712 @cindex levels
25713 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25714 that have a lower level are ``more'' subscribed than the groups with a
25715 higher level.  In fact, groups on levels 1-5 are considered
25716 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25717 are @dfn{killed}.  Commands for listing groups and scanning for new
25718 articles will all use the numeric prefix as @dfn{working level}.
25719
25720 @item killed groups
25721 @cindex killed groups
25722 No information on killed groups is stored or updated, which makes killed
25723 groups much easier to handle than subscribed groups.
25724
25725 @item zombie groups
25726 @cindex zombie groups
25727 Just like killed groups, only slightly less dead.
25728
25729 @item active file
25730 @cindex active file
25731 The news server has to keep track of what articles it carries, and what
25732 groups exist.  All this information in stored in the active file, which
25733 is rather large, as you might surmise.
25734
25735 @item bogus groups
25736 @cindex bogus groups
25737 A group that exists in the @file{.newsrc} file, but isn't known to the
25738 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25739 This means that the group probably doesn't exist (any more).
25740
25741 @item activating
25742 @cindex activating groups
25743 The act of asking the server for info on a group and computing the
25744 number of unread articles is called @dfn{activating the group}.
25745 Un-activated groups are listed with @samp{*} in the group buffer.
25746
25747 @item server
25748 @cindex server
25749 A machine one can connect to and get news (or mail) from.
25750
25751 @item select method
25752 @cindex select method
25753 A structure that specifies the back end, the server and the virtual
25754 server settings.
25755
25756 @item virtual server
25757 @cindex virtual server
25758 A named select method.  Since a select method defines all there is to
25759 know about connecting to a (physical) server, taking the thing as a
25760 whole is a virtual server.
25761
25762 @item washing
25763 @cindex washing
25764 Taking a buffer and running it through a filter of some sort.  The
25765 result will (more often than not) be cleaner and more pleasing than the
25766 original.
25767
25768 @item ephemeral groups
25769 @cindex ephemeral groups
25770 @cindex temporary groups
25771 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25772 groups are groups that will have no data stored---when you exit the
25773 group, it'll disappear into the aether.
25774
25775 @item solid groups
25776 @cindex solid groups
25777 This is the opposite of ephemeral groups.  All groups listed in the
25778 group buffer are solid groups.
25779
25780 @item sparse articles
25781 @cindex sparse articles
25782 These are article placeholders shown in the summary buffer when
25783 @code{gnus-build-sparse-threads} has been switched on.
25784
25785 @item threading
25786 @cindex threading
25787 To put responses to articles directly after the articles they respond
25788 to---in a hierarchical fashion.
25789
25790 @item root
25791 @cindex root
25792 @cindex thread root
25793 The first article in a thread is the root.  It is the ancestor of all
25794 articles in the thread.
25795
25796 @item parent
25797 @cindex parent
25798 An article that has responses.
25799
25800 @item child
25801 @cindex child
25802 An article that responds to a different article---its parent.
25803
25804 @item digest
25805 @cindex digest
25806 A collection of messages in one file.  The most common digest format is
25807 specified by RFC 1153.
25808
25809 @item splitting
25810 @cindex splitting, terminolgy
25811 @cindex mail sorting
25812 @cindex mail filtering (splitting)
25813 The action of sorting your emails according to certain rules. Sometimes
25814 incorrectly called mail filtering.
25815
25816 @end table
25817
25818
25819 @page
25820 @node Customization
25821 @section Customization
25822 @cindex general customization
25823
25824 All variables are properly documented elsewhere in this manual.  This
25825 section is designed to give general pointers on how to customize Gnus
25826 for some quite common situations.
25827
25828 @menu
25829 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25830 * Slow Terminal Connection::    You run a remote Emacs.
25831 * Little Disk Space::           You feel that having large setup files is icky.
25832 * Slow Machine::                You feel like buying a faster machine.
25833 @end menu
25834
25835
25836 @node Slow/Expensive Connection
25837 @subsection Slow/Expensive NNTP Connection
25838
25839 If you run Emacs on a machine locally, and get your news from a machine
25840 over some very thin strings, you want to cut down on the amount of data
25841 Gnus has to get from the @acronym{NNTP} server.
25842
25843 @table @code
25844
25845 @item gnus-read-active-file
25846 Set this to @code{nil}, which will inhibit Gnus from requesting the
25847 entire active file from the server.  This file is often v.  large.  You
25848 also have to set @code{gnus-check-new-newsgroups} and
25849 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25850 doesn't suddenly decide to fetch the active file anyway.
25851
25852 @item gnus-nov-is-evil
25853 This one has to be @code{nil}.  If not, grabbing article headers from
25854 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25855 support @sc{xover}; Gnus will detect this by itself.
25856 @end table
25857
25858
25859 @node Slow Terminal Connection
25860 @subsection Slow Terminal Connection
25861
25862 Let's say you use your home computer for dialing up the system that runs
25863 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25864 possible) the amount of data sent over the wires.
25865
25866 @table @code
25867
25868 @item gnus-auto-center-summary
25869 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25870 buffer all the time.  If it is @code{vertical}, do only vertical
25871 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25872 horizontal and vertical recentering.
25873
25874 @item gnus-visible-headers
25875 Cut down on the headers included in the articles to the
25876 minimum.  You can, in fact, make do without them altogether---most of the
25877 useful data is in the summary buffer, anyway.  Set this variable to
25878 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25879
25880 Set this hook to all the available hiding commands:
25881 @lisp
25882 (setq gnus-treat-hide-headers 'head
25883       gnus-treat-hide-signature t
25884       gnus-treat-hide-citation t)
25885 @end lisp
25886
25887 @item gnus-use-full-window
25888 By setting this to @code{nil}, you can make all the windows smaller.
25889 While this doesn't really cut down much generally, it means that you
25890 have to see smaller portions of articles before deciding that you didn't
25891 want to read them anyway.
25892
25893 @item gnus-thread-hide-subtree
25894 If this is non-@code{nil}, all threads in the summary buffer will be
25895 hidden initially.
25896
25897
25898 @item gnus-updated-mode-lines
25899 If this is @code{nil}, Gnus will not put information in the buffer mode
25900 lines, which might save some time.
25901 @end table
25902
25903
25904 @node Little Disk Space
25905 @subsection Little Disk Space
25906 @cindex disk space
25907
25908 The startup files can get rather large, so you may want to cut their
25909 sizes a bit if you are running out of space.
25910
25911 @table @code
25912
25913 @item gnus-save-newsrc-file
25914 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25915 only save @file{.newsrc.eld}.  This means that you will not be able to
25916 use any other newsreaders than Gnus.  This variable is @code{t} by
25917 default.
25918
25919 @item gnus-read-newsrc-file
25920 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25921 only read @file{.newsrc.eld}.  This means that you will not be able to
25922 use any other newsreaders than Gnus.  This variable is @code{t} by
25923 default.
25924
25925 @item gnus-save-killed-list
25926 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25927 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25928 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25929 variable to @code{nil}.  This variable is @code{t} by default.
25930
25931 @end table
25932
25933
25934 @node Slow Machine
25935 @subsection Slow Machine
25936 @cindex slow machine
25937
25938 If you have a slow machine, or are just really impatient, there are a
25939 few things you can do to make Gnus run faster.
25940
25941 Set @code{gnus-check-new-newsgroups} and
25942 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25943
25944 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25945 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25946 summary buffer faster.
25947
25948
25949 @page
25950 @node Troubleshooting
25951 @section Troubleshooting
25952 @cindex troubleshooting
25953
25954 Gnus works @emph{so} well straight out of the box---I can't imagine any
25955 problems, really.
25956
25957 Ahem.
25958
25959 @enumerate
25960
25961 @item
25962 Make sure your computer is switched on.
25963
25964 @item
25965 Make sure that you really load the current Gnus version.  If you have
25966 been running @sc{gnus}, you need to exit Emacs and start it up again before
25967 Gnus will work.
25968
25969 @item
25970 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25971 like @samp{T-gnus 6.16.* (based on Gnus v5.10.*; for SEMI 1.1*, FLIM
25972 1.1*)} you have the right files loaded.  If, on the other hand, you get
25973 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
25974 @file{.el} files lying around.  Delete these.
25975
25976 @item
25977 Read the help group (@kbd{G h} in the group buffer) for a
25978 @acronym{FAQ} and a how-to.
25979
25980 @item
25981 @vindex max-lisp-eval-depth
25982 Gnus works on many recursive structures, and in some extreme (and very
25983 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25984 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25985 something like that.
25986 @end enumerate
25987
25988 If all else fails, report the problem as a bug.
25989
25990 @cindex bugs
25991 @cindex reporting bugs
25992
25993 @kindex M-x gnus-bug
25994 @findex gnus-bug
25995 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25996 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25997 me the backtrace.  I will fix bugs, but I can only fix them if you send
25998 me a precise description as to how to reproduce the bug.
25999
26000 You really can never be too detailed in a bug report.  Always use the
26001 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26002 a 10Kb mail each time you use it, and even if you have sent me your
26003 environment 500 times before.  I don't care.  I want the full info each
26004 time.
26005
26006 It is also important to remember that I have no memory whatsoever.  If
26007 you send a bug report, and I send you a reply, and then you just send
26008 back ``No, it's not! Moron!'', I will have no idea what you are
26009 insulting me about.  Always over-explain everything.  It's much easier
26010 for all of us---if I don't have all the information I need, I will just
26011 mail you and ask for more info, and everything takes more time.
26012
26013 If the problem you're seeing is very visual, and you can't quite explain
26014 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26015 it somewhere it can be reached, and include the URL of the picture in
26016 the bug report.
26017
26018 @cindex patches
26019 If you would like to contribute a patch to fix bugs or make
26020 improvements, please produce the patch using @samp{diff -u}.
26021
26022 @cindex edebug
26023 If you want to debug your problem further before reporting, possibly
26024 in order to solve the problem yourself and send a patch, you can use
26025 edebug.  Debugging Lisp code is documented in the Elisp manual
26026 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26027 Lisp Reference Manual}).  To get you started with edebug, consider if
26028 you discover some weird behaviour when pressing @kbd{c}, the first
26029 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26030 the documentation buffer that leads you to the function definition,
26031 then press @kbd{M-x edebug-defun RET} with point inside that function,
26032 return to Gnus and press @kbd{c} to invoke the code.  You will be
26033 placed in the lisp buffer and can single step using @kbd{SPC} and
26034 evaluate expressions using @kbd{M-:} or inspect variables using
26035 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26036 @kbd{c} or @kbd{g}.
26037
26038 @cindex elp
26039 @cindex profile
26040 @cindex slow
26041 Sometimes, a problem do not directly generate an elisp error but
26042 manifests itself by causing Gnus to be very slow.  In these cases, you
26043 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26044 slow, and then try to analyze the backtrace (repeating the procedure
26045 helps isolating the real problem areas).
26046
26047 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26048 (or should be) fully documented elsewhere, but to get you started
26049 there are a few steps that need to be followed.  First, instrument the
26050 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26051 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26052 RET message}.  Then perform the operation that is slow and press
26053 @kbd{M-x elp-results}.  You will then see which operations that takes
26054 time, and can debug them further.  If the entire operation takes much
26055 longer than the time spent in the slowest function in the profiler
26056 output, you probably profiled the wrong part of Gnus.  To reset
26057 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26058 elp-restore-all} is supposed to remove profiling, but given the
26059 complexities and dynamic code generation in Gnus, it might not always
26060 work perfectly.
26061
26062 @cindex gnu.emacs.gnus
26063 @cindex ding mailing list
26064 If you just need help, you are better off asking on
26065 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26066 @email{ding@@gnus.org, the ding mailing list}.  Write to
26067 @email{ding-request@@gnus.org} to subscribe.
26068
26069
26070 @page
26071 @node Gnus Reference Guide
26072 @section Gnus Reference Guide
26073
26074 It is my hope that other people will figure out smart stuff that Gnus
26075 can do, and that other people will write those smart things as well.  To
26076 facilitate that I thought it would be a good idea to describe the inner
26077 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26078 it.
26079
26080 You can never expect the internals of a program not to change, but I
26081 will be defining (in some details) the interface between Gnus and its
26082 back ends (this is written in stone), the format of the score files
26083 (ditto), data structures (some are less likely to change than others)
26084 and general methods of operation.
26085
26086 @menu
26087 * Gnus Utility Functions::      Common functions and variable to use.
26088 * Back End Interface::          How Gnus communicates with the servers.
26089 * Score File Syntax::           A BNF definition of the score file standard.
26090 * Headers::                     How Gnus stores headers internally.
26091 * Ranges::                      A handy format for storing mucho numbers.
26092 * Group Info::                  The group info format.
26093 * Extended Interactive::        Symbolic prefixes and stuff.
26094 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26095 * Various File Formats::        Formats of files that Gnus use.
26096 @end menu
26097
26098
26099 @node Gnus Utility Functions
26100 @subsection Gnus Utility Functions
26101 @cindex Gnus utility functions
26102 @cindex utility functions
26103 @cindex functions
26104 @cindex internal variables
26105
26106 When writing small functions to be run from hooks (and stuff), it's
26107 vital to have access to the Gnus internal functions and variables.
26108 Below is a list of the most common ones.
26109
26110 @table @code
26111
26112 @item gnus-newsgroup-name
26113 @vindex gnus-newsgroup-name
26114 This variable holds the name of the current newsgroup.
26115
26116 @item gnus-find-method-for-group
26117 @findex gnus-find-method-for-group
26118 A function that returns the select method for @var{group}.
26119
26120 @item gnus-group-real-name
26121 @findex gnus-group-real-name
26122 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26123 name.
26124
26125 @item gnus-group-prefixed-name
26126 @findex gnus-group-prefixed-name
26127 Takes an unprefixed group name and a select method, and returns the full
26128 (prefixed) Gnus group name.
26129
26130 @item gnus-get-info
26131 @findex gnus-get-info
26132 Returns the group info list for @var{group}.
26133
26134 @item gnus-group-unread
26135 @findex gnus-group-unread
26136 The number of unread articles in @var{group}, or @code{t} if that is
26137 unknown.
26138
26139 @item gnus-active
26140 @findex gnus-active
26141 The active entry for @var{group}.
26142
26143 @item gnus-set-active
26144 @findex gnus-set-active
26145 Set the active entry for @var{group}.
26146
26147 @item gnus-add-current-to-buffer-list
26148 @findex gnus-add-current-to-buffer-list
26149 Adds the current buffer to the list of buffers to be killed on Gnus
26150 exit.
26151
26152 @item gnus-continuum-version
26153 @findex gnus-continuum-version
26154 Takes a Gnus version string as a parameter and returns a floating point
26155 number.  Earlier versions will always get a lower number than later
26156 versions.
26157
26158 @item gnus-group-read-only-p
26159 @findex gnus-group-read-only-p
26160 Says whether @var{group} is read-only or not.
26161
26162 @item gnus-news-group-p
26163 @findex gnus-news-group-p
26164 Says whether @var{group} came from a news back end.
26165
26166 @item gnus-ephemeral-group-p
26167 @findex gnus-ephemeral-group-p
26168 Says whether @var{group} is ephemeral or not.
26169
26170 @item gnus-server-to-method
26171 @findex gnus-server-to-method
26172 Returns the select method corresponding to @var{server}.
26173
26174 @item gnus-server-equal
26175 @findex gnus-server-equal
26176 Says whether two virtual servers are equal.
26177
26178 @item gnus-group-native-p
26179 @findex gnus-group-native-p
26180 Says whether @var{group} is native or not.
26181
26182 @item gnus-group-secondary-p
26183 @findex gnus-group-secondary-p
26184 Says whether @var{group} is secondary or not.
26185
26186 @item gnus-group-foreign-p
26187 @findex gnus-group-foreign-p
26188 Says whether @var{group} is foreign or not.
26189
26190 @item gnus-group-find-parameter
26191 @findex gnus-group-find-parameter
26192 Returns the parameter list of @var{group}.  If given a second parameter,
26193 returns the value of that parameter for @var{group}.
26194
26195 @item gnus-group-set-parameter
26196 @findex gnus-group-set-parameter
26197 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26198
26199 @item gnus-narrow-to-body
26200 @findex gnus-narrow-to-body
26201 Narrows the current buffer to the body of the article.
26202
26203 @item gnus-check-backend-function
26204 @findex gnus-check-backend-function
26205 Takes two parameters, @var{function} and @var{group}.  If the back end
26206 @var{group} comes from supports @var{function}, return non-@code{nil}.
26207
26208 @lisp
26209 (gnus-check-backend-function "request-scan" "nnml:misc")
26210 @result{} t
26211 @end lisp
26212
26213 @item gnus-read-method
26214 @findex gnus-read-method
26215 Prompts the user for a select method.
26216
26217 @end table
26218
26219
26220 @node Back End Interface
26221 @subsection Back End Interface
26222
26223 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26224 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26225 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26226 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26227 examples of the latter we have @code{nntp-port-number} and
26228 @code{nnmbox-directory}.
26229
26230 When Gnus asks for information from a back end---say @code{nntp}---on
26231 something, it will normally include a virtual server name in the
26232 function parameters.  (If not, the back end should use the ``current''
26233 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26234 server as its only (optional) parameter.  If this virtual server hasn't
26235 been opened, the function should fail.
26236
26237 Note that a virtual server name has no relation to some physical server
26238 name.  Take this example:
26239
26240 @lisp
26241 (nntp "odd-one"
26242       (nntp-address "ifi.uio.no")
26243       (nntp-port-number 4324))
26244 @end lisp
26245
26246 Here the virtual server name is @samp{odd-one} while the name of
26247 the physical server is @samp{ifi.uio.no}.
26248
26249 The back ends should be able to switch between several virtual servers.
26250 The standard back ends implement this by keeping an alist of virtual
26251 server environments that they pull down/push up when needed.
26252
26253 There are two groups of interface functions: @dfn{required functions},
26254 which must be present, and @dfn{optional functions}, which Gnus will
26255 always check for presence before attempting to call 'em.
26256
26257 All these functions are expected to return data in the buffer
26258 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26259 unfortunately named, but we'll have to live with it.  When I talk about
26260 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26261 talk about @dfn{return value}, I talk about the function value returned by
26262 the function call.  Functions that fail should return @code{nil} as the
26263 return value.
26264
26265 Some back ends could be said to be @dfn{server-forming} back ends, and
26266 some might be said not to be.  The latter are back ends that generally
26267 only operate on one group at a time, and have no concept of ``server''
26268 ---they have a group, and they deliver info on that group and nothing
26269 more.
26270
26271 Gnus identifies each message by way of group name and article number.  A
26272 few remarks about these article numbers might be useful.  First of all,
26273 the numbers are positive integers.  Secondly, it is normally not
26274 possible for later articles to ``re-use'' older article numbers without
26275 confusing Gnus.  That is, if a group has ever contained a message
26276 numbered 42, then no other message may get that number, or Gnus will get
26277 mightily confused.@footnote{See the function
26278 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26279 Third, article numbers must be assigned in order of arrival in the
26280 group; this is not necessarily the same as the date of the message.
26281
26282 The previous paragraph already mentions all the ``hard'' restrictions that
26283 article numbers must fulfill.  But it seems that it might be useful to
26284 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26285 if there are holes in the article numbering sequence.  However, due to
26286 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26287 also useful for the article numbers to start at 1 to avoid running out
26288 of numbers as long as possible.
26289
26290 Note that by convention, back ends are named @code{nnsomething}, but
26291 Gnus also comes with some @code{nnnotbackends}, such as
26292 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26293
26294 In the examples and definitions I will refer to the imaginary back end
26295 @code{nnchoke}.
26296
26297 @cindex @code{nnchoke}
26298
26299 @menu
26300 * Required Back End Functions::  Functions that must be implemented.
26301 * Optional Back End Functions::  Functions that need not be implemented.
26302 * Error Messaging::             How to get messages and report errors.
26303 * Writing New Back Ends::       Extending old back ends.
26304 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26305 * Mail-like Back Ends::         Some tips on mail back ends.
26306 @end menu
26307
26308
26309 @node Required Back End Functions
26310 @subsubsection Required Back End Functions
26311
26312 @table @code
26313
26314 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26315
26316 @var{articles} is either a range of article numbers or a list of
26317 @code{Message-ID}s.  Current back ends do not fully support either---only
26318 sequences (lists) of article numbers, and most back ends do not support
26319 retrieval of @code{Message-ID}s.  But they should try for both.
26320
26321 The result data should either be HEADs or @acronym{NOV} lines, and the result
26322 value should either be @code{headers} or @code{nov} to reflect this.
26323 This might later be expanded to @code{various}, which will be a mixture
26324 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26325
26326 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26327 headers'', in some meaning of the word.  This is generally done by
26328 fetching (at most) @var{fetch-old} extra headers less than the smallest
26329 article number in @code{articles}, and filling the gaps as well.  The
26330 presence of this parameter can be ignored if the back end finds it
26331 cumbersome to follow the request.  If this is non-@code{nil} and not a
26332 number, do maximum fetches.
26333
26334 Here's an example HEAD:
26335
26336 @example
26337 221 1056 Article retrieved.
26338 Path: ifi.uio.no!sturles
26339 From: sturles@@ifi.uio.no (Sturle Sunde)
26340 Newsgroups: ifi.discussion
26341 Subject: Re: Something very droll
26342 Date: 27 Oct 1994 14:02:57 +0100
26343 Organization: Dept. of Informatics, University of Oslo, Norway
26344 Lines: 26
26345 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26346 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26347 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26348 .
26349 @end example
26350
26351 So a @code{headers} return value would imply that there's a number of
26352 these in the data buffer.
26353
26354 Here's a BNF definition of such a buffer:
26355
26356 @example
26357 headers        = *head
26358 head           = error / valid-head
26359 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26360 valid-head     = valid-message *header "." eol
26361 valid-message  = "221 " <number> " Article retrieved." eol
26362 header         = <text> eol
26363 @end example
26364
26365 @cindex BNF
26366 (The version of BNF used here is the one used in RFC822.)
26367
26368 If the return value is @code{nov}, the data buffer should contain
26369 @dfn{network overview database} lines.  These are basically fields
26370 separated by tabs.
26371
26372 @example
26373 nov-buffer = *nov-line
26374 nov-line   = field 7*8[ <TAB> field ] eol
26375 field      = <text except TAB>
26376 @end example
26377
26378 For a closer look at what should be in those fields,
26379 @pxref{Headers}.
26380
26381
26382 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26383
26384 @var{server} is here the virtual server name.  @var{definitions} is a
26385 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26386
26387 If the server can't be opened, no error should be signaled.  The back end
26388 may then choose to refuse further attempts at connecting to this
26389 server.  In fact, it should do so.
26390
26391 If the server is opened already, this function should return a
26392 non-@code{nil} value.  There should be no data returned.
26393
26394
26395 @item (nnchoke-close-server &optional SERVER)
26396
26397 Close connection to @var{server} and free all resources connected
26398 to it.  Return @code{nil} if the server couldn't be closed for some
26399 reason.
26400
26401 There should be no data returned.
26402
26403
26404 @item (nnchoke-request-close)
26405
26406 Close connection to all servers and free all resources that the back end
26407 have reserved.  All buffers that have been created by that back end
26408 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26409 function is generally only called when Gnus is shutting down.
26410
26411 There should be no data returned.
26412
26413
26414 @item (nnchoke-server-opened &optional SERVER)
26415
26416 If @var{server} is the current virtual server, and the connection to the
26417 physical server is alive, then this function should return a
26418 non-@code{nil} value.  This function should under no circumstances
26419 attempt to reconnect to a server we have lost connection to.
26420
26421 There should be no data returned.
26422
26423
26424 @item (nnchoke-status-message &optional SERVER)
26425
26426 This function should return the last error message from @var{server}.
26427
26428 There should be no data returned.
26429
26430
26431 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26432
26433 The result data from this function should be the article specified by
26434 @var{article}.  This might either be a @code{Message-ID} or a number.
26435 It is optional whether to implement retrieval by @code{Message-ID}, but
26436 it would be nice if that were possible.
26437
26438 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26439 in this buffer instead of the normal data buffer.  This is to make it
26440 possible to avoid copying large amounts of data from one buffer to
26441 another, while Gnus mainly requests articles to be inserted directly
26442 into its article buffer.
26443
26444 If it is at all possible, this function should return a cons cell where
26445 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26446 the article number.  This will enable Gnus to find out what the real
26447 group and article numbers are when fetching articles by
26448 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26449 on successful article retrieval.
26450
26451
26452 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26453
26454 Get data on @var{group}.  This function also has the side effect of
26455 making @var{group} the current group.
26456
26457 If @var{fast}, don't bother to return useful data, just make @var{group}
26458 the current group.
26459
26460 Here's an example of some result data and a definition of the same:
26461
26462 @example
26463 211 56 1000 1059 ifi.discussion
26464 @end example
26465
26466 The first number is the status, which should be 211.  Next is the
26467 total number of articles in the group, the lowest article number, the
26468 highest article number, and finally the group name.  Note that the total
26469 number of articles may be less than one might think while just
26470 considering the highest and lowest article numbers, but some articles
26471 may have been canceled.  Gnus just discards the total-number, so
26472 whether one should take the bother to generate it properly (if that is a
26473 problem) is left as an exercise to the reader.  If the group contains no
26474 articles, the lowest article number should be reported as 1 and the
26475 highest as 0.
26476
26477 @example
26478 group-status = [ error / info ] eol
26479 error        = [ "4" / "5" ] 2<number> " " <Error message>
26480 info         = "211 " 3* [ <number> " " ] <string>
26481 @end example
26482
26483
26484 @item (nnchoke-close-group GROUP &optional SERVER)
26485
26486 Close @var{group} and free any resources connected to it.  This will be
26487 a no-op on most back ends.
26488
26489 There should be no data returned.
26490
26491
26492 @item (nnchoke-request-list &optional SERVER)
26493
26494 Return a list of all groups available on @var{server}.  And that means
26495 @emph{all}.
26496
26497 Here's an example from a server that only carries two groups:
26498
26499 @example
26500 ifi.test 0000002200 0000002000 y
26501 ifi.discussion 3324 3300 n
26502 @end example
26503
26504 On each line we have a group name, then the highest article number in
26505 that group, the lowest article number, and finally a flag.  If the group
26506 contains no articles, the lowest article number should be reported as 1
26507 and the highest as 0.
26508
26509 @example
26510 active-file = *active-line
26511 active-line = name " " <number> " " <number> " " flags eol
26512 name        = <string>
26513 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26514 @end example
26515
26516 The flag says whether the group is read-only (@samp{n}), is moderated
26517 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26518 (@samp{=other-group}) or none of the above (@samp{y}).
26519
26520
26521 @item (nnchoke-request-post &optional SERVER)
26522
26523 This function should post the current buffer.  It might return whether
26524 the posting was successful or not, but that's not required.  If, for
26525 instance, the posting is done asynchronously, it has generally not been
26526 completed by the time this function concludes.  In that case, this
26527 function should set up some kind of sentinel to beep the user loud and
26528 clear if the posting could not be completed.
26529
26530 There should be no result data from this function.
26531
26532 @end table
26533
26534
26535 @node Optional Back End Functions
26536 @subsubsection Optional Back End Functions
26537
26538 @table @code
26539
26540 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26541
26542 @var{groups} is a list of groups, and this function should request data
26543 on all those groups.  How it does it is of no concern to Gnus, but it
26544 should attempt to do this in a speedy fashion.
26545
26546 The return value of this function can be either @code{active} or
26547 @code{group}, which says what the format of the result data is.  The
26548 former is in the same format as the data from
26549 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26550 in the same format as @code{nnchoke-request-group} gives.
26551
26552 @example
26553 group-buffer = *active-line / *group-status
26554 @end example
26555
26556
26557 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26558
26559 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26560 alterations.  This comes in handy if the back end really carries all
26561 the information (as is the case with virtual and imap groups).  This
26562 function should destructively alter the info to suit its needs, and
26563 should return a non-@code{nil} value.
26564
26565 There should be no result data from this function.
26566
26567
26568 @item (nnchoke-request-type GROUP &optional ARTICLE)
26569
26570 When the user issues commands for ``sending news'' (@kbd{F} in the
26571 summary buffer, for instance), Gnus has to know whether the article the
26572 user is following up on is news or mail.  This function should return
26573 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26574 is mail and @code{unknown} if the type can't be decided.  (The
26575 @var{article} parameter is necessary in @code{nnvirtual} groups which
26576 might very well combine mail groups and news groups.)  Both @var{group}
26577 and @var{article} may be @code{nil}.
26578
26579 There should be no result data from this function.
26580
26581
26582 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26583
26584 Set/remove/add marks on articles.  Normally Gnus handles the article
26585 marks (such as read, ticked, expired etc) internally, and store them in
26586 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26587 all information about the articles on the server, so Gnus need to
26588 propagate the mark information to the server.
26589
26590 @var{action} is a list of mark setting requests, having this format:
26591
26592 @example
26593 (RANGE ACTION MARK)
26594 @end example
26595
26596 @var{range} is a range of articles you wish to update marks on.
26597 @var{action} is @code{add} or @code{del}, used to add marks or remove
26598 marks (preserving all marks not mentioned).  @var{mark} is a list of
26599 marks; where each mark is a symbol.  Currently used marks are
26600 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26601 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26602 @code{forward} and @code{recent}, but your back end should, if
26603 possible, not limit itself to these.
26604
26605 Given contradictory actions, the last action in the list should be the
26606 effective one.  That is, if your action contains a request to add the
26607 @code{tick} mark on article 1 and, later in the list, a request to
26608 remove the mark on the same article, the mark should in fact be removed.
26609
26610 An example action list:
26611
26612 @example
26613 (((5 12 30) 'del '(tick))
26614  ((10 . 90) 'add '(read expire))
26615  ((92 94) 'del '(read)))
26616 @end example
26617
26618 The function should return a range of articles it wasn't able to set the
26619 mark on (currently not used for anything).
26620
26621 There should be no result data from this function.
26622
26623 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26624
26625 If the user tries to set a mark that the back end doesn't like, this
26626 function may change the mark.  Gnus will use whatever this function
26627 returns as the mark for @var{article} instead of the original
26628 @var{mark}.  If the back end doesn't care, it must return the original
26629 @var{mark}, and not @code{nil} or any other type of garbage.
26630
26631 The only use for this I can see is what @code{nnvirtual} does with
26632 it---if a component group is auto-expirable, marking an article as read
26633 in the virtual group should result in the article being marked as
26634 expirable.
26635
26636 There should be no result data from this function.
26637
26638
26639 @item (nnchoke-request-scan &optional GROUP SERVER)
26640
26641 This function may be called at any time (by Gnus or anything else) to
26642 request that the back end check for incoming articles, in one way or
26643 another.  A mail back end will typically read the spool file or query
26644 the @acronym{POP} server when this function is invoked.  The
26645 @var{group} doesn't have to be heeded---if the back end decides that
26646 it is too much work just scanning for a single group, it may do a
26647 total scan of all groups.  It would be nice, however, to keep things
26648 local if that's practical.
26649
26650 There should be no result data from this function.
26651
26652
26653 @item (nnchoke-request-group-description GROUP &optional SERVER)
26654
26655 The result data from this function should be a description of
26656 @var{group}.
26657
26658 @example
26659 description-line = name <TAB> description eol
26660 name             = <string>
26661 description      = <text>
26662 @end example
26663
26664 @item (nnchoke-request-list-newsgroups &optional SERVER)
26665
26666 The result data from this function should be the description of all
26667 groups available on the server.
26668
26669 @example
26670 description-buffer = *description-line
26671 @end example
26672
26673
26674 @item (nnchoke-request-newgroups DATE &optional SERVER)
26675
26676 The result data from this function should be all groups that were
26677 created after @samp{date}, which is in normal human-readable date format
26678 (i.e., the date format used in mail and news headers, and returned by
26679 the function @code{message-make-date} by default).  The data should be
26680 in the active buffer format.
26681
26682 It is okay for this function to return ``too many'' groups; some back ends
26683 might find it cheaper to return the full list of groups, rather than
26684 just the new groups.  But don't do this for back ends with many groups.
26685 Normally, if the user creates the groups herself, there won't be too
26686 many groups, so @code{nnml} and the like are probably safe.  But for
26687 back ends like @code{nntp}, where the groups have been created by the
26688 server, it is quite likely that there can be many groups.
26689
26690
26691 @item (nnchoke-request-create-group GROUP &optional SERVER)
26692
26693 This function should create an empty group with name @var{group}.
26694
26695 There should be no return data.
26696
26697
26698 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26699
26700 This function should run the expiry process on all articles in the
26701 @var{articles} range (which is currently a simple list of article
26702 numbers.)  It is left up to the back end to decide how old articles
26703 should be before they are removed by this function.  If @var{force} is
26704 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26705 they are.
26706
26707 This function should return a list of articles that it did not/was not
26708 able to delete.
26709
26710 There should be no result data returned.
26711
26712
26713 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26714
26715 This function should move @var{article} (which is a number) from
26716 @var{group} by calling @var{accept-form}.
26717
26718 This function should ready the article in question for moving by
26719 removing any header lines it has added to the article, and generally
26720 should ``tidy up'' the article.  Then it should @code{eval}
26721 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26722 will do the actual copying.  If this @code{eval} returns a
26723 non-@code{nil} value, the article should be removed.
26724
26725 If @var{last} is @code{nil}, that means that there is a high likelihood
26726 that there will be more requests issued shortly, so that allows some
26727 optimizations.
26728
26729 The function should return a cons where the @code{car} is the group name and
26730 the @code{cdr} is the article number that the article was entered as.
26731
26732 The group should exist before the back end is asked to accept the
26733 article for that group.
26734
26735 There should be no data returned.
26736
26737
26738 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26739
26740 This function takes the current buffer and inserts it into @var{group}.
26741 If @var{last} in @code{nil}, that means that there will be more calls to
26742 this function in short order.
26743
26744 The function should return a cons where the @code{car} is the group name and
26745 the @code{cdr} is the article number that the article was entered as.
26746
26747 There should be no data returned.
26748
26749
26750 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26751
26752 This function should remove @var{article} (which is a number) from
26753 @var{group} and insert @var{buffer} there instead.
26754
26755 There should be no data returned.
26756
26757
26758 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26759
26760 This function should delete @var{group}.  If @var{force}, it should
26761 really delete all the articles in the group, and then delete the group
26762 itself.  (If there is such a thing as ``the group itself''.)
26763
26764 There should be no data returned.
26765
26766
26767 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26768
26769 This function should rename @var{group} into @var{new-name}.  All
26770 articles in @var{group} should move to @var{new-name}.
26771
26772 There should be no data returned.
26773
26774 @end table
26775
26776
26777 @node Error Messaging
26778 @subsubsection Error Messaging
26779
26780 @findex nnheader-report
26781 @findex nnheader-get-report
26782 The back ends should use the function @code{nnheader-report} to report
26783 error conditions---they should not raise errors when they aren't able to
26784 perform a request.  The first argument to this function is the back end
26785 symbol, and the rest are interpreted as arguments to @code{format} if
26786 there are multiple of them, or just a string if there is one of them.
26787 This function must always returns @code{nil}.
26788
26789 @lisp
26790 (nnheader-report 'nnchoke "You did something totally bogus")
26791
26792 (nnheader-report 'nnchoke "Could not request group %s" group)
26793 @end lisp
26794
26795 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26796 @code{nil} back from a server, and this function returns the most
26797 recently reported message for the back end in question.  This function
26798 takes one argument---the server symbol.
26799
26800 Internally, these functions access @var{back-end}@code{-status-string},
26801 so the @code{nnchoke} back end will have its error message stored in
26802 @code{nnchoke-status-string}.
26803
26804
26805 @node Writing New Back Ends
26806 @subsubsection Writing New Back Ends
26807
26808 Many back ends are quite similar.  @code{nnml} is just like
26809 @code{nnspool}, but it allows you to edit the articles on the server.
26810 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26811 and it doesn't maintain overview databases.  @code{nndir} is just like
26812 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26813 editing articles.
26814
26815 It would make sense if it were possible to ``inherit'' functions from
26816 back ends when writing new back ends.  And, indeed, you can do that if you
26817 want to.  (You don't have to if you don't want to, of course.)
26818
26819 All the back ends declare their public variables and functions by using a
26820 package called @code{nnoo}.
26821
26822 To inherit functions from other back ends (and allow other back ends to
26823 inherit functions from the current back end), you should use the
26824 following macros:
26825
26826 @table @code
26827
26828 @item nnoo-declare
26829 This macro declares the first parameter to be a child of the subsequent
26830 parameters.  For instance:
26831
26832 @lisp
26833 (nnoo-declare nndir
26834   nnml nnmh)
26835 @end lisp
26836
26837 @code{nndir} has declared here that it intends to inherit functions from
26838 both @code{nnml} and @code{nnmh}.
26839
26840 @item defvoo
26841 This macro is equivalent to @code{defvar}, but registers the variable as
26842 a public server variable.  Most state-oriented variables should be
26843 declared with @code{defvoo} instead of @code{defvar}.
26844
26845 In addition to the normal @code{defvar} parameters, it takes a list of
26846 variables in the parent back ends to map the variable to when executing
26847 a function in those back ends.
26848
26849 @lisp
26850 (defvoo nndir-directory nil
26851   "Where nndir will look for groups."
26852   nnml-current-directory nnmh-current-directory)
26853 @end lisp
26854
26855 This means that @code{nnml-current-directory} will be set to
26856 @code{nndir-directory} when an @code{nnml} function is called on behalf
26857 of @code{nndir}.  (The same with @code{nnmh}.)
26858
26859 @item nnoo-define-basics
26860 This macro defines some common functions that almost all back ends should
26861 have.
26862
26863 @lisp
26864 (nnoo-define-basics nndir)
26865 @end lisp
26866
26867 @item deffoo
26868 This macro is just like @code{defun} and takes the same parameters.  In
26869 addition to doing the normal @code{defun} things, it registers the
26870 function as being public so that other back ends can inherit it.
26871
26872 @item nnoo-map-functions
26873 This macro allows mapping of functions from the current back end to
26874 functions from the parent back ends.
26875
26876 @lisp
26877 (nnoo-map-functions nndir
26878   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26879   (nnmh-request-article 0 nndir-current-group 0 0))
26880 @end lisp
26881
26882 This means that when @code{nndir-retrieve-headers} is called, the first,
26883 third, and fourth parameters will be passed on to
26884 @code{nnml-retrieve-headers}, while the second parameter is set to the
26885 value of @code{nndir-current-group}.
26886
26887 @item nnoo-import
26888 This macro allows importing functions from back ends.  It should be the
26889 last thing in the source file, since it will only define functions that
26890 haven't already been defined.
26891
26892 @lisp
26893 (nnoo-import nndir
26894   (nnmh
26895    nnmh-request-list
26896    nnmh-request-newgroups)
26897   (nnml))
26898 @end lisp
26899
26900 This means that calls to @code{nndir-request-list} should just be passed
26901 on to @code{nnmh-request-list}, while all public functions from
26902 @code{nnml} that haven't been defined in @code{nndir} yet should be
26903 defined now.
26904
26905 @end table
26906
26907 Below is a slightly shortened version of the @code{nndir} back end.
26908
26909 @lisp
26910 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26911 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26912
26913 ;;; @r{Code:}
26914
26915 (require 'nnheader)
26916 (require 'nnmh)
26917 (require 'nnml)
26918 (require 'nnoo)
26919 (eval-when-compile (require 'cl))
26920
26921 (nnoo-declare nndir
26922   nnml nnmh)
26923
26924 (defvoo nndir-directory nil
26925   "Where nndir will look for groups."
26926   nnml-current-directory nnmh-current-directory)
26927
26928 (defvoo nndir-nov-is-evil nil
26929   "*Non-nil means that nndir will never retrieve NOV headers."
26930   nnml-nov-is-evil)
26931
26932 (defvoo nndir-current-group ""
26933   nil
26934   nnml-current-group nnmh-current-group)
26935 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26936 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26937
26938 (defvoo nndir-status-string "" nil nnmh-status-string)
26939 (defconst nndir-version "nndir 1.0")
26940
26941 ;;; @r{Interface functions.}
26942
26943 (nnoo-define-basics nndir)
26944
26945 (deffoo nndir-open-server (server &optional defs)
26946   (setq nndir-directory
26947         (or (cadr (assq 'nndir-directory defs))
26948             server))
26949   (unless (assq 'nndir-directory defs)
26950     (push `(nndir-directory ,server) defs))
26951   (push `(nndir-current-group
26952           ,(file-name-nondirectory
26953             (directory-file-name nndir-directory)))
26954         defs)
26955   (push `(nndir-top-directory
26956           ,(file-name-directory (directory-file-name nndir-directory)))
26957         defs)
26958   (nnoo-change-server 'nndir server defs))
26959
26960 (nnoo-map-functions nndir
26961   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26962   (nnmh-request-article 0 nndir-current-group 0 0)
26963   (nnmh-request-group nndir-current-group 0 0)
26964   (nnmh-close-group nndir-current-group 0))
26965
26966 (nnoo-import nndir
26967   (nnmh
26968    nnmh-status-message
26969    nnmh-request-list
26970    nnmh-request-newgroups))
26971
26972 (provide 'nndir)
26973 @end lisp
26974
26975
26976 @node Hooking New Back Ends Into Gnus
26977 @subsubsection Hooking New Back Ends Into Gnus
26978
26979 @vindex gnus-valid-select-methods
26980 @findex gnus-declare-backend
26981 Having Gnus start using your new back end is rather easy---you just
26982 declare it with the @code{gnus-declare-backend} functions.  This will
26983 enter the back end into the @code{gnus-valid-select-methods} variable.
26984
26985 @code{gnus-declare-backend} takes two parameters---the back end name and
26986 an arbitrary number of @dfn{abilities}.
26987
26988 Here's an example:
26989
26990 @lisp
26991 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26992 @end lisp
26993
26994 The above line would then go in the @file{nnchoke.el} file.
26995
26996 The abilities can be:
26997
26998 @table @code
26999 @item mail
27000 This is a mailish back end---followups should (probably) go via mail.
27001 @item post
27002 This is a newsish back end---followups should (probably) go via news.
27003 @item post-mail
27004 This back end supports both mail and news.
27005 @item none
27006 This is neither a post nor mail back end---it's something completely
27007 different.
27008 @item respool
27009 It supports respooling---or rather, it is able to modify its source
27010 articles and groups.
27011 @item address
27012 The name of the server should be in the virtual server name.  This is
27013 true for almost all back ends.
27014 @item prompt-address
27015 The user should be prompted for an address when doing commands like
27016 @kbd{B} in the group buffer.  This is true for back ends like
27017 @code{nntp}, but not @code{nnmbox}, for instance.
27018 @end table
27019
27020
27021 @node Mail-like Back Ends
27022 @subsubsection Mail-like Back Ends
27023
27024 One of the things that separate the mail back ends from the rest of the
27025 back ends is the heavy dependence by most of the mail back ends on
27026 common functions in @file{nnmail.el}.  For instance, here's the
27027 definition of @code{nnml-request-scan}:
27028
27029 @lisp
27030 (deffoo nnml-request-scan (&optional group server)
27031   (setq nnml-article-file-alist nil)
27032   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27033 @end lisp
27034
27035 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27036 and @code{nnmail} takes care of all the moving and splitting of the
27037 mail.
27038
27039 This function takes four parameters.
27040
27041 @table @var
27042 @item method
27043 This should be a symbol to designate which back end is responsible for
27044 the call.
27045
27046 @item exit-function
27047 This function should be called after the splitting has been performed.
27048
27049 @item temp-directory
27050 Where the temporary files should be stored.
27051
27052 @item group
27053 This optional argument should be a group name if the splitting is to be
27054 performed for one group only.
27055 @end table
27056
27057 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27058 save each article.  @var{back-end}@code{-active-number} will be called to
27059 find the article number assigned to this article.
27060
27061 The function also uses the following variables:
27062 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27063 this back end); and @var{back-end}@code{-group-alist} and
27064 @var{back-end}@code{-active-file} to generate the new active file.
27065 @var{back-end}@code{-group-alist} should be a group-active alist, like
27066 this:
27067
27068 @example
27069 (("a-group" (1 . 10))
27070  ("some-group" (34 . 39)))
27071 @end example
27072
27073
27074 @node Score File Syntax
27075 @subsection Score File Syntax
27076
27077 Score files are meant to be easily parseable, but yet extremely
27078 mallable.  It was decided that something that had the same read syntax
27079 as an Emacs Lisp list would fit that spec.
27080
27081 Here's a typical score file:
27082
27083 @lisp
27084 (("summary"
27085   ("win95" -10000 nil s)
27086   ("Gnus"))
27087  ("from"
27088   ("Lars" -1000))
27089  (mark -100))
27090 @end lisp
27091
27092 BNF definition of a score file:
27093
27094 @example
27095 score-file      = "" / "(" *element ")"
27096 element         = rule / atom
27097 rule            = string-rule / number-rule / date-rule
27098 string-rule     = "(" quote string-header quote space *string-match ")"
27099 number-rule     = "(" quote number-header quote space *number-match ")"
27100 date-rule       = "(" quote date-header quote space *date-match ")"
27101 quote           = <ascii 34>
27102 string-header   = "subject" / "from" / "references" / "message-id" /
27103                   "xref" / "body" / "head" / "all" / "followup"
27104 number-header   = "lines" / "chars"
27105 date-header     = "date"
27106 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27107                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27108 score           = "nil" / <integer>
27109 date            = "nil" / <natural number>
27110 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27111                   "r" / "regex" / "R" / "Regex" /
27112                   "e" / "exact" / "E" / "Exact" /
27113                   "f" / "fuzzy" / "F" / "Fuzzy"
27114 number-match    = "(" <integer> [ "" / [ space score [ "" /
27115                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27116 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27117 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27118                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27119 date-match-t    = "nil" / "at" / "before" / "after"
27120 atom            = "(" [ required-atom / optional-atom ] ")"
27121 required-atom   = mark / expunge / mark-and-expunge / files /
27122                   exclude-files / read-only / touched
27123 optional-atom   = adapt / local / eval
27124 mark            = "mark" space nil-or-number
27125 nil-or-number   = "nil" / <integer>
27126 expunge         = "expunge" space nil-or-number
27127 mark-and-expunge = "mark-and-expunge" space nil-or-number
27128 files           = "files" *[ space <string> ]
27129 exclude-files   = "exclude-files" *[ space <string> ]
27130 read-only       = "read-only" [ space "nil" / space "t" ]
27131 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27132 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27133 local           = "local" *[ space "(" <string> space <form> ")" ]
27134 eval            = "eval" space <form>
27135 space           = *[ " " / <TAB> / <NEWLINE> ]
27136 @end example
27137
27138 Any unrecognized elements in a score file should be ignored, but not
27139 discarded.
27140
27141 As you can see, white space is needed, but the type and amount of white
27142 space is irrelevant.  This means that formatting of the score file is
27143 left up to the programmer---if it's simpler to just spew it all out on
27144 one looong line, then that's ok.
27145
27146 The meaning of the various atoms are explained elsewhere in this
27147 manual (@pxref{Score File Format}).
27148
27149
27150 @node Headers
27151 @subsection Headers
27152
27153 Internally Gnus uses a format for storing article headers that
27154 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27155 almost suspect that the author looked at the @acronym{NOV} specification and
27156 just shamelessly @emph{stole} the entire thing, and one would be right.
27157
27158 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27159 RFC 1036 to talk about lines in the head of an article (e.g.,
27160 @code{From}).  It is used by many people as a synonym for
27161 ``head''---``the header and the body''.  (That should be avoided, in my
27162 opinion.)  And Gnus uses a format internally that it calls ``header'',
27163 which is what I'm talking about here.  This is a 9-element vector,
27164 basically, with each header (ouch) having one slot.
27165
27166 These slots are, in order: @code{number}, @code{subject}, @code{from},
27167 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27168 @code{xref}, and @code{extra}.  There are macros for accessing and
27169 setting these slots---they all have predictable names beginning with
27170 @code{mail-header-} and @code{mail-header-set-}, respectively.
27171
27172 All these slots contain strings, except the @code{extra} slot, which
27173 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27174
27175
27176 @node Ranges
27177 @subsection Ranges
27178
27179 @sc{gnus} introduced a concept that I found so useful that I've started
27180 using it a lot and have elaborated on it greatly.
27181
27182 The question is simple: If you have a large amount of objects that are
27183 identified by numbers (say, articles, to take a @emph{wild} example)
27184 that you want to qualify as being ``included'', a normal sequence isn't
27185 very useful.  (A 200,000 length sequence is a bit long-winded.)
27186
27187 The solution is as simple as the question: You just collapse the
27188 sequence.
27189
27190 @example
27191 (1 2 3 4 5 6 10 11 12)
27192 @end example
27193
27194 is transformed into
27195
27196 @example
27197 ((1 . 6) (10 . 12))
27198 @end example
27199
27200 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27201 lonesome object, a @samp{13} is a valid element:
27202
27203 @example
27204 ((1 . 6) 7 (10 . 12))
27205 @end example
27206
27207 This means that comparing two ranges to find out whether they are equal
27208 is slightly tricky:
27209
27210 @example
27211 ((1 . 5) 7 8 (10 . 12))
27212 @end example
27213
27214 and
27215
27216 @example
27217 ((1 . 5) (7 . 8) (10 . 12))
27218 @end example
27219
27220 are equal.  In fact, any non-descending list is a range:
27221
27222 @example
27223 (1 2 3 4 5)
27224 @end example
27225
27226 is a perfectly valid range, although a pretty long-winded one.  This is
27227 also valid:
27228
27229 @example
27230 (1 . 5)
27231 @end example
27232
27233 and is equal to the previous range.
27234
27235 Here's a BNF definition of ranges.  Of course, one must remember the
27236 semantic requirement that the numbers are non-descending.  (Any number
27237 of repetition of the same number is allowed, but apt to disappear in
27238 range handling.)
27239
27240 @example
27241 range           = simple-range / normal-range
27242 simple-range    = "(" number " . " number ")"
27243 normal-range    = "(" start-contents ")"
27244 contents        = "" / simple-range *[ " " contents ] /
27245                   number *[ " " contents ]
27246 @end example
27247
27248 Gnus currently uses ranges to keep track of read articles and article
27249 marks.  I plan on implementing a number of range operators in C if The
27250 Powers That Be are willing to let me.  (I haven't asked yet, because I
27251 need to do some more thinking on what operators I need to make life
27252 totally range-based without ever having to convert back to normal
27253 sequences.)
27254
27255
27256 @node Group Info
27257 @subsection Group Info
27258
27259 Gnus stores all permanent info on groups in a @dfn{group info} list.
27260 This list is from three to six elements (or more) long and exhaustively
27261 describes the group.
27262
27263 Here are two example group infos; one is a very simple group while the
27264 second is a more complex one:
27265
27266 @example
27267 ("no.group" 5 ((1 . 54324)))
27268
27269 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27270                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27271                 (nnml "")
27272                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27273 @end example
27274
27275 The first element is the @dfn{group name}---as Gnus knows the group,
27276 anyway.  The second element is the @dfn{subscription level}, which
27277 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27278 cons cell where the @code{car} is the level and the @code{cdr} is the
27279 score.)  The third element is a list of ranges of read articles.  The
27280 fourth element is a list of lists of article marks of various kinds.
27281 The fifth element is the select method (or virtual server, if you like).
27282 The sixth element is a list of @dfn{group parameters}, which is what
27283 this section is about.
27284
27285 Any of the last three elements may be missing if they are not required.
27286 In fact, the vast majority of groups will normally only have the first
27287 three elements, which saves quite a lot of cons cells.
27288
27289 Here's a BNF definition of the group info format:
27290
27291 @example
27292 info          = "(" group space ralevel space read
27293                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27294                 space parameters ] ] ] ] ] ")"
27295 group         = quote <string> quote
27296 ralevel       = rank / level
27297 level         = <integer in the range of 1 to inf>
27298 rank          = "(" level "." score ")"
27299 score         = <integer in the range of 1 to inf>
27300 read          = range
27301 marks-lists   = nil / "(" *marks ")"
27302 marks         = "(" <string> range ")"
27303 method        = "(" <string> *elisp-forms ")"
27304 parameters    = "(" *elisp-forms ")"
27305 @end example
27306
27307 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27308 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27309 in pseudo-BNF.
27310
27311 If you have a Gnus info and want to access the elements, Gnus offers a
27312 series of macros for getting/setting these elements.
27313
27314 @table @code
27315 @item gnus-info-group
27316 @itemx gnus-info-set-group
27317 @findex gnus-info-group
27318 @findex gnus-info-set-group
27319 Get/set the group name.
27320
27321 @item gnus-info-rank
27322 @itemx gnus-info-set-rank
27323 @findex gnus-info-rank
27324 @findex gnus-info-set-rank
27325 Get/set the group rank (@pxref{Group Score}).
27326
27327 @item gnus-info-level
27328 @itemx gnus-info-set-level
27329 @findex gnus-info-level
27330 @findex gnus-info-set-level
27331 Get/set the group level.
27332
27333 @item gnus-info-score
27334 @itemx gnus-info-set-score
27335 @findex gnus-info-score
27336 @findex gnus-info-set-score
27337 Get/set the group score (@pxref{Group Score}).
27338
27339 @item gnus-info-read
27340 @itemx gnus-info-set-read
27341 @findex gnus-info-read
27342 @findex gnus-info-set-read
27343 Get/set the ranges of read articles.
27344
27345 @item gnus-info-marks
27346 @itemx gnus-info-set-marks
27347 @findex gnus-info-marks
27348 @findex gnus-info-set-marks
27349 Get/set the lists of ranges of marked articles.
27350
27351 @item gnus-info-method
27352 @itemx gnus-info-set-method
27353 @findex gnus-info-method
27354 @findex gnus-info-set-method
27355 Get/set the group select method.
27356
27357 @item gnus-info-params
27358 @itemx gnus-info-set-params
27359 @findex gnus-info-params
27360 @findex gnus-info-set-params
27361 Get/set the group parameters.
27362 @end table
27363
27364 All the getter functions take one parameter---the info list.  The setter
27365 functions take two parameters---the info list and the new value.
27366
27367 The last three elements in the group info aren't mandatory, so it may be
27368 necessary to extend the group info before setting the element.  If this
27369 is necessary, you can just pass on a non-@code{nil} third parameter to
27370 the three final setter functions to have this happen automatically.
27371
27372
27373 @node Extended Interactive
27374 @subsection Extended Interactive
27375 @cindex interactive
27376 @findex gnus-interactive
27377
27378 Gnus extends the standard Emacs @code{interactive} specification
27379 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27380 Prefixes}).  Here's an example of how this is used:
27381
27382 @lisp
27383 (defun gnus-summary-increase-score (&optional score symp)
27384   (interactive (gnus-interactive "P\ny"))
27385   ...
27386   )
27387 @end lisp
27388
27389 The best thing to do would have been to implement
27390 @code{gnus-interactive} as a macro which would have returned an
27391 @code{interactive} form, but this isn't possible since Emacs checks
27392 whether a function is interactive or not by simply doing an @code{assq}
27393 on the lambda form.  So, instead we have @code{gnus-interactive}
27394 function that takes a string and returns values that are usable to
27395 @code{interactive}.
27396
27397 This function accepts (almost) all normal @code{interactive} specs, but
27398 adds a few more.
27399
27400 @table @samp
27401 @item y
27402 @vindex gnus-current-prefix-symbol
27403 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27404 variable.
27405
27406 @item Y
27407 @vindex gnus-current-prefix-symbols
27408 A list of the current symbolic prefixes---the
27409 @code{gnus-current-prefix-symbol} variable.
27410
27411 @item A
27412 The current article number---the @code{gnus-summary-article-number}
27413 function.
27414
27415 @item H
27416 The current article header---the @code{gnus-summary-article-header}
27417 function.
27418
27419 @item g
27420 The current group name---the @code{gnus-group-group-name}
27421 function.
27422
27423 @end table
27424
27425
27426 @node Emacs/XEmacs Code
27427 @subsection Emacs/XEmacs Code
27428 @cindex XEmacs
27429 @cindex Emacsen
27430
27431 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27432 platforms must be the primary one.  I chose Emacs.  Not because I don't
27433 like XEmacs or Mule, but because it comes first alphabetically.
27434
27435 This means that Gnus will byte-compile under Emacs with nary a warning,
27436 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27437 As I use byte-compilation warnings to help me root out trivial errors in
27438 Gnus, that's very useful.
27439
27440 I've also consistently used Emacs function interfaces, but have used
27441 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27442 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27443 function.  I then define a function called @code{gnus-run-at-time} that
27444 takes the same parameters as the Emacs @code{run-at-time}.  When running
27445 Gnus under Emacs, the former function is just an alias for the latter.
27446 However, when running under XEmacs, the former is an alias for the
27447 following function:
27448
27449 @lisp
27450 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27451   (start-itimer
27452    "gnus-run-at-time"
27453    `(lambda ()
27454       (,function ,@@args))
27455    time repeat))
27456 @end lisp
27457
27458 This sort of thing has been done for bunches of functions.  Gnus does
27459 not redefine any native Emacs functions while running under XEmacs---it
27460 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27461 all over.
27462
27463 In the cases where the XEmacs function interface was obviously cleaner,
27464 I used it instead.  For example @code{gnus-region-active-p} is an alias
27465 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27466
27467 Of course, I could have chosen XEmacs as my native platform and done
27468 mapping functions the other way around.  But I didn't.  The performance
27469 hit these indirections impose on Gnus under XEmacs should be slight.
27470
27471
27472 @node Various File Formats
27473 @subsection Various File Formats
27474
27475 @menu
27476 * Active File Format::          Information on articles and groups available.
27477 * Newsgroups File Format::      Group descriptions.
27478 @end menu
27479
27480
27481 @node Active File Format
27482 @subsubsection Active File Format
27483
27484 The active file lists all groups available on the server in
27485 question.  It also lists the highest and lowest current article numbers
27486 in each group.
27487
27488 Here's an excerpt from a typical active file:
27489
27490 @example
27491 soc.motss 296030 293865 y
27492 alt.binaries.pictures.fractals 3922 3913 n
27493 comp.sources.unix 1605 1593 m
27494 comp.binaries.ibm.pc 5097 5089 y
27495 no.general 1000 900 y
27496 @end example
27497
27498 Here's a pseudo-BNF definition of this file:
27499
27500 @example
27501 active      = *group-line
27502 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27503 group       = <non-white-space string>
27504 spc         = " "
27505 high-number = <non-negative integer>
27506 low-number  = <positive integer>
27507 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27508 @end example
27509
27510 For a full description of this file, see the manual pages for
27511 @samp{innd}, in particular @samp{active(5)}.
27512
27513
27514 @node Newsgroups File Format
27515 @subsubsection Newsgroups File Format
27516
27517 The newsgroups file lists groups along with their descriptions.  Not all
27518 groups on the server have to be listed,  and not all groups in the file
27519 have to exist on the server.  The file is meant purely as information to
27520 the user.
27521
27522 The format is quite simple; a group name, a tab, and the description.
27523 Here's the definition:
27524
27525 @example
27526 newsgroups    = *line
27527 line          = group tab description <NEWLINE>
27528 group         = <non-white-space string>
27529 tab           = <TAB>
27530 description   = <string>
27531 @end example
27532
27533
27534 @page
27535 @node Emacs for Heathens
27536 @section Emacs for Heathens
27537
27538 Believe it or not, but some people who use Gnus haven't really used
27539 Emacs much before they embarked on their journey on the Gnus Love Boat.
27540 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27541 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27542 is a regexp that is used for matching on the group name'' are magical
27543 phrases with little or no meaning, then this appendix is for you.  If
27544 you are already familiar with Emacs, just ignore this and go fondle your
27545 cat instead.
27546
27547 @menu
27548 * Keystrokes::                  Entering text and executing commands.
27549 * Emacs Lisp::                  The built-in Emacs programming language.
27550 @end menu
27551
27552
27553 @node Keystrokes
27554 @subsection Keystrokes
27555
27556 @itemize @bullet
27557 @item
27558 Q: What is an experienced Emacs user?
27559
27560 @item
27561 A: A person who wishes that the terminal had pedals.
27562 @end itemize
27563
27564 Yes, when you use Emacs, you are apt to use the control key, the shift
27565 key and the meta key a lot.  This is very annoying to some people
27566 (notably @code{vi}le users), and the rest of us just love the hell out
27567 of it.  Just give up and submit.  Emacs really does stand for
27568 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27569 may have heard from other disreputable sources (like the Emacs author).
27570
27571 The shift keys are normally located near your pinky fingers, and are
27572 normally used to get capital letters and stuff.  You probably use it all
27573 the time.  The control key is normally marked ``CTRL'' or something like
27574 that.  The meta key is, funnily enough, never marked as such on any
27575 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27576 which is the meta key on this keyboard.  It's usually located somewhere
27577 to the left hand side of the keyboard, usually on the bottom row.
27578
27579 Now, us Emacs people don't say ``press the meta-control-m key'',
27580 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27581 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27582 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27583 down the control key, and hold it down while you press @kbd{k}''.
27584 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27585 the control key and then press @kbd{k}''.  Simple, ay?
27586
27587 This is somewhat complicated by the fact that not all keyboards have a
27588 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27589 means ``press escape, release escape, press @kbd{k}''.  That's much more
27590 work than if you have a meta key, so if that's the case, I respectfully
27591 suggest you get a real keyboard with a meta key.  You can't live without
27592 it.
27593
27594
27595
27596 @node Emacs Lisp
27597 @subsection Emacs Lisp
27598
27599 Emacs is the King of Editors because it's really a Lisp interpreter.
27600 Each and every key you tap runs some Emacs Lisp code snippet, and since
27601 Emacs Lisp is an interpreted language, that means that you can configure
27602 any key to run any arbitrary code.  You just, like, do it.
27603
27604 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27605 functions.  (These are byte-compiled for speed, but it's still
27606 interpreted.)  If you decide that you don't like the way Gnus does
27607 certain things, it's trivial to have it do something a different way.
27608 (Well, at least if you know how to write Lisp code.)  However, that's
27609 beyond the scope of this manual, so we are simply going to talk about
27610 some common constructs that you normally use in your @file{.emacs} file
27611 to customize Gnus.
27612
27613 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27614 write the following:
27615
27616 @lisp
27617 (setq gnus-florgbnize 4)
27618 @end lisp
27619
27620 This function (really ``special form'') @code{setq} is the one that can
27621 set a variable to some value.  This is really all you need to know.  Now
27622 you can go and fill your @file{.emacs} file with lots of these to change
27623 how Gnus works.
27624
27625 If you have put that thing in your @file{.emacs} file, it will be read
27626 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27627 start Emacs.  If you want to change the variable right away, simply say
27628 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27629 previous ``form'', which is a simple @code{setq} statement here.
27630
27631 Go ahead---just try it, if you're located at your Emacs.  After you
27632 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27633 is the return value of the form you @code{eval}ed.
27634
27635 Some pitfalls:
27636
27637 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27638 that means:
27639
27640 @lisp
27641 (setq gnus-read-active-file 'some)
27642 @end lisp
27643
27644 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27645 @samp{nntp.ifi.uio.no}'', that means:
27646
27647 @lisp
27648 (setq gnus-nntp-server "nntp.ifi.uio.no")
27649 @end lisp
27650
27651 So be careful not to mix up strings (the latter) with symbols (the
27652 former).  The manual is unambiguous, but it can be confusing.
27653
27654 @page
27655 @include gnus-faq.texi
27656
27657 @node Index
27658 @chapter Index
27659 @printindex cp
27660
27661 @node Key Index
27662 @chapter Key Index
27663 @printindex ky
27664
27665 @summarycontents
27666 @contents
27667 @bye
27668
27669 @iftex
27670 @iflatex
27671 \end{document}
27672 @end iflatex
27673 @end iftex
27674
27675 @c Local Variables:
27676 @c mode: texinfo
27677 @c coding: iso-8859-1
27678 @c End: