Synch to Gnus 200311200439.
[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{\gnusasis}[1]{\gnustt{#1}}
57 \newcommand{\gnusurl}[1]{\gnustt{#1}}
58 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
59 \newcommand{\gnusenv}[1]{\gnustt{#1}}
60 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
61 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
62 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
63 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
64 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
65 \newcommand{\gnusdfn}[1]{\textit{#1}}
66 \newcommand{\gnusi}[1]{\textit{#1}}
67 \newcommand{\gnusr}[1]{\textrm{#1}}
68 \newcommand{\gnusstrong}[1]{\textbf{#1}}
69 \newcommand{\gnusemph}[1]{\textit{#1}}
70 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
71 \newcommand{\gnussc}[1]{\textsc{#1}}
72 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
73 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
74 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
75 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
76 \newcommand{\gnusacronym}[1]{\textsc{#1}}
77 \newcommand{\gnusemail}[1]{\textit{#1}}
78
79 \newcommand{\gnusbullet}{{${\bullet}$}}
80 \newcommand{\gnusdollar}{\$}
81 \newcommand{\gnusampersand}{\&}
82 \newcommand{\gnuspercent}{\%}
83 \newcommand{\gnushash}{\#}
84 \newcommand{\gnushat}{\symbol{"5E}}
85 \newcommand{\gnusunderline}{\symbol{"5F}}
86 \newcommand{\gnusnot}{$\neg$}
87 \newcommand{\gnustilde}{\symbol{"7E}}
88 \newcommand{\gnusless}{{$<$}}
89 \newcommand{\gnusgreater}{{$>$}}
90 \newcommand{\gnusbraceleft}{{$>$}}
91 \newcommand{\gnusbraceright}{{$>$}}
92
93 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
94 \newcommand{\gnusinteresting}{
95 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
96 }
97
98 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
99
100 \newcommand{\gnuspagechapter}[1]{
101 {\mbox{}}
102 }
103
104 \newdimen{\gnusdimen}
105 \gnusdimen 0pt
106
107 \newcommand{\gnuschapter}[2]{
108 \gnuscleardoublepage
109 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
110 \chapter{#2}
111 \renewcommand{\gnussectionname}{}
112 \renewcommand{\gnuschaptername}{#2}
113 \thispagestyle{empty}
114 \hspace*{-2cm}
115 \begin{picture}(500,500)(0,0)
116 \put(480,350){\makebox(0,0)[tr]{#1}}
117 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
118 \end{picture}
119 \clearpage
120 }
121
122 \newcommand{\gnusfigure}[3]{
123 \begin{figure}
124 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
125 #3
126 \end{picture}
127 \caption{#1}
128 \end{figure}
129 }
130
131 \newcommand{\gnusicon}[1]{
132 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
133 }
134
135 \newcommand{\gnuspicon}[1]{
136 \margindex{\epsfig{figure=#1,width=2cm}}
137 }
138
139 \newcommand{\gnusxface}[2]{
140 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
141 }
142
143 \newcommand{\gnussmiley}[2]{
144 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
145 }
146
147 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
148
149 \newcommand{\gnussection}[1]{
150 \renewcommand{\gnussectionname}{#1}
151 \section{#1}
152 }
153
154 \newenvironment{codelist}%
155 {\begin{list}{}{
156 }
157 }{\end{list}}
158
159 \newenvironment{asislist}%
160 {\begin{list}{}{
161 }
162 }{\end{list}}
163
164 \newenvironment{kbdlist}%
165 {\begin{list}{}{
166 \labelwidth=0cm
167 }
168 }{\end{list}}
169
170 \newenvironment{dfnlist}%
171 {\begin{list}{}{
172 }
173 }{\end{list}}
174
175 \newenvironment{stronglist}%
176 {\begin{list}{}{
177 }
178 }{\end{list}}
179
180 \newenvironment{samplist}%
181 {\begin{list}{}{
182 }
183 }{\end{list}}
184
185 \newenvironment{varlist}%
186 {\begin{list}{}{
187 }
188 }{\end{list}}
189
190 \newenvironment{emphlist}%
191 {\begin{list}{}{
192 }
193 }{\end{list}}
194
195 \newlength\gnusheadtextwidth
196 \setlength{\gnusheadtextwidth}{\headtextwidth}
197 \addtolength{\gnusheadtextwidth}{1cm}
198
199 \newpagestyle{gnuspreamble}%
200 {
201 {
202 \ifodd\count0
203 {
204 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
205 }
206 \else
207 {
208 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
209 }
210 }
211 \fi
212 }
213 }
214 {
215 \ifodd\count0
216 \mbox{} \hfill
217 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
218 \else
219 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
220 \hfill \mbox{}
221 \fi
222 }
223
224 \newpagestyle{gnusindex}%
225 {
226 {
227 \ifodd\count0
228 {
229 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
230 }
231 \else
232 {
233 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
234 }
235 \fi
236 }
237 }
238 {
239 \ifodd\count0
240 \mbox{} \hfill
241 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
242 \else
243 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
244 \hfill \mbox{}
245 \fi
246 }
247
248 \newpagestyle{gnus}%
249 {
250 {
251 \ifodd\count0
252 {
253 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
254 }
255 \else
256 {
257 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
258 }
259 \fi
260 }
261 }
262 {
263 \ifodd\count0
264 \mbox{} \hfill
265 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
266 \else
267 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
268 \hfill \mbox{}
269 \fi
270 }
271
272 \pagenumbering{roman}
273 \pagestyle{gnuspreamble}
274
275 @end iflatex
276 @end iftex
277
278 @iftex
279 @iflatex
280 \begin{titlepage}
281 {
282
283 %\addtolength{\oddsidemargin}{-5cm}
284 %\addtolength{\evensidemargin}{-5cm}
285 \parindent=0cm
286 \addtolength{\textheight}{2cm}
287
288 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
289 \rule{15cm}{1mm}\\
290 \vfill
291 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
292 \vfill
293 \rule{15cm}{1mm}\\
294 \gnusauthor{by Lars Magne Ingebrigtsen}
295 \newpage
296 }
297
298 \mbox{}
299 \vfill
300
301 \thispagestyle{empty}
302
303 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
304 2002, 2003
305 Free Software Foundation, Inc.
306
307
308 Permission is granted to copy, distribute and/or modify this document
309 under the terms of the GNU Free Documentation License, Version 1.1 or
310 any later version published by the Free Software Foundation; with no
311 Invariant Sections, with the Front-Cover texts being ``A GNU
312 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
313 license is included in the section entitled ``GNU Free Documentation
314 License'' in the Emacs manual.
315
316 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
317 this GNU Manual, like GNU software.  Copies published by the Free
318 Software Foundation raise funds for GNU development.''
319
320 This document is part of a collection distributed under the GNU Free
321 Documentation License.  If you want to distribute this document
322 separately from the collection, you can do so by adding a copy of the
323 license to the document, as described in section 6 of the license.
324 \newpage
325 \end{titlepage}
326 @end iflatex
327 @end iftex
328
329 @ifnottex
330
331 This file documents gnus, the GNU Emacs newsreader.
332
333 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
334         Free Software Foundation, Inc.
335
336 Permission is granted to copy, distribute and/or modify this document
337 under the terms of the GNU Free Documentation License, Version 1.1 or
338 any later version published by the Free Software Foundation; with the
339 Invariant Sections being none, with the Front-Cover texts being ``A GNU
340 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
341 license is included in the section entitled ``GNU Free Documentation
342 License'' in the Emacs manual.
343
344 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
345 this GNU Manual, like GNU software.  Copies published by the Free
346 Software Foundation raise funds for GNU development.''
347
348 This document is part of a collection distributed under the GNU Free
349 Documentation License.  If you want to distribute this document
350 separately from the collection, you can do so by adding a copy of the
351 license to the document, as described in section 6 of the license.
352 @end ifnottex
353
354 @tex
355
356 @titlepage
357 @title T-gnus 6.16 Manual
358
359 @author by Lars Magne Ingebrigtsen
360 @page
361
362 @vskip 0pt plus 1filll
363 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
364 2002, 2003
365         Free Software Foundation, Inc.
366
367 Permission is granted to copy, distribute and/or modify this document
368 under the terms of the GNU Free Documentation License, Version 1.1 or
369 any later version published by the Free Software Foundation; with no
370 Invariant Sections, with the Front-Cover texts being ``A GNU
371 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
372 license is included in the section entitled ``GNU Free Documentation
373 License'' in the Emacs manual.
374
375 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
376 this GNU Manual, like GNU software.  Copies published by the Free
377 Software Foundation raise funds for GNU development.''
378
379 This document is part of a collection distributed under the GNU Free
380 Documentation License.  If you want to distribute this document
381 separately from the collection, you can do so by adding a copy of the
382 license to the document, as described in section 6 of the license.
383
384 @end titlepage
385 @page
386
387 @end tex
388
389
390 @node Top
391 @top The gnus Newsreader
392
393 @ifinfo
394
395 You can read news (and mail) from within Emacs by using T-gnus.  The news
396 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
397 spool or your mbox file.  All at the same time, if you want to push your
398 luck.
399
400 T-gnus provides @acronym{MIME} features based on @acronym{SEMI} API.  So
401 T-gnus supports your right to read strange messages including big images
402 or other various kinds of formats.  T-gnus also supports
403 internationalization/localization and multiscript features based on MULE
404 API.  So T-gnus does not discriminate various language communities.  Oh,
405 if you are a Klingon, please wait Unicode Next Generation.
406
407 This manual corresponds to T-gnus 6.16.
408
409 @end ifinfo
410
411 @iftex
412
413 @iflatex
414 \tableofcontents
415 \gnuscleardoublepage
416 @end iflatex
417
418 Gnus is the advanced, self-documenting, customizable, extensible
419 unreal-time newsreader for GNU Emacs.
420
421 Oops.  That sounds oddly familiar, so let's start over again to avoid
422 being accused of plagiarism:
423
424 Gnus is a message-reading laboratory.  It will let you look at just
425 about anything as if it were a newsgroup.  You can read mail with it,
426 you can browse directories with it, you can @code{ftp} with it---you
427 can even read news with it!
428
429 Gnus tries to empower people who read news the same way Emacs empowers
430 people who edit text.  Gnus sets no limits to what the user should be
431 allowed to do.  Users are encouraged to extend gnus to make it behave
432 like they want it to behave.  A program should not control people;
433 people should be empowered to do what they want by using (or abusing)
434 the program.
435
436 @end iftex
437
438 @menu
439 * Starting Up::                 Finding news can be a pain.
440 * Group Buffer::                Selecting, subscribing and killing groups.
441 * Summary Buffer::              Reading, saving and posting articles.
442 * Article Buffer::              Displaying and handling articles.
443 * Composing Messages::          Information on sending mail and news.
444 * Select Methods::              Gnus reads all messages from various select methods.
445 * Scoring::                     Assigning values to articles.
446 * Various::                     General purpose settings.
447 * The End::                     Farewell and goodbye.
448 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
449 * Index::                       Variable, function and concept index.
450 * Key Index::                   Key Index.
451
452 Other related manuals
453
454 * Message:(message).            Composing messages.
455 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
456 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
457 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
458
459 @detailmenu
460  --- The Detailed Node Listing ---
461
462 Starting Gnus
463
464 * Finding the News::            Choosing a method for getting news.
465 * The First Time::              What does Gnus do the first time you start it?
466 * The Server is Down::          How can I read my mail then?
467 * Slave Gnusae::                You can have more than one Gnus active at a time.
468 * Fetching a Group::            Starting Gnus just to read a group.
469 * New Groups::                  What is Gnus supposed to do with new groups?
470 * Changing Servers::            You may want to move from one server to another.
471 * Startup Files::               Those pesky startup files---@file{.newsrc}.
472 * Auto Save::                   Recovering from a crash.
473 * The Active File::             Reading the active file over a slow line Takes Time.
474 * Startup Variables::           Other variables you might change.
475
476 New Groups
477
478 * Checking New Groups::         Determining what groups are new.
479 * Subscription Methods::        What Gnus should do with new groups.
480 * Filtering New Groups::        Making Gnus ignore certain new groups.
481
482 Group Buffer
483
484 * Group Buffer Format::         Information listed and how you can change it.
485 * Group Maneuvering::           Commands for moving in the group buffer.
486 * Selecting a Group::           Actually reading news.
487 * Subscription Commands::       Unsubscribing, killing, subscribing.
488 * Group Data::                  Changing the info for a group.
489 * Group Levels::                Levels? What are those, then?
490 * Group Score::                 A mechanism for finding out what groups you like.
491 * Marking Groups::              You can mark groups for later processing.
492 * Foreign Groups::              Creating and editing groups.
493 * Group Parameters::            Each group may have different parameters set.
494 * Listing Groups::              Gnus can list various subsets of the groups.
495 * Sorting Groups::              Re-arrange the group order.
496 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
497 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
498 * Exiting Gnus::                Stop reading news and get some work done.
499 * Group Topics::                A folding group mode divided into topics.
500 * Misc Group Stuff::            Other stuff that you can to do.
501
502 Group Buffer Format
503
504 * Group Line Specification::    Deciding how the group buffer is to look.
505 * Group Mode Line Specification::  The group buffer mode line.
506 * Group Highlighting::          Having nice colors in the group buffer.
507
508 Group Topics
509
510 * Topic Commands::              Interactive E-Z commands.
511 * Topic Variables::             How to customize the topics the Lisp Way.
512 * Topic Sorting::               Sorting each topic individually.
513 * Topic Topology::              A map of the world.
514 * Topic Parameters::            Parameters that apply to all groups in a topic.
515
516 Misc Group Stuff
517
518 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
519 * Group Information::           Information and help on groups and Gnus.
520 * Group Timestamp::             Making Gnus keep track of when you last read a group.
521 * File Commands::               Reading and writing the Gnus files.
522 * Sieve Commands::              Managing Sieve scripts.
523
524 Summary Buffer
525
526 * Summary Buffer Format::       Deciding how the summary buffer is to look.
527 * Summary Maneuvering::         Moving around the summary buffer.
528 * Choosing Articles::           Reading articles.
529 * Paging the Article::          Scrolling the current article.
530 * Reply Followup and Post::     Posting articles.
531 * Delayed Articles::            Send articles at a later time.
532 * Marking Articles::            Marking articles as read, expirable, etc.
533 * Limiting::                    You can limit the summary buffer.
534 * Threading::                   How threads are made.
535 * Sorting the Summary Buffer::  How articles and threads are sorted.
536 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
537 * Article Caching::             You may store articles in a cache.
538 * Persistent Articles::         Making articles expiry-resistant.
539 * Article Backlog::             Having already read articles hang around.
540 * Saving Articles::             Ways of customizing article saving.
541 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
542 * Article Treatment::           The article buffer can be mangled at will.
543 * MIME Commands::               Doing MIMEy things with the articles.
544 * Charsets::                    Character set issues.
545 * Article Commands::            Doing various things with the article buffer.
546 * Summary Sorting::             Sorting the summary buffer in various ways.
547 * Finding the Parent::          No child support? Get the parent.
548 * Alternative Approaches::      Reading using non-default summaries.
549 * Tree Display::                A more visual display of threads.
550 * Mail Group Commands::         Some commands can only be used in mail groups.
551 * Various Summary Stuff::       What didn't fit anywhere else.
552 * Exiting the Summary Buffer::  Returning to the Group buffer,
553                                 or reselecting the current group.
554 * Crosspost Handling::          How crossposted articles are dealt with.
555 * Duplicate Suppression::       An alternative when crosspost handling fails.
556 * Security::                    Decrypt and Verify.
557 * Mailing List::                Mailing list minor mode.
558
559 Summary Buffer Format
560
561 * Summary Buffer Lines::        You can specify how summary lines should look.
562 * To From Newsgroups::          How to not display your own name.
563 * Summary Buffer Mode Line::    You can say how the mode line should look.
564 * Summary Highlighting::        Making the summary buffer all pretty and nice.
565
566 Choosing Articles
567
568 * Choosing Commands::           Commands for choosing articles.
569 * Choosing Variables::          Variables that influence these commands.
570
571 Reply, Followup and Post
572
573 * Summary Mail Commands::       Sending mail.
574 * Summary Post Commands::       Sending news.
575 * Summary Message Commands::    Other Message-related commands.
576 * Canceling and Superseding::
577
578 Marking Articles
579
580 * Unread Articles::             Marks for unread articles.
581 * Read Articles::               Marks for read articles.
582 * Other Marks::                 Marks that do not affect readedness.
583 * Setting Marks::               How to set and remove marks.
584 * Generic Marking Commands::    How to customize the marking.
585 * Setting Process Marks::       How to mark articles for later processing.
586
587 Threading
588
589 * Customizing Threading::       Variables you can change to affect the threading.
590 * Thread Commands::             Thread based commands in the summary buffer.
591
592 Customizing Threading
593
594 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
595 * Filling In Threads::          Making the threads displayed look fuller.
596 * More Threading::              Even more variables for fiddling with threads.
597 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
598
599 Decoding Articles
600
601 * Uuencoded Articles::          Uudecode articles.
602 * Shell Archives::              Unshar articles.
603 * PostScript Files::            Split PostScript.
604 * Other Files::                 Plain save and binhex.
605 * Decoding Variables::          Variables for a happy decoding.
606 * Viewing Files::               You want to look at the result of the decoding?
607
608 Decoding Variables
609
610 * Rule Variables::              Variables that say how a file is to be viewed.
611 * Other Decode Variables::      Other decode variables.
612 * Uuencoding and Posting::      Variables for customizing uuencoding.
613
614 Article Treatment
615
616 * Article Highlighting::        You want to make the article look like fruit salad.
617 * Article Fontisizing::         Making emphasized text look nice.
618 * Article Hiding::              You also want to make certain info go away.
619 * Article Washing::             Lots of way-neat functions to make life better.
620 * Article Header::              Doing various header transformations.
621 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
622 * Article Button Levels::       Controlling appearance of buttons.
623 * Article Date::                Grumble, UT!
624 * Article Display::             Display various stuff---X-Face, Picons, Smileys
625 * Article Signature::           What is a signature?
626 * Article Miscellanea::         Various other stuff.
627
628 Alternative Approaches
629
630 * Pick and Read::               First mark articles and then read them.
631 * Binary Groups::               Auto-decode all articles.
632
633 Various Summary Stuff
634
635 * Summary Group Information::   Information oriented commands.
636 * Searching for Articles::      Multiple article commands.
637 * Summary Generation Commands::
638 * Really Various Summary Commands::  Those pesky non-conformant commands.
639
640 Article Buffer
641
642 * Hiding Headers::              Deciding what headers should be displayed.
643 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
644 * Customizing Articles::        Tailoring the look of the articles.
645 * Article Keymap::              Keystrokes available in the article buffer.
646 * Misc Article::                Other stuff.
647
648 Composing Messages
649
650 * Mail::                        Mailing and replying.
651 * Posting Server::              What server should you post and mail via?
652 * Mail and Post::               Mailing and posting at the same time.
653 * Archived Messages::           Where Gnus stores the messages you've sent.
654 * Posting Styles::              An easier way to specify who you are.
655 * Drafts::                      Postponing messages and rejected messages.
656 * Rejected Articles::           What happens if the server doesn't like your article?
657 * Signing and encrypting::      How to compose secure messages.
658
659 Select Methods
660
661 * Server Buffer::               Making and editing virtual servers.
662 * Getting News::                Reading USENET news with Gnus.
663 * Getting Mail::                Reading your personal mail with Gnus.
664 * Browsing the Web::            Getting messages from a plethora of Web sources.
665 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
666 * Other Sources::               Reading directories, files, SOUP packets.
667 * Combined Groups::             Combining groups into one group.
668 * Gnus Unplugged::              Reading news and mail offline.
669
670 Server Buffer
671
672 * Server Buffer Format::        You can customize the look of this buffer.
673 * Server Commands::             Commands to manipulate servers.
674 * Example Methods::             Examples server specifications.
675 * Creating a Virtual Server::   An example session.
676 * Server Variables::            Which variables to set.
677 * Servers and Methods::         You can use server names as select methods.
678 * Unavailable Servers::         Some servers you try to contact may be down.
679
680 Getting News
681
682 * NNTP::                        Reading news from an @acronym{NNTP} server.
683 * News Spool::                  Reading news from the local spool.
684
685 @acronym{NNTP}
686
687 * Direct Functions::            Connecting directly to the server.
688 * Indirect Functions::          Connecting indirectly to the server.
689 * Common Variables::            Understood by several connection functions.
690
691 Getting Mail
692
693 * Mail in a Newsreader::        Important introductory notes.
694 * Getting Started Reading Mail::  A simple cookbook example.
695 * Splitting Mail::              How to create mail groups.
696 * Mail Sources::                How to tell Gnus where to get mail from.
697 * Mail Back End Variables::     Variables for customizing mail handling.
698 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
699 * Group Mail Splitting::        Use group customize to drive mail splitting.
700 * Incorporating Old Mail::      What about the old mail you have?
701 * Expiring Mail::               Getting rid of unwanted mail.
702 * Washing Mail::                Removing cruft from the mail you get.
703 * Duplicates::                  Dealing with duplicated mail.
704 * Not Reading Mail::            Using mail back ends for reading other files.
705 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
706
707 Mail Sources
708
709 * Mail Source Specifiers::      How to specify what a mail source is.
710 * Mail Source Customization::   Some variables that influence things.
711 * Fetching Mail::               Using the mail source specifiers.
712
713 Choosing a Mail Back End
714
715 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
716 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
717 * Mail Spool::                  Store your mail in a private spool?
718 * MH Spool::                    An mhspool-like back end.
719 * Maildir::                     Another one-file-per-message format.
720 * Mail Folders::                Having one file for each group.
721 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
722
723 Browsing the Web
724
725 * Archiving Mail::
726 * Web Searches::                Creating groups from articles that match a string.
727 * Slashdot::                    Reading the Slashdot comments.
728 * Ultimate::                    The Ultimate Bulletin Board systems.
729 * Web Archive::                 Reading mailing list archived on web.
730 * RSS::                         Reading RDF site summary.
731 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
732
733 @acronym{IMAP}
734
735 * Splitting in IMAP::           Splitting mail with nnimap.
736 * Expiring in IMAP::            Expiring mail with nnimap.
737 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
738 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
739 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
740 * Debugging IMAP::              What to do when things don't work.
741
742 Other Sources
743
744 * Directory Groups::            You can read a directory as if it was a newsgroup.
745 * Anything Groups::             Dired?  Who needs dired?
746 * Document Groups::             Single files can be the basis of a group.
747 * SOUP::                        Reading @sc{soup} packets ``offline''.
748 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
749
750 Document Groups
751
752 * Document Server Internals::   How to add your own document types.
753
754 SOUP
755
756 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
757 * SOUP Groups::                 A back end for reading @sc{soup} packets.
758 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
759
760 Combined Groups
761
762 * Virtual Groups::              Combining articles from many groups.
763 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
764
765 Gnus Unplugged
766
767 * Agent Basics::                How it all is supposed to work.
768 * Agent Categories::            How to tell the Gnus Agent what to download.
769 * Agent Commands::              New commands for all the buffers.
770 * Agent Visuals::               Ways that the agent may effect your summary buffer.
771 * Agent as Cache::              The Agent is a big cache too.
772 * Agent Expiry::                How to make old articles go away.
773 * Agent Regeneration::          How to recover from lost connections and other accidents.
774 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
775 * Outgoing Messages::           What happens when you post/mail something?
776 * Agent Variables::             Customizing is fun.
777 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
778 * Batching Agents::             How to fetch news from a @code{cron} job.
779 * Agent Caveats::               What you think it'll do and what it does.
780
781 Agent Categories
782
783 * Category Syntax::             What a category looks like.
784 * Category Buffer::             A buffer for maintaining categories.
785 * Category Variables::          Customize'r'Us.
786
787 Agent Commands
788
789 * Group Agent Commands::        Configure groups and fetch their contents.
790 * Summary Agent Commands::      Manually select then fetch specific articles.
791 * Server Agent Commands::       Select the servers that are supported by the agent.
792
793 Scoring
794
795 * Summary Score Commands::      Adding score entries for the current group.
796 * Group Score Commands::        General score commands.
797 * Score Variables::             Customize your scoring.  (My, what terminology).
798 * Score File Format::           What a score file may contain.
799 * Score File Editing::          You can edit score files by hand as well.
800 * Adaptive Scoring::            Big Sister Gnus knows what you read.
801 * Home Score File::             How to say where new score entries are to go.
802 * Followups To Yourself::       Having Gnus notice when people answer you.
803 * Scoring On Other Headers::    Scoring on non-standard headers.
804 * Scoring Tips::                How to score effectively.
805 * Reverse Scoring::             That problem child of old is not problem.
806 * Global Score Files::          Earth-spanning, ear-splitting score files.
807 * Kill Files::                  They are still here, but they can be ignored.
808 * Converting Kill Files::       Translating kill files to score files.
809 * GroupLens::                   Getting predictions on what you like to read.
810 * Advanced Scoring::            Using logical expressions to build score rules.
811 * Score Decays::                It can be useful to let scores wither away.
812
813 GroupLens
814
815 * Using GroupLens::             How to make Gnus use GroupLens.
816 * Rating Articles::             Letting GroupLens know how you rate articles.
817 * Displaying Predictions::      Displaying predictions given by GroupLens.
818 * GroupLens Variables::         Customizing GroupLens.
819
820 Advanced Scoring
821
822 * Advanced Scoring Syntax::     A definition.
823 * Advanced Scoring Examples::   What they look like.
824 * Advanced Scoring Tips::       Getting the most out of it.
825
826 Various
827
828 * Process/Prefix::              A convention used by many treatment commands.
829 * Interactive::                 Making Gnus ask you many questions.
830 * Symbolic Prefixes::           How to supply some Gnus functions with options.
831 * Formatting Variables::        You can specify what buffers should look like.
832 * Window Layout::               Configuring the Gnus buffer windows.
833 * Faces and Fonts::             How to change how faces look.
834 * Compilation::                 How to speed Gnus up.
835 * Mode Lines::                  Displaying information in the mode lines.
836 * Highlighting and Menus::      Making buffers look all nice and cozy.
837 * Buttons::                     Get tendinitis in ten easy steps!
838 * Daemons::                     Gnus can do things behind your back.
839 * NoCeM::                       How to avoid spam and other fatty foods.
840 * Undo::                        Some actions can be undone.
841 * Predicate Specifiers::        Specifying predicates.
842 * Moderation::                  What to do if you're a moderator.
843 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
844 * Fuzzy Matching::              What's the big fuzz?
845 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
846 * Various Various::             Things that are really various.
847
848 Formatting Variables
849
850 * Formatting Basics::           A formatting variable is basically a format string.
851 * Mode Line Formatting::        Some rules about mode line formatting variables.
852 * Advanced Formatting::         Modifying output in various ways.
853 * User-Defined Specs::          Having Gnus call your own functions.
854 * Formatting Fonts::            Making the formatting look colorful and nice.
855 * Positioning Point::           Moving point to a position after an operation.
856 * Tabulation::                  Tabulating your output.
857 * Wide Characters::             Dealing with wide characters.
858
859 Image Enhancements
860
861 * X-Face::                      Display a funky, teensy black-and-white image.
862 * Face::                        Display a funkier, teensier colored image.
863 * Smileys::                     Show all those happy faces the way they were meant to be shown.
864 * Picons::                      How to display pictures of what you're reading.
865 * XVarious::                    Other XEmacsy Gnusey variables.
866
867 Thwarting Email Spam
868
869 * The problem of spam::         Some background, and some solutions
870 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
871 * SpamAssassin::                How to use external anti-spam tools.
872 * Hashcash::                    Reduce spam by burning CPU time.
873 * Filtering Spam Using The Spam ELisp Package::
874 * Filtering Spam Using Statistics with spam-stat::
875
876 Filtering Spam Using The Spam ELisp Package
877
878 * Blacklists and Whitelists::
879 * BBDB Whitelists::
880 * Gmane Spam Reporting::
881 * Anti-spam Hashcash Payments::
882 * Blackholes::
883 * Regular Expressions Header Matching::
884 * Bogofilter::
885 * ifile spam filtering::
886 * spam-stat spam filtering::
887 * SpamOracle::
888 * Extending the spam elisp package::
889
890 Filtering Spam Using Statistics with spam-stat
891
892 * Creating a spam-stat dictionary::
893 * Splitting mail using spam-stat::
894 * Low-level interface to the spam-stat dictionary::
895
896 Appendices
897
898 * XEmacs::                      Requirements for installing under XEmacs.
899 * History::                     How Gnus got where it is today.
900 * On Writing Manuals::          Why this is not a beginner's guide.
901 * Terminology::                 We use really difficult, like, words here.
902 * Customization::               Tailoring Gnus to your needs.
903 * Troubleshooting::             What you might try if things do not work.
904 * Gnus Reference Guide::        Rilly, rilly technical stuff.
905 * Emacs for Heathens::          A short introduction to Emacsian terms.
906 * Frequently Asked Questions::  The Gnus FAQ.
907
908 History
909
910 * Gnus Versions::               What Gnus versions have been released.
911 * Other Gnus Versions::         Other Gnus versions that also have been released.
912 * Why?::                        What's the point of Gnus?
913 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
914 * Conformity::                  Gnus tries to conform to all standards.
915 * Emacsen::                     Gnus can be run on a few modern Emacsen.
916 * Gnus Development::            How Gnus is developed.
917 * Contributors::                Oodles of people.
918 * New Features::                Pointers to some of the new stuff in Gnus.
919
920 New Features
921
922 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
923 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
924 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
925 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
926 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
927 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
928
929 Customization
930
931 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
932 * Slow Terminal Connection::    You run a remote Emacs.
933 * Little Disk Space::           You feel that having large setup files is icky.
934 * Slow Machine::                You feel like buying a faster machine.
935
936 Gnus Reference Guide
937
938 * Gnus Utility Functions::      Common functions and variable to use.
939 * Back End Interface::          How Gnus communicates with the servers.
940 * Score File Syntax::           A BNF definition of the score file standard.
941 * Headers::                     How Gnus stores headers internally.
942 * Ranges::                      A handy format for storing mucho numbers.
943 * Group Info::                  The group info format.
944 * Extended Interactive::        Symbolic prefixes and stuff.
945 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
946 * Various File Formats::        Formats of files that Gnus use.
947
948 Back End Interface
949
950 * Required Back End Functions::  Functions that must be implemented.
951 * Optional Back End Functions::  Functions that need not be implemented.
952 * Error Messaging::             How to get messages and report errors.
953 * Writing New Back Ends::       Extending old back ends.
954 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
955 * Mail-like Back Ends::         Some tips on mail back ends.
956
957 Various File Formats
958
959 * Active File Format::          Information on articles and groups available.
960 * Newsgroups File Format::      Group descriptions.
961
962 Emacs for Heathens
963
964 * Keystrokes::                  Entering text and executing commands.
965 * Emacs Lisp::                  The built-in Emacs programming language.
966
967 @end detailmenu
968 @end menu
969
970 @node Starting Up
971 @chapter Starting gnus
972 @cindex starting up
973
974 @kindex M-x gnus
975 @findex gnus
976 If your system administrator has set things up properly, starting gnus
977 and reading news is extremely easy---you just type @kbd{M-x gnus} in
978 your Emacs.
979
980 @findex gnus-other-frame
981 @kindex M-x gnus-other-frame
982 If you want to start gnus in a different frame, you can use the command
983 @kbd{M-x gnus-other-frame} instead.
984
985 If things do not go smoothly at startup, you have to twiddle some
986 variables in your @file{~/.gnus.el} file.  This file is similar to
987 @file{~/.emacs}, but is read when Gnus starts.
988
989 If you puzzle at any terms used in this manual, please refer to the
990 terminology section (@pxref{Terminology}).
991
992 @menu
993 * Finding the News::            Choosing a method for getting news.
994 * The First Time::              What does Gnus do the first time you start it?
995 * The Server is Down::          How can I read my mail then?
996 * Slave Gnusae::                You can have more than one Gnus active at a time.
997 * Fetching a Group::            Starting Gnus just to read a group.
998 * New Groups::                  What is Gnus supposed to do with new groups?
999 * Changing Servers::            You may want to move from one server to another.
1000 * Startup Files::               Those pesky startup files---@file{.newsrc}.
1001 * Auto Save::                   Recovering from a crash.
1002 * The Active File::             Reading the active file over a slow line Takes Time.
1003 * Startup Variables::           Other variables you might change.
1004 @end menu
1005
1006
1007 @node Finding the News
1008 @section Finding the News
1009 @cindex finding news
1010
1011 @vindex gnus-select-method
1012 @c @head
1013 The @code{gnus-select-method} variable says where gnus should look for
1014 news.  This variable should be a list where the first element says
1015 @dfn{how} and the second element says @dfn{where}.  This method is your
1016 native method.  All groups not fetched with this method are
1017 foreign groups.
1018
1019 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1020 you want to get your daily dosage of news from, you'd say:
1021
1022 @lisp
1023 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1024 @end lisp
1025
1026 If you want to read directly from the local spool, say:
1027
1028 @lisp
1029 (setq gnus-select-method '(nnspool ""))
1030 @end lisp
1031
1032 If you can use a local spool, you probably should, as it will almost
1033 certainly be much faster.  But do not use the local spool if your
1034 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1035
1036 @vindex gnus-nntpserver-file
1037 @cindex NNTPSERVER
1038 @cindex @acronym{NNTP} server
1039 If this variable is not set, gnus will take a look at the
1040 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1041 gnus will see whether @code{gnus-nntpserver-file}
1042 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1043 If that fails as well, gnus will try to use the machine running Emacs
1044 as an @acronym{NNTP} server.  That's a long shot, though.
1045
1046 @vindex gnus-nntp-server
1047 If @code{gnus-nntp-server} is set, this variable will override
1048 @code{gnus-select-method}.  You should therefore set
1049 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1050
1051 @vindex gnus-secondary-servers
1052 @vindex gnus-nntp-server
1053 You can also make gnus prompt you interactively for the name of an
1054 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1055 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1056 in the @code{gnus-secondary-servers} list (if any).  You can also just
1057 type in the name of any server you feel like visiting.  (Note that this
1058 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1059 gnus} later in the same Emacs session, Gnus will contact the same
1060 server.)
1061
1062 @findex gnus-group-browse-foreign-server
1063 @kindex B (Group)
1064 However, if you use one @acronym{NNTP} server regularly and are just
1065 interested in a couple of groups from a different server, you would be
1066 better served by using the @kbd{B} command in the group buffer.  It will
1067 let you have a look at what groups are available, and you can subscribe
1068 to any of the groups you want to.  This also makes @file{.newsrc}
1069 maintenance much tidier.  @xref{Foreign Groups}.
1070
1071 @vindex gnus-secondary-select-methods
1072 @c @head
1073 A slightly different approach to foreign groups is to set the
1074 @code{gnus-secondary-select-methods} variable.  The select methods
1075 listed in this variable are in many ways just as native as the
1076 @code{gnus-select-method} server.  They will also be queried for active
1077 files during startup (if that's required), and new newsgroups that
1078 appear on these servers will be subscribed (or not) just as native
1079 groups are.
1080
1081 For instance, if you use the @code{nnmbox} back end to read your mail,
1082 you would typically set this variable to
1083
1084 @lisp
1085 (setq gnus-secondary-select-methods '((nnmbox "")))
1086 @end lisp
1087
1088
1089 @node The First Time
1090 @section The First Time
1091 @cindex first time usage
1092
1093 If no startup files exist, gnus will try to determine what groups should
1094 be subscribed by default.
1095
1096 @vindex gnus-default-subscribed-newsgroups
1097 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1098 will subscribe you to just those groups in that list, leaving the rest
1099 killed.  Your system administrator should have set this variable to
1100 something useful.
1101
1102 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1103 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1104 here as @dfn{whatever Lars thinks you should read}.)
1105
1106 You'll also be subscribed to the gnus documentation group, which should
1107 help you with most common problems.
1108
1109 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1110 use the normal functions for handling new groups, and not do anything
1111 special.
1112
1113
1114 @node The Server is Down
1115 @section The Server is Down
1116 @cindex server errors
1117
1118 If the default server is down, gnus will understandably have some
1119 problems starting.  However, if you have some mail groups in addition to
1120 the news groups, you may want to start gnus anyway.
1121
1122 Gnus, being the trusting sort of program, will ask whether to proceed
1123 without a native select method if that server can't be contacted.  This
1124 will happen whether the server doesn't actually exist (i.e., you have
1125 given the wrong address) or the server has just momentarily taken ill
1126 for some reason or other.  If you decide to continue and have no foreign
1127 groups, you'll find it difficult to actually do anything in the group
1128 buffer.  But, hey, that's your problem.  Blllrph!
1129
1130 @findex gnus-no-server
1131 @kindex M-x gnus-no-server
1132 @c @head
1133 If you know that the server is definitely down, or you just want to read
1134 your mail without bothering with the server at all, you can use the
1135 @code{gnus-no-server} command to start gnus.  That might come in handy
1136 if you're in a hurry as well.  This command will not attempt to contact
1137 your primary server---instead, it will just activate all groups on level
1138 1 and 2.  (You should preferably keep no native groups on those two
1139 levels.) Also @pxref{Group Levels}.
1140
1141
1142 @node Slave Gnusae
1143 @section Slave Gnusae
1144 @cindex slave
1145
1146 You might want to run more than one Emacs with more than one gnus at the
1147 same time.  If you are using different @file{.newsrc} files (e.g., if you
1148 are using the two different gnusae to read from two different servers),
1149 that is no problem whatsoever.  You just do it.
1150
1151 The problem appears when you want to run two Gnusae that use the same
1152 @file{.newsrc} file.
1153
1154 To work around that problem some, we here at the Think-Tank at the gnus
1155 Towers have come up with a new concept: @dfn{Masters} and
1156 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1157 taken out a copyright on those words.  If you wish to use those words in
1158 conjunction with each other, you have to send $1 per usage instance to
1159 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1160 Applications}) will be much more expensive, of course.)
1161
1162 @findex gnus-slave
1163 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1164 however you do it).  Each subsequent slave gnusae should be started with
1165 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1166 files, but instead save @dfn{slave files} that contain information only
1167 on what groups have been read in the slave session.  When a master gnus
1168 starts, it will read (and delete) these slave files, incorporating all
1169 information from them.  (The slave files will be read in the sequence
1170 they were created, so the latest changes will have precedence.)
1171
1172 Information from the slave files has, of course, precedence over the
1173 information in the normal (i.e., master) @file{.newsrc} file.
1174
1175 If the @file{.newsrc*} files have not been saved in the master when the
1176 slave starts, you may be prompted as to whether to read an auto-save
1177 file.  If you answer ``yes'', the unsaved changes to the master will be
1178 incorporated into the slave.  If you answer ``no'', the slave may see some
1179 messages as unread that have been read in the master.
1180
1181 @node Fetching a Group
1182 @section Fetching a Group
1183 @cindex fetching a group
1184
1185 @findex gnus-fetch-group
1186 It is sometimes convenient to be able to just say ``I want to read this
1187 group and I don't care whether gnus has been started or not''.  This is
1188 perhaps more useful for people who write code than for users, but the
1189 command @code{gnus-fetch-group} provides this functionality in any case.
1190 It takes the group name as a parameter.
1191
1192
1193 @node New Groups
1194 @section New Groups
1195 @cindex new groups
1196 @cindex subscription
1197
1198 @vindex gnus-check-new-newsgroups
1199 If you are satisfied that you really never want to see any new groups,
1200 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1201 also save you some time at startup.  Even if this variable is
1202 @code{nil}, you can always subscribe to the new groups just by pressing
1203 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1204 is @code{ask-server} by default.  If you set this variable to
1205 @code{always}, then Gnus will query the back ends for new groups even
1206 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1207
1208 @menu
1209 * Checking New Groups::         Determining what groups are new.
1210 * Subscription Methods::        What Gnus should do with new groups.
1211 * Filtering New Groups::        Making Gnus ignore certain new groups.
1212 @end menu
1213
1214
1215 @node Checking New Groups
1216 @subsection Checking New Groups
1217
1218 Gnus normally determines whether a group is new or not by comparing the
1219 list of groups from the active file(s) with the lists of subscribed and
1220 dead groups.  This isn't a particularly fast method.  If
1221 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1222 server for new groups since the last time.  This is both faster and
1223 cheaper.  This also means that you can get rid of the list of killed
1224 groups altogether, so you may set @code{gnus-save-killed-list} to
1225 @code{nil}, which will save time both at startup, at exit, and all over.
1226 Saves disk space, too.  Why isn't this the default, then?
1227 Unfortunately, not all servers support this command.
1228
1229 I bet I know what you're thinking now: How do I find out whether my
1230 server supports @code{ask-server}?  No?  Good, because I don't have a
1231 fail-safe answer.  I would suggest just setting this variable to
1232 @code{ask-server} and see whether any new groups appear within the next
1233 few days.  If any do, then it works.  If none do, then it doesn't
1234 work.  I could write a function to make gnus guess whether the server
1235 supports @code{ask-server}, but it would just be a guess.  So I won't.
1236 You could @code{telnet} to the server and say @code{HELP} and see
1237 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1238 it does, then it might work.  (But there are servers that lists
1239 @samp{NEWGROUPS} without supporting the function properly.)
1240
1241 This variable can also be a list of select methods.  If so, gnus will
1242 issue an @code{ask-server} command to each of the select methods, and
1243 subscribe them (or not) using the normal methods.  This might be handy
1244 if you are monitoring a few servers for new groups.  A side effect is
1245 that startup will take much longer, so you can meditate while waiting.
1246 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1247
1248
1249 @node Subscription Methods
1250 @subsection Subscription Methods
1251
1252 @vindex gnus-subscribe-newsgroup-method
1253 What gnus does when it encounters a new group is determined by the
1254 @code{gnus-subscribe-newsgroup-method} variable.
1255
1256 This variable should contain a function.  This function will be called
1257 with the name of the new group as the only parameter.
1258
1259 Some handy pre-fab functions are:
1260
1261 @table @code
1262
1263 @item gnus-subscribe-zombies
1264 @vindex gnus-subscribe-zombies
1265 Make all new groups zombies.  This is the default.  You can browse the
1266 zombies later (with @kbd{A z}) and either kill them all off properly
1267 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1268
1269 @item gnus-subscribe-randomly
1270 @vindex gnus-subscribe-randomly
1271 Subscribe all new groups in arbitrary order.  This really means that all
1272 new groups will be added at ``the top'' of the group buffer.
1273
1274 @item gnus-subscribe-alphabetically
1275 @vindex gnus-subscribe-alphabetically
1276 Subscribe all new groups in alphabetical order.
1277
1278 @item gnus-subscribe-hierarchically
1279 @vindex gnus-subscribe-hierarchically
1280 Subscribe all new groups hierarchically.  The difference between this
1281 function and @code{gnus-subscribe-alphabetically} is slight.
1282 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1283 alphabetical fashion, while this function will enter groups into its
1284 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1285 @samp{comp} hierarchy, this function will not mess that configuration
1286 up.  Or something like that.
1287
1288 @item gnus-subscribe-interactively
1289 @vindex gnus-subscribe-interactively
1290 Subscribe new groups interactively.  This means that gnus will ask
1291 you about @strong{all} new groups.  The groups you choose to subscribe
1292 to will be subscribed hierarchically.
1293
1294 @item gnus-subscribe-killed
1295 @vindex gnus-subscribe-killed
1296 Kill all new groups.
1297
1298 @item gnus-subscribe-topics
1299 @vindex gnus-subscribe-topics
1300 Put the groups into the topic that has a matching @code{subscribe} topic
1301 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1302 topic parameter that looks like
1303
1304 @example
1305 "nnslashdot"
1306 @end example
1307
1308 will mean that all groups that match that regex will be subscribed under
1309 that topic.
1310
1311 If no topics match the groups, the groups will be subscribed in the
1312 top-level topic.
1313
1314 @end table
1315
1316 @vindex gnus-subscribe-hierarchical-interactive
1317 A closely related variable is
1318 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1319 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1320 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1321 will ask you for each sub-hierarchy whether you want to descend the
1322 hierarchy or not.
1323
1324 One common mistake is to set the variable a few paragraphs above
1325 (@code{gnus-subscribe-newsgroup-method}) to
1326 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1327 will not work.  This is ga-ga.  So don't do it.
1328
1329
1330 @node Filtering New Groups
1331 @subsection Filtering New Groups
1332
1333 A nice and portable way to control which new newsgroups should be
1334 subscribed (or ignored) is to put an @dfn{options} line at the start of
1335 the @file{.newsrc} file.  Here's an example:
1336
1337 @example
1338 options -n !alt.all !rec.all sci.all
1339 @end example
1340
1341 @vindex gnus-subscribe-options-newsgroup-method
1342 This line obviously belongs to a serious-minded intellectual scientific
1343 person (or she may just be plain old boring), because it says that all
1344 groups that have names beginning with @samp{alt} and @samp{rec} should
1345 be ignored, and all groups with names beginning with @samp{sci} should
1346 be subscribed.  Gnus will not use the normal subscription method for
1347 subscribing these groups.
1348 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1349 variable defaults to @code{gnus-subscribe-alphabetically}.
1350
1351 @vindex gnus-options-not-subscribe
1352 @vindex gnus-options-subscribe
1353 If you don't want to mess with your @file{.newsrc} file, you can just
1354 set the two variables @code{gnus-options-subscribe} and
1355 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1356 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1357 and if the new group matches the former, it will be unconditionally
1358 subscribed, and if it matches the latter, it will be ignored.
1359
1360 @vindex gnus-auto-subscribed-groups
1361 Yet another variable that meddles here is
1362 @code{gnus-auto-subscribed-groups}.  It works exactly like
1363 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1364 thought it would be nice to have two of these.  This variable is more
1365 meant for setting some ground rules, while the other variable is used
1366 more for user fiddling.  By default this variable makes all new groups
1367 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1368 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1369 subscribed.  If you don't like that, just set this variable to
1370 @code{nil}.
1371
1372 New groups that match this regexp are subscribed using
1373 @code{gnus-subscribe-options-newsgroup-method}.
1374
1375
1376 @node Changing Servers
1377 @section Changing Servers
1378 @cindex changing servers
1379
1380 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1381 This happens very rarely, but perhaps you change jobs, or one server is
1382 very flaky and you want to use another.
1383
1384 Changing the server is pretty easy, right?  You just change
1385 @code{gnus-select-method} to point to the new server?
1386
1387 @emph{Wrong!}
1388
1389 Article numbers are not (in any way) kept synchronized between different
1390 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1391 you have read is by keeping track of article numbers.  So when you
1392 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1393 worthless.
1394
1395 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1396 file from one server to another.  They all have one thing in
1397 common---they take a looong time to run.  You don't want to use these
1398 functions more than absolutely necessary.
1399
1400 @kindex M-x gnus-change-server
1401 @findex gnus-change-server
1402 If you have access to both servers, Gnus can request the headers for all
1403 the articles you have read and compare @code{Message-ID}s and map the
1404 article numbers of the read articles and article marks.  The @kbd{M-x
1405 gnus-change-server} command will do this for all your native groups.  It
1406 will prompt for the method you want to move to.
1407
1408 @kindex M-x gnus-group-move-group-to-server
1409 @findex gnus-group-move-group-to-server
1410 You can also move individual groups with the @kbd{M-x
1411 gnus-group-move-group-to-server} command.  This is useful if you want to
1412 move a (foreign) group from one server to another.
1413
1414 @kindex M-x gnus-group-clear-data-on-native-groups
1415 @findex gnus-group-clear-data-on-native-groups
1416 If you don't have access to both the old and new server, all your marks
1417 and read ranges have become worthless.  You can use the @kbd{M-x
1418 gnus-group-clear-data-on-native-groups} command to clear out all data
1419 that you have on your native groups.  Use with caution.
1420
1421 @kindex M-x gnus-group-clear-data
1422 @findex gnus-group-clear-data
1423 Clear the data from the current group only---nix out marks and the
1424 list of read articles (@code{gnus-group-clear-data}).
1425
1426 After changing servers, you @strong{must} move the cache hierarchy away,
1427 since the cached articles will have wrong article numbers, which will
1428 affect which articles Gnus thinks are read.
1429 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1430 to have it done automatically; for @code{gnus-group-clear-data}, you
1431 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1432 cache for all groups).
1433
1434
1435 @node Startup Files
1436 @section Startup Files
1437 @cindex startup files
1438 @cindex .newsrc
1439 @cindex .newsrc.el
1440 @cindex .newsrc.eld
1441
1442 Now, you all know about the @file{.newsrc} file.  All subscription
1443 information is traditionally stored in this file.
1444
1445 Things got a bit more complicated with @sc{gnus}.  In addition to
1446 keeping the @file{.newsrc} file updated, it also used a file called
1447 @file{.newsrc.el} for storing all the information that didn't fit into
1448 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1449 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1450 files was the most recently saved, which enabled people to swap between
1451 @sc{gnus} and other newsreaders.
1452
1453 That was kinda silly, so Gnus went one better: In addition to the
1454 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1455 @file{.newsrc.eld}.  It will read whichever of these files that are most
1456 recent, but it will never write a @file{.newsrc.el} file.  You should
1457 never delete the @file{.newsrc.eld} file---it contains much information
1458 not stored in the @file{.newsrc} file.
1459
1460 @vindex gnus-save-newsrc-file
1461 @vindex gnus-read-newsrc-file
1462 You can turn off writing the @file{.newsrc} file by setting
1463 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1464 the file and save some space, as well as exiting from gnus faster.
1465 However, this will make it impossible to use other newsreaders than
1466 gnus.  But hey, who would want to, right?  Similarly, setting
1467 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1468 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1469 convenient if you have a tendency to use Netscape once in a while.
1470
1471 @vindex gnus-save-killed-list
1472 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1473 will not save the list of killed groups to the startup file.  This will
1474 save both time (when starting and quitting) and space (on disk).  It
1475 will also mean that Gnus has no record of what groups are new or old,
1476 so the automatic new groups subscription methods become meaningless.
1477 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1478 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1479 Groups}).  This variable can also be a regular expression.  If that's
1480 the case, remove all groups that do not match this regexp before
1481 saving.  This can be useful in certain obscure situations that involve
1482 several servers where not all servers support @code{ask-server}.
1483
1484 @vindex gnus-startup-file
1485 @vindex gnus-backup-startup-file
1486 @vindex version-control
1487 The @code{gnus-startup-file} variable says where the startup files are.
1488 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1489 file being whatever that one is, with a @samp{.eld} appended.
1490 If you want version control for this file, set
1491 @code{gnus-backup-startup-file}.  It respects the same values as the
1492 @code{version-control} variable.
1493
1494 @vindex gnus-save-newsrc-hook
1495 @vindex gnus-save-quick-newsrc-hook
1496 @vindex gnus-save-standard-newsrc-hook
1497 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1498 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1499 saving the @file{.newsrc.eld} file, and
1500 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1501 @file{.newsrc} file.  The latter two are commonly used to turn version
1502 control on or off.  Version control is on by default when saving the
1503 startup files.  If you want to turn backup creation off, say something like:
1504
1505 @lisp
1506 (defun turn-off-backup ()
1507   (set (make-local-variable 'backup-inhibited) t))
1508
1509 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1510 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1511 @end lisp
1512
1513 @vindex gnus-init-file
1514 @vindex gnus-site-init-file
1515 When gnus starts, it will read the @code{gnus-site-init-file}
1516 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1517 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1518 and can be used to avoid cluttering your @file{~/.emacs} and
1519 @file{site-init} files with gnus stuff.  Gnus will also check for files
1520 with the same names as these, but with @file{.elc} and @file{.el}
1521 suffixes.  In other words, if you have set @code{gnus-init-file} to
1522 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1523 and finally @file{~/.gnus} (in this order).
1524
1525
1526
1527 @node Auto Save
1528 @section Auto Save
1529 @cindex dribble file
1530 @cindex auto-save
1531
1532 Whenever you do something that changes the gnus data (reading articles,
1533 catching up, killing/subscribing groups), the change is added to a
1534 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1535 Emacs way.  If your Emacs should crash before you have saved the
1536 @file{.newsrc} files, all changes you have made can be recovered from
1537 this file.
1538
1539 If gnus detects this file at startup, it will ask the user whether to
1540 read it.  The auto save file is deleted whenever the real startup file is
1541 saved.
1542
1543 @vindex gnus-use-dribble-file
1544 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1545 maintain a dribble buffer.  The default is @code{t}.
1546
1547 @vindex gnus-dribble-directory
1548 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1549 this variable is @code{nil}, which it is by default, gnus will dribble
1550 into the directory where the @file{.newsrc} file is located.  (This is
1551 normally the user's home directory.)  The dribble file will get the same
1552 file permissions as the @file{.newsrc} file.
1553
1554 @vindex gnus-always-read-dribble-file
1555 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1556 read the dribble file on startup without querying the user.
1557
1558
1559 @node The Active File
1560 @section The Active File
1561 @cindex active file
1562 @cindex ignored groups
1563
1564 When gnus starts, or indeed whenever it tries to determine whether new
1565 articles have arrived, it reads the active file.  This is a very large
1566 file that lists all the active groups and articles on the server.
1567
1568 @vindex gnus-ignored-newsgroups
1569 Before examining the active file, gnus deletes all lines that match the
1570 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1571 any groups with bogus names, but you can use this variable to make gnus
1572 ignore hierarchies you aren't ever interested in.  However, this is not
1573 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1574 Groups} for an overview of other variables that can be used instead.
1575
1576 @c This variable is
1577 @c @code{nil} by default, and will slow down active file handling somewhat
1578 @c if you set it to anything else.
1579
1580 @vindex gnus-read-active-file
1581 @c @head
1582 The active file can be rather Huge, so if you have a slow network, you
1583 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1584 reading the active file.  This variable is @code{some} by default.
1585
1586 Gnus will try to make do by getting information just on the groups that
1587 you actually subscribe to.
1588
1589 Note that if you subscribe to lots and lots of groups, setting this
1590 variable to @code{nil} will probably make gnus slower, not faster.  At
1591 present, having this variable @code{nil} will slow gnus down
1592 considerably, unless you read news over a 2400 baud modem.
1593
1594 This variable can also have the value @code{some}.  Gnus will then
1595 attempt to read active info only on the subscribed groups.  On some
1596 servers this is quite fast (on sparkling, brand new INN servers that
1597 support the @code{LIST ACTIVE group} command), on others this isn't fast
1598 at all.  In any case, @code{some} should be faster than @code{nil}, and
1599 is certainly faster than @code{t} over slow lines.
1600
1601 Some news servers (old versions of Leafnode and old versions of INN, for
1602 instance) do not support the @code{LIST ACTIVE group}.  For these
1603 servers, @code{nil} is probably the most efficient value for this
1604 variable.
1605
1606 If this variable is @code{nil}, gnus will ask for group info in total
1607 lock-step, which isn't very fast.  If it is @code{some} and you use an
1608 @acronym{NNTP} server, gnus will pump out commands as fast as it can, and
1609 read all the replies in one swoop.  This will normally result in better
1610 performance, but if the server does not support the aforementioned
1611 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1612
1613 If you think that starting up Gnus takes too long, try all the three
1614 different values for this variable and see what works best for you.
1615
1616 In any case, if you use @code{some} or @code{nil}, you should definitely
1617 kill all groups that you aren't interested in to speed things up.
1618
1619 Note that this variable also affects active file retrieval from
1620 secondary select methods.
1621
1622
1623 @node Startup Variables
1624 @section Startup Variables
1625
1626 @table @code
1627
1628 @item gnus-load-hook
1629 @vindex gnus-load-hook
1630 A hook run while gnus is being loaded.  Note that this hook will
1631 normally be run just once in each Emacs session, no matter how many
1632 times you start gnus.
1633
1634 @item gnus-before-startup-hook
1635 @vindex gnus-before-startup-hook
1636 A hook run after starting up gnus successfully.
1637
1638 @item gnus-startup-hook
1639 @vindex gnus-startup-hook
1640 A hook run as the very last thing after starting up gnus
1641
1642 @item gnus-started-hook
1643 @vindex gnus-started-hook
1644 A hook that is run as the very last thing after starting up gnus
1645 successfully.
1646
1647 @item gnus-setup-news-hook
1648 @vindex gnus-setup-news-hook
1649 A hook that is run after reading the @file{.newsrc} file(s), but before
1650 generating the group buffer.
1651
1652 @item gnus-check-bogus-newsgroups
1653 @vindex gnus-check-bogus-newsgroups
1654 If non-@code{nil}, gnus will check for and delete all bogus groups at
1655 startup.  A @dfn{bogus group} is a group that you have in your
1656 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1657 bogus groups can take quite a while, so to save time and resources it's
1658 best to leave this option off, and do the checking for bogus groups once
1659 in a while from the group buffer instead (@pxref{Group Maintenance}).
1660
1661 @item gnus-inhibit-startup-message
1662 @vindex gnus-inhibit-startup-message
1663 If non-@code{nil}, the startup message won't be displayed.  That way,
1664 your boss might not notice as easily that you are reading news instead
1665 of doing your job.  Note that this variable is used before
1666 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1667
1668 @item gnus-no-groups-message
1669 @vindex gnus-no-groups-message
1670 Message displayed by gnus when no groups are available.
1671
1672 @item gnus-play-startup-jingle
1673 @vindex gnus-play-startup-jingle
1674 If non-@code{nil}, play the gnus jingle at startup.
1675
1676 @item gnus-startup-jingle
1677 @vindex gnus-startup-jingle
1678 Jingle to be played if the above variable is non-@code{nil}.  The
1679 default is @samp{Tuxedomoon.Jingle4.au}.
1680
1681 @end table
1682
1683
1684 @node Group Buffer
1685 @chapter Group Buffer
1686 @cindex group buffer
1687
1688 @c Alex Schroeder suggests to rearrange this as follows:
1689 @c
1690 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1691 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1692 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1693 @c   7. Group Score, 8. Group Buffer Format
1694 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1695 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1696 @c <kensanata> First, "Gnus considers groups... (default 9)."
1697 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1698 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1699 @c <kensanata> Then expand the next paragraph or add some more to it.
1700 @c    This short one sentence explains levels 1 and 2, therefore I understand
1701 @c    that I should keep important news at 3 and boring news at 4.
1702 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1703 @c    Maybe keep those that you don't want to read temporarily at 6,
1704 @c    those that you never want to read at 8, those that offend your
1705 @c    human rights at 9...
1706
1707
1708 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1709 is the first buffer shown when gnus starts, and will never be killed as
1710 long as gnus is active.
1711
1712 @iftex
1713 @iflatex
1714 \gnusfigure{The Group Buffer}{320}{
1715 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1716 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1717 \put(120,38){\vector(1,2){10}}
1718 \put(40,60){\makebox(0,0)[r]{Mode line}}
1719 \put(40,58){\vector(1,0){30}}
1720 \put(200,28){\makebox(0,0)[t]{Native select method}}
1721 \put(200,26){\vector(-1,2){15}}
1722 }
1723 @end iflatex
1724 @end iftex
1725
1726 @menu
1727 * Group Buffer Format::         Information listed and how you can change it.
1728 * Group Maneuvering::           Commands for moving in the group buffer.
1729 * Selecting a Group::           Actually reading news.
1730 * Subscription Commands::       Unsubscribing, killing, subscribing.
1731 * Group Data::                  Changing the info for a group.
1732 * Group Levels::                Levels? What are those, then?
1733 * Group Score::                 A mechanism for finding out what groups you like.
1734 * Marking Groups::              You can mark groups for later processing.
1735 * Foreign Groups::              Creating and editing groups.
1736 * Group Parameters::            Each group may have different parameters set.
1737 * Listing Groups::              Gnus can list various subsets of the groups.
1738 * Sorting Groups::              Re-arrange the group order.
1739 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1740 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1741 * Exiting Gnus::                Stop reading news and get some work done.
1742 * Group Topics::                A folding group mode divided into topics.
1743 * Misc Group Stuff::            Other stuff that you can to do.
1744 @end menu
1745
1746
1747 @node Group Buffer Format
1748 @section Group Buffer Format
1749
1750 @menu
1751 * Group Line Specification::    Deciding how the group buffer is to look.
1752 * Group Mode Line Specification::  The group buffer mode line.
1753 * Group Highlighting::          Having nice colors in the group buffer.
1754 @end menu
1755
1756
1757 @node Group Line Specification
1758 @subsection Group Line Specification
1759 @cindex group buffer format
1760
1761 The default format of the group buffer is nice and dull, but you can
1762 make it as exciting and ugly as you feel like.
1763
1764 Here's a couple of example group lines:
1765
1766 @example
1767      25: news.announce.newusers
1768  *    0: alt.fan.andrea-dworkin
1769 @end example
1770
1771 Quite simple, huh?
1772
1773 You can see that there are 25 unread articles in
1774 @samp{news.announce.newusers}.  There are no unread articles, but some
1775 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1776 asterisk at the beginning of the line?).
1777
1778 @vindex gnus-group-line-format
1779 You can change that format to whatever you want by fiddling with the
1780 @code{gnus-group-line-format} variable.  This variable works along the
1781 lines of a @code{format} specification, which is pretty much the same as
1782 a @code{printf} specifications, for those of you who use (feh!) C.
1783 @xref{Formatting Variables}.
1784
1785 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1786
1787 There should always be a colon on the line; the cursor always moves to
1788 the colon after performing an operation.  @xref{Positioning
1789 Point}.  Nothing else is required---not even the group name.  All
1790 displayed text is just window dressing, and is never examined by Gnus.
1791 Gnus stores all real information it needs using text properties.
1792
1793 (Note that if you make a really strange, wonderful, spreadsheet-like
1794 layout, everybody will believe you are hard at work with the accounting
1795 instead of wasting time reading news.)
1796
1797 Here's a list of all available format characters:
1798
1799 @table @samp
1800
1801 @item M
1802 An asterisk if the group only has marked articles.
1803
1804 @item S
1805 Whether the group is subscribed.
1806
1807 @item L
1808 Level of subscribedness.
1809
1810 @item N
1811 Number of unread articles.
1812
1813 @item I
1814 Number of dormant articles.
1815
1816 @item T
1817 Number of ticked articles.
1818
1819 @item R
1820 Number of read articles.
1821
1822 @item U
1823 Number of unseen articles.
1824
1825 @item t
1826 Estimated total number of articles.  (This is really @var{max-number}
1827 minus @var{min-number} plus 1.)
1828
1829 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1830 efficient access to @var{max-number} and @var{min-number} but getting
1831 the true unread message count is not possible efficiently.  For
1832 hysterical raisins, even the mail back ends, where the true number of
1833 unread messages might be available efficiently, use the same limited
1834 interface.  To remove this restriction from Gnus means that the back
1835 end interface has to be changed, which is not an easy job.  If you
1836 want to work on this, please contact the Gnus mailing list.
1837
1838 @item y
1839 Number of unread, unticked, non-dormant articles.
1840
1841 @item i
1842 Number of ticked and dormant articles.
1843
1844 @item g
1845 Full group name.
1846
1847 @item G
1848 Group name.
1849
1850 @item C
1851 Group comment (@pxref{Group Parameters}) or group name if there is no
1852 comment element in the group parameters.
1853
1854 @item D
1855 Newsgroup description.  You need to read the group descriptions
1856 before these will appear, and to do that, you either have to set
1857 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1858 command.
1859
1860 @item o
1861 @samp{m} if moderated.
1862
1863 @item O
1864 @samp{(m)} if moderated.
1865
1866 @item s
1867 Select method.
1868
1869 @item B
1870 If the summary buffer for the group is open or not.
1871
1872 @item n
1873 Select from where.
1874
1875 @item z
1876 A string that looks like @samp{<%s:%n>} if a foreign select method is
1877 used.
1878
1879 @item P
1880 Indentation based on the level of the topic (@pxref{Group Topics}).
1881
1882 @item c
1883 @vindex gnus-group-uncollapsed-levels
1884 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1885 variable says how many levels to leave at the end of the group name.
1886 The default is 1---this will mean that group names like
1887 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1888
1889 @item m
1890 @vindex gnus-new-mail-mark
1891 @cindex %
1892 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1893 the group lately.
1894
1895 @item p
1896 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1897
1898 @item d
1899 A string that says when you last read the group (@pxref{Group
1900 Timestamp}).
1901
1902 @item u
1903 User defined specifier.  The next character in the format string should
1904 be a letter.  Gnus will call the function
1905 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1906 following @samp{%u}.  The function will be passed a single dummy
1907 parameter as argument.  The function should return a string, which will
1908 be inserted into the buffer just like information from any other
1909 specifier.
1910 @end table
1911
1912 @cindex *
1913 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1914 if no info is available---for instance, if it is a non-activated foreign
1915 group, or a bogus native group.
1916
1917
1918 @node Group Mode Line Specification
1919 @subsection Group Mode Line Specification
1920 @cindex group mode line
1921
1922 @vindex gnus-group-mode-line-format
1923 The mode line can be changed by setting
1924 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1925 doesn't understand that many format specifiers:
1926
1927 @table @samp
1928 @item S
1929 The native news server.
1930 @item M
1931 The native select method.
1932 @end table
1933
1934
1935 @node Group Highlighting
1936 @subsection Group Highlighting
1937 @cindex highlighting
1938 @cindex group highlighting
1939
1940 @vindex gnus-group-highlight
1941 Highlighting in the group buffer is controlled by the
1942 @code{gnus-group-highlight} variable.  This is an alist with elements
1943 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1944 something non-@code{nil}, the @var{face} will be used on the line.
1945
1946 Here's an example value for this variable that might look nice if the
1947 background is dark:
1948
1949 @lisp
1950 (cond (window-system
1951        (setq custom-background-mode 'light)
1952        (defface my-group-face-1
1953          '((t (:foreground "Red" :bold t))) "First group face")
1954        (defface my-group-face-2
1955          '((t (:foreground "DarkSeaGreen4" :bold t)))
1956          "Second group face")
1957        (defface my-group-face-3
1958          '((t (:foreground "Green4" :bold t))) "Third group face")
1959        (defface my-group-face-4
1960          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1961        (defface my-group-face-5
1962          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1963
1964 (setq gnus-group-highlight
1965       '(((> unread 200) . my-group-face-1)
1966         ((and (< level 3) (zerop unread)) . my-group-face-2)
1967         ((< level 3) . my-group-face-3)
1968         ((zerop unread) . my-group-face-4)
1969         (t . my-group-face-5)))
1970 @end lisp
1971
1972 Also @pxref{Faces and Fonts}.
1973
1974 Variables that are dynamically bound when the forms are evaluated
1975 include:
1976
1977 @table @code
1978 @item group
1979 The group name.
1980 @item unread
1981 The number of unread articles in the group.
1982 @item method
1983 The select method.
1984 @item mailp
1985 Whether the group is a mail group.
1986 @item level
1987 The level of the group.
1988 @item score
1989 The score of the group.
1990 @item ticked
1991 The number of ticked articles in the group.
1992 @item total
1993 The total number of articles in the group.  Or rather,
1994 @var{max-number} minus @var{min-number} plus one.
1995 @item topic
1996 When using the topic minor mode, this variable is bound to the current
1997 topic being inserted.
1998 @end table
1999
2000 When the forms are @code{eval}ed, point is at the beginning of the line
2001 of the group in question, so you can use many of the normal gnus
2002 functions for snarfing info on the group.
2003
2004 @vindex gnus-group-update-hook
2005 @findex gnus-group-highlight-line
2006 @code{gnus-group-update-hook} is called when a group line is changed.
2007 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2008 calls @code{gnus-group-highlight-line} by default.
2009
2010
2011 @node Group Maneuvering
2012 @section Group Maneuvering
2013 @cindex group movement
2014
2015 All movement commands understand the numeric prefix and will behave as
2016 expected, hopefully.
2017
2018 @table @kbd
2019
2020 @item n
2021 @kindex n (Group)
2022 @findex gnus-group-next-unread-group
2023 Go to the next group that has unread articles
2024 (@code{gnus-group-next-unread-group}).
2025
2026 @item p
2027 @itemx DEL
2028 @kindex DEL (Group)
2029 @kindex p (Group)
2030 @findex gnus-group-prev-unread-group
2031 Go to the previous group that has unread articles
2032 (@code{gnus-group-prev-unread-group}).
2033
2034 @item N
2035 @kindex N (Group)
2036 @findex gnus-group-next-group
2037 Go to the next group (@code{gnus-group-next-group}).
2038
2039 @item P
2040 @kindex P (Group)
2041 @findex gnus-group-prev-group
2042 Go to the previous group (@code{gnus-group-prev-group}).
2043
2044 @item M-n
2045 @kindex M-n (Group)
2046 @findex gnus-group-next-unread-group-same-level
2047 Go to the next unread group on the same (or lower) level
2048 (@code{gnus-group-next-unread-group-same-level}).
2049
2050 @item M-p
2051 @kindex M-p (Group)
2052 @findex gnus-group-prev-unread-group-same-level
2053 Go to the previous unread group on the same (or lower) level
2054 (@code{gnus-group-prev-unread-group-same-level}).
2055 @end table
2056
2057 Three commands for jumping to groups:
2058
2059 @table @kbd
2060
2061 @item j
2062 @kindex j (Group)
2063 @findex gnus-group-jump-to-group
2064 Jump to a group (and make it visible if it isn't already)
2065 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2066 like living groups.
2067
2068 @item ,
2069 @kindex , (Group)
2070 @findex gnus-group-best-unread-group
2071 Jump to the unread group with the lowest level
2072 (@code{gnus-group-best-unread-group}).
2073
2074 @item .
2075 @kindex . (Group)
2076 @findex gnus-group-first-unread-group
2077 Jump to the first group with unread articles
2078 (@code{gnus-group-first-unread-group}).
2079 @end table
2080
2081 @vindex gnus-group-goto-unread
2082 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2083 commands will move to the next group, not the next unread group.  Even
2084 the commands that say they move to the next unread group.  The default
2085 is @code{t}.
2086
2087
2088 @node Selecting a Group
2089 @section Selecting a Group
2090 @cindex group selection
2091
2092 @table @kbd
2093
2094 @item SPACE
2095 @kindex SPACE (Group)
2096 @findex gnus-group-read-group
2097 Select the current group, switch to the summary buffer and display the
2098 first unread article (@code{gnus-group-read-group}).  If there are no
2099 unread articles in the group, or if you give a non-numerical prefix to
2100 this command, gnus will offer to fetch all the old articles in this
2101 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2102 determines the number of articles Gnus will fetch.  If @var{n} is
2103 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2104 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2105
2106 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2107 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2108 - 4 2 SPC} fetches the 42 oldest ones.
2109
2110 When you are in the group (in the Summary buffer), you can type
2111 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2112 ones.
2113
2114 @item RET
2115 @kindex RET (Group)
2116 @findex gnus-group-select-group
2117 Select the current group and switch to the summary buffer
2118 (@code{gnus-group-select-group}).  Takes the same arguments as
2119 @code{gnus-group-read-group}---the only difference is that this command
2120 does not display the first unread article automatically upon group
2121 entry.
2122
2123 @item M-RET
2124 @kindex M-RET (Group)
2125 @findex gnus-group-quick-select-group
2126 This does the same as the command above, but tries to do it with the
2127 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2128 scoring/killing will be performed, there will be no highlights and no
2129 expunging.  This might be useful if you're in a real hurry and have to
2130 enter some humongous group.  If you give a 0 prefix to this command
2131 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2132 which is useful if you want to toggle threading before generating the
2133 summary buffer (@pxref{Summary Generation Commands}).
2134
2135 @item M-SPACE
2136 @kindex M-SPACE (Group)
2137 @findex gnus-group-visible-select-group
2138 This is yet one more command that does the same as the @kbd{RET}
2139 command, but this one does it without expunging and hiding dormants
2140 (@code{gnus-group-visible-select-group}).
2141
2142 @item C-M-RET
2143 @kindex C-M-RET (Group)
2144 @findex gnus-group-select-group-ephemerally
2145 Finally, this command selects the current group ephemerally without
2146 doing any processing of its contents
2147 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2148 turned off.  Everything you do in the group after selecting it in this
2149 manner will have no permanent effects.
2150
2151 @end table
2152
2153 @vindex gnus-large-newsgroup
2154 The @code{gnus-large-newsgroup} variable says what Gnus should
2155 consider to be a big group.  If it is @code{nil}, no groups are
2156 considered big.  The default value is 200.  If the group has more
2157 (unread and/or ticked) articles than this, gnus will query the user
2158 before entering the group.  The user can then specify how many
2159 articles should be fetched from the server.  If the user specifies a
2160 negative number (@var{-n}), the @var{n} oldest articles will be
2161 fetched.  If it is positive, the @var{n} articles that have arrived
2162 most recently will be fetched.
2163
2164 @vindex gnus-large-ephemeral-newsgroup
2165 @code{gnus-large-ephemeral-newsgroup} is the same as
2166 @code{gnus-large-newsgroup}, but is only used for ephemeral
2167 newsgroups.
2168
2169 @vindex gnus-select-group-hook
2170 @vindex gnus-auto-select-first
2171 @vindex gnus-auto-select-subject
2172 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2173 automatically when entering a group with the @kbd{SPACE} command.
2174 Which article this is is controlled by the
2175 @code{gnus-auto-select-subject} variable.  Valid values for this
2176 variable is:
2177
2178 @table @code
2179
2180 @item unread
2181 Place point on the subject line of the first unread article.
2182
2183 @item first
2184 Place point on the subject line of the first article.
2185
2186 @item unseen
2187 Place point on the subject line of the first unseen article.
2188
2189 @item unseen-or-unread
2190 Place point on the subject line of the first unseen article, and if
2191 there is no such article, place point on the subject line of the first
2192 unread article.
2193
2194 @item best
2195 Place point on the subject line of the highest-scored unread article.
2196
2197 @end table
2198
2199 This variable can also be a function.  In that case, that function
2200 will be called to place point on a subject line.
2201
2202 If you want to prevent automatic selection in some group (say, in a
2203 binary group with Huge articles) you can set the
2204 @code{gnus-auto-select-first} variable to @code{nil} in
2205 @code{gnus-select-group-hook}, which is called when a group is
2206 selected.
2207
2208
2209 @node Subscription Commands
2210 @section Subscription Commands
2211 @cindex subscription
2212
2213 @table @kbd
2214
2215 @item S t
2216 @itemx u
2217 @kindex S t (Group)
2218 @kindex u (Group)
2219 @findex gnus-group-unsubscribe-current-group
2220 @c @icon{gnus-group-unsubscribe}
2221 Toggle subscription to the current group
2222 (@code{gnus-group-unsubscribe-current-group}).
2223
2224 @item S s
2225 @itemx U
2226 @kindex S s (Group)
2227 @kindex U (Group)
2228 @findex gnus-group-unsubscribe-group
2229 Prompt for a group to subscribe, and then subscribe it.  If it was
2230 subscribed already, unsubscribe it instead
2231 (@code{gnus-group-unsubscribe-group}).
2232
2233 @item S k
2234 @itemx C-k
2235 @kindex S k (Group)
2236 @kindex C-k (Group)
2237 @findex gnus-group-kill-group
2238 @c @icon{gnus-group-kill-group}
2239 Kill the current group (@code{gnus-group-kill-group}).
2240
2241 @item S y
2242 @itemx C-y
2243 @kindex S y (Group)
2244 @kindex C-y (Group)
2245 @findex gnus-group-yank-group
2246 Yank the last killed group (@code{gnus-group-yank-group}).
2247
2248 @item C-x C-t
2249 @kindex C-x C-t (Group)
2250 @findex gnus-group-transpose-groups
2251 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2252 really a subscription command, but you can use it instead of a
2253 kill-and-yank sequence sometimes.
2254
2255 @item S w
2256 @itemx C-w
2257 @kindex S w (Group)
2258 @kindex C-w (Group)
2259 @findex gnus-group-kill-region
2260 Kill all groups in the region (@code{gnus-group-kill-region}).
2261
2262 @item S z
2263 @kindex S z (Group)
2264 @findex gnus-group-kill-all-zombies
2265 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2266
2267 @item S C-k
2268 @kindex S C-k (Group)
2269 @findex gnus-group-kill-level
2270 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2271 These groups can't be yanked back after killing, so this command should
2272 be used with some caution.  The only time where this command comes in
2273 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2274 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2275 kill off all unsubscribed groups that do not have message numbers in the
2276 @file{.newsrc} file.
2277
2278 @end table
2279
2280 Also @pxref{Group Levels}.
2281
2282
2283 @node Group Data
2284 @section Group Data
2285
2286 @table @kbd
2287
2288 @item c
2289 @kindex c (Group)
2290 @findex gnus-group-catchup-current
2291 @vindex gnus-group-catchup-group-hook
2292 @c @icon{gnus-group-catchup-current}
2293 Mark all unticked articles in this group as read
2294 (@code{gnus-group-catchup-current}).
2295 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2296 the group buffer.
2297
2298 @item C
2299 @kindex C (Group)
2300 @findex gnus-group-catchup-current-all
2301 Mark all articles in this group, even the ticked ones, as read
2302 (@code{gnus-group-catchup-current-all}).
2303
2304 @item M-c
2305 @kindex M-c (Group)
2306 @findex gnus-group-clear-data
2307 Clear the data from the current group---nix out marks and the list of
2308 read articles (@code{gnus-group-clear-data}).
2309
2310 @item M-x gnus-group-clear-data-on-native-groups
2311 @kindex M-x gnus-group-clear-data-on-native-groups
2312 @findex gnus-group-clear-data-on-native-groups
2313 If you have switched from one @acronym{NNTP} server to another, all your marks
2314 and read ranges have become worthless.  You can use this command to
2315 clear out all data that you have on your native groups.  Use with
2316 caution.
2317
2318 @end table
2319
2320
2321 @node Group Levels
2322 @section Group Levels
2323 @cindex group level
2324 @cindex level
2325
2326 All groups have a level of @dfn{subscribedness}.  For instance, if a
2327 group is on level 2, it is more subscribed than a group on level 5.  You
2328 can ask gnus to just list groups on a given level or lower
2329 (@pxref{Listing Groups}), or to just check for new articles in groups on
2330 a given level or lower (@pxref{Scanning New Messages}).
2331
2332 Remember:  The higher the level of the group, the less important it is.
2333
2334 @table @kbd
2335
2336 @item S l
2337 @kindex S l (Group)
2338 @findex gnus-group-set-current-level
2339 Set the level of the current group.  If a numeric prefix is given, the
2340 next @var{n} groups will have their levels set.  The user will be
2341 prompted for a level.
2342 @end table
2343
2344 @vindex gnus-level-killed
2345 @vindex gnus-level-zombie
2346 @vindex gnus-level-unsubscribed
2347 @vindex gnus-level-subscribed
2348 Gnus considers groups from levels 1 to
2349 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2350 @code{gnus-level-subscribed} (exclusive) and
2351 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2352 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2353 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2354 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2355 same, but zombie and killed groups have no information on what articles
2356 you have read, etc, stored.  This distinction between dead and living
2357 groups isn't done because it is nice or clever, it is done purely for
2358 reasons of efficiency.
2359
2360 It is recommended that you keep all your mail groups (if any) on quite
2361 low levels (e.g. 1 or 2).
2362
2363 Maybe the following description of the default behavior of Gnus helps to
2364 understand what these levels are all about.  By default, Gnus shows you
2365 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2366 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2367 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2368 groups are hidden, in a way.
2369
2370 Zombie and killed groups are similar to unsubscribed groups in that they
2371 are hidden by default.  But they are different from subscribed and
2372 unsubscribed groups in that Gnus doesn't ask the news server for
2373 information (number of messages, number of unread messages) on zombie
2374 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2375 aren't interested in.  If most groups are killed, Gnus is faster.
2376
2377 Why does Gnus distinguish between zombie and killed groups?  Well, when
2378 a new group arrives on the server, Gnus by default makes it a zombie
2379 group.  This means that you are normally not bothered with new groups,
2380 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2381 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2382 list of killed groups.)
2383
2384 If you want to play with the level variables, you should show some care.
2385 Set them once, and don't touch them ever again.  Better yet, don't touch
2386 them at all unless you know exactly what you're doing.
2387
2388 @vindex gnus-level-default-unsubscribed
2389 @vindex gnus-level-default-subscribed
2390 Two closely related variables are @code{gnus-level-default-subscribed}
2391 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2392 which are the levels that new groups will be put on if they are
2393 (un)subscribed.  These two variables should, of course, be inside the
2394 relevant valid ranges.
2395
2396 @vindex gnus-keep-same-level
2397 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2398 will only move to groups of the same level (or lower).  In
2399 particular, going from the last article in one group to the next group
2400 will go to the next group of the same level (or lower).  This might be
2401 handy if you want to read the most important groups before you read the
2402 rest.
2403
2404 If this variable is @code{best}, Gnus will make the next newsgroup the
2405 one with the best level.
2406
2407 @vindex gnus-group-default-list-level
2408 All groups with a level less than or equal to
2409 @code{gnus-group-default-list-level} will be listed in the group buffer
2410 by default.
2411
2412 @vindex gnus-group-list-inactive-groups
2413 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2414 groups will be listed along with the unread groups.  This variable is
2415 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2416 listed.
2417
2418 @vindex gnus-group-use-permanent-levels
2419 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2420 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2421 use this level as the ``work'' level.
2422
2423 @vindex gnus-activate-level
2424 Gnus will normally just activate (i. e., query the server about) groups
2425 on level @code{gnus-activate-level} or less.  If you don't want to
2426 activate unsubscribed groups, for instance, you might set this variable
2427 to 5.  The default is 6.
2428
2429
2430 @node Group Score
2431 @section Group Score
2432 @cindex group score
2433 @cindex group rank
2434 @cindex rank
2435
2436 You would normally keep important groups on high levels, but that scheme
2437 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2438 group buffer according to how often you read groups, perhaps?  Within
2439 reason?
2440
2441 This is what @dfn{group score} is for.  You can have Gnus assign a score
2442 to each group through the mechanism described below.  You can then sort
2443 the group buffer based on this score.  Alternatively, you can sort on
2444 score and then level.  (Taken together, the level and the score is
2445 called the @dfn{rank} of the group.  A group that is on level 4 and has
2446 a score of 1 has a higher rank than a group on level 5 that has a score
2447 of 300.  (The level is the most significant part and the score is the
2448 least significant part.))
2449
2450 @findex gnus-summary-bubble-group
2451 If you want groups you read often to get higher scores than groups you
2452 read seldom you can add the @code{gnus-summary-bubble-group} function to
2453 the @code{gnus-summary-exit-hook} hook.  This will result (after
2454 sorting) in a bubbling sort of action.  If you want to see that in
2455 action after each summary exit, you can add
2456 @code{gnus-group-sort-groups-by-rank} or
2457 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2458 slow things down somewhat.
2459
2460
2461 @node Marking Groups
2462 @section Marking Groups
2463 @cindex marking groups
2464
2465 If you want to perform some command on several groups, and they appear
2466 subsequently in the group buffer, you would normally just give a
2467 numerical prefix to the command.  Most group commands will then do your
2468 bidding on those groups.
2469
2470 However, if the groups are not in sequential order, you can still
2471 perform a command on several groups.  You simply mark the groups first
2472 with the process mark and then execute the command.
2473
2474 @table @kbd
2475
2476 @item #
2477 @kindex # (Group)
2478 @itemx M m
2479 @kindex M m (Group)
2480 @findex gnus-group-mark-group
2481 Set the mark on the current group (@code{gnus-group-mark-group}).
2482
2483 @item M-#
2484 @kindex M-# (Group)
2485 @itemx M u
2486 @kindex M u (Group)
2487 @findex gnus-group-unmark-group
2488 Remove the mark from the current group
2489 (@code{gnus-group-unmark-group}).
2490
2491 @item M U
2492 @kindex M U (Group)
2493 @findex gnus-group-unmark-all-groups
2494 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2495
2496 @item M w
2497 @kindex M w (Group)
2498 @findex gnus-group-mark-region
2499 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2500
2501 @item M b
2502 @kindex M b (Group)
2503 @findex gnus-group-mark-buffer
2504 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2505
2506 @item M r
2507 @kindex M r (Group)
2508 @findex gnus-group-mark-regexp
2509 Mark all groups that match some regular expression
2510 (@code{gnus-group-mark-regexp}).
2511 @end table
2512
2513 Also @pxref{Process/Prefix}.
2514
2515 @findex gnus-group-universal-argument
2516 If you want to execute some command on all groups that have been marked
2517 with the process mark, you can use the @kbd{M-&}
2518 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2519 the command to be executed.
2520
2521
2522 @node Foreign Groups
2523 @section Foreign Groups
2524 @cindex foreign groups
2525
2526 Below are some group mode commands for making and editing general foreign
2527 groups, as well as commands to ease the creation of a few
2528 special-purpose groups.  All these commands insert the newly created
2529 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2530 consulted.
2531
2532 @table @kbd
2533
2534 @item G m
2535 @kindex G m (Group)
2536 @findex gnus-group-make-group
2537 @cindex making groups
2538 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2539 for a name, a method and possibly an @dfn{address}.  For an easier way
2540 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2541
2542 @item G r
2543 @kindex G r (Group)
2544 @findex gnus-group-rename-group
2545 @cindex renaming groups
2546 Rename the current group to something else
2547 (@code{gnus-group-rename-group}).  This is valid only on some
2548 groups---mail groups mostly.  This command might very well be quite slow
2549 on some back ends.
2550
2551 @item G c
2552 @kindex G c (Group)
2553 @cindex customizing
2554 @findex gnus-group-customize
2555 Customize the group parameters (@code{gnus-group-customize}).
2556
2557 @item G e
2558 @kindex G e (Group)
2559 @findex gnus-group-edit-group-method
2560 @cindex renaming groups
2561 Enter a buffer where you can edit the select method of the current
2562 group (@code{gnus-group-edit-group-method}).
2563
2564 @item G p
2565 @kindex G p (Group)
2566 @findex gnus-group-edit-group-parameters
2567 Enter a buffer where you can edit the group parameters
2568 (@code{gnus-group-edit-group-parameters}).
2569
2570 @item G E
2571 @kindex G E (Group)
2572 @findex gnus-group-edit-group
2573 Enter a buffer where you can edit the group info
2574 (@code{gnus-group-edit-group}).
2575
2576 @item G d
2577 @kindex G d (Group)
2578 @findex gnus-group-make-directory-group
2579 @cindex nndir
2580 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2581 for a directory name (@code{gnus-group-make-directory-group}).
2582
2583 @item G h
2584 @kindex G h (Group)
2585 @cindex help group
2586 @findex gnus-group-make-help-group
2587 Make the gnus help group (@code{gnus-group-make-help-group}).
2588
2589 @item G a
2590 @kindex G a (Group)
2591 @cindex (ding) archive
2592 @cindex archive group
2593 @findex gnus-group-make-archive-group
2594 @vindex gnus-group-archive-directory
2595 @vindex gnus-group-recent-archive-directory
2596 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2597 default a group pointing to the most recent articles will be created
2598 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2599 group will be created from @code{gnus-group-archive-directory}.
2600
2601 @item G k
2602 @kindex G k (Group)
2603 @findex gnus-group-make-kiboze-group
2604 @cindex nnkiboze
2605 Make a kiboze group.  You will be prompted for a name, for a regexp to
2606 match groups to be ``included'' in the kiboze group, and a series of
2607 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2608 @xref{Kibozed Groups}.
2609
2610 @item G D
2611 @kindex G D (Group)
2612 @findex gnus-group-enter-directory
2613 @cindex nneething
2614 Read an arbitrary directory as if it were a newsgroup with the
2615 @code{nneething} back end (@code{gnus-group-enter-directory}).
2616 @xref{Anything Groups}.
2617
2618 @item G f
2619 @kindex G f (Group)
2620 @findex gnus-group-make-doc-group
2621 @cindex ClariNet Briefs
2622 @cindex nndoc
2623 Make a group based on some file or other
2624 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2625 command, you will be prompted for a file name and a file type.
2626 Currently supported types are @code{mbox}, @code{babyl},
2627 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2628 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2629 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2630 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2631 you run this command without a prefix, Gnus will guess at the file
2632 type.  @xref{Document Groups}.
2633
2634 @item G u
2635 @kindex G u (Group)
2636 @vindex gnus-useful-groups
2637 @findex gnus-group-make-useful-group
2638 Create one of the groups mentioned in @code{gnus-useful-groups}
2639 (@code{gnus-group-make-useful-group}).
2640
2641 @item G w
2642 @kindex G w (Group)
2643 @findex gnus-group-make-web-group
2644 @cindex Google
2645 @cindex nnweb
2646 @cindex gmane
2647 Make an ephemeral group based on a web search
2648 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2649 command, make a solid group instead.  You will be prompted for the
2650 search engine type and the search string.  Valid search engine types
2651 include @code{google}, @code{dejanews}, and @code{gmane}.
2652 @xref{Web Searches}.
2653
2654 If you use the @code{google} search engine, you can limit the search
2655 to a particular group by using a match string like
2656 @samp{shaving group:alt.sysadmin.recovery}.
2657
2658 @item G DEL
2659 @kindex G DEL (Group)
2660 @findex gnus-group-delete-group
2661 This function will delete the current group
2662 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2663 actually delete all the articles in the group, and forcibly remove the
2664 group itself from the face of the Earth.  Use a prefix only if you are
2665 absolutely sure of what you are doing.  This command can't be used on
2666 read-only groups (like @code{nntp} group), though.
2667
2668 @item G V
2669 @kindex G V (Group)
2670 @findex gnus-group-make-empty-virtual
2671 Make a new, fresh, empty @code{nnvirtual} group
2672 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2673
2674 @item G v
2675 @kindex G v (Group)
2676 @findex gnus-group-add-to-virtual
2677 Add the current group to an @code{nnvirtual} group
2678 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2679 @end table
2680
2681 @xref{Select Methods}, for more information on the various select
2682 methods.
2683
2684 @vindex gnus-activate-foreign-newsgroups
2685 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2686 gnus will check all foreign groups with this level or lower at startup.
2687 This might take quite a while, especially if you subscribe to lots of
2688 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2689 @code{gnus-activate-level} also affects activation of foreign
2690 newsgroups.
2691
2692
2693 @node Group Parameters
2694 @section Group Parameters
2695 @cindex group parameters
2696
2697 The group parameters store information local to a particular group.
2698 Here's an example group parameter list:
2699
2700 @example
2701 ((to-address . "ding@@gnus.org")
2702  (auto-expire . t))
2703 @end example
2704
2705 We see that each element consists of a ``dotted pair''---the thing before
2706 the dot is the key, while the thing after the dot is the value.  All the
2707 parameters have this form @emph{except} local variable specs, which are
2708 not dotted pairs, but proper lists.
2709
2710 Some parameters have correspondent customizable variables, each of which
2711 is an alist of regexps and values.
2712
2713 The following group parameters can be used:
2714
2715 @table @code
2716 @item to-address
2717 @cindex to-address
2718 Address used by when doing followups and new posts.
2719
2720 @example
2721 (to-address . "some@@where.com")
2722 @end example
2723
2724 This is primarily useful in mail groups that represent closed mailing
2725 lists---mailing lists where it's expected that everybody that writes to
2726 the mailing list is subscribed to it.  Since using this parameter
2727 ensures that the mail only goes to the mailing list itself, it means
2728 that members won't receive two copies of your followups.
2729
2730 Using @code{to-address} will actually work whether the group is foreign
2731 or not.  Let's say there's a group on the server that is called
2732 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2733 the articles from a mail-to-news gateway.  Posting directly to this
2734 group is therefore impossible---you have to send mail to the mailing
2735 list address instead.
2736
2737 See also @code{gnus-parameter-to-address-alist}.
2738
2739 @item to-list
2740 @cindex to-list
2741 Address used when doing @kbd{a} in that group.
2742
2743 @example
2744 (to-list . "some@@where.com")
2745 @end example
2746
2747 It is totally ignored
2748 when doing a followup---except that if it is present in a news group,
2749 you'll get mail group semantics when doing @kbd{f}.
2750
2751 If you do an @kbd{a} command in a mail group and you have neither a
2752 @code{to-list} group parameter nor a @code{to-address} group parameter,
2753 then a @code{to-list} group parameter will be added automatically upon
2754 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2755 @vindex gnus-add-to-list
2756
2757 If you do an @kbd{a} command in a mail group and you don't have a
2758 @code{to-list} group parameter, one will be added automatically upon
2759 sending the message.
2760
2761 @findex gnus-mailing-list-mode
2762 @cindex mail list groups
2763 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2764 entering summary buffer.
2765
2766 See also @code{gnus-parameter-to-list-alist}.
2767
2768 @anchor{subscribed}
2769 @item subscribed
2770 @cindex subscribed
2771 @cindex Mail-Followup-To
2772 If this parameter is set to @code{t}, Gnus will consider the
2773 to-address and to-list parameters for this group as addresses of
2774 mailing lists you are subscribed to.  Giving Gnus this information is
2775 (only) a first step in getting it to generate correct Mail-Followup-To
2776 headers for your posts to these lists.  @xref{Mailing Lists, ,Mailing
2777 Lists, message, The Message Manual}, for a complete treatment of
2778 available MFT support.
2779
2780 See also @code{gnus-find-subscribed-addresses}, the function that
2781 directly uses this group parameter.
2782
2783 @item visible
2784 @cindex visible
2785 If the group parameter list has the element @code{(visible . t)},
2786 that group will always be visible in the Group buffer, regardless
2787 of whether it has any unread articles.
2788
2789 @item broken-reply-to
2790 @cindex broken-reply-to
2791 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2792 headers in this group are to be ignored, and for the header to be hidden
2793 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2794 can be useful if you're reading a mailing list group where the listserv
2795 has inserted @code{Reply-To} headers that point back to the listserv
2796 itself.  That is broken behavior.  So there!
2797
2798 @item to-group
2799 @cindex to-group
2800 Elements like @code{(to-group . "some.group.name")} means that all
2801 posts in that group will be sent to @code{some.group.name}.
2802
2803 @item newsgroup
2804 @cindex newsgroup
2805 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2806 will treat all responses as if they were responses to news articles.
2807 This can be useful if you have a mail group that's really a mirror of a
2808 news group.
2809
2810 @item gcc-self
2811 @cindex gcc-self
2812 If @code{(gcc-self . t)} is present in the group parameter list, newly
2813 composed messages will be @code{Gcc}'d to the current group.  If
2814 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2815 generated, if @code{(gcc-self . "string")} is present, this string will
2816 be inserted literally as a @code{gcc} header.  This parameter takes
2817 precedence over any default @code{Gcc} rules as described later
2818 (@pxref{Archived Messages}).
2819
2820 @strong{Caveat}: It yields an error putting @code{(gcc-self . t)} in
2821 groups of an @code{nntp} server or so, because an @code{nntp} server
2822 doesn't accept articles.
2823
2824 @item auto-expire
2825 @cindex auto-expire
2826 If the group parameter has an element that looks like @code{(auto-expire
2827 . t)}, all articles read will be marked as expirable.  For an
2828 alternative approach, @pxref{Expiring Mail}.
2829
2830 See also @code{gnus-auto-expirable-newsgroups}.
2831
2832 @item total-expire
2833 @cindex total-expire
2834 If the group parameter has an element that looks like
2835 @code{(total-expire . t)}, all read articles will be put through the
2836 expiry process, even if they are not marked as expirable.  Use with
2837 caution.  Unread, ticked and dormant articles are not eligible for
2838 expiry.
2839
2840 See also @code{gnus-total-expirable-newsgroups}.
2841
2842 @item expiry-wait
2843 @cindex expiry-wait
2844 @vindex nnmail-expiry-wait-function
2845 If the group parameter has an element that looks like
2846 @code{(expiry-wait . 10)}, this value will override any
2847 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2848 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2849 can either be a number of days (not necessarily an integer) or the
2850 symbols @code{never} or @code{immediate}.
2851
2852 @item expiry-target
2853 @cindex expiry-target
2854 Where expired messages end up.  This parameter overrides
2855 @code{nnmail-expiry-target}.
2856
2857 @item score-file
2858 @cindex score file group parameter
2859 Elements that look like @code{(score-file . "file")} will make
2860 @file{file} into the current score file for the group in question.  All
2861 interactive score entries will be put into this file.
2862
2863 @item adapt-file
2864 @cindex adapt file group parameter
2865 Elements that look like @code{(adapt-file . "file")} will make
2866 @file{file} into the current adaptive file for the group in question.
2867 All adaptive score entries will be put into this file.
2868
2869 @item admin-address
2870 @cindex admin-address
2871 When unsubscribing from a mailing list you should never send the
2872 unsubscription notice to the mailing list itself.  Instead, you'd send
2873 messages to the administrative address.  This parameter allows you to
2874 put the admin address somewhere convenient.
2875
2876 @item display
2877 @cindex display
2878 Elements that look like @code{(display . MODE)} say which articles to
2879 display on entering the group.  Valid values are:
2880
2881 @table @code
2882 @item all
2883 Display all articles, both read and unread.
2884
2885 @item an integer
2886 Display the last @var{integer} articles in the group.  This is the same as
2887 entering the group with @kbd{C-u @var{integer}}.
2888
2889 @item default
2890 Display the default visible articles, which normally includes unread and
2891 ticked articles.
2892
2893 @item an array
2894 Display articles that satisfy a predicate.
2895
2896 Here are some examples:
2897
2898 @table @code
2899 @item [unread]
2900 Display only unread articles.
2901
2902 @item [not expire]
2903 Display everything except expirable articles.
2904
2905 @item [and (not reply) (not expire)]
2906 Display everything except expirable and articles you've already
2907 responded to.
2908 @end table
2909
2910 The available operators are @code{not}, @code{and} and @code{or}.
2911 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2912 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2913 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2914 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2915
2916 @end table
2917
2918 The @code{display} parameter works by limiting the summary buffer to
2919 the subset specified.  You can pop the limit by using the @kbd{/ w}
2920 command (@pxref{Limiting}).
2921
2922 @item comment
2923 @cindex comment
2924 Elements that look like @code{(comment . "This is a comment")} are
2925 arbitrary comments on the group.  You can display comments in the
2926 group line (@pxref{Group Line Specification}).
2927
2928 @item charset
2929 @cindex charset
2930 Elements that look like @code{(charset . iso-8859-1)} will make
2931 @code{iso-8859-1} the default charset; that is, the charset that will be
2932 used for all articles that do not specify a charset.
2933
2934 See also @code{gnus-group-charset-alist}.
2935
2936 @item ignored-charsets
2937 @cindex ignored-charset
2938 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2939 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2940 default charset will be used for decoding articles.
2941
2942 See also @code{gnus-group-ignored-charsets-alist}.
2943
2944 @item posting-style
2945 @cindex posting-style
2946 You can store additional posting style information for this group
2947 here (@pxref{Posting Styles}).  The format is that of an entry in the
2948 @code{gnus-posting-styles} alist, except that there's no regexp matching
2949 the group name (of course).  Style elements in this group parameter will
2950 take precedence over the ones found in @code{gnus-posting-styles}.
2951
2952 For instance, if you want a funky name and signature in this group only,
2953 instead of hacking @code{gnus-posting-styles}, you could put something
2954 like this in the group parameters:
2955
2956 @example
2957 (posting-style
2958   (name "Funky Name")
2959   ("X-My-Header" "Funky Value")
2960   (signature "Funky Signature"))
2961 @end example
2962
2963 @item post-method
2964 @cindex post-method
2965 If it is set, the value is used as the method for posting message
2966 instead of @code{gnus-post-method}.
2967
2968 @item banner
2969 @cindex banner
2970 An item like @code{(banner . @var{regexp})} causes any part of an article
2971 that matches the regular expression @var{regexp} to be stripped.  Instead of
2972 @var{regexp}, you can also use the symbol @code{signature} which strips the
2973 last signature or any of the elements of the alist
2974 @code{gnus-article-banner-alist}.
2975
2976 @item sieve
2977 @cindex sieve
2978 This parameter contains a Sieve test that should match incoming mail
2979 that should be placed in this group.  From this group parameter, a
2980 Sieve @samp{IF} control structure is generated, having the test as the
2981 condition and @samp{fileinto "group.name";} as the body.
2982
2983 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
2984 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2985 translating the group parameter into a Sieve script (@pxref{Sieve
2986 Commands}) the following Sieve code is generated:
2987
2988 @example
2989 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2990         fileinto \"INBOX.list.sieve\";
2991 @}
2992 @end example
2993
2994 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
2995 Top, sieve, Emacs Sieve}.
2996
2997 @item (@var{variable} @var{form})
2998 You can use the group parameters to set variables local to the group you
2999 are entering.  If you want to turn threading off in @samp{news.answers},
3000 you could put @code{(gnus-show-threads nil)} in the group parameters of
3001 that group.  @code{gnus-show-threads} will be made into a local variable
3002 in the summary buffer you enter, and the form @code{nil} will be
3003 @code{eval}ed there.
3004
3005 Note that this feature sets the variable locally to the summary buffer.
3006 But some variables are evaluated in the article buffer, or in the
3007 message buffer (of a reply or followup or otherwise newly created
3008 message).  As a workaround, it might help to add the variable in
3009 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3010 Stuff}.  So if you want to set @code{message-from-style} via the group
3011 parameters, then you may need the following statement elsewhere in your
3012 @file{~/.gnus} file:
3013
3014 @lisp
3015 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3016 @end lisp
3017
3018 @vindex gnus-list-identifiers
3019 A use for this feature is to remove a mailing list identifier tag in
3020 the subject fields of articles.  E.g. if the news group
3021
3022 @example
3023 nntp+news.gnus.org:gmane.text.docbook.apps
3024 @end example
3025
3026 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3027 tag can be removed from the article subjects in the summary buffer for
3028 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3029 into the group parameters for the group.
3030
3031 This can also be used as a group-specific hook function, if you'd like.
3032 If you want to hear a beep when you enter a group, you could put
3033 something like @code{(dummy-variable (ding))} in the parameters of that
3034 group.  @code{dummy-variable} will be set to the result of the
3035 @code{(ding)} form, but who cares?
3036
3037 @end table
3038
3039 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3040 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3041 presents you with a Customize-like interface.  The latter helps avoid
3042 silly Lisp errors.)  You might also be interested in reading about topic
3043 parameters (@pxref{Topic Parameters}).
3044
3045 @vindex gnus-parameters
3046 Group parameters can be set via the @code{gnus-parameters} variable too.
3047 But some variables, such as @code{visible}, have no effect.  For
3048 example:
3049
3050 @lisp
3051 (setq gnus-parameters
3052       '(("mail\\..*"
3053          (gnus-show-threads nil)
3054          (gnus-use-scoring nil)
3055          (gnus-summary-line-format
3056           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3057          (gcc-self . t)
3058          (display . all))
3059
3060         ("^nnimap:\\(foo.bar\\)$"
3061          (to-group . "\\1"))
3062
3063         ("mail\\.me"
3064          (gnus-use-scoring  t))
3065
3066         ("list\\..*"
3067          (total-expire . t)
3068          (broken-reply-to . t))))
3069 @end lisp
3070
3071 String value of parameters will be subjected to regexp substitution, as
3072 the @code{to-group} example shows.
3073
3074
3075 @node Listing Groups
3076 @section Listing Groups
3077 @cindex group listing
3078
3079 These commands all list various slices of the groups available.
3080
3081 @table @kbd
3082
3083 @item l
3084 @itemx A s
3085 @kindex A s (Group)
3086 @kindex l (Group)
3087 @findex gnus-group-list-groups
3088 List all groups that have unread articles
3089 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3090 command will list only groups of level ARG and lower.  By default, it
3091 only lists groups of level five (i.e.,
3092 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3093 groups).
3094
3095 @item L
3096 @itemx A u
3097 @kindex A u (Group)
3098 @kindex L (Group)
3099 @findex gnus-group-list-all-groups
3100 List all groups, whether they have unread articles or not
3101 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3102 this command will list only groups of level ARG and lower.  By default,
3103 it lists groups of level seven or lower (i.e., just subscribed and
3104 unsubscribed groups).
3105
3106 @item A l
3107 @kindex A l (Group)
3108 @findex gnus-group-list-level
3109 List all unread groups on a specific level
3110 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3111 with no unread articles.
3112
3113 @item A k
3114 @kindex A k (Group)
3115 @findex gnus-group-list-killed
3116 List all killed groups (@code{gnus-group-list-killed}).  If given a
3117 prefix argument, really list all groups that are available, but aren't
3118 currently (un)subscribed.  This could entail reading the active file
3119 from the server.
3120
3121 @item A z
3122 @kindex A z (Group)
3123 @findex gnus-group-list-zombies
3124 List all zombie groups (@code{gnus-group-list-zombies}).
3125
3126 @item A m
3127 @kindex A m (Group)
3128 @findex gnus-group-list-matching
3129 List all unread, subscribed groups with names that match a regexp
3130 (@code{gnus-group-list-matching}).
3131
3132 @item A M
3133 @kindex A M (Group)
3134 @findex gnus-group-list-all-matching
3135 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3136
3137 @item A A
3138 @kindex A A (Group)
3139 @findex gnus-group-list-active
3140 List absolutely all groups in the active file(s) of the
3141 server(s) you are connected to (@code{gnus-group-list-active}).  This
3142 might very well take quite a while.  It might actually be a better idea
3143 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3144 thing to match on.  Also note that this command may list groups that
3145 don't exist (yet)---these will be listed as if they were killed groups.
3146 Take the output with some grains of salt.
3147
3148 @item A a
3149 @kindex A a (Group)
3150 @findex gnus-group-apropos
3151 List all groups that have names that match a regexp
3152 (@code{gnus-group-apropos}).
3153
3154 @item A d
3155 @kindex A d (Group)
3156 @findex gnus-group-description-apropos
3157 List all groups that have names or descriptions that match a regexp
3158 (@code{gnus-group-description-apropos}).
3159
3160 @item A c
3161 @kindex A c (Group)
3162 @findex gnus-group-list-cached
3163 List all groups with cached articles (@code{gnus-group-list-cached}).
3164
3165 @item A ?
3166 @kindex A ? (Group)
3167 @findex gnus-group-list-dormant
3168 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3169
3170 @item A /
3171 @kindex A / (Group)
3172 @findex gnus-group-list-limit
3173 List groups limited within the current selection
3174 (@code{gnus-group-list-limit}).
3175
3176 @item A f
3177 @kindex A f (Group)
3178 @findex gnus-group-list-flush
3179 Flush groups from the current selection (@code{gnus-group-list-flush}).
3180
3181 @item A p
3182 @kindex A p (Group)
3183 @findex gnus-group-list-plus
3184 List groups plus the current selection (@code{gnus-group-list-plus}).
3185
3186 @end table
3187
3188 @vindex gnus-permanently-visible-groups
3189 @cindex visible group parameter
3190 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3191 always be shown, whether they have unread articles or not.  You can also
3192 add the @code{visible} element to the group parameters in question to
3193 get the same effect.
3194
3195 @vindex gnus-list-groups-with-ticked-articles
3196 Groups that have just ticked articles in it are normally listed in the
3197 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3198 @code{nil}, these groups will be treated just like totally empty
3199 groups.  It is @code{t} by default.
3200
3201
3202 @node Sorting Groups
3203 @section Sorting Groups
3204 @cindex sorting groups
3205
3206 @kindex C-c C-s (Group)
3207 @findex gnus-group-sort-groups
3208 @vindex gnus-group-sort-function
3209 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3210 group buffer according to the function(s) given by the
3211 @code{gnus-group-sort-function} variable.  Available sorting functions
3212 include:
3213
3214 @table @code
3215
3216 @item gnus-group-sort-by-alphabet
3217 @findex gnus-group-sort-by-alphabet
3218 Sort the group names alphabetically.  This is the default.
3219
3220 @item gnus-group-sort-by-real-name
3221 @findex gnus-group-sort-by-real-name
3222 Sort the group alphabetically on the real (unprefixed) group names.
3223
3224 @item gnus-group-sort-by-level
3225 @findex gnus-group-sort-by-level
3226 Sort by group level.
3227
3228 @item gnus-group-sort-by-score
3229 @findex gnus-group-sort-by-score
3230 Sort by group score.  @xref{Group Score}.
3231
3232 @item gnus-group-sort-by-rank
3233 @findex gnus-group-sort-by-rank
3234 Sort by group score and then the group level.  The level and the score
3235 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3236
3237 @item gnus-group-sort-by-unread
3238 @findex gnus-group-sort-by-unread
3239 Sort by number of unread articles.
3240
3241 @item gnus-group-sort-by-method
3242 @findex gnus-group-sort-by-method
3243 Sort alphabetically on the select method.
3244
3245 @item gnus-group-sort-by-server
3246 @findex gnus-group-sort-by-server
3247 Sort alphabetically on the Gnus server name.
3248
3249
3250 @end table
3251
3252 @code{gnus-group-sort-function} can also be a list of sorting
3253 functions.  In that case, the most significant sort key function must be
3254 the last one.
3255
3256
3257 There are also a number of commands for sorting directly according to
3258 some sorting criteria:
3259
3260 @table @kbd
3261 @item G S a
3262 @kindex G S a (Group)
3263 @findex gnus-group-sort-groups-by-alphabet
3264 Sort the group buffer alphabetically by group name
3265 (@code{gnus-group-sort-groups-by-alphabet}).
3266
3267 @item G S u
3268 @kindex G S u (Group)
3269 @findex gnus-group-sort-groups-by-unread
3270 Sort the group buffer by the number of unread articles
3271 (@code{gnus-group-sort-groups-by-unread}).
3272
3273 @item G S l
3274 @kindex G S l (Group)
3275 @findex gnus-group-sort-groups-by-level
3276 Sort the group buffer by group level
3277 (@code{gnus-group-sort-groups-by-level}).
3278
3279 @item G S v
3280 @kindex G S v (Group)
3281 @findex gnus-group-sort-groups-by-score
3282 Sort the group buffer by group score
3283 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3284
3285 @item G S r
3286 @kindex G S r (Group)
3287 @findex gnus-group-sort-groups-by-rank
3288 Sort the group buffer by group rank
3289 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3290
3291 @item G S m
3292 @kindex G S m (Group)
3293 @findex gnus-group-sort-groups-by-method
3294 Sort the group buffer alphabetically by back end name@*
3295 (@code{gnus-group-sort-groups-by-method}).
3296
3297 @item G S n
3298 @kindex G S n (Group)
3299 @findex gnus-group-sort-groups-by-real-name
3300 Sort the group buffer alphabetically by real (unprefixed) group name
3301 (@code{gnus-group-sort-groups-by-real-name}).
3302
3303 @end table
3304
3305 All the commands below obey the process/prefix convention
3306 (@pxref{Process/Prefix}).
3307
3308 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3309 commands will sort in reverse order.
3310
3311 You can also sort a subset of the groups:
3312
3313 @table @kbd
3314 @item G P a
3315 @kindex G P a (Group)
3316 @findex gnus-group-sort-selected-groups-by-alphabet
3317 Sort the groups alphabetically by group name
3318 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3319
3320 @item G P u
3321 @kindex G P u (Group)
3322 @findex gnus-group-sort-selected-groups-by-unread
3323 Sort the groups by the number of unread articles
3324 (@code{gnus-group-sort-selected-groups-by-unread}).
3325
3326 @item G P l
3327 @kindex G P l (Group)
3328 @findex gnus-group-sort-selected-groups-by-level
3329 Sort the groups by group level
3330 (@code{gnus-group-sort-selected-groups-by-level}).
3331
3332 @item G P v
3333 @kindex G P v (Group)
3334 @findex gnus-group-sort-selected-groups-by-score
3335 Sort the groups by group score
3336 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3337
3338 @item G P r
3339 @kindex G P r (Group)
3340 @findex gnus-group-sort-selected-groups-by-rank
3341 Sort the groups by group rank
3342 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3343
3344 @item G P m
3345 @kindex G P m (Group)
3346 @findex gnus-group-sort-selected-groups-by-method
3347 Sort the groups alphabetically by back end name@*
3348 (@code{gnus-group-sort-selected-groups-by-method}).
3349
3350 @item G P n
3351 @kindex G P n (Group)
3352 @findex gnus-group-sort-selected-groups-by-real-name
3353 Sort the groups alphabetically by real (unprefixed) group name
3354 (@code{gnus-group-sort-selected-groups-by-real-name}).
3355
3356 @item G P s
3357 @kindex G P s (Group)
3358 @findex gnus-group-sort-selected-groups
3359 Sort the groups according to @code{gnus-group-sort-function}.
3360
3361 @end table
3362
3363 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3364 move groups around.
3365
3366
3367 @node Group Maintenance
3368 @section Group Maintenance
3369 @cindex bogus groups
3370
3371 @table @kbd
3372 @item b
3373 @kindex b (Group)
3374 @findex gnus-group-check-bogus-groups
3375 Find bogus groups and delete them
3376 (@code{gnus-group-check-bogus-groups}).
3377
3378 @item F
3379 @kindex F (Group)
3380 @findex gnus-group-find-new-groups
3381 Find new groups and process them (@code{gnus-group-find-new-groups}).
3382 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3383 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3384 to query the server for new groups, and subscribe the new groups as
3385 zombies.
3386
3387 @item C-c C-x
3388 @kindex C-c C-x (Group)
3389 @findex gnus-group-expire-articles
3390 Run all expirable articles in the current group through the expiry
3391 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3392 all expirable articles in the group that have been around for a while.
3393 (@pxref{Expiring Mail}).
3394
3395 @item C-c C-M-x
3396 @kindex C-c C-M-x (Group)
3397 @findex gnus-group-expire-all-groups
3398 Run all expirable articles in all groups through the expiry process
3399 (@code{gnus-group-expire-all-groups}).
3400
3401 @end table
3402
3403
3404 @node Browse Foreign Server
3405 @section Browse Foreign Server
3406 @cindex foreign servers
3407 @cindex browsing servers
3408
3409 @table @kbd
3410 @item B
3411 @kindex B (Group)
3412 @findex gnus-group-browse-foreign-server
3413 You will be queried for a select method and a server name.  Gnus will
3414 then attempt to contact this server and let you browse the groups there
3415 (@code{gnus-group-browse-foreign-server}).
3416 @end table
3417
3418 @findex gnus-browse-mode
3419 A new buffer with a list of available groups will appear.  This buffer
3420 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3421 a lot) like a normal group buffer.
3422
3423 Here's a list of keystrokes available in the browse mode:
3424
3425 @table @kbd
3426 @item n
3427 @kindex n (Browse)
3428 @findex gnus-group-next-group
3429 Go to the next group (@code{gnus-group-next-group}).
3430
3431 @item p
3432 @kindex p (Browse)
3433 @findex gnus-group-prev-group
3434 Go to the previous group (@code{gnus-group-prev-group}).
3435
3436 @item SPACE
3437 @kindex SPACE (Browse)
3438 @findex gnus-browse-read-group
3439 Enter the current group and display the first article
3440 (@code{gnus-browse-read-group}).
3441
3442 @item RET
3443 @kindex RET (Browse)
3444 @findex gnus-browse-select-group
3445 Enter the current group (@code{gnus-browse-select-group}).
3446
3447 @item u
3448 @kindex u (Browse)
3449 @findex gnus-browse-unsubscribe-current-group
3450 Unsubscribe to the current group, or, as will be the case here,
3451 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3452
3453 @item l
3454 @itemx q
3455 @kindex q (Browse)
3456 @kindex l (Browse)
3457 @findex gnus-browse-exit
3458 Exit browse mode (@code{gnus-browse-exit}).
3459
3460 @item d
3461 @kindex d (Browse)
3462 @findex gnus-browse-describe-group
3463 Describe the current group (@code{gnus-browse-describe-group}).
3464
3465 @item ?
3466 @kindex ? (Browse)
3467 @findex gnus-browse-describe-briefly
3468 Describe browse mode briefly (well, there's not much to describe, is
3469 there) (@code{gnus-browse-describe-briefly}).
3470 @end table
3471
3472
3473 @node Exiting Gnus
3474 @section Exiting gnus
3475 @cindex exiting gnus
3476
3477 Yes, gnus is ex(c)iting.
3478
3479 @table @kbd
3480 @item z
3481 @kindex z (Group)
3482 @findex gnus-group-suspend
3483 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3484 but it kills all buffers except the Group buffer.  I'm not sure why this
3485 is a gain, but then who am I to judge?
3486
3487 @item q
3488 @kindex q (Group)
3489 @findex gnus-group-exit
3490 @c @icon{gnus-group-exit}
3491 Quit gnus (@code{gnus-group-exit}).
3492
3493 @item Q
3494 @kindex Q (Group)
3495 @findex gnus-group-quit
3496 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3497 The dribble file will be saved, though (@pxref{Auto Save}).
3498 @end table
3499
3500 @vindex gnus-exit-gnus-hook
3501 @vindex gnus-suspend-gnus-hook
3502 @vindex gnus-after-exiting-gnus-hook
3503 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3504 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3505 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3506 exiting gnus.
3507
3508 Note:
3509
3510 @quotation
3511 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3512 numbly heavy and herself fall into a hazy trance as the boy sitting
3513 behind her drew repeated lines with his pencil across the back of her
3514 plastic chair.
3515 @end quotation
3516
3517
3518 @node Group Topics
3519 @section Group Topics
3520 @cindex topics
3521
3522 If you read lots and lots of groups, it might be convenient to group
3523 them hierarchically according to topics.  You put your Emacs groups over
3524 here, your sex groups over there, and the rest (what, two groups or so?)
3525 you put in some misc section that you never bother with anyway.  You can
3526 even group the Emacs sex groups as a sub-topic to either the Emacs
3527 groups or the sex groups---or both!  Go wild!
3528
3529 @iftex
3530 @iflatex
3531 \gnusfigure{Group Topics}{400}{
3532 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3533 }
3534 @end iflatex
3535 @end iftex
3536
3537 Here's an example:
3538
3539 @example
3540 Gnus
3541   Emacs -- I wuw it!
3542      3: comp.emacs
3543      2: alt.religion.emacs
3544     Naughty Emacs
3545      452: alt.sex.emacs
3546        0: comp.talk.emacs.recovery
3547   Misc
3548      8: comp.binaries.fractals
3549     13: comp.sources.unix
3550 @end example
3551
3552 @findex gnus-topic-mode
3553 @kindex t (Group)
3554 To get this @emph{fab} functionality you simply turn on (ooh!) the
3555 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3556 is a toggling command.)
3557
3558 Go ahead, just try it.  I'll still be here when you get back.  La de
3559 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3560 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3561 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3562 Hot and bothered?
3563
3564 If you want this permanently enabled, you should add that minor mode to
3565 the hook for the group mode.  Put the following line in your
3566 @file{~/.gnus.el} file:
3567
3568 @lisp
3569 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3570 @end lisp
3571
3572 @menu
3573 * Topic Commands::              Interactive E-Z commands.
3574 * Topic Variables::             How to customize the topics the Lisp Way.
3575 * Topic Sorting::               Sorting each topic individually.
3576 * Topic Topology::              A map of the world.
3577 * Topic Parameters::            Parameters that apply to all groups in a topic.
3578 @end menu
3579
3580
3581 @node Topic Commands
3582 @subsection Topic Commands
3583 @cindex topic commands
3584
3585 When the topic minor mode is turned on, a new @kbd{T} submap will be
3586 available.  In addition, a few of the standard keys change their
3587 definitions slightly.
3588
3589 In general, the following kinds of operations are possible on topics.
3590 First of all, you want to create topics.  Secondly, you want to put
3591 groups in topics and to move them around until you have an order you
3592 like.  The third kind of operation is to show/hide parts of the whole
3593 shebang.  You might want to hide a topic including its subtopics and
3594 groups, to get a better overview of the other groups.
3595
3596 Here is a list of the basic keys that you might need to set up topics
3597 the way you like.
3598
3599 @table @kbd
3600
3601 @item T n
3602 @kindex T n (Topic)
3603 @findex gnus-topic-create-topic
3604 Prompt for a new topic name and create it
3605 (@code{gnus-topic-create-topic}).
3606
3607 @item T TAB
3608 @itemx TAB
3609 @kindex T TAB (Topic)
3610 @kindex TAB (Topic)
3611 @findex gnus-topic-indent
3612 ``Indent'' the current topic so that it becomes a sub-topic of the
3613 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3614 ``un-indent'' the topic instead.
3615
3616 @item M-TAB
3617 @kindex M-TAB (Topic)
3618 @findex gnus-topic-unindent
3619 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3620 parent of its current parent (@code{gnus-topic-unindent}).
3621
3622 @end table
3623
3624 The following two keys can be used to move groups and topics around.
3625 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3626 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3627 kill and yank rather than cut and paste.
3628
3629 @table @kbd
3630
3631 @item C-k
3632 @kindex C-k (Topic)
3633 @findex gnus-topic-kill-group
3634 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3635 topic will be removed along with the topic.
3636
3637 @item C-y
3638 @kindex C-y (Topic)
3639 @findex gnus-topic-yank-group
3640 Yank the previously killed group or topic
3641 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3642 before all groups.
3643
3644 So, to move a topic to the beginning of the list of topics, just hit
3645 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3646 move the cursor to the beginning of the buffer (just below the ``Gnus''
3647 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3648 paste.  Like I said -- E-Z.
3649
3650 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3651 you can move topics around as well as groups.
3652
3653 @end table
3654
3655 After setting up the topics the way you like them, you might wish to
3656 hide a topic, or to show it again.  That's why we have the following
3657 key.
3658
3659 @table @kbd
3660
3661 @item RET
3662 @kindex RET (Topic)
3663 @findex gnus-topic-select-group
3664 @itemx SPACE
3665 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3666 When you perform this command on a group, you'll enter the group, as
3667 usual.  When done on a topic line, the topic will be folded (if it was
3668 visible) or unfolded (if it was folded already).  So it's basically a
3669 toggling command on topics.  In addition, if you give a numerical
3670 prefix, group on that level (and lower) will be displayed.
3671
3672 @end table
3673
3674 Now for a list of other commands, in no particular order.
3675
3676 @table @kbd
3677
3678 @item T m
3679 @kindex T m (Topic)
3680 @findex gnus-topic-move-group
3681 Move the current group to some other topic
3682 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3683 convention (@pxref{Process/Prefix}).
3684
3685 @item T j
3686 @kindex T j (Topic)
3687 @findex gnus-topic-jump-to-topic
3688 Go to a topic (@code{gnus-topic-jump-to-topic}).
3689
3690 @item T c
3691 @kindex T c (Topic)
3692 @findex gnus-topic-copy-group
3693 Copy the current group to some other topic
3694 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3695 convention (@pxref{Process/Prefix}).
3696
3697 @item T h
3698 @kindex T h (Topic)
3699 @findex gnus-topic-hide-topic
3700 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3701 a prefix, hide the topic permanently.
3702
3703 @item T s
3704 @kindex T s (Topic)
3705 @findex gnus-topic-show-topic
3706 Show the current topic (@code{gnus-topic-show-topic}).  If given
3707 a prefix, show the topic permanently.
3708
3709 @item T D
3710 @kindex T D (Topic)
3711 @findex gnus-topic-remove-group
3712 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3713 This command is mainly useful if you have the same group in several
3714 topics and wish to remove it from one of the topics.  You may also
3715 remove a group from all topics, but in that case, Gnus will add it to
3716 the root topic the next time you start Gnus.  In fact, all new groups
3717 (which, naturally, don't belong to any topic) will show up in the root
3718 topic.
3719
3720 This command uses the process/prefix convention
3721 (@pxref{Process/Prefix}).
3722
3723 @item T M
3724 @kindex T M (Topic)
3725 @findex gnus-topic-move-matching
3726 Move all groups that match some regular expression to a topic
3727 (@code{gnus-topic-move-matching}).
3728
3729 @item T C
3730 @kindex T C (Topic)
3731 @findex gnus-topic-copy-matching
3732 Copy all groups that match some regular expression to a topic
3733 (@code{gnus-topic-copy-matching}).
3734
3735 @item T H
3736 @kindex T H (Topic)
3737 @findex gnus-topic-toggle-display-empty-topics
3738 Toggle hiding empty topics
3739 (@code{gnus-topic-toggle-display-empty-topics}).
3740
3741 @item T #
3742 @kindex T # (Topic)
3743 @findex gnus-topic-mark-topic
3744 Mark all groups in the current topic with the process mark
3745 (@code{gnus-topic-mark-topic}).  This command works recursively on
3746 sub-topics unless given a prefix.
3747
3748 @item T M-#
3749 @kindex T M-# (Topic)
3750 @findex gnus-topic-unmark-topic
3751 Remove the process mark from all groups in the current topic
3752 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3753 sub-topics unless given a prefix.
3754
3755 @item C-c C-x
3756 @kindex C-c C-x (Topic)
3757 @findex gnus-topic-expire-articles
3758 Run all expirable articles in the current group or topic through the
3759 expiry process (if any)
3760 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3761
3762 @item T r
3763 @kindex T r (Topic)
3764 @findex gnus-topic-rename
3765 Rename a topic (@code{gnus-topic-rename}).
3766
3767 @item T DEL
3768 @kindex T DEL (Topic)
3769 @findex gnus-topic-delete
3770 Delete an empty topic (@code{gnus-topic-delete}).
3771
3772 @item A T
3773 @kindex A T (Topic)
3774 @findex gnus-topic-list-active
3775 List all groups that gnus knows about in a topics-ified way
3776 (@code{gnus-topic-list-active}).
3777
3778 @item T M-n
3779 @kindex T M-n (Topic)
3780 @findex gnus-topic-goto-next-topic
3781 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3782
3783 @item T M-p
3784 @kindex T M-p (Topic)
3785 @findex gnus-topic-goto-previous-topic
3786 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3787
3788 @item G p
3789 @kindex G p (Topic)
3790 @findex gnus-topic-edit-parameters
3791 @cindex group parameters
3792 @cindex topic parameters
3793 @cindex parameters
3794 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3795 @xref{Topic Parameters}.
3796
3797 @end table
3798
3799
3800 @node Topic Variables
3801 @subsection Topic Variables
3802 @cindex topic variables
3803
3804 The previous section told you how to tell Gnus which topics to display.
3805 This section explains how to tell Gnus what to display about each topic.
3806
3807 @vindex gnus-topic-line-format
3808 The topic lines themselves are created according to the
3809 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3810 Valid elements are:
3811
3812 @table @samp
3813 @item i
3814 Indentation.
3815 @item n
3816 Topic name.
3817 @item v
3818 Visibility.
3819 @item l
3820 Level.
3821 @item g
3822 Number of groups in the topic.
3823 @item a
3824 Number of unread articles in the topic.
3825 @item A
3826 Number of unread articles in the topic and all its subtopics.
3827 @end table
3828
3829 @vindex gnus-topic-indent-level
3830 Each sub-topic (and the groups in the sub-topics) will be indented with
3831 @code{gnus-topic-indent-level} times the topic level number of spaces.
3832 The default is 2.
3833
3834 @vindex gnus-topic-mode-hook
3835 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3836
3837 @vindex gnus-topic-display-empty-topics
3838 The @code{gnus-topic-display-empty-topics} says whether to display even
3839 topics that have no unread articles in them.  The default is @code{t}.
3840
3841
3842 @node Topic Sorting
3843 @subsection Topic Sorting
3844 @cindex topic sorting
3845
3846 You can sort the groups in each topic individually with the following
3847 commands:
3848
3849
3850 @table @kbd
3851 @item T S a
3852 @kindex T S a (Topic)
3853 @findex gnus-topic-sort-groups-by-alphabet
3854 Sort the current topic alphabetically by group name
3855 (@code{gnus-topic-sort-groups-by-alphabet}).
3856
3857 @item T S u
3858 @kindex T S u (Topic)
3859 @findex gnus-topic-sort-groups-by-unread
3860 Sort the current topic by the number of unread articles
3861 (@code{gnus-topic-sort-groups-by-unread}).
3862
3863 @item T S l
3864 @kindex T S l (Topic)
3865 @findex gnus-topic-sort-groups-by-level
3866 Sort the current topic by group level
3867 (@code{gnus-topic-sort-groups-by-level}).
3868
3869 @item T S v
3870 @kindex T S v (Topic)
3871 @findex gnus-topic-sort-groups-by-score
3872 Sort the current topic by group score
3873 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3874
3875 @item T S r
3876 @kindex T S r (Topic)
3877 @findex gnus-topic-sort-groups-by-rank
3878 Sort the current topic by group rank
3879 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3880
3881 @item T S m
3882 @kindex T S m (Topic)
3883 @findex gnus-topic-sort-groups-by-method
3884 Sort the current topic alphabetically by back end name
3885 (@code{gnus-topic-sort-groups-by-method}).
3886
3887 @item T S e
3888 @kindex T S e (Topic)
3889 @findex gnus-topic-sort-groups-by-server
3890 Sort the current topic alphabetically by server name
3891 (@code{gnus-topic-sort-groups-by-server}).
3892
3893 @item T S s
3894 @kindex T S s
3895 @findex gnus-topic-sort-groups
3896 Sort the current topic according to the function(s) given by the
3897 @code{gnus-group-sort-function} variable
3898 (@code{gnus-topic-sort-groups}).
3899
3900 @end table
3901
3902 When given a prefix argument, all these commands will sort in reverse
3903 order.  @xref{Sorting Groups}, for more information about group
3904 sorting.
3905
3906
3907 @node Topic Topology
3908 @subsection Topic Topology
3909 @cindex topic topology
3910 @cindex topology
3911
3912 So, let's have a look at an example group buffer:
3913
3914 @example
3915 @group
3916 Gnus
3917   Emacs -- I wuw it!
3918      3: comp.emacs
3919      2: alt.religion.emacs
3920     Naughty Emacs
3921      452: alt.sex.emacs
3922        0: comp.talk.emacs.recovery
3923   Misc
3924      8: comp.binaries.fractals
3925     13: comp.sources.unix
3926 @end group
3927 @end example
3928
3929 So, here we have one top-level topic (@samp{Gnus}), two topics under
3930 that, and one sub-topic under one of the sub-topics.  (There is always
3931 just one (1) top-level topic).  This topology can be expressed as
3932 follows:
3933
3934 @lisp
3935 (("Gnus" visible)
3936  (("Emacs -- I wuw it!" visible)
3937   (("Naughty Emacs" visible)))
3938  (("Misc" visible)))
3939 @end lisp
3940
3941 @vindex gnus-topic-topology
3942 This is in fact how the variable @code{gnus-topic-topology} would look
3943 for the display above.  That variable is saved in the @file{.newsrc.eld}
3944 file, and shouldn't be messed with manually---unless you really want
3945 to.  Since this variable is read from the @file{.newsrc.eld} file,
3946 setting it in any other startup files will have no effect.
3947
3948 This topology shows what topics are sub-topics of what topics (right),
3949 and which topics are visible.  Two settings are currently
3950 allowed---@code{visible} and @code{invisible}.
3951
3952
3953 @node Topic Parameters
3954 @subsection Topic Parameters
3955 @cindex topic parameters
3956
3957 All groups in a topic will inherit group parameters from the parent (and
3958 ancestor) topic parameters.  All valid group parameters are valid topic
3959 parameters (@pxref{Group Parameters}).
3960
3961 In addition, the following parameters are only valid as topic
3962 parameters:
3963
3964 @table @code
3965 @item subscribe
3966 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3967 @code{subscribe} topic parameter says what groups go in what topic.  Its
3968 value should be a regexp to match the groups that should go in that
3969 topic.
3970
3971 @item subscribe-level
3972 When subscribing new groups by topic (see the @code{subscribe} parameter),
3973 the group will be subscribed with the level specified in the
3974 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3975
3976 @end table
3977
3978 Group parameters (of course) override topic parameters, and topic
3979 parameters in sub-topics override topic parameters in super-topics.  You
3980 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3981 verb, although you may feel free to disagree with me here.)
3982
3983 @example
3984 @group
3985 Gnus
3986   Emacs
3987      3: comp.emacs
3988      2: alt.religion.emacs
3989    452: alt.sex.emacs
3990     Relief
3991      452: alt.sex.emacs
3992        0: comp.talk.emacs.recovery
3993   Misc
3994      8: comp.binaries.fractals
3995     13: comp.sources.unix
3996    452: alt.sex.emacs
3997 @end group   
3998 @end example
3999
4000 The @samp{Emacs} topic has the topic parameter @code{(score-file
4001 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4002 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4003 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4004 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4005 . "religion.SCORE")}.
4006
4007 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4008 will get the @file{relief.SCORE} home score file.  If you enter the same
4009 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4010 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4011 get the @file{religion.SCORE} home score file.
4012
4013 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4014 there are some problems, especially with the @code{total-expiry}
4015 parameter.  Say you have a mail group in two topics; one with
4016 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4017 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4018 of these topics you mean to expire articles from, so anything may
4019 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4020 happens.  You just have to be careful if you do stuff like that.
4021
4022
4023 @node Misc Group Stuff
4024 @section Misc Group Stuff
4025
4026 @menu
4027 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
4028 * Group Information::           Information and help on groups and Gnus.
4029 * Group Timestamp::             Making Gnus keep track of when you last read a group.
4030 * File Commands::               Reading and writing the Gnus files.
4031 * Sieve Commands::              Managing Sieve scripts.
4032 @end menu
4033
4034 @table @kbd
4035
4036 @item ^
4037 @kindex ^ (Group)
4038 @findex gnus-group-enter-server-mode
4039 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4040 @xref{Server Buffer}.
4041
4042 @item a
4043 @kindex a (Group)
4044 @findex gnus-group-post-news
4045 Start composing a message (a news by default)
4046 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4047 under the point.  If the prefix is 1, prompt for a group to post to.
4048 Contrary to what the name of this function suggests, the prepared
4049 article might be a mail instead of a news, if a mail group is specified
4050 with the prefix argument.  @xref{Composing Messages}.
4051
4052 @item m
4053 @kindex m (Group)
4054 @findex gnus-group-mail
4055 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4056 use the posting style of the group under the point.  If the prefix is 1,
4057 prompt for a group name to find the posting style.
4058 @xref{Composing Messages}.
4059
4060 @item i
4061 @kindex i (Group)
4062 @findex gnus-group-news
4063 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4064 post to the group under the point.  If the prefix is 1, prompt
4065 for group to post to.  @xref{Composing Messages}.
4066
4067 This function actually prepares a news even when using mail groups.
4068 This is useful for ``posting'' messages to mail groups without actually
4069 sending them over the network: they're just saved directly to the group
4070 in question.  The corresponding back end must have a request-post method
4071 for this to work though.
4072
4073 @end table
4074
4075 Variables for the group buffer:
4076
4077 @table @code
4078
4079 @item gnus-group-mode-hook
4080 @vindex gnus-group-mode-hook
4081 is called after the group buffer has been
4082 created.
4083
4084 @item gnus-group-prepare-hook
4085 @vindex gnus-group-prepare-hook
4086 is called after the group buffer is
4087 generated.  It may be used to modify the buffer in some strange,
4088 unnatural way.
4089
4090 @item gnus-group-prepared-hook
4091 @vindex gnus-group-prepare-hook
4092 is called as the very last thing after the group buffer has been
4093 generated.  It may be used to move point around, for instance.
4094
4095 @item gnus-permanently-visible-groups
4096 @vindex gnus-permanently-visible-groups
4097 Groups matching this regexp will always be listed in the group buffer,
4098 whether they are empty or not.
4099
4100 @item gnus-group-name-charset-method-alist
4101 @vindex gnus-group-name-charset-method-alist
4102 An alist of method and the charset for group names.  It is used to show
4103 non-@acronym{ASCII} group names.
4104
4105 For example:
4106 @lisp
4107 (setq gnus-group-name-charset-method-alist
4108     '(((nntp "news.com.cn") . cn-gb-2312)))
4109 @end lisp
4110
4111 @item gnus-group-name-charset-group-alist
4112 @cindex UTF-8 group names
4113 @vindex gnus-group-name-charset-group-alist
4114 An alist of regexp of group name and the charset for group names.  It
4115 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4116 utf-8))} is the default value if UTF-8 is supported, otherwise the
4117 default is @code{nil}.
4118
4119 For example:
4120 @lisp
4121 (setq gnus-group-name-charset-group-alist
4122     '(("\\.com\\.cn:" . cn-gb-2312)))
4123 @end lisp
4124
4125 @end table
4126
4127 @node Scanning New Messages
4128 @subsection Scanning New Messages
4129 @cindex new messages
4130 @cindex scanning new news
4131
4132 @table @kbd
4133
4134 @item g
4135 @kindex g (Group)
4136 @findex gnus-group-get-new-news
4137 @c @icon{gnus-group-get-new-news}
4138 Check the server(s) for new articles.  If the numerical prefix is used,
4139 this command will check only groups of level @var{arg} and lower
4140 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4141 command will force a total re-reading of the active file(s) from the
4142 back end(s).
4143
4144 @item M-g
4145 @kindex M-g (Group)
4146 @findex gnus-group-get-new-news-this-group
4147 @vindex gnus-goto-next-group-when-activating
4148 @c @icon{gnus-group-get-new-news-this-group}
4149 Check whether new articles have arrived in the current group
4150 (@code{gnus-group-get-new-news-this-group}).
4151 @code{gnus-goto-next-group-when-activating} says whether this command is
4152 to move point to the next group or not.  It is @code{t} by default.
4153
4154 @findex gnus-activate-all-groups
4155 @cindex activating groups
4156 @item C-c M-g
4157 @kindex C-c M-g (Group)
4158 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4159
4160 @item R
4161 @kindex R (Group)
4162 @cindex restarting
4163 @findex gnus-group-restart
4164 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4165 file(s), closes the connection to all servers, clears up all run-time
4166 gnus variables, and then starts gnus all over again.
4167
4168 @end table
4169
4170 @vindex gnus-get-new-news-hook
4171 @code{gnus-get-new-news-hook} is run just before checking for new news.
4172
4173 @vindex gnus-after-getting-new-news-hook
4174 @code{gnus-after-getting-new-news-hook} is run after checking for new
4175 news.
4176
4177
4178 @node Group Information
4179 @subsection Group Information
4180 @cindex group information
4181 @cindex information on groups
4182
4183 @table @kbd
4184
4185
4186 @item H f
4187 @kindex H f (Group)
4188 @findex gnus-group-fetch-faq
4189 @vindex gnus-group-faq-directory
4190 @cindex FAQ
4191 @cindex ange-ftp
4192 Try to fetch the @acronym{FAQ} for the current group
4193 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4194 from @code{gnus-group-faq-directory}, which is usually a directory on
4195 a remote machine.  This variable can also be a list of directories.
4196 In that case, giving a prefix to this command will allow you to choose
4197 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4198 used for fetching the file.
4199
4200 If fetching from the first site is unsuccessful, gnus will attempt to go
4201 through @code{gnus-group-faq-directory} and try to open them one by one.
4202
4203 @item H c
4204 @kindex H c (Group)
4205 @findex gnus-group-fetch-charter
4206 @vindex gnus-group-charter-alist
4207 @cindex charter
4208 Try to open the charter for the current group in a web browser
4209 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4210 prefix argument.
4211
4212 Gnus will use @code{gnus-group-charter-alist} to find the location of
4213 the charter.  If no location is known, Gnus will fetch the control
4214 messages for the group, which in some cases includes the charter.
4215
4216 @item H C
4217 @kindex H C (Group)
4218 @findex gnus-group-fetch-control
4219 @vindex gnus-group-fetch-control-use-browse-url
4220 @cindex control message
4221 Fetch the control messages for the group from the archive at
4222 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4223 group if given a prefix argument.
4224
4225 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4226 Gnus will open the control messages in a browser using
4227 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4228 and displayed in an ephemeral group.
4229
4230 Note that the control messages are compressed.  To use this command
4231 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4232 Files, ,Compressed Files, emacs, The Emacs Manual}).
4233
4234 @item H d
4235 @itemx C-c C-d
4236 @c @icon{gnus-group-describe-group}
4237 @kindex H d (Group)
4238 @kindex C-c C-d (Group)
4239 @cindex describing groups
4240 @cindex group description
4241 @findex gnus-group-describe-group
4242 Describe the current group (@code{gnus-group-describe-group}).  If given
4243 a prefix, force Gnus to re-read the description from the server.
4244
4245 @item M-d
4246 @kindex M-d (Group)
4247 @findex gnus-group-describe-all-groups
4248 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4249 prefix, force gnus to re-read the description file from the server.
4250
4251 @item H v
4252 @itemx V
4253 @kindex V (Group)
4254 @kindex H v (Group)
4255 @cindex version
4256 @findex gnus-version
4257 Display current gnus version numbers (@code{gnus-version}).
4258
4259 @item ?
4260 @kindex ? (Group)
4261 @findex gnus-group-describe-briefly
4262 Give a very short help message (@code{gnus-group-describe-briefly}).
4263
4264 @item C-c C-i
4265 @kindex C-c C-i (Group)
4266 @cindex info
4267 @cindex manual
4268 @findex gnus-info-find-node
4269 Go to the gnus info node (@code{gnus-info-find-node}).
4270 @end table
4271
4272
4273 @node Group Timestamp
4274 @subsection Group Timestamp
4275 @cindex timestamps
4276 @cindex group timestamps
4277
4278 It can be convenient to let gnus keep track of when you last read a
4279 group.  To set the ball rolling, you should add
4280 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4281
4282 @lisp
4283 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4284 @end lisp
4285
4286 After doing this, each time you enter a group, it'll be recorded.
4287
4288 This information can be displayed in various ways---the easiest is to
4289 use the @samp{%d} spec in the group line format:
4290
4291 @lisp
4292 (setq gnus-group-line-format
4293       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4294 @end lisp
4295
4296 This will result in lines looking like:
4297
4298 @example
4299 *        0: mail.ding                                19961002T012943
4300          0: custom                                   19961002T012713
4301 @end example
4302
4303 As you can see, the date is displayed in compact ISO 8601 format.  This
4304 may be a bit too much, so to just display the date, you could say
4305 something like:
4306
4307 @lisp
4308 (setq gnus-group-line-format
4309       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4310 @end lisp
4311
4312 If you would like greater control of the time format, you can use a
4313 user-defined format spec.  Something like the following should do the
4314 trick:
4315
4316 @lisp
4317 (setq gnus-group-line-format
4318       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4319 (defun gnus-user-format-function-d (headers)
4320   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4321     (if time
4322         (format-time-string "%b %d  %H:%M" time)
4323       "")))
4324 @end lisp
4325
4326
4327 @node File Commands
4328 @subsection File Commands
4329 @cindex file commands
4330
4331 @table @kbd
4332
4333 @item r
4334 @kindex r (Group)
4335 @findex gnus-group-read-init-file
4336 @vindex gnus-init-file
4337 @cindex reading init file
4338 Re-read the init file (@code{gnus-init-file}, which defaults to
4339 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4340
4341 @item s
4342 @kindex s (Group)
4343 @findex gnus-group-save-newsrc
4344 @cindex saving .newsrc
4345 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4346 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4347 file(s) whether Gnus thinks it is necessary or not.
4348
4349 @c @item Z
4350 @c @kindex Z (Group)
4351 @c @findex gnus-group-clear-dribble
4352 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4353
4354 @end table
4355
4356
4357 @node Sieve Commands
4358 @subsection Sieve Commands
4359 @cindex group sieve commands
4360
4361 Sieve is a server-side mail filtering language.  In Gnus you can use
4362 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4363 sieve rules that should apply to each group.  Gnus provides two
4364 commands to translate all these group parameters into a proper Sieve
4365 script that can be transfered to the server somehow.
4366
4367 @vindex gnus-sieve-file
4368 @vindex gnus-sieve-region-start
4369 @vindex gnus-sieve-region-end
4370 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4371 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4372 between two delimiters, @code{gnus-sieve-region-start} and
4373 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4374 outside these delimiters that will not be removed the next time you
4375 regenerate the Sieve script.
4376
4377 @vindex gnus-sieve-crosspost
4378 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4379 is generated.  If it is non-@code{nil} (the default) articles is
4380 placed in all groups that have matching rules, otherwise the article
4381 is only placed in the group with the first matching rule.  For
4382 example, the group parameter @samp{(sieve address "sender"
4383 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4384 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4385 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4386 except that the line containing the call to @code{stop} is removed.)
4387
4388 @example
4389 if address "sender" "owner-ding@@hpc.uh.edu" @{
4390         fileinto "INBOX.ding";
4391         stop;
4392 @}
4393 @end example
4394
4395 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4396
4397 @table @kbd
4398
4399 @item D g
4400 @kindex D g (Group)
4401 @findex gnus-sieve-generate
4402 @vindex gnus-sieve-file
4403 @cindex generating sieve script
4404 Regenerate a Sieve script from the @code{sieve} group parameters and
4405 put you into the @code{gnus-sieve-file} without saving it.
4406
4407 @item D u
4408 @kindex D u (Group)
4409 @findex gnus-sieve-update
4410 @vindex gnus-sieve-file
4411 @cindex updating sieve script
4412 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4413 @code{sieve} group parameters, save the file and upload it to the
4414 server using the @code{sieveshell} program.
4415
4416 @end table
4417
4418
4419 @node Summary Buffer
4420 @chapter Summary Buffer
4421 @cindex summary buffer
4422
4423 A line for each article is displayed in the summary buffer.  You can
4424 move around, read articles, post articles and reply to articles.
4425
4426 The most common way to a summary buffer is to select a group from the
4427 group buffer (@pxref{Selecting a Group}).
4428
4429 You can have as many summary buffers open as you wish.
4430
4431 @menu
4432 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4433 * Summary Maneuvering::         Moving around the summary buffer.
4434 * Choosing Articles::           Reading articles.
4435 * Paging the Article::          Scrolling the current article.
4436 * Reply Followup and Post::     Posting articles.
4437 * Delayed Articles::            Send articles at a later time.
4438 * Marking Articles::            Marking articles as read, expirable, etc.
4439 * Limiting::                    You can limit the summary buffer.
4440 * Threading::                   How threads are made.
4441 * Sorting the Summary Buffer::  How articles and threads are sorted.
4442 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4443 * Article Caching::             You may store articles in a cache.
4444 * Persistent Articles::         Making articles expiry-resistant.
4445 * Article Backlog::             Having already read articles hang around.
4446 * Saving Articles::             Ways of customizing article saving.
4447 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4448 * Article Treatment::           The article buffer can be mangled at will.
4449 * MIME Commands::               Doing MIMEy things with the articles.
4450 * Charsets::                    Character set issues.
4451 * Article Commands::            Doing various things with the article buffer.
4452 * Summary Sorting::             Sorting the summary buffer in various ways.
4453 * Finding the Parent::          No child support? Get the parent.
4454 * Alternative Approaches::      Reading using non-default summaries.
4455 * Tree Display::                A more visual display of threads.
4456 * Mail Group Commands::         Some commands can only be used in mail groups.
4457 * Various Summary Stuff::       What didn't fit anywhere else.
4458 * Exiting the Summary Buffer::  Returning to the Group buffer,
4459                                 or reselecting the current group.
4460 * Crosspost Handling::          How crossposted articles are dealt with.
4461 * Duplicate Suppression::       An alternative when crosspost handling fails.
4462 * Security::                    Decrypt and Verify.
4463 * Mailing List::                Mailing list minor mode.
4464 @end menu
4465
4466
4467 @node Summary Buffer Format
4468 @section Summary Buffer Format
4469 @cindex summary buffer format
4470
4471 @iftex
4472 @iflatex
4473 \gnusfigure{The Summary Buffer}{180}{
4474 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4475 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4476 }
4477 @end iflatex
4478 @end iftex
4479
4480 @menu
4481 * Summary Buffer Lines::        You can specify how summary lines should look.
4482 * To From Newsgroups::          How to not display your own name.
4483 * Summary Buffer Mode Line::    You can say how the mode line should look.
4484 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4485 @end menu
4486
4487 @findex mail-extract-address-components
4488 @findex gnus-extract-address-components
4489 @vindex gnus-extract-address-components
4490 Gnus will use the value of the @code{gnus-extract-address-components}
4491 variable as a function for getting the name and address parts of a
4492 @code{From} header.  Three pre-defined functions exist:
4493 @code{gnus-extract-address-components}, which is the default, quite
4494 fast, and too simplistic solution;
4495 @code{mail-extract-address-components}, which works nicely, but is
4496 slower; and @code{std11-extract-address-components}, which works very
4497 nicely, but is slower.  The default function will return the wrong
4498 answer in 5% of the cases.  If this is unacceptable to you, use the
4499 other function instead:
4500
4501 @lisp
4502 (setq gnus-extract-address-components
4503       'mail-extract-address-components)
4504 @end lisp
4505
4506 @vindex gnus-summary-same-subject
4507 @code{gnus-summary-same-subject} is a string indicating that the current
4508 article has the same subject as the previous.  This string will be used
4509 with those specs that require it.  The default is @code{""}.
4510
4511
4512 @node Summary Buffer Lines
4513 @subsection Summary Buffer Lines
4514
4515 @vindex gnus-summary-line-format
4516 You can change the format of the lines in the summary buffer by changing
4517 the @code{gnus-summary-line-format} variable.  It works along the same
4518 lines as a normal @code{format} string, with some extensions
4519 (@pxref{Formatting Variables}).
4520
4521 There should always be a colon or a point position marker on the line;
4522 the cursor always moves to the point position marker or the colon after
4523 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4524 possible to change this.  Just write a new function
4525 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4526 @xref{Positioning Point}.
4527
4528 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4529
4530 The following format specification characters and extended format
4531 specification(s) are understood:
4532
4533 @table @samp
4534 @item N
4535 Article number.
4536 @item S
4537 Subject string.  List identifiers stripped,
4538 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4539 @item s
4540 Subject if the article is the root of the thread or the previous article
4541 had a different subject, @code{gnus-summary-same-subject} otherwise.
4542 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4543 @item F
4544 Full @code{From} header.
4545 @item n
4546 The name (from the @code{From} header).
4547 @item f
4548 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4549 From Newsgroups}).
4550 @item a
4551 The name (from the @code{From} header).  This differs from the @code{n}
4552 spec in that it uses the function designated by the
4553 @code{gnus-extract-address-components} variable, which is slower, but
4554 may be more thorough.
4555 @item A
4556 The address (from the @code{From} header).  This works the same way as
4557 the @code{a} spec.
4558 @item L
4559 Number of lines in the article.
4560 @item c
4561 Number of characters in the article.  This specifier is not supported
4562 in some methods (like nnfolder).
4563 @item k
4564 Pretty-printed version of the number of characters in the article;
4565 for example, @samp{1.2k} or @samp{0.4M}.
4566 @item I
4567 Indentation based on thread level (@pxref{Customizing Threading}).
4568 @item B
4569 A complex trn-style thread tree, showing response-connecting trace
4570 lines.  A thread could be drawn like this:
4571
4572 @example
4573 >
4574 +->
4575 | +->
4576 | | \->
4577 | |   \->
4578 | \->
4579 +->
4580 \->
4581 @end example
4582
4583 You can customize the appearance with the following options.  Note
4584 that it is possible to make the thread display look really neat by
4585 replacing the default @acronym{ASCII} characters with graphic
4586 line-drawing glyphs.
4587 @table @code
4588 @item gnus-sum-thread-tree-root
4589 @vindex gnus-sum-thread-tree-root
4590 Used for the root of a thread.  If @code{nil}, use subject
4591 instead.  The default is @samp{> }.
4592
4593 @item gnus-sum-thread-tree-false-root
4594 @vindex gnus-sum-thread-tree-false-root
4595 Used for the false root of a thread (@pxref{Loose Threads}).  If
4596 @code{nil}, use subject instead.  The default is @samp{> }.
4597
4598 @item gnus-sum-thread-tree-single-indent
4599 @vindex gnus-sum-thread-tree-single-indent
4600 Used for a thread with just one message.  If @code{nil}, use subject
4601 instead.  The default is @samp{}.
4602
4603 @item gnus-sum-thread-tree-vertical
4604 @vindex gnus-sum-thread-tree-vertical
4605 Used for drawing a vertical line.  The default is @samp{| }.
4606
4607 @item gnus-sum-thread-tree-indent
4608 @vindex gnus-sum-thread-tree-indent
4609 Used for indenting.  The default is @samp{  }.
4610
4611 @item gnus-sum-thread-tree-leaf-with-other
4612 @vindex gnus-sum-thread-tree-leaf-with-other
4613 Used for a leaf with brothers.  The default is @samp{+-> }.
4614
4615 @item gnus-sum-thread-tree-single-leaf
4616 @vindex gnus-sum-thread-tree-single-leaf
4617 Used for a leaf without brothers.  The default is @samp{\-> }
4618
4619 @end table
4620
4621 @item T
4622 Nothing if the article is a root and lots of spaces if it isn't (it
4623 pushes everything after it off the screen).
4624 @item [
4625 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4626 for adopted articles (@pxref{Customizing Threading}).
4627 @item ]
4628 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4629 for adopted articles.
4630 @item >
4631 One space for each thread level.
4632 @item <
4633 Twenty minus thread level spaces.
4634 @item U
4635 Unread.  @xref{Read Articles}.
4636
4637 @item R
4638 This misleadingly named specifier is the @dfn{secondary mark}.  This
4639 mark will say whether the article has been replied to, has been cached,
4640 or has been saved.  @xref{Other Marks}.
4641
4642 @item i
4643 Score as a number (@pxref{Scoring}).
4644 @item z
4645 @vindex gnus-summary-zcore-fuzz
4646 Zcore, @samp{+} if above the default level and @samp{-} if below the
4647 default level.  If the difference between
4648 @code{gnus-summary-default-score} and the score is less than
4649 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4650 @item V
4651 Total thread score.
4652 @item x
4653 @code{Xref}.
4654 @item D
4655 @code{Date}.
4656 @item d
4657 The @code{Date} in @code{DD-MMM} format.
4658 @item o
4659 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4660 @item M
4661 @code{Message-ID}.
4662 @item r
4663 @code{References}.
4664 @item t
4665 Number of articles in the current sub-thread.  Using this spec will slow
4666 down summary buffer generation somewhat.
4667 @item e
4668 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4669 article has any children.
4670 @item P
4671 The line number.
4672 @item O
4673 Download mark.
4674 @item &user-date;
4675 Age sensitive date format.  Various date format is defined in
4676 @code{gnus-user-date-format-alist}.
4677 @item u
4678 User defined specifier.  The next character in the format string should
4679 be a letter.  Gnus will call the function
4680 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
4681 following @samp{%u}.  The function will be passed the current header as
4682 argument.  The function should return a string, which will be inserted
4683 into the summary just like information from any other summary specifier.
4684 @end table
4685
4686 Text between @samp{%(} and @samp{%)} will be highlighted with
4687 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4688 There can only be one such area.
4689
4690 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4691 have to be handled with care.  For reasons of efficiency, gnus will
4692 compute what column these characters will end up in, and ``hard-code''
4693 that.  This means that it is invalid to have these specs after a
4694 variable-length spec.  Well, you might not be arrested, but your summary
4695 buffer will look strange, which is bad enough.
4696
4697 The smart choice is to have these specs as far to the left as possible.
4698 (Isn't that the case with everything, though?  But I digress.)
4699
4700 This restriction may disappear in later versions of gnus.
4701
4702
4703 @node To From Newsgroups
4704 @subsection To From Newsgroups
4705 @cindex To
4706 @cindex Newsgroups
4707
4708 In some groups (particularly in archive groups), the @code{From} header
4709 isn't very interesting, since all the articles there are written by
4710 you.  To display the information in the @code{To} or @code{Newsgroups}
4711 headers instead, you need to decide three things: What information to
4712 gather; where to display it; and when to display it.
4713
4714 @enumerate
4715 @item
4716 @vindex gnus-extra-headers
4717 The reading of extra header information is controlled by the
4718 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4719 instance:
4720
4721 @lisp
4722 (setq gnus-extra-headers
4723       '(To Newsgroups X-Newsreader))
4724 @end lisp
4725
4726 This will result in Gnus trying to obtain these three headers, and
4727 storing it in header structures for later easy retrieval.
4728
4729 @item
4730 @findex gnus-extra-header
4731 The value of these extra headers can be accessed via the
4732 @code{gnus-extra-header} function.  Here's a format line spec that will
4733 access the @code{X-Newsreader} header:
4734
4735 @example
4736 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4737 @end example
4738
4739 @item
4740 @vindex gnus-ignored-from-addresses
4741 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4742 summary line spec returns the @code{To}, @code{Newsreader} or
4743 @code{From} header.  If this regexp matches the contents of the
4744 @code{From} header, the value of the @code{To} or @code{Newsreader}
4745 headers are used instead.
4746
4747 @end enumerate
4748
4749 @vindex nnmail-extra-headers
4750 A related variable is @code{nnmail-extra-headers}, which controls when
4751 to include extra headers when generating overview (@acronym{NOV}) files.
4752 If you have old overview files, you should regenerate them after
4753 changing this variable, by entering the server buffer using @kbd{^},
4754 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4755 regeneration.
4756
4757 @vindex gnus-summary-line-format
4758 You also have to instruct Gnus to display the data by changing the
4759 @code{%n} spec to the @code{%f} spec in the
4760 @code{gnus-summary-line-format} variable.
4761
4762 In summary, you'd typically put something like the following in
4763 @file{~/.gnus.el}:
4764
4765 @lisp
4766 (setq gnus-extra-headers
4767       '(To Newsgroups))
4768 (setq nnmail-extra-headers gnus-extra-headers)
4769 (setq gnus-summary-line-format
4770       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4771 (setq gnus-ignored-from-addresses
4772       "Your Name Here")
4773 @end lisp
4774
4775 (The values listed above are the default values in Gnus.  Alter them
4776 to fit your needs.)
4777
4778 A note for news server administrators, or for users who wish to try to
4779 convince their news server administrator to provide some additional
4780 support:
4781
4782 The above is mostly useful for mail groups, where you have control over
4783 the @acronym{NOV} files that are created.  However, if you can persuade your
4784 nntp admin to add (in the usual implementation, notably INN):
4785
4786 @example
4787 Newsgroups:full
4788 @end example
4789
4790 to the end of her @file{overview.fmt} file, then you can use that just
4791 as you would the extra headers from the mail groups.
4792
4793
4794 @node Summary Buffer Mode Line
4795 @subsection Summary Buffer Mode Line
4796
4797 @vindex gnus-summary-mode-line-format
4798 You can also change the format of the summary mode bar (@pxref{Mode Line
4799 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4800 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4801
4802 Here are the elements you can play with:
4803
4804 @table @samp
4805 @item G
4806 Group name.
4807 @item p
4808 Unprefixed group name.
4809 @item A
4810 Current article number.
4811 @item z
4812 Current article score.
4813 @item V
4814 Gnus version.
4815 @item U
4816 Number of unread articles in this group.
4817 @item e
4818 Number of unread articles in this group that aren't displayed in the
4819 summary buffer.
4820 @item Z
4821 A string with the number of unread and unselected articles represented
4822 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4823 articles, and just as @samp{<%U more>} if there are just unread articles
4824 and no unselected ones.
4825 @item g
4826 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4827 shortened to @samp{r.a.anime}.
4828 @item S
4829 Subject of the current article.
4830 @item u
4831 User-defined spec (@pxref{User-Defined Specs}).
4832 @item s
4833 Name of the current score file (@pxref{Scoring}).
4834 @item d
4835 Number of dormant articles (@pxref{Unread Articles}).
4836 @item t
4837 Number of ticked articles (@pxref{Unread Articles}).
4838 @item r
4839 Number of articles that have been marked as read in this session.
4840 @item E
4841 Number of articles expunged by the score files.
4842 @end table
4843
4844
4845 @node Summary Highlighting
4846 @subsection Summary Highlighting
4847
4848 @table @code
4849
4850 @item gnus-visual-mark-article-hook
4851 @vindex gnus-visual-mark-article-hook
4852 This hook is run after selecting an article.  It is meant to be used for
4853 highlighting the article in some way.  It is not run if
4854 @code{gnus-visual} is @code{nil}.
4855
4856 @item gnus-summary-update-hook
4857 @vindex gnus-summary-update-hook
4858 This hook is called when a summary line is changed.  It is not run if
4859 @code{gnus-visual} is @code{nil}.
4860
4861 @item gnus-summary-selected-face
4862 @vindex gnus-summary-selected-face
4863 This is the face (or @dfn{font} as some people call it) used to
4864 highlight the current article in the summary buffer.
4865
4866 @item gnus-summary-highlight
4867 @vindex gnus-summary-highlight
4868 Summary lines are highlighted according to this variable, which is a
4869 list where the elements are of the format @code{(@var{form}
4870 . @var{face})}.  If you would, for instance, like ticked articles to be
4871 italic and high-scored articles to be bold, you could set this variable
4872 to something like
4873 @lisp
4874 (((eq mark gnus-ticked-mark) . italic)
4875  ((> score default) . bold))
4876 @end lisp
4877 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4878 @var{face} will be applied to the line.
4879 @end table
4880
4881
4882 @node Summary Maneuvering
4883 @section Summary Maneuvering
4884 @cindex summary movement
4885
4886 All the straight movement commands understand the numeric prefix and
4887 behave pretty much as you'd expect.
4888
4889 None of these commands select articles.
4890
4891 @table @kbd
4892 @item G M-n
4893 @itemx M-n
4894 @kindex M-n (Summary)
4895 @kindex G M-n (Summary)
4896 @findex gnus-summary-next-unread-subject
4897 Go to the next summary line of an unread article
4898 (@code{gnus-summary-next-unread-subject}).
4899
4900 @item G M-p
4901 @itemx M-p
4902 @kindex M-p (Summary)
4903 @kindex G M-p (Summary)
4904 @findex gnus-summary-prev-unread-subject
4905 Go to the previous summary line of an unread article
4906 (@code{gnus-summary-prev-unread-subject}).
4907
4908 @item G g
4909 @kindex G g (Summary)
4910 @findex gnus-summary-goto-subject
4911 Ask for an article number and then go to the summary line of that article
4912 without displaying the article (@code{gnus-summary-goto-subject}).
4913 @end table
4914
4915 If gnus asks you to press a key to confirm going to the next group, you
4916 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4917 buffer, searching for the next group to read without actually returning
4918 to the group buffer.
4919
4920 Variables related to summary movement:
4921
4922 @table @code
4923
4924 @vindex gnus-auto-select-next
4925 @item gnus-auto-select-next
4926 If you issue one of the movement commands (like @kbd{n}) and there are
4927 no more unread articles after the current one, gnus will offer to go to
4928 the next group.  If this variable is @code{t} and the next group is
4929 empty, gnus will exit summary mode and return to the group buffer.  If
4930 this variable is neither @code{t} nor @code{nil}, gnus will select the
4931 next group with unread articles.  As a special case, if this variable
4932 is @code{quietly}, Gnus will select the next group without asking for
4933 confirmation.  If this variable is @code{almost-quietly}, the same
4934 will happen only if you are located on the last article in the group.
4935 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4936 command will go to the next group without confirmation.  Also
4937 @pxref{Group Levels}.
4938
4939 @item gnus-auto-select-same
4940 @vindex gnus-auto-select-same
4941 If non-@code{nil}, all the movement commands will try to go to the next
4942 article with the same subject as the current.  (@dfn{Same} here might
4943 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4944 for details (@pxref{Customizing Threading}).)  If there are no more
4945 articles with the same subject, go to the first unread article.
4946
4947 This variable is not particularly useful if you use a threaded display.
4948
4949 @item gnus-summary-check-current
4950 @vindex gnus-summary-check-current
4951 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4952 to the next (or previous) article if the current article is unread.
4953 Instead, they will choose the current article.
4954
4955 @item gnus-auto-center-summary
4956 @vindex gnus-auto-center-summary
4957 If non-@code{nil}, gnus will keep the point in the summary buffer
4958 centered at all times.  This makes things quite tidy, but if you have a
4959 slow network connection, or simply do not like this un-Emacsism, you can
4960 set this variable to @code{nil} to get the normal Emacs scrolling
4961 action.  This will also inhibit horizontal re-centering of the summary
4962 buffer, which might make it more inconvenient to read extremely long
4963 threads.
4964
4965 This variable can also be a number.  In that case, center the window at
4966 the given number of lines from the top.
4967
4968 @end table
4969
4970
4971 @node Choosing Articles
4972 @section Choosing Articles
4973 @cindex selecting articles
4974
4975 @menu
4976 * Choosing Commands::           Commands for choosing articles.
4977 * Choosing Variables::          Variables that influence these commands.
4978 @end menu
4979
4980
4981 @node Choosing Commands
4982 @subsection Choosing Commands
4983
4984 None of the following movement commands understand the numeric prefix,
4985 and they all select and display an article.
4986
4987 If you want to fetch new articles or redisplay the group, see
4988 @ref{Exiting the Summary Buffer}.
4989
4990 @table @kbd
4991 @item SPACE
4992 @kindex SPACE (Summary)
4993 @findex gnus-summary-next-page
4994 Select the current article, or, if that one's read already, the next
4995 unread article (@code{gnus-summary-next-page}).
4996
4997 If you have an article window open already and you press @kbd{SPACE}
4998 again, the article will be scrolled.  This lets you conveniently
4999 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
5000
5001 @item G n
5002 @itemx n
5003 @kindex n (Summary)
5004 @kindex G n (Summary)
5005 @findex gnus-summary-next-unread-article
5006 @c @icon{gnus-summary-next-unread}
5007 Go to next unread article (@code{gnus-summary-next-unread-article}).
5008
5009 @item G p
5010 @itemx p
5011 @kindex p (Summary)
5012 @findex gnus-summary-prev-unread-article
5013 @c @icon{gnus-summary-prev-unread}
5014 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5015
5016 @item G N
5017 @itemx N
5018 @kindex N (Summary)
5019 @kindex G N (Summary)
5020 @findex gnus-summary-next-article
5021 Go to the next article (@code{gnus-summary-next-article}).
5022
5023 @item G P
5024 @itemx P
5025 @kindex P (Summary)
5026 @kindex G P (Summary)
5027 @findex gnus-summary-prev-article
5028 Go to the previous article (@code{gnus-summary-prev-article}).
5029
5030 @item G C-n
5031 @kindex G C-n (Summary)
5032 @findex gnus-summary-next-same-subject
5033 Go to the next article with the same subject
5034 (@code{gnus-summary-next-same-subject}).
5035
5036 @item G C-p
5037 @kindex G C-p (Summary)
5038 @findex gnus-summary-prev-same-subject
5039 Go to the previous article with the same subject
5040 (@code{gnus-summary-prev-same-subject}).
5041
5042 @item G f
5043 @itemx .
5044 @kindex G f  (Summary)
5045 @kindex .  (Summary)
5046 @findex gnus-summary-first-unread-article
5047 Go to the first unread article
5048 (@code{gnus-summary-first-unread-article}).
5049
5050 @item G b
5051 @itemx ,
5052 @kindex G b (Summary)
5053 @kindex , (Summary)
5054 @findex gnus-summary-best-unread-article
5055 Go to the unread article with the highest score
5056 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5057 go to the first unread article that has a score over the default score.
5058
5059 @item G l
5060 @itemx l
5061 @kindex l (Summary)
5062 @kindex G l (Summary)
5063 @findex gnus-summary-goto-last-article
5064 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5065
5066 @item G o
5067 @kindex G o (Summary)
5068 @findex gnus-summary-pop-article
5069 @cindex history
5070 @cindex article history
5071 Pop an article off the summary history and go to this article
5072 (@code{gnus-summary-pop-article}).  This command differs from the
5073 command above in that you can pop as many previous articles off the
5074 history as you like, while @kbd{l} toggles the two last read articles.
5075 For a somewhat related issue (if you use these commands a lot),
5076 @pxref{Article Backlog}.
5077
5078 @item G j
5079 @itemx j
5080 @kindex j (Summary)
5081 @kindex G j (Summary)
5082 @findex gnus-summary-goto-article
5083 Ask for an article number or @code{Message-ID}, and then go to that
5084 article (@code{gnus-summary-goto-article}).
5085
5086 @end table
5087
5088
5089 @node Choosing Variables
5090 @subsection Choosing Variables
5091
5092 Some variables relevant for moving and selecting articles:
5093
5094 @table @code
5095 @item gnus-auto-extend-newsgroup
5096 @vindex gnus-auto-extend-newsgroup
5097 All the movement commands will try to go to the previous (or next)
5098 article, even if that article isn't displayed in the Summary buffer if
5099 this variable is non-@code{nil}.  Gnus will then fetch the article from
5100 the server and display it in the article buffer.
5101
5102 @item gnus-select-article-hook
5103 @vindex gnus-select-article-hook
5104 This hook is called whenever an article is selected.  By default it
5105 exposes any threads hidden under the selected article.  If you would
5106 like each article to be saved in the Agent as you read it, putting
5107 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5108
5109 @item gnus-mark-article-hook
5110 @vindex gnus-mark-article-hook
5111 @findex gnus-summary-mark-unread-as-read
5112 @findex gnus-summary-mark-read-and-unread-as-read
5113 @findex gnus-unread-mark
5114 This hook is called whenever an article is selected.  It is intended to
5115 be used for marking articles as read.  The default value is
5116 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5117 mark of almost any article you read to @code{gnus-unread-mark}.  The
5118 only articles not affected by this function are ticked, dormant, and
5119 expirable articles.  If you'd instead like to just have unread articles
5120 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5121 instead.  It will leave marks like @code{gnus-low-score-mark},
5122 @code{gnus-del-mark} (and so on) alone.
5123
5124 @end table
5125
5126
5127 @node Paging the Article
5128 @section Scrolling the Article
5129 @cindex article scrolling
5130
5131 @table @kbd
5132
5133 @item SPACE
5134 @kindex SPACE (Summary)
5135 @findex gnus-summary-next-page
5136 Pressing @kbd{SPACE} will scroll the current article forward one page,
5137 or, if you have come to the end of the current article, will choose the
5138 next article (@code{gnus-summary-next-page}).
5139
5140 @vindex gnus-article-boring-faces
5141 @vindex gnus-article-skip-boring
5142 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5143 the article consists only of citations and signature, then it will be
5144 skipped; the next article will be shown instead.  You can customize
5145 what is considered uninteresting with
5146 @code{gnus-article-boring-faces}.  You can manually view the article's
5147 pages, no matter how boring, using @kbd{C-M-v}.
5148
5149 @item DEL
5150 @kindex DEL (Summary)
5151 @findex gnus-summary-prev-page
5152 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5153
5154 @item RET
5155 @kindex RET (Summary)
5156 @findex gnus-summary-scroll-up
5157 Scroll the current article one line forward
5158 (@code{gnus-summary-scroll-up}).
5159
5160 @item M-RET
5161 @kindex M-RET (Summary)
5162 @findex gnus-summary-scroll-down
5163 Scroll the current article one line backward
5164 (@code{gnus-summary-scroll-down}).
5165
5166 @item A g
5167 @itemx g
5168 @kindex A g (Summary)
5169 @kindex g (Summary)
5170 @findex gnus-summary-show-article
5171 @vindex gnus-summary-show-article-charset-alist
5172 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5173 given a prefix, fetch the current article, but don't run any of the
5174 article treatment functions.  This will give you a ``raw'' article, just
5175 the way it came from the server.
5176
5177 If given a numerical prefix, you can do semi-manual charset stuff.
5178 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5179 encoded in the @code{cn-gb-2312} charset.  If you have
5180
5181 @lisp
5182 (setq gnus-summary-show-article-charset-alist
5183       '((1 . cn-gb-2312)
5184         (2 . big5)))
5185 @end lisp
5186
5187 then you can say @kbd{C-u 1 g} to get the same effect.
5188
5189 @item A <
5190 @itemx <
5191 @kindex < (Summary)
5192 @kindex A < (Summary)
5193 @findex gnus-summary-beginning-of-article
5194 Scroll to the beginning of the article
5195 (@code{gnus-summary-beginning-of-article}).
5196
5197 @item A >
5198 @itemx >
5199 @kindex > (Summary)
5200 @kindex A > (Summary)
5201 @findex gnus-summary-end-of-article
5202 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5203
5204 @item A s
5205 @itemx s
5206 @kindex A s (Summary)
5207 @kindex s (Summary)
5208 @findex gnus-summary-isearch-article
5209 Perform an isearch in the article buffer
5210 (@code{gnus-summary-isearch-article}).
5211
5212 @item h
5213 @kindex h (Summary)
5214 @findex gnus-summary-select-article-buffer
5215 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5216
5217 @end table
5218
5219
5220 @node Reply Followup and Post
5221 @section Reply, Followup and Post
5222
5223 @menu
5224 * Summary Mail Commands::       Sending mail.
5225 * Summary Post Commands::       Sending news.
5226 * Summary Message Commands::    Other Message-related commands.
5227 * Canceling and Superseding::
5228 @end menu
5229
5230
5231 @node Summary Mail Commands
5232 @subsection Summary Mail Commands
5233 @cindex mail
5234 @cindex composing mail
5235
5236 Commands for composing a mail message:
5237
5238 @table @kbd
5239
5240 @item S r
5241 @itemx r
5242 @kindex S r (Summary)
5243 @kindex r (Summary)
5244 @findex gnus-summary-reply
5245 @c @icon{gnus-summary-mail-reply}
5246 @c @icon{gnus-summary-reply}
5247 Mail a reply to the author of the current article
5248 (@code{gnus-summary-reply}).
5249
5250 @item S R
5251 @itemx R
5252 @kindex R (Summary)
5253 @kindex S R (Summary)
5254 @findex gnus-summary-reply-with-original
5255 @c @icon{gnus-summary-reply-with-original}
5256 Mail a reply to the author of the current article and include the
5257 original message (@code{gnus-summary-reply-with-original}).  This
5258 command uses the process/prefix convention.
5259
5260 @item S w
5261 @kindex S w (Summary)
5262 @findex gnus-summary-wide-reply
5263 Mail a wide reply to the author of the current article
5264 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5265 goes out to all people listed in the @code{To}, @code{From} (or
5266 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5267 present, that's used instead.
5268
5269 @item S W
5270 @kindex S W (Summary)
5271 @findex gnus-summary-wide-reply-with-original
5272 Mail a wide reply to the current article and include the original
5273 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5274 the process/prefix convention.
5275
5276 @item S v
5277 @kindex S v (Summary)
5278 @findex gnus-summary-very-wide-reply
5279 Mail a very wide reply to the author of the current article
5280 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5281 that goes out to all people listed in the @code{To}, @code{From} (or
5282 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5283 articles.  This command uses the process/prefix convention.
5284
5285 @item S V
5286 @kindex S V (Summary)
5287 @findex gnus-summary-very-wide-reply-with-original
5288 Mail a very wide reply to the author of the current article and include the
5289 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5290 command uses the process/prefix convention.
5291
5292 @item S B r
5293 @kindex S B r (Summary)
5294 @findex gnus-summary-reply-broken-reply-to
5295 Mail a reply to the author of the current article but ignore the
5296 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5297 If you need this because a mailing list incorrectly sets a
5298 @code{Reply-To} header pointing to the list, you probably want to set
5299 the @code{broken-reply-to} group parameter instead, so things will work
5300 correctly.  @xref{Group Parameters}.
5301
5302 @item S B R
5303 @kindex S B R (Summary)
5304 @findex gnus-summary-reply-broken-reply-to-with-original
5305 Mail a reply to the author of the current article and include the
5306 original message but ignore the @code{Reply-To} field
5307 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5308
5309 @item S o m
5310 @itemx C-c C-f
5311 @kindex S o m (Summary)
5312 @kindex C-c C-f (Summary)
5313 @findex gnus-summary-mail-forward
5314 @c @icon{gnus-summary-mail-forward}
5315 Forward the current article to some other person
5316 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5317 headers of the forwarded article.
5318
5319 @item S m
5320 @itemx m
5321 @kindex m (Summary)
5322 @kindex S m (Summary)
5323 @findex gnus-summary-mail-other-window
5324 @c @icon{gnus-summary-mail-originate}
5325 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5326 the posting style of the current group.  If given a prefix, disable that.
5327 If the prefix is 1, prompt for a group name to find the posting style.
5328
5329 @item S i
5330 @itemx i
5331 @kindex i (Summary)
5332 @kindex S i (Summary)
5333 @findex gnus-summary-news-other-window
5334 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5335 post to the current group.  If given a prefix, disable that.  If the
5336 prefix is 1, prompt for a group to post to.
5337
5338 This function actually prepares a news even when using mail groups.
5339 This is useful for ``posting'' messages to mail groups without actually
5340 sending them over the network: they're just saved directly to the group
5341 in question.  The corresponding back end must have a request-post method
5342 for this to work though.
5343
5344 @item S D b
5345 @kindex S D b (Summary)
5346 @findex gnus-summary-resend-bounced-mail
5347 @cindex bouncing mail
5348 If you have sent a mail, but the mail was bounced back to you for some
5349 reason (wrong address, transient failure), you can use this command to
5350 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5351 will be popped into a mail buffer where you can edit the headers before
5352 sending the mail off again.  If you give a prefix to this command, and
5353 the bounced mail is a reply to some other mail, gnus will try to fetch
5354 that mail and display it for easy perusal of its headers.  This might
5355 very well fail, though.
5356
5357 @item S D r
5358 @kindex S D r (Summary)
5359 @findex gnus-summary-resend-message
5360 Not to be confused with the previous command,
5361 @code{gnus-summary-resend-message} will prompt you for an address to
5362 send the current message off to, and then send it to that place.  The
5363 headers of the message won't be altered---but lots of headers that say
5364 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5365 means that you actually send a mail to someone that has a @code{To}
5366 header that (probably) points to yourself.  This will confuse people.
5367 So, natcherly you'll only do that if you're really eVIl.
5368
5369 This command is mainly used if you have several accounts and want to
5370 ship a mail to a different account of yours.  (If you're both
5371 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5372 to the @code{root} account, you may want to resend it to
5373 @code{postmaster}.  Ordnung muss sein!
5374
5375 This command understands the process/prefix convention
5376 (@pxref{Process/Prefix}).
5377
5378 @item S O m
5379 @kindex S O m (Summary)
5380 @findex gnus-summary-digest-mail-forward
5381 Digest the current series (@pxref{Decoding Articles}) and forward the
5382 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5383 command uses the process/prefix convention (@pxref{Process/Prefix}).
5384
5385 @item S M-c
5386 @kindex S M-c (Summary)
5387 @findex gnus-summary-mail-crosspost-complaint
5388 @cindex crossposting
5389 @cindex excessive crossposting
5390 Send a complaint about excessive crossposting to the author of the
5391 current article (@code{gnus-summary-mail-crosspost-complaint}).
5392
5393 @findex gnus-crosspost-complaint
5394 This command is provided as a way to fight back against the current
5395 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5396 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5397 command understands the process/prefix convention
5398 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5399
5400 @end table
5401
5402 Also @xref{Header Commands, ,Header Commands, message, The Message
5403 Manual}, for more information.
5404
5405
5406 @node Summary Post Commands
5407 @subsection Summary Post Commands
5408 @cindex post
5409 @cindex composing news
5410
5411 Commands for posting a news article:
5412
5413 @table @kbd
5414 @item S p
5415 @itemx a
5416 @kindex a (Summary)
5417 @kindex S p (Summary)
5418 @findex gnus-summary-post-news
5419 @c @icon{gnus-summary-post-news}
5420 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5421 default, post to the current group.  If given a prefix, disable that.
5422 If the prefix is 1, prompt for another group instead.
5423
5424 @item S f
5425 @itemx f
5426 @kindex f (Summary)
5427 @kindex S f (Summary)
5428 @findex gnus-summary-followup
5429 @c @icon{gnus-summary-followup}
5430 Post a followup to the current article (@code{gnus-summary-followup}).
5431
5432 @item S F
5433 @itemx F
5434 @kindex S F (Summary)
5435 @kindex F (Summary)
5436 @c @icon{gnus-summary-followup-with-original}
5437 @findex gnus-summary-followup-with-original
5438 Post a followup to the current article and include the original message
5439 (@code{gnus-summary-followup-with-original}).  This command uses the
5440 process/prefix convention.
5441
5442 @item S n
5443 @kindex S n (Summary)
5444 @findex gnus-summary-followup-to-mail
5445 Post a followup to the current article via news, even if you got the
5446 message through mail (@code{gnus-summary-followup-to-mail}).
5447
5448 @item S N
5449 @kindex S N (Summary)
5450 @findex gnus-summary-followup-to-mail-with-original
5451 Post a followup to the current article via news, even if you got the
5452 message through mail and include the original message
5453 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5454 the process/prefix convention.
5455
5456 @item S o p
5457 @kindex S o p (Summary)
5458 @findex gnus-summary-post-forward
5459 Forward the current article to a newsgroup
5460 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5461 headers of the forwarded article.
5462
5463 @item S O p
5464 @kindex S O p (Summary)
5465 @findex gnus-summary-digest-post-forward
5466 @cindex digests
5467 @cindex making digests
5468 Digest the current series and forward the result to a newsgroup
5469 (@code{gnus-summary-digest-post-forward}).  This command uses the
5470 process/prefix convention.
5471
5472 @item S u
5473 @kindex S u (Summary)
5474 @findex gnus-uu-post-news
5475 @c @icon{gnus-uu-post-news}
5476 Uuencode a file, split it into parts, and post it as a series
5477 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5478 @end table
5479
5480 Also @xref{Header Commands, ,Header Commands, message, The Message
5481 Manual}, for more information.
5482
5483
5484 @node Summary Message Commands
5485 @subsection Summary Message Commands
5486
5487 @table @kbd
5488 @item S y
5489 @kindex S y (Summary)
5490 @findex gnus-summary-yank-message
5491 Yank the current article into an already existing Message composition
5492 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5493 what message buffer you want to yank into, and understands the
5494 process/prefix convention (@pxref{Process/Prefix}).
5495
5496 @end table
5497
5498
5499 @node Canceling and Superseding
5500 @subsection Canceling Articles
5501 @cindex canceling articles
5502 @cindex superseding articles
5503
5504 Have you ever written something, and then decided that you really,
5505 really, really wish you hadn't posted that?
5506
5507 Well, you can't cancel mail, but you can cancel posts.
5508
5509 @findex gnus-summary-cancel-article
5510 @kindex C (Summary)
5511 @c @icon{gnus-summary-cancel-article}
5512 Find the article you wish to cancel (you can only cancel your own
5513 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5514 c} (@code{gnus-summary-cancel-article}).  Your article will be
5515 canceled---machines all over the world will be deleting your article.
5516 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5517
5518 Be aware, however, that not all sites honor cancels, so your article may
5519 live on here and there, while most sites will delete the article in
5520 question.
5521
5522 Gnus will use the ``current'' select method when canceling.  If you
5523 want to use the standard posting method, use the @samp{a} symbolic
5524 prefix (@pxref{Symbolic Prefixes}).
5525
5526 If you discover that you have made some mistakes and want to do some
5527 corrections, you can post a @dfn{superseding} article that will replace
5528 your original article.
5529
5530 @findex gnus-summary-supersede-article
5531 @kindex S (Summary)
5532 Go to the original article and press @kbd{S s}
5533 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5534 where you can edit the article all you want before sending it off the
5535 usual way.
5536
5537 The same goes for superseding as for canceling, only more so: Some
5538 sites do not honor superseding.  On those sites, it will appear that you
5539 have posted almost the same article twice.
5540
5541 If you have just posted the article, and change your mind right away,
5542 there is a trick you can use to cancel/supersede the article without
5543 waiting for the article to appear on your site first.  You simply return
5544 to the post buffer (which is called @code{*sent ...*}).  There you will
5545 find the article you just posted, with all the headers intact.  Change
5546 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5547 header by substituting one of those words for the word
5548 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5549 you would do normally.  The previous article will be
5550 canceled/superseded.
5551
5552 Just remember, kids: There is no 'c' in 'supersede'.
5553
5554 @node Delayed Articles
5555 @section Delayed Articles
5556 @cindex delayed sending
5557 @cindex send delayed
5558
5559 Sometimes, you might wish to delay the sending of a message.  For
5560 example, you might wish to arrange for a message to turn up just in time
5561 to remind your about the birthday of your Significant Other.  For this,
5562 there is the @code{gnus-delay} package.  Setup is simple:
5563
5564 @lisp
5565 (gnus-delay-initialize)
5566 @end lisp
5567
5568 @findex gnus-delay-article
5569 Normally, to send a message you use the @kbd{C-c C-c} command from
5570 Message mode.  To delay a message, use @kbd{C-c C-j}
5571 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5572 message should be delayed.  Possible answers are:
5573
5574 @itemize @bullet
5575 @item
5576 A time span.  Consists of an integer and a letter.  For example,
5577 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5578 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5579 (months) and @code{Y} (years).
5580
5581 @item
5582 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5583 delayed until that day, at a specific time (eight o'clock by default).
5584 See also @code{gnus-delay-default-hour}.
5585
5586 @item
5587 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5588 stuff.  The deadline will be at that time today, except if that time has
5589 already passed, then it's at the given time tomorrow.  So if it's ten
5590 o'clock in the morning and you specify @code{11:15}, then the deadline
5591 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5592 that means a time tomorrow.
5593 @end itemize
5594
5595 The action of the @code{gnus-delay-article} command is influenced by a
5596 couple of variables:
5597
5598 @table @code
5599 @item gnus-delay-default-hour
5600 @vindex gnus-delay-default-hour
5601 When you specify a specific date, the message will be due on that hour
5602 on the given date.  Possible values are integers 0 through 23.
5603
5604 @item gnus-delay-default-delay
5605 @vindex gnus-delay-default-delay
5606 This is a string and gives the default delay.  It can be of any of the
5607 formats described above.
5608
5609 @item gnus-delay-group
5610 @vindex gnus-delay-group
5611 Delayed articles will be kept in this group on the drafts server until
5612 they are due.  You probably don't need to change this.  The default
5613 value is @code{"delayed"}.
5614
5615 @item gnus-delay-header
5616 @vindex gnus-delay-header
5617 The deadline for each article will be stored in a header.  This variable
5618 is a string and gives the header name.  You probably don't need to
5619 change this.  The default value is @code{"X-Gnus-Delayed"}.
5620 @end table
5621
5622 The way delaying works is like this: when you use the
5623 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5624 calculates the deadline of the message and stores it in the
5625 @code{X-Gnus-Delayed} header and puts the message in the
5626 @code{nndraft:delayed} group.
5627
5628 @findex gnus-delay-send-queue
5629 And whenever you get new news, Gnus looks through the group for articles
5630 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5631 function for this.  By default, this function is added to the hook
5632 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5633 Maybe you want to use the demon to send drafts?  Just tell the demon to
5634 execute the @code{gnus-delay-send-queue} function.
5635
5636 @table @code
5637 @item gnus-delay-initialize
5638 @findex gnus-delay-initialize
5639
5640 By default, this function installs @code{gnus-delay-send-queue} in
5641 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5642 argument @code{no-check}.  If it is non-@code{nil},
5643 @code{gnus-get-new-news-hook} is not changed.  The optional first
5644 argument is ignored.
5645
5646 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5647 Presumably, you want to use the demon for sending due delayed articles.
5648 Just don't forget to set that up :-)
5649 @end table
5650
5651
5652 @node Marking Articles
5653 @section Marking Articles
5654 @cindex article marking
5655 @cindex article ticking
5656 @cindex marks
5657
5658 There are several marks you can set on an article.
5659
5660 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5661 neologism ohoy!) of the article.  Alphabetic marks generally mean
5662 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5663
5664 In addition, you also have marks that do not affect readedness.
5665
5666 @menu
5667 * Unread Articles::             Marks for unread articles.
5668 * Read Articles::               Marks for read articles.
5669 * Other Marks::                 Marks that do not affect readedness.
5670 @end menu
5671
5672 @ifinfo
5673 There's a plethora of commands for manipulating these marks:
5674 @end ifinfo
5675
5676 @menu
5677 * Setting Marks::             How to set and remove marks.
5678 * Generic Marking Commands::  How to customize the marking.
5679 * Setting Process Marks::     How to mark articles for later processing.
5680 @end menu
5681
5682
5683 @node Unread Articles
5684 @subsection Unread Articles
5685
5686 The following marks mark articles as (kinda) unread, in one form or
5687 other.
5688
5689 @table @samp
5690 @item !
5691 @vindex gnus-ticked-mark
5692 Marked as ticked (@code{gnus-ticked-mark}).
5693
5694 @dfn{Ticked articles} are articles that will remain visible always.  If
5695 you see an article that you find interesting, or you want to put off
5696 reading it, or replying to it, until sometime later, you'd typically
5697 tick it.  However, articles can be expired (from news servers by the
5698 news server software, Gnus itself never expires ticked messages), so if
5699 you want to keep an article forever, you'll have to make it persistent
5700 (@pxref{Persistent Articles}).
5701
5702 @item ?
5703 @vindex gnus-dormant-mark
5704 Marked as dormant (@code{gnus-dormant-mark}).
5705
5706 @dfn{Dormant articles} will only appear in the summary buffer if there
5707 are followups to it.  If you want to see them even if they don't have
5708 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5709 Otherwise (except for the visibility issue), they are just like ticked
5710 messages.
5711
5712 @item SPACE
5713 @vindex gnus-unread-mark
5714 Marked as unread (@code{gnus-unread-mark}).
5715
5716 @dfn{Unread articles} are articles that haven't been read at all yet.
5717 @end table
5718
5719
5720 @node Read Articles
5721 @subsection Read Articles
5722 @cindex expirable mark
5723
5724 All the following marks mark articles as read.
5725
5726 @table @samp
5727
5728 @item r
5729 @vindex gnus-del-mark
5730 These are articles that the user has marked as read with the @kbd{d}
5731 command manually, more or less (@code{gnus-del-mark}).
5732
5733 @item R
5734 @vindex gnus-read-mark
5735 Articles that have actually been read (@code{gnus-read-mark}).
5736
5737 @item O
5738 @vindex gnus-ancient-mark
5739 Articles that were marked as read in previous sessions and are now
5740 @dfn{old} (@code{gnus-ancient-mark}).
5741
5742 @item K
5743 @vindex gnus-killed-mark
5744 Marked as killed (@code{gnus-killed-mark}).
5745
5746 @item X
5747 @vindex gnus-kill-file-mark
5748 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5749
5750 @item Y
5751 @vindex gnus-low-score-mark
5752 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5753
5754 @item C
5755 @vindex gnus-catchup-mark
5756 Marked as read by a catchup (@code{gnus-catchup-mark}).
5757
5758 @item G
5759 @vindex gnus-canceled-mark
5760 Canceled article (@code{gnus-canceled-mark})
5761
5762 @item F
5763 @vindex gnus-souped-mark
5764 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5765
5766 @item Q
5767 @vindex gnus-sparse-mark
5768 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5769 Threading}.
5770
5771 @item M
5772 @vindex gnus-duplicate-mark
5773 Article marked as read by duplicate suppression
5774 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5775
5776 @end table
5777
5778 All these marks just mean that the article is marked as read, really.
5779 They are interpreted differently when doing adaptive scoring, though.
5780
5781 One more special mark, though:
5782
5783 @table @samp
5784 @item E
5785 @vindex gnus-expirable-mark
5786 Marked as expirable (@code{gnus-expirable-mark}).
5787
5788 Marking articles as @dfn{expirable} (or have them marked as such
5789 automatically) doesn't make much sense in normal groups---a user doesn't
5790 control expiring of news articles, but in mail groups, for instance,
5791 articles marked as @dfn{expirable} can be deleted by gnus at
5792 any time.
5793 @end table
5794
5795
5796 @node Other Marks
5797 @subsection Other Marks
5798 @cindex process mark
5799 @cindex bookmarks
5800
5801 There are some marks that have nothing to do with whether the article is
5802 read or not.
5803
5804 @itemize @bullet
5805
5806 @item
5807 You can set a bookmark in the current article.  Say you are reading a
5808 long thesis on cats' urinary tracts, and have to go home for dinner
5809 before you've finished reading the thesis.  You can then set a bookmark
5810 in the article, and gnus will jump to this bookmark the next time it
5811 encounters the article.  @xref{Setting Marks}.
5812
5813 @item
5814 @vindex gnus-replied-mark
5815 All articles that you have replied to or made a followup to (i.e., have
5816 answered) will be marked with an @samp{A} in the second column
5817 (@code{gnus-replied-mark}).
5818
5819 @item
5820 @vindex gnus-forwarded-mark
5821 All articles that you have forwarded will be marked with an @samp{F} in
5822 the second column (@code{gnus-forwarded-mark}).
5823
5824 @item
5825 @vindex gnus-cached-mark
5826 Articles stored in the article cache will be marked with an @samp{*} in
5827 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5828
5829 @item
5830 @vindex gnus-saved-mark
5831 Articles ``saved'' (in some manner or other; not necessarily
5832 religiously) are marked with an @samp{S} in the second column
5833 (@code{gnus-saved-mark}).
5834
5835 @item
5836 @vindex gnus-recent-mark
5837 Articles that according to the server haven't been shown to the user
5838 before are marked with a @samp{N} in the second column
5839 (@code{gnus-recent-mark}).  Note that not all servers support this
5840 mark, in which case it simply never appears.  Compare with
5841 @code{gnus-unseen-mark}.
5842
5843 @item
5844 @vindex gnus-unseen-mark
5845 Articles that haven't been seen before in Gnus by the user are marked
5846 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5847 Compare with @code{gnus-recent-mark}.
5848
5849 @item
5850 @vindex gnus-downloaded-mark
5851 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5852 downloaded for unplugged (offline) viewing.  If you are using the
5853 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5854 (The variable @code{gnus-downloaded-mark} controls which character to
5855 use.)
5856
5857 @item
5858 @vindex gnus-undownloaded-mark
5859 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5860 not have been downloaded.  Such articles cannot be viewed while you
5861 are unplugged (offline).  If you are using the @samp{%O} spec, these
5862 articles get the @samp{-} mark in that spec.  (The variable
5863 @code{gnus-undownloaded-mark} controls which character to use.)
5864
5865 @item
5866 @vindex gnus-downloadable-mark
5867 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5868 automatically, but it is also possible to explicitly mark articles for
5869 download, even if they would not be downloaded automatically.  Such
5870 explicitly-marked articles get the @samp{%} mark in the first column.
5871 (The variable @code{gnus-downloadable-mark} controls which character to
5872 use.)
5873
5874 @item
5875 @vindex gnus-not-empty-thread-mark
5876 @vindex gnus-empty-thread-mark
5877 If the @samp{%e} spec is used, the presence of threads or not will be
5878 marked with @code{gnus-not-empty-thread-mark} and
5879 @code{gnus-empty-thread-mark} in the third column, respectively.
5880
5881 @item
5882 @vindex gnus-process-mark
5883 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5884 variety of commands react to the presence of the process mark.  For
5885 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5886 all articles that have been marked with the process mark.  Articles
5887 marked with the process mark have a @samp{#} in the second column.
5888
5889 @end itemize
5890
5891 You might have noticed that most of these ``non-readedness'' marks
5892 appear in the second column by default.  So if you have a cached, saved,
5893 replied article that you have process-marked, what will that look like?
5894
5895 Nothing much.  The precedence rules go as follows: process -> cache ->
5896 replied -> saved.  So if the article is in the cache and is replied,
5897 you'll only see the cache mark and not the replied mark.
5898
5899
5900 @node Setting Marks
5901 @subsection Setting Marks
5902 @cindex setting marks
5903
5904 All the marking commands understand the numeric prefix.
5905
5906 @table @kbd
5907 @item M c
5908 @itemx M-u
5909 @kindex M c (Summary)
5910 @kindex M-u (Summary)
5911 @findex gnus-summary-clear-mark-forward
5912 @cindex mark as unread
5913 Clear all readedness-marks from the current article
5914 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5915 article as unread.
5916
5917 @item M t
5918 @itemx !
5919 @kindex ! (Summary)
5920 @kindex M t (Summary)
5921 @findex gnus-summary-tick-article-forward
5922 Tick the current article (@code{gnus-summary-tick-article-forward}).
5923 @xref{Article Caching}.
5924
5925 @item M ?
5926 @itemx ?
5927 @kindex ? (Summary)
5928 @kindex M ? (Summary)
5929 @findex gnus-summary-mark-as-dormant
5930 Mark the current article as dormant
5931 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5932
5933 @item M d
5934 @itemx d
5935 @kindex M d (Summary)
5936 @kindex d (Summary)
5937 @findex gnus-summary-mark-as-read-forward
5938 Mark the current article as read
5939 (@code{gnus-summary-mark-as-read-forward}).
5940
5941 @item D
5942 @kindex D (Summary)
5943 @findex gnus-summary-mark-as-read-backward
5944 Mark the current article as read and move point to the previous line
5945 (@code{gnus-summary-mark-as-read-backward}).
5946
5947 @item M k
5948 @itemx k
5949 @kindex k (Summary)
5950 @kindex M k (Summary)
5951 @findex gnus-summary-kill-same-subject-and-select
5952 Mark all articles that have the same subject as the current one as read,
5953 and then select the next unread article
5954 (@code{gnus-summary-kill-same-subject-and-select}).
5955
5956 @item M K
5957 @itemx C-k
5958 @kindex M K (Summary)
5959 @kindex C-k (Summary)
5960 @findex gnus-summary-kill-same-subject
5961 Mark all articles that have the same subject as the current one as read
5962 (@code{gnus-summary-kill-same-subject}).
5963
5964 @item M C
5965 @kindex M C (Summary)
5966 @findex gnus-summary-catchup
5967 @c @icon{gnus-summary-catchup}
5968 Mark all unread articles as read (@code{gnus-summary-catchup}).
5969
5970 @item M C-c
5971 @kindex M C-c (Summary)
5972 @findex gnus-summary-catchup-all
5973 Mark all articles in the group as read---even the ticked and dormant
5974 articles (@code{gnus-summary-catchup-all}).
5975
5976 @item M H
5977 @kindex M H (Summary)
5978 @findex gnus-summary-catchup-to-here
5979 Catchup the current group to point (before the point)
5980 (@code{gnus-summary-catchup-to-here}).
5981
5982 @item M h
5983 @kindex M h (Summary)
5984 @findex gnus-summary-catchup-from-here
5985 Catchup the current group from point (after the point)
5986 (@code{gnus-summary-catchup-from-here}).
5987
5988 @item C-w
5989 @kindex C-w (Summary)
5990 @findex gnus-summary-mark-region-as-read
5991 Mark all articles between point and mark as read
5992 (@code{gnus-summary-mark-region-as-read}).
5993
5994 @item M V k
5995 @kindex M V k (Summary)
5996 @findex gnus-summary-kill-below
5997 Kill all articles with scores below the default score (or below the
5998 numeric prefix) (@code{gnus-summary-kill-below}).
5999
6000 @item M e
6001 @itemx E
6002 @kindex M e (Summary)
6003 @kindex E (Summary)
6004 @findex gnus-summary-mark-as-expirable
6005 Mark the current article as expirable
6006 (@code{gnus-summary-mark-as-expirable}).
6007
6008 @item M b
6009 @kindex M b (Summary)
6010 @findex gnus-summary-set-bookmark
6011 Set a bookmark in the current article
6012 (@code{gnus-summary-set-bookmark}).
6013
6014 @item M B
6015 @kindex M B (Summary)
6016 @findex gnus-summary-remove-bookmark
6017 Remove the bookmark from the current article
6018 (@code{gnus-summary-remove-bookmark}).
6019
6020 @item M V c
6021 @kindex M V c (Summary)
6022 @findex gnus-summary-clear-above
6023 Clear all marks from articles with scores over the default score (or
6024 over the numeric prefix) (@code{gnus-summary-clear-above}).
6025
6026 @item M V u
6027 @kindex M V u (Summary)
6028 @findex gnus-summary-tick-above
6029 Tick all articles with scores over the default score (or over the
6030 numeric prefix) (@code{gnus-summary-tick-above}).
6031
6032 @item M V m
6033 @kindex M V m (Summary)
6034 @findex gnus-summary-mark-above
6035 Prompt for a mark, and mark all articles with scores over the default
6036 score (or over the numeric prefix) with this mark
6037 (@code{gnus-summary-clear-above}).
6038 @end table
6039
6040 @vindex gnus-summary-goto-unread
6041 The @code{gnus-summary-goto-unread} variable controls what action should
6042 be taken after setting a mark.  If non-@code{nil}, point will move to
6043 the next/previous unread article.  If @code{nil}, point will just move
6044 one line up or down.  As a special case, if this variable is
6045 @code{never}, all the marking commands as well as other commands (like
6046 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6047 The default is @code{t}.
6048
6049
6050 @node Generic Marking Commands
6051 @subsection Generic Marking Commands
6052
6053 Some people would like the command that ticks an article (@kbd{!}) go to
6054 the next article.  Others would like it to go to the next unread
6055 article.  Yet others would like it to stay on the current article.  And
6056 even though I haven't heard of anybody wanting it to go to the
6057 previous (unread) article, I'm sure there are people that want that as
6058 well.
6059
6060 Multiply these five behaviors with five different marking commands, and
6061 you get a potentially complex set of variable to control what each
6062 command should do.
6063
6064 To sidestep that mess, Gnus provides commands that do all these
6065 different things.  They can be found on the @kbd{M M} map in the summary
6066 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6067 to list in this manual.
6068
6069 While you can use these commands directly, most users would prefer
6070 altering the summary mode keymap.  For instance, if you would like the
6071 @kbd{!} command to go to the next article instead of the next unread
6072 article, you could say something like:
6073
6074 @lisp
6075 @group
6076 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6077 (defun my-alter-summary-map ()
6078   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6079 @end group
6080 @end lisp
6081
6082 @noindent
6083 or
6084
6085 @lisp
6086 (defun my-alter-summary-map ()
6087   (local-set-key "!" "MM!n"))
6088 @end lisp
6089
6090
6091 @node Setting Process Marks
6092 @subsection Setting Process Marks
6093 @cindex setting process marks
6094
6095 Process marks are displayed as @code{#} in the summary buffer, and are
6096 used for marking articles in such a way that other commands will
6097 process these articles.  For instance, if you process mark four
6098 articles and then use the @kbd{*} command, Gnus will enter these four
6099 commands into the cache.  For more information,
6100 @pxref{Process/Prefix}.
6101
6102 @table @kbd
6103
6104 @item M P p
6105 @itemx #
6106 @kindex # (Summary)
6107 @kindex M P p (Summary)
6108 @findex gnus-summary-mark-as-processable
6109 Mark the current article with the process mark
6110 (@code{gnus-summary-mark-as-processable}).
6111 @findex gnus-summary-unmark-as-processable
6112
6113 @item M P u
6114 @itemx M-#
6115 @kindex M P u (Summary)
6116 @kindex M-# (Summary)
6117 Remove the process mark, if any, from the current article
6118 (@code{gnus-summary-unmark-as-processable}).
6119
6120 @item M P U
6121 @kindex M P U (Summary)
6122 @findex gnus-summary-unmark-all-processable
6123 Remove the process mark from all articles
6124 (@code{gnus-summary-unmark-all-processable}).
6125
6126 @item M P i
6127 @kindex M P i (Summary)
6128 @findex gnus-uu-invert-processable
6129 Invert the list of process marked articles
6130 (@code{gnus-uu-invert-processable}).
6131
6132 @item M P R
6133 @kindex M P R (Summary)
6134 @findex gnus-uu-mark-by-regexp
6135 Mark articles that have a @code{Subject} header that matches a regular
6136 expression (@code{gnus-uu-mark-by-regexp}).
6137
6138 @item M P G
6139 @kindex M P G (Summary)
6140 @findex gnus-uu-unmark-by-regexp
6141 Unmark articles that have a @code{Subject} header that matches a regular
6142 expression (@code{gnus-uu-unmark-by-regexp}).
6143
6144 @item M P r
6145 @kindex M P r (Summary)
6146 @findex gnus-uu-mark-region
6147 Mark articles in region (@code{gnus-uu-mark-region}).
6148
6149 @item M P g
6150 @kindex M P g
6151 @findex gnus-uu-unmark-region
6152 Unmark articles in region (@code{gnus-uu-unmark-region}).
6153
6154 @item M P t
6155 @kindex M P t (Summary)
6156 @findex gnus-uu-mark-thread
6157 Mark all articles in the current (sub)thread
6158 (@code{gnus-uu-mark-thread}).
6159
6160 @item M P T
6161 @kindex M P T (Summary)
6162 @findex gnus-uu-unmark-thread
6163 Unmark all articles in the current (sub)thread
6164 (@code{gnus-uu-unmark-thread}).
6165
6166 @item M P v
6167 @kindex M P v (Summary)
6168 @findex gnus-uu-mark-over
6169 Mark all articles that have a score above the prefix argument
6170 (@code{gnus-uu-mark-over}).
6171
6172 @item M P s
6173 @kindex M P s (Summary)
6174 @findex gnus-uu-mark-series
6175 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6176
6177 @item M P S
6178 @kindex M P S (Summary)
6179 @findex gnus-uu-mark-sparse
6180 Mark all series that have already had some articles marked
6181 (@code{gnus-uu-mark-sparse}).
6182
6183 @item M P a
6184 @kindex M P a (Summary)
6185 @findex gnus-uu-mark-all
6186 Mark all articles in series order (@code{gnus-uu-mark-series}).
6187
6188 @item M P b
6189 @kindex M P b (Summary)
6190 @findex gnus-uu-mark-buffer
6191 Mark all articles in the buffer in the order they appear
6192 (@code{gnus-uu-mark-buffer}).
6193
6194 @item M P k
6195 @kindex M P k (Summary)
6196 @findex gnus-summary-kill-process-mark
6197 Push the current process mark set onto the stack and unmark all articles
6198 (@code{gnus-summary-kill-process-mark}).
6199
6200 @item M P y
6201 @kindex M P y (Summary)
6202 @findex gnus-summary-yank-process-mark
6203 Pop the previous process mark set from the stack and restore it
6204 (@code{gnus-summary-yank-process-mark}).
6205
6206 @item M P w
6207 @kindex M P w (Summary)
6208 @findex gnus-summary-save-process-mark
6209 Push the current process mark set onto the stack
6210 (@code{gnus-summary-save-process-mark}).
6211
6212 @end table
6213
6214 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6215 set process marks based on article body contents.
6216
6217
6218 @node Limiting
6219 @section Limiting
6220 @cindex limiting
6221
6222 It can be convenient to limit the summary buffer to just show some
6223 subset of the articles currently in the group.  The effect most limit
6224 commands have is to remove a few (or many) articles from the summary
6225 buffer.
6226
6227 All limiting commands work on subsets of the articles already fetched
6228 from the servers.  None of these commands query the server for
6229 additional articles.
6230
6231 @table @kbd
6232
6233 @item / /
6234 @itemx / s
6235 @kindex / / (Summary)
6236 @findex gnus-summary-limit-to-subject
6237 Limit the summary buffer to articles that match some subject
6238 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6239 matching articles.
6240
6241 @item / a
6242 @kindex / a (Summary)
6243 @findex gnus-summary-limit-to-author
6244 Limit the summary buffer to articles that match some author
6245 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6246 matching articles.
6247
6248 @item / x
6249 @kindex / x (Summary)
6250 @findex gnus-summary-limit-to-extra
6251 Limit the summary buffer to articles that match one of the ``extra''
6252 headers (@pxref{To From Newsgroups})
6253 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6254 matching articles.
6255
6256 @item / u
6257 @itemx x
6258 @kindex / u (Summary)
6259 @kindex x (Summary)
6260 @findex gnus-summary-limit-to-unread
6261 Limit the summary buffer to articles not marked as read
6262 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6263 buffer to articles strictly unread.  This means that ticked and
6264 dormant articles will also be excluded.
6265
6266 @item / m
6267 @kindex / m (Summary)
6268 @findex gnus-summary-limit-to-marks
6269 Ask for a mark and then limit to all articles that have been marked
6270 with that mark (@code{gnus-summary-limit-to-marks}).
6271
6272 @item / t
6273 @kindex / t (Summary)
6274 @findex gnus-summary-limit-to-age
6275 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6276 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6277 articles younger than that number of days.
6278
6279 @item / n
6280 @kindex / n (Summary)
6281 @findex gnus-summary-limit-to-articles
6282 Limit the summary buffer to the current article
6283 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6284 convention (@pxref{Process/Prefix}).
6285
6286 @item / w
6287 @kindex / w (Summary)
6288 @findex gnus-summary-pop-limit
6289 Pop the previous limit off the stack and restore it
6290 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6291 the stack.
6292
6293 @item / .
6294 @kindex / . (Summary)
6295 @findex gnus-summary-limit-to-unseen
6296 Limit the summary buffer to the unseen articles
6297 (@code{gnus-summary-limit-to-unseen}).
6298
6299 @item / v
6300 @kindex / v (Summary)
6301 @findex gnus-summary-limit-to-score
6302 Limit the summary buffer to articles that have a score at or above some
6303 score (@code{gnus-summary-limit-to-score}).
6304
6305 @item / p
6306 @kindex / p (Summary)
6307 @findex gnus-summary-limit-to-display-predicate
6308 Limit the summary buffer to articles that satisfy the @code{display}
6309 group parameter predicate
6310 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6311 Parameters}, for more on this predicate.
6312
6313 @item / E
6314 @itemx M S
6315 @kindex M S (Summary)
6316 @kindex / E (Summary)
6317 @findex gnus-summary-limit-include-expunged
6318 Include all expunged articles in the limit
6319 (@code{gnus-summary-limit-include-expunged}).
6320
6321 @item / D
6322 @kindex / D (Summary)
6323 @findex gnus-summary-limit-include-dormant
6324 Include all dormant articles in the limit
6325 (@code{gnus-summary-limit-include-dormant}).
6326
6327 @item / *
6328 @kindex / * (Summary)
6329 @findex gnus-summary-limit-include-cached
6330 Include all cached articles in the limit
6331 (@code{gnus-summary-limit-include-cached}).
6332
6333 @item / d
6334 @kindex / d (Summary)
6335 @findex gnus-summary-limit-exclude-dormant
6336 Exclude all dormant articles from the limit
6337 (@code{gnus-summary-limit-exclude-dormant}).
6338
6339 @item / M
6340 @kindex / M (Summary)
6341 @findex gnus-summary-limit-exclude-marks
6342 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6343
6344 @item / T
6345 @kindex / T (Summary)
6346 @findex gnus-summary-limit-include-thread
6347 Include all the articles in the current thread in the limit.
6348
6349 @item / c
6350 @kindex / c (Summary)
6351 @findex gnus-summary-limit-exclude-childless-dormant
6352 Exclude all dormant articles that have no children from the limit@*
6353 (@code{gnus-summary-limit-exclude-childless-dormant}).
6354
6355 @item / C
6356 @kindex / C (Summary)
6357 @findex gnus-summary-limit-mark-excluded-as-read
6358 Mark all excluded unread articles as read
6359 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6360 also mark excluded ticked and dormant articles as read.
6361
6362 @item / N
6363 @kindex / N (Summary)
6364 @findex gnus-summary-insert-new-articles
6365 Insert all new articles in the summary buffer.  It scans for new emails
6366 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6367
6368 @item / o
6369 @kindex / o (Summary)
6370 @findex gnus-summary-insert-old-articles
6371 Insert all old articles in the summary buffer.  If given a numbered
6372 prefix, fetch this number of articles.
6373
6374 @end table
6375
6376
6377 @node Threading
6378 @section Threading
6379 @cindex threading
6380 @cindex article threading
6381
6382 Gnus threads articles by default.  @dfn{To thread} is to put responses
6383 to articles directly after the articles they respond to---in a
6384 hierarchical fashion.
6385
6386 Threading is done by looking at the @code{References} headers of the
6387 articles.  In a perfect world, this would be enough to build pretty
6388 trees, but unfortunately, the @code{References} header is often broken
6389 or simply missing.  Weird news propagation exacerbates the problem,
6390 so one has to employ other heuristics to get pleasing results.  A
6391 plethora of approaches exists, as detailed in horrible detail in
6392 @ref{Customizing Threading}.
6393
6394 First, a quick overview of the concepts:
6395
6396 @table @dfn
6397 @item root
6398 The top-most article in a thread; the first article in the thread.
6399
6400 @item thread
6401 A tree-like article structure.
6402
6403 @item sub-thread
6404 A small(er) section of this tree-like structure.
6405
6406 @item loose threads
6407 Threads often lose their roots due to article expiry, or due to the root
6408 already having been read in a previous session, and not displayed in the
6409 summary buffer.  We then typically have many sub-threads that really
6410 belong to one thread, but are without connecting roots.  These are
6411 called loose threads.
6412
6413 @item thread gathering
6414 An attempt to gather loose threads into bigger threads.
6415
6416 @item sparse threads
6417 A thread where the missing articles have been ``guessed'' at, and are
6418 displayed as empty lines in the summary buffer.
6419
6420 @end table
6421
6422
6423 @menu
6424 * Customizing Threading::       Variables you can change to affect the threading.
6425 * Thread Commands::             Thread based commands in the summary buffer.
6426 @end menu
6427
6428
6429 @node Customizing Threading
6430 @subsection Customizing Threading
6431 @cindex customizing threading
6432
6433 @menu
6434 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6435 * Filling In Threads::          Making the threads displayed look fuller.
6436 * More Threading::              Even more variables for fiddling with threads.
6437 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6438 @end menu
6439
6440
6441 @node Loose Threads
6442 @subsubsection Loose Threads
6443 @cindex <
6444 @cindex >
6445 @cindex loose threads
6446
6447 @table @code
6448 @item gnus-summary-make-false-root
6449 @vindex gnus-summary-make-false-root
6450 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6451 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6452 Yup.)  Loose subtrees occur when the real root has expired, or you've
6453 read or killed the root in a previous session.
6454
6455 When there is no real root of a thread, gnus will have to fudge
6456 something.  This variable says what fudging method gnus should use.
6457 There are four possible values:
6458
6459 @iftex
6460 @iflatex
6461 \gnusfigure{The Summary Buffer}{390}{
6462 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6463 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6464 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6465 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6466 }
6467 @end iflatex
6468 @end iftex
6469
6470 @cindex adopting articles
6471
6472 @table @code
6473
6474 @item adopt
6475 Gnus will make the first of the orphaned articles the parent.  This
6476 parent will adopt all the other articles.  The adopted articles will be
6477 marked as such by pointy brackets (@samp{<>}) instead of the standard
6478 square brackets (@samp{[]}).  This is the default method.
6479
6480 @item dummy
6481 @vindex gnus-summary-dummy-line-format
6482 @vindex gnus-summary-make-false-root-always
6483 Gnus will create a dummy summary line that will pretend to be the
6484 parent.  This dummy line does not correspond to any real article, so
6485 selecting it will just select the first real article after the dummy
6486 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6487 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6488 which is the subject of the article.  @xref{Formatting Variables}.
6489 If you want all threads to have a dummy root, even the non-gathered
6490 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6491
6492 @item empty
6493 Gnus won't actually make any article the parent, but simply leave the
6494 subject field of all orphans except the first empty.  (Actually, it will
6495 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6496 Buffer Format}).)
6497
6498 @item none
6499 Don't make any article parent at all.  Just gather the threads and
6500 display them after one another.
6501
6502 @item nil
6503 Don't gather loose threads.
6504 @end table
6505
6506 @item gnus-summary-gather-subject-limit
6507 @vindex gnus-summary-gather-subject-limit
6508 Loose threads are gathered by comparing subjects of articles.  If this
6509 variable is @code{nil}, gnus requires an exact match between the
6510 subjects of the loose threads before gathering them into one big
6511 super-thread.  This might be too strict a requirement, what with the
6512 presence of stupid newsreaders that chop off long subject lines.  If
6513 you think so, set this variable to, say, 20 to require that only the
6514 first 20 characters of the subjects have to match.  If you set this
6515 variable to a really low number, you'll find that gnus will gather
6516 everything in sight into one thread, which isn't very helpful.
6517
6518 @cindex fuzzy article gathering
6519 If you set this variable to the special value @code{fuzzy}, gnus will
6520 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6521 Matching}).
6522
6523 @item gnus-simplify-subject-fuzzy-regexp
6524 @vindex gnus-simplify-subject-fuzzy-regexp
6525 This can either be a regular expression or list of regular expressions
6526 that match strings that will be removed from subjects if fuzzy subject
6527 simplification is used.
6528
6529 @item gnus-simplify-ignored-prefixes
6530 @vindex gnus-simplify-ignored-prefixes
6531 If you set @code{gnus-summary-gather-subject-limit} to something as low
6532 as 10, you might consider setting this variable to something sensible:
6533
6534 @c Written by Michael Ernst <mernst@cs.rice.edu>
6535 @lisp
6536 (setq gnus-simplify-ignored-prefixes
6537       (concat
6538        "\\`\\[?\\("
6539        (mapconcat
6540         'identity
6541         '("looking"
6542           "wanted" "followup" "summary\\( of\\)?"
6543           "help" "query" "problem" "question"
6544           "answer" "reference" "announce"
6545           "How can I" "How to" "Comparison of"
6546           ;; ...
6547           )
6548         "\\|")
6549        "\\)\\s *\\("
6550        (mapconcat 'identity
6551                   '("for" "for reference" "with" "about")
6552                   "\\|")
6553        "\\)?\\]?:?[ \t]*"))
6554 @end lisp
6555
6556 All words that match this regexp will be removed before comparing two
6557 subjects.
6558
6559 @item gnus-simplify-subject-functions
6560 @vindex gnus-simplify-subject-functions
6561 If non-@code{nil}, this variable overrides
6562 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6563 list of functions to apply to the @code{Subject} string iteratively to
6564 arrive at the simplified version of the string.
6565
6566 Useful functions to put in this list include:
6567
6568 @table @code
6569 @item gnus-simplify-subject-re
6570 @findex gnus-simplify-subject-re
6571 Strip the leading @samp{Re:}.
6572
6573 @item gnus-simplify-subject-fuzzy
6574 @findex gnus-simplify-subject-fuzzy
6575 Simplify fuzzily.
6576
6577 @item gnus-simplify-whitespace
6578 @findex gnus-simplify-whitespace
6579 Remove excessive whitespace.
6580
6581 @item gnus-simplify-all-whitespace
6582 @findex gnus-simplify-all-whitespace
6583 Remove all whitespace.
6584 @end table
6585
6586 You may also write your own functions, of course.
6587
6588
6589 @item gnus-summary-gather-exclude-subject
6590 @vindex gnus-summary-gather-exclude-subject
6591 Since loose thread gathering is done on subjects only, that might lead
6592 to many false hits, especially with certain common subjects like
6593 @samp{} and @samp{(none)}.  To make the situation slightly better,
6594 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6595 what subjects should be excluded from the gathering process.@*
6596 The default is @samp{^ *$\\|^(none)$}.
6597
6598 @item gnus-summary-thread-gathering-function
6599 @vindex gnus-summary-thread-gathering-function
6600 Gnus gathers threads by looking at @code{Subject} headers.  This means
6601 that totally unrelated articles may end up in the same ``thread'', which
6602 is confusing.  An alternate approach is to look at all the
6603 @code{Message-ID}s in all the @code{References} headers to find matches.
6604 This will ensure that no gathered threads ever include unrelated
6605 articles, but it also means that people who have posted with broken
6606 newsreaders won't be gathered properly.  The choice is yours---plague or
6607 cholera:
6608
6609 @table @code
6610 @item gnus-gather-threads-by-subject
6611 @findex gnus-gather-threads-by-subject
6612 This function is the default gathering function and looks at
6613 @code{Subject}s exclusively.
6614
6615 @item gnus-gather-threads-by-references
6616 @findex gnus-gather-threads-by-references
6617 This function looks at @code{References} headers exclusively.
6618 @end table
6619
6620 If you want to test gathering by @code{References}, you could say
6621 something like:
6622
6623 @lisp
6624 (setq gnus-summary-thread-gathering-function
6625       'gnus-gather-threads-by-references)
6626 @end lisp
6627
6628 @end table
6629
6630
6631 @node Filling In Threads
6632 @subsubsection Filling In Threads
6633
6634 @table @code
6635 @item gnus-fetch-old-headers
6636 @vindex gnus-fetch-old-headers
6637 If non-@code{nil}, gnus will attempt to build old threads by fetching
6638 more old headers---headers to articles marked as read.  If you
6639 would like to display as few summary lines as possible, but still
6640 connect as many loose threads as possible, you should set this variable
6641 to @code{some} or a number.  If you set it to a number, no more than
6642 that number of extra old headers will be fetched.  In either case,
6643 fetching old headers only works if the back end you are using carries
6644 overview files---this would normally be @code{nntp}, @code{nnspool},
6645 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6646 the thread has been expired by the server, there's not much Gnus can do
6647 about that.
6648
6649 This variable can also be set to @code{invisible}.  This won't have any
6650 visible effects, but is useful if you use the @kbd{A T} command a lot
6651 (@pxref{Finding the Parent}).
6652
6653 @item gnus-fetch-old-ephemeral-headers
6654 @vindex gnus-fetch-old-ephemeral-headers
6655 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6656 newsgroups.
6657
6658 @item gnus-build-sparse-threads
6659 @vindex gnus-build-sparse-threads
6660 Fetching old headers can be slow.  A low-rent similar effect can be
6661 gotten by setting this variable to @code{some}.  Gnus will then look at
6662 the complete @code{References} headers of all articles and try to string
6663 together articles that belong in the same thread.  This will leave
6664 @dfn{gaps} in the threading display where gnus guesses that an article
6665 is missing from the thread.  (These gaps appear like normal summary
6666 lines.  If you select a gap, gnus will try to fetch the article in
6667 question.)  If this variable is @code{t}, gnus will display all these
6668 ``gaps'' without regard for whether they are useful for completing the
6669 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6670 off sparse leaf nodes that don't lead anywhere.  This variable is
6671 @code{nil} by default.
6672
6673 @item gnus-read-all-available-headers
6674 @vindex gnus-read-all-available-headers
6675 This is a rather obscure variable that few will find useful.  It's
6676 intended for those non-news newsgroups where the back end has to fetch
6677 quite a lot to present the summary buffer, and where it's impossible to
6678 go back to parents of articles.  This is mostly the case in the
6679 web-based groups, like the @code{nnultimate} groups.
6680
6681 If you don't use those, then it's safe to leave this as the default
6682 @code{nil}.  If you want to use this variable, it should be a regexp
6683 that matches the group name, or @code{t} for all groups.
6684
6685 @end table
6686
6687
6688 @node More Threading
6689 @subsubsection More Threading
6690
6691 @table @code
6692 @item gnus-show-threads
6693 @vindex gnus-show-threads
6694 If this variable is @code{nil}, no threading will be done, and all of
6695 the rest of the variables here will have no effect.  Turning threading
6696 off will speed group selection up a bit, but it is sure to make reading
6697 slower and more awkward.
6698
6699 @item gnus-thread-hide-subtree
6700 @vindex gnus-thread-hide-subtree
6701 If non-@code{nil}, all threads will be hidden when the summary buffer is
6702 generated.
6703
6704 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6705 Available predicates are @code{gnus-article-unread-p} and
6706 @code{gnus-article-unseen-p}.
6707
6708 Here's an example:
6709
6710 @lisp
6711 (setq gnus-thread-hide-subtree
6712       '(or gnus-article-unread-p
6713            gnus-article-unseen-p))
6714 @end lisp
6715
6716 (It's a pretty nonsensical example, since all unseen articles are also
6717 unread, but you get my drift.)
6718
6719
6720 @item gnus-thread-expunge-below
6721 @vindex gnus-thread-expunge-below
6722 All threads that have a total score (as defined by
6723 @code{gnus-thread-score-function}) less than this number will be
6724 expunged.  This variable is @code{nil} by default, which means that no
6725 threads are expunged.
6726
6727 @item gnus-thread-hide-killed
6728 @vindex gnus-thread-hide-killed
6729 if you kill a thread and this variable is non-@code{nil}, the subtree
6730 will be hidden.
6731
6732 @item gnus-thread-ignore-subject
6733 @vindex gnus-thread-ignore-subject
6734 Sometimes somebody changes the subject in the middle of a thread.  If
6735 this variable is non-@code{nil}, which is the default, the subject
6736 change is ignored.  If it is @code{nil}, a change in the subject will
6737 result in a new thread.
6738
6739 @item gnus-thread-indent-level
6740 @vindex gnus-thread-indent-level
6741 This is a number that says how much each sub-thread should be indented.
6742 The default is 4.
6743
6744 @item gnus-sort-gathered-threads-function
6745 @vindex gnus-sort-gathered-threads-function
6746 Sometimes, particularly with mailing lists, the order in which mails
6747 arrive locally is not necessarily the same as the order in which they
6748 arrived on the mailing list.  Consequently, when sorting sub-threads
6749 using the default @code{gnus-thread-sort-by-number}, responses can end
6750 up appearing before the article to which they are responding to.
6751 Setting this variable to an alternate value
6752 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6753 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6754 more logical sub-thread ordering in such instances.
6755
6756 @end table
6757
6758
6759 @node Low-Level Threading
6760 @subsubsection Low-Level Threading
6761
6762 @table @code
6763
6764 @item gnus-parse-headers-hook
6765 @vindex gnus-parse-headers-hook
6766 Hook run before parsing any headers.  The default value is
6767 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6768 @code{default-mime-charset} in summary buffer based on variable
6769 @code{gnus-newsgroup-default-charset-alist}.
6770
6771 @item gnus-alter-header-function
6772 @vindex gnus-alter-header-function
6773 If non-@code{nil}, this function will be called to allow alteration of
6774 article header structures.  The function is called with one parameter,
6775 the article header vector, which it may alter in any way.  For instance,
6776 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6777 in systematic ways (by adding prefixes and such), you can use this
6778 variable to un-scramble the @code{Message-ID}s so that they are more
6779 meaningful.  Here's one example:
6780
6781 @lisp
6782 (setq gnus-alter-header-function 'my-alter-message-id)
6783
6784 (defun my-alter-message-id (header)
6785   (let ((id (mail-header-id header)))
6786     (when (string-match
6787            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6788       (mail-header-set-id
6789        (concat (match-string 1 id) "@@" (match-string 2 id))
6790        header))))
6791 @end lisp
6792
6793 @end table
6794
6795
6796 @node Thread Commands
6797 @subsection Thread Commands
6798 @cindex thread commands
6799
6800 @table @kbd
6801
6802 @item T k
6803 @itemx C-M-k
6804 @kindex T k (Summary)
6805 @kindex C-M-k (Summary)
6806 @findex gnus-summary-kill-thread
6807 Mark all articles in the current (sub-)thread as read
6808 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6809 remove all marks instead.  If the prefix argument is negative, tick
6810 articles instead.
6811
6812 @item T l
6813 @itemx C-M-l
6814 @kindex T l (Summary)
6815 @kindex C-M-l (Summary)
6816 @findex gnus-summary-lower-thread
6817 Lower the score of the current (sub-)thread
6818 (@code{gnus-summary-lower-thread}).
6819
6820 @item T i
6821 @kindex T i (Summary)
6822 @findex gnus-summary-raise-thread
6823 Increase the score of the current (sub-)thread
6824 (@code{gnus-summary-raise-thread}).
6825
6826 @item T #
6827 @kindex T # (Summary)
6828 @findex gnus-uu-mark-thread
6829 Set the process mark on the current (sub-)thread
6830 (@code{gnus-uu-mark-thread}).
6831
6832 @item T M-#
6833 @kindex T M-# (Summary)
6834 @findex gnus-uu-unmark-thread
6835 Remove the process mark from the current (sub-)thread
6836 (@code{gnus-uu-unmark-thread}).
6837
6838 @item T T
6839 @kindex T T (Summary)
6840 @findex gnus-summary-toggle-threads
6841 Toggle threading (@code{gnus-summary-toggle-threads}).
6842
6843 @item T s
6844 @kindex T s (Summary)
6845 @findex gnus-summary-show-thread
6846 Expose the (sub-)thread hidden under the current article, if any@*
6847 (@code{gnus-summary-show-thread}).
6848
6849 @item T h
6850 @kindex T h (Summary)
6851 @findex gnus-summary-hide-thread
6852 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6853
6854 @item T S
6855 @kindex T S (Summary)
6856 @findex gnus-summary-show-all-threads
6857 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6858
6859 @item T H
6860 @kindex T H (Summary)
6861 @findex gnus-summary-hide-all-threads
6862 Hide all threads (@code{gnus-summary-hide-all-threads}).
6863
6864 @item T t
6865 @kindex T t (Summary)
6866 @findex gnus-summary-rethread-current
6867 Re-thread the current article's thread
6868 (@code{gnus-summary-rethread-current}).  This works even when the
6869 summary buffer is otherwise unthreaded.
6870
6871 @item T ^
6872 @kindex T ^ (Summary)
6873 @findex gnus-summary-reparent-thread
6874 Make the current article the child of the marked (or previous) article
6875 (@code{gnus-summary-reparent-thread}).
6876
6877 @end table
6878
6879 The following commands are thread movement commands.  They all
6880 understand the numeric prefix.
6881
6882 @table @kbd
6883
6884 @item T n
6885 @kindex T n (Summary)
6886 @itemx C-M-f
6887 @kindex C-M-n (Summary)
6888 @itemx M-down
6889 @kindex M-down (Summary)
6890 @findex gnus-summary-next-thread
6891 Go to the next thread (@code{gnus-summary-next-thread}).
6892
6893 @item T p
6894 @kindex T p (Summary)
6895 @itemx C-M-b
6896 @kindex C-M-p (Summary)
6897 @itemx M-up
6898 @kindex M-up (Summary)
6899 @findex gnus-summary-prev-thread
6900 Go to the previous thread (@code{gnus-summary-prev-thread}).
6901
6902 @item T d
6903 @kindex T d (Summary)
6904 @findex gnus-summary-down-thread
6905 Descend the thread (@code{gnus-summary-down-thread}).
6906
6907 @item T u
6908 @kindex T u (Summary)
6909 @findex gnus-summary-up-thread
6910 Ascend the thread (@code{gnus-summary-up-thread}).
6911
6912 @item T o
6913 @kindex T o (Summary)
6914 @findex gnus-summary-top-thread
6915 Go to the top of the thread (@code{gnus-summary-top-thread}).
6916 @end table
6917
6918 @vindex gnus-thread-operation-ignore-subject
6919 If you ignore subject while threading, you'll naturally end up with
6920 threads that have several different subjects in them.  If you then issue
6921 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6922 wish to kill the entire thread, but just those parts of the thread that
6923 have the same subject as the current article.  If you like this idea,
6924 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6925 is non-@code{nil} (which it is by default), subjects will be ignored
6926 when doing thread commands.  If this variable is @code{nil}, articles in
6927 the same thread with different subjects will not be included in the
6928 operation in question.  If this variable is @code{fuzzy}, only articles
6929 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6930 Matching}).
6931
6932
6933 @node Sorting the Summary Buffer
6934 @section Sorting the Summary Buffer
6935
6936 @findex gnus-thread-sort-by-total-score
6937 @findex gnus-thread-sort-by-date
6938 @findex gnus-thread-sort-by-score
6939 @findex gnus-thread-sort-by-subject
6940 @findex gnus-thread-sort-by-author
6941 @findex gnus-thread-sort-by-number
6942 @findex gnus-thread-sort-by-random
6943 @vindex gnus-thread-sort-functions
6944 @findex gnus-thread-sort-by-most-recent-number
6945 @findex gnus-thread-sort-by-most-recent-date
6946 If you are using a threaded summary display, you can sort the threads by
6947 setting @code{gnus-thread-sort-functions}, which can be either a single
6948 function, a list of functions, or a list containing functions and
6949 @code{(not some-function)} elements.
6950
6951 By default, sorting is done on article numbers.  Ready-made sorting
6952 predicate functions include @code{gnus-thread-sort-by-number},
6953 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6954 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6955 @code{gnus-thread-sort-by-most-recent-number},
6956 @code{gnus-thread-sort-by-most-recent-date},
6957 @code{gnus-thread-sort-by-random} and
6958 @code{gnus-thread-sort-by-total-score}.
6959
6960 Each function takes two threads and returns non-@code{nil} if the first
6961 thread should be sorted before the other.  Note that sorting really is
6962 normally done by looking only at the roots of each thread.
6963
6964 If you use more than one function, the primary sort key should be the
6965 last function in the list.  You should probably always include
6966 @code{gnus-thread-sort-by-number} in the list of sorting
6967 functions---preferably first.  This will ensure that threads that are
6968 equal with respect to the other sort criteria will be displayed in
6969 ascending article order.
6970
6971 If you would like to sort by reverse score, then by subject, and finally
6972 by number, you could do something like:
6973
6974 @lisp
6975 (setq gnus-thread-sort-functions
6976       '(gnus-thread-sort-by-number
6977         gnus-thread-sort-by-subject
6978         (not gnus-thread-sort-by-total-score)))
6979 @end lisp
6980
6981 The threads that have highest score will be displayed first in the
6982 summary buffer.  When threads have the same score, they will be sorted
6983 alphabetically.  The threads that have the same score and the same
6984 subject will be sorted by number, which is (normally) the sequence in
6985 which the articles arrived.
6986
6987 If you want to sort by score and then reverse arrival order, you could
6988 say something like:
6989
6990 @lisp
6991 (setq gnus-thread-sort-functions
6992       '((lambda (t1 t2)
6993           (not (gnus-thread-sort-by-number t1 t2)))
6994         gnus-thread-sort-by-score))
6995 @end lisp
6996
6997 @vindex gnus-thread-score-function
6998 The function in the @code{gnus-thread-score-function} variable (default
6999 @code{+}) is used for calculating the total score of a thread.  Useful
7000 functions might be @code{max}, @code{min}, or squared means, or whatever
7001 tickles your fancy.
7002
7003 @findex gnus-article-sort-functions
7004 @findex gnus-article-sort-by-date
7005 @findex gnus-article-sort-by-score
7006 @findex gnus-article-sort-by-subject
7007 @findex gnus-article-sort-by-author
7008 @findex gnus-article-sort-by-random
7009 @findex gnus-article-sort-by-number
7010 If you are using an unthreaded display for some strange reason or
7011 other, you have to fiddle with the @code{gnus-article-sort-functions}
7012 variable.  It is very similar to the
7013 @code{gnus-thread-sort-functions}, except that it uses slightly
7014 different functions for article comparison.  Available sorting
7015 predicate functions are @code{gnus-article-sort-by-number},
7016 @code{gnus-article-sort-by-author},
7017 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7018 @code{gnus-article-sort-by-random}, and
7019 @code{gnus-article-sort-by-score}.
7020
7021 If you want to sort an unthreaded summary display by subject, you could
7022 say something like:
7023
7024 @lisp
7025 (setq gnus-article-sort-functions
7026       '(gnus-article-sort-by-number
7027         gnus-article-sort-by-subject))
7028 @end lisp
7029
7030
7031
7032 @node Asynchronous Fetching
7033 @section Asynchronous Article Fetching
7034 @cindex asynchronous article fetching
7035 @cindex article pre-fetch
7036 @cindex pre-fetch
7037
7038 If you read your news from an @acronym{NNTP} server that's far away, the
7039 network latencies may make reading articles a chore.  You have to wait
7040 for a while after pressing @kbd{n} to go to the next article before the
7041 article appears.  Why can't gnus just go ahead and fetch the article
7042 while you are reading the previous one?  Why not, indeed.
7043
7044 First, some caveats.  There are some pitfalls to using asynchronous
7045 article fetching, especially the way gnus does it.
7046
7047 Let's say you are reading article 1, which is short, and article 2 is
7048 quite long, and you are not interested in reading that.  Gnus does not
7049 know this, so it goes ahead and fetches article 2.  You decide to read
7050 article 3, but since gnus is in the process of fetching article 2, the
7051 connection is blocked.
7052
7053 To avoid these situations, gnus will open two (count 'em two)
7054 connections to the server.  Some people may think this isn't a very nice
7055 thing to do, but I don't see any real alternatives.  Setting up that
7056 extra connection takes some time, so gnus startup will be slower.
7057
7058 Gnus will fetch more articles than you will read.  This will mean that
7059 the link between your machine and the @acronym{NNTP} server will become more
7060 loaded than if you didn't use article pre-fetch.  The server itself will
7061 also become more loaded---both with the extra article requests, and the
7062 extra connection.
7063
7064 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7065 you really want to.
7066
7067 @vindex gnus-asynchronous
7068 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7069 happen automatically.
7070
7071 @vindex gnus-use-article-prefetch
7072 You can control how many articles are to be pre-fetched by setting
7073 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7074 that when you read an article in the group, the back end will pre-fetch
7075 the next 30 articles.  If this variable is @code{t}, the back end will
7076 pre-fetch all the articles it can without bound.  If it is
7077 @code{nil}, no pre-fetching will be done.
7078
7079 @vindex gnus-async-prefetch-article-p
7080 @findex gnus-async-read-p
7081 There are probably some articles that you don't want to pre-fetch---read
7082 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7083 variable controls whether an article is to be pre-fetched.  This
7084 function should return non-@code{nil} when the article in question is
7085 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7086 returns @code{nil} on read articles.  The function is called with an
7087 article data structure as the only parameter.
7088
7089 If, for instance, you wish to pre-fetch only unread articles shorter
7090 than 100 lines, you could say something like:
7091
7092 @lisp
7093 (defun my-async-short-unread-p (data)
7094   "Return non-nil for short, unread articles."
7095   (and (gnus-data-unread-p data)
7096        (< (mail-header-lines (gnus-data-header data))
7097           100)))
7098
7099 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7100 @end lisp
7101
7102 These functions will be called many, many times, so they should
7103 preferably be short and sweet to avoid slowing down gnus too much.
7104 It's probably a good idea to byte-compile things like this.
7105
7106 @vindex gnus-prefetched-article-deletion-strategy
7107 Articles have to be removed from the asynch buffer sooner or later.  The
7108 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7109 articles.  This is a list that may contain the following elements:
7110
7111 @table @code
7112 @item read
7113 Remove articles when they are read.
7114
7115 @item exit
7116 Remove articles when exiting the group.
7117 @end table
7118
7119 The default value is @code{(read exit)}.
7120
7121 @c @vindex gnus-use-header-prefetch
7122 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7123 @c from the next group.
7124
7125
7126 @node Article Caching
7127 @section Article Caching
7128 @cindex article caching
7129 @cindex caching
7130
7131 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7132 consider turning article caching on.  Each article will then be stored
7133 locally under your home directory.  As you may surmise, this could
7134 potentially use @emph{huge} amounts of disk space, as well as eat up all
7135 your inodes so fast it will make your head swim.  In vodka.
7136
7137 Used carefully, though, it could be just an easier way to save articles.
7138
7139 @vindex gnus-use-long-file-name
7140 @vindex gnus-cache-directory
7141 @vindex gnus-use-cache
7142 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7143 all articles ticked or marked as dormant will then be copied
7144 over to your local cache (@code{gnus-cache-directory}).  Whether this
7145 cache is flat or hierarchical is controlled by the
7146 @code{gnus-use-long-file-name} variable, as usual.
7147
7148 When re-selecting a ticked or dormant article, it will be fetched from the
7149 cache instead of from the server.  As articles in your cache will never
7150 expire, this might serve as a method of saving articles while still
7151 keeping them where they belong.  Just mark all articles you want to save
7152 as dormant, and don't worry.
7153
7154 When an article is marked as read, is it removed from the cache.
7155
7156 @vindex gnus-cache-remove-articles
7157 @vindex gnus-cache-enter-articles
7158 The entering/removal of articles from the cache is controlled by the
7159 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7160 variables.  Both are lists of symbols.  The first is @code{(ticked
7161 dormant)} by default, meaning that ticked and dormant articles will be
7162 put in the cache.  The latter is @code{(read)} by default, meaning that
7163 articles marked as read are removed from the cache.  Possibly
7164 symbols in these two lists are @code{ticked}, @code{dormant},
7165 @code{unread} and @code{read}.
7166
7167 @findex gnus-jog-cache
7168 So where does the massive article-fetching and storing come into the
7169 picture?  The @code{gnus-jog-cache} command will go through all
7170 subscribed newsgroups, request all unread articles, score them, and
7171 store them in the cache.  You should only ever, ever ever ever, use this
7172 command if 1) your connection to the @acronym{NNTP} server is really, really,
7173 really slow and 2) you have a really, really, really huge disk.
7174 Seriously.  One way to cut down on the number of articles downloaded is
7175 to score unwanted articles down and have them marked as read.  They will
7176 not then be downloaded by this command.
7177
7178 @vindex gnus-uncacheable-groups
7179 @vindex gnus-cacheable-groups
7180 It is likely that you do not want caching on all groups.  For instance,
7181 if your @code{nnml} mail is located under your home directory, it makes no
7182 sense to cache it somewhere else under your home directory.  Unless you
7183 feel that it's neat to use twice as much space.
7184
7185 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7186 regexp of groups to cache, @samp{^nntp} for instance, or set the
7187 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7188 Both variables are @code{nil} by default.  If a group matches both
7189 variables, the group is not cached.
7190
7191 @findex gnus-cache-generate-nov-databases
7192 @findex gnus-cache-generate-active
7193 @vindex gnus-cache-active-file
7194 The cache stores information on what articles it contains in its active
7195 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7196 of the cache) becomes all messed up for some reason or other, gnus
7197 offers two functions that will try to set things right.  @kbd{M-x
7198 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7199 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7200 file.
7201
7202 @findex gnus-cache-move-cache
7203 @code{gnus-cache-move-cache} will move your whole
7204 @code{gnus-cache-directory} to some other location.  You get asked to
7205 where, isn't that cool?
7206
7207 @node Persistent Articles
7208 @section Persistent Articles
7209 @cindex persistent articles
7210
7211 Closely related to article caching, we have @dfn{persistent articles}.
7212 In fact, it's just a different way of looking at caching, and much more
7213 useful in my opinion.
7214
7215 Say you're reading a newsgroup, and you happen on to some valuable gem
7216 that you want to keep and treasure forever.  You'd normally just save it
7217 (using one of the many saving commands) in some file.  The problem with
7218 that is that it's just, well, yucky.  Ideally you'd prefer just having
7219 the article remain in the group where you found it forever; untouched by
7220 the expiry going on at the news server.
7221
7222 This is what a @dfn{persistent article} is---an article that just won't
7223 be deleted.  It's implemented using the normal cache functions, but
7224 you use two explicit commands for managing persistent articles:
7225
7226 @table @kbd
7227
7228 @item *
7229 @kindex * (Summary)
7230 @findex gnus-cache-enter-article
7231 Make the current article persistent (@code{gnus-cache-enter-article}).
7232
7233 @item M-*
7234 @kindex M-* (Summary)
7235 @findex gnus-cache-remove-article
7236 Remove the current article from the persistent articles
7237 (@code{gnus-cache-remove-article}).  This will normally delete the
7238 article.
7239 @end table
7240
7241 Both these commands understand the process/prefix convention.
7242
7243 To avoid having all ticked articles (and stuff) entered into the cache,
7244 you should set @code{gnus-use-cache} to @code{passive} if you're just
7245 interested in persistent articles:
7246
7247 @lisp
7248 (setq gnus-use-cache 'passive)
7249 @end lisp
7250
7251
7252 @node Article Backlog
7253 @section Article Backlog
7254 @cindex backlog
7255 @cindex article backlog
7256
7257 If you have a slow connection, but the idea of using caching seems
7258 unappealing to you (and it is, really), you can help the situation some
7259 by switching on the @dfn{backlog}.  This is where gnus will buffer
7260 already read articles so that it doesn't have to re-fetch articles
7261 you've already read.  This only helps if you are in the habit of
7262 re-selecting articles you've recently read, of course.  If you never do
7263 that, turning the backlog on will slow gnus down a little bit, and
7264 increase memory usage some.
7265
7266 @vindex gnus-keep-backlog
7267 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7268 at most @var{n} old articles in a buffer for later re-fetching.  If this
7269 variable is non-@code{nil} and is not a number, gnus will store
7270 @emph{all} read articles, which means that your Emacs will grow without
7271 bound before exploding and taking your machine down with you.  I put
7272 that in there just to keep y'all on your toes.
7273
7274 The default value is 20.
7275
7276
7277 @node Saving Articles
7278 @section Saving Articles
7279 @cindex saving articles
7280
7281 Gnus can save articles in a number of ways.  Below is the documentation
7282 for saving articles in a fairly straight-forward fashion (i.e., little
7283 processing of the article is done before it is saved).  For a different
7284 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7285 (@pxref{Decoding Articles}).
7286
7287 For the commands listed here, the target is a file.  If you want to
7288 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7289 command (@pxref{Mail Group Commands}).
7290
7291 @vindex gnus-save-all-headers
7292 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7293 unwanted headers before saving the article.
7294
7295 @vindex gnus-saved-headers
7296 If the preceding variable is @code{nil}, all headers that match the
7297 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7298 deleted before saving.
7299
7300 @table @kbd
7301
7302 @item O o
7303 @itemx o
7304 @kindex O o (Summary)
7305 @kindex o (Summary)
7306 @findex gnus-summary-save-article
7307 @c @icon{gnus-summary-save-article}
7308 Save the current article using the default article saver
7309 (@code{gnus-summary-save-article}).
7310
7311 @item O m
7312 @kindex O m (Summary)
7313 @findex gnus-summary-save-article-mail
7314 Save the current article in mail format
7315 (@code{gnus-summary-save-article-mail}).
7316
7317 @item O r
7318 @kindex O r (Summary)
7319 @findex gnus-summary-save-article-rmail
7320 Save the current article in Rmail format
7321 (@code{gnus-summary-save-article-rmail}).
7322
7323 @item O f
7324 @kindex O f (Summary)
7325 @findex gnus-summary-save-article-file
7326 @c @icon{gnus-summary-save-article-file}
7327 Save the current article in plain file format
7328 (@code{gnus-summary-save-article-file}).
7329
7330 @item O F
7331 @kindex O F (Summary)
7332 @findex gnus-summary-write-article-file
7333 Write the current article in plain file format, overwriting any previous
7334 file contents (@code{gnus-summary-write-article-file}).
7335
7336 @item O b
7337 @kindex O b (Summary)
7338 @findex gnus-summary-save-article-body-file
7339 Save the current article body in plain file format
7340 (@code{gnus-summary-save-article-body-file}).
7341
7342 @item O h
7343 @kindex O h (Summary)
7344 @findex gnus-summary-save-article-folder
7345 Save the current article in mh folder format
7346 (@code{gnus-summary-save-article-folder}).
7347
7348 @item O v
7349 @kindex O v (Summary)
7350 @findex gnus-summary-save-article-vm
7351 Save the current article in a VM folder
7352 (@code{gnus-summary-save-article-vm}).
7353
7354 @item O p
7355 @itemx |
7356 @kindex O p (Summary)
7357 @kindex | (Summary)
7358 @findex gnus-summary-pipe-output
7359 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7360 the current article to a process (@code{gnus-summary-pipe-output}).
7361 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7362 complete headers in the piped output.
7363
7364 @item O P
7365 @kindex O P (Summary)
7366 @findex gnus-summary-muttprint
7367 @vindex gnus-summary-muttprint-program
7368 Save the current article into muttprint.  That is, print it using the
7369 external program @uref{http://muttprint.sourceforge.net/,
7370 Muttprint}.  The program name and options to use is controlled by the
7371 variable @code{gnus-summary-muttprint-program}.
7372 (@code{gnus-summary-muttprint}).
7373
7374 @end table
7375
7376 @vindex gnus-prompt-before-saving
7377 All these commands use the process/prefix convention
7378 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7379 functions, you might get tired of being prompted for files to save each
7380 and every article in.  The prompting action is controlled by
7381 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7382 default, giving you that excessive prompting action you know and
7383 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7384 just once for each series of articles you save.  If you like to really
7385 have Gnus do all your thinking for you, you can even set this variable
7386 to @code{nil}, which means that you will never be prompted for files to
7387 save articles in.  Gnus will simply save all the articles in the default
7388 files.
7389
7390
7391 @vindex gnus-default-article-saver
7392 You can customize the @code{gnus-default-article-saver} variable to make
7393 gnus do what you want it to.  You can use any of the six ready-made
7394 functions below, or you can create your own.
7395
7396 @table @code
7397
7398 @item gnus-summary-save-in-rmail
7399 @findex gnus-summary-save-in-rmail
7400 @vindex gnus-rmail-save-name
7401 @findex gnus-plain-save-name
7402 This is the default format, @dfn{Babyl}.  Uses the function in the
7403 @code{gnus-rmail-save-name} variable to get a file name to save the
7404 article in.  The default is @code{gnus-plain-save-name}.
7405
7406 @item gnus-summary-save-in-mail
7407 @findex gnus-summary-save-in-mail
7408 @vindex gnus-mail-save-name
7409 Save in a Unix mail (mbox) file.  Uses the function in the
7410 @code{gnus-mail-save-name} variable to get a file name to save the
7411 article in.  The default is @code{gnus-plain-save-name}.
7412
7413 @item gnus-summary-save-in-file
7414 @findex gnus-summary-save-in-file
7415 @vindex gnus-file-save-name
7416 @findex gnus-numeric-save-name
7417 Append the article straight to an ordinary file.  Uses the function in
7418 the @code{gnus-file-save-name} variable to get a file name to save the
7419 article in.  The default is @code{gnus-numeric-save-name}.
7420
7421 @item gnus-summary-write-to-file
7422 @findex gnus-summary-write-to-file
7423 Write the article straight to an ordinary file.  The file is
7424 overwritten if it exists.  Uses the function in the
7425 @code{gnus-file-save-name} variable to get a file name to save the
7426 article in.  The default is @code{gnus-numeric-save-name}.
7427
7428 @item gnus-summary-save-body-in-file
7429 @findex gnus-summary-save-body-in-file
7430 Append the article body to an ordinary file.  Uses the function in the
7431 @code{gnus-file-save-name} variable to get a file name to save the
7432 article in.  The default is @code{gnus-numeric-save-name}.
7433
7434 @item gnus-summary-save-in-folder
7435 @findex gnus-summary-save-in-folder
7436 @findex gnus-folder-save-name
7437 @findex gnus-Folder-save-name
7438 @vindex gnus-folder-save-name
7439 @cindex rcvstore
7440 @cindex MH folders
7441 Save the article to an MH folder using @code{rcvstore} from the MH
7442 library.  Uses the function in the @code{gnus-folder-save-name} variable
7443 to get a file name to save the article in.  The default is
7444 @code{gnus-folder-save-name}, but you can also use
7445 @code{gnus-Folder-save-name}, which creates capitalized names.
7446
7447 @item gnus-summary-save-in-vm
7448 @findex gnus-summary-save-in-vm
7449 Save the article in a VM folder.  You have to have the VM mail
7450 reader to use this setting.
7451 @end table
7452
7453 @vindex gnus-article-save-directory
7454 All of these functions, except for the last one, will save the article
7455 in the @code{gnus-article-save-directory}, which is initialized from the
7456 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7457 default.
7458
7459 As you can see above, the functions use different functions to find a
7460 suitable name of a file to save the article in.  Below is a list of
7461 available functions that generate names:
7462
7463 @table @code
7464
7465 @item gnus-Numeric-save-name
7466 @findex gnus-Numeric-save-name
7467 File names like @file{~/News/Alt.andrea-dworkin/45}.
7468
7469 @item gnus-numeric-save-name
7470 @findex gnus-numeric-save-name
7471 File names like @file{~/News/alt.andrea-dworkin/45}.
7472
7473 @item gnus-Plain-save-name
7474 @findex gnus-Plain-save-name
7475 File names like @file{~/News/Alt.andrea-dworkin}.
7476
7477 @item gnus-plain-save-name
7478 @findex gnus-plain-save-name
7479 File names like @file{~/News/alt.andrea-dworkin}.
7480
7481 @item gnus-sender-save-name
7482 @findex gnus-sender-save-name
7483 File names like @file{~/News/larsi}.
7484 @end table
7485
7486 @vindex gnus-split-methods
7487 You can have gnus suggest where to save articles by plonking a regexp into
7488 the @code{gnus-split-methods} alist.  For instance, if you would like to
7489 save articles related to gnus in the file @file{gnus-stuff}, and articles
7490 related to VM in @file{vm-stuff}, you could set this variable to something
7491 like:
7492
7493 @lisp
7494 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7495  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7496  (my-choosing-function "../other-dir/my-stuff")
7497  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7498 @end lisp
7499
7500 We see that this is a list where each element is a list that has two
7501 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7502 a string (in which case it is used as a regexp to match on the article
7503 head); it can be a symbol (which will be called as a function with the
7504 group name as a parameter); or it can be a list (which will be
7505 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7506 the @dfn{file} will be used as a default prompt.  In addition, the
7507 result of the operation itself will be used if the function or form
7508 called returns a string or a list of strings.
7509
7510 You basically end up with a list of file names that might be used when
7511 saving the current article.  (All ``matches'' will be used.)  You will
7512 then be prompted for what you really want to use as a name, with file
7513 name completion over the results from applying this variable.
7514
7515 This variable is @code{((gnus-article-archive-name))} by default, which
7516 means that gnus will look at the articles it saves for an
7517 @code{Archive-name} line and use that as a suggestion for the file
7518 name.
7519
7520 Here's an example function to clean up file names somewhat.  If you have
7521 lots of mail groups called things like
7522 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7523 these group names before creating the file name to save to.  The
7524 following will do just that:
7525
7526 @lisp
7527 (defun my-save-name (group)
7528   (when (string-match "^nnml:mail." group)
7529     (substring group (match-end 0))))
7530
7531 (setq gnus-split-methods
7532       '((gnus-article-archive-name)
7533         (my-save-name)))
7534 @end lisp
7535
7536
7537 @vindex gnus-use-long-file-name
7538 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7539 @code{nil}, all the preceding functions will replace all periods
7540 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7541 the functions will generate hierarchies of directories instead of having
7542 all the files in the top level directory
7543 (@file{~/News/alt/andrea-dworkin} instead of
7544 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7545 on most systems.  However, for historical reasons, this is @code{nil} on
7546 Xenix and usg-unix-v machines by default.
7547
7548 This function also affects kill and score file names.  If this variable
7549 is a list, and the list contains the element @code{not-score}, long file
7550 names will not be used for score files, if it contains the element
7551 @code{not-save}, long file names will not be used for saving, and if it
7552 contains the element @code{not-kill}, long file names will not be used
7553 for kill files.
7554
7555 If you'd like to save articles in a hierarchy that looks something like
7556 a spool, you could
7557
7558 @lisp
7559 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7560 (setq gnus-default-article-saver
7561       'gnus-summary-save-in-file)          ; @r{no encoding}
7562 @end lisp
7563
7564 Then just save with @kbd{o}.  You'd then read this hierarchy with
7565 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7566 the top level directory as the argument (@file{~/News/}).  Then just walk
7567 around to the groups/directories with @code{nneething}.
7568
7569
7570 @node Decoding Articles
7571 @section Decoding Articles
7572 @cindex decoding articles
7573
7574 Sometime users post articles (or series of articles) that have been
7575 encoded in some way or other.  Gnus can decode them for you.
7576
7577 @menu
7578 * Uuencoded Articles::          Uudecode articles.
7579 * Shell Archives::              Unshar articles.
7580 * PostScript Files::            Split PostScript.
7581 * Other Files::                 Plain save and binhex.
7582 * Decoding Variables::          Variables for a happy decoding.
7583 * Viewing Files::               You want to look at the result of the decoding?
7584 @end menu
7585
7586 @cindex series
7587 @cindex article series
7588 All these functions use the process/prefix convention
7589 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7590 the extension that a ``single article'' means ``a single series''.  Gnus
7591 can find out by itself what articles belong to a series, decode all the
7592 articles and unpack/view/save the resulting file(s).
7593
7594 Gnus guesses what articles are in the series according to the following
7595 simplish rule: The subjects must be (nearly) identical, except for the
7596 last two numbers of the line.  (Spaces are largely ignored, however.)
7597
7598 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7599 will find all the articles that match the regexp @samp{^cat.gif
7600 ([0-9]+/[0-9]+).*$}.
7601
7602 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7603 series}, will not be properly recognized by any of the automatic viewing
7604 commands, and you have to mark the articles manually with @kbd{#}.
7605
7606
7607 @node Uuencoded Articles
7608 @subsection Uuencoded Articles
7609 @cindex uudecode
7610 @cindex uuencoded articles
7611
7612 @table @kbd
7613
7614 @item X u
7615 @kindex X u (Summary)
7616 @findex gnus-uu-decode-uu
7617 @c @icon{gnus-uu-decode-uu}
7618 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7619
7620 @item X U
7621 @kindex X U (Summary)
7622 @findex gnus-uu-decode-uu-and-save
7623 Uudecodes and saves the current series
7624 (@code{gnus-uu-decode-uu-and-save}).
7625
7626 @item X v u
7627 @kindex X v u (Summary)
7628 @findex gnus-uu-decode-uu-view
7629 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7630
7631 @item X v U
7632 @kindex X v U (Summary)
7633 @findex gnus-uu-decode-uu-and-save-view
7634 Uudecodes, views and saves the current series
7635 (@code{gnus-uu-decode-uu-and-save-view}).
7636
7637 @end table
7638
7639 Remember that these all react to the presence of articles marked with
7640 the process mark.  If, for instance, you'd like to decode and save an
7641 entire newsgroup, you'd typically do @kbd{M P a}
7642 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7643 (@code{gnus-uu-decode-uu-and-save}).
7644
7645 All this is very much different from how @code{gnus-uu} worked with
7646 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7647 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7648 articles in some way (@pxref{Setting Process Marks}) and then press
7649 @kbd{X u}.
7650
7651 @vindex gnus-uu-notify-files
7652 Note: When trying to decode articles that have names matching
7653 @code{gnus-uu-notify-files}, which is hard-coded to
7654 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7655 automatically post an article on @samp{comp.unix.wizards} saying that
7656 you have just viewed the file in question.  This feature can't be turned
7657 off.
7658
7659
7660 @node Shell Archives
7661 @subsection Shell Archives
7662 @cindex unshar
7663 @cindex shell archives
7664 @cindex shared articles
7665
7666 Shell archives (``shar files'') used to be a popular way to distribute
7667 sources, but it isn't used all that much today.  In any case, we have
7668 some commands to deal with these:
7669
7670 @table @kbd
7671
7672 @item X s
7673 @kindex X s (Summary)
7674 @findex gnus-uu-decode-unshar
7675 Unshars the current series (@code{gnus-uu-decode-unshar}).
7676
7677 @item X S
7678 @kindex X S (Summary)
7679 @findex gnus-uu-decode-unshar-and-save
7680 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7681
7682 @item X v s
7683 @kindex X v s (Summary)
7684 @findex gnus-uu-decode-unshar-view
7685 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7686
7687 @item X v S
7688 @kindex X v S (Summary)
7689 @findex gnus-uu-decode-unshar-and-save-view
7690 Unshars, views and saves the current series
7691 (@code{gnus-uu-decode-unshar-and-save-view}).
7692 @end table
7693
7694
7695 @node PostScript Files
7696 @subsection PostScript Files
7697 @cindex PostScript
7698
7699 @table @kbd
7700
7701 @item X p
7702 @kindex X p (Summary)
7703 @findex gnus-uu-decode-postscript
7704 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7705
7706 @item X P
7707 @kindex X P (Summary)
7708 @findex gnus-uu-decode-postscript-and-save
7709 Unpack and save the current PostScript series
7710 (@code{gnus-uu-decode-postscript-and-save}).
7711
7712 @item X v p
7713 @kindex X v p (Summary)
7714 @findex gnus-uu-decode-postscript-view
7715 View the current PostScript series
7716 (@code{gnus-uu-decode-postscript-view}).
7717
7718 @item X v P
7719 @kindex X v P (Summary)
7720 @findex gnus-uu-decode-postscript-and-save-view
7721 View and save the current PostScript series
7722 (@code{gnus-uu-decode-postscript-and-save-view}).
7723 @end table
7724
7725
7726 @node Other Files
7727 @subsection Other Files
7728
7729 @table @kbd
7730 @item X o
7731 @kindex X o (Summary)
7732 @findex gnus-uu-decode-save
7733 Save the current series
7734 (@code{gnus-uu-decode-save}).
7735
7736 @item X b
7737 @kindex X b (Summary)
7738 @findex gnus-uu-decode-binhex
7739 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7740 doesn't really work yet.
7741 @end table
7742
7743
7744 @node Decoding Variables
7745 @subsection Decoding Variables
7746
7747 Adjective, not verb.
7748
7749 @menu
7750 * Rule Variables::              Variables that say how a file is to be viewed.
7751 * Other Decode Variables::      Other decode variables.
7752 * Uuencoding and Posting::      Variables for customizing uuencoding.
7753 @end menu
7754
7755
7756 @node Rule Variables
7757 @subsubsection Rule Variables
7758 @cindex rule variables
7759
7760 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7761 variables are of the form
7762
7763 @lisp
7764       (list '(regexp1 command2)
7765             '(regexp2 command2)
7766             ...)
7767 @end lisp
7768
7769 @table @code
7770
7771 @item gnus-uu-user-view-rules
7772 @vindex gnus-uu-user-view-rules
7773 @cindex sox
7774 This variable is consulted first when viewing files.  If you wish to use,
7775 for instance, @code{sox} to convert an @file{.au} sound file, you could
7776 say something like:
7777 @lisp
7778 (setq gnus-uu-user-view-rules
7779       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7780 @end lisp
7781
7782 @item gnus-uu-user-view-rules-end
7783 @vindex gnus-uu-user-view-rules-end
7784 This variable is consulted if gnus couldn't make any matches from the
7785 user and default view rules.
7786
7787 @item gnus-uu-user-archive-rules
7788 @vindex gnus-uu-user-archive-rules
7789 This variable can be used to say what commands should be used to unpack
7790 archives.
7791 @end table
7792
7793
7794 @node Other Decode Variables
7795 @subsubsection Other Decode Variables
7796
7797 @table @code
7798 @vindex gnus-uu-grabbed-file-functions
7799
7800 @item gnus-uu-grabbed-file-functions
7801 All functions in this list will be called right after each file has been
7802 successfully decoded---so that you can move or view files right away,
7803 and don't have to wait for all files to be decoded before you can do
7804 anything.  Ready-made functions you can put in this list are:
7805
7806 @table @code
7807
7808 @item gnus-uu-grab-view
7809 @findex gnus-uu-grab-view
7810 View the file.
7811
7812 @item gnus-uu-grab-move
7813 @findex gnus-uu-grab-move
7814 Move the file (if you're using a saving function.)
7815 @end table
7816
7817 @item gnus-uu-be-dangerous
7818 @vindex gnus-uu-be-dangerous
7819 Specifies what to do if unusual situations arise during decoding.  If
7820 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7821 that didn't work, and overwrite existing files.  Otherwise, ask each
7822 time.
7823
7824 @item gnus-uu-ignore-files-by-name
7825 @vindex gnus-uu-ignore-files-by-name
7826 Files with name matching this regular expression won't be viewed.
7827
7828 @item gnus-uu-ignore-files-by-type
7829 @vindex gnus-uu-ignore-files-by-type
7830 Files with a @acronym{MIME} type matching this variable won't be viewed.
7831 Note that Gnus tries to guess what type the file is based on the name.
7832 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7833 kludgey.
7834
7835 @item gnus-uu-tmp-dir
7836 @vindex gnus-uu-tmp-dir
7837 Where @code{gnus-uu} does its work.
7838
7839 @item gnus-uu-do-not-unpack-archives
7840 @vindex gnus-uu-do-not-unpack-archives
7841 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7842 looking for files to display.
7843
7844 @item gnus-uu-view-and-save
7845 @vindex gnus-uu-view-and-save
7846 Non-@code{nil} means that the user will always be asked to save a file
7847 after viewing it.
7848
7849 @item gnus-uu-ignore-default-view-rules
7850 @vindex gnus-uu-ignore-default-view-rules
7851 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7852 rules.
7853
7854 @item gnus-uu-ignore-default-archive-rules
7855 @vindex gnus-uu-ignore-default-archive-rules
7856 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7857 unpacking commands.
7858
7859 @item gnus-uu-kill-carriage-return
7860 @vindex gnus-uu-kill-carriage-return
7861 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7862 from articles.
7863
7864 @item gnus-uu-unmark-articles-not-decoded
7865 @vindex gnus-uu-unmark-articles-not-decoded
7866 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7867 decoded articles as unread.
7868
7869 @item gnus-uu-correct-stripped-uucode
7870 @vindex gnus-uu-correct-stripped-uucode
7871 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7872 uuencoded files that have had trailing spaces deleted.
7873
7874 @item gnus-uu-pre-uudecode-hook
7875 @vindex gnus-uu-pre-uudecode-hook
7876 Hook run before sending a message to @code{uudecode}.
7877
7878 @item gnus-uu-view-with-metamail
7879 @vindex gnus-uu-view-with-metamail
7880 @cindex metamail
7881 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7882 commands defined by the rule variables and just fudge a @acronym{MIME}
7883 content type based on the file name.  The result will be fed to
7884 @code{metamail} for viewing.
7885
7886 @item gnus-uu-save-in-digest
7887 @vindex gnus-uu-save-in-digest
7888 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7889 decoding, will save in digests.  If this variable is @code{nil},
7890 @code{gnus-uu} will just save everything in a file without any
7891 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7892 to specify any meaningful volume and issue numbers were found, so I
7893 simply dropped them.
7894
7895 @end table
7896
7897
7898 @node Uuencoding and Posting
7899 @subsubsection Uuencoding and Posting
7900
7901 @table @code
7902
7903 @item gnus-uu-post-include-before-composing
7904 @vindex gnus-uu-post-include-before-composing
7905 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7906 before you compose the article.  If this variable is @code{t}, you can
7907 either include an encoded file with @kbd{C-c C-i} or have one included
7908 for you when you post the article.
7909
7910 @item gnus-uu-post-length
7911 @vindex gnus-uu-post-length
7912 Maximum length of an article.  The encoded file will be split into how
7913 many articles it takes to post the entire file.
7914
7915 @item gnus-uu-post-threaded
7916 @vindex gnus-uu-post-threaded
7917 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7918 thread.  This may not be smart, as no other decoder I have seen is able
7919 to follow threads when collecting uuencoded articles.  (Well, I have
7920 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7921 think that counts@dots{}) Default is @code{nil}.
7922
7923 @item gnus-uu-post-separate-description
7924 @vindex gnus-uu-post-separate-description
7925 Non-@code{nil} means that the description will be posted in a separate
7926 article.  The first article will typically be numbered (0/x).  If this
7927 variable is @code{nil}, the description the user enters will be included
7928 at the beginning of the first article, which will be numbered (1/x).
7929 Default is @code{t}.
7930
7931 @end table
7932
7933
7934 @node Viewing Files
7935 @subsection Viewing Files
7936 @cindex viewing files
7937 @cindex pseudo-articles
7938
7939 After decoding, if the file is some sort of archive, gnus will attempt
7940 to unpack the archive and see if any of the files in the archive can be
7941 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7942 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7943 uncompress and de-tar the main file, and then view the two pictures.
7944 This unpacking process is recursive, so if the archive contains archives
7945 of archives, it'll all be unpacked.
7946
7947 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7948 extracted file into the summary buffer.  If you go to these
7949 ``articles'', you will be prompted for a command to run (usually Gnus
7950 will make a suggestion), and then the command will be run.
7951
7952 @vindex gnus-view-pseudo-asynchronously
7953 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7954 until the viewing is done before proceeding.
7955
7956 @vindex gnus-view-pseudos
7957 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7958 the pseudo-articles into the summary buffer, but view them
7959 immediately.  If this variable is @code{not-confirm}, the user won't even
7960 be asked for a confirmation before viewing is done.
7961
7962 @vindex gnus-view-pseudos-separately
7963 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7964 pseudo-article will be created for each file to be viewed.  If
7965 @code{nil}, all files that use the same viewing command will be given as
7966 a list of parameters to that command.
7967
7968 @vindex gnus-insert-pseudo-articles
7969 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7970 pseudo-articles when decoding.  It is @code{t} by default.
7971
7972 So; there you are, reading your @emph{pseudo-articles} in your
7973 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7974 Why isn't anything real anymore? How did we get here?
7975
7976
7977 @node Article Treatment
7978 @section Article Treatment
7979
7980 Reading through this huge manual, you may have quite forgotten that the
7981 object of newsreaders is to actually, like, read what people have
7982 written.  Reading articles.  Unfortunately, people are quite bad at
7983 writing, so there are tons of functions and variables to make reading
7984 these articles easier.
7985
7986 @menu
7987 * Article Highlighting::        You want to make the article look like fruit salad.
7988 * Article Fontisizing::         Making emphasized text look nice.
7989 * Article Hiding::              You also want to make certain info go away.
7990 * Article Washing::             Lots of way-neat functions to make life better.
7991 * Article Header::              Doing various header transformations.
7992 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7993 * Article Button Levels::       Controlling appearance of buttons.
7994 * Article Date::                Grumble, UT!
7995 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7996 * Article Signature::           What is a signature?
7997 * Article Miscellanea::         Various other stuff.
7998 @end menu
7999
8000
8001 @node Article Highlighting
8002 @subsection Article Highlighting
8003 @cindex highlighting
8004
8005 Not only do you want your article buffer to look like fruit salad, but
8006 you want it to look like technicolor fruit salad.
8007
8008 @table @kbd
8009
8010 @item W H a
8011 @kindex W H a (Summary)
8012 @findex gnus-article-highlight
8013 @findex gnus-article-maybe-highlight
8014 Do much highlighting of the current article
8015 (@code{gnus-article-highlight}).  This function highlights header, cited
8016 text, the signature, and adds buttons to the body and the head.
8017
8018 @item W H h
8019 @kindex W H h (Summary)
8020 @findex gnus-article-highlight-headers
8021 @vindex gnus-header-face-alist
8022 Highlight the headers (@code{gnus-article-highlight-headers}).  The
8023 highlighting will be done according to the @code{gnus-header-face-alist}
8024 variable, which is a list where each element has the form
8025 @code{(@var{regexp} @var{name} @var{content})}.
8026 @var{regexp} is a regular expression for matching the
8027 header, @var{name} is the face used for highlighting the header name
8028 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8029 the header value.  The first match made will be used.  Note that
8030 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8031
8032 @item W H c
8033 @kindex W H c (Summary)
8034 @findex gnus-article-highlight-citation
8035 Highlight cited text (@code{gnus-article-highlight-citation}).
8036
8037 Some variables to customize the citation highlights:
8038
8039 @table @code
8040 @vindex gnus-cite-parse-max-size
8041
8042 @item gnus-cite-parse-max-size
8043 If the article size if bigger than this variable (which is 25000 by
8044 default), no citation highlighting will be performed.
8045
8046 @item gnus-cite-max-prefix
8047 @vindex gnus-cite-max-prefix
8048 Maximum possible length for a citation prefix (default 20).
8049
8050 @item gnus-cite-face-list
8051 @vindex gnus-cite-face-list
8052 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8053 When there are citations from multiple articles in the same message,
8054 gnus will try to give each citation from each article its own face.
8055 This should make it easier to see who wrote what.
8056
8057 @item gnus-supercite-regexp
8058 @vindex gnus-supercite-regexp
8059 Regexp matching normal Supercite attribution lines.
8060
8061 @item gnus-supercite-secondary-regexp
8062 @vindex gnus-supercite-secondary-regexp
8063 Regexp matching mangled Supercite attribution lines.
8064
8065 @item gnus-cite-minimum-match-count
8066 @vindex gnus-cite-minimum-match-count
8067 Minimum number of identical prefixes we have to see before we believe
8068 that it's a citation.
8069
8070 @item gnus-cite-attribution-prefix
8071 @vindex gnus-cite-attribution-prefix
8072 Regexp matching the beginning of an attribution line.
8073
8074 @item gnus-cite-attribution-suffix
8075 @vindex gnus-cite-attribution-suffix
8076 Regexp matching the end of an attribution line.
8077
8078 @item gnus-cite-attribution-face
8079 @vindex gnus-cite-attribution-face
8080 Face used for attribution lines.  It is merged with the face for the
8081 cited text belonging to the attribution.
8082
8083 @end table
8084
8085
8086 @item W H s
8087 @kindex W H s (Summary)
8088 @vindex gnus-signature-separator
8089 @vindex gnus-signature-face
8090 @findex gnus-article-highlight-signature
8091 Highlight the signature (@code{gnus-article-highlight-signature}).
8092 Everything after @code{gnus-signature-separator} (@pxref{Article
8093 Signature}) in an article will be considered a signature and will be
8094 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8095 default.
8096
8097 @end table
8098
8099 @xref{Customizing Articles}, for how to highlight articles automatically.
8100
8101
8102 @node Article Fontisizing
8103 @subsection Article Fontisizing
8104 @cindex emphasis
8105 @cindex article emphasis
8106
8107 @findex gnus-article-emphasize
8108 @kindex W e (Summary)
8109 People commonly add emphasis to words in news articles by writing things
8110 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8111 this look nicer by running the article through the @kbd{W e}
8112 (@code{gnus-article-emphasize}) command.
8113
8114 @vindex gnus-emphasis-alist
8115 How the emphasis is computed is controlled by the
8116 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8117 element is a regular expression to be matched.  The second is a number
8118 that says what regular expression grouping is used to find the entire
8119 emphasized word.  The third is a number that says what regexp grouping
8120 should be displayed and highlighted.  (The text between these two
8121 groupings will be hidden.)  The fourth is the face used for
8122 highlighting.
8123
8124 @lisp
8125 (setq gnus-emphasis-alist
8126       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8127         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8128 @end lisp
8129
8130 @cindex slash
8131 @cindex asterisk
8132 @cindex underline
8133 @cindex /
8134 @cindex *
8135
8136 @vindex gnus-emphasis-underline
8137 @vindex gnus-emphasis-bold
8138 @vindex gnus-emphasis-italic
8139 @vindex gnus-emphasis-underline-bold
8140 @vindex gnus-emphasis-underline-italic
8141 @vindex gnus-emphasis-bold-italic
8142 @vindex gnus-emphasis-underline-bold-italic
8143 By default, there are seven rules, and they use the following faces:
8144 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8145 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8146 @code{gnus-emphasis-underline-italic},
8147 @code{gnus-emphasis-underline-bold}, and
8148 @code{gnus-emphasis-underline-bold-italic}.
8149
8150 If you want to change these faces, you can either use @kbd{M-x
8151 customize}, or you can use @code{copy-face}.  For instance, if you want
8152 to make @code{gnus-emphasis-italic} use a red face instead, you could
8153 say something like:
8154
8155 @lisp
8156 (copy-face 'red 'gnus-emphasis-italic)
8157 @end lisp
8158
8159 @vindex gnus-group-highlight-words-alist
8160
8161 If you want to highlight arbitrary words, you can use the
8162 @code{gnus-group-highlight-words-alist} variable, which uses the same
8163 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8164 parameter (@pxref{Group Parameters}) can also be used.
8165
8166 @xref{Customizing Articles}, for how to fontize articles automatically.
8167
8168
8169 @node Article Hiding
8170 @subsection Article Hiding
8171 @cindex article hiding
8172
8173 Or rather, hiding certain things in each article.  There usually is much
8174 too much cruft in most articles.
8175
8176 @table @kbd
8177
8178 @item W W a
8179 @kindex W W a (Summary)
8180 @findex gnus-article-hide
8181 Do quite a lot of hiding on the article buffer
8182 (@kbd{gnus-article-hide}).  In particular, this function will hide
8183 headers, @acronym{PGP}, cited text and the signature.
8184
8185 @item W W h
8186 @kindex W W h (Summary)
8187 @findex gnus-article-hide-headers
8188 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8189 Headers}.
8190
8191 @item W W b
8192 @kindex W W b (Summary)
8193 @findex gnus-article-hide-boring-headers
8194 Hide headers that aren't particularly interesting
8195 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8196
8197 @item W W s
8198 @kindex W W s (Summary)
8199 @findex gnus-article-hide-signature
8200 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8201 Signature}.
8202
8203 @item W W l
8204 @kindex W W l (Summary)
8205 @findex gnus-article-hide-list-identifiers
8206 @vindex gnus-list-identifiers
8207 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8208 are strings some mailing list servers add to the beginning of all
8209 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8210 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8211 may not contain @code{\\(..\\)}.
8212
8213 @table @code
8214
8215 @item gnus-list-identifiers
8216 @vindex gnus-list-identifiers
8217 A regular expression that matches list identifiers to be removed from
8218 subject.  This can also be a list of regular expressions.
8219
8220 @end table
8221
8222 @item W W P
8223 @kindex W W P (Summary)
8224 @findex gnus-article-hide-pem
8225 Hide @acronym{PEM} (privacy enhanced messages) cruft
8226 (@code{gnus-article-hide-pem}).
8227
8228 @item W W B
8229 @kindex W W B (Summary)
8230 @findex gnus-article-strip-banner
8231 @vindex gnus-article-banner-alist
8232 @vindex gnus-article-address-banner-alist
8233 @cindex banner
8234 @cindex OneList
8235 @cindex stripping advertisements
8236 @cindex advertisements
8237 Strip the banner specified by the @code{banner} group parameter
8238 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8239 annoying banners and/or signatures that some mailing lists and moderated
8240 groups adds to all the messages.  The way to use this function is to add
8241 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8242 group you want banners stripped from.  The parameter either be a string,
8243 which will be interpreted as a regular expression matching text to be
8244 removed, or the symbol @code{signature}, meaning that the (last)
8245 signature should be removed, or other symbol, meaning that the
8246 corresponding regular expression in @code{gnus-article-banner-alist} is
8247 used.
8248
8249 Regardless of a group, you can hide things like advertisements only when
8250 the sender of an article has a certain mail address specified in
8251 @code{gnus-article-address-banner-alist}.
8252
8253 @table @code
8254
8255 @item gnus-article-address-banner-alist
8256 @vindex gnus-article-address-banner-alist
8257 Alist of mail addresses and banners.  Each element has the form
8258 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8259 matching a mail address in the From header, @var{banner} is one of a
8260 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8261 a regexp and @code{nil}.  If @var{address} matches author's mail
8262 address, it will remove things like advertisements.  For example, if a
8263 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8264 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8265 sends, you can use the following element to remove them:
8266
8267 @lisp
8268 ("@@yoo-hoo\\.co\\.jp\\'" .
8269  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8270 @end lisp
8271
8272 @end table
8273
8274 @item W W c
8275 @kindex W W c (Summary)
8276 @findex gnus-article-hide-citation
8277 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8278 customizing the hiding:
8279
8280 @table @code
8281
8282 @item gnus-cited-opened-text-button-line-format
8283 @itemx gnus-cited-closed-text-button-line-format
8284 @vindex gnus-cited-closed-text-button-line-format
8285 @vindex gnus-cited-opened-text-button-line-format
8286 Gnus adds buttons to show where the cited text has been hidden, and to
8287 allow toggle hiding the text.  The format of the variable is specified
8288 by these format-like variable (@pxref{Formatting Variables}).  These
8289 specs are valid:
8290
8291 @table @samp
8292 @item b
8293 Starting point of the hidden text.
8294 @item e
8295 Ending point of the hidden text.
8296 @item l
8297 Number of characters in the hidden region.
8298 @item n
8299 Number of lines of hidden text.
8300 @end table
8301
8302 @item gnus-cited-lines-visible
8303 @vindex gnus-cited-lines-visible
8304 The number of lines at the beginning of the cited text to leave
8305 shown.  This can also be a cons cell with the number of lines at the top
8306 and bottom of the text, respectively, to remain visible.
8307
8308 @end table
8309
8310 @item W W C-c
8311 @kindex W W C-c (Summary)
8312 @findex gnus-article-hide-citation-maybe
8313
8314 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8315 following two variables:
8316
8317 @table @code
8318 @item gnus-cite-hide-percentage
8319 @vindex gnus-cite-hide-percentage
8320 If the cited text is of a bigger percentage than this variable (default
8321 50), hide the cited text.
8322
8323 @item gnus-cite-hide-absolute
8324 @vindex gnus-cite-hide-absolute
8325 The cited text must have at least this length (default 10) before it
8326 is hidden.
8327 @end table
8328
8329 @item W W C
8330 @kindex W W C (Summary)
8331 @findex gnus-article-hide-citation-in-followups
8332 Hide cited text in articles that aren't roots
8333 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8334 useful as an interactive command, but might be a handy function to stick
8335 have happen automatically (@pxref{Customizing Articles}).
8336
8337 @end table
8338
8339 All these ``hiding'' commands are toggles, but if you give a negative
8340 prefix to these commands, they will show what they have previously
8341 hidden.  If you give a positive prefix, they will always hide.
8342
8343 Also @pxref{Article Highlighting} for further variables for
8344 citation customization.
8345
8346 @xref{Customizing Articles}, for how to hide article elements
8347 automatically.
8348
8349
8350 @node Article Washing
8351 @subsection Article Washing
8352 @cindex washing
8353 @cindex article washing
8354
8355 We call this ``article washing'' for a really good reason.  Namely, the
8356 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8357
8358 @dfn{Washing} is defined by us as ``changing something from something to
8359 something else'', but normally results in something looking better.
8360 Cleaner, perhaps.
8361
8362 @xref{Customizing Articles}, if you want to change how Gnus displays
8363 articles by default.
8364
8365 @table @kbd
8366
8367 @item C-u g
8368 This is not really washing, it's sort of the opposite of washing.  If
8369 you type this, you see the article exactly as it exists on disk or on
8370 the server.
8371
8372 @item g
8373 Force redisplaying of the current article
8374 (@code{gnus-summary-show-article}).  This is also not really washing.
8375 If you type this, you see the article without any previously applied
8376 interactive Washing functions but with all default treatments
8377 (@pxref{Customizing Articles}).
8378
8379 @item W l
8380 @kindex W l (Summary)
8381 @findex gnus-summary-stop-page-breaking
8382 Remove page breaks from the current article
8383 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8384 delimiters.
8385
8386 @item W r
8387 @kindex W r (Summary)
8388 @findex gnus-summary-caesar-message
8389 @c @icon{gnus-summary-caesar-message}
8390 Do a Caesar rotate (rot13) on the article buffer
8391 (@code{gnus-summary-caesar-message}).
8392 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8393 (Typically offensive jokes and such.)
8394
8395 It's commonly called ``rot13'' because each letter is rotated 13
8396 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8397 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8398 is rumored to have employed this form of, uh, somewhat weak encryption.
8399
8400 @item W m
8401 @kindex W m (Summary)
8402 @findex gnus-summary-morse-message
8403 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8404
8405 @item W t
8406 @item t
8407 @kindex W t (Summary)
8408 @kindex t (Summary)
8409 @findex gnus-summary-toggle-header
8410 Toggle whether to display all headers in the article buffer
8411 (@code{gnus-summary-toggle-header}).
8412
8413 @item W v
8414 @kindex W v (Summary)
8415 @findex gnus-summary-verbose-headers
8416 Toggle whether to display all headers in the article buffer permanently
8417 (@code{gnus-summary-verbose-headers}).
8418
8419 @item W m
8420 @kindex W m (Summary)
8421 @findex gnus-summary-toggle-mime
8422 Toggle whether to run the article through @acronym{MIME} before
8423 displaying (@code{gnus-summary-toggle-mime}).
8424
8425 @item W o
8426 @kindex W o (Summary)
8427 @findex gnus-article-treat-overstrike
8428 Treat overstrike (@code{gnus-article-treat-overstrike}).
8429
8430 @item W d
8431 @kindex W d (Summary)
8432 @findex gnus-article-treat-dumbquotes
8433 @vindex gnus-article-dumbquotes-map
8434 @cindex Smartquotes
8435 @cindex M****s*** sm*rtq**t*s
8436 @cindex Latin 1
8437 Treat M****s*** sm*rtq**t*s according to
8438 @code{gnus-article-dumbquotes-map}
8439 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8440 whether a character is a sm*rtq**t* or not, so it should only be used
8441 interactively.
8442
8443 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8444 an attempt to provide more quoting characters.  If you see something
8445 like @code{\222} or @code{\264} where you're expecting some kind of
8446 apostrophe or quotation mark, then try this wash.
8447
8448 @item W Y f
8449 @kindex W Y f (Summary)
8450 @findex gnus-article-outlook-deuglify-article
8451 @cindex Outlook Express
8452 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8453 unwrap lines, repair attribution and rearrange citation.
8454 (@code{gnus-article-outlook-deuglify-article}).
8455
8456 @item W Y u
8457 @kindex W Y u (Summary)
8458 @findex gnus-article-outlook-unwrap-lines
8459 @vindex gnus-outlook-deuglify-unwrap-min
8460 @vindex gnus-outlook-deuglify-unwrap-max
8461 Unwrap lines that appear to be wrapped citation lines.  You can control
8462 what lines will be unwrapped by frobbing
8463 @code{gnus-outlook-deuglify-unwrap-min} and
8464 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8465 maximum length of an unwrapped citation line.
8466 (@code{gnus-article-outlook-unwrap-lines}).
8467
8468 @item W Y a
8469 @kindex W Y a (Summary)
8470 @findex gnus-article-outlook-repair-attribution
8471 Repair a broken attribution line.@*
8472 (@code{gnus-article-outlook-repair-attribution}).
8473
8474 @item W Y c
8475 @kindex W Y c (Summary)
8476 @findex gnus-article-outlook-rearrange-citation
8477 Repair broken citations by rearranging the text.
8478 (@code{gnus-article-outlook-rearrange-citation}).
8479
8480 @item W w
8481 @kindex W w (Summary)
8482 @findex gnus-article-fill-cited-article
8483 Do word wrap (@code{gnus-article-fill-cited-article}).
8484
8485 You can give the command a numerical prefix to specify the width to use
8486 when filling.
8487
8488 @item W Q
8489 @kindex W Q (Summary)
8490 @findex gnus-article-fill-long-lines
8491 Fill long lines (@code{gnus-article-fill-long-lines}).
8492
8493 @item W C
8494 @kindex W C (Summary)
8495 @findex gnus-article-capitalize-sentences
8496 Capitalize the first word in each sentence
8497 (@code{gnus-article-capitalize-sentences}).
8498
8499 @item W c
8500 @kindex W c (Summary)
8501 @findex gnus-article-remove-cr
8502 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8503 (this takes care of DOS line endings), and then translate any remaining
8504 CRs into LF (this takes care of Mac line endings)
8505 (@code{gnus-article-remove-cr}).
8506
8507 @kindex W q (Summary)
8508 @findex gnus-article-de-quoted-unreadable
8509 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8510 Quoted-Printable is one common @acronym{MIME} encoding employed when
8511 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8512 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8513 doesn't look very readable to me.  Note that this is usually done
8514 automatically by Gnus if the message in question has a
8515 @code{Content-Transfer-Encoding} header that says that this encoding
8516 has been done.  If a prefix is given, a charset will be asked for.
8517
8518 @item W 6
8519 @kindex W 6 (Summary)
8520 @findex gnus-article-de-base64-unreadable
8521 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8522 one common @acronym{MIME} encoding employed when sending
8523 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8524 usually done automatically by Gnus if the message in question has a
8525 @code{Content-Transfer-Encoding} header that says that this encoding
8526 has been done.  If a prefix is given, a charset will be asked for.
8527
8528 @item W Z
8529 @kindex W Z (Summary)
8530 @findex gnus-article-decode-HZ
8531 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8532 common encoding employed when sending Chinese articles.  It typically
8533 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8534
8535 @item W u
8536 @kindex W u (Summary)
8537 @findex gnus-article-unsplit-urls
8538 Remove newlines from within URLs.  Some mailers insert newlines into
8539 outgoing email messages to keep lines short.  This reformatting can
8540 split long URLs onto multiple lines.  Repair those URLs by removing
8541 the newlines (@code{gnus-article-unsplit-urls}).
8542
8543 @item W h
8544 @kindex W h (Summary)
8545 @findex gnus-article-wash-html
8546 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8547 usually done automatically by Gnus if the message in question has a
8548 @code{Content-Type} header that says that the message is @acronym{HTML}.
8549
8550 If a prefix is given, a charset will be asked for.
8551
8552 @vindex gnus-article-wash-function
8553 The default is to use the function specified by
8554 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8555 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8556 @acronym{HTML}, but this is controlled by the
8557 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8558 can use include:
8559
8560 @table @code
8561 @item w3
8562 Use Emacs/w3.
8563
8564 @item w3m
8565 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8566
8567 @item links
8568 Use @uref{http://links.sf.net/, Links}.
8569
8570 @item lynx
8571 Use @uref{http://lynx.isc.org/, Lynx}.
8572
8573 @item html2text
8574 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8575
8576 @end table
8577
8578 @item W b
8579 @kindex W b (Summary)
8580 @findex gnus-article-add-buttons
8581 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8582 @xref{Article Buttons}.
8583
8584 @item W B
8585 @kindex W B (Summary)
8586 @findex gnus-article-add-buttons-to-head
8587 Add clickable buttons to the article headers
8588 (@code{gnus-article-add-buttons-to-head}).
8589
8590 @item W p
8591 @kindex W p (Summary)
8592 @findex gnus-article-verify-x-pgp-sig
8593 Verify a signed control message
8594 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8595 @code{newgroup} and @code{checkgroups} are usually signed by the
8596 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8597 the maintainer to your keyring to verify the
8598 message.@footnote{@acronym{PGP} keys for many hierarchies are
8599 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8600
8601 @item W s
8602 @kindex W s (Summary)
8603 @findex gnus-summary-force-verify-and-decrypt
8604 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8605 @acronym{S/MIME}) message
8606 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8607
8608 @item W a
8609 @kindex W a (Summary)
8610 @findex gnus-article-strip-headers-in-body
8611 Strip headers like the @code{X-No-Archive} header from the beginning of
8612 article bodies (@code{gnus-article-strip-headers-in-body}).
8613
8614 @item W E l
8615 @kindex W E l (Summary)
8616 @findex gnus-article-strip-leading-blank-lines
8617 Remove all blank lines from the beginning of the article
8618 (@code{gnus-article-strip-leading-blank-lines}).
8619
8620 @item W E m
8621 @kindex W E m (Summary)
8622 @findex gnus-article-strip-multiple-blank-lines
8623 Replace all blank lines with empty lines and then all multiple empty
8624 lines with a single empty line.
8625 (@code{gnus-article-strip-multiple-blank-lines}).
8626
8627 @item W E t
8628 @kindex W E t (Summary)
8629 @findex gnus-article-remove-trailing-blank-lines
8630 Remove all blank lines at the end of the article
8631 (@code{gnus-article-remove-trailing-blank-lines}).
8632
8633 @item W E a
8634 @kindex W E a (Summary)
8635 @findex gnus-article-strip-blank-lines
8636 Do all the three commands above
8637 (@code{gnus-article-strip-blank-lines}).
8638
8639 @item W E A
8640 @kindex W E A (Summary)
8641 @findex gnus-article-strip-all-blank-lines
8642 Remove all blank lines
8643 (@code{gnus-article-strip-all-blank-lines}).
8644
8645 @item W E s
8646 @kindex W E s (Summary)
8647 @findex gnus-article-strip-leading-space
8648 Remove all white space from the beginning of all lines of the article
8649 body (@code{gnus-article-strip-leading-space}).
8650
8651 @item W E e
8652 @kindex W E e (Summary)
8653 @findex gnus-article-strip-trailing-space
8654 Remove all white space from the end of all lines of the article
8655 body (@code{gnus-article-strip-trailing-space}).
8656
8657 @end table
8658
8659 @xref{Customizing Articles}, for how to wash articles automatically.
8660
8661
8662 @node Article Header
8663 @subsection Article Header
8664
8665 These commands perform various transformations of article header.
8666
8667 @table @kbd
8668
8669 @item W G u
8670 @kindex W G u (Summary)
8671 @findex gnus-article-treat-unfold-headers
8672 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8673
8674 @item W G n
8675 @kindex W G n (Summary)
8676 @findex gnus-article-treat-fold-newsgroups
8677 Fold the @code{Newsgroups} and @code{Followup-To} headers
8678 (@code{gnus-article-treat-fold-newsgroups}).
8679
8680 @item W G f
8681 @kindex W G f (Summary)
8682 @findex gnus-article-treat-fold-headers
8683 Fold all the message headers
8684 (@code{gnus-article-treat-fold-headers}).
8685
8686 @item W E w
8687 @kindex W E w
8688 @findex gnus-article-remove-leading-whitespace
8689 Remove excessive whitespace from all headers
8690 (@code{gnus-article-remove-leading-whitespace}).
8691
8692 @end table
8693
8694
8695 @node Article Buttons
8696 @subsection Article Buttons
8697 @cindex buttons
8698
8699 People often include references to other stuff in articles, and it would
8700 be nice if Gnus could just fetch whatever it is that people talk about
8701 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8702 button on these references.
8703
8704 @vindex gnus-button-man-handler
8705 Gnus adds @dfn{buttons} to certain standard references by default:
8706 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8707 Emacs or Gnus related references.  This is controlled by two variables,
8708 one that handles article bodies and one that handles article heads:
8709
8710 @table @code
8711
8712 @item gnus-button-alist
8713 @vindex gnus-button-alist
8714 This is an alist where each entry has this form:
8715
8716 @lisp
8717 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8718 @end lisp
8719
8720 @table @var
8721
8722 @item regexp
8723 All text that match this regular expression (case insensitive) will be
8724 considered an external reference.  Here's a typical regexp that matches
8725 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8726 variable containing a regexp, useful variables to use include
8727 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8728
8729 @item button-par
8730 Gnus has to know which parts of the matches is to be highlighted.  This
8731 is a number that says what sub-expression of the regexp is to be
8732 highlighted.  If you want it all highlighted, you use 0 here.
8733
8734 @item use-p
8735 This form will be @code{eval}ed, and if the result is non-@code{nil},
8736 this is considered a match.  This is useful if you want extra sifting to
8737 avoid false matches.  Often variables named
8738 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8739 Levels}, but any other form may be used too.
8740
8741 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8742
8743 @item function
8744 This function will be called when you click on this button.
8745
8746 @item data-par
8747 As with @var{button-par}, this is a sub-expression number, but this one
8748 says which part of the match is to be sent as data to @var{function}.
8749
8750 @end table
8751
8752 So the full entry for buttonizing URLs is then
8753
8754 @lisp
8755 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8756 @end lisp
8757
8758 @item gnus-header-button-alist
8759 @vindex gnus-header-button-alist
8760 This is just like the other alist, except that it is applied to the
8761 article head only, and that each entry has an additional element that is
8762 used to say what headers to apply the buttonize coding to:
8763
8764 @lisp
8765 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8766 @end lisp
8767
8768 @var{header} is a regular expression.
8769 @end table
8770
8771 @subsubsection Related variables and functions
8772
8773 @table @code
8774 @item gnus-button-@var{*}-level
8775 @xref{Article Button Levels}.
8776
8777 @c Stuff related to gnus-button-browse-level
8778
8779 @item gnus-button-url-regexp
8780 @vindex gnus-button-url-regexp
8781 A regular expression that matches embedded URLs.  It is used in the
8782 default values of the variables above.
8783
8784 @c Stuff related to gnus-button-man-level
8785
8786 @item gnus-button-man-handler
8787 @vindex gnus-button-man-handler
8788 The function to use for displaying man pages.  It must take at least one
8789 argument with a string naming the man page.
8790
8791 @c Stuff related to gnus-button-message-level
8792
8793 @item gnus-button-mid-or-mail-regexp
8794 @vindex gnus-button-mid-or-mail-regexp
8795 Regular expression that matches a message ID or a mail address.
8796
8797 @item gnus-button-prefer-mid-or-mail
8798 @vindex gnus-button-prefer-mid-or-mail
8799 This variable determines what to do when the button on a string as
8800 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8801 message ID or a mail address.  If it is one of the symbols @code{mid} or
8802 @code{mail}, Gnus will always assume that the string is a message ID or
8803 a mail address, respectively.  If this variable is set to the symbol
8804 @code{ask}, always query the user what do do.  If it is a function, this
8805 function will be called with the string as its only argument.  The
8806 function must return @code{mid}, @code{mail}, @code{invalid} or
8807 @code{ask}.  The default value is the function
8808 @code{gnus-button-mid-or-mail-heuristic}.
8809
8810 @item gnus-button-mid-or-mail-heuristic
8811 @findex gnus-button-mid-or-mail-heuristic
8812 Function that guesses whether its argument is a message ID or a mail
8813 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8814 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8815 string is invalid.
8816
8817 @item gnus-button-mid-or-mail-heuristic-alist
8818 @vindex gnus-button-mid-or-mail-heuristic-alist
8819 An alist of @code{(RATE . REGEXP)} pairs used by the function
8820 @code{gnus-button-mid-or-mail-heuristic}.
8821
8822 @c Stuff related to gnus-button-tex-level
8823
8824 @item gnus-button-ctan-handler
8825 @findex gnus-button-ctan-handler
8826 The function to use for displaying CTAN links.  It must take one
8827 argument, the string naming the URL.
8828
8829 @item gnus-ctan-url
8830 @vindex gnus-ctan-url
8831 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8832 by @code{gnus-button-ctan-handler}.
8833
8834 @c Misc stuff
8835
8836 @item gnus-article-button-face
8837 @vindex gnus-article-button-face
8838 Face used on buttons.
8839
8840 @item gnus-article-mouse-face
8841 @vindex gnus-article-mouse-face
8842 Face used when the mouse cursor is over a button.
8843
8844 @end table
8845
8846 @xref{Customizing Articles}, for how to buttonize articles automatically.
8847
8848
8849 @node Article Button Levels
8850 @subsection Article button levels
8851 @cindex button levels
8852 The higher the value of the variables @code{gnus-button-@var{*}-level},
8853 the more buttons will appear.  If the level is zero, no corresponding
8854 buttons are displayed.  With the default value (which is 5) you should
8855 already see quite a lot of buttons.  With higher levels, you will see
8856 more buttons, but you may also get more false positives.  To avoid them,
8857 you can set the variables @code{gnus-button-@var{*}-level} local to
8858 specific groups (@pxref{Group Parameters}).  Here's an example for the
8859 variable @code{gnus-parameters}:
8860
8861 @lisp
8862 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8863 (setq gnus-parameters
8864       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8865         ("\\<unix\\>"               (gnus-button-man-level 10))
8866         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8867 @end lisp
8868
8869 @table @code
8870
8871 @item gnus-button-browse-level
8872 @vindex gnus-button-browse-level
8873 Controls the display of references to message IDs, mail addresses and
8874 news URLs.  Related variables and functions include
8875 @code{gnus-button-url-regexp}, @code{browse-url}, and
8876 @code{browse-url-browser-function}.
8877
8878 @item gnus-button-emacs-level
8879 @vindex gnus-button-emacs-level
8880 Controls the display of Emacs or Gnus references.  Related functions are
8881 @code{gnus-button-handle-custom},
8882 @code{gnus-button-handle-describe-function},
8883 @code{gnus-button-handle-describe-variable},
8884 @code{gnus-button-handle-symbol},
8885 @code{gnus-button-handle-describe-key},
8886 @code{gnus-button-handle-apropos},
8887 @code{gnus-button-handle-apropos-command},
8888 @code{gnus-button-handle-apropos-variable},
8889 @code{gnus-button-handle-apropos-documentation}, and
8890 @code{gnus-button-handle-library}.
8891
8892 @item gnus-button-man-level
8893 @vindex gnus-button-man-level
8894 Controls the display of references to (Unix) man pages.
8895 See @code{gnus-button-man-handler}.
8896
8897 @item gnus-button-message-level
8898 @vindex gnus-button-message-level
8899 Controls the display of message IDs, mail addresses and news URLs.
8900 Related variables and functions include
8901 @code{gnus-button-mid-or-mail-regexp},
8902 @code{gnus-button-prefer-mid-or-mail},
8903 @code{gnus-button-mid-or-mail-heuristic}, and
8904 @code{gnus-button-mid-or-mail-heuristic-alist}.
8905
8906 @item gnus-button-tex-level
8907 @vindex gnus-button-tex-level
8908 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8909 URLs.  See the variables @code{gnus-ctan-url},
8910 @code{gnus-button-ctan-handler},
8911 @code{gnus-button-ctan-directory-regexp}, and
8912 @code{gnus-button-handle-ctan-bogus-regexp}.
8913
8914 @end table
8915
8916
8917 @node Article Date
8918 @subsection Article Date
8919
8920 The date is most likely generated in some obscure timezone you've never
8921 heard of, so it's quite nice to be able to find out what the time was
8922 when the article was sent.
8923
8924 @table @kbd
8925
8926 @item W T u
8927 @kindex W T u (Summary)
8928 @findex gnus-article-date-ut
8929 Display the date in UT (aka. GMT, aka ZULU)
8930 (@code{gnus-article-date-ut}).
8931
8932 @item W T i
8933 @kindex W T i (Summary)
8934 @findex gnus-article-date-iso8601
8935 @cindex ISO 8601
8936 Display the date in international format, aka. ISO 8601
8937 (@code{gnus-article-date-iso8601}).
8938
8939 @item W T l
8940 @kindex W T l (Summary)
8941 @findex gnus-article-date-local
8942 Display the date in the local timezone (@code{gnus-article-date-local}).
8943
8944 @item W T p
8945 @kindex W T p (Summary)
8946 @findex gnus-article-date-english
8947 Display the date in a format that's easily pronounceable in English
8948 (@code{gnus-article-date-english}).
8949
8950 @item W T s
8951 @kindex W T s (Summary)
8952 @vindex gnus-article-time-format
8953 @findex gnus-article-date-user
8954 @findex format-time-string
8955 Display the date using a user-defined format
8956 (@code{gnus-article-date-user}).  The format is specified by the
8957 @code{gnus-article-time-format} variable, and is a string that's passed
8958 to @code{format-time-string}.  See the documentation of that variable
8959 for a list of possible format specs.
8960
8961 @item W T e
8962 @kindex W T e (Summary)
8963 @findex gnus-article-date-lapsed
8964 @findex gnus-start-date-timer
8965 @findex gnus-stop-date-timer
8966 Say how much time has elapsed between the article was posted and now
8967 (@code{gnus-article-date-lapsed}).  It looks something like:
8968
8969 @example
8970 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8971 @end example
8972
8973 @vindex gnus-article-date-lapsed-new-header
8974 The value of @code{gnus-article-date-lapsed-new-header} determines
8975 whether this header will just be added below the old Date one, or will
8976 replace it.
8977
8978 An advantage of using Gnus to read mail is that it converts simple bugs
8979 into wonderful absurdities.
8980
8981 If you want to have this line updated continually, you can put
8982
8983 @lisp
8984 (gnus-start-date-timer)
8985 @end lisp
8986
8987 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8988 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8989 command.
8990
8991 @item W T o
8992 @kindex W T o (Summary)
8993 @findex gnus-article-date-original
8994 Display the original date (@code{gnus-article-date-original}).  This can
8995 be useful if you normally use some other conversion function and are
8996 worried that it might be doing something totally wrong.  Say, claiming
8997 that the article was posted in 1854.  Although something like that is
8998 @emph{totally} impossible.  Don't you trust me? *titter*
8999
9000 @end table
9001
9002 @xref{Customizing Articles}, for how to display the date in your
9003 preferred format automatically.
9004
9005
9006 @node Article Display
9007 @subsection Article Display
9008 @cindex picons
9009 @cindex x-face
9010 @cindex smileys
9011
9012 These commands add various frivolous display gimmicks to the article
9013 buffer in Emacs versions that support them.
9014
9015 @code{X-Face} headers are small black-and-white images supplied by the
9016 message headers (@pxref{X-Face}).
9017
9018 @code{Face} headers are small colored images supplied by the message
9019 headers (@pxref{Face}).
9020
9021 Smileys are those little @samp{:-)} symbols that people like to litter
9022 their messages with (@pxref{Smileys}).
9023
9024 Picons, on the other hand, reside on your own system, and Gnus will
9025 try to match the headers to what you have (@pxref{Picons}).
9026
9027 All these functions are toggles---if the elements already exist,
9028 they'll be removed.
9029
9030 @table @kbd
9031 @item W D x
9032 @kindex W D x (Summary)
9033 @findex gnus-article-display-x-face
9034 Display an @code{X-Face} in the @code{From} header.
9035 (@code{gnus-article-display-x-face}).
9036
9037 @item W D d
9038 @kindex W D d (Summary)
9039 @findex gnus-article-display-face
9040 Display a @code{Face} in the @code{From} header.
9041 (@code{gnus-article-display-face}).
9042
9043 @item W D s
9044 @kindex W D s (Summary)
9045 @findex gnus-treat-smiley
9046 Display smileys (@code{gnus-treat-smiley}).
9047
9048 @item W D f
9049 @kindex W D f (Summary)
9050 @findex gnus-treat-from-picon
9051 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9052
9053 @item W D m
9054 @kindex W D m (Summary)
9055 @findex gnus-treat-mail-picon
9056 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9057 (@code{gnus-treat-mail-picon}).
9058
9059 @item W D n
9060 @kindex W D n (Summary)
9061 @findex gnus-treat-newsgroups-picon
9062 Piconify all news headers (i. e., @code{Newsgroups} and
9063 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9064
9065 @item W D D
9066 @kindex W D D (Summary)
9067 @findex gnus-article-remove-images
9068 Remove all images from the article buffer
9069 (@code{gnus-article-remove-images}).
9070
9071 @end table
9072
9073
9074
9075 @node Article Signature
9076 @subsection Article Signature
9077 @cindex signatures
9078 @cindex article signature
9079
9080 @vindex gnus-signature-separator
9081 Each article is divided into two parts---the head and the body.  The
9082 body can be divided into a signature part and a text part.  The variable
9083 that says what is to be considered a signature is
9084 @code{gnus-signature-separator}.  This is normally the standard
9085 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9086 non-standard signature separators, so this variable can also be a list
9087 of regular expressions to be tested, one by one.  (Searches are done
9088 from the end of the body towards the beginning.)  One likely value is:
9089
9090 @lisp
9091 (setq gnus-signature-separator
9092       '("^-- $"         ; @r{The standard}
9093         "^-- *$"        ; @r{A common mangling}
9094         "^-------*$"    ; @r{Many people just use a looong}
9095                         ; @r{line of dashes.  Shame!}
9096         "^ *--------*$" ; @r{Double-shame!}
9097         "^________*$"   ; @r{Underscores are also popular}
9098         "^========*$")) ; @r{Pervert!}
9099 @end lisp
9100
9101 The more permissive you are, the more likely it is that you'll get false
9102 positives.
9103
9104 @vindex gnus-signature-limit
9105 @code{gnus-signature-limit} provides a limit to what is considered a
9106 signature when displaying articles.
9107
9108 @enumerate
9109 @item
9110 If it is an integer, no signature may be longer (in characters) than
9111 that integer.
9112 @item
9113 If it is a floating point number, no signature may be longer (in lines)
9114 than that number.
9115 @item
9116 If it is a function, the function will be called without any parameters,
9117 and if it returns @code{nil}, there is no signature in the buffer.
9118 @item
9119 If it is a string, it will be used as a regexp.  If it matches, the text
9120 in question is not a signature.
9121 @end enumerate
9122
9123 This variable can also be a list where the elements may be of the types
9124 listed above.  Here's an example:
9125
9126 @lisp
9127 (setq gnus-signature-limit
9128       '(200.0 "^---*Forwarded article"))
9129 @end lisp
9130
9131 This means that if there are more than 200 lines after the signature
9132 separator, or the text after the signature separator is matched by
9133 the regular expression @samp{^---*Forwarded article}, then it isn't a
9134 signature after all.
9135
9136
9137 @node Article Miscellanea
9138 @subsection Article Miscellanea
9139
9140 @table @kbd
9141 @item A t
9142 @kindex A t (Summary)
9143 @findex gnus-article-babel
9144 Translate the article from one language to another
9145 (@code{gnus-article-babel}).
9146
9147 @end table
9148
9149
9150 @node MIME Commands
9151 @section MIME Commands
9152 @cindex MIME decoding
9153 @cindex attachments
9154 @cindex viewing attachments
9155
9156 The following commands all understand the numerical prefix.  For
9157 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9158
9159 @table @kbd
9160 @item b
9161 @itemx K v
9162 @kindex b (Summary)
9163 @kindex K v (Summary)
9164 View the @acronym{MIME} part.
9165
9166 @item K o
9167 @kindex K o (Summary)
9168 Save the @acronym{MIME} part.
9169
9170 @item K c
9171 @kindex K c (Summary)
9172 Copy the @acronym{MIME} part.
9173
9174 @item K e
9175 @kindex K e (Summary)
9176 View the @acronym{MIME} part externally.
9177
9178 @item K i
9179 @kindex K i (Summary)
9180 View the @acronym{MIME} part internally.
9181
9182 @item K |
9183 @kindex K | (Summary)
9184 Pipe the @acronym{MIME} part to an external command.
9185 @end table
9186
9187 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9188 the same manner:
9189
9190 @table @kbd
9191 @item K b
9192 @kindex K b (Summary)
9193 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9194 mostly useful if you wish to save (or perform other actions) on inlined
9195 parts.
9196
9197 @item K m
9198 @kindex K m (Summary)
9199 @findex gnus-summary-repair-multipart
9200 Some multipart messages are transmitted with missing or faulty headers.
9201 This command will attempt to ``repair'' these messages so that they can
9202 be viewed in a more pleasant manner
9203 (@code{gnus-summary-repair-multipart}).
9204
9205 @item X m
9206 @kindex X m (Summary)
9207 @findex gnus-summary-save-parts
9208 Save all parts matching a @acronym{MIME} type to a directory
9209 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9210 convention (@pxref{Process/Prefix}).
9211
9212 @item M-t
9213 @kindex M-t (Summary)
9214 @findex gnus-summary-toggle-display-buttonized
9215 Toggle the buttonized display of the article buffer
9216 (@code{gnus-summary-toggle-display-buttonized}).
9217
9218 @item W M w
9219 @kindex W M w (Summary)
9220 @findex gnus-article-decode-mime-words
9221 Decode RFC 2047-encoded words in the article headers
9222 (@code{gnus-article-decode-mime-words}).
9223
9224 @item W M c
9225 @kindex W M c (Summary)
9226 @findex gnus-article-decode-charset
9227 Decode encoded article bodies as well as charsets
9228 (@code{gnus-article-decode-charset}).
9229
9230 This command looks in the @code{Content-Type} header to determine the
9231 charset.  If there is no such header in the article, you can give it a
9232 prefix, which will prompt for the charset to decode as.  In regional
9233 groups where people post using some common encoding (but do not
9234 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9235 parameter to the required charset (@pxref{Group Parameters}).
9236
9237 @item W M v
9238 @kindex W M v (Summary)
9239 @findex gnus-mime-view-all-parts
9240 View all the @acronym{MIME} parts in the current article
9241 (@code{gnus-mime-view-all-parts}).
9242
9243 @end table
9244
9245 Relevant variables:
9246
9247 @table @code
9248 @item gnus-ignored-mime-types
9249 @vindex gnus-ignored-mime-types
9250 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9251 this list will be completely ignored by Gnus.  The default value is
9252 @code{nil}.
9253
9254 To have all Vcards be ignored, you'd say something like this:
9255
9256 @lisp
9257 (setq gnus-ignored-mime-types
9258       '("text/x-vcard"))
9259 @end lisp
9260
9261 @item gnus-article-loose-mime
9262 @vindex gnus-article-loose-mime
9263 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9264 before interpreting the message as a @acronym{MIME} message.  This helps
9265 when reading messages from certain broken mail user agents.  The
9266 default is @code{nil}.
9267
9268 @item gnus-article-emulate-mime
9269 @vindex gnus-article-emulate-mime
9270 There are other, non-@acronym{MIME} encoding methods used.  The most common
9271 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9272 this variable is non-@code{nil}, Gnus will look in message bodies to
9273 see if it finds these encodings, and if so, it'll run them through the
9274 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9275
9276 @item gnus-unbuttonized-mime-types
9277 @vindex gnus-unbuttonized-mime-types
9278 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9279 this list won't have @acronym{MIME} buttons inserted unless they aren't
9280 displayed or this variable is overridden by
9281 @code{gnus-buttonized-mime-types}.  The default value is
9282 @code{(".*/.*")}.  This variable is only used when
9283 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9284
9285 @item gnus-buttonized-mime-types
9286 @vindex gnus-buttonized-mime-types
9287 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9288 this list will have @acronym{MIME} buttons inserted unless they aren't
9289 displayed.  This variable overrides
9290 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9291 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9292 is @code{nil}.
9293
9294 To see e.g. security buttons but no other buttons, you could set this
9295 variable to @code{("multipart/signed")} and leave
9296 @code{gnus-unbuttonized-mime-types} at the default value.
9297
9298 @item gnus-inhibit-mime-unbuttonizing
9299 @vindex gnus-inhibit-mime-unbuttonizing
9300 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9301 default value is @code{nil}.
9302
9303 @item gnus-article-mime-part-function
9304 @vindex gnus-article-mime-part-function
9305 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9306 handle as the parameter.  The function is meant to be used to allow
9307 users to gather information from the article (e. g., add Vcard info to
9308 the bbdb database) or to do actions based on parts (e. g., automatically
9309 save all jpegs into some directory).
9310
9311 Here's an example function the does the latter:
9312
9313 @lisp
9314 (defun my-save-all-jpeg-parts (handle)
9315   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9316     (with-temp-buffer
9317       (insert (mm-get-part handle))
9318       (write-region (point-min) (point-max)
9319                     (read-file-name "Save jpeg to: ")))))
9320 (setq gnus-article-mime-part-function
9321       'my-save-all-jpeg-parts)
9322 @end lisp
9323
9324 @vindex gnus-mime-multipart-functions
9325 @item gnus-mime-multipart-functions
9326 Alist of @acronym{MIME} multipart types and functions to handle them.
9327
9328 @vindex mm-file-name-rewrite-functions
9329 @item mm-file-name-rewrite-functions
9330 List of functions used for rewriting file names of @acronym{MIME} parts.
9331 Each function takes a file name as input and returns a file name.
9332
9333 Ready-made functions include@*
9334 @code{mm-file-name-delete-whitespace},
9335 @code{mm-file-name-trim-whitespace},
9336 @code{mm-file-name-collapse-whitespace}, and
9337 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9338 the variable @code{mm-file-name-replace-whitespace} to replace each
9339 whitespace character in a file name with that string; default value
9340 is @code{"_"} (a single underscore).
9341 @findex mm-file-name-delete-whitespace
9342 @findex mm-file-name-trim-whitespace
9343 @findex mm-file-name-collapse-whitespace
9344 @findex mm-file-name-replace-whitespace
9345 @vindex mm-file-name-replace-whitespace
9346
9347 The standard functions @code{capitalize}, @code{downcase},
9348 @code{upcase}, and @code{upcase-initials} may be useful, too.
9349
9350 Everybody knows that whitespace characters in file names are evil,
9351 except those who don't know.  If you receive lots of attachments from
9352 such unenlightened users, you can make live easier by adding
9353
9354 @lisp
9355 (setq mm-file-name-rewrite-functions
9356       '(mm-file-name-trim-whitespace
9357         mm-file-name-collapse-whitespace
9358         mm-file-name-replace-whitespace))
9359 @end lisp
9360
9361 @noindent
9362 to your @file{~/.gnus.el} file.
9363
9364 @end table
9365
9366
9367 @node Charsets
9368 @section Charsets
9369 @cindex charsets
9370
9371 People use different charsets, and we have @acronym{MIME} to let us know what
9372 charsets they use.  Or rather, we wish we had.  Many people use
9373 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9374 just send out messages without saying what character sets they use.  To
9375 help a bit with this, some local news hierarchies have policies that say
9376 what character set is the default.  For instance, the @samp{fj}
9377 hierarchy uses @code{iso-2022-jp-2}.
9378
9379 @vindex gnus-group-charset-alist
9380 This knowledge is encoded in the @code{gnus-group-charset-alist}
9381 variable, which is an alist of regexps (use the first item to match full
9382 group names) and default charsets to be used when reading these groups.
9383
9384 @vindex gnus-newsgroup-ignored-charsets
9385 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9386 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9387 even if they really are in @code{koi-8}.  To help here, the
9388 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9389 charsets that are listed here will be ignored.  The variable can be
9390 set on a group-by-group basis using the group parameters (@pxref{Group
9391 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9392 which includes values some agents insist on having in there.
9393
9394 @vindex gnus-group-posting-charset-alist
9395 When posting, @code{gnus-group-posting-charset-alist} is used to
9396 determine which charsets should not be encoded using the @acronym{MIME}
9397 encodings.  For instance, some hierarchies discourage using
9398 quoted-printable header encoding.
9399
9400 This variable is an alist of regexps and permitted unencoded charsets
9401 for posting.  Each element of the alist has the form @code{(}@var{test
9402 header body-list}@code{)}, where:
9403
9404 @table @var
9405 @item test
9406 is either a regular expression matching the newsgroup header or a
9407 variable to query,
9408 @item header
9409 is the charset which may be left unencoded in the header (@code{nil}
9410 means encode all charsets),
9411 @item body-list
9412 is a list of charsets which may be encoded using 8bit content-transfer
9413 encoding in the body, or one of the special values @code{nil} (always
9414 encode using quoted-printable) or @code{t} (always use 8bit).
9415 @end table
9416
9417 @cindex Russian
9418 @cindex koi8-r
9419 @cindex koi8-u
9420 @cindex iso-8859-5
9421 @cindex coding system aliases
9422 @cindex preferred charset
9423
9424 Other charset tricks that may be useful, although not Gnus-specific:
9425
9426 If there are several @acronym{MIME} charsets that encode the same Emacs
9427 charset, you can choose what charset to use by saying the following:
9428
9429 @lisp
9430 (put-charset-property 'cyrillic-iso8859-5
9431                       'preferred-coding-system 'koi8-r)
9432 @end lisp
9433
9434 This means that Russian will be encoded using @code{koi8-r} instead of
9435 the default @code{iso-8859-5} @acronym{MIME} charset.
9436
9437 If you want to read messages in @code{koi8-u}, you can cheat and say
9438
9439 @lisp
9440 (define-coding-system-alias 'koi8-u 'koi8-r)
9441 @end lisp
9442
9443 This will almost do the right thing.
9444
9445 And finally, to read charsets like @code{windows-1251}, you can say
9446 something like
9447
9448 @lisp
9449 (codepage-setup 1251)
9450 (define-coding-system-alias 'windows-1251 'cp1251)
9451 @end lisp
9452
9453
9454 @node Article Commands
9455 @section Article Commands
9456
9457 @table @kbd
9458
9459 @item A P
9460 @cindex PostScript
9461 @cindex printing
9462 @kindex A P (Summary)
9463 @vindex gnus-ps-print-hook
9464 @findex gnus-summary-print-article
9465 Generate and print a PostScript image of the article buffer
9466 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9467 be run just before printing the buffer.  An alternative way to print
9468 article is to use Muttprint (@pxref{Saving Articles}).
9469
9470 @end table
9471
9472
9473 @node Summary Sorting
9474 @section Summary Sorting
9475 @cindex summary sorting
9476
9477 You can have the summary buffer sorted in various ways, even though I
9478 can't really see why you'd want that.
9479
9480 @table @kbd
9481
9482 @item C-c C-s C-n
9483 @kindex C-c C-s C-n (Summary)
9484 @findex gnus-summary-sort-by-number
9485 Sort by article number (@code{gnus-summary-sort-by-number}).
9486
9487 @item C-c C-s C-a
9488 @kindex C-c C-s C-a (Summary)
9489 @findex gnus-summary-sort-by-author
9490 Sort by author (@code{gnus-summary-sort-by-author}).
9491
9492 @item C-c C-s C-s
9493 @kindex C-c C-s C-s (Summary)
9494 @findex gnus-summary-sort-by-subject
9495 Sort by subject (@code{gnus-summary-sort-by-subject}).
9496
9497 @item C-c C-s C-d
9498 @kindex C-c C-s C-d (Summary)
9499 @findex gnus-summary-sort-by-date
9500 Sort by date (@code{gnus-summary-sort-by-date}).
9501
9502 @item C-c C-s C-l
9503 @kindex C-c C-s C-l (Summary)
9504 @findex gnus-summary-sort-by-lines
9505 Sort by lines (@code{gnus-summary-sort-by-lines}).
9506
9507 @item C-c C-s C-c
9508 @kindex C-c C-s C-c (Summary)
9509 @findex gnus-summary-sort-by-chars
9510 Sort by article length (@code{gnus-summary-sort-by-chars}).
9511
9512 @item C-c C-s C-i
9513 @kindex C-c C-s C-i (Summary)
9514 @findex gnus-summary-sort-by-score
9515 Sort by score (@code{gnus-summary-sort-by-score}).
9516
9517 @item C-c C-s C-r
9518 @kindex C-c C-s C-r (Summary)
9519 @findex gnus-summary-sort-by-random
9520 Randomize (@code{gnus-summary-sort-by-random}).
9521
9522 @item C-c C-s C-o
9523 @kindex C-c C-s C-o (Summary)
9524 @findex gnus-summary-sort-by-original
9525 Sort using the default sorting method
9526 (@code{gnus-summary-sort-by-original}).
9527 @end table
9528
9529 These functions will work both when you use threading and when you don't
9530 use threading.  In the latter case, all summary lines will be sorted,
9531 line by line.  In the former case, sorting will be done on a
9532 root-by-root basis, which might not be what you were looking for.  To
9533 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9534 Commands}).
9535
9536
9537 @node Finding the Parent
9538 @section Finding the Parent
9539 @cindex parent articles
9540 @cindex referring articles
9541
9542 @table @kbd
9543 @item ^
9544 @kindex ^ (Summary)
9545 @findex gnus-summary-refer-parent-article
9546 If you'd like to read the parent of the current article, and it is not
9547 displayed in the summary buffer, you might still be able to.  That is,
9548 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9549 and the @code{References} in the current article are not mangled, you
9550 can just press @kbd{^} or @kbd{A r}
9551 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9552 you'll get the parent.  If the parent is already displayed in the
9553 summary buffer, point will just move to this article.
9554
9555 If given a positive numerical prefix, fetch that many articles back into
9556 the ancestry.  If given a negative numerical prefix, fetch just that
9557 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9558 grandparent and the grandgrandparent of the current article.  If you say
9559 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9560 article.
9561
9562 @item A R (Summary)
9563 @findex gnus-summary-refer-references
9564 @kindex A R (Summary)
9565 Fetch all articles mentioned in the @code{References} header of the
9566 article (@code{gnus-summary-refer-references}).
9567
9568 @item A T (Summary)
9569 @findex gnus-summary-refer-thread
9570 @kindex A T (Summary)
9571 Display the full thread where the current article appears
9572 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9573 headers in the current group to work, so it usually takes a while.  If
9574 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9575 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9576 visible effects normally, but it'll make this command work a whole lot
9577 faster.  Of course, it'll make group entry somewhat slow.
9578
9579 @vindex gnus-refer-thread-limit
9580 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9581 articles before the first displayed in the current group) headers to
9582 fetch when doing this command.  The default is 200.  If @code{t}, all
9583 the available headers will be fetched.  This variable can be overridden
9584 by giving the @kbd{A T} command a numerical prefix.
9585
9586 @item M-^ (Summary)
9587 @findex gnus-summary-refer-article
9588 @kindex M-^ (Summary)
9589 @cindex Message-ID
9590 @cindex fetching by Message-ID
9591 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9592 matter what group it belongs to.  @kbd{M-^}
9593 (@code{gnus-summary-refer-article}) will ask you for a
9594 @code{Message-ID}, which is one of those long, hard-to-read thingies
9595 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9596 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9597 @end table
9598
9599 The current select method will be used when fetching by
9600 @code{Message-ID} from non-news select method, but you can override this
9601 by giving this command a prefix.
9602
9603 @vindex gnus-refer-article-method
9604 If the group you are reading is located on a back end that does not
9605 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9606 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9607 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9608 updating the spool you are reading from, but that's not really
9609 necessary.
9610
9611 It can also be a list of select methods, as well as the special symbol
9612 @code{current}, which means to use the current select method.  If it
9613 is a list, Gnus will try all the methods in the list until it finds a
9614 match.
9615
9616 Here's an example setting that will first try the current method, and
9617 then ask Google if that fails:
9618
9619 @lisp
9620 (setq gnus-refer-article-method
9621       '(current
9622         (nnweb "google" (nnweb-type google))))
9623 @end lisp
9624
9625 Most of the mail back ends support fetching by @code{Message-ID}, but
9626 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9627 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9628 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9629 only able to locate articles that have been posted to the current group.
9630 (Anything else would be too time consuming.)  @code{nnmh} does not
9631 support this at all.
9632
9633
9634 @node Alternative Approaches
9635 @section Alternative Approaches
9636
9637 Different people like to read news using different methods.  This being
9638 gnus, we offer a small selection of minor modes for the summary buffers.
9639
9640 @menu
9641 * Pick and Read::               First mark articles and then read them.
9642 * Binary Groups::               Auto-decode all articles.
9643 @end menu
9644
9645
9646 @node Pick and Read
9647 @subsection Pick and Read
9648 @cindex pick and read
9649
9650 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9651 a two-phased reading interface.  The user first marks in a summary
9652 buffer the articles she wants to read.  Then she starts reading the
9653 articles with just an article buffer displayed.
9654
9655 @findex gnus-pick-mode
9656 @kindex M-x gnus-pick-mode
9657 Gnus provides a summary buffer minor mode that allows
9658 this---@code{gnus-pick-mode}.  This basically means that a few process
9659 mark commands become one-keystroke commands to allow easy marking, and
9660 it provides one additional command for switching to the summary buffer.
9661
9662 Here are the available keystrokes when using pick mode:
9663
9664 @table @kbd
9665 @item .
9666 @kindex . (Pick)
9667 @findex gnus-pick-article-or-thread
9668 Pick the article or thread on the current line
9669 (@code{gnus-pick-article-or-thread}).  If the variable
9670 @code{gnus-thread-hide-subtree} is true, then this key selects the
9671 entire thread when used at the first article of the thread.  Otherwise,
9672 it selects just the article.  If given a numerical prefix, go to that
9673 thread or article and pick it.  (The line number is normally displayed
9674 at the beginning of the summary pick lines.)
9675
9676 @item SPACE
9677 @kindex SPACE (Pick)
9678 @findex gnus-pick-next-page
9679 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9680 at the end of the buffer, start reading the picked articles.
9681
9682 @item u
9683 @kindex u (Pick)
9684 @findex gnus-pick-unmark-article-or-thread.
9685 Unpick the thread or article
9686 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9687 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9688 thread if used at the first article of the thread.  Otherwise it unpicks
9689 just the article.  You can give this key a numerical prefix to unpick
9690 the thread or article at that line.
9691
9692 @item RET
9693 @kindex RET (Pick)
9694 @findex gnus-pick-start-reading
9695 @vindex gnus-pick-display-summary
9696 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9697 given a prefix, mark all unpicked articles as read first.  If
9698 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9699 will still be visible when you are reading.
9700
9701 @end table
9702
9703 All the normal summary mode commands are still available in the
9704 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9705 which is mapped to the same function
9706 @code{gnus-summary-tick-article-forward}.
9707
9708 If this sounds like a good idea to you, you could say:
9709
9710 @lisp
9711 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9712 @end lisp
9713
9714 @vindex gnus-pick-mode-hook
9715 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9716
9717 @vindex gnus-mark-unpicked-articles-as-read
9718 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9719 all unpicked articles as read.  The default is @code{nil}.
9720
9721 @vindex gnus-summary-pick-line-format
9722 The summary line format in pick mode is slightly different from the
9723 standard format.  At the beginning of each line the line number is
9724 displayed.  The pick mode line format is controlled by the
9725 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9726 Variables}).  It accepts the same format specs that
9727 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9728
9729
9730 @node Binary Groups
9731 @subsection Binary Groups
9732 @cindex binary groups
9733
9734 @findex gnus-binary-mode
9735 @kindex M-x gnus-binary-mode
9736 If you spend much time in binary groups, you may grow tired of hitting
9737 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9738 is a minor mode for summary buffers that makes all ordinary Gnus article
9739 selection functions uudecode series of articles and display the result
9740 instead of just displaying the articles the normal way.
9741
9742 @kindex g (Binary)
9743 @findex gnus-binary-show-article
9744 The only way, in fact, to see the actual articles is the @kbd{g}
9745 command, when you have turned on this mode
9746 (@code{gnus-binary-show-article}).
9747
9748 @vindex gnus-binary-mode-hook
9749 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9750
9751
9752 @node Tree Display
9753 @section Tree Display
9754 @cindex trees
9755
9756 @vindex gnus-use-trees
9757 If you don't like the normal gnus summary display, you might try setting
9758 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9759 additional @dfn{tree buffer}.  You can execute all summary mode commands
9760 in the tree buffer.
9761
9762 There are a few variables to customize the tree display, of course:
9763
9764 @table @code
9765 @item gnus-tree-mode-hook
9766 @vindex gnus-tree-mode-hook
9767 A hook called in all tree mode buffers.
9768
9769 @item gnus-tree-mode-line-format
9770 @vindex gnus-tree-mode-line-format
9771 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9772 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9773 of valid specs, @pxref{Summary Buffer Mode Line}.
9774
9775 @item gnus-selected-tree-face
9776 @vindex gnus-selected-tree-face
9777 Face used for highlighting the selected article in the tree buffer.  The
9778 default is @code{modeline}.
9779
9780 @item gnus-tree-line-format
9781 @vindex gnus-tree-line-format
9782 A format string for the tree nodes.  The name is a bit of a misnomer,
9783 though---it doesn't define a line, but just the node.  The default value
9784 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9785 the name of the poster.  It is vital that all nodes are of the same
9786 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9787
9788 Valid specs are:
9789
9790 @table @samp
9791 @item n
9792 The name of the poster.
9793 @item f
9794 The @code{From} header.
9795 @item N
9796 The number of the article.
9797 @item [
9798 The opening bracket.
9799 @item ]
9800 The closing bracket.
9801 @item s
9802 The subject.
9803 @end table
9804
9805 @xref{Formatting Variables}.
9806
9807 Variables related to the display are:
9808
9809 @table @code
9810 @item gnus-tree-brackets
9811 @vindex gnus-tree-brackets
9812 This is used for differentiating between ``real'' articles and
9813 ``sparse'' articles.  The format is
9814 @example
9815 ((@var{real-open} . @var{real-close})
9816  (@var{sparse-open} . @var{sparse-close})
9817  (@var{dummy-open} . @var{dummy-close}))
9818 @end example
9819 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9820
9821 @item gnus-tree-parent-child-edges
9822 @vindex gnus-tree-parent-child-edges
9823 This is a list that contains the characters used for connecting parent
9824 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9825
9826 @end table
9827
9828 @item gnus-tree-minimize-window
9829 @vindex gnus-tree-minimize-window
9830 If this variable is non-@code{nil}, gnus will try to keep the tree
9831 buffer as small as possible to allow more room for the other gnus
9832 windows.  If this variable is a number, the tree buffer will never be
9833 higher than that number.  The default is @code{t}.  Note that if you
9834 have several windows displayed side-by-side in a frame and the tree
9835 buffer is one of these, minimizing the tree window will also resize all
9836 other windows displayed next to it.
9837
9838 You may also wish to add the following hook to keep the window minimized
9839 at all times:
9840
9841 @lisp
9842 (add-hook 'gnus-configure-windows-hook
9843           'gnus-tree-perhaps-minimize)
9844 @end lisp
9845
9846 @item gnus-generate-tree-function
9847 @vindex gnus-generate-tree-function
9848 @findex gnus-generate-horizontal-tree
9849 @findex gnus-generate-vertical-tree
9850 The function that actually generates the thread tree.  Two predefined
9851 functions are available: @code{gnus-generate-horizontal-tree} and
9852 @code{gnus-generate-vertical-tree} (which is the default).
9853
9854 @end table
9855
9856 Here's an example from a horizontal tree buffer:
9857
9858 @example
9859 @{***@}-(***)-[odd]-[Gun]
9860      |      \[Jan]
9861      |      \[odd]-[Eri]
9862      |      \(***)-[Eri]
9863      |            \[odd]-[Paa]
9864      \[Bjo]
9865      \[Gun]
9866      \[Gun]-[Jor]
9867 @end example
9868
9869 Here's the same thread displayed in a vertical tree buffer:
9870
9871 @example
9872 @group
9873 @{***@}
9874   |--------------------------\-----\-----\
9875 (***)                         [Bjo] [Gun] [Gun]
9876   |--\-----\-----\                          |
9877 [odd] [Jan] [odd] (***)                   [Jor]
9878   |           |     |--\
9879 [Gun]       [Eri] [Eri] [odd]
9880                           |
9881                         [Paa]
9882 @end group
9883 @end example
9884
9885 If you're using horizontal trees, it might be nice to display the trees
9886 side-by-side with the summary buffer.  You could add something like the
9887 following to your @file{~/.gnus.el} file:
9888
9889 @lisp
9890 (setq gnus-use-trees t
9891       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9892       gnus-tree-minimize-window nil)
9893 (gnus-add-configuration
9894  '(article
9895    (vertical 1.0
9896              (horizontal 0.25
9897                          (summary 0.75 point)
9898                          (tree 1.0))
9899              (article 1.0))))
9900 @end lisp
9901
9902 @xref{Window Layout}.
9903
9904
9905 @node Mail Group Commands
9906 @section Mail Group Commands
9907 @cindex mail group commands
9908
9909 Some commands only make sense in mail groups.  If these commands are
9910 invalid in the current group, they will raise a hell and let you know.
9911
9912 All these commands (except the expiry and edit commands) use the
9913 process/prefix convention (@pxref{Process/Prefix}).
9914
9915 @table @kbd
9916
9917 @item B e
9918 @kindex B e (Summary)
9919 @findex gnus-summary-expire-articles
9920 Run all expirable articles in the current group through the expiry
9921 process (@code{gnus-summary-expire-articles}).  That is, delete all
9922 expirable articles in the group that have been around for a while.
9923 (@pxref{Expiring Mail}).
9924
9925 @item B C-M-e
9926 @kindex B C-M-e (Summary)
9927 @findex gnus-summary-expire-articles-now
9928 Delete all the expirable articles in the group
9929 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9930 articles eligible for expiry in the current group will
9931 disappear forever into that big @file{/dev/null} in the sky.
9932
9933 @item B DEL
9934 @kindex B DEL (Summary)
9935 @findex gnus-summary-delete-article
9936 @c @icon{gnus-summary-mail-delete}
9937 Delete the mail article.  This is ``delete'' as in ``delete it from your
9938 disk forever and ever, never to return again.'' Use with caution.
9939 (@code{gnus-summary-delete-article}).
9940
9941 @item B m
9942 @kindex B m (Summary)
9943 @cindex move mail
9944 @findex gnus-summary-move-article
9945 @vindex gnus-preserve-marks
9946 Move the article from one mail group to another
9947 (@code{gnus-summary-move-article}).  Marks will be preserved if
9948 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9949
9950 @item B c
9951 @kindex B c (Summary)
9952 @cindex copy mail
9953 @findex gnus-summary-copy-article
9954 @c @icon{gnus-summary-mail-copy}
9955 Copy the article from one group (mail group or not) to a mail group
9956 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9957 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9958
9959 @item B B
9960 @kindex B B (Summary)
9961 @cindex crosspost mail
9962 @findex gnus-summary-crosspost-article
9963 Crosspost the current article to some other group
9964 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9965 the article in the other group, and the Xref headers of the article will
9966 be properly updated.
9967
9968 @item B i
9969 @kindex B i (Summary)
9970 @findex gnus-summary-import-article
9971 Import an arbitrary file into the current mail newsgroup
9972 (@code{gnus-summary-import-article}).  You will be prompted for a file
9973 name, a @code{From} header and a @code{Subject} header.
9974
9975 @item B I
9976 @kindex B I (Summary)
9977 @findex gnus-summary-create-article
9978 Create an empty article in the current mail newsgroups
9979 (@code{gnus-summary-create-article}).  You will be prompted for a
9980 @code{From} header and a @code{Subject} header.
9981
9982 @item B r
9983 @kindex B r (Summary)
9984 @findex gnus-summary-respool-article
9985 @vindex gnus-summary-respool-default-method
9986 Respool the mail article (@code{gnus-summary-respool-article}).
9987 @code{gnus-summary-respool-default-method} will be used as the default
9988 select method when respooling.  This variable is @code{nil} by default,
9989 which means that the current group select method will be used instead.
9990 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9991 (which is the default).
9992
9993 @item B w
9994 @itemx e
9995 @kindex B w (Summary)
9996 @kindex e (Summary)
9997 @findex gnus-summary-edit-article
9998 @kindex C-c C-c (Article)
9999 @findex gnus-summary-edit-article-done
10000 Edit the current article (@code{gnus-summary-edit-article}).  To finish
10001 editing and make the changes permanent, type @kbd{C-c C-c}
10002 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
10003 @kbd{C-c C-c} command, gnus won't re-highlight the article.
10004
10005 @item B q
10006 @kindex B q (Summary)
10007 @findex gnus-summary-respool-query
10008 If you want to re-spool an article, you might be curious as to what group
10009 the article will end up in before you do the re-spooling.  This command
10010 will tell you (@code{gnus-summary-respool-query}).
10011
10012 @item B t
10013 @kindex B t (Summary)
10014 @findex gnus-summary-respool-trace
10015 Similarly, this command will display all fancy splitting patterns used
10016 when respooling, if any (@code{gnus-summary-respool-trace}).
10017
10018 @item B p
10019 @kindex B p (Summary)
10020 @findex gnus-summary-article-posted-p
10021 Some people have a tendency to send you ``courtesy'' copies when they
10022 follow up to articles you have posted.  These usually have a
10023 @code{Newsgroups} header in them, but not always.  This command
10024 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10025 article from your news server (or rather, from
10026 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10027 report back whether it found the article or not.  Even if it says that
10028 it didn't find the article, it may have been posted anyway---mail
10029 propagation is much faster than news propagation, and the news copy may
10030 just not have arrived yet.
10031
10032 @item K E
10033 @kindex K E (Summary)
10034 @findex gnus-article-encrypt-body
10035 @vindex gnus-article-encrypt-protocol
10036 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10037 The body is encrypted with the encryption protocol specified by the
10038 variable @code{gnus-article-encrypt-protocol}.
10039
10040 @end table
10041
10042 @vindex gnus-move-split-methods
10043 @cindex moving articles
10044 If you move (or copy) articles regularly, you might wish to have gnus
10045 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10046 variable that uses the same syntax as @code{gnus-split-methods}
10047 (@pxref{Saving Articles}).  You may customize that variable to create
10048 suggestions you find reasonable.  (Note that
10049 @code{gnus-move-split-methods} uses group names where
10050 @code{gnus-split-methods} uses file names.)
10051
10052 @lisp
10053 (setq gnus-move-split-methods
10054       '(("^From:.*Lars Magne" "nnml:junk")
10055         ("^Subject:.*gnus" "nnfolder:important")
10056         (".*" "nnml:misc")))
10057 @end lisp
10058
10059
10060 @node Various Summary Stuff
10061 @section Various Summary Stuff
10062
10063 @menu
10064 * Summary Group Information::   Information oriented commands.
10065 * Searching for Articles::      Multiple article commands.
10066 * Summary Generation Commands::
10067 * Really Various Summary Commands::  Those pesky non-conformant commands.
10068 @end menu
10069
10070 @table @code
10071 @vindex gnus-summary-display-while-building
10072 @item gnus-summary-display-while-building
10073 If non-@code{nil}, show and update the summary buffer as it's being
10074 built.  If @code{t}, update the buffer after every line is inserted.
10075 If the value is an integer, @var{n}, update the display every @var{n}
10076 lines.  The default is @code{nil}.
10077
10078 @vindex gnus-summary-display-arrow
10079 @item gnus-summary-display-arrow
10080 If non-@code{nil}, display an arrow in the fringe to indicate the
10081 current article.
10082
10083 @vindex gnus-summary-mode-hook
10084 @item gnus-summary-mode-hook
10085 This hook is called when creating a summary mode buffer.
10086
10087 @vindex gnus-summary-generate-hook
10088 @item gnus-summary-generate-hook
10089 This is called as the last thing before doing the threading and the
10090 generation of the summary buffer.  It's quite convenient for customizing
10091 the threading variables based on what data the newsgroup has.  This hook
10092 is called from the summary buffer after most summary buffer variables
10093 have been set.
10094
10095 @vindex gnus-summary-prepare-hook
10096 @item gnus-summary-prepare-hook
10097 It is called after the summary buffer has been generated.  You might use
10098 it to, for instance, highlight lines or modify the look of the buffer in
10099 some other ungodly manner.  I don't care.
10100
10101 @vindex gnus-summary-prepared-hook
10102 @item gnus-summary-prepared-hook
10103 A hook called as the very last thing after the summary buffer has been
10104 generated.
10105
10106 @vindex gnus-summary-ignore-duplicates
10107 @item gnus-summary-ignore-duplicates
10108 When gnus discovers two articles that have the same @code{Message-ID},
10109 it has to do something drastic.  No articles are allowed to have the
10110 same @code{Message-ID}, but this may happen when reading mail from some
10111 sources.  Gnus allows you to customize what happens with this variable.
10112 If it is @code{nil} (which is the default), gnus will rename the
10113 @code{Message-ID} (for display purposes only) and display the article as
10114 any other article.  If this variable is @code{t}, it won't display the
10115 article---it'll be as if it never existed.
10116
10117 @vindex gnus-alter-articles-to-read-function
10118 @item gnus-alter-articles-to-read-function
10119 This function, which takes two parameters (the group name and the list
10120 of articles to be selected), is called to allow the user to alter the
10121 list of articles to be selected.
10122
10123 For instance, the following function adds the list of cached articles to
10124 the list in one particular group:
10125
10126 @lisp
10127 (defun my-add-cached-articles (group articles)
10128   (if (string= group "some.group")
10129       (append gnus-newsgroup-cached articles)
10130     articles))
10131 @end lisp
10132
10133 @vindex gnus-newsgroup-variables
10134 @item gnus-newsgroup-variables
10135 A list of newsgroup (summary buffer) local variables, or cons of
10136 variables and their default values (when the default values are not
10137 @code{nil}), that should be made global while the summary buffer is
10138 active.  These variables can be used to set variables in the group
10139 parameters while still allowing them to affect operations done in
10140 other buffers.  For example:
10141
10142 @lisp
10143 (setq gnus-newsgroup-variables
10144       '(message-use-followup-to
10145         (gnus-visible-headers .
10146  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10147 @end lisp
10148
10149 @end table
10150
10151
10152 @node Summary Group Information
10153 @subsection Summary Group Information
10154
10155 @table @kbd
10156
10157 @item H f
10158 @kindex H f (Summary)
10159 @findex gnus-summary-fetch-faq
10160 @vindex gnus-group-faq-directory
10161 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10162 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10163 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10164 is usually a directory on a remote machine.  This variable can also be
10165 a list of directories.  In that case, giving a prefix to this command
10166 will allow you to choose between the various sites.  @code{ange-ftp}
10167 or @code{efs} will probably be used for fetching the file.
10168
10169 @item H d
10170 @kindex H d (Summary)
10171 @findex gnus-summary-describe-group
10172 Give a brief description of the current group
10173 (@code{gnus-summary-describe-group}).  If given a prefix, force
10174 rereading the description from the server.
10175
10176 @item H h
10177 @kindex H h (Summary)
10178 @findex gnus-summary-describe-briefly
10179 Give an extremely brief description of the most important summary
10180 keystrokes (@code{gnus-summary-describe-briefly}).
10181
10182 @item H i
10183 @kindex H i (Summary)
10184 @findex gnus-info-find-node
10185 Go to the gnus info node (@code{gnus-info-find-node}).
10186 @end table
10187
10188
10189 @node Searching for Articles
10190 @subsection Searching for Articles
10191
10192 @table @kbd
10193
10194 @item M-s
10195 @kindex M-s (Summary)
10196 @findex gnus-summary-search-article-forward
10197 Search through all subsequent (raw) articles for a regexp
10198 (@code{gnus-summary-search-article-forward}).
10199
10200 @item M-r
10201 @kindex M-r (Summary)
10202 @findex gnus-summary-search-article-backward
10203 Search through all previous (raw) articles for a regexp
10204 (@code{gnus-summary-search-article-backward}).
10205
10206 @item &
10207 @kindex & (Summary)
10208 @findex gnus-summary-execute-command
10209 This command will prompt you for a header, a regular expression to match
10210 on this field, and a command to be executed if the match is made
10211 (@code{gnus-summary-execute-command}).  If the header is an empty
10212 string, the match is done on the entire article.  If given a prefix,
10213 search backward instead.
10214
10215 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10216 all articles that have heads or bodies that match @samp{some.*string}.
10217
10218 @item M-&
10219 @kindex M-& (Summary)
10220 @findex gnus-summary-universal-argument
10221 Perform any operation on all articles that have been marked with
10222 the process mark (@code{gnus-summary-universal-argument}).
10223 @end table
10224
10225 @node Summary Generation Commands
10226 @subsection Summary Generation Commands
10227
10228 @table @kbd
10229
10230 @item Y g
10231 @kindex Y g (Summary)
10232 @findex gnus-summary-prepare
10233 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10234
10235 @item Y c
10236 @kindex Y c (Summary)
10237 @findex gnus-summary-insert-cached-articles
10238 Pull all cached articles (for the current group) into the summary buffer
10239 (@code{gnus-summary-insert-cached-articles}).
10240
10241 @item Y d
10242 @kindex Y d (Summary)
10243 @findex gnus-summary-insert-dormant-articles
10244 Pull all dormant articles (for the current group) into the summary buffer
10245 (@code{gnus-summary-insert-dormant-articles}).
10246
10247 @end table
10248
10249
10250 @node Really Various Summary Commands
10251 @subsection Really Various Summary Commands
10252
10253 @table @kbd
10254
10255 @item A D
10256 @itemx C-d
10257 @kindex C-d (Summary)
10258 @kindex A D (Summary)
10259 @findex gnus-summary-enter-digest-group
10260 If the current article is a collection of other articles (for instance,
10261 a digest), you might use this command to enter a group based on the that
10262 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10263 guess what article type is currently displayed unless you give a prefix
10264 to this command, which forces a ``digest'' interpretation.  Basically,
10265 whenever you see a message that is a collection of other messages of
10266 some format, you @kbd{C-d} and read these messages in a more convenient
10267 fashion.
10268
10269 @item C-M-d
10270 @kindex C-M-d (Summary)
10271 @findex gnus-summary-read-document
10272 This command is very similar to the one above, but lets you gather
10273 several documents into one biiig group
10274 (@code{gnus-summary-read-document}).  It does this by opening several
10275 @code{nndoc} groups for each document, and then opening an
10276 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10277 command understands the process/prefix convention
10278 (@pxref{Process/Prefix}).
10279
10280 @item C-t
10281 @kindex C-t (Summary)
10282 @findex gnus-summary-toggle-truncation
10283 Toggle truncation of summary lines
10284 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10285 line centering function in the summary buffer, so it's not a good idea
10286 to have truncation switched off while reading articles.
10287
10288 @item =
10289 @kindex = (Summary)
10290 @findex gnus-summary-expand-window
10291 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10292 If given a prefix, force an @code{article} window configuration.
10293
10294 @item C-M-e
10295 @kindex C-M-e (Summary)
10296 @findex gnus-summary-edit-parameters
10297 Edit the group parameters (@pxref{Group Parameters}) of the current
10298 group (@code{gnus-summary-edit-parameters}).
10299
10300 @item C-M-a
10301 @kindex C-M-a (Summary)
10302 @findex gnus-summary-customize-parameters
10303 Customize the group parameters (@pxref{Group Parameters}) of the current
10304 group (@code{gnus-summary-customize-parameters}).
10305
10306 @end table
10307
10308
10309 @node Exiting the Summary Buffer
10310 @section Exiting the Summary Buffer
10311 @cindex summary exit
10312 @cindex exiting groups
10313
10314 Exiting from the summary buffer will normally update all info on the
10315 group and return you to the group buffer.
10316
10317 @table @kbd
10318
10319 @item Z Z
10320 @itemx Z Q
10321 @itemx q
10322 @kindex Z Z (Summary)
10323 @kindex Z Q (Summary)
10324 @kindex q (Summary)
10325 @findex gnus-summary-exit
10326 @vindex gnus-summary-exit-hook
10327 @vindex gnus-summary-prepare-exit-hook
10328 @vindex gnus-group-no-more-groups-hook
10329 @c @icon{gnus-summary-exit}
10330 Exit the current group and update all information on the group
10331 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10332 called before doing much of the exiting, which calls
10333 @code{gnus-summary-expire-articles} by default.
10334 @code{gnus-summary-exit-hook} is called after finishing the exit
10335 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10336 group mode having no more (unread) groups.
10337
10338 @item Z E
10339 @itemx Q
10340 @kindex Z E (Summary)
10341 @kindex Q (Summary)
10342 @findex gnus-summary-exit-no-update
10343 Exit the current group without updating any information on the group
10344 (@code{gnus-summary-exit-no-update}).
10345
10346 @item Z c
10347 @itemx c
10348 @kindex Z c (Summary)
10349 @kindex c (Summary)
10350 @findex gnus-summary-catchup-and-exit
10351 @c @icon{gnus-summary-catchup-and-exit}
10352 Mark all unticked articles in the group as read and then exit
10353 (@code{gnus-summary-catchup-and-exit}).
10354
10355 @item Z C
10356 @kindex Z C (Summary)
10357 @findex gnus-summary-catchup-all-and-exit
10358 Mark all articles, even the ticked ones, as read and then exit
10359 (@code{gnus-summary-catchup-all-and-exit}).
10360
10361 @item Z n
10362 @kindex Z n (Summary)
10363 @findex gnus-summary-catchup-and-goto-next-group
10364 Mark all articles as read and go to the next group
10365 (@code{gnus-summary-catchup-and-goto-next-group}).
10366
10367 @item Z R
10368 @itemx C-x C-s
10369 @kindex Z R (Summary)
10370 @kindex C-x C-s (Summary)
10371 @findex gnus-summary-reselect-current-group
10372 Exit this group, and then enter it again
10373 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10374 all articles, both read and unread.
10375
10376 @item Z G
10377 @itemx M-g
10378 @kindex Z G (Summary)
10379 @kindex M-g (Summary)
10380 @findex gnus-summary-rescan-group
10381 @c @icon{gnus-summary-mail-get}
10382 Exit the group, check for new articles in the group, and select the
10383 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10384 articles, both read and unread.
10385
10386 @item Z N
10387 @kindex Z N (Summary)
10388 @findex gnus-summary-next-group
10389 Exit the group and go to the next group
10390 (@code{gnus-summary-next-group}).
10391
10392 @item Z P
10393 @kindex Z P (Summary)
10394 @findex gnus-summary-prev-group
10395 Exit the group and go to the previous group
10396 (@code{gnus-summary-prev-group}).
10397
10398 @item Z s
10399 @kindex Z s (Summary)
10400 @findex gnus-summary-save-newsrc
10401 Save the current number of read/marked articles in the dribble buffer
10402 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10403 given a prefix, also save the @file{.newsrc} file(s).  Using this
10404 command will make exit without updating (the @kbd{Q} command) worthless.
10405 @end table
10406
10407 @vindex gnus-exit-group-hook
10408 @code{gnus-exit-group-hook} is called when you exit the current group
10409 with an ``updating'' exit.  For instance @kbd{Q}
10410 (@code{gnus-summary-exit-no-update}) does not call this hook.
10411
10412 @findex gnus-summary-wake-up-the-dead
10413 @findex gnus-dead-summary-mode
10414 @vindex gnus-kill-summary-on-exit
10415 If you're in the habit of exiting groups, and then changing your mind
10416 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10417 If you do that, gnus won't kill the summary buffer when you exit it.
10418 (Quelle surprise!)  Instead it will change the name of the buffer to
10419 something like @samp{*Dead Summary ... *} and install a minor mode
10420 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10421 buffer, you'll find that all keys are mapped to a function called
10422 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10423 summary buffer will result in a live, normal summary buffer.
10424
10425 There will never be more than one dead summary buffer at any one time.
10426
10427 @vindex gnus-use-cross-reference
10428 The data on the current group will be updated (which articles you have
10429 read, which articles you have replied to, etc.) when you exit the
10430 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10431 @code{t} (which is the default), articles that are cross-referenced to
10432 this group and are marked as read, will also be marked as read in the
10433 other subscribed groups they were cross-posted to.  If this variable is
10434 neither @code{nil} nor @code{t}, the article will be marked as read in
10435 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10436
10437
10438 @node Crosspost Handling
10439 @section Crosspost Handling
10440
10441 @cindex velveeta
10442 @cindex spamming
10443 Marking cross-posted articles as read ensures that you'll never have to
10444 read the same article more than once.  Unless, of course, somebody has
10445 posted it to several groups separately.  Posting the same article to
10446 several groups (not cross-posting) is called @dfn{spamming}, and you are
10447 by law required to send nasty-grams to anyone who perpetrates such a
10448 heinous crime.  You may want to try NoCeM handling to filter out spam
10449 (@pxref{NoCeM}).
10450
10451 Remember: Cross-posting is kinda ok, but posting the same article
10452 separately to several groups is not.  Massive cross-posting (aka.
10453 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10454 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10455 excessive crossposting (@pxref{Summary Mail Commands}).
10456
10457 @cindex cross-posting
10458 @cindex Xref
10459 @cindex @acronym{NOV}
10460 One thing that may cause Gnus to not do the cross-posting thing
10461 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10462 (which is very nice, because it speeds things up considerably) which
10463 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10464 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10465 even with @sc{xover} by registering the @code{Xref} lines of all
10466 articles you actually read, but if you kill the articles, or just mark
10467 them as read without reading them, Gnus will not get a chance to snoop
10468 the @code{Xref} lines out of these articles, and will be unable to use
10469 the cross reference mechanism.
10470
10471 @cindex LIST overview.fmt
10472 @cindex overview.fmt
10473 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10474 in its overview files, try @samp{telnet your.nntp.server nntp},
10475 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10476 overview.fmt}.  This may not work, but if it does, and the last line you
10477 get does not read @samp{Xref:full}, then you should shout and whine at
10478 your news admin until she includes the @code{Xref} header in the
10479 overview files.
10480
10481 @vindex gnus-nov-is-evil
10482 If you want Gnus to get the @code{Xref}s right all the time, you have to
10483 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10484 considerably.
10485
10486 C'est la vie.
10487
10488 For an alternative approach, @pxref{Duplicate Suppression}.
10489
10490
10491 @node Duplicate Suppression
10492 @section Duplicate Suppression
10493
10494 By default, gnus tries to make sure that you don't have to read the same
10495 article more than once by utilizing the crossposting mechanism
10496 (@pxref{Crosspost Handling}).  However, that simple and efficient
10497 approach may not work satisfactory for some users for various
10498 reasons.
10499
10500 @enumerate
10501 @item
10502 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10503 is evil and not very common.
10504
10505 @item
10506 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10507 @file{.overview} data bases.  This is evil and all too common, alas.
10508
10509 @item
10510 You may be reading the same group (or several related groups) from
10511 different @acronym{NNTP} servers.
10512
10513 @item
10514 You may be getting mail that duplicates articles posted to groups.
10515 @end enumerate
10516
10517 I'm sure there are other situations where @code{Xref} handling fails as
10518 well, but these four are the most common situations.
10519
10520 If, and only if, @code{Xref} handling fails for you, then you may
10521 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10522 will remember the @code{Message-ID}s of all articles you have read or
10523 otherwise marked as read, and then, as if by magic, mark them as read
10524 all subsequent times you see them---in @emph{all} groups.  Using this
10525 mechanism is quite likely to be somewhat inefficient, but not overly
10526 so.  It's certainly preferable to reading the same articles more than
10527 once.
10528
10529 Duplicate suppression is not a very subtle instrument.  It's more like a
10530 sledge hammer than anything else.  It works in a very simple
10531 fashion---if you have marked an article as read, it adds this Message-ID
10532 to a cache.  The next time it sees this Message-ID, it will mark the
10533 article as read with the @samp{M} mark.  It doesn't care what group it
10534 saw the article in.
10535
10536 @table @code
10537 @item gnus-suppress-duplicates
10538 @vindex gnus-suppress-duplicates
10539 If non-@code{nil}, suppress duplicates.
10540
10541 @item gnus-save-duplicate-list
10542 @vindex gnus-save-duplicate-list
10543 If non-@code{nil}, save the list of duplicates to a file.  This will
10544 make startup and shutdown take longer, so the default is @code{nil}.
10545 However, this means that only duplicate articles read in a single gnus
10546 session are suppressed.
10547
10548 @item gnus-duplicate-list-length
10549 @vindex gnus-duplicate-list-length
10550 This variable says how many @code{Message-ID}s to keep in the duplicate
10551 suppression list.  The default is 10000.
10552
10553 @item gnus-duplicate-file
10554 @vindex gnus-duplicate-file
10555 The name of the file to store the duplicate suppression list in.  The
10556 default is @file{~/News/suppression}.
10557 @end table
10558
10559 If you have a tendency to stop and start gnus often, setting
10560 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10561 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10562 the other hand, saving the list makes startup and shutdown much slower,
10563 so that means that if you stop and start gnus often, you should set
10564 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10565 to you to figure out, I think.
10566
10567 @node Security
10568 @section Security
10569
10570 Gnus is able to verify signed messages or decrypt encrypted messages.
10571 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10572 and @acronym{S/MIME}, however you need some external programs to get
10573 things to work:
10574
10575 @enumerate
10576 @item
10577 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10578 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10579 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10580 Manual}), but Mailcrypt and gpg.el are also supported.
10581
10582 @item
10583 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10584 or newer is recommended.
10585
10586 @end enumerate
10587
10588 More information on how to set things up can be found in the message
10589 manual (@pxref{Security, ,Security, message, Message Manual}).
10590
10591 @table @code
10592 @item mm-verify-option
10593 @vindex mm-verify-option
10594 Option of verifying signed parts.  @code{never}, not verify;
10595 @code{always}, always verify; @code{known}, only verify known
10596 protocols.  Otherwise, ask user.
10597
10598 @item mm-decrypt-option
10599 @vindex mm-decrypt-option
10600 Option of decrypting encrypted parts.  @code{never}, no decryption;
10601 @code{always}, always decrypt; @code{known}, only decrypt known
10602 protocols.  Otherwise, ask user.
10603
10604 @item mml1991-use
10605 @vindex mml1991-use
10606 Symbol indicating elisp interface to OpenPGP implementation for
10607 @acronym{PGP} messages.  The default is @code{pgg}, but
10608 @code{mailcrypt} and @code{gpg} are also supported although
10609 deprecated.
10610
10611 @item mml2015-use
10612 @vindex mml2015-use
10613 Symbol indicating elisp interface to OpenPGP implementation for
10614 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10615 @code{mailcrypt} and @code{gpg} are also supported although
10616 deprecated.
10617
10618 @end table
10619
10620 @cindex snarfing keys
10621 @cindex importing PGP keys
10622 @cindex PGP key ring import
10623 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10624 key ring) is not supported explicitly through a menu item or command,
10625 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10626 allowing you to specify whatever action you think is appropriate
10627 through the usual @acronym{MIME} infrastructure.  You can use a
10628 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10629 Emacs MIME Manual}) such as the following to import keys using GNU
10630 Privacy Guard when you click on the @acronym{MIME} button
10631 (@pxref{Using MIME}).
10632
10633 @example
10634 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10635 @end example
10636 @noindent
10637 This happens to also be the default action defined in
10638 @code{mailcap-mime-data}.
10639
10640 @node Mailing List
10641 @section Mailing List
10642 @cindex mailing list
10643 @cindex RFC 2396
10644
10645 @kindex A M (summary)
10646 @findex gnus-mailing-list-insinuate
10647 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10648 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10649 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10650 summary buffer.
10651
10652 That enables the following commands to the summary buffer:
10653
10654 @table @kbd
10655
10656 @item C-c C-n h
10657 @kindex C-c C-n h (Summary)
10658 @findex gnus-mailing-list-help
10659 Send a message to fetch mailing list help, if List-Help field exists.
10660
10661 @item C-c C-n s
10662 @kindex C-c C-n s (Summary)
10663 @findex gnus-mailing-list-subscribe
10664 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10665
10666 @item C-c C-n u
10667 @kindex C-c C-n u (Summary)
10668 @findex gnus-mailing-list-unsubscribe
10669 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10670 field exists.
10671
10672 @item C-c C-n p
10673 @kindex C-c C-n p (Summary)
10674 @findex gnus-mailing-list-post
10675 Post to the mailing list, if List-Post field exists.
10676
10677 @item C-c C-n o
10678 @kindex C-c C-n o (Summary)
10679 @findex gnus-mailing-list-owner
10680 Send a message to the mailing list owner, if List-Owner field exists.
10681
10682 @item C-c C-n a
10683 @kindex C-c C-n a (Summary)
10684 @findex gnus-mailing-list-owner
10685 Browse the mailing list archive, if List-Archive field exists.
10686
10687 @end table
10688
10689
10690 @node Article Buffer
10691 @chapter Article Buffer
10692 @cindex article buffer
10693
10694 The articles are displayed in the article buffer, of which there is only
10695 one.  All the summary buffers share the same article buffer unless you
10696 tell gnus otherwise.
10697
10698 @menu
10699 * Hiding Headers::              Deciding what headers should be displayed.
10700 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10701 * Customizing Articles::        Tailoring the look of the articles.
10702 * Article Keymap::              Keystrokes available in the article buffer.
10703 * Misc Article::                Other stuff.
10704 @end menu
10705
10706
10707 @node Hiding Headers
10708 @section Hiding Headers
10709 @cindex hiding headers
10710 @cindex deleting headers
10711
10712 The top section of each article is the @dfn{head}.  (The rest is the
10713 @dfn{body}, but you may have guessed that already.)
10714
10715 @vindex gnus-show-all-headers
10716 There is a lot of useful information in the head: the name of the person
10717 who wrote the article, the date it was written and the subject of the
10718 article.  That's well and nice, but there's also lots of information
10719 most people do not want to see---what systems the article has passed
10720 through before reaching you, the @code{Message-ID}, the
10721 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10722 of some of those lines.  If you want to keep all those lines in the
10723 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10724
10725 Gnus provides you with two variables for sifting headers:
10726
10727 @table @code
10728
10729 @item gnus-visible-headers
10730 @vindex gnus-visible-headers
10731 If this variable is non-@code{nil}, it should be a regular expression
10732 that says what headers you wish to keep in the article buffer.  All
10733 headers that do not match this variable will be hidden.
10734
10735 For instance, if you only want to see the name of the person who wrote
10736 the article and the subject, you'd say:
10737
10738 @lisp
10739 (setq gnus-visible-headers "^From:\\|^Subject:")
10740 @end lisp
10741
10742 This variable can also be a list of regexps to match headers to
10743 remain visible.
10744
10745 @item gnus-ignored-headers
10746 @vindex gnus-ignored-headers
10747 This variable is the reverse of @code{gnus-visible-headers}.  If this
10748 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10749 should be a regular expression that matches all lines that you want to
10750 hide.  All lines that do not match this variable will remain visible.
10751
10752 For instance, if you just want to get rid of the @code{References} field
10753 and the @code{Xref} field, you might say:
10754
10755 @lisp
10756 (setq gnus-ignored-headers "^References:\\|^Xref:")
10757 @end lisp
10758
10759 This variable can also be a list of regexps to match headers to
10760 be removed.
10761
10762 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10763 variable will have no effect.
10764
10765 @end table
10766
10767 @vindex gnus-sorted-header-list
10768 Gnus can also sort the headers for you.  (It does this by default.)  You
10769 can control the sorting by setting the @code{gnus-sorted-header-list}
10770 variable.  It is a list of regular expressions that says in what order
10771 the headers are to be displayed.
10772
10773 For instance, if you want the name of the author of the article first,
10774 and then the subject, you might say something like:
10775
10776 @lisp
10777 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10778 @end lisp
10779
10780 Any headers that are to remain visible, but are not listed in this
10781 variable, will be displayed in random order after all the headers listed in this variable.
10782
10783 @findex gnus-article-hide-boring-headers
10784 @vindex gnus-boring-article-headers
10785 You can hide further boring headers by setting
10786 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10787 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10788 list, but this list doesn't actually contain header names.  Instead is
10789 lists various @dfn{boring conditions} that Gnus can check and remove
10790 from sight.
10791
10792 These conditions are:
10793 @table @code
10794 @item empty
10795 Remove all empty headers.
10796 @item followup-to
10797 Remove the @code{Followup-To} header if it is identical to the
10798 @code{Newsgroups} header.
10799 @item reply-to
10800 Remove the @code{Reply-To} header if it lists the same address as the
10801 @code{From} header, or if the @code{broken-reply-to} group parameter is
10802 set.
10803 @item newsgroups
10804 Remove the @code{Newsgroups} header if it only contains the current group
10805 name.
10806 @item to-address
10807 Remove the @code{To} header if it only contains the address identical to
10808 the current group's @code{to-address} parameter.
10809 @item to-list
10810 Remove the @code{To} header if it only contains the address identical to
10811 the current group's @code{to-list} parameter.
10812 @item cc-list
10813 Remove the @code{CC} header if it only contains the address identical to
10814 the current group's @code{to-list} parameter.
10815 @item date
10816 Remove the @code{Date} header if the article is less than three days
10817 old.
10818 @item long-to
10819 Remove the @code{To} header if it is very long.
10820 @item many-to
10821 Remove all @code{To} headers if there are more than one.
10822 @end table
10823
10824 To include these three elements, you could say something like:
10825
10826 @lisp
10827 (setq gnus-boring-article-headers
10828       '(empty followup-to reply-to))
10829 @end lisp
10830
10831 This is also the default value for this variable.
10832
10833
10834 @node Using MIME
10835 @section Using MIME
10836 @cindex @acronym{MIME}
10837
10838 Mime is a standard for waving your hands through the air, aimlessly,
10839 while people stand around yawning.
10840
10841 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10842 while all newsreaders die of fear.
10843
10844 @acronym{MIME} may specify what character set the article uses, the encoding
10845 of the characters, and it also makes it possible to embed pictures and
10846 other naughty stuff in innocent-looking articles.
10847
10848 @vindex gnus-show-mime
10849 @vindex gnus-article-display-method-for-mime
10850 @findex gnus-article-display-mime-message
10851 gnus handles @acronym{MIME} by pushing the articles through
10852 @code{gnus-article-display-method-for-mime}, which is
10853 @code{gnus-article-display-mime-message} by default.  This function
10854 calls the @acronym{SEMI} MIME-View program to actually do the work.  For
10855 more information on @acronym{SEMI} MIME-View, see its manual page
10856 (however it is not existed yet, sorry).
10857
10858 Set @code{gnus-show-mime} to @code{t} if you want to use
10859 @acronym{MIME} all the time.  If you have @code{gnus-show-mime} set,
10860 then you'll see some unfortunate display glitches in the article buffer.
10861 These can't be avoided.
10862
10863 In GNUS or Gnus, it might be best to just use the toggling functions
10864 from the summary buffer to avoid getting nasty surprises. (For instance,
10865 you enter the group @samp{alt.sing-a-long} and, before you know it,
10866 @acronym{MIME} has decoded the sound file in the article and some
10867 horrible sing-a-long song comes screaming out your speakers, and you
10868 can't find the volume button, because there isn't one, and people are
10869 starting to look at you, and you try to stop the program, but you can't,
10870 and you can't find the program to control the volume, and everybody else
10871 in the room suddenly decides to look at you disdainfully, and you'll
10872 feel rather stupid.)
10873
10874 Any similarity to real events and people is purely coincidental.  Ahem.
10875
10876 To avoid such kind of situation, gnus stops to use
10877 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10878 non-@code{nil} every-time, then you can push button in the article
10879 buffer when there are nobody else.
10880
10881 Also @pxref{MIME Commands}.
10882
10883
10884 @node Customizing Articles
10885 @section Customizing Articles
10886 @cindex article customization
10887
10888 A slew of functions for customizing how the articles are to look like
10889 exist.  You can call these functions interactively
10890 (@pxref{Article Washing}), or you can have them
10891 called automatically when you select the articles.
10892
10893 To have them called automatically, you should set the corresponding
10894 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10895 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10896 be set, but first we discuss the values these variables can have.
10897
10898 Note: Some values, while valid, make little sense.  Check the list below
10899 for sensible values.
10900
10901 @enumerate
10902 @item
10903 @code{nil}: Don't do this treatment.
10904
10905 @item
10906 @code{t}: Do this treatment on all body parts.
10907
10908 @item
10909 @code{head}: Do the treatment on the headers.
10910
10911 @item
10912 @code{last}: Do this treatment on the last part.
10913
10914 @item
10915 An integer: Do this treatment on all body parts that have a length less
10916 than this number.
10917
10918 @item
10919 A list of strings: Do this treatment on all body parts that are in
10920 articles that are read in groups that have names that match one of the
10921 regexps in the list.
10922
10923 @item
10924 A list where the first element is not a string:
10925
10926 The list is evaluated recursively.  The first element of the list is a
10927 predicate.  The following predicates are recognized: @code{or},
10928 @code{and}, @code{not} and @code{typep}.  Here's an example:
10929
10930 @lisp
10931 (or last
10932     (typep "text/x-vcard"))
10933 @end lisp
10934
10935 @item
10936 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10937 non-nil.
10938
10939 @end enumerate
10940
10941 You may have noticed that the word @dfn{part} is used here.  This refers
10942 to the fact that some messages are @acronym{MIME} multipart articles that may
10943 be divided into several parts.  Articles that are not multiparts are
10944 considered to contain just a single part.
10945
10946 @vindex gnus-article-treat-types
10947 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10948 want to, but by default, only @samp{text/plain} parts are given the
10949 treatment.  This is controlled by the @code{gnus-article-treat-types}
10950 variable, which is a list of regular expressions that are matched to the
10951 type of the part.  This variable is ignored if the value of the
10952 controlling variable is a predicate list, as described above.
10953
10954 The following treatment options are available.  The easiest way to
10955 customize this is to examine the @code{gnus-article-treat} customization
10956 group.  Values in parenthesis are suggested sensible values.  Others are
10957 possible but those listed are probably sufficient for most people.
10958
10959 @table @code
10960 @item gnus-treat-buttonize (t, integer)
10961 @item gnus-treat-buttonize-head (head)
10962
10963 @xref{Article Buttons}.
10964
10965 @item gnus-treat-capitalize-sentences (t, integer)
10966 @item gnus-treat-overstrike (t, integer)
10967 @item gnus-treat-strip-cr (t, integer)
10968 @item gnus-treat-strip-headers-in-body (t, integer)
10969 @item gnus-treat-strip-leading-blank-lines (t, integer)
10970 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10971 @item gnus-treat-strip-pem (t, last, integer)
10972 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10973 @item gnus-treat-unsplit-urls (t, integer)
10974 @item gnus-treat-wash-html (t, integer)
10975 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10976
10977 @xref{Article Washing}.
10978
10979 @item gnus-treat-date-english (head)
10980 @item gnus-treat-date-iso8601 (head)
10981 @item gnus-treat-date-lapsed (head)
10982 @item gnus-treat-date-local (head)
10983 @item gnus-treat-date-original (head)
10984 @item gnus-treat-date-user-defined (head)
10985 @item gnus-treat-date-ut (head)
10986
10987 @xref{Article Date}.
10988
10989 @item gnus-treat-from-picon (head)
10990 @item gnus-treat-mail-picon (head)
10991 @item gnus-treat-newsgroups-picon (head)
10992
10993 @xref{Picons}.
10994
10995 @item gnus-treat-display-smileys (t, integer)
10996
10997 @item gnus-treat-body-boundary (head)
10998
10999 @vindex gnus-body-boundary-delimiter
11000 Adds a delimiter between header and body, the string used as delimiter
11001 is controlled by @code{gnus-body-boundary-delimiter}.
11002
11003 @xref{Smileys}.
11004
11005 @item gnus-treat-display-x-face (head)
11006
11007 @xref{X-Face}.
11008
11009 @item gnus-treat-display-face (head)
11010
11011 @xref{Face}.
11012
11013 @item gnus-treat-emphasize (t, head, integer)
11014 @item gnus-treat-fill-article (t, integer)
11015 @item gnus-treat-fill-long-lines (t, integer)
11016 @item gnus-treat-hide-boring-headers (head)
11017 @item gnus-treat-hide-citation (t, integer)
11018 @item gnus-treat-hide-citation-maybe (t, integer)
11019 @item gnus-treat-hide-headers (head)
11020 @item gnus-treat-hide-signature (t, last)
11021 @item gnus-treat-strip-banner (t, last)
11022 @item gnus-treat-strip-list-identifiers (head)
11023
11024 @xref{Article Hiding}.
11025
11026 @item gnus-treat-highlight-citation (t, integer)
11027 @item gnus-treat-highlight-headers (head)
11028 @item gnus-treat-highlight-signature (t, last, integer)
11029
11030 @xref{Article Highlighting}.
11031
11032 @item gnus-treat-play-sounds
11033 @item gnus-treat-translate
11034 @item gnus-treat-x-pgp-sig (head)
11035
11036 @item gnus-treat-unfold-headers (head)
11037 @item gnus-treat-fold-headers (head)
11038 @item gnus-treat-fold-newsgroups (head)
11039 @item gnus-treat-leading-whitespace (head)
11040
11041 @xref{Article Header}.
11042
11043
11044 @end table
11045
11046 @vindex gnus-part-display-hook
11047 You can, of course, write your own functions to be called from
11048 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11049 part, and you can do anything you like, pretty much.  There is no
11050 information that you have to keep in the buffer---you can change
11051 everything.
11052
11053
11054 @node Article Keymap
11055 @section Article Keymap
11056
11057 Most of the keystrokes in the summary buffer can also be used in the
11058 article buffer.  They should behave as if you typed them in the summary
11059 buffer, which means that you don't actually have to have a summary
11060 buffer displayed while reading.  You can do it all from the article
11061 buffer.
11062
11063 A few additional keystrokes are available:
11064
11065 @table @kbd
11066
11067 @item SPACE
11068 @kindex SPACE (Article)
11069 @findex gnus-article-next-page
11070 Scroll forwards one page (@code{gnus-article-next-page}).
11071 This is exactly the same as @kbd{h SPACE h}.
11072
11073 @item DEL
11074 @kindex DEL (Article)
11075 @findex gnus-article-prev-page
11076 Scroll backwards one page (@code{gnus-article-prev-page}).
11077 This is exactly the same as @kbd{h DEL h}.
11078
11079 @item C-c ^
11080 @kindex C-c ^ (Article)
11081 @findex gnus-article-refer-article
11082 If point is in the neighborhood of a @code{Message-ID} and you press
11083 @kbd{C-c ^}, Gnus will try to get that article from the server
11084 (@code{gnus-article-refer-article}).
11085
11086 @item C-c C-m
11087 @kindex C-c C-m (Article)
11088 @findex gnus-article-mail
11089 Send a reply to the address near point (@code{gnus-article-mail}).  If
11090 given a prefix, include the mail.
11091
11092 @item s
11093 @kindex s (Article)
11094 @findex gnus-article-show-summary
11095 Reconfigure the buffers so that the summary buffer becomes visible
11096 (@code{gnus-article-show-summary}).
11097
11098 @item ?
11099 @kindex ? (Article)
11100 @findex gnus-article-describe-briefly
11101 Give a very brief description of the available keystrokes
11102 (@code{gnus-article-describe-briefly}).
11103
11104 @item TAB
11105 @kindex TAB (Article)
11106 @findex gnus-article-next-button
11107 Go to the next button, if any (@code{gnus-article-next-button}).  This
11108 only makes sense if you have buttonizing turned on.
11109
11110 @item M-TAB
11111 @kindex M-TAB (Article)
11112 @findex gnus-article-prev-button
11113 Go to the previous button, if any (@code{gnus-article-prev-button}).
11114
11115 @item R
11116 @kindex R (Article)
11117 @findex gnus-article-reply-with-original
11118 Send a reply to the current article and yank the current article
11119 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11120 wide reply.  If the region is active, only yank the text in the
11121 region.
11122
11123 @item F
11124 @kindex F (Article)
11125 @findex gnus-article-followup-with-original
11126 Send a followup to the current article and yank the current article
11127 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11128 a wide reply.  If the region is active, only yank the text in the
11129 region.
11130
11131
11132 @end table
11133
11134
11135 @node Misc Article
11136 @section Misc Article
11137
11138 @table @code
11139
11140 @item gnus-single-article-buffer
11141 @vindex gnus-single-article-buffer
11142 If non-@code{nil}, use the same article buffer for all the groups.
11143 (This is the default.)  If @code{nil}, each group will have its own
11144 article buffer.
11145
11146 @vindex gnus-article-decode-hook
11147 @item gnus-article-decode-hook
11148 @cindex @acronym{MIME}
11149 Hook used to decode @acronym{MIME} articles.  The default value is
11150 @code{(article-decode-charset article-decode-encoded-words)}
11151
11152 @vindex gnus-article-prepare-hook
11153 @item gnus-article-prepare-hook
11154 This hook is called right after the article has been inserted into the
11155 article buffer.  It is mainly intended for functions that do something
11156 depending on the contents; it should probably not be used for changing
11157 the contents of the article buffer.
11158
11159 @item gnus-article-mode-hook
11160 @vindex gnus-article-mode-hook
11161 Hook called in article mode buffers.
11162
11163 @item gnus-article-mode-syntax-table
11164 @vindex gnus-article-mode-syntax-table
11165 Syntax table used in article buffers.  It is initialized from
11166 @code{text-mode-syntax-table}.
11167
11168 @vindex gnus-article-over-scroll
11169 @item gnus-article-over-scroll
11170 If non-@code{nil}, allow scrolling the article buffer even when there
11171 no more new text to scroll in.  The default is @code{nil}.
11172
11173 @vindex gnus-article-mode-line-format
11174 @item gnus-article-mode-line-format
11175 This variable is a format string along the same lines as
11176 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11177 accepts the same format specifications as that variable, with two
11178 extensions:
11179
11180 @table @samp
11181
11182 @item w
11183 The @dfn{wash status} of the article.  This is a short string with one
11184 character for each possible article wash operation that may have been
11185 performed.  The characters and their meaning:
11186
11187 @table @samp
11188
11189 @item c
11190 Displayed when cited text may be hidden in the article buffer.
11191
11192 @item h
11193 Displayed when headers are hidden in the article buffer.
11194
11195 @item p
11196 Displayed when article is digitally signed or encrypted, and Gnus has
11197 hidden the security headers.  (N.B. does not tell anything about
11198 security status, i.e. good or bad signature.)
11199
11200 @item s
11201 Displayed when the signature has been hidden in the Article buffer.
11202
11203 @item o
11204 Displayed when Gnus has treated overstrike characters in the article buffer.
11205
11206 @item e
11207 Displayed when Gnus has treated emphasised strings in the article buffer.
11208
11209 @end table
11210
11211 @item m
11212 The number of @acronym{MIME} parts in the article.
11213
11214 @end table
11215
11216 @vindex gnus-break-pages
11217
11218 @item gnus-break-pages
11219 Controls whether @dfn{page breaking} is to take place.  If this variable
11220 is non-@code{nil}, the articles will be divided into pages whenever a
11221 page delimiter appears in the article.  If this variable is @code{nil},
11222 paging will not be done.
11223
11224 @item gnus-page-delimiter
11225 @vindex gnus-page-delimiter
11226 This is the delimiter mentioned above.  By default, it is @samp{^L}
11227 (formfeed).
11228
11229 @cindex IDNA
11230 @cindex internationalized domain names
11231 @vindex gnus-use-idna
11232 @item gnus-use-idna
11233 This variable controls whether Gnus performs IDNA decoding of
11234 internationalized domain names inside @samp{From}, @samp{To} and
11235 @samp{Cc} headers.  This requires
11236 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11237 variable is only enabled if you have installed it.
11238
11239 @end table
11240
11241
11242 @node Composing Messages
11243 @chapter Composing Messages
11244 @cindex composing messages
11245 @cindex messages
11246 @cindex mail
11247 @cindex sending mail
11248 @cindex reply
11249 @cindex followup
11250 @cindex post
11251 @cindex using gpg
11252 @cindex using s/mime
11253 @cindex using smime
11254
11255 @kindex C-c C-c (Post)
11256 All commands for posting and mailing will put you in a message buffer
11257 where you can edit the article all you like, before you send the
11258 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11259 Message Manual}.  Where the message will be posted/mailed to depends
11260 on your setup (@pxref{Posting Server}).
11261
11262 @menu
11263 * Mail::                        Mailing and replying.
11264 * Posting Server::              What server should you post and mail via?
11265 * Mail and Post::               Mailing and posting at the same time.
11266 * Archived Messages::           Where Gnus stores the messages you've sent.
11267 * Posting Styles::              An easier way to specify who you are.
11268 * Drafts::                      Postponing messages and rejected messages.
11269 * Rejected Articles::           What happens if the server doesn't like your article?
11270 * Signing and encrypting::      How to compose secure messages.
11271 @end menu
11272
11273 Also @pxref{Canceling and Superseding} for information on how to
11274 remove articles you shouldn't have posted.
11275
11276
11277 @node Mail
11278 @section Mail
11279
11280 Variables for customizing outgoing mail:
11281
11282 @table @code
11283 @item gnus-uu-digest-headers
11284 @vindex gnus-uu-digest-headers
11285 List of regexps to match headers included in digested messages.  The
11286 headers will be included in the sequence they are matched.  If
11287 @code{nil} include all headers.
11288
11289 @item gnus-add-to-list
11290 @vindex gnus-add-to-list
11291 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11292 that have none when you do a @kbd{a}.
11293
11294 @item gnus-confirm-mail-reply-to-news
11295 @vindex gnus-confirm-mail-reply-to-news
11296 This can also be a function receiving the group name as the only
11297 parameter which should return non-@code{nil} if a confirmation is
11298 needed, or a regular expression matching group names, where
11299 confirmation is should be asked for.
11300
11301 If you find yourself never wanting to reply to mail, but occasionally
11302 press R anyway, this variable might be for you.
11303
11304 @item gnus-confirm-treat-mail-like-news
11305 @vindex gnus-confirm-treat-mail-like-news
11306 If non-@code{nil}, Gnus also requests confirmation according to
11307 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11308 useful for treating mailing lists like newsgroups.
11309
11310 @end table
11311
11312
11313 @node Posting Server
11314 @section Posting Server
11315
11316 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11317 (extremely intelligent, of course) article, where does it go?
11318
11319 Thank you for asking.  I hate you.
11320
11321 It can be quite complicated.
11322
11323 @vindex gnus-post-method
11324 When posting news, Message usually invokes @code{message-send-news}
11325 (@pxref{News Variables, , News Variables, message, Message Manual}).
11326 Normally, Gnus will post using the same select method as you're
11327 reading from (which might be convenient if you're reading lots of
11328 groups from different private servers).  However.  If the server
11329 you're reading from doesn't allow posting, just reading, you probably
11330 want to use some other server to post your (extremely intelligent and
11331 fabulously interesting) articles.  You can then set the
11332 @code{gnus-post-method} to some other method:
11333
11334 @lisp
11335 (setq gnus-post-method '(nnspool ""))
11336 @end lisp
11337
11338 Now, if you've done this, and then this server rejects your article, or
11339 this server is down, what do you do then?  To override this variable you
11340 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11341 the ``current'' server, to get back the default behavior, for posting.
11342
11343 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11344 gnus will prompt you for what method to use for posting.
11345
11346 You can also set @code{gnus-post-method} to a list of select methods.
11347 If that's the case, gnus will always prompt you for what method to use
11348 for posting.
11349
11350 Finally, if you want to always post using the native select method,
11351 you can set this variable to @code{native}.
11352
11353 When sending mail, Message invokes @code{message-send-mail-function}.
11354 The default function, @code{message-send-mail-with-sendmail}, pipes
11355 your article to the @code{sendmail} binary for further queuing and
11356 sending.  When your local system is not configured for sending mail
11357 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11358 server, you can set @code{message-send-mail-function} to
11359 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11360 package correctly.  An example:
11361
11362 @lisp
11363 (setq message-send-mail-function 'smtpmail-send-it
11364       smtpmail-default-smtp-server "YOUR SMTP HOST")
11365 ;; The following variable needs to be set because of the FLIM version of
11366 ;; smtpmail.el.  Which smtpmail.el is used depends on the `load-path'.
11367 (setq smtp-default-smtp-server "YOUR SMTP HOST")
11368 @end lisp
11369
11370 To the thing similar to this, there is
11371 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11372 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11373 documentation for the function @code{mail-source-touch-pop}.
11374
11375 Other possible choices for @code{message-send-mail-function} includes
11376 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11377 and @code{feedmail-send-it}.
11378
11379 @node Mail and Post
11380 @section Mail and Post
11381
11382 Here's a list of variables relevant to both mailing and
11383 posting:
11384
11385 @table @code
11386 @item gnus-mailing-list-groups
11387 @findex gnus-mailing-list-groups
11388 @cindex mailing lists
11389
11390 If your news server offers groups that are really mailing lists
11391 gatewayed to the @acronym{NNTP} server, you can read those groups without
11392 problems, but you can't post/followup to them without some difficulty.
11393 One solution is to add a @code{to-address} to the group parameters
11394 (@pxref{Group Parameters}).  An easier thing to do is set the
11395 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11396 really are mailing lists.  Then, at least, followups to the mailing
11397 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11398 still a pain, though.
11399
11400 @item gnus-user-agent
11401 @vindex gnus-user-agent
11402 @cindex User-Agent
11403
11404 This variable controls which information should be exposed in the
11405 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11406 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11407 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11408 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11409 system type) or a custom string.  If you set it to a string, be sure to
11410 use a valid format, see RFC 2616.
11411
11412 @end table
11413
11414 You may want to do spell-checking on messages that you send out.  Or, if
11415 you don't want to spell-check by hand, you could add automatic
11416 spell-checking via the @code{ispell} package:
11417
11418 @cindex ispell
11419 @findex ispell-message
11420 @lisp
11421 (add-hook 'message-send-hook 'ispell-message)
11422 @end lisp
11423
11424 If you want to change the @code{ispell} dictionary based on what group
11425 you're in, you could say something like the following:
11426
11427 @lisp
11428 (add-hook 'gnus-select-group-hook
11429           (lambda ()
11430             (cond
11431              ((string-match
11432                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11433               (ispell-change-dictionary "deutsch"))
11434              (t
11435               (ispell-change-dictionary "english")))))
11436 @end lisp
11437
11438 Modify to suit your needs.
11439
11440
11441 @node Archived Messages
11442 @section Archived Messages
11443 @cindex archived messages
11444 @cindex sent messages
11445
11446 Gnus provides a few different methods for storing the mail and news you
11447 send.  The default method is to use the @dfn{archive virtual server} to
11448 store the messages.  If you want to disable this completely, the
11449 @code{gnus-message-archive-group} variable should be @code{nil}, which
11450 is the default.
11451
11452 For archiving interesting messages in a group you read, see the
11453 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11454 Group Commands}).
11455
11456 @vindex gnus-message-archive-method
11457 @code{gnus-message-archive-method} says what virtual server gnus is to
11458 use to store sent messages.  The default is:
11459
11460 @lisp
11461 (nnfolder "archive"
11462           (nnfolder-directory   "~/Mail/archive")
11463           (nnfolder-active-file "~/Mail/archive/active")
11464           (nnfolder-get-new-mail nil)
11465           (nnfolder-inhibit-expiry t))
11466 @end lisp
11467
11468 You can, however, use any mail select method (@code{nnml},
11469 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11470 for doing this sort of thing, though.  If you don't like the default
11471 directory chosen, you could say something like:
11472
11473 @lisp
11474 (setq gnus-message-archive-method
11475       '(nnfolder "archive"
11476                  (nnfolder-inhibit-expiry t)
11477                  (nnfolder-active-file "~/News/sent-mail/active")
11478                  (nnfolder-directory "~/News/sent-mail/")))
11479 @end lisp
11480
11481 @vindex gnus-message-archive-group
11482 @cindex Gcc
11483 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11484 to one or more group(s) on that server.  Which group to use is
11485 determined by the @code{gnus-message-archive-group} variable.
11486
11487 This variable can be used to do the following:
11488
11489 @table @asis
11490 @item a string
11491 Messages will be saved in that group.
11492
11493 Note that you can include a select method in the group name, then the
11494 message will not be stored in the select method given by
11495 @code{gnus-message-archive-method}, but in the select method specified
11496 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11497 has the default value shown above.  Then setting
11498 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11499 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11500 value @code{"nnml:foo"}, then outgoing messages will be stored in
11501 @samp{nnml:foo}.
11502
11503 @item a list of strings
11504 Messages will be saved in all those groups.
11505
11506 @item an alist of regexps, functions and forms
11507 When a key ``matches'', the result is used.
11508
11509 @item @code{nil}
11510 No message archiving will take place.  This is the default.
11511 @end table
11512
11513 Let's illustrate:
11514
11515 Just saving to a single group called @samp{MisK}:
11516 @lisp
11517 (setq gnus-message-archive-group "MisK")
11518 @end lisp
11519
11520 Saving to two groups, @samp{MisK} and @samp{safe}:
11521 @lisp
11522 (setq gnus-message-archive-group '("MisK" "safe"))
11523 @end lisp
11524
11525 Save to different groups based on what group you are in:
11526 @lisp
11527 (setq gnus-message-archive-group
11528       '(("^alt" "sent-to-alt")
11529         ("mail" "sent-to-mail")
11530         (".*" "sent-to-misc")))
11531 @end lisp
11532
11533 More complex stuff:
11534 @lisp
11535 (setq gnus-message-archive-group
11536       '((if (message-news-p)
11537             "misc-news"
11538           "misc-mail")))
11539 @end lisp
11540
11541 How about storing all news messages in one file, but storing all mail
11542 messages in one file per month:
11543
11544 @lisp
11545 (setq gnus-message-archive-group
11546       '((if (message-news-p)
11547             "misc-news"
11548           (concat "mail." (format-time-string "%Y-%m")))))
11549 @end lisp
11550
11551 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11552 @c use a different value for @code{gnus-message-archive-group} there.)
11553
11554 Now, when you send a message off, it will be stored in the appropriate
11555 group.  (If you want to disable storing for just one particular message,
11556 you can just remove the @code{Gcc} header that has been inserted.)  The
11557 archive group will appear in the group buffer the next time you start
11558 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11559 enter it and read the articles in it just like you'd read any other
11560 group.  If the group gets really big and annoying, you can simply rename
11561 if (using @kbd{G r} in the group buffer) to something
11562 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11563 continue to be stored in the old (now empty) group.
11564
11565 That's the default method of archiving sent messages.  Gnus offers a
11566 different way for the people who don't like the default method.  In that
11567 case you should set @code{gnus-message-archive-group} to @code{nil};
11568 this will disable archiving.
11569
11570 @table @code
11571 @item gnus-outgoing-message-group
11572 @vindex gnus-outgoing-message-group
11573 All outgoing messages will be put in this group.  If you want to store
11574 all your outgoing mail and articles in the group @samp{nnml:archive},
11575 you set this variable to that value.  This variable can also be a list of
11576 group names.
11577
11578 If you want to have greater control over what group to put each
11579 message in, you can set this variable to a function that checks the
11580 current newsgroup name and then returns a suitable group name (or list
11581 of names).
11582
11583 This variable can be used instead of @code{gnus-message-archive-group},
11584 but the latter is the preferred method.
11585
11586 @item gnus-gcc-mark-as-read
11587 @vindex gnus-gcc-mark-as-read
11588 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11589
11590 @item gnus-gcc-externalize-attachments
11591 @vindex gnus-gcc-externalize-attachments
11592 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11593 and matches the Gcc group name, attach files as external parts; if it is
11594 @code{all}, attach local files as external parts; if it is other
11595 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11596 changed in the future.
11597
11598 @end table
11599
11600
11601 @node Posting Styles
11602 @section Posting Styles
11603 @cindex posting styles
11604 @cindex styles
11605
11606 All them variables, they make my head swim.
11607
11608 So what if you want a different @code{Organization} and signature based
11609 on what groups you post to?  And you post both from your home machine
11610 and your work machine, and you want different @code{From} lines, and so
11611 on?
11612
11613 @vindex gnus-posting-styles
11614 One way to do stuff like that is to write clever hooks that change the
11615 variables you need to have changed.  That's a bit boring, so somebody
11616 came up with the bright idea of letting the user specify these things in
11617 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11618 variable:
11619
11620 @lisp
11621 ((".*"
11622   (signature "Peace and happiness")
11623   (organization "What me?"))
11624  ("^comp"
11625   (signature "Death to everybody"))
11626  ("comp.emacs.i-love-it"
11627   (organization "Emacs is it")))
11628 @end lisp
11629
11630 As you might surmise from this example, this alist consists of several
11631 @dfn{styles}.  Each style will be applicable if the first element
11632 ``matches'', in some form or other.  The entire alist will be iterated
11633 over, from the beginning towards the end, and each match will be
11634 applied, which means that attributes in later styles that match override
11635 the same attributes in earlier matching styles.  So
11636 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11637 signature and the @samp{What me?} @code{Organization} header.
11638
11639 The first element in each style is called the @code{match}.  If it's a
11640 string, then Gnus will try to regexp match it against the group name.
11641 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11642 will look in the original article for a header whose name is
11643 @var{match} and compare that @var{regexp}.  @var{match} and
11644 @var{regexp} are strings.  (The original article is the one you are
11645 replying or following up to.  If you are not composing a reply or a
11646 followup, then there is nothing to match against.)  If the
11647 @code{match} is a function symbol, that function will be called with
11648 no arguments.  If it's a variable symbol, then the variable will be
11649 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11650 any case, if this returns a non-@code{nil} value, then the style is
11651 said to @dfn{match}.
11652
11653 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11654 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11655 attribute name can be one of:
11656
11657 @itemize @bullet
11658 @item @code{signature}
11659 @item @code{signature-file}
11660 @item @code{x-face-file}
11661 @item @code{address}, overriding @code{user-mail-address}
11662 @item @code{name}, overriding @code{(user-full-name)}
11663 @item @code{body}
11664 @end itemize
11665
11666 The attribute name can also be a string or a symbol.  In that case,
11667 this will be used as a header name, and the value will be inserted in
11668 the headers of the article; if the value is @code{nil}, the header
11669 name will be removed.  If the attribute name is @code{eval}, the form
11670 is evaluated, and the result is thrown away.
11671
11672 The attribute value can be a string (used verbatim), a function with
11673 zero arguments (the return value will be used), a variable (its value
11674 will be used) or a list (it will be @code{eval}ed and the return value
11675 will be used).  The functions and sexps are called/@code{eval}ed in the
11676 message buffer that is being set up.  The headers of the current article
11677 are available through the @code{message-reply-headers} variable, which
11678 is a vector of the following headers: number subject from date id
11679 references chars lines xref extra.
11680
11681 @vindex message-reply-headers
11682
11683 If you wish to check whether the message you are about to compose is
11684 meant to be a news article or a mail message, you can check the values
11685 of the @code{message-news-p} and @code{message-mail-p} functions.
11686
11687 @findex message-mail-p
11688 @findex message-news-p
11689
11690 So here's a new example:
11691
11692 @lisp
11693 (setq gnus-posting-styles
11694       '((".*"
11695          (signature-file "~/.signature")
11696          (name "User Name")
11697          ("X-Home-Page" (getenv "WWW_HOME"))
11698          (organization "People's Front Against MWM"))
11699         ("^rec.humor"
11700          (signature my-funny-signature-randomizer))
11701         ((equal (system-name) "gnarly")  ;; @r{A form}
11702          (signature my-quote-randomizer))
11703         (message-news-p        ;; @r{A function symbol}
11704          (signature my-news-signature))
11705         (window-system         ;; @r{A value symbol}
11706          ("X-Window-System" (format "%s" window-system)))
11707         ;; @r{If I'm replying to Larsi, set the Organization header.}
11708         ((header "from" "larsi.*org")
11709          (Organization "Somewhere, Inc."))
11710         ((posting-from-work-p) ;; @r{A user defined function}
11711          (signature-file "~/.work-signature")
11712          (address "user@@bar.foo")
11713          (body "You are fired.\n\nSincerely, your boss.")
11714          (organization "Important Work, Inc"))
11715         ("nnml:.*"
11716          (From (save-excursion
11717                  (set-buffer gnus-article-buffer)
11718                  (message-fetch-field "to"))))
11719         ("^nn.+:"
11720          (signature-file "~/.mail-signature"))))
11721 @end lisp
11722
11723 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11724 @code{From} address in all your outgoing replies, which might be handy
11725 if you fill many roles.
11726
11727 Setting the @code{gnus-named-posting-styles} variable will make
11728 posting-styles allow to have distinctive names.  You can specify an
11729 arbitrary posting-style when article posting with @kbd{S P} in the
11730 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11731 the names to styles.  Once a posting-style is added to the alist, we can
11732 import it from @code{gnus-posting-styles}.  If an attribute whose name
11733 is @code{import} is found, Gnus will look for the attribute value in
11734 @code{gnus-named-posting-styles} and expand it in place.
11735
11736 Here's an example:
11737
11738 @lisp
11739 (setq gnus-named-posting-styles
11740       '(("Default"
11741          (signature-file "~/.signature")
11742          (name "User Name")
11743          ("X-Home-Page" (getenv "WWW_HOME"))
11744          (organization "People's Front Against MWM"))
11745         ("Emacs"
11746          (import "Default")
11747          (organization "The Church of Emacs"))))
11748 @end lisp
11749
11750 The posting-style named "Emacs" will inherit all the attributes from
11751 "Default" except @code{organization}.
11752
11753
11754 @node Drafts
11755 @section Drafts
11756 @cindex drafts
11757
11758 If you are writing a message (mail or news) and suddenly remember that
11759 you have a steak in the oven (or some pesto in the food processor, you
11760 craaazy vegetarians), you'll probably wish there was a method to save
11761 the message you are writing so that you can continue editing it some
11762 other day, and send it when you feel its finished.
11763
11764 Well, don't worry about it.  Whenever you start composing a message of
11765 some sort using the gnus mail and post commands, the buffer you get will
11766 automatically associate to an article in a special @dfn{draft} group.
11767 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11768 article will be saved there.  (Auto-save files also go to the draft
11769 group.)
11770
11771 @cindex nndraft
11772 @vindex nndraft-directory
11773 The draft group is a special group (which is implemented as an
11774 @code{nndraft} group, if you absolutely have to know) called
11775 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11776 @code{nndraft} is to store its files.  What makes this group special is
11777 that you can't tick any articles in it or mark any articles as
11778 read---all articles in the group are permanently unread.
11779
11780 If the group doesn't exist, it will be created and you'll be subscribed
11781 to it.  The only way to make it disappear from the Group buffer is to
11782 unsubscribe it.  The special properties of the draft group comes from
11783 a group property (@pxref{Group Parameters}), and if lost the group
11784 behaves like any other group.  This means the commands below will not
11785 be available.  To restore the special properties of the group, the
11786 simplest way is to kill the group, using @kbd{C-k}, and restart
11787 Gnus.  The group is automatically created again with the
11788 correct parameters.  The content of the group is not lost.
11789
11790 @c @findex gnus-dissociate-buffer-from-draft
11791 @c @kindex C-c M-d (Mail)
11792 @c @kindex C-c M-d (Post)
11793 @c @findex gnus-associate-buffer-with-draft
11794 @c @kindex C-c C-d (Mail)
11795 @c @kindex C-c C-d (Post)
11796 @c If you're writing some super-secret message that you later want to
11797 @c encode with PGP before sending, you may wish to turn the auto-saving
11798 @c (and association with the draft group) off.  You never know who might be
11799 @c interested in reading all your extremely valuable and terribly horrible
11800 @c and interesting secrets.  The @kbd{C-c M-d}
11801 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11802 @c If you change your mind and want to turn the auto-saving back on again,
11803 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11804 @c
11805 @c @vindex gnus-use-draft
11806 @c To leave association with the draft group off by default, set
11807 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11808
11809 @findex gnus-draft-edit-message
11810 @kindex D e (Draft)
11811 When you want to continue editing the article, you simply enter the
11812 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11813 that.  You will be placed in a buffer where you left off.
11814
11815 Rejected articles will also be put in this draft group (@pxref{Rejected
11816 Articles}).
11817
11818 @findex gnus-draft-send-all-messages
11819 @kindex D s (Draft)
11820 @findex gnus-draft-send-message
11821 @kindex D S (Draft)
11822 If you have lots of rejected messages you want to post (or mail) without
11823 doing further editing, you can use the @kbd{D s} command
11824 (@code{gnus-draft-send-message}).  This command understands the
11825 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11826 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11827 in the buffer.
11828
11829 @findex gnus-draft-toggle-sending
11830 @kindex D t (Draft)
11831 If you have some messages that you wish not to send, you can use the
11832 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11833 as unsendable.  This is a toggling command.
11834
11835
11836 @node Rejected Articles
11837 @section Rejected Articles
11838 @cindex rejected articles
11839
11840 Sometimes a news server will reject an article.  Perhaps the server
11841 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11842 @emph{there be demons}.  Perhaps you have included too much cited text.
11843 Perhaps the disk is full.  Perhaps the server is down.
11844
11845 These situations are, of course, totally beyond the control of gnus.
11846 (Gnus, of course, loves the way you look, always feels great, has angels
11847 fluttering around inside of it, doesn't care about how much cited text
11848 you include, never runs full and never goes down.)  So gnus saves these
11849 articles until some later time when the server feels better.
11850
11851 The rejected articles will automatically be put in a special draft group
11852 (@pxref{Drafts}).  When the server comes back up again, you'd then
11853 typically enter that group and send all the articles off.
11854
11855 @node Signing and encrypting
11856 @section Signing and encrypting
11857 @cindex using gpg
11858 @cindex using s/mime
11859 @cindex using smime
11860
11861 Gnus can digitally sign and encrypt your messages, using vanilla
11862 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11863 decoding such messages, see the @code{mm-verify-option} and
11864 @code{mm-decrypt-option} options (@pxref{Security}).
11865
11866 @vindex gnus-message-replysign
11867 @vindex gnus-message-replyencrypt
11868 @vindex gnus-message-replysignencrypted
11869 Often, you would like to sign replies to people who send you signed
11870 messages.  Even more often, you might want to encrypt messages which
11871 are in reply to encrypted messages.  Gnus offers
11872 @code{gnus-message-replysign} to enable the former, and
11873 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11874 @code{gnus-message-replysignencrypted} (on by default) will sign
11875 automatically encrypted messages.
11876
11877 Instructing @acronym{MML} to perform security operations on a
11878 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
11879 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
11880
11881 @table @kbd
11882
11883 @item C-c C-m s s
11884 @kindex C-c C-m s s
11885 @findex mml-secure-message-sign-smime
11886
11887 Digitally sign current message using @acronym{S/MIME}.
11888
11889 @item C-c C-m s o
11890 @kindex C-c C-m s o
11891 @findex mml-secure-message-sign-pgp
11892
11893 Digitally sign current message using @acronym{PGP}.
11894
11895 @item C-c C-m s p
11896 @kindex C-c C-m s p
11897 @findex mml-secure-message-sign-pgp
11898
11899 Digitally sign current message using @acronym{PGP/MIME}.
11900
11901 @item C-c C-m c s
11902 @kindex C-c C-m c s
11903 @findex mml-secure-message-encrypt-smime
11904
11905 Digitally encrypt current message using @acronym{S/MIME}.
11906
11907 @item C-c C-m c o
11908 @kindex C-c C-m c o
11909 @findex mml-secure-message-encrypt-pgp
11910
11911 Digitally encrypt current message using @acronym{PGP}.
11912
11913 @item C-c C-m c p
11914 @kindex C-c C-m c p
11915 @findex mml-secure-message-encrypt-pgpmime
11916
11917 Digitally encrypt current message using @acronym{PGP/MIME}.
11918
11919 @item C-c C-m C-n
11920 @kindex C-c C-m C-n
11921 @findex mml-unsecure-message
11922 Remove security related @acronym{MML} tags from message.
11923
11924 @end table
11925
11926 @xref{Security, ,Security, message, Message Manual}, for more information.
11927
11928 @node Select Methods
11929 @chapter Select Methods
11930 @cindex foreign groups
11931 @cindex select methods
11932
11933 A @dfn{foreign group} is a group not read by the usual (or
11934 default) means.  It could be, for instance, a group from a different
11935 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11936 personal mail group.
11937
11938 A foreign group (or any group, really) is specified by a @dfn{name} and
11939 a @dfn{select method}.  To take the latter first, a select method is a
11940 list where the first element says what back end to use (e.g. @code{nntp},
11941 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11942 name}.  There may be additional elements in the select method, where the
11943 value may have special meaning for the back end in question.
11944
11945 One could say that a select method defines a @dfn{virtual server}---so
11946 we do just that (@pxref{Server Buffer}).
11947
11948 The @dfn{name} of the group is the name the back end will recognize the
11949 group as.
11950
11951 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11952 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11953 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11954 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11955 back end just knows this group as @samp{soc.motss}.
11956
11957 The different methods all have their peculiarities, of course.
11958
11959 @menu
11960 * Server Buffer::               Making and editing virtual servers.
11961 * Getting News::                Reading USENET news with Gnus.
11962 * Getting Mail::                Reading your personal mail with Gnus.
11963 * Browsing the Web::            Getting messages from a plethora of Web sources.
11964 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11965 * Other Sources::               Reading directories, files, SOUP packets.
11966 * Combined Groups::             Combining groups into one group.
11967 * Gnus Unplugged::              Reading news and mail offline.
11968 @end menu
11969
11970
11971 @node Server Buffer
11972 @section Server Buffer
11973
11974 Traditionally, a @dfn{server} is a machine or a piece of software that
11975 one connects to, and then requests information from.  Gnus does not
11976 connect directly to any real servers, but does all transactions through
11977 one back end or other.  But that's just putting one layer more between
11978 the actual media and Gnus, so we might just as well say that each
11979 back end represents a virtual server.
11980
11981 For instance, the @code{nntp} back end may be used to connect to several
11982 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11983 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11984 use, and what parameters to set by specifying a @dfn{select method}.
11985
11986 These select method specifications can sometimes become quite
11987 complicated---say, for instance, that you want to read from the
11988 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11989 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11990 Anyway, if you had to specify that for each group that used this
11991 server, that would be too much work, so Gnus offers a way of naming
11992 select methods, which is what you do in the server buffer.
11993
11994 To enter the server buffer, use the @kbd{^}
11995 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11996
11997 @menu
11998 * Server Buffer Format::        You can customize the look of this buffer.
11999 * Server Commands::             Commands to manipulate servers.
12000 * Example Methods::             Examples server specifications.
12001 * Creating a Virtual Server::   An example session.
12002 * Server Variables::            Which variables to set.
12003 * Servers and Methods::         You can use server names as select methods.
12004 * Unavailable Servers::         Some servers you try to contact may be down.
12005 @end menu
12006
12007 @vindex gnus-server-mode-hook
12008 @code{gnus-server-mode-hook} is run when creating the server buffer.
12009
12010
12011 @node Server Buffer Format
12012 @subsection Server Buffer Format
12013 @cindex server buffer format
12014
12015 @vindex gnus-server-line-format
12016 You can change the look of the server buffer lines by changing the
12017 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12018 variable, with some simple extensions:
12019
12020 @table @samp
12021
12022 @item h
12023 How the news is fetched---the back end name.
12024
12025 @item n
12026 The name of this server.
12027
12028 @item w
12029 Where the news is to be fetched from---the address.
12030
12031 @item s
12032 The opened/closed/denied status of the server.
12033 @end table
12034
12035 @vindex gnus-server-mode-line-format
12036 The mode line can also be customized by using the
12037 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12038 Formatting}).  The following specs are understood:
12039
12040 @table @samp
12041 @item S
12042 Server name.
12043
12044 @item M
12045 Server method.
12046 @end table
12047
12048 Also @pxref{Formatting Variables}.
12049
12050
12051 @node Server Commands
12052 @subsection Server Commands
12053 @cindex server commands
12054
12055 @table @kbd
12056
12057 @item a
12058 @kindex a (Server)
12059 @findex gnus-server-add-server
12060 Add a new server (@code{gnus-server-add-server}).
12061
12062 @item e
12063 @kindex e (Server)
12064 @findex gnus-server-edit-server
12065 Edit a server (@code{gnus-server-edit-server}).
12066
12067 @item SPACE
12068 @kindex SPACE (Server)
12069 @findex gnus-server-read-server
12070 Browse the current server (@code{gnus-server-read-server}).
12071
12072 @item q
12073 @kindex q (Server)
12074 @findex gnus-server-exit
12075 Return to the group buffer (@code{gnus-server-exit}).
12076
12077 @item k
12078 @kindex k (Server)
12079 @findex gnus-server-kill-server
12080 Kill the current server (@code{gnus-server-kill-server}).
12081
12082 @item y
12083 @kindex y (Server)
12084 @findex gnus-server-yank-server
12085 Yank the previously killed server (@code{gnus-server-yank-server}).
12086
12087 @item c
12088 @kindex c (Server)
12089 @findex gnus-server-copy-server
12090 Copy the current server (@code{gnus-server-copy-server}).
12091
12092 @item l
12093 @kindex l (Server)
12094 @findex gnus-server-list-servers
12095 List all servers (@code{gnus-server-list-servers}).
12096
12097 @item s
12098 @kindex s (Server)
12099 @findex gnus-server-scan-server
12100 Request that the server scan its sources for new articles
12101 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12102 servers.
12103
12104 @item g
12105 @kindex g (Server)
12106 @findex gnus-server-regenerate-server
12107 Request that the server regenerate all its data structures
12108 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12109 a mail back end that has gotten out of sync.
12110
12111 @end table
12112
12113
12114 @node Example Methods
12115 @subsection Example Methods
12116
12117 Most select methods are pretty simple and self-explanatory:
12118
12119 @lisp
12120 (nntp "news.funet.fi")
12121 @end lisp
12122
12123 Reading directly from the spool is even simpler:
12124
12125 @lisp
12126 (nnspool "")
12127 @end lisp
12128
12129 As you can see, the first element in a select method is the name of the
12130 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12131 will.
12132
12133 After these two elements, there may be an arbitrary number of
12134 @code{(@var{variable} @var{form})} pairs.
12135
12136 To go back to the first example---imagine that you want to read from
12137 port 15 on that machine.  This is what the select method should
12138 look like then:
12139
12140 @lisp
12141 (nntp "news.funet.fi" (nntp-port-number 15))
12142 @end lisp
12143
12144 You should read the documentation to each back end to find out what
12145 variables are relevant, but here's an @code{nnmh} example:
12146
12147 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12148 you have two structures that you wish to access: One is your private
12149 mail spool, and the other is a public one.  Here's the possible spec for
12150 your private mail:
12151
12152 @lisp
12153 (nnmh "private" (nnmh-directory "~/private/mail/"))
12154 @end lisp
12155
12156 (This server is then called @samp{private}, but you may have guessed
12157 that.)
12158
12159 Here's the method for a public spool:
12160
12161 @lisp
12162 (nnmh "public"
12163       (nnmh-directory "/usr/information/spool/")
12164       (nnmh-get-new-mail nil))
12165 @end lisp
12166
12167 @cindex proxy
12168 @cindex firewall
12169
12170 If you are behind a firewall and only have access to the @acronym{NNTP}
12171 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12172 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12173 Doing this can be rather fiddly, but your virtual server definition
12174 should probably look something like this:
12175
12176 @lisp
12177 (nntp "firewall"
12178       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12179       (nntp-via-address "the.firewall.machine")
12180       (nntp-address "the.real.nntp.host")
12181       (nntp-end-of-line "\n"))
12182 @end lisp
12183
12184 If you want to use the wonderful @code{ssh} program to provide a
12185 compressed connection over the modem line, you could add the following
12186 configuration to the example above:
12187
12188 @lisp
12189       (nntp-via-rlogin-command "ssh")
12190 @end lisp
12191
12192 See also @code{nntp-via-rlogin-command-switches}.
12193
12194 If you're behind a firewall, but have direct access to the outside world
12195 through a wrapper command like "runsocks", you could open a socksified
12196 telnet connection to the news server as follows:
12197
12198 @lisp
12199 (nntp "outside"
12200       (nntp-pre-command "runsocks")
12201       (nntp-open-connection-function nntp-open-via-telnet)
12202       (nntp-address "the.news.server")
12203       (nntp-end-of-line "\n"))
12204 @end lisp
12205
12206 This means that you have to have set up @code{ssh-agent} correctly to
12207 provide automatic authorization, of course.  And to get a compressed
12208 connection, you have to have the @samp{Compression} option in the
12209 @code{ssh} @file{config} file.
12210
12211
12212 @node Creating a Virtual Server
12213 @subsection Creating a Virtual Server
12214
12215 If you're saving lots of articles in the cache by using persistent
12216 articles, you may want to create a virtual server to read the cache.
12217
12218 First you need to add a new server.  The @kbd{a} command does that.  It
12219 would probably be best to use @code{nnml} to read the cache.  You
12220 could also use @code{nnspool} or @code{nnmh}, though.
12221
12222 Type @kbd{a nnml RET cache RET}.
12223
12224 You should now have a brand new @code{nnml} virtual server called
12225 @samp{cache}.  You now need to edit it to have the right definitions.
12226 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12227 will contain the following:
12228
12229 @lisp
12230 (nnml "cache")
12231 @end lisp
12232
12233 Change that to:
12234
12235 @lisp
12236 (nnml "cache"
12237          (nnml-directory "~/News/cache/")
12238          (nnml-active-file "~/News/cache/active"))
12239 @end lisp
12240
12241 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12242 @kbd{RET} over this virtual server, you should be entered into a browse
12243 buffer, and you should be able to enter any of the groups displayed.
12244
12245
12246 @node Server Variables
12247 @subsection Server Variables
12248 @cindex server variables
12249 @cindex server parameters
12250
12251 One sticky point when defining variables (both on back ends and in Emacs
12252 in general) is that some variables are typically initialized from other
12253 variables when the definition of the variables is being loaded.  If you
12254 change the ``base'' variable after the variables have been loaded, you
12255 won't change the ``derived'' variables.
12256
12257 This typically affects directory and file variables.  For instance,
12258 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12259 directory variables are initialized from that variable, so
12260 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12261 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12262 @code{nnml-directory}---you have to explicitly set all the file
12263 variables to be what you want them to be.  For a complete list of
12264 variables for each back end, see each back end's section later in this
12265 manual, but here's an example @code{nnml} definition:
12266
12267 @lisp
12268 (nnml "public"
12269       (nnml-directory "~/my-mail/")
12270       (nnml-active-file "~/my-mail/active")
12271       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12272 @end lisp
12273
12274 Server variables are often called @dfn{server parameters}.
12275
12276 @node Servers and Methods
12277 @subsection Servers and Methods
12278
12279 Wherever you would normally use a select method
12280 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12281 when browsing a foreign server) you can use a virtual server name
12282 instead.  This could potentially save lots of typing.  And it's nice all
12283 over.
12284
12285
12286 @node Unavailable Servers
12287 @subsection Unavailable Servers
12288
12289 If a server seems to be unreachable, Gnus will mark that server as
12290 @code{denied}.  That means that any subsequent attempt to make contact
12291 with that server will just be ignored.  ``It can't be opened,'' Gnus
12292 will tell you, without making the least effort to see whether that is
12293 actually the case or not.
12294
12295 That might seem quite naughty, but it does make sense most of the time.
12296 Let's say you have 10 groups subscribed to on server
12297 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12298 away from you and the machine is quite slow, so it takes 1 minute just
12299 to find out that it refuses connection to you today.  If Gnus were to
12300 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12301 attempt to do that.  Once it has gotten a single ``connection refused'',
12302 it will regard that server as ``down''.
12303
12304 So, what happens if the machine was only feeling unwell temporarily?
12305 How do you test to see whether the machine has come up again?
12306
12307 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12308 with the following commands:
12309
12310 @table @kbd
12311
12312 @item O
12313 @kindex O (Server)
12314 @findex gnus-server-open-server
12315 Try to establish connection to the server on the current line
12316 (@code{gnus-server-open-server}).
12317
12318 @item C
12319 @kindex C (Server)
12320 @findex gnus-server-close-server
12321 Close the connection (if any) to the server
12322 (@code{gnus-server-close-server}).
12323
12324 @item D
12325 @kindex D (Server)
12326 @findex gnus-server-deny-server
12327 Mark the current server as unreachable
12328 (@code{gnus-server-deny-server}).
12329
12330 @item M-o
12331 @kindex M-o (Server)
12332 @findex gnus-server-open-all-servers
12333 Open the connections to all servers in the buffer
12334 (@code{gnus-server-open-all-servers}).
12335
12336 @item M-c
12337 @kindex M-c (Server)
12338 @findex gnus-server-close-all-servers
12339 Close the connections to all servers in the buffer
12340 (@code{gnus-server-close-all-servers}).
12341
12342 @item R
12343 @kindex R (Server)
12344 @findex gnus-server-remove-denials
12345 Remove all marks to whether Gnus was denied connection from any servers
12346 (@code{gnus-server-remove-denials}).
12347
12348 @item L
12349 @kindex L (Server)
12350 @findex gnus-server-offline-server
12351 Set server status to offline (@code{gnus-server-offline-server}).
12352
12353 @end table
12354
12355
12356 @node Getting News
12357 @section Getting News
12358 @cindex reading news
12359 @cindex news back ends
12360
12361 A newsreader is normally used for reading news.  Gnus currently provides
12362 only two methods of getting news---it can read from an @acronym{NNTP} server,
12363 or it can read from a local spool.
12364
12365 @menu
12366 * NNTP::                        Reading news from an @acronym{NNTP} server.
12367 * News Spool::                  Reading news from the local spool.
12368 @end menu
12369
12370
12371 @node NNTP
12372 @subsection NNTP
12373 @cindex nntp
12374
12375 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12376 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12377 server as the, uhm, address.
12378
12379 If the @acronym{NNTP} server is located at a non-standard port, setting the
12380 third element of the select method to this port number should allow you
12381 to connect to the right port.  You'll have to edit the group info for
12382 that (@pxref{Foreign Groups}).
12383
12384 The name of the foreign group can be the same as a native group.  In
12385 fact, you can subscribe to the same group from as many different servers
12386 you feel like.  There will be no name collisions.
12387
12388 The following variables can be used to create a virtual @code{nntp}
12389 server:
12390
12391 @table @code
12392
12393 @item nntp-server-opened-hook
12394 @vindex nntp-server-opened-hook
12395 @cindex @sc{mode reader}
12396 @cindex authinfo
12397 @cindex authentification
12398 @cindex nntp authentification
12399 @findex nntp-send-authinfo
12400 @findex nntp-send-mode-reader
12401 is run after a connection has been made.  It can be used to send
12402 commands to the @acronym{NNTP} server after it has been contacted.  By
12403 default it sends the command @code{MODE READER} to the server with the
12404 @code{nntp-send-mode-reader} function.  This function should always be
12405 present in this hook.
12406
12407 @item nntp-authinfo-function
12408 @vindex nntp-authinfo-function
12409 @findex nntp-send-authinfo
12410 @vindex nntp-authinfo-file
12411 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12412 server.  The default function is @code{nntp-send-authinfo}, which looks
12413 through your @file{~/.authinfo} (or whatever you've set the
12414 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12415 are found, it will prompt you for a login name and a password.  The
12416 format of the @file{~/.authinfo} file is (almost) the same as the
12417 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12418 manual page, but here are the salient facts:
12419
12420 @enumerate
12421 @item
12422 The file contains one or more line, each of which define one server.
12423
12424 @item
12425 Each line may contain an arbitrary number of token/value pairs.
12426
12427 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12428 @samp{default}.  In addition Gnus introduces two new tokens, not present
12429 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12430 @samp{force}.  (This is the only way the @file{.authinfo} file format
12431 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12432 indicate what port on the server the credentials apply to and
12433 @samp{force} is explained below.
12434
12435 @end enumerate
12436
12437 Here's an example file:
12438
12439 @example
12440 machine news.uio.no login larsi password geheimnis
12441 machine nntp.ifi.uio.no login larsi force yes
12442 @end example
12443
12444 The token/value pairs may appear in any order; @samp{machine} doesn't
12445 have to be first, for instance.
12446
12447 In this example, both login name and password have been supplied for the
12448 former server, while the latter has only the login name listed, and the
12449 user will be prompted for the password.  The latter also has the
12450 @samp{force} tag, which means that the authinfo will be sent to the
12451 @var{nntp} server upon connection; the default (i.e., when there is not
12452 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12453 until the @var{nntp} server asks for it.
12454
12455 You can also add @samp{default} lines that will apply to all servers
12456 that don't have matching @samp{machine} lines.
12457
12458 @example
12459 default force yes
12460 @end example
12461
12462 This will force sending @samp{AUTHINFO} commands to all servers not
12463 previously mentioned.
12464
12465 Remember to not leave the @file{~/.authinfo} file world-readable.
12466
12467 @item nntp-server-action-alist
12468 @vindex nntp-server-action-alist
12469 This is a list of regexps to match on server types and actions to be
12470 taken when matches are made.  For instance, if you want Gnus to beep
12471 every time you connect to innd, you could say something like:
12472
12473 @lisp
12474 (setq nntp-server-action-alist
12475       '(("innd" (ding))))
12476 @end lisp
12477
12478 You probably don't want to do that, though.
12479
12480 The default value is
12481
12482 @lisp
12483 '(("nntpd 1\\.5\\.11t"
12484    (remove-hook 'nntp-server-opened-hook
12485                 'nntp-send-mode-reader)))
12486 @end lisp
12487
12488 This ensures that Gnus doesn't send the @code{MODE READER} command to
12489 nntpd 1.5.11t, since that command chokes that server, I've been told.
12490
12491 @item nntp-maximum-request
12492 @vindex nntp-maximum-request
12493 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12494 will collect headers by sending a series of @code{head} commands.  To
12495 speed things up, the back end sends lots of these commands without
12496 waiting for reply, and then reads all the replies.  This is controlled
12497 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12498 your network is buggy, you should set this to 1.
12499
12500 @item nntp-connection-timeout
12501 @vindex nntp-connection-timeout
12502 If you have lots of foreign @code{nntp} groups that you connect to
12503 regularly, you're sure to have problems with @acronym{NNTP} servers not
12504 responding properly, or being too loaded to reply within reasonable
12505 time.  This is can lead to awkward problems, which can be helped
12506 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12507 that says how many seconds the @code{nntp} back end should wait for a
12508 connection before giving up.  If it is @code{nil}, which is the default,
12509 no timeouts are done.
12510
12511 @c @item nntp-command-timeout
12512 @c @vindex nntp-command-timeout
12513 @c @cindex PPP connections
12514 @c @cindex dynamic IP addresses
12515 @c If you're running Gnus on a machine that has a dynamically assigned
12516 @c address, Gnus may become confused.  If the address of your machine
12517 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12518 @c waiting forever for replies from the server.  To help with this
12519 @c unfortunate problem, you can set this command to a number.  Gnus will
12520 @c then, if it sits waiting for a reply from the server longer than that
12521 @c number of seconds, shut down the connection, start a new one, and resend
12522 @c the command.  This should hopefully be transparent to the user.  A
12523 @c likely number is 30 seconds.
12524 @c
12525 @c @item nntp-retry-on-break
12526 @c @vindex nntp-retry-on-break
12527 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12528 @c hangs.  This will have much the same effect as the command timeout
12529 @c described above.
12530
12531 @item nntp-server-hook
12532 @vindex nntp-server-hook
12533 This hook is run as the last step when connecting to an @acronym{NNTP}
12534 server.
12535
12536 @item nntp-buggy-select
12537 @vindex nntp-buggy-select
12538 Set this to non-@code{nil} if your select routine is buggy.
12539
12540 @item nntp-nov-is-evil
12541 @vindex nntp-nov-is-evil
12542 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12543 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12544 can be used.
12545
12546 @item nntp-xover-commands
12547 @vindex nntp-xover-commands
12548 @cindex @acronym{NOV}
12549 @cindex XOVER
12550 List of strings used as commands to fetch @acronym{NOV} lines from a
12551 server.  The default value of this variable is @code{("XOVER"
12552 "XOVERVIEW")}.
12553
12554 @item nntp-nov-gap
12555 @vindex nntp-nov-gap
12556 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12557 the server.  The server responds with one huge list of lines.  However,
12558 if you have read articles 2-5000 in the group, and only want to read
12559 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12560 lines that you will not need.  This variable says how
12561 big a gap between two consecutive articles is allowed to be before the
12562 @code{XOVER} request is split into several request.  Note that if your
12563 network is fast, setting this variable to a really small number means
12564 that fetching will probably be slower.  If this variable is @code{nil},
12565 @code{nntp} will never split requests.  The default is 5.
12566
12567 @item nntp-prepare-server-hook
12568 @vindex nntp-prepare-server-hook
12569 A hook run before attempting to connect to an @acronym{NNTP} server.
12570
12571 @item nntp-warn-about-losing-connection
12572 @vindex nntp-warn-about-losing-connection
12573 If this variable is non-@code{nil}, some noise will be made when a
12574 server closes connection.
12575
12576 @item nntp-record-commands
12577 @vindex nntp-record-commands
12578 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12579 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12580 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12581 that doesn't seem to work.
12582
12583 @item nntp-open-connection-function
12584 @vindex nntp-open-connection-function
12585 It is possible to customize how the connection to the nntp server will
12586 be opened.  If you specify an @code{nntp-open-connection-function}
12587 parameter, Gnus will use that function to establish the connection.
12588 Five pre-made functions are supplied.  These functions can be grouped in
12589 two categories: direct connection functions (three pre-made), and
12590 indirect ones (two pre-made).
12591
12592 @item nntp-prepare-post-hook
12593 @vindex nntp-prepare-post-hook
12594 A hook run just before posting an article.  If there is no
12595 @code{Message-ID} header in the article and the news server provides the
12596 recommended ID, it will be added to the article before running this
12597 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12598 inhibit Gnus to add a @code{Message-ID} header, you could say:
12599
12600 @lisp
12601 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12602 @end lisp
12603
12604 Note that not all servers support the recommended ID.  This works for
12605 INN versions 2.3.0 and later, for instance.
12606
12607 @item nntp-read-timeout
12608 @vindex nntp-read-timeout
12609 How long nntp should wait between checking for the end of output.
12610 Shorter values mean quicker response, but is more CPU intensive.  The
12611 default is 0.1 seconds.  If you have a slow line to the server (and
12612 don't like to see Emacs eat your available CPU power), you might set
12613 this to, say, 1.
12614
12615 @item nntp-list-options
12616 @vindex nntp-list-options
12617 List of newsgroup name used for a option of the LIST command to restrict
12618 the listing output to only the specified newsgroups.  Each newsgroup name
12619 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12620 etc.  Fortunately, if the server can accept such a option, it will
12621 probably make gnus run faster.  You may use it as a server variable as
12622 follows:
12623
12624 @lisp
12625 (setq gnus-select-method
12626       '(nntp "news.somewhere.edu"
12627              (nntp-list-options ("fj.*" "japan.*"))))
12628 @end lisp
12629
12630 @item nntp-options-subscribe
12631 @vindex nntp-options-subscribe
12632 Regexp matching the newsgroup names which will be subscribed
12633 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12634 It may be effective as well as @code{nntp-list-options} even though the
12635 server could not accept a shell-style wildcard as a option of the LIST
12636 command.  You may use it as a server variable as follows:
12637
12638 @lisp
12639 (setq gnus-select-method
12640       '(nntp "news.somewhere.edu"
12641              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12642 @end lisp
12643
12644 @item nntp-options-not-subscribe
12645 @vindex nntp-options-not-subscribe
12646 Regexp matching the newsgroup names which will not be subscribed
12647 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12648 It may be effective as well as @code{nntp-list-options} even though the
12649 server could not accept a shell-style wildcard as a option of the LIST
12650 command.  You may use it as a server variable as follows:
12651
12652 @lisp
12653 (setq gnus-select-method
12654       '(nntp "news.somewhere.edu"
12655              (nntp-options-not-subscribe "\\.binaries\\.")))
12656 @end lisp
12657 @end table
12658
12659 @menu
12660 * Direct Functions::            Connecting directly to the server.
12661 * Indirect Functions::          Connecting indirectly to the server.
12662 * Common Variables::            Understood by several connection functions.
12663 @end menu
12664
12665
12666 @node Direct Functions
12667 @subsubsection Direct Functions
12668 @cindex direct connection functions
12669
12670 These functions are called direct because they open a direct connection
12671 between your machine and the @acronym{NNTP} server.  The behavior of these
12672 functions is also affected by commonly understood variables
12673 (@pxref{Common Variables}).
12674
12675 @table @code
12676 @findex nntp-open-network-stream
12677 @item nntp-open-network-stream
12678 This is the default, and simply connects to some port or other on the
12679 remote system.
12680
12681 @findex nntp-open-tls-stream
12682 @item nntp-open-tls-stream
12683 Opens a connection to a server over a @dfn{secure} channel.  To use
12684 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12685 installed.  You then define a server as follows:
12686
12687 @lisp
12688 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12689 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12690 ;;
12691 (nntp "snews.bar.com"
12692       (nntp-open-connection-function nntp-open-tls-stream)
12693       (nntp-port-number )
12694       (nntp-address "snews.bar.com"))
12695 @end lisp
12696
12697 @findex nntp-open-ssl-stream
12698 @item nntp-open-ssl-stream
12699 Opens a connection to a server over a @dfn{secure} channel.  To use
12700 this you must have @uref{http://www.openssl.org, OpenSSL} or
12701 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12702 then define a server as follows:
12703
12704 @lisp
12705 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12706 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12707 ;;
12708 (nntp "snews.bar.com"
12709       (nntp-open-connection-function nntp-open-ssl-stream)
12710       (nntp-port-number 563)
12711       (nntp-address "snews.bar.com"))
12712 @end lisp
12713
12714 @findex nntp-open-telnet-stream
12715 @item nntp-open-telnet-stream
12716 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12717 it.  You might wonder why this function exists, since we have the
12718 default @code{nntp-open-network-stream} which would do the job.  (One
12719 of) the reason(s) is that if you are behind a firewall but have direct
12720 connections to the outside world thanks to a command wrapper like
12721 @code{runsocks}, you can use it like this:
12722
12723 @lisp
12724 (nntp "socksified"
12725       (nntp-pre-command "runsocks")
12726       (nntp-open-connection-function nntp-open-telnet-stream)
12727       (nntp-address "the.news.server"))
12728 @end lisp
12729
12730 With the default method, you would need to wrap your whole Emacs
12731 session, which is not a good idea.
12732 @end table
12733
12734
12735 @node Indirect Functions
12736 @subsubsection Indirect Functions
12737 @cindex indirect connection functions
12738
12739 These functions are called indirect because they connect to an
12740 intermediate host before actually connecting to the @acronym{NNTP} server.
12741 All of these functions and related variables are also said to belong to
12742 the ``via'' family of connection: they're all prefixed with ``via'' to make
12743 things cleaner.  The behavior of these functions is also affected by
12744 commonly understood variables (@pxref{Common Variables}).
12745
12746 @table @code
12747 @item nntp-open-via-rlogin-and-telnet
12748 @findex nntp-open-via-rlogin-and-telnet
12749 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12750 to the real @acronym{NNTP} server from there.  This is useful for instance if
12751 you need to connect to a firewall machine first.
12752
12753 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12754
12755 @table @code
12756 @item nntp-via-rlogin-command
12757 @vindex nntp-via-rlogin-command
12758 Command used to log in on the intermediate host.  The default is
12759 @samp{rsh}, but @samp{ssh} is a popular alternative.
12760
12761 @item nntp-via-rlogin-command-switches
12762 @vindex nntp-via-rlogin-command-switches
12763 List of strings to be used as the switches to
12764 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12765 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12766 @samp{("-C")} in order to compress all data connections, otherwise set
12767 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12768 the telnet command requires a pseudo-tty allocation on an intermediate
12769 host.
12770 @end table
12771
12772 @item nntp-open-via-telnet-and-telnet
12773 @findex nntp-open-via-telnet-and-telnet
12774 Does essentially the same, but uses @samp{telnet} instead of
12775 @samp{rlogin} to connect to the intermediate host.
12776
12777 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12778
12779 @table @code
12780 @item nntp-via-telnet-command
12781 @vindex nntp-via-telnet-command
12782 Command used to @code{telnet} the intermediate host.  The default is
12783 @samp{telnet}.
12784
12785 @item nntp-via-telnet-switches
12786 @vindex nntp-via-telnet-switches
12787 List of strings to be used as the switches to the
12788 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12789
12790 @item nntp-via-user-password
12791 @vindex nntp-via-user-password
12792 Password to use when logging in on the intermediate host.
12793
12794 @item nntp-via-envuser
12795 @vindex nntp-via-envuser
12796 If non-@code{nil}, the intermediate @code{telnet} session (client and
12797 server both) will support the @code{ENVIRON} option and not prompt for
12798 login name.  This works for Solaris @code{telnet}, for instance.
12799
12800 @item nntp-via-shell-prompt
12801 @vindex nntp-via-shell-prompt
12802 Regexp matching the shell prompt on the intermediate host.  The default
12803 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12804
12805 @end table
12806
12807 @end table
12808
12809
12810 Here are some additional variables that are understood by all the above
12811 functions:
12812
12813 @table @code
12814
12815 @item nntp-via-user-name
12816 @vindex nntp-via-user-name
12817 User name to use when connecting to the intermediate host.
12818
12819 @item nntp-via-address
12820 @vindex nntp-via-address
12821 Address of the intermediate host to connect to.
12822
12823 @end table
12824
12825
12826 @node Common Variables
12827 @subsubsection Common Variables
12828
12829 The following variables affect the behavior of all, or several of the
12830 pre-made connection functions.  When not specified, all functions are
12831 affected.
12832
12833 @table @code
12834
12835 @item nntp-pre-command
12836 @vindex nntp-pre-command
12837 A command wrapper to use when connecting through a non native
12838 connection function (all except @code{nntp-open-network-stream},
12839 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12840 where you would put a @samp{SOCKS} wrapper for instance.
12841
12842 @item nntp-address
12843 @vindex nntp-address
12844 The address of the @acronym{NNTP} server.
12845
12846 @item nntp-port-number
12847 @vindex nntp-port-number
12848 Port number to connect to the @acronym{NNTP} server.  The default is
12849 @samp{nntp}.  If you use @acronym{NNTP} over
12850 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
12851 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12852 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12853 not work with named ports.
12854
12855 @item nntp-end-of-line
12856 @vindex nntp-end-of-line
12857 String to use as end-of-line marker when talking to the @acronym{NNTP}
12858 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12859 using a non native connection function.
12860
12861 @item nntp-telnet-command
12862 @vindex nntp-telnet-command
12863 Command to use when connecting to the @acronym{NNTP} server through
12864 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12865 just for the real @acronym{NNTP} server.  The default is
12866 @samp{telnet}.
12867
12868 @item nntp-telnet-switches
12869 @vindex nntp-telnet-switches
12870 A list of switches to pass to @code{nntp-telnet-command}.  The default
12871 is @samp{("-8")}.
12872
12873 @end table
12874
12875
12876 @node News Spool
12877 @subsection News Spool
12878 @cindex nnspool
12879 @cindex news spool
12880
12881 Subscribing to a foreign group from the local spool is extremely easy,
12882 and might be useful, for instance, to speed up reading groups that
12883 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12884 instance.
12885
12886 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12887 anything else) as the address.
12888
12889 If you have access to a local spool, you should probably use that as the
12890 native select method (@pxref{Finding the News}).  It is normally faster
12891 than using an @code{nntp} select method, but might not be.  It depends.
12892 You just have to try to find out what's best at your site.
12893
12894 @table @code
12895
12896 @item nnspool-inews-program
12897 @vindex nnspool-inews-program
12898 Program used to post an article.
12899
12900 @item nnspool-inews-switches
12901 @vindex nnspool-inews-switches
12902 Parameters given to the inews program when posting an article.
12903
12904 @item nnspool-spool-directory
12905 @vindex nnspool-spool-directory
12906 Where @code{nnspool} looks for the articles.  This is normally
12907 @file{/usr/spool/news/}.
12908
12909 @item nnspool-nov-directory
12910 @vindex nnspool-nov-directory
12911 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12912 @file{/usr/spool/news/over.view/}.
12913
12914 @item nnspool-lib-dir
12915 @vindex nnspool-lib-dir
12916 Where the news lib dir is (@file{/usr/lib/news/} by default).
12917
12918 @item nnspool-active-file
12919 @vindex nnspool-active-file
12920 The name of the active file.
12921
12922 @item nnspool-newsgroups-file
12923 @vindex nnspool-newsgroups-file
12924 The name of the group descriptions file.
12925
12926 @item nnspool-history-file
12927 @vindex nnspool-history-file
12928 The name of the news history file.
12929
12930 @item nnspool-active-times-file
12931 @vindex nnspool-active-times-file
12932 The name of the active date file.
12933
12934 @item nnspool-nov-is-evil
12935 @vindex nnspool-nov-is-evil
12936 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12937 that it finds.
12938
12939 @item nnspool-sift-nov-with-sed
12940 @vindex nnspool-sift-nov-with-sed
12941 @cindex sed
12942 If non-@code{nil}, which is the default, use @code{sed} to get the
12943 relevant portion from the overview file.  If @code{nil},
12944 @code{nnspool} will load the entire file into a buffer and process it
12945 there.
12946
12947 @end table
12948
12949
12950 @node Getting Mail
12951 @section Getting Mail
12952 @cindex reading mail
12953 @cindex mail
12954
12955 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12956 course.
12957
12958 @menu
12959 * Mail in a Newsreader::        Important introductory notes.
12960 * Getting Started Reading Mail::  A simple cookbook example.
12961 * Splitting Mail::              How to create mail groups.
12962 * Mail Sources::                How to tell Gnus where to get mail from.
12963 * Mail Back End Variables::     Variables for customizing mail handling.
12964 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12965 * Group Mail Splitting::        Use group customize to drive mail splitting.
12966 * Incorporating Old Mail::      What about the old mail you have?
12967 * Expiring Mail::               Getting rid of unwanted mail.
12968 * Washing Mail::                Removing cruft from the mail you get.
12969 * Duplicates::                  Dealing with duplicated mail.
12970 * Not Reading Mail::            Using mail back ends for reading other files.
12971 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12972 @end menu
12973
12974
12975 @node Mail in a Newsreader
12976 @subsection Mail in a Newsreader
12977
12978 If you are used to traditional mail readers, but have decided to switch
12979 to reading mail with Gnus, you may find yourself experiencing something
12980 of a culture shock.
12981
12982 Gnus does not behave like traditional mail readers.  If you want to make
12983 it behave that way, you can, but it's an uphill battle.
12984
12985 Gnus, by default, handles all its groups using the same approach.  This
12986 approach is very newsreaderly---you enter a group, see the new/unread
12987 messages, and when you read the messages, they get marked as read, and
12988 you don't see them any more.  (Unless you explicitly ask for them.)
12989
12990 In particular, you do not do anything explicitly to delete messages.
12991
12992 Does this mean that all the messages that have been marked as read are
12993 deleted?  How awful!
12994
12995 But, no, it means that old messages are @dfn{expired} according to some
12996 scheme or other.  For news messages, the expire process is controlled by
12997 the news administrator; for mail, the expire process is controlled by
12998 you.  The expire process for mail is covered in depth in @ref{Expiring
12999 Mail}.
13000
13001 What many Gnus users find, after using it a while for both news and
13002 mail, is that the transport mechanism has very little to do with how
13003 they want to treat a message.
13004
13005 Many people subscribe to several mailing lists.  These are transported
13006 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
13007 answering, or even reading these messages very carefully.  We may not
13008 need to save them because if we should need to read one again, they are
13009 archived somewhere else.
13010
13011 Some people have local news groups which have only a handful of readers.
13012 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
13013 to read and answer a large fraction of the messages very carefully in
13014 order to do our work.  And there may not be an archive, so we may need
13015 to save the interesting messages the same way we would personal mail.
13016
13017 The important distinction turns out to be not the transport mechanism,
13018 but other factors such as how interested we are in the subject matter,
13019 or how easy it is to retrieve the message if we need to read it again.
13020
13021 Gnus provides many options for sorting mail into ``groups'' which behave
13022 like newsgroups, and for treating each group (whether mail or news)
13023 differently.
13024
13025 Some users never get comfortable using the Gnus (ahem) paradigm and wish
13026 that Gnus should grow up and be a male, er, mail reader.  It is possible
13027 to whip Gnus into a more mailreaderly being, but, as said before, it's
13028 not easy.  People who prefer proper mail readers should try @sc{vm}
13029 instead, which is an excellent, and proper, mail reader.
13030
13031 I don't mean to scare anybody off, but I want to make it clear that you
13032 may be required to learn a new way of thinking about messages.  After
13033 you've been subjected to The Gnus Way, you will come to love it.  I can
13034 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13035 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13036 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13037 You Do.)
13038
13039
13040 @node Getting Started Reading Mail
13041 @subsection Getting Started Reading Mail
13042
13043 It's quite easy to use Gnus to read your new mail.  You just plonk the
13044 mail back end of your choice into @code{gnus-secondary-select-methods},
13045 and things will happen automatically.
13046
13047 For instance, if you want to use @code{nnml} (which is a ``one file per
13048 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13049
13050 @lisp
13051 (setq gnus-secondary-select-methods '((nnml "")))
13052 @end lisp
13053
13054 Now, the next time you start Gnus, this back end will be queried for new
13055 articles, and it will move all the messages in your spool file to its
13056 directory, which is @file{~/Mail/} by default.  The new group that will
13057 be created (@samp{mail.misc}) will be subscribed, and you can read it
13058 like any other group.
13059
13060 You will probably want to split the mail into several groups, though:
13061
13062 @lisp
13063 (setq nnmail-split-methods
13064       '(("junk" "^From:.*Lars Ingebrigtsen")
13065         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13066         ("other" "")))
13067 @end lisp
13068
13069 This will result in three new @code{nnml} mail groups being created:
13070 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13071 mail that doesn't fit into the first two groups will be placed in the
13072 last group.
13073
13074 This should be sufficient for reading mail with Gnus.  You might want to
13075 give the other sections in this part of the manual a perusal, though.
13076 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13077
13078
13079 @node Splitting Mail
13080 @subsection Splitting Mail
13081 @cindex splitting mail
13082 @cindex mail splitting
13083 @cindex mail filtering (splitting)
13084
13085 @vindex nnmail-split-methods
13086 The @code{nnmail-split-methods} variable says how the incoming mail is
13087 to be split into groups.
13088
13089 @lisp
13090 (setq nnmail-split-methods
13091   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13092     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13093     ("mail.other" "")))
13094 @end lisp
13095
13096 This variable is a list of lists, where the first element of each of
13097 these lists is the name of the mail group (they do not have to be called
13098 something beginning with @samp{mail}, by the way), and the second
13099 element is a regular expression used on the header of each mail to
13100 determine if it belongs in this mail group.  The first string may
13101 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13102 insert sub-expressions from the matched text.  For instance:
13103
13104 @lisp
13105 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13106 @end lisp
13107
13108 The second element can also be a function.  In that case, it will be
13109 called narrowed to the headers with the first element of the rule as the
13110 argument.  It should return a non-@code{nil} value if it thinks that the
13111 mail belongs in that group.
13112
13113 The last of these groups should always be a general one, and the regular
13114 expression should @emph{always} be @samp{*} so that it matches any mails
13115 that haven't been matched by any of the other regexps.  (These rules are
13116 processed from the beginning of the alist toward the end.  The first
13117 rule to make a match will ``win'', unless you have crossposting enabled.
13118 In that case, all matching rules will ``win''.)
13119
13120 If you like to tinker with this yourself, you can set this variable to a
13121 function of your choice.  This function will be called without any
13122 arguments in a buffer narrowed to the headers of an incoming mail
13123 message.  The function should return a list of group names that it
13124 thinks should carry this mail message.
13125
13126 Note that the mail back ends are free to maul the poor, innocent,
13127 incoming headers all they want to.  They all add @code{Lines} headers;
13128 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13129 @code{From<SPACE>} line to something else.
13130
13131 @vindex nnmail-crosspost
13132 The mail back ends all support cross-posting.  If several regexps match,
13133 the mail will be ``cross-posted'' to all those groups.
13134 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13135 that no articles are crossposted to the general (@samp{*}) group.
13136
13137 @vindex nnmail-crosspost-link-function
13138 @cindex crosspost
13139 @cindex links
13140 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13141 the crossposted articles.  However, not all file systems support hard
13142 links.  If that's the case for you, set
13143 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13144 variable is @code{add-name-to-file} by default.)
13145
13146 @kindex M-x nnmail-split-history
13147 @findex nnmail-split-history
13148 If you wish to see where the previous mail split put the messages, you
13149 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13150 where re-spooling messages would put the messages, you can use
13151 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13152 Group Commands}).
13153
13154 @vindex nnmail-split-header-length-limit
13155 Header lines longer than the value of
13156 @code{nnmail-split-header-length-limit} are excluded from the split
13157 function.
13158
13159 @vindex nnmail-mail-splitting-charset
13160 @vindex nnmail-mail-splitting-decodes
13161 By default the splitting codes @acronym{MIME} decodes headers so you
13162 can match on non-@acronym{ASCII} strings.  The
13163 @code{nnmail-mail-splitting-charset} variable specifies the default
13164 charset for decoding.  The behaviour can be turned off completely by
13165 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13166 useful if you want to match articles based on the raw header data.
13167
13168 @vindex nnmail-resplit-incoming
13169 By default, splitting is performed on all incoming messages.  If you
13170 specify a @code{directory} entry for the variable @code{mail-sources}
13171 (@pxref{Mail Source Specifiers}), however, then splitting does
13172 @emph{not} happen by default.  You can set the variable
13173 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13174 splitting happen even in this case.  (This variable has no effect on
13175 other kinds of entries.)
13176
13177 Gnus gives you all the opportunity you could possibly want for shooting
13178 yourself in the foot.  Let's say you create a group that will contain
13179 all the mail you get from your boss.  And then you accidentally
13180 unsubscribe from the group.  Gnus will still put all the mail from your
13181 boss in the unsubscribed group, and so, when your boss mails you ``Have
13182 that report ready by Monday or you're fired!'', you'll never see it and,
13183 come Tuesday, you'll still believe that you're gainfully employed while
13184 you really should be out collecting empty bottles to save up for next
13185 month's rent money.
13186
13187
13188 @node Mail Sources
13189 @subsection Mail Sources
13190
13191 Mail can be gotten from many different sources---the mail spool, from
13192 a @acronym{POP} mail server, from a procmail directory, or from a
13193 maildir, for instance.
13194
13195 @menu
13196 * Mail Source Specifiers::      How to specify what a mail source is.
13197 * Mail Source Customization::   Some variables that influence things.
13198 * Fetching Mail::               Using the mail source specifiers.
13199 @end menu
13200
13201
13202 @node Mail Source Specifiers
13203 @subsubsection Mail Source Specifiers
13204 @cindex POP
13205 @cindex mail server
13206 @cindex procmail
13207 @cindex mail spool
13208 @cindex mail source
13209
13210 You tell Gnus how to fetch mail by setting @code{mail-sources}
13211 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13212
13213 Here's an example:
13214
13215 @lisp
13216 (pop :server "pop3.mailserver.com" :user "myname")
13217 @end lisp
13218
13219 As can be observed, a mail source specifier is a list where the first
13220 element is a @dfn{mail source type}, followed by an arbitrary number of
13221 @dfn{keywords}.  Keywords that are not explicitly specified are given
13222 default values.
13223
13224 The following mail source types are available:
13225
13226 @table @code
13227 @item file
13228 Get mail from a single file; typically from the mail spool.
13229
13230 Keywords:
13231
13232 @table @code
13233 @item :path
13234 The file name.  Defaults to the value of the @env{MAIL}
13235 environment variable or the value of @code{rmail-spool-directory}
13236 (usually something like @file{/usr/mail/spool/user-name}).
13237
13238 @item :prescript
13239 @itemx :postscript
13240 Script run before/after fetching mail.
13241 @end table
13242
13243 An example file mail source:
13244
13245 @lisp
13246 (file :path "/usr/spool/mail/user-name")
13247 @end lisp
13248
13249 Or using the default file name:
13250
13251 @lisp
13252 (file)
13253 @end lisp
13254
13255 If the mail spool file is not located on the local machine, it's best
13256 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13257 You can not use ange-ftp file names here---it has no way to lock the
13258 mail spool while moving the mail.
13259
13260 If it's impossible to set up a proper server, you can use ssh instead.
13261
13262 @lisp
13263 (setq mail-sources
13264       '((file :prescript "ssh host bin/getmail >%t")))
13265 @end lisp
13266
13267 The @samp{getmail} script would look something like the following:
13268
13269 @example
13270 #!/bin/sh
13271 #  getmail - move mail from spool to stdout
13272 #  flu@@iki.fi
13273
13274 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13275 TMP=$HOME/Mail/tmp
13276 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13277 @end example
13278
13279 Alter this script to fit find the @samp{movemail} you want to use.
13280
13281
13282 @item directory
13283 @vindex nnmail-scan-directory-mail-source-once
13284 Get mail from several files in a directory.  This is typically used
13285 when you have procmail split the incoming mail into several files.
13286 That is, there is a one-to-one correspondence between files in that
13287 directory and groups, so that mail from the file @file{foo.bar.spool}
13288 will be put in the group @code{foo.bar}.  (You can change the suffix
13289 to be used instead of @code{.spool}.)  Setting
13290 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13291 Gnus to scan the mail source only once.  This is particularly useful
13292 if you want to scan mail groups at a specified level.
13293
13294 @vindex nnmail-resplit-incoming
13295 There is also the variable @code{nnmail-resplit-incoming}, if you set
13296 that to a non-@code{nil} value, then the normal splitting process is
13297 applied to all the files from the directory, @ref{Splitting Mail}.
13298
13299 Keywords:
13300
13301 @table @code
13302 @item :path
13303 The name of the directory where the files are.  There is no default
13304 value.
13305
13306 @item :suffix
13307 Only files ending with this suffix are used.  The default is
13308 @samp{.spool}.
13309
13310 @item :predicate
13311 Only files that have this predicate return non-@code{nil} are returned.
13312 The default is @code{identity}.  This is used as an additional
13313 filter---only files that have the right suffix @emph{and} satisfy this
13314 predicate are considered.
13315
13316 @item :prescript
13317 @itemx :postscript
13318 Script run before/after fetching mail.
13319
13320 @end table
13321
13322 An example directory mail source:
13323
13324 @lisp
13325 (directory :path "/home/user-name/procmail-dir/"
13326            :suffix ".prcml")
13327 @end lisp
13328
13329 @item pop
13330 Get mail from a @acronym{POP} server.
13331
13332 Keywords:
13333
13334 @table @code
13335 @item :server
13336 The name of the @acronym{POP} server.  The default is taken from the
13337 @env{MAILHOST} environment variable.
13338
13339 @item :port
13340 The port number of the @acronym{POP} server.  This can be a number (eg,
13341 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13342 string, it should be a service name as listed in @file{/etc/services} on
13343 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13344 need to specify it as @samp{"pop-3"} instead.
13345
13346 @item :user
13347 The user name to give to the @acronym{POP} server.  The default is the login
13348 name.
13349
13350 @item :password
13351 The password to give to the @acronym{POP} server.  If not specified,
13352 the user is prompted.
13353
13354 @item :program
13355 The program to use to fetch mail from the @acronym{POP} server.  This
13356 should be a @code{format}-like string.  Here's an example:
13357
13358 @example
13359 fetchmail %u@@%s -P %p %t
13360 @end example
13361
13362 The valid format specifier characters are:
13363
13364 @table @samp
13365 @item t
13366 The name of the file the mail is to be moved to.  This must always be
13367 included in this string.
13368
13369 @item s
13370 The name of the server.
13371
13372 @item P
13373 The port number of the server.
13374
13375 @item u
13376 The user name to use.
13377
13378 @item p
13379 The password to use.
13380 @end table
13381
13382 The values used for these specs are taken from the values you give the
13383 corresponding keywords.
13384
13385 @item :prescript
13386 A script to be run before fetching the mail.  The syntax is the same as
13387 the @code{:program} keyword.  This can also be a function to be run.
13388
13389 @item :postscript
13390 A script to be run after fetching the mail.  The syntax is the same as
13391 the @code{:program} keyword.  This can also be a function to be run.
13392
13393 @item :function
13394 The function to use to fetch mail from the @acronym{POP} server.  The
13395 function is called with one parameter---the name of the file where the
13396 mail should be moved to.
13397
13398 @item :authentication
13399 This can be either the symbol @code{password} or the symbol @code{apop}
13400 and says what authentication scheme to use.  The default is
13401 @code{password}.
13402
13403 @item :connection
13404 What stream to use for connecting to the server, this can be the symbol
13405 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
13406 and use insecure connections.  Note that for SSL/TLS, you need external
13407 programs and libraries:
13408
13409 @itemize @bullet
13410 @item
13411 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
13412 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
13413 library @samp{ssl.el}.
13414 @item
13415 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
13416 Requires the external library @samp{starttls.el} and program
13417 @samp{starttls}.
13418 @end itemize
13419
13420 @item :leave
13421 Non-@code{nil} if mail is to be left on the server and UIDL used for
13422 message retrieval.  The default is @code{nil}.
13423
13424 @end table
13425
13426 If the @code{:program} and @code{:function} keywords aren't specified,
13427 @code{pop3-movemail} will be used.
13428
13429 Here are some examples.  Fetch from the default @acronym{POP} server,
13430 using the default user name, and default fetcher:
13431
13432 @lisp
13433 (pop)
13434 @end lisp
13435
13436 Fetch from a named server with a named user and password:
13437
13438 @lisp
13439 (pop :server "my.pop.server"
13440      :user "user-name" :password "secret")
13441 @end lisp
13442
13443 Use @samp{movemail} to move the mail:
13444
13445 @lisp
13446 (pop :program "movemail po:%u %t %p")
13447 @end lisp
13448
13449 @item maildir
13450 Get mail from a maildir.  This is a type of mailbox that is supported by
13451 at least qmail and postfix, where each file in a special directory
13452 contains exactly one mail.
13453
13454 Keywords:
13455
13456 @table @code
13457 @item :path
13458 The name of the directory where the mails are stored.  The default is
13459 taken from the @env{MAILDIR} environment variable or
13460 @file{~/Maildir/}.
13461 @item :subdirs
13462 The subdirectories of the Maildir.  The default is
13463 @samp{("new" "cur")}.
13464
13465 @c If you sometimes look at your mail through a pop3 daemon before fetching
13466 @c them with Gnus, you may also have to fetch your mails from the
13467 @c @code{cur} directory inside the maildir, like in the first example
13468 @c below.
13469
13470 You can also get mails from remote hosts (because maildirs don't suffer
13471 from locking problems).
13472
13473 @end table
13474
13475 Two example maildir mail sources:
13476
13477 @lisp
13478 (maildir :path "/home/user-name/Maildir/"
13479          :subdirs ("cur" "new"))
13480 @end lisp
13481
13482 @lisp
13483 (maildir :path "/user@@remotehost.org:~/Maildir/"
13484          :subdirs ("new"))
13485 @end lisp
13486
13487 @item imap
13488 Get mail from a @acronym{IMAP} server.  If you don't want to use
13489 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13490 with nnimap), for some reason or other, Gnus let you treat it similar
13491 to a @acronym{POP} server and fetches articles from a given
13492 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13493
13494 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13495 may need external programs and libraries, @xref{IMAP}.
13496
13497 Keywords:
13498
13499 @table @code
13500 @item :server
13501 The name of the @acronym{IMAP} server.  The default is taken from the
13502 @env{MAILHOST} environment variable.
13503
13504 @item :port
13505 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13506 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13507
13508 @item :user
13509 The user name to give to the @acronym{IMAP} server.  The default is the login
13510 name.
13511
13512 @item :password
13513 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13514 prompted.
13515
13516 @item :stream
13517 What stream to use for connecting to the server, this is one of the
13518 symbols in @code{imap-stream-alist}.  Right now, this means
13519 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13520 @samp{ssl}, @samp{shell} or the default @samp{network}.
13521
13522 @item :authentication
13523 Which authenticator to use for authenticating to the server, this is
13524 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13525 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13526 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13527
13528 @item :program
13529 When using the `shell' :stream, the contents of this variable is
13530 mapped into the @code{imap-shell-program} variable.  This should be a
13531 @code{format}-like string (or list of strings).  Here's an example:
13532
13533 @example
13534 ssh %s imapd
13535 @end example
13536
13537 The valid format specifier characters are:
13538
13539 @table @samp
13540 @item s
13541 The name of the server.
13542
13543 @item l
13544 User name from @code{imap-default-user}.
13545
13546 @item p
13547 The port number of the server.
13548 @end table
13549
13550 The values used for these specs are taken from the values you give the
13551 corresponding keywords.
13552
13553 @item :mailbox
13554 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13555 which normally is the mailbox which receive incoming mail.
13556
13557 @item :predicate
13558 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13559 UNDELETED}, is probably the best choice for most people, but if you
13560 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13561 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13562 Then all articles in the mailbox is fetched, no matter what.  For a
13563 complete list of predicates, see RFC 2060 section 6.4.4.
13564
13565 @item :fetchflag
13566 How to flag fetched articles on the server, the default @samp{\Deleted}
13567 will mark them as deleted, an alternative would be @samp{\Seen} which
13568 would simply mark them as read.  These are the two most likely choices,
13569 but more flags are defined in RFC 2060 section 2.3.2.
13570
13571 @item :dontexpunge
13572 If non-@code{nil}, don't remove all articles marked as deleted in the
13573 mailbox after finishing the fetch.
13574
13575 @end table
13576
13577 An example @acronym{IMAP} mail source:
13578
13579 @lisp
13580 (imap :server "mail.mycorp.com"
13581       :stream kerberos4
13582       :fetchflag "\\Seen")
13583 @end lisp
13584
13585 @item webmail
13586 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
13587 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
13588 @uref{http://mail.yahoo.com/}.
13589
13590 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
13591 required for url "4.0pre.46".
13592
13593 WARNING: Mails may be lost.  NO WARRANTY.
13594
13595 Keywords:
13596
13597 @table @code
13598 @item :subtype
13599 The type of the webmail server.  The default is @code{hotmail}.  The
13600 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13601
13602 @item :user
13603 The user name to give to the webmail server.  The default is the login
13604 name.
13605
13606 @item :password
13607 The password to give to the webmail server.  If not specified, the user is
13608 prompted.
13609
13610 @item :dontexpunge
13611 If non-@code{nil}, only fetch unread articles and don't move them to
13612 trash folder after finishing the fetch.
13613
13614 @end table
13615
13616 An example webmail source:
13617
13618 @lisp
13619 (webmail :subtype 'hotmail
13620          :user "user-name"
13621          :password "secret")
13622 @end lisp
13623 @end table
13624
13625 @table @dfn
13626 @item Common Keywords
13627 Common keywords can be used in any type of mail source.
13628
13629 Keywords:
13630
13631 @table @code
13632 @item :plugged
13633 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13634 use directory source to get mail, you can specify it as in this
13635 example:
13636
13637 @lisp
13638 (setq mail-sources
13639       '((directory :path "/home/pavel/.Spool/"
13640                    :suffix ""
13641                    :plugged t)))
13642 @end lisp
13643
13644 Gnus will then fetch your mail even when you are unplugged.  This is
13645 useful when you use local mail and news.
13646
13647 @end table
13648 @end table
13649
13650 @subsubsection Function Interface
13651
13652 Some of the above keywords specify a Lisp function to be executed.
13653 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13654 the value of the keyword while the function is executing.  For example,
13655 consider the following mail-source setting:
13656
13657 @lisp
13658 (setq mail-sources '((pop :user "jrl"
13659                           :server "pophost" :function fetchfunc)))
13660 @end lisp
13661
13662 While the function @code{fetchfunc} is executing, the symbol @code{user}
13663 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13664 @code{"pophost"}.  The symbols @code{port}, @code{password},
13665 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13666 and @code{authentication} are also bound (to their default values).
13667
13668 See above for a list of keywords for each type of mail source.
13669
13670
13671 @node Mail Source Customization
13672 @subsubsection Mail Source Customization
13673
13674 The following is a list of variables that influence how the mail is
13675 fetched.  You would normally not need to set or change any of these
13676 variables.
13677
13678 @table @code
13679 @item mail-source-crash-box
13680 @vindex mail-source-crash-box
13681 File where mail will be stored while processing it.  The default is@*
13682 @file{~/.emacs-mail-crash-box}.
13683
13684 @item mail-source-delete-incoming
13685 @vindex mail-source-delete-incoming
13686 If non-@code{nil}, delete incoming files after handling them.  If
13687 @code{t}, delete the files immediately, if @code{nil}, never delete any
13688 files.  If a positive number, delete files older than number of days
13689 (This will only happen, when receiving new mail).  You may also set
13690 @code{mail-source-delete-incoming} to @code{nil} and call
13691 @code{mail-source-delete-old-incoming} from a hook or interactively.
13692
13693 @item mail-source-delete-old-incoming-confirm
13694 @vindex mail-source-delete-old-incoming-confirm
13695 If non-@code{nil}, ask for for confirmation before deleting old incoming
13696 files.  This variable only applies when
13697 @code{mail-source-delete-incoming} is a positive number.
13698
13699 @item mail-source-ignore-errors
13700 @vindex mail-source-ignore-errors
13701 If non-@code{nil}, ignore errors when reading mail from a mail source.
13702
13703 @item mail-source-directory
13704 @vindex mail-source-directory
13705 Directory where files (if any) will be stored.  The default is
13706 @file{~/Mail/}.  At present, the only thing this is used for is to say
13707 where the incoming files will be stored if the previous variable is
13708 @code{nil}.
13709
13710 @item mail-source-incoming-file-prefix
13711 @vindex mail-source-incoming-file-prefix
13712 Prefix for file name for storing incoming mail.  The default is
13713 @file{Incoming}, in which case files will end up with names like
13714 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13715 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13716
13717 @item mail-source-default-file-modes
13718 @vindex mail-source-default-file-modes
13719 All new mail files will get this file mode.  The default is 384.
13720
13721 @item mail-source-movemail-program
13722 @vindex mail-source-movemail-program
13723 If non-@code{nil}, name of program for fetching new mail.  If
13724 @code{nil}, @code{movemail} in @var{exec-directory}.
13725
13726 @end table
13727
13728
13729 @node Fetching Mail
13730 @subsubsection Fetching Mail
13731
13732 @vindex mail-sources
13733 @vindex nnmail-spool-file
13734 The way to actually tell Gnus where to get new mail from is to set
13735 @code{mail-sources} to a list of mail source specifiers
13736 (@pxref{Mail Source Specifiers}).
13737
13738 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13739 @code{nil}, the mail back ends will never attempt to fetch mail by
13740 themselves.
13741
13742 If you want to fetch mail both from your local spool as well as a
13743 @acronym{POP} mail server, you'd say something like:
13744
13745 @lisp
13746 (setq mail-sources
13747       '((file)
13748         (pop :server "pop3.mail.server"
13749              :password "secret")))
13750 @end lisp
13751
13752 Or, if you don't want to use any of the keyword defaults:
13753
13754 @lisp
13755 (setq mail-sources
13756       '((file :path "/var/spool/mail/user-name")
13757         (pop :server "pop3.mail.server"
13758              :user "user-name"
13759              :port "pop3"
13760              :password "secret")))
13761 @end lisp
13762
13763
13764 When you use a mail back end, Gnus will slurp all your mail from your
13765 inbox and plonk it down in your home directory.  Gnus doesn't move any
13766 mail if you're not using a mail back end---you have to do a lot of magic
13767 invocations first.  At the time when you have finished drawing the
13768 pentagram, lightened the candles, and sacrificed the goat, you really
13769 shouldn't be too surprised when Gnus moves your mail.
13770
13771
13772
13773 @node Mail Back End Variables
13774 @subsection Mail Back End Variables
13775
13776 These variables are (for the most part) pertinent to all the various
13777 mail back ends.
13778
13779 @table @code
13780 @vindex nnmail-read-incoming-hook
13781 @item nnmail-read-incoming-hook
13782 The mail back ends all call this hook after reading new mail.  You can
13783 use this hook to notify any mail watch programs, if you want to.
13784
13785 @vindex nnmail-split-hook
13786 @item nnmail-split-hook
13787 @findex gnus-article-decode-encoded-words
13788 @cindex RFC 1522 decoding
13789 @cindex RFC 2047 decoding
13790 Hook run in the buffer where the mail headers of each message is kept
13791 just before the splitting based on these headers is done.  The hook is
13792 free to modify the buffer contents in any way it sees fit---the buffer
13793 is discarded after the splitting has been done, and no changes performed
13794 in the buffer will show up in any files.
13795 @code{gnus-article-decode-encoded-words} is one likely function to add
13796 to this hook.
13797
13798 @vindex nnmail-pre-get-new-mail-hook
13799 @vindex nnmail-post-get-new-mail-hook
13800 @item nnmail-pre-get-new-mail-hook
13801 @itemx nnmail-post-get-new-mail-hook
13802 These are two useful hooks executed when treating new incoming
13803 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13804 starting to handle the new mail) and
13805 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13806 is done).  Here's and example of using these two hooks to change the
13807 default file modes the new mail files get:
13808
13809 @lisp
13810 (add-hook 'nnmail-pre-get-new-mail-hook
13811           (lambda () (set-default-file-modes 511)))
13812
13813 (add-hook 'nnmail-post-get-new-mail-hook
13814           (lambda () (set-default-file-modes 551)))
13815 @end lisp
13816
13817 @item nnmail-use-long-file-names
13818 @vindex nnmail-use-long-file-names
13819 If non-@code{nil}, the mail back ends will use long file and directory
13820 names.  Groups like @samp{mail.misc} will end up in directories
13821 (assuming use of @code{nnml} back end) or files (assuming use of
13822 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13823 the same group will end up in @file{mail/misc}.
13824
13825 @item nnmail-delete-file-function
13826 @vindex nnmail-delete-file-function
13827 @findex delete-file
13828 Function called to delete files.  It is @code{delete-file} by default.
13829
13830 @item nnmail-cache-accepted-message-ids
13831 @vindex nnmail-cache-accepted-message-ids
13832 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13833 the back end (via @code{Gcc}, for instance) into the mail duplication
13834 discovery cache.  The default is @code{nil}.
13835
13836 @item nnmail-cache-ignore-groups
13837 @vindex nnmail-cache-ignore-groups
13838 This can be a regular expression or a list of regular expressions.
13839 Group names that match any of the regular expressions will never be
13840 recorded in the @code{Message-ID} cache.
13841
13842 This can be useful, for example, when using Fancy Splitting
13843 (@pxref{Fancy Mail Splitting}) together with the function
13844 @code{nnmail-split-fancy-with-parent}.
13845
13846 @end table
13847
13848
13849 @node Fancy Mail Splitting
13850 @subsection Fancy Mail Splitting
13851 @cindex mail splitting
13852 @cindex fancy mail splitting
13853
13854 @vindex nnmail-split-fancy
13855 @findex nnmail-split-fancy
13856 If the rather simple, standard method for specifying how to split mail
13857 doesn't allow you to do what you want, you can set
13858 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13859 play with the @code{nnmail-split-fancy} variable.
13860
13861 Let's look at an example value of this variable first:
13862
13863 @lisp
13864 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13865 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13866 ;; @r{from real errors.}
13867 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13868                    "mail.misc"))
13869    ;; @r{Non-error messages are crossposted to all relevant}
13870    ;; @r{groups, but we don't crosspost between the group for the}
13871    ;; @r{(ding) list and the group for other (ding) related mail.}
13872    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13873          ("subject" "ding" "ding.misc"))
13874       ;; @r{Other mailing lists@dots{}}
13875       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13876       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13877       ;; @r{Both lists below have the same suffix, so prevent}
13878       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13879       ;; @r{the bugs- list, but allow cross-posting when the}
13880       ;; @r{message was really cross-posted.}
13881       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13882       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13883       ;; @r{People@dots{}}
13884       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13885    ;; @r{Unmatched mail goes to the catch all group.}
13886    "misc.misc")
13887 @end lisp
13888
13889 This variable has the format of a @dfn{split}.  A split is a
13890 (possibly) recursive structure where each split may contain other
13891 splits.  Here are the possible split syntaxes:
13892
13893 @table @code
13894
13895 @item group 
13896 If the split is a string, that will be taken as a group name.  Normal
13897 regexp match expansion will be done.  See below for examples.
13898
13899 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split})
13900 If the split is a list, the first element of which is a string, then
13901 store the message as specified by @var{split}, if header @var{field}
13902 (a regexp) contains @var{value} (also a regexp).  If @var{restrict}
13903 (yet another regexp) matches some string after @var{field} and before
13904 the end of the matched @var{value}, the @var{split} is ignored.  If
13905 none of the @var{restrict} clauses match, @var{split} is processed.
13906
13907 @item (| @var{split} @dots{})
13908 If the split is a list, and the first element is @code{|} (vertical
13909 bar), then process each @var{split} until one of them matches.  A
13910 @var{split} is said to match if it will cause the mail message to be
13911 stored in one or more groups.
13912
13913 @item (& @var{split} @dots{})
13914 If the split is a list, and the first element is @code{&}, then
13915 process all @var{split}s in the list.
13916
13917 @item junk
13918 If the split is the symbol @code{junk}, then don't save (i.e., delete)
13919 this message.  Use with extreme caution.
13920
13921 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
13922 If the split is a list, and the first element is @samp{:}, then the
13923 second element will be called as a function with @var{args} given as
13924 arguments.  The function should return a @var{split}.
13925
13926 @cindex body split
13927 For instance, the following function could be used to split based on the
13928 body of the messages:
13929
13930 @lisp
13931 (defun split-on-body ()
13932   (save-excursion
13933     (widen)
13934     (goto-char (point-min))
13935     (when (re-search-forward "Some.*string" nil t)
13936       "string.group")))
13937 @end lisp
13938
13939 The buffer is narrowed to the message in question when @var{function}
13940 is run.  That's why @code{(widen)} needs to be called after
13941 @code{save-excursion} in the example above.  Also note that with the
13942 nnimap backend, message bodies will not be downloaded by default.  You
13943 need to set @code{nnimap-split-download-body} to t to do that
13944 (@pxref{Splitting in IMAP}).
13945
13946 @item (! @var{func} @var{split})
13947 If the split is a list, and the first element is @code{!}, then
13948 @var{split} will be processed, and @var{func} will be called as a
13949 function with the result of @var{split} as argument.  @var{func}
13950 should return a split.
13951
13952 @item nil
13953 If the split is @code{nil}, it is ignored.
13954
13955 @end table
13956
13957 In these splits, @var{field} must match a complete field name.
13958 @var{value} must match a complete word according to the fundamental mode
13959 syntax table.  You can use @code{.*} in the regexps to match partial
13960 field names or words.  In other words, all @var{value}'s are wrapped in
13961 @samp{\<} and @samp{\>} pairs.
13962
13963 @vindex nnmail-split-abbrev-alist
13964 @var{field} and @var{value} can also be Lisp symbols, in that case
13965 they are expanded as specified by the variable
13966 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
13967 where the @sc{car} of a cell contains the key, and the @sc{cdr}
13968 contains the associated value.  Predefined entries in
13969 @code{nnmail-split-abbrev-alist} include:
13970
13971 @table @code
13972 @item from
13973 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
13974 @item to
13975 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
13976 @samp{Resent-To} and @samp{Resent-Cc} fields.
13977 @item any
13978 Is the union of the @code{from} and @code{to} entries.
13979 @end table
13980
13981 @vindex nnmail-split-fancy-syntax-table
13982 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13983 when all this splitting is performed.
13984
13985 If you want to have Gnus create groups dynamically based on some
13986 information in the headers (i.e., do @code{replace-match}-like
13987 substitutions in the group names), you can say things like:
13988
13989 @example
13990 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13991 @end example
13992
13993 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13994 will be filed in @samp{mail.debian.foo}.
13995
13996 If the string contains the element @samp{\&}, then the previously
13997 matched string will be substituted.  Similarly, the elements @samp{\\1}
13998 up to @samp{\\9} will be substituted with the text matched by the
13999 groupings 1 through 9.
14000
14001 @vindex nnmail-split-fancy-match-partial-words
14002 @code{nnmail-split-fancy-match-partial-words} controls whether partial
14003 words are matched during fancy splitting.
14004
14005 Normally, regular expressions given in @code{nnmail-split-fancy} are
14006 implicitly surrounded by @code{\<...\>} markers, which are word
14007 delimiters.  If this variable is true, they are not implicitly
14008 surrounded by anything.
14009
14010 @example
14011 (any "joe" "joemail")
14012 @end example
14013
14014 In this example, messages sent from @samp{joedavis@@foo.org} will
14015 normally not be filed in @samp{joemail}.  With
14016 @code{nnmail-split-fancy-match-partial-words} set to t, however, the
14017 match will happen.  In effect, the requirement of a word boundary is
14018 removed and instead the match becomes more like a grep.
14019
14020 @findex nnmail-split-fancy-with-parent
14021 @code{nnmail-split-fancy-with-parent} is a function which allows you to
14022 split followups into the same groups their parents are in.  Sometimes
14023 you can't make splitting rules for all your mail.  For example, your
14024 boss might send you personal mail regarding different projects you are
14025 working on, and as you can't tell your boss to put a distinguishing
14026 string into the subject line, you have to resort to manually moving the
14027 messages into the right group.  With this function, you only have to do
14028 it once per thread.
14029
14030 To use this feature, you have to set @code{nnmail-treat-duplicates}
14031 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
14032 value.  And then you can include @code{nnmail-split-fancy-with-parent}
14033 using the colon feature, like so:
14034 @lisp
14035 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
14036       nnmail-cache-accepted-message-ids t
14037       nnmail-split-fancy
14038       '(| (: nnmail-split-fancy-with-parent)
14039           ;; @r{other splits go here}
14040         ))
14041 @end lisp
14042
14043 This feature works as follows: when @code{nnmail-treat-duplicates} is
14044 non-@code{nil}, Gnus records the message id of every message it sees
14045 in the file specified by the variable
14046 @code{nnmail-message-id-cache-file}, together with the group it is in
14047 (the group is omitted for non-mail messages).  When mail splitting is
14048 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
14049 at the References (and In-Reply-To) header of each message to split
14050 and searches the file specified by @code{nnmail-message-id-cache-file}
14051 for the message ids.  When it has found a parent, it returns the
14052 corresponding group name unless the group name matches the regexp
14053 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
14054 recommended that you set @code{nnmail-message-id-cache-length} to a
14055 somewhat higher number than the default so that the message ids are
14056 still in the cache.  (A value of 5000 appears to create a file some
14057 300 kBytes in size.)
14058 @vindex nnmail-cache-accepted-message-ids
14059 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
14060 also records the message ids of moved articles, so that the followup
14061 messages goes into the new group.
14062
14063 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
14064 want certain groups to be recorded in the cache.  For example, if all
14065 outgoing messages are written to an ``outgoing'' group, you could set
14066 @code{nnmail-cache-ignore-groups} to match that group name.
14067 Otherwise, answers to all your messages would end up in the
14068 ``outgoing'' group.
14069
14070
14071 @node Group Mail Splitting
14072 @subsection Group Mail Splitting
14073 @cindex mail splitting
14074 @cindex group mail splitting
14075
14076 @findex gnus-group-split
14077 If you subscribe to dozens of mailing lists but you don't want to
14078 maintain mail splitting rules manually, group mail splitting is for you.
14079 You just have to set @code{to-list} and/or @code{to-address} in group
14080 parameters or group customization and set @code{nnmail-split-methods} to
14081 @code{gnus-group-split}.  This splitting function will scan all groups
14082 for those parameters and split mail accordingly, i.e., messages posted
14083 from or to the addresses specified in the parameters @code{to-list} or
14084 @code{to-address} of a mail group will be stored in that group.
14085
14086 Sometimes, mailing lists have multiple addresses, and you may want mail
14087 splitting to recognize them all: just set the @code{extra-aliases} group
14088 parameter to the list of additional addresses and it's done.  If you'd
14089 rather use a regular expression, set @code{split-regexp}.
14090
14091 All these parameters in a group will be used to create an
14092 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14093 the @var{value} is a single regular expression that matches
14094 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
14095 matches of @code{split-regexp}, and the @var{split} is the name of the
14096 group.  @var{restrict}s are also supported: just set the
14097 @code{split-exclude} parameter to a list of regular expressions.
14098
14099 If you can't get the right split to be generated using all these
14100 parameters, or you just need something fancier, you can set the
14101 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
14102 this case, all other aforementioned parameters will be ignored by
14103 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
14104 @code{nil}, in which case the group will be ignored by
14105 @code{gnus-group-split}.
14106
14107 @vindex gnus-group-split-default-catch-all-group
14108 @code{gnus-group-split} will do cross-posting on all groups that match,
14109 by defining a single @code{&} fancy split containing one split for each
14110 group.  If a message doesn't match any split, it will be stored in the
14111 group named in @code{gnus-group-split-default-catch-all-group}, unless
14112 some group has @code{split-spec} set to @code{catch-all}, in which case
14113 that group is used as the catch-all group.  Even though this variable is
14114 often used just to name a group, it may also be set to an arbitrarily
14115 complex fancy split (after all, a group name is a fancy split), and this
14116 may be useful to split mail that doesn't go to any mailing list to
14117 personal mail folders.  Note that this fancy split is added as the last
14118 element of a @code{|} split list that also contains a @code{&} split
14119 with the rules extracted from group parameters.
14120
14121 It's time for an example.  Assume the following group parameters have
14122 been defined:
14123
14124 @example
14125 nnml:mail.bar:
14126 ((to-address . "bar@@femail.com")
14127  (split-regexp . ".*@@femail\\.com"))
14128 nnml:mail.foo:
14129 ((to-list . "foo@@nowhere.gov")
14130  (extra-aliases "foo@@localhost" "foo-redist@@home")
14131  (split-exclude "bugs-foo" "rambling-foo")
14132  (admin-address . "foo-request@@nowhere.gov"))
14133 nnml:mail.others:
14134 ((split-spec . catch-all))
14135 @end example
14136
14137 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14138 behave as if @code{nnmail-split-fancy} had been selected and variable
14139 @code{nnmail-split-fancy} had been set as follows:
14140
14141 @lisp
14142 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14143       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14144            - "bugs-foo" - "rambling-foo" "mail.foo"))
14145    "mail.others")
14146 @end lisp
14147
14148 @findex gnus-group-split-fancy
14149 If you'd rather not use group splitting for all your mail groups, you
14150 may use it for only some of them, by using @code{nnmail-split-fancy}
14151 splits like this:
14152
14153 @lisp
14154 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14155 @end lisp
14156
14157 @var{groups} may be a regular expression or a list of group names whose
14158 parameters will be scanned to generate the output split.
14159 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14160 single @code{|} split will be output.  @var{catch-all} is the fall back
14161 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
14162 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
14163 empty string in any selected group, no catch-all split will be issued.
14164 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
14165 this group will override the value of the @var{catch-all} argument.
14166
14167 @findex gnus-group-split-setup
14168 Unfortunately, scanning all groups and their parameters can be quite
14169 slow, especially considering that it has to be done for every message.
14170 But don't despair!  The function @code{gnus-group-split-setup} can be
14171 used to enable @code{gnus-group-split} in a much more efficient way.  It
14172 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14173 @code{nnmail-split-fancy} to the split produced by
14174 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14175 scanned once, no matter how many messages are split.
14176
14177 @findex gnus-group-split-update
14178 However, if you change group parameters, you'd have to update
14179 @code{nnmail-split-fancy} manually.  You can do it by running
14180 @code{gnus-group-split-update}.  If you'd rather have it updated
14181 automatically, just tell @code{gnus-group-split-setup} to do it for
14182 you.  For example, add to your @file{~/.gnus.el}:
14183
14184 @lisp
14185 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14186 @end lisp
14187
14188 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14189 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14190 have to worry about updating @code{nnmail-split-fancy} again.  If you
14191 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14192 @code{gnus-group-split-default-catch-all-group} will be set to its
14193 value.
14194
14195 @vindex gnus-group-split-updated-hook
14196 Because you may want to change @code{nnmail-split-fancy} after it is set
14197 by @code{gnus-group-split-update}, this function will run
14198 @code{gnus-group-split-updated-hook} just before finishing.
14199
14200 @node Incorporating Old Mail
14201 @subsection Incorporating Old Mail
14202 @cindex incorporating old mail
14203 @cindex import old mail
14204
14205 Most people have lots of old mail stored in various file formats.  If
14206 you have set up Gnus to read mail using one of the spiffy Gnus mail
14207 back ends, you'll probably wish to have that old mail incorporated into
14208 your mail groups.
14209
14210 Doing so can be quite easy.
14211
14212 To take an example: You're reading mail using @code{nnml}
14213 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14214 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14215 file filled with important, but old, mail.  You want to move it into
14216 your @code{nnml} groups.
14217
14218 Here's how:
14219
14220 @enumerate
14221 @item
14222 Go to the group buffer.
14223
14224 @item
14225 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14226 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14227
14228 @item
14229 Type @kbd{SPACE} to enter the newly created group.
14230
14231 @item
14232 Type @kbd{M P b} to process-mark all articles in this group's buffer
14233 (@pxref{Setting Process Marks}).
14234
14235 @item
14236 Type @kbd{B r} to respool all the process-marked articles, and answer
14237 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14238 @end enumerate
14239
14240 All the mail messages in the mbox file will now also be spread out over
14241 all your @code{nnml} groups.  Try entering them and check whether things
14242 have gone without a glitch.  If things look ok, you may consider
14243 deleting the mbox file, but I wouldn't do that unless I was absolutely
14244 sure that all the mail has ended up where it should be.
14245
14246 Respooling is also a handy thing to do if you're switching from one mail
14247 back end to another.  Just respool all the mail in the old mail groups
14248 using the new mail back end.
14249
14250
14251 @node Expiring Mail
14252 @subsection Expiring Mail
14253 @cindex article expiry
14254
14255 Traditional mail readers have a tendency to remove mail articles when
14256 you mark them as read, in some way.  Gnus takes a fundamentally
14257 different approach to mail reading.
14258
14259 Gnus basically considers mail just to be news that has been received in
14260 a rather peculiar manner.  It does not think that it has the power to
14261 actually change the mail, or delete any mail messages.  If you enter a
14262 mail group, and mark articles as ``read'', or kill them in some other
14263 fashion, the mail articles will still exist on the system.  I repeat:
14264 Gnus will not delete your old, read mail.  Unless you ask it to, of
14265 course.
14266
14267 To make Gnus get rid of your unwanted mail, you have to mark the
14268 articles as @dfn{expirable}.  (With the default key bindings, this means
14269 that you have to type @kbd{E}.)  This does not mean that the articles
14270 will disappear right away, however.  In general, a mail article will be
14271 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14272 more than one week old.  If you do not mark an article as expirable, it
14273 will remain on your system until hell freezes over.  This bears
14274 repeating one more time, with some spurious capitalizations: IF you do
14275 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14276
14277 You do not have to mark articles as expirable by hand.  Gnus provides
14278 two features, called ``auto-expire'' and ``total-expire'', that can help you
14279 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14280 for you when you select an article.  And ``total-expire'' means that Gnus
14281 considers all articles as expirable that are read.  So, in addition to
14282 the articles marked @samp{E}, also the articles marked @samp{r},
14283 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14284 expirable.
14285
14286 When should either auto-expire or total-expire be used?  Most people
14287 who are subscribed to mailing lists split each list into its own group
14288 and then turn on auto-expire or total-expire for those groups.
14289 (@xref{Splitting Mail}, for more information on splitting each list
14290 into its own group.)
14291
14292 Which one is better, auto-expire or total-expire?  It's not easy to
14293 answer.  Generally speaking, auto-expire is probably faster.  Another
14294 advantage of auto-expire is that you get more marks to work with: for
14295 the articles that are supposed to stick around, you can still choose
14296 between tick and dormant and read marks.  But with total-expire, you
14297 only have dormant and ticked to choose from.  The advantage of
14298 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14299 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14300 scoring.
14301
14302 @vindex gnus-auto-expirable-newsgroups
14303 Groups that match the regular expression
14304 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14305 read marked as expirable automatically.  All articles marked as
14306 expirable have an @samp{E} in the first column in the summary buffer.
14307
14308 By default, if you have auto expiry switched on, Gnus will mark all the
14309 articles you read as expirable, no matter if they were read or unread
14310 before.  To avoid having articles marked as read marked as expirable
14311 automatically, you can put something like the following in your
14312 @file{~/.gnus.el} file:
14313
14314 @vindex gnus-mark-article-hook
14315 @lisp
14316 (remove-hook 'gnus-mark-article-hook
14317              'gnus-summary-mark-read-and-unread-as-read)
14318 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14319 @end lisp
14320
14321 Note that making a group auto-expirable doesn't mean that all read
14322 articles are expired---only the articles marked as expirable
14323 will be expired.  Also note that using the @kbd{d} command won't make
14324 articles expirable---only semi-automatic marking of articles as read will
14325 mark the articles as expirable in auto-expirable groups.
14326
14327 Let's say you subscribe to a couple of mailing lists, and you want the
14328 articles you have read to disappear after a while:
14329
14330 @lisp
14331 (setq gnus-auto-expirable-newsgroups
14332       "mail.nonsense-list\\|mail.nice-list")
14333 @end lisp
14334
14335 Another way to have auto-expiry happen is to have the element
14336 @code{auto-expire} in the group parameters of the group.
14337
14338 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14339 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14340 don't really mix very well.
14341
14342 @vindex nnmail-expiry-wait
14343 The @code{nnmail-expiry-wait} variable supplies the default time an
14344 expirable article has to live.  Gnus starts counting days from when the
14345 message @emph{arrived}, not from when it was sent.  The default is seven
14346 days.
14347
14348 Gnus also supplies a function that lets you fine-tune how long articles
14349 are to live, based on what group they are in.  Let's say you want to
14350 have one month expiry period in the @samp{mail.private} group, a one day
14351 expiry period in the @samp{mail.junk} group, and a six day expiry period
14352 everywhere else:
14353
14354 @vindex nnmail-expiry-wait-function
14355 @lisp
14356 (setq nnmail-expiry-wait-function
14357       (lambda (group)
14358        (cond ((string= group "mail.private")
14359                31)
14360              ((string= group "mail.junk")
14361                1)
14362              ((string= group "important")
14363                'never)
14364              (t
14365                6))))
14366 @end lisp
14367
14368 The group names this function is fed are ``unadorned'' group
14369 names---no @samp{nnml:} prefixes and the like.
14370
14371 The @code{nnmail-expiry-wait} variable and
14372 @code{nnmail-expiry-wait-function} function can either be a number (not
14373 necessarily an integer) or one of the symbols @code{immediate} or
14374 @code{never}.
14375
14376 You can also use the @code{expiry-wait} group parameter to selectively
14377 change the expiry period (@pxref{Group Parameters}).
14378
14379 @vindex nnmail-expiry-target
14380 The normal action taken when expiring articles is to delete them.
14381 However, in some circumstances it might make more sense to move them
14382 to other groups instead of deleting them.  The variable
14383 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14384 parameter) controls this.  The variable supplies a default value for
14385 all groups, which can be overridden for specific groups by the group
14386 parameter.  default value is @code{delete}, but this can also be a
14387 string (which should be the name of the group the message should be
14388 moved to), or a function (which will be called in a buffer narrowed to
14389 the message in question, and with the name of the group being moved
14390 from as its parameter) which should return a target---either a group
14391 name or @code{delete}.
14392
14393 Here's an example for specifying a group name:
14394 @lisp
14395 (setq nnmail-expiry-target "nnml:expired")
14396 @end lisp
14397
14398 @findex nnmail-fancy-expiry-target
14399 @vindex nnmail-fancy-expiry-targets
14400 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14401 expire mail to groups according to the variable
14402 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14403
14404 @lisp
14405  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14406        nnmail-fancy-expiry-targets
14407        '((to-from "boss" "nnfolder:Work")
14408          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14409          ("from" ".*" "nnfolder:Archive-%Y")))
14410 @end lisp
14411
14412 With this setup, any mail that has @code{IMPORTANT} in its Subject
14413 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14414 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14415 From or To header contains the string @code{boss}, it will get expired
14416 to @code{nnfolder:Work}.  All other mail will get expired to
14417 @code{nnfolder:Archive-YYYY}.
14418
14419 @vindex nnmail-keep-last-article
14420 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14421 expire the final article in a mail newsgroup.  This is to make life
14422 easier for procmail users.
14423
14424 @vindex gnus-total-expirable-newsgroups
14425 By the way: That line up there, about Gnus never expiring non-expirable
14426 articles, is a lie.  If you put @code{total-expire} in the group
14427 parameters, articles will not be marked as expirable, but all read
14428 articles will be put through the expiry process.  Use with extreme
14429 caution.  Even more dangerous is the
14430 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14431 this regexp will have all read articles put through the expiry process,
14432 which means that @emph{all} old mail articles in the groups in question
14433 will be deleted after a while.  Use with extreme caution, and don't come
14434 crying to me when you discover that the regexp you used matched the
14435 wrong group and all your important mail has disappeared.  Be a
14436 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14437 with!  So there!
14438
14439 Most people make most of their mail groups total-expirable, though.
14440
14441 @vindex gnus-inhibit-user-auto-expire
14442 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14443 commands will not mark an article as expirable, even if the group has
14444 auto-expire turned on.
14445
14446
14447 @node Washing Mail
14448 @subsection Washing Mail
14449 @cindex mail washing
14450 @cindex list server brain damage
14451 @cindex incoming mail treatment
14452
14453 Mailers and list servers are notorious for doing all sorts of really,
14454 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14455 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14456 end of all lines passing through our server, so let's do that!!!!1!''
14457 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14458 considered to be self-evident were not discussed.  So.  Here we are.
14459
14460 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14461 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14462 be shocked and dismayed by this, but I haven't got the energy.  It is to
14463 laugh.
14464
14465 Gnus provides a plethora of functions for washing articles while
14466 displaying them, but it might be nicer to do the filtering before
14467 storing the mail to disk.  For that purpose, we have three hooks and
14468 various functions that can be put in these hooks.
14469
14470 @table @code
14471 @item nnmail-prepare-incoming-hook
14472 @vindex nnmail-prepare-incoming-hook
14473 This hook is called before doing anything with the mail and is meant for
14474 grand, sweeping gestures.  It is called in a buffer that contains all
14475 the new, incoming mail.  Functions to be used include:
14476
14477 @table @code
14478 @item nnheader-ms-strip-cr
14479 @findex nnheader-ms-strip-cr
14480 Remove trailing carriage returns from each line.  This is default on
14481 Emacs running on MS machines.
14482
14483 @end table
14484
14485 @item nnmail-prepare-incoming-header-hook
14486 @vindex nnmail-prepare-incoming-header-hook
14487 This hook is called narrowed to each header.  It can be used when
14488 cleaning up the headers.  Functions that can be used include:
14489
14490 @table @code
14491 @item nnmail-remove-leading-whitespace
14492 @findex nnmail-remove-leading-whitespace
14493 Clear leading white space that ``helpful'' listservs have added to the
14494 headers to make them look nice.  Aaah.
14495
14496 (Note that this function works on both the header on the body of all
14497 messages, so it is a potentially dangerous function to use (if a body
14498 of a message contains something that looks like a header line).  So
14499 rather than fix the bug, it is of course the right solution to make it
14500 into a feature by documenting it.)
14501
14502 @item nnmail-remove-list-identifiers
14503 @findex nnmail-remove-list-identifiers
14504 Some list servers add an identifier---for example, @samp{(idm)}---to the
14505 beginning of all @code{Subject} headers.  I'm sure that's nice for
14506 people who use stone age mail readers.  This function will remove
14507 strings that match the @code{nnmail-list-identifiers} regexp, which can
14508 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14509 @code{\\(..\\)}.
14510
14511 For instance, if you want to remove the @samp{(idm)} and the
14512 @samp{nagnagnag} identifiers:
14513
14514 @lisp
14515 (setq nnmail-list-identifiers
14516       '("(idm)" "nagnagnag"))
14517 @end lisp
14518
14519 This can also be done non-destructively with
14520 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14521
14522 @item nnmail-remove-tabs
14523 @findex nnmail-remove-tabs
14524 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14525
14526 @item nnmail-fix-eudora-headers
14527 @findex nnmail-fix-eudora-headers
14528 @cindex Eudora
14529 Eudora produces broken @code{References} headers, but OK
14530 @code{In-Reply-To} headers.  This function will get rid of the
14531 @code{References} headers.
14532
14533 @end table
14534
14535 @item nnmail-prepare-incoming-message-hook
14536 @vindex nnmail-prepare-incoming-message-hook
14537 This hook is called narrowed to each message.  Functions to be used
14538 include:
14539
14540 @table @code
14541 @item article-de-quoted-unreadable
14542 @findex article-de-quoted-unreadable
14543 Decode Quoted Readable encoding.
14544
14545 @end table
14546 @end table
14547
14548
14549 @node Duplicates
14550 @subsection Duplicates
14551
14552 @vindex nnmail-treat-duplicates
14553 @vindex nnmail-message-id-cache-length
14554 @vindex nnmail-message-id-cache-file
14555 @cindex duplicate mails
14556 If you are a member of a couple of mailing lists, you will sometimes
14557 receive two copies of the same mail.  This can be quite annoying, so
14558 @code{nnmail} checks for and treats any duplicates it might find.  To do
14559 this, it keeps a cache of old @code{Message-ID}s---
14560 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14561 default.  The approximate maximum number of @code{Message-ID}s stored
14562 there is controlled by the @code{nnmail-message-id-cache-length}
14563 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14564 stored.) If all this sounds scary to you, you can set
14565 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14566 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14567 will insert a warning into the head of the mail saying that it thinks
14568 that this is a duplicate of a different message.
14569
14570 This variable can also be a function.  If that's the case, the function
14571 will be called from a buffer narrowed to the message in question with
14572 the @code{Message-ID} as a parameter.  The function must return either
14573 @code{nil}, @code{warn}, or @code{delete}.
14574
14575 You can turn this feature off completely by setting the variable to
14576 @code{nil}.
14577
14578 If you want all the duplicate mails to be put into a special
14579 @dfn{duplicates} group, you could do that using the normal mail split
14580 methods:
14581
14582 @lisp
14583 (setq nnmail-split-fancy
14584       '(| ;; @r{Messages duplicates go to a separate group.}
14585         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14586         ;; @r{Message from daemons, postmaster, and the like to another.}
14587         (any mail "mail.misc")
14588         ;; @r{Other rules.}
14589         [...] ))
14590 @end lisp
14591 @noindent
14592 Or something like:
14593 @lisp
14594 (setq nnmail-split-methods
14595       '(("duplicates" "^Gnus-Warning:.*duplicate")
14596         ;; @r{Other rules.}
14597         [...]))
14598 @end lisp
14599
14600 Here's a neat feature: If you know that the recipient reads her mail
14601 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14602 @code{delete}, you can send her as many insults as you like, just by
14603 using a @code{Message-ID} of a mail that you know that she's already
14604 received.  Think of all the fun!  She'll never see any of it!  Whee!
14605
14606
14607 @node Not Reading Mail
14608 @subsection Not Reading Mail
14609
14610 If you start using any of the mail back ends, they have the annoying
14611 habit of assuming that you want to read mail with them.  This might not
14612 be unreasonable, but it might not be what you want.
14613
14614 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14615 @code{nil}, none of the back ends will ever attempt to read incoming
14616 mail, which should help.
14617
14618 @vindex nnbabyl-get-new-mail
14619 @vindex nnmbox-get-new-mail
14620 @vindex nnml-get-new-mail
14621 @vindex nnmh-get-new-mail
14622 @vindex nnfolder-get-new-mail
14623 This might be too much, if, for instance, you are reading mail quite
14624 happily with @code{nnml} and just want to peek at some old Rmail
14625 file you have stashed away with @code{nnbabyl}.  All back ends have
14626 variables called back-end-@code{get-new-mail}.  If you want to disable
14627 the @code{nnbabyl} mail reading, you edit the virtual server for the
14628 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14629
14630 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14631 narrowed to the article to be saved before saving it when reading
14632 incoming mail.
14633
14634
14635 @node Choosing a Mail Back End
14636 @subsection Choosing a Mail Back End
14637
14638 Gnus will read the mail spool when you activate a mail group.  The mail
14639 file is first copied to your home directory.  What happens after that
14640 depends on what format you want to store your mail in.
14641
14642 There are six different mail back ends in the standard Gnus, and more
14643 back ends are available separately.  The mail back end most people use
14644 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14645 Spool}).
14646
14647 @menu
14648 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14649 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14650 * Mail Spool::                  Store your mail in a private spool?
14651 * MH Spool::                    An mhspool-like back end.
14652 * Maildir::                     Another one-file-per-message format.
14653 * Mail Folders::                Having one file for each group.
14654 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14655 @end menu
14656
14657
14658 @node Unix Mail Box
14659 @subsubsection Unix Mail Box
14660 @cindex nnmbox
14661 @cindex unix mail box
14662
14663 @vindex nnmbox-active-file
14664 @vindex nnmbox-mbox-file
14665 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14666 mail.  @code{nnmbox} will add extra headers to each mail article to say
14667 which group it belongs in.
14668
14669 Virtual server settings:
14670
14671 @table @code
14672 @item nnmbox-mbox-file
14673 @vindex nnmbox-mbox-file
14674 The name of the mail box in the user's home directory.  Default is
14675 @file{~/mbox}.
14676
14677 @item nnmbox-active-file
14678 @vindex nnmbox-active-file
14679 The name of the active file for the mail box.  Default is
14680 @file{~/.mbox-active}.
14681
14682 @item nnmbox-get-new-mail
14683 @vindex nnmbox-get-new-mail
14684 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14685 into groups.  Default is @code{t}.
14686 @end table
14687
14688
14689 @node Rmail Babyl
14690 @subsubsection Rmail Babyl
14691 @cindex nnbabyl
14692 @cindex Rmail mbox
14693
14694 @vindex nnbabyl-active-file
14695 @vindex nnbabyl-mbox-file
14696 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14697 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14698 mail article to say which group it belongs in.
14699
14700 Virtual server settings:
14701
14702 @table @code
14703 @item nnbabyl-mbox-file
14704 @vindex nnbabyl-mbox-file
14705 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14706
14707 @item nnbabyl-active-file
14708 @vindex nnbabyl-active-file
14709 The name of the active file for the rmail box.  The default is
14710 @file{~/.rmail-active}
14711
14712 @item nnbabyl-get-new-mail
14713 @vindex nnbabyl-get-new-mail
14714 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14715 @code{t}
14716 @end table
14717
14718
14719 @node Mail Spool
14720 @subsubsection Mail Spool
14721 @cindex nnml
14722 @cindex mail @acronym{NOV} spool
14723
14724 The @dfn{nnml} spool mail format isn't compatible with any other known
14725 format.  It should be used with some caution.
14726
14727 @vindex nnml-directory
14728 If you use this back end, Gnus will split all incoming mail into files,
14729 one file for each mail, and put the articles into the corresponding
14730 directories under the directory specified by the @code{nnml-directory}
14731 variable.  The default value is @file{~/Mail/}.
14732
14733 You do not have to create any directories beforehand; Gnus will take
14734 care of all that.
14735
14736 If you have a strict limit as to how many files you are allowed to store
14737 in your account, you should not use this back end.  As each mail gets its
14738 own file, you might very well occupy thousands of inodes within a few
14739 weeks.  If this is no problem for you, and it isn't a problem for you
14740 having your friendly systems administrator walking around, madly,
14741 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14742 know that this is probably the fastest format to use.  You do not have
14743 to trudge through a big mbox file just to read your new mail.
14744
14745 @code{nnml} is probably the slowest back end when it comes to article
14746 splitting.  It has to create lots of files, and it also generates
14747 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14748 fastest back end when it comes to reading mail.
14749
14750 @cindex self contained nnml servers
14751 @cindex marks
14752 When the marks file is used (which it is by default), @code{nnml}
14753 servers have the property that you may backup them using @code{tar} or
14754 similar, and later be able to restore them into Gnus (by adding the
14755 proper @code{nnml} server) and have all your marks be preserved.  Marks
14756 for a group is usually stored in the @code{.marks} file (but see
14757 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14758 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14759 to restore the group (after restoring the backup into the nnml
14760 directory).
14761
14762 If for some reason you believe your @file{.marks} files are screwed
14763 up, you can just delete them all.  Gnus will then correctly regenerate
14764 them next time it starts.
14765
14766 Virtual server settings:
14767
14768 @table @code
14769 @item nnml-directory
14770 @vindex nnml-directory
14771 All @code{nnml} directories will be placed under this directory.  The
14772 default is the value of @code{message-directory} (whose default value
14773 is @file{~/Mail}).
14774
14775 @item nnml-active-file
14776 @vindex nnml-active-file
14777 The active file for the @code{nnml} server.  The default is
14778 @file{~/Mail/active}.
14779
14780 @item nnml-newsgroups-file
14781 @vindex nnml-newsgroups-file
14782 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14783 Format}.  The default is @file{~/Mail/newsgroups}.
14784
14785 @item nnml-get-new-mail
14786 @vindex nnml-get-new-mail
14787 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14788 @code{t}.
14789
14790 @item nnml-nov-is-evil
14791 @vindex nnml-nov-is-evil
14792 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14793 default is @code{nil}.
14794
14795 @item nnml-nov-file-name
14796 @vindex nnml-nov-file-name
14797 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14798
14799 @item nnml-prepare-save-mail-hook
14800 @vindex nnml-prepare-save-mail-hook
14801 Hook run narrowed to an article before saving.
14802
14803 @item nnml-marks-is-evil
14804 @vindex nnml-marks-is-evil
14805 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14806 default is @code{nil}.
14807
14808 @item nnml-marks-file-name
14809 @vindex nnml-marks-file-name
14810 The name of the @dfn{marks} files.  The default is @file{.marks}.
14811
14812 @item nnml-use-compressed-files
14813 @vindex nnml-use-compressed-files
14814 If non-@code{nil}, @code{nnml} will allow using compressed message
14815 files.
14816
14817 @end table
14818
14819 @findex nnml-generate-nov-databases
14820 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14821 you can do a complete update by typing @kbd{M-x
14822 nnml-generate-nov-databases}.  This command will trawl through the
14823 entire @code{nnml} hierarchy, looking at each and every article, so it
14824 might take a while to complete.  A better interface to this
14825 functionality can be found in the server buffer (@pxref{Server
14826 Commands}).
14827
14828
14829 @node MH Spool
14830 @subsubsection MH Spool
14831 @cindex nnmh
14832 @cindex mh-e mail spool
14833
14834 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14835 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14836 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14837 but it also makes it easier to write procmail scripts for.
14838
14839 Virtual server settings:
14840
14841 @table @code
14842 @item nnmh-directory
14843 @vindex nnmh-directory
14844 All @code{nnmh} directories will be located under this directory.  The
14845 default is the value of @code{message-directory} (whose default is
14846 @file{~/Mail})
14847
14848 @item nnmh-get-new-mail
14849 @vindex nnmh-get-new-mail
14850 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14851 @code{t}.
14852
14853 @item nnmh-be-safe
14854 @vindex nnmh-be-safe
14855 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14856 sure that the articles in the folder are actually what Gnus thinks they
14857 are.  It will check date stamps and stat everything in sight, so
14858 setting this to @code{t} will mean a serious slow-down.  If you never
14859 use anything but Gnus to read the @code{nnmh} articles, you do not have
14860 to set this variable to @code{t}.  The default is @code{nil}.
14861 @end table
14862
14863
14864 @node Maildir
14865 @subsubsection Maildir
14866 @cindex nnmaildir
14867 @cindex maildir
14868
14869 @code{nnmaildir} stores mail in the maildir format, with each maildir
14870 corresponding to a group in Gnus.  This format is documented here:
14871 @uref{http://cr.yp.to/proto/maildir.html} and here:
14872 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14873 stores extra information in the @file{.nnmaildir/} directory within a
14874 maildir.
14875
14876 Maildir format was designed to allow concurrent deliveries and
14877 reading, without needing locks.  With other back ends, you would have
14878 your mail delivered to a spool of some kind, and then you would
14879 configure Gnus to split mail from that spool into your groups.  You
14880 can still do that with nnmaildir, but the more common configuration is
14881 to have your mail delivered directly to the maildirs that appear as
14882 group in Gnus.
14883
14884 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14885 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14886 data in the filesystem.
14887
14888 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14889 can copy a whole maildir from one Gnus setup to another, and you will
14890 keep your marks.
14891
14892 Virtual server settings:
14893
14894 @table @code
14895 @item directory
14896 For each of your nnmaildir servers (it's very unlikely that you'd need
14897 more than one), you need to create a directory and populate it with
14898 maildirs or symlinks to maildirs (and nothing else; do not choose a
14899 directory already used for other purposes).  Each maildir will be
14900 represented in Gnus as a newsgroup on that server; the filename of the
14901 symlink will be the name of the group.  Any filenames in the directory
14902 starting with @samp{.} are ignored.  The directory is scanned when you
14903 first start Gnus, and each time you type @kbd{g} in the group buffer;
14904 if any maildirs have been removed or added, nnmaildir notices at these
14905 times.
14906
14907 The value of the @code{directory} parameter should be a Lisp form
14908 which is processed by @code{eval} and @code{expand-file-name} to get
14909 the path of the directory for this server.  The form is @code{eval}ed
14910 only when the server is opened; the resulting string is used until the
14911 server is closed.  (If you don't know about forms and @code{eval},
14912 don't worry---a simple string will work.)  This parameter is not
14913 optional; you must specify it.  I don't recommend using
14914 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14915 use that directory by default for various things, and may get confused
14916 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14917
14918 @item target-prefix
14919 This should be a Lisp form which is processed by @code{eval} and
14920 @code{expand-file-name}.  The form is @code{eval}ed only when the
14921 server is opened; the resulting string is used until the server is
14922 closed.
14923
14924 When you create a group on an nnmaildir server, the maildir is created
14925 with @code{target-prefix} prepended to its name, and a symlink
14926 pointing to that maildir is created, named with the plain group name.
14927 So if @code{directory} is @code{"~/.nnmaildir"} and
14928 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14929 the group @code{foo}, nnmaildir will create
14930 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14931 @file{~/.nnmaildir/foo} as a symlink pointing to
14932 @file{../maildirs/foo}.
14933
14934 You can set @code{target-prefix} to a string without any slashes to
14935 create both maildirs and symlinks in the same @code{directory}; in
14936 this case, any maildirs found in @code{directory} whose names start
14937 with @code{target-prefix} will not be listed as groups (but the
14938 symlinks pointing to them will be).
14939
14940 As a special case, if @code{target-prefix} is @code{""} (the default),
14941 then when you create a group, the maildir will be created in
14942 @code{directory} without a corresponding symlink.  Beware that you
14943 cannot use @code{gnus-group-delete-group} on such groups without the
14944 @code{force} argument.
14945
14946 @item directory-files
14947 This should be a function with the same interface as
14948 @code{directory-files} (such as @code{directory-files} itself).  It is
14949 used to scan the server's @code{directory} for maildirs.  This
14950 parameter is optional; the default is
14951 @code{nnheader-directory-files-safe} if
14952 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14953 @code{directory-files} otherwise.
14954 (@code{nnheader-directory-files-is-safe} is checked only once when the
14955 server is opened; if you want to check it each time the directory is
14956 scanned, you'll have to provide your own function that does that.)
14957
14958 @item get-new-mail
14959 If non-@code{nil}, then after scanning for new mail in the group
14960 maildirs themselves as usual, this server will also incorporate mail
14961 the conventional Gnus way, from @code{mail-sources} according to
14962 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14963 value is @code{nil}.
14964
14965 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14966 an nnmaildir group.  The results might happen to be useful, but that
14967 would be by chance, not by design, and the results might be different
14968 in the future.  If your split rules create new groups, remember to
14969 supply a @code{create-directory} server parameter.
14970 @end table
14971
14972 @subsubsection Group parameters
14973
14974 nnmaildir uses several group parameters.  It's safe to ignore all
14975 this; the default behavior for nnmaildir is the same as the default
14976 behavior for other mail back ends: articles are deleted after one week,
14977 etc.  Except for the expiry parameters, all this functionality is
14978 unique to nnmaildir, so you can ignore it if you're just trying to
14979 duplicate the behavior you already have with another back end.
14980
14981 If the value of any of these parameters is a vector, the first element
14982 is evaluated as a Lisp form and the result is used, rather than the
14983 original value.  If the value is not a vector, the value itself is
14984 evaluated as a Lisp form.  (This is why these parameters use names
14985 different from those of other, similar parameters supported by other
14986 back ends: they have different, though similar, meanings.)  (For
14987 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14988 @code{eval} business again; for other values, remember to use an extra
14989 quote and wrap the value in a vector when appropriate.)
14990
14991 @table @code
14992 @item expire-age
14993 An integer specifying the minimum age, in seconds, of an article before
14994 it will be expired, or the symbol @code{never} to specify that
14995 articles should never be expired.  If this parameter is not set,
14996 nnmaildir falls back to the usual
14997 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14998 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14999 wanted a value of 3 days, you could use something like @code{[(* 3 24
15000 60 60)]}; nnmaildir will evaluate the form and use the result.  An
15001 article's age is measured starting from the article file's
15002 modification time.  Normally, this is the same as the article's
15003 delivery time, but editing an article makes it younger.  Moving an
15004 article (other than via expiry) may also make an article younger.
15005
15006 @item expire-group
15007 If this is set to a string such as a full Gnus group name, like
15008 @example
15009 "backend+server.address.string:group.name"
15010 @end example
15011 and if it is not the name of the same group that the parameter belongs
15012 to, then articles will be moved to the specified group during expiry
15013 before being deleted.  @emph{If this is set to an nnmaildir group, the
15014 article will be just as old in the destination group as it was in the
15015 source group.}  So be careful with @code{expire-age} in the
15016 destination group.  If this is set to the name of the same group that
15017 the parameter belongs to, then the article is not expired at all.  If
15018 you use the vector form, the first element is evaluated once for each
15019 article.  So that form can refer to
15020 @code{nnmaildir-article-file-name}, etc., to decide where to put the
15021 article.  @emph{If this parameter is not set, nnmaildir does not fall
15022 back to the @code{expiry-target} group parameter or the
15023 @code{nnmail-expiry-target} variable.}
15024
15025 @item read-only
15026 If this is set to @code{t}, nnmaildir will treat the articles in this
15027 maildir as read-only.  This means: articles are not renamed from
15028 @file{new/} into @file{cur/}; articles are only found in @file{new/},
15029 not @file{cur/}; articles are never deleted; articles cannot be
15030 edited.  @file{new/} is expected to be a symlink to the @file{new/}
15031 directory of another maildir---e.g., a system-wide mailbox containing
15032 a mailing list of common interest.  Everything in the maildir outside
15033 @file{new/} is @emph{not} treated as read-only, so for a shared
15034 mailbox, you do still need to set up your own maildir (or have write
15035 permission to the shared mailbox); your maildir just won't contain
15036 extra copies of the articles.
15037
15038 @item directory-files
15039 A function with the same interface as @code{directory-files}.  It is
15040 used to scan the directories in the maildir corresponding to this
15041 group to find articles.  The default is the function specified by the
15042 server's @code{directory-files} parameter.
15043
15044 @item distrust-Lines:
15045 If non-@code{nil}, nnmaildir will always count the lines of an
15046 article, rather than use the @code{Lines:} header field.  If
15047 @code{nil}, the header field will be used if present.
15048
15049 @item always-marks
15050 A list of mark symbols, such as
15051 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
15052 article marks, nnmaildir will say that all articles have these
15053 marks, regardless of whether the marks stored in the filesystem
15054 say so.  This is a proof-of-concept feature that will probably be
15055 removed eventually; it ought to be done in Gnus proper, or
15056 abandoned if it's not worthwhile.
15057
15058 @item never-marks
15059 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
15060 Gnus asks nnmaildir for article marks, nnmaildir will say that no
15061 articles have these marks, regardless of whether the marks stored in
15062 the filesystem say so.  @code{never-marks} overrides
15063 @code{always-marks}.  This is a proof-of-concept feature that will
15064 probably be removed eventually; it ought to be done in Gnus proper, or
15065 abandoned if it's not worthwhile.
15066
15067 @item nov-cache-size
15068 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
15069 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
15070 articles in each group.  (This is probably not worthwhile, and will
15071 probably be removed in the future.)  This parameter's value is noticed
15072 only the first time a group is seen after the server is opened---i.e.,
15073 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
15074 until the server is closed and reopened.  The default is an estimate
15075 of the number of articles that would be displayed in the summary
15076 buffer: a count of articles that are either marked with @code{tick} or
15077 not marked with @code{read}, plus a little extra.
15078 @end table
15079
15080 @subsubsection Article identification
15081 Articles are stored in the @file{cur/} subdirectory of each maildir.
15082 Each article file is named like @code{uniq:info}, where @code{uniq}
15083 contains no colons.  nnmaildir ignores, but preserves, the
15084 @code{:info} part.  (Other maildir readers typically use this part of
15085 the filename to store marks.)  The @code{uniq} part uniquely
15086 identifies the article, and is used in various places in the
15087 @file{.nnmaildir/} subdirectory of the maildir to store information
15088 about the corresponding article.  The full pathname of an article is
15089 available in the variable @code{nnmaildir-article-file-name} after you
15090 request the article in the summary buffer.
15091
15092 @subsubsection NOV data
15093 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15094 generate lines in the summary buffer) stored in
15095 @code{.nnmaildir/nov/uniq}.  There is no
15096 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15097 need for it---an article's @acronym{NOV} data is updated automatically when the
15098 article or @code{nnmail-extra-headers} has changed.)  You can force
15099 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15100 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15101 cause nnmaildir to assign a new article number for this article, which
15102 may cause trouble with @code{seen} marks, the Agent, and the cache.
15103
15104 @subsubsection Article marks
15105 An article identified by @code{uniq} is considered to have the mark
15106 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15107 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15108 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15109 to store a new set of marks, nnmaildir creates and deletes the
15110 corresponding files as needed.  (Actually, rather than create a new
15111 file for each mark, it just creates hard links to
15112 @file{.nnmaildir/markfile}, to save inodes.)
15113
15114 You can invent new marks by creating a new directory in
15115 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15116 your server, untar it later, and keep your marks.  You can add and
15117 remove marks yourself by creating and deleting mark files.  If you do
15118 this while Gnus is running and your nnmaildir server is open, it's
15119 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15120 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15121 group buffer afterwards.  Otherwise, Gnus might not pick up the
15122 changes, and might undo them.
15123
15124
15125 @node Mail Folders
15126 @subsubsection Mail Folders
15127 @cindex nnfolder
15128 @cindex mbox folders
15129 @cindex mail folders
15130
15131 @code{nnfolder} is a back end for storing each mail group in a separate
15132 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15133 will add extra headers to keep track of article numbers and arrival
15134 dates.
15135
15136 @cindex self contained nnfolder servers
15137 @cindex marks
15138 When the marks file is used (which it is by default), @code{nnfolder}
15139 servers have the property that you may backup them using @code{tar} or
15140 similar, and later be able to restore them into Gnus (by adding the
15141 proper @code{nnfolder} server) and have all your marks be preserved.
15142 Marks for a group is usually stored in a file named as the mbox file
15143 with @code{.mrk} concatenated to it (but see
15144 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15145 Individual @code{nnfolder} groups are also possible to backup, use
15146 @kbd{G m} to restore the group (after restoring the backup into the
15147 @code{nnfolder} directory).
15148
15149 Virtual server settings:
15150
15151 @table @code
15152 @item nnfolder-directory
15153 @vindex nnfolder-directory
15154 All the @code{nnfolder} mail boxes will be stored under this directory.
15155 The default is the value of @code{message-directory} (whose default is
15156 @file{~/Mail})
15157
15158 @item nnfolder-active-file
15159 @vindex nnfolder-active-file
15160 The name of the active file.  The default is @file{~/Mail/active}.
15161
15162 @item nnfolder-newsgroups-file
15163 @vindex nnfolder-newsgroups-file
15164 The name of the group descriptions file.  @xref{Newsgroups File
15165 Format}.  The default is @file{~/Mail/newsgroups}
15166
15167 @item nnfolder-get-new-mail
15168 @vindex nnfolder-get-new-mail
15169 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15170 is @code{t}
15171
15172 @item nnfolder-save-buffer-hook
15173 @vindex nnfolder-save-buffer-hook
15174 @cindex backup files
15175 Hook run before saving the folders.  Note that Emacs does the normal
15176 backup renaming of files even with the @code{nnfolder} buffers.  If you
15177 wish to switch this off, you could say something like the following in
15178 your @file{.emacs} file:
15179
15180 @lisp
15181 (defun turn-off-backup ()
15182   (set (make-local-variable 'backup-inhibited) t))
15183
15184 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15185 @end lisp
15186
15187 @item nnfolder-delete-mail-hook
15188 @vindex nnfolder-delete-mail-hook
15189 Hook run in a buffer narrowed to the message that is to be deleted.
15190 This function can be used to copy the message to somewhere else, or to
15191 extract some information from it before removing it.
15192
15193 @item nnfolder-nov-is-evil
15194 @vindex nnfolder-nov-is-evil
15195 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15196 default is @code{nil}.
15197
15198 @item nnfolder-nov-file-suffix
15199 @vindex nnfolder-nov-file-suffix
15200 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15201
15202 @item nnfolder-nov-directory
15203 @vindex nnfolder-nov-directory
15204 The directory where the @acronym{NOV} files should be stored.  If
15205 @code{nil}, @code{nnfolder-directory} is used.
15206
15207 @item nnfolder-marks-is-evil
15208 @vindex nnfolder-marks-is-evil
15209 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15210 default is @code{nil}.
15211
15212 @item nnfolder-marks-file-suffix
15213 @vindex nnfolder-marks-file-suffix
15214 The extension for @sc{marks} files.  The default is @file{.mrk}.
15215
15216 @item nnfolder-marks-directory
15217 @vindex nnfolder-marks-directory
15218 The directory where the @sc{marks} files should be stored.  If
15219 @code{nil}, @code{nnfolder-directory} is used.
15220
15221 @end table
15222
15223
15224 @findex nnfolder-generate-active-file
15225 @kindex M-x nnfolder-generate-active-file
15226 If you have lots of @code{nnfolder}-like files you'd like to read with
15227 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15228 command to make @code{nnfolder} aware of all likely files in
15229 @code{nnfolder-directory}.  This only works if you use long file names,
15230 though.
15231
15232 @node Comparing Mail Back Ends
15233 @subsubsection Comparing Mail Back Ends
15234
15235 First, just for terminology, the @dfn{back end} is the common word for a
15236 low-level access method---a transport, if you will, by which something
15237 is acquired.  The sense is that one's mail has to come from somewhere,
15238 and so selection of a suitable back end is required in order to get that
15239 mail within spitting distance of Gnus.
15240
15241 The same concept exists for Usenet itself: Though access to articles is
15242 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15243 in the world got at Usenet by running a reader on the machine where the
15244 articles lay (the machine which today we call an @acronym{NNTP} server), and
15245 access was by the reader stepping into the articles' directory spool
15246 area directly.  One can still select between either the @code{nntp} or
15247 @code{nnspool} back ends, to select between these methods, if one happens
15248 actually to live on the server (or can see its spool directly, anyway,
15249 via NFS).
15250
15251 The goal in selecting a mail back end is to pick one which
15252 simultaneously represents a suitable way of dealing with the original
15253 format plus leaving mail in a form that is convenient to use in the
15254 future.  Here are some high and low points on each:
15255
15256 @table @code
15257 @item nnmbox
15258
15259 UNIX systems have historically had a single, very common, and well-
15260 defined format.  All messages arrive in a single @dfn{spool file}, and
15261 they are delineated by a line whose regular expression matches
15262 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15263 to make it clear in this instance that this is not the RFC-specified
15264 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15265 historically from the Unix environment, it is simplest if one does not
15266 mess a great deal with the original mailbox format, so if one chooses
15267 this back end, Gnus' primary activity in getting mail from the real spool
15268 area to Gnus' preferred directory is simply to copy it, with no
15269 (appreciable) format change in the process.  It is the ``dumbest'' way
15270 to move mail into availability in the Gnus environment.  This makes it
15271 fast to move into place, but slow to parse, when Gnus has to look at
15272 what's where.
15273
15274 @item nnbabyl
15275
15276 Once upon a time, there was the DEC-10 and DEC-20, running operating
15277 systems called TOPS and related things, and the usual (only?) mail
15278 reading environment was a thing called Babyl.  I don't know what format
15279 was used for mail landing on the system, but Babyl had its own internal
15280 format to which mail was converted, primarily involving creating a
15281 spool-file-like entity with a scheme for inserting Babyl-specific
15282 headers and status bits above the top of each message in the file.
15283 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15284 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15285 to understand the mail files folks already had in existence.  Gnus (and
15286 VM, for that matter) continue to support this format because it's
15287 perceived as having some good qualities in those mailer-specific
15288 headers/status bits stuff.  Rmail itself still exists as well, of
15289 course, and is still maintained by Stallman.
15290
15291 Both of the above forms leave your mail in a single file on your
15292 file system, and they must parse that entire file each time you take a
15293 look at your mail.
15294
15295 @item nnml
15296
15297 @code{nnml} is the back end which smells the most as though you were
15298 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15299 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15300 lo these years ago.)  One's mail is taken from the original spool file,
15301 and is then cut up into individual message files, 1:1.  It maintains a
15302 Usenet-style active file (analogous to what one finds in an INN- or
15303 CNews-based news system in (for instance) @file{/var/lib/news/active},
15304 or what is returned via the @samp{NNTP LIST} verb) and also creates
15305 @dfn{overview} files for efficient group entry, as has been defined for
15306 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15307 due to the creation of lots of files, updates to the @code{nnml} active
15308 file, and additions to overview files on a per-message basis, but it is
15309 extremely fast on access because of what amounts to the indexing support
15310 provided by the active file and overviews.
15311
15312 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15313 resource which defines available places in the file system to put new
15314 files.  Sysadmins take a dim view of heavy inode occupation within
15315 tight, shared file systems.  But if you live on a personal machine where
15316 the file system is your own and space is not at a premium, @code{nnml}
15317 wins big.
15318
15319 It is also problematic using this back end if you are living in a
15320 FAT16-based Windows world, since much space will be wasted on all these
15321 tiny files.
15322
15323 @item nnmh
15324
15325 The Rand MH mail-reading system has been around UNIX systems for a very
15326 long time; it operates by splitting one's spool file of messages into
15327 individual files, but with little or no indexing support---@code{nnmh}
15328 is considered to be semantically equivalent to ``@code{nnml} without
15329 active file or overviews''.  This is arguably the worst choice, because
15330 one gets the slowness of individual file creation married to the
15331 slowness of access parsing when learning what's new in one's groups.
15332
15333 @item nnfolder
15334
15335 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15336 method described above) on a per-group basis.  That is, @code{nnmbox}
15337 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15338 little bit of optimization to this so that each of one's mail groups has
15339 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15340 can be parsed separately, and still provides the simple Unix mail box
15341 format requiring minimal effort in moving the mail around.  In addition,
15342 it maintains an ``active'' file making it much faster for Gnus to figure
15343 out how many messages there are in each separate group.
15344
15345 If you have groups that are expected to have a massive amount of
15346 messages, @code{nnfolder} is not the best choice, but if you receive
15347 only a moderate amount of mail, @code{nnfolder} is probably the most
15348 friendly mail back end all over.
15349
15350 @item nnmaildir
15351
15352 For configuring expiry and other things, @code{nnmaildir} uses
15353 incompatible group parameters, slightly different from those of other
15354 mail back ends.
15355
15356 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15357 differences.  Each message is stored in a separate file, but the
15358 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15359 also stores the equivalent of @code{nnml}'s overview files in one file
15360 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15361 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15362 you down or takes up very much space, consider switching to
15363 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15364 file system.
15365
15366 Since maildirs don't require locking for delivery, the maildirs you use
15367 as groups can also be the maildirs your mail is directly delivered to.
15368 This means you can skip Gnus' mail splitting if your mail is already
15369 organized into different mailboxes during delivery.  A @code{directory}
15370 entry in @code{mail-sources} would have a similar effect, but would
15371 require one set of mailboxes for spooling deliveries (in mbox format,
15372 thus damaging message bodies), and another set to be used as groups (in
15373 whatever format you like).  A maildir has a built-in spool, in the
15374 @code{new/} subdirectory.  Beware that currently, mail moved from
15375 @code{new/} to @code{cur/} instead of via mail splitting will not
15376 undergo treatment such as duplicate checking.
15377
15378 @code{nnmaildir} stores article marks for a given group in the
15379 corresponding maildir, in a way designed so that it's easy to manipulate
15380 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15381 else, and still have your marks.  @code{nnml} also stores marks, but
15382 it's not as easy to work with them from outside Gnus as with
15383 @code{nnmaildir}.
15384
15385 @code{nnmaildir} uses a significant amount of memory to speed things up.
15386 (It keeps in memory some of the things that @code{nnml} stores in files
15387 and that @code{nnmh} repeatedly parses out of message files.)  If this
15388 is a problem for you, you can set the @code{nov-cache-size} group
15389 parameter to something small (0 would probably not work, but 1 probably
15390 would) to make it use less memory.  This caching will probably be
15391 removed in the future.
15392
15393 Startup is likely to be slower with @code{nnmaildir} than with other
15394 back ends.  Everything else is likely to be faster, depending in part
15395 on your file system.
15396
15397 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15398 to write an @code{nnmaildir}-derived back end.
15399
15400 @end table
15401
15402
15403 @node Browsing the Web
15404 @section Browsing the Web
15405 @cindex web
15406 @cindex browsing the web
15407 @cindex www
15408 @cindex http
15409
15410 Web-based discussion forums are getting more and more popular.  On many
15411 subjects, the web-based forums have become the most important forums,
15412 eclipsing the importance of mailing lists and news groups.  The reason
15413 is easy to understand---they are friendly to new users; you just point
15414 and click, and there's the discussion.  With mailing lists, you have to
15415 go through a cumbersome subscription procedure, and most people don't
15416 even know what a news group is.
15417
15418 The problem with this scenario is that web browsers are not very good at
15419 being newsreaders.  They do not keep track of what articles you've read;
15420 they do not allow you to score on subjects you're interested in; they do
15421 not allow off-line browsing; they require you to click around and drive
15422 you mad in the end.
15423
15424 So---if web browsers suck at reading discussion forums, why not use Gnus
15425 to do it instead?
15426
15427 Gnus has been getting a bit of a collection of back ends for providing
15428 interfaces to these sources.
15429
15430 @menu
15431 * Archiving Mail::
15432 * Web Searches::                Creating groups from articles that match a string.
15433 * Slashdot::                    Reading the Slashdot comments.
15434 * Ultimate::                    The Ultimate Bulletin Board systems.
15435 * Web Archive::                 Reading mailing list archived on web.
15436 * RSS::                         Reading RDF site summary.
15437 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15438 @end menu
15439
15440 All the web sources require Emacs/w3 and the url library to work.
15441
15442 The main caveat with all these web sources is that they probably won't
15443 work for a very long time.  Gleaning information from the @acronym{HTML} data
15444 is guesswork at best, and when the layout is altered, the Gnus back end
15445 will fail.  If you have reasonably new versions of these back ends,
15446 though, you should be ok.
15447
15448 One thing all these Web methods have in common is that the Web sources
15449 are often down, unavailable or just plain too slow to be fun.  In those
15450 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15451 Unplugged}) handle downloading articles, and then you can read them at
15452 leisure from your local disk.  No more World Wide Wait for you.
15453
15454 @node Archiving Mail
15455 @subsection Archiving Mail
15456 @cindex archiving mail
15457 @cindex backup of mail
15458
15459 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15460 @code{nnmaildir}, now actually store the article marks with each group.
15461 For these servers, archiving and restoring a group while preserving
15462 marks is fairly simple.
15463
15464 (Preserving the group level and group parameters as well still
15465 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15466 though.)
15467
15468 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15469 server, take a recursive copy of the server directory.  There is no need
15470 to shut down Gnus, so archiving may be invoked by @code{cron} or
15471 similar.  You restore the data by restoring the directory tree, and
15472 adding a server definition pointing to that directory in Gnus.  The
15473 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15474 might interfere with overwriting data, so you may want to shut down Gnus
15475 before you restore the data.
15476
15477 It is also possible to archive individual @code{nnml},
15478 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15479 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15480 directory.  For @code{nnfolder} you need to copy both the base folder
15481 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15482 this example).  Restoring the group is done with @kbd{G m} from the Group
15483 buffer.  The last step makes Gnus notice the new directory.
15484 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15485 is unnecessary in that case.
15486
15487 @node Web Searches
15488 @subsection Web Searches
15489 @cindex nnweb
15490 @cindex Google
15491 @cindex dejanews
15492 @cindex gmane
15493 @cindex Usenet searches
15494 @cindex searching the Usenet
15495
15496 It's, like, too neat to search the Usenet for articles that match a
15497 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15498 those, like, Web browsers, and you, like, have to, rilly, like, look at
15499 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15500 searches without having to use a browser.
15501
15502 The @code{nnweb} back end allows an easy interface to the mighty search
15503 engine.  You create an @code{nnweb} group, enter a search pattern, and
15504 then enter the group and read the articles like you would any normal
15505 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15506 Groups}) will do this in an easy-to-use fashion.
15507
15508 @code{nnweb} groups don't really lend themselves to being solid
15509 groups---they have a very fleeting idea of article numbers.  In fact,
15510 each time you enter an @code{nnweb} group (not even changing the search
15511 pattern), you are likely to get the articles ordered in a different
15512 manner.  Not even using duplicate suppression (@pxref{Duplicate
15513 Suppression}) will help, since @code{nnweb} doesn't even know the
15514 @code{Message-ID} of the articles before reading them using some search
15515 engines (Google, for instance).  The only possible way to keep track
15516 of which articles you've read is by scoring on the @code{Date}
15517 header---mark all articles posted before the last date you read the
15518 group as read.
15519
15520 If the search engine changes its output substantially, @code{nnweb}
15521 won't be able to parse it and will fail.  One could hardly fault the Web
15522 providers if they were to do this---their @emph{raison d'être} is to
15523 make money off of advertisements, not to provide services to the
15524 community.  Since @code{nnweb} washes the ads off all the articles, one
15525 might think that the providers might be somewhat miffed.  We'll see.
15526
15527 You must have the @code{url} and @code{w3} package installed to be able
15528 to use @code{nnweb}.
15529
15530 Virtual server variables:
15531
15532 @table @code
15533 @item nnweb-type
15534 @vindex nnweb-type
15535 What search engine type is being used.  The currently supported types
15536 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15537 @code{dejanews} is an alias to @code{google}.
15538
15539 @item nnweb-search
15540 @vindex nnweb-search
15541 The search string to feed to the search engine.
15542
15543 @item nnweb-max-hits
15544 @vindex nnweb-max-hits
15545 Advisory maximum number of hits per search to display.  The default is
15546 999.
15547
15548 @item nnweb-type-definition
15549 @vindex nnweb-type-definition
15550 Type-to-definition alist.  This alist says what @code{nnweb} should do
15551 with the various search engine types.  The following elements must be
15552 present:
15553
15554 @table @code
15555 @item article
15556 Function to decode the article and provide something that Gnus
15557 understands.
15558
15559 @item map
15560 Function to create an article number to message header and URL alist.
15561
15562 @item search
15563 Function to send the search string to the search engine.
15564
15565 @item address
15566 The address the aforementioned function should send the search string
15567 to.
15568
15569 @item id
15570 Format string URL to fetch an article by @code{Message-ID}.
15571 @end table
15572
15573 @end table
15574
15575
15576 @node Slashdot
15577 @subsection Slashdot
15578 @cindex Slashdot
15579 @cindex nnslashdot
15580
15581 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15582 lively discussion following the news articles.  @code{nnslashdot} will
15583 let you read this forum in a convenient manner.
15584
15585 The easiest way to read this source is to put something like the
15586 following in your @file{~/.gnus.el} file:
15587
15588 @lisp
15589 (setq gnus-secondary-select-methods
15590       '((nnslashdot "")))
15591 @end lisp
15592
15593 This will make Gnus query the @code{nnslashdot} back end for new comments
15594 and groups.  The @kbd{F} command will subscribe each new news article as
15595 a new Gnus group, and you can read the comments by entering these
15596 groups.  (Note that the default subscription method is to subscribe new
15597 groups as zombies.  Other methods are available (@pxref{Subscription
15598 Methods}).
15599
15600 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15601 command is the most handy tool (@pxref{Foreign Groups}).
15602
15603 When following up to @code{nnslashdot} comments (or posting new
15604 comments), some light @acronym{HTML}izations will be performed.  In
15605 particular, text quoted with @samp{> } will be quoted with
15606 @samp{blockquote} instead, and signatures will have @samp{br} added to
15607 the end of each line.  Other than that, you can just write @acronym{HTML}
15608 directly into the message buffer.  Note that Slashdot filters out some
15609 @acronym{HTML} forms.
15610
15611 The following variables can be altered to change its behavior:
15612
15613 @table @code
15614 @item nnslashdot-threaded
15615 Whether @code{nnslashdot} should display threaded groups or not.  The
15616 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15617 has to retrieve absolutely all comments in a group upon entry.  If a
15618 threaded display is not required, @code{nnslashdot} will only retrieve
15619 the comments that are actually wanted by the user.  Threading is nicer,
15620 but much, much slower than unthreaded.
15621
15622 @item nnslashdot-login-name
15623 @vindex nnslashdot-login-name
15624 The login name to use when posting.
15625
15626 @item nnslashdot-password
15627 @vindex nnslashdot-password
15628 The password to use when posting.
15629
15630 @item nnslashdot-directory
15631 @vindex nnslashdot-directory
15632 Where @code{nnslashdot} will store its files.  The default is
15633 @file{~/News/slashdot/}.
15634
15635 @item nnslashdot-active-url
15636 @vindex nnslashdot-active-url
15637 The @sc{url} format string that will be used to fetch the information on
15638 news articles and comments.  The default is@*
15639 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15640
15641 @item nnslashdot-comments-url
15642 @vindex nnslashdot-comments-url
15643 The @sc{url} format string that will be used to fetch comments.
15644
15645 @item nnslashdot-article-url
15646 @vindex nnslashdot-article-url
15647 The @sc{url} format string that will be used to fetch the news article.  The
15648 default is
15649 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15650
15651 @item nnslashdot-threshold
15652 @vindex nnslashdot-threshold
15653 The score threshold.  The default is -1.
15654
15655 @item nnslashdot-group-number
15656 @vindex nnslashdot-group-number
15657 The number of old groups, in addition to the ten latest, to keep
15658 updated.  The default is 0.
15659
15660 @end table
15661
15662
15663
15664 @node Ultimate
15665 @subsection Ultimate
15666 @cindex nnultimate
15667 @cindex Ultimate Bulletin Board
15668
15669 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15670 probably the most popular Web bulletin board system used.  It has a
15671 quite regular and nice interface, and it's possible to get the
15672 information Gnus needs to keep groups updated.
15673
15674 The easiest way to get started with @code{nnultimate} is to say
15675 something like the following in the group buffer:  @kbd{B nnultimate RET
15676 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15677 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15678 you're interested in; there's quite a list of them on the Ultimate web
15679 site.)  Then subscribe to the groups you're interested in from the
15680 server buffer, and read them from the group buffer.
15681
15682 The following @code{nnultimate} variables can be altered:
15683
15684 @table @code
15685 @item nnultimate-directory
15686 @vindex nnultimate-directory
15687 The directory where @code{nnultimate} stores its files.  The default is@*
15688 @file{~/News/ultimate/}.
15689 @end table
15690
15691
15692 @node Web Archive
15693 @subsection Web Archive
15694 @cindex nnwarchive
15695 @cindex Web Archive
15696
15697 Some mailing lists only have archives on Web servers, such as
15698 @uref{http://www.egroups.com/} and
15699 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15700 interface, and it's possible to get the information Gnus needs to keep
15701 groups updated.
15702
15703 @findex gnus-group-make-warchive-group
15704 The easiest way to get started with @code{nnwarchive} is to say
15705 something like the following in the group buffer: @kbd{M-x
15706 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15707 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15708 @var{an_egroup} with the mailing list you subscribed, the
15709 @var{your@@email.address} with your email address.), or to browse the
15710 back end by @kbd{B nnwarchive RET mail-archive RET}.
15711
15712 The following @code{nnwarchive} variables can be altered:
15713
15714 @table @code
15715 @item nnwarchive-directory
15716 @vindex nnwarchive-directory
15717 The directory where @code{nnwarchive} stores its files.  The default is@*
15718 @file{~/News/warchive/}.
15719
15720 @item nnwarchive-login
15721 @vindex nnwarchive-login
15722 The account name on the web server.
15723
15724 @item nnwarchive-passwd
15725 @vindex nnwarchive-passwd
15726 The password for your account on the web server.
15727 @end table
15728
15729 @node RSS
15730 @subsection RSS
15731 @cindex nnrss
15732 @cindex RSS
15733
15734 Some sites have RDF site summary (RSS)
15735 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15736 interface, and it's possible to get the information Gnus needs to keep
15737 groups updated.
15738
15739 The easiest way to get started with @code{nnrss} is to say something
15740 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15741 subscribe groups.
15742
15743 The following @code{nnrss} variables can be altered:
15744
15745 @table @code
15746 @item nnrss-directory
15747 @vindex nnrss-directory
15748 The directory where @code{nnrss} stores its files.  The default is
15749 @file{~/News/rss/}.
15750
15751 @end table
15752
15753 The following code may be helpful, if you want to show the description in
15754 the summary buffer.
15755
15756 @lisp
15757 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15758 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15759
15760 (defun gnus-user-format-function-X (header)
15761   (let ((descr
15762          (assq nnrss-description-field (mail-header-extra header))))
15763     (if descr (concat "\n\t" (cdr descr)) "")))
15764 @end lisp
15765
15766 The following code may be useful to open an nnrss url directly from the
15767 summary buffer.
15768 @lisp
15769 (require 'browse-url)
15770
15771 (defun browse-nnrss-url( arg )
15772   (interactive "p")
15773   (let ((url (assq nnrss-url-field
15774                    (mail-header-extra
15775                     (gnus-data-header
15776                      (assq (gnus-summary-article-number)
15777                            gnus-newsgroup-data))))))
15778     (if url
15779         (progn
15780           (browse-url (cdr url))
15781           (gnus-summary-mark-as-read-forward 1))
15782       (gnus-summary-scroll-up arg))))
15783
15784 (eval-after-load "gnus"
15785   #'(define-key gnus-summary-mode-map
15786       (kbd "<RET>") 'browse-nnrss-url))
15787 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15788 @end lisp
15789
15790 @node Customizing w3
15791 @subsection Customizing w3
15792 @cindex w3
15793 @cindex html
15794 @cindex url
15795 @cindex Netscape
15796
15797 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15798 pages.  Emacs/w3 is documented in its own manual, but there are some
15799 things that may be more relevant for Gnus users.
15800
15801 For instance, a common question is how to make Emacs/w3 follow links
15802 using the @code{browse-url} functions (which will call some external web
15803 browser like Netscape).  Here's one way:
15804
15805 @lisp
15806 (eval-after-load "w3"
15807   '(progn
15808     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15809     (defun w3-fetch (&optional url target)
15810       (interactive (list (w3-read-url-with-default)))
15811       (if (eq major-mode 'gnus-article-mode)
15812           (browse-url url)
15813         (w3-fetch-orig url target)))))
15814 @end lisp
15815
15816 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15817 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15818 follow the link.
15819
15820
15821 @node IMAP
15822 @section IMAP
15823 @cindex nnimap
15824 @cindex @acronym{IMAP}
15825
15826 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15827 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15828 server is much similar to connecting to a news server, you just
15829 specify the network address of the server.
15830
15831 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15832 everything that @acronym{POP} can, it can hence be viewed as a
15833 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15834 similar to @acronym{NNTP} being a news storage protocol---however,
15835 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15836 is more or less read-only whereas mail is read-write.
15837
15838 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15839 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15840 the @acronym{IMAP} server and store them on the local disk.  This is
15841 not the usage described in this section---@xref{Mail Sources}.
15842
15843 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15844 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15845 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15846 usage explained in this section.
15847
15848 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15849 servers might look something like the following.  (Note that for
15850 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15851 see below.)
15852
15853 @lisp
15854 (setq gnus-secondary-select-methods
15855       '((nnimap "simpleserver") ; @r{no special configuration}
15856         ; @r{perhaps a ssh port forwarded server:}
15857         (nnimap "dolk"
15858                 (nnimap-address "localhost")
15859                 (nnimap-server-port 1430))
15860         ; @r{a UW server running on localhost}
15861         (nnimap "barbar"
15862                 (nnimap-server-port 143)
15863                 (nnimap-address "localhost")
15864                 (nnimap-list-pattern ("INBOX" "mail/*")))
15865         ; @r{anonymous public cyrus server:}
15866         (nnimap "cyrus.andrew.cmu.edu"
15867                 (nnimap-authenticator anonymous)
15868                 (nnimap-list-pattern "archive.*")
15869                 (nnimap-stream network))
15870         ; @r{a ssl server on a non-standard port:}
15871         (nnimap "vic20"
15872                 (nnimap-address "vic20.somewhere.com")
15873                 (nnimap-server-port 9930)
15874                 (nnimap-stream ssl))))
15875 @end lisp
15876
15877 After defining the new server, you can subscribe to groups on the
15878 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15879 (@pxref{Subscription Commands}) or via the Server Buffer
15880 (@pxref{Server Buffer}).
15881
15882 The following variables can be used to create a virtual @code{nnimap}
15883 server:
15884
15885 @table @code
15886
15887 @item nnimap-address
15888 @vindex nnimap-address
15889
15890 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15891 server name if not specified.
15892
15893 @item nnimap-server-port
15894 @vindex nnimap-server-port
15895 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15896
15897 Note that this should be an integer, example server specification:
15898
15899 @lisp
15900 (nnimap "mail.server.com"
15901         (nnimap-server-port 4711))
15902 @end lisp
15903
15904 @item nnimap-list-pattern
15905 @vindex nnimap-list-pattern
15906 String or list of strings of mailboxes to limit available groups to.
15907 This is used when the server has very many mailboxes and you're only
15908 interested in a few---some servers export your home directory via
15909 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15910 @file{~/Mail/*} then.
15911
15912 The string can also be a cons of REFERENCE and the string as above, what
15913 REFERENCE is used for is server specific, but on the University of
15914 Washington server it's a directory that will be concatenated with the
15915 mailbox.
15916
15917 Example server specification:
15918
15919 @lisp
15920 (nnimap "mail.server.com"
15921         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15922                                ("~friend/Mail/" . "list/*"))))
15923 @end lisp
15924
15925 @item nnimap-stream
15926 @vindex nnimap-stream
15927 The type of stream used to connect to your server.  By default, nnimap
15928 will detect and automatically use all of the below, with the exception
15929 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
15930 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
15931 be automatically detected, but it's not widely deployed yet.)
15932
15933 Example server specification:
15934
15935 @lisp
15936 (nnimap "mail.server.com"
15937         (nnimap-stream ssl))
15938 @end lisp
15939
15940 Please note that the value of @code{nnimap-stream} is a symbol!
15941
15942 @itemize @bullet
15943 @item
15944 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
15945 @samp{gsasl} or @samp{imtest} program.
15946 @item
15947 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
15948 @item
15949 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15950 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15951 @samp{starttls}.
15952 @item
15953 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15954 @samp{gnutls-cli}).
15955 @item
15956 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15957 @samp{openssl}) or SSLeay (@samp{s_client}).
15958 @item
15959 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15960 @item
15961 @dfn{network:} Plain, TCP/IP network connection.
15962 @end itemize
15963
15964 @vindex imap-kerberos4-program
15965 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15966 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15967 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15968 to make @code{imap.el} use a pty instead of a pipe when communicating
15969 with @samp{imtest}.  You will then suffer from a line length
15970 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15971 indefinitely if you have many articles in a mailbox.  The variable
15972 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15973 program.
15974
15975 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15976 needed.  It is available from
15977 @uref{http://www.gnu.org/software/gnutls/}.
15978
15979 @vindex imap-gssapi-program
15980 This parameter specifies a list of command lines that invoke a GSSAPI
15981 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15982 sequentially until a connection is made, or the list has been
15983 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15984 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15985 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15986 tried.
15987
15988 @vindex imap-ssl-program
15989 For @acronym{SSL} connections, the OpenSSL program is available from
15990 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
15991 and nnimap support it too---although the most recent versions of
15992 SSLeay, 0.9.x, are known to have serious bugs making it
15993 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
15994 work.  The variable @code{imap-ssl-program} contain parameters to pass
15995 to OpenSSL/SSLeay.
15996
15997 @vindex imap-shell-program
15998 @vindex imap-shell-host
15999 For @acronym{IMAP} connections using the @code{shell} stream, the variable
16000 @code{imap-shell-program} specify what program to call.
16001
16002 @item nnimap-authenticator
16003 @vindex nnimap-authenticator
16004
16005 The authenticator used to connect to the server.  By default, nnimap
16006 will use the most secure authenticator your server is capable of.
16007
16008 Example server specification:
16009
16010 @lisp
16011 (nnimap "mail.server.com"
16012         (nnimap-authenticator anonymous))
16013 @end lisp
16014
16015 Please note that the value of @code{nnimap-authenticator} is a symbol!
16016
16017 @itemize @bullet
16018 @item
16019 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
16020 external program @code{gsasl} or @code{imtest}.
16021 @item
16022 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
16023 @code{imtest}.
16024 @item
16025 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
16026 external library @code{digest-md5.el}.
16027 @item
16028 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
16029 @item
16030 @dfn{login:} Plain-text username/password via LOGIN.
16031 @item
16032 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
16033 @end itemize
16034
16035 @item nnimap-expunge-on-close
16036 @cindex expunging
16037 @vindex nnimap-expunge-on-close
16038 Unlike Parmenides the @acronym{IMAP} designers have decided things that
16039 don't exist actually do exist.  More specifically, @acronym{IMAP} has
16040 this concept of marking articles @code{Deleted} which doesn't actually
16041 delete them, and this (marking them @code{Deleted}, that is) is what
16042 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
16043 similar).
16044
16045 Since the articles aren't really removed when we mark them with the
16046 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
16047 running in circles yet?
16048
16049 Traditionally, nnimap has removed all articles marked as @code{Deleted}
16050 when closing a mailbox but this is now configurable by this server
16051 variable.
16052
16053 The possible options are:
16054
16055 @table @code
16056
16057 @item always
16058 The default behavior, delete all articles marked as ``Deleted'' when
16059 closing a mailbox.
16060 @item never
16061 Never actually delete articles.  Currently there is no way of showing
16062 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16063 may allow you to do this.  If you ever want to run the EXPUNGE command
16064 manually, @xref{Expunging mailboxes}.
16065 @item ask
16066 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16067 articles or not.
16068
16069 @end table
16070
16071 @item nnimap-importantize-dormant
16072 @vindex nnimap-importantize-dormant
16073
16074 If non-@code{nil} (the default), marks dormant articles as ticked (as
16075 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16076 naturally still (only) be marked as dormant.  This is to make dormant
16077 articles stand out, just like ticked articles, in other @acronym{IMAP}
16078 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16079 has only one.)
16080
16081 Probably the only reason for frobing this would be if you're trying
16082 enable per-user persistent dormant flags, using something like:
16083
16084 @lisp
16085 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16086         (format "gnus-dormant-%s" (user-login-name)))
16087 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16088         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16089 @end lisp
16090
16091 In this case, you would not want the per-user dormant flag showing up
16092 as ticked for other users.
16093
16094 @item nnimap-expunge-search-string
16095 @cindex expunging
16096 @vindex nnimap-expunge-search-string
16097
16098 This variable contain the @acronym{IMAP} search command sent to server when
16099 searching for articles eligible for expiring.  The default is
16100 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16101 UID set and the second @code{%s} is replaced by a date.
16102
16103 Probably the only useful value to change this to is
16104 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16105 messages instead of the internal article date.  See section 6.4.4 of
16106 RFC 2060 for more information on valid strings.
16107
16108 @item nnimap-authinfo-file
16109 @vindex nnimap-authinfo-file
16110
16111 A file containing credentials used to log in on servers.  The format is
16112 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16113 variable @code{nntp-authinfo-file} for exact syntax; also see
16114 @ref{NNTP}.
16115
16116 @item nnimap-need-unselect-to-notice-new-mail
16117 @vindex nnimap-need-unselect-to-notice-new-mail
16118
16119 Unselect mailboxes before looking for new mail in them.  Some servers
16120 seem to need this under some circumstances; it was reported that
16121 Courier 1.7.1 did.
16122
16123 @end table
16124
16125 @menu
16126 * Splitting in IMAP::           Splitting mail with nnimap.
16127 * Expiring in IMAP::            Expiring mail with nnimap.
16128 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16129 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16130 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16131 * Debugging IMAP::              What to do when things don't work.
16132 @end menu
16133
16134
16135
16136 @node Splitting in IMAP
16137 @subsection Splitting in IMAP
16138 @cindex splitting imap mail
16139
16140 Splitting is something Gnus users have loved and used for years, and now
16141 the rest of the world is catching up.  Yeah, dream on, not many
16142 @acronym{IMAP} servers have server side splitting and those that have
16143 splitting seem to use some non-standard protocol.  This means that
16144 @acronym{IMAP} support for Gnus has to do its own splitting.
16145
16146 And it does.
16147
16148 (Incidentally, people seem to have been dreaming on, and Sieve has
16149 gaining a market share and is supported by several IMAP servers.
16150 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16151
16152 Here are the variables of interest:
16153
16154 @table @code
16155
16156 @item nnimap-split-crosspost
16157 @cindex splitting, crosspost
16158 @cindex crosspost
16159 @vindex nnimap-split-crosspost
16160
16161 If non-@code{nil}, do crossposting if several split methods match the
16162 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16163 found will be used.
16164
16165 Nnmail equivalent: @code{nnmail-crosspost}.
16166
16167 @item nnimap-split-inbox
16168 @cindex splitting, inbox
16169 @cindex inbox
16170 @vindex nnimap-split-inbox
16171
16172 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16173 mailboxes to split from.  Defaults to @code{nil}, which means that
16174 splitting is disabled!
16175
16176 @lisp
16177 (setq nnimap-split-inbox
16178       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16179 @end lisp
16180
16181 No nnmail equivalent.
16182
16183 @item nnimap-split-rule
16184 @cindex splitting, rules
16185 @vindex nnimap-split-rule
16186
16187 New mail found in @code{nnimap-split-inbox} will be split according to
16188 this variable.
16189
16190 This variable contains a list of lists, where the first element in the
16191 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16192 matching the regexp in the second element in the sublist.  Got that?
16193 Neither did I, we need examples.
16194
16195 @lisp
16196 (setq nnimap-split-rule
16197       '(("INBOX.nnimap"
16198          "^Sender: owner-nnimap@@vic20.globalcom.se")
16199         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16200         ("INBOX.private" "")))
16201 @end lisp
16202
16203 This will put all articles from the nnimap mailing list into mailbox
16204 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16205 into INBOX.junk and everything else in INBOX.private.
16206
16207 The first string may contain @samp{\\1} forms, like the ones used by
16208 replace-match to insert sub-expressions from the matched text.  For
16209 instance:
16210
16211 @lisp
16212 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16213 @end lisp
16214
16215 The first element can also be the symbol @code{junk} to indicate that
16216 matching messages should simply be deleted.  Use with care.
16217
16218 The second element can also be a function.  In that case, it will be
16219 called with the first element of the rule as the argument, in a buffer
16220 containing the headers of the article.  It should return a
16221 non-@code{nil} value if it thinks that the mail belongs in that group.
16222
16223 Nnmail users might recollect that the last regexp had to be empty to
16224 match all articles (like in the example above).  This is not required in
16225 nnimap.  Articles not matching any of the regexps will not be moved out
16226 of your inbox.  (This might affect performance if you keep lots of
16227 unread articles in your inbox, since the splitting code would go over
16228 them every time you fetch new mail.)
16229
16230 These rules are processed from the beginning of the alist toward the
16231 end.  The first rule to make a match will ``win'', unless you have
16232 crossposting enabled.  In that case, all matching rules will ``win''.
16233
16234 This variable can also have a function as its value, the function will
16235 be called with the headers narrowed and should return a group where it
16236 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16237
16238 The splitting code tries to create mailboxes if it needs to.
16239
16240 To allow for different split rules on different virtual servers, and
16241 even different split rules in different inboxes on the same server,
16242 the syntax of this variable have been extended along the lines of:
16243
16244 @lisp
16245 (setq nnimap-split-rule
16246       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16247                                ("junk"    "From:.*Simon"))))
16248         ("my2server"    ("INBOX" nnimap-split-fancy))
16249         ("my[34]server" (".*" (("private" "To:.*Simon")
16250                                ("junk"    my-junk-func))))))
16251 @end lisp
16252
16253 The virtual server name is in fact a regexp, so that the same rules
16254 may apply to several servers.  In the example, the servers
16255 @code{my3server} and @code{my4server} both use the same rules.
16256 Similarly, the inbox string is also a regexp.  The actual splitting
16257 rules are as before, either a function, or a list with group/regexp or
16258 group/function elements.
16259
16260 Nnmail equivalent: @code{nnmail-split-methods}.
16261
16262 @item nnimap-split-predicate
16263 @cindex splitting
16264 @vindex nnimap-split-predicate
16265
16266 Mail matching this predicate in @code{nnimap-split-inbox} will be
16267 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16268
16269 This might be useful if you use another @acronym{IMAP} client to read mail in
16270 your inbox but would like Gnus to split all articles in the inbox
16271 regardless of readedness.  Then you might change this to
16272 @samp{UNDELETED}.
16273
16274 @item nnimap-split-fancy
16275 @cindex splitting, fancy
16276 @findex nnimap-split-fancy
16277 @vindex nnimap-split-fancy
16278
16279 It's possible to set @code{nnimap-split-rule} to
16280 @code{nnmail-split-fancy} if you want to use fancy
16281 splitting.  @xref{Fancy Mail Splitting}.
16282
16283 However, to be able to have different fancy split rules for nnmail and
16284 nnimap back ends you can set @code{nnimap-split-rule} to
16285 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16286 rule in @code{nnimap-split-fancy}.
16287
16288 Example:
16289
16290 @lisp
16291 (setq nnimap-split-rule 'nnimap-split-fancy
16292       nnimap-split-fancy ...)
16293 @end lisp
16294
16295 Nnmail equivalent: @code{nnmail-split-fancy}.
16296
16297 @item nnimap-split-download-body
16298 @findex nnimap-split-download-body
16299 @vindex nnimap-split-download-body
16300
16301 Set to non-@code{nil} to download entire articles during splitting.
16302 This is generally not required, and will slow things down
16303 considerably.  You may need it if you want to use an advanced
16304 splitting function that analyses the body to split the article.
16305
16306 @end table
16307
16308 @node Expiring in IMAP
16309 @subsection Expiring in IMAP
16310 @cindex expiring imap mail
16311
16312 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16313 end, it supports most features in regular expiring (@pxref{Expiring
16314 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16315 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16316 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16317 follows below are the variables used by the @code{nnimap} expiry
16318 process.
16319
16320 A note on how the expire mark is stored on the @acronym{IMAP} server is
16321 appropriate here as well.  The expire mark is translated into a
16322 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16323 message.  This means that likely only Gnus will understand and treat
16324 the @code{gnus-expire} mark properly, although other clients may allow
16325 you to view client specific flags on the message.  It also means that
16326 your server must support permanent storage of client specific flags on
16327 messages.  Most do, fortunately.
16328
16329 @table @code
16330
16331 @item nnmail-expiry-wait
16332 @item nnmail-expiry-wait-function
16333
16334 These variables are fully supported.  The expire value can be a
16335 number, the symbol @code{immediate} or @code{never}.
16336
16337 @item nnmail-expiry-target
16338
16339 This variable is supported, and internally implemented by calling the
16340 @code{nnmail} functions that handle this.  It contains an optimization
16341 that if the destination is a @acronym{IMAP} group on the same server, the
16342 article is copied instead of appended (that is, uploaded again).
16343
16344 @end table
16345
16346 @node Editing IMAP ACLs
16347 @subsection Editing IMAP ACLs
16348 @cindex editing imap acls
16349 @cindex Access Control Lists
16350 @cindex Editing @acronym{IMAP} ACLs
16351 @kindex G l
16352 @findex gnus-group-nnimap-edit-acl
16353
16354 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16355 limiting (or enabling) other users access to your mail boxes.  Not all
16356 @acronym{IMAP} servers support this, this function will give an error if it
16357 doesn't.
16358
16359 To edit an ACL for a mailbox, type @kbd{G l}
16360 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16361 editing window with detailed instructions.
16362
16363 Some possible uses:
16364
16365 @itemize @bullet
16366 @item
16367 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16368 on your mailing list mailboxes enables other users on the same server to
16369 follow the list without subscribing to it.
16370 @item
16371 At least with the Cyrus server, you are required to give the user
16372 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16373 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16374 INBOX.mailbox).
16375 @end itemize
16376
16377 @node Expunging mailboxes
16378 @subsection Expunging mailboxes
16379 @cindex expunging
16380
16381 @cindex expunge
16382 @cindex manual expunging
16383 @kindex G x
16384 @findex gnus-group-nnimap-expunge
16385
16386 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16387 you may want the option of expunging all deleted articles in a mailbox
16388 manually.  This is exactly what @kbd{G x} does.
16389
16390 Currently there is no way of showing deleted articles, you can just
16391 delete them.
16392
16393 @node A note on namespaces
16394 @subsection A note on namespaces
16395 @cindex IMAP namespace
16396 @cindex namespaces
16397
16398 The @acronym{IMAP} protocol has a concept called namespaces, described
16399 by the following text in the RFC:
16400
16401 @display
16402 5.1.2.  Mailbox Namespace Naming Convention
16403
16404    By convention, the first hierarchical element of any mailbox name
16405    which begins with "#" identifies the "namespace" of the remainder of
16406    the name.  This makes it possible to disambiguate between different
16407    types of mailbox stores, each of which have their own namespaces.
16408
16409       For example, implementations which offer access to USENET
16410       newsgroups MAY use the "#news" namespace to partition the USENET
16411       newsgroup namespace from that of other mailboxes.  Thus, the
16412       comp.mail.misc newsgroup would have an mailbox name of
16413       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16414       to a different object (e.g. a user's private mailbox).
16415 @end display
16416
16417 While there is nothing in this text that warrants concern for the
16418 @acronym{IMAP} implementation in Gnus, some servers use namespace
16419 prefixes in a way that does not work with how Gnus uses mailbox names.
16420
16421 Specifically, University of Washington's @acronym{IMAP} server uses
16422 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16423 in the @sc{create} and @sc{append} commands.  After the mailbox is
16424 created (or a messages is appended to a mailbox), it must be accessed
16425 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16426 not make it possible for the user to guarantee that user entered
16427 mailbox names will only be used with the CREATE and APPEND commands,
16428 you should simply not use the namespace prefixed mailbox names in
16429 Gnus.
16430
16431 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16432 for more information on how to use the prefixes.  They are a power
16433 tool and should be used only if you are sure what the effects are.
16434
16435 @node Debugging IMAP
16436 @subsection Debugging IMAP
16437 @cindex IMAP debugging
16438 @cindex protocol dump (IMAP)
16439
16440 @acronym{IMAP} is a complex protocol, at least compared to
16441 @acronym{NNTP} or @acronym{POP3}.  Perhaps for that reason,
16442 implementation bugs are not unlikely.  If you encounter an odd
16443 behaviour, chances are that either the server or Gnus is buggy.  If
16444 you are familiar with network protocols in general, you will probably
16445 be able to extract some clues from reading the protocol dump of the
16446 exchanges between Gnus and the server.  Even if you are not familiar
16447 with network protocols, including the protocol exchange in
16448 @acronym{IMAP}-related bug reports may be critical for solving the
16449 problem.
16450
16451 @vindex imap-log
16452 Because this protocol dump generate potentially large buffers, it is
16453 not enabled by default.  You can enable it by toggling @code{imap-log}
16454 as follows:
16455
16456 @lisp
16457 (setq imap-log t)
16458 @end lisp
16459
16460 This instruct the @code{imap.el} package to dump sent to the server,
16461 and everything received from the server.  The output is stored in the
16462 buffer @samp{*imap-log*}.  Look for error messages, which sometimes
16463 are tagged with the keyword @code{BAD}.
16464
16465 @node Other Sources
16466 @section Other Sources
16467
16468 Gnus can do more than just read news or mail.  The methods described
16469 below allow Gnus to view directories and files as if they were
16470 newsgroups.
16471
16472 @menu
16473 * Directory Groups::            You can read a directory as if it was a newsgroup.
16474 * Anything Groups::             Dired?  Who needs dired?
16475 * Document Groups::             Single files can be the basis of a group.
16476 * SOUP::                        Reading @sc{soup} packets ``offline''.
16477 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16478 @end menu
16479
16480
16481 @node Directory Groups
16482 @subsection Directory Groups
16483 @cindex nndir
16484 @cindex directory groups
16485
16486 If you have a directory that has lots of articles in separate files in
16487 it, you might treat it as a newsgroup.  The files have to have numerical
16488 names, of course.
16489
16490 This might be an opportune moment to mention @code{ange-ftp} (and its
16491 successor @code{efs}), that most wonderful of all wonderful Emacs
16492 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16493 back end to read directories.  Big deal.
16494
16495 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16496 enter the @code{ange-ftp} file name
16497 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16498 @code{ange-ftp} or @code{efs} will actually allow you to read this
16499 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16500
16501 @code{nndir} will use @acronym{NOV} files if they are present.
16502
16503 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16504 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16505 whatever you use @code{nndir} for, so you could switch to any of those
16506 methods if you feel the need to have a non-read-only @code{nndir}.
16507
16508
16509 @node Anything Groups
16510 @subsection Anything Groups
16511 @cindex nneething
16512
16513 From the @code{nndir} back end (which reads a single spool-like
16514 directory), it's just a hop and a skip to @code{nneething}, which
16515 pretends that any arbitrary directory is a newsgroup.  Strange, but
16516 true.
16517
16518 When @code{nneething} is presented with a directory, it will scan this
16519 directory and assign article numbers to each file.  When you enter such
16520 a group, @code{nneething} must create ``headers'' that Gnus can use.
16521 After all, Gnus is a newsreader, in case you're forgetting.
16522 @code{nneething} does this in a two-step process.  First, it snoops each
16523 file in question.  If the file looks like an article (i.e., the first
16524 few lines look like headers), it will use this as the head.  If this is
16525 just some arbitrary file without a head (e.g. a C source file),
16526 @code{nneething} will cobble up a header out of thin air.  It will use
16527 file ownership, name and date and do whatever it can with these
16528 elements.
16529
16530 All this should happen automatically for you, and you will be presented
16531 with something that looks very much like a newsgroup.  Totally like a
16532 newsgroup, to be precise.  If you select an article, it will be displayed
16533 in the article buffer, just as usual.
16534
16535 If you select a line that represents a directory, Gnus will pop you into
16536 a new summary buffer for this @code{nneething} group.  And so on.  You can
16537 traverse the entire disk this way, if you feel like, but remember that
16538 Gnus is not dired, really, and does not intend to be, either.
16539
16540 There are two overall modes to this action---ephemeral or solid.  When
16541 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16542 will not store information on what files you have read, and what files
16543 are new, and so on.  If you create a solid @code{nneething} group the
16544 normal way with @kbd{G m}, Gnus will store a mapping table between
16545 article numbers and file names, and you can treat this group like any
16546 other groups.  When you activate a solid @code{nneething} group, you will
16547 be told how many unread articles it contains, etc., etc.
16548
16549 Some variables:
16550
16551 @table @code
16552 @item nneething-map-file-directory
16553 @vindex nneething-map-file-directory
16554 All the mapping files for solid @code{nneething} groups will be stored
16555 in this directory, which defaults to @file{~/.nneething/}.
16556
16557 @item nneething-exclude-files
16558 @vindex nneething-exclude-files
16559 All files that match this regexp will be ignored.  Nice to use to exclude
16560 auto-save files and the like, which is what it does by default.
16561
16562 @item nneething-include-files
16563 @vindex nneething-include-files
16564 Regexp saying what files to include in the group.  If this variable is
16565 non-@code{nil}, only files matching this regexp will be included.
16566
16567 @item nneething-map-file
16568 @vindex nneething-map-file
16569 Name of the map files.
16570 @end table
16571
16572
16573 @node Document Groups
16574 @subsection Document Groups
16575 @cindex nndoc
16576 @cindex documentation group
16577 @cindex help group
16578
16579 @code{nndoc} is a cute little thing that will let you read a single file
16580 as a newsgroup.  Several files types are supported:
16581
16582 @table @code
16583 @cindex Babyl
16584 @cindex Rmail mbox
16585
16586 @item babyl
16587 The Babyl (Rmail) mail box.
16588 @cindex mbox
16589 @cindex Unix mbox
16590
16591 @item mbox
16592 The standard Unix mbox file.
16593
16594 @cindex MMDF mail box
16595 @item mmdf
16596 The MMDF mail box format.
16597
16598 @item news
16599 Several news articles appended into a file.
16600
16601 @item rnews
16602 @cindex rnews batch files
16603 The rnews batch transport format.
16604 @cindex forwarded messages
16605
16606 @item forward
16607 Forwarded articles.
16608
16609 @item nsmail
16610 Netscape mail boxes.
16611
16612 @item mime-parts
16613 @acronym{MIME} multipart messages.
16614
16615 @item standard-digest
16616 The standard (RFC 1153) digest format.
16617
16618 @item mime-digest
16619 A @acronym{MIME} digest of messages.
16620
16621 @item lanl-gov-announce
16622 Announcement messages from LANL Gov Announce.
16623
16624 @item rfc822-forward
16625 A message forwarded according to RFC822.
16626
16627 @item outlook
16628 The Outlook mail box.
16629
16630 @item oe-dbx
16631 The Outlook Express dbx mail box.
16632
16633 @item exim-bounce
16634 A bounce message from the Exim MTA.
16635
16636 @item forward
16637 A message forwarded according to informal rules.
16638
16639 @item rfc934
16640 An RFC934-forwarded message.
16641
16642 @item mailman
16643 A mailman digest.
16644
16645 @item clari-briefs
16646 A digest of Clarinet brief news items.
16647
16648 @item slack-digest
16649 Non-standard digest format---matches most things, but does it badly.
16650
16651 @item mail-in-mail
16652 The last resort.
16653 @end table
16654
16655 You can also use the special ``file type'' @code{guess}, which means
16656 that @code{nndoc} will try to guess what file type it is looking at.
16657 @code{digest} means that @code{nndoc} should guess what digest type the
16658 file is.
16659
16660 @code{nndoc} will not try to change the file or insert any extra headers into
16661 it---it will simply, like, let you use the file as the basis for a
16662 group.  And that's it.
16663
16664 If you have some old archived articles that you want to insert into your
16665 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16666 that.  Say you have an old @file{RMAIL} file with mail that you now want
16667 to split into your new @code{nnml} groups.  You look at that file using
16668 @code{nndoc} (using the @kbd{G f} command in the group buffer
16669 (@pxref{Foreign Groups})), set the process mark on all the articles in
16670 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16671 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16672 file is now also stored in lots of @code{nnml} directories, and you can
16673 delete that pesky @file{RMAIL} file.  If you have the guts!
16674
16675 Virtual server variables:
16676
16677 @table @code
16678 @item nndoc-article-type
16679 @vindex nndoc-article-type
16680 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16681 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16682 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16683 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16684 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16685
16686 @item nndoc-post-type
16687 @vindex nndoc-post-type
16688 This variable says whether Gnus is to consider the group a news group or
16689 a mail group.  There are two valid values:  @code{mail} (the default)
16690 and @code{news}.
16691 @end table
16692
16693 @menu
16694 * Document Server Internals::   How to add your own document types.
16695 @end menu
16696
16697
16698 @node Document Server Internals
16699 @subsubsection Document Server Internals
16700
16701 Adding new document types to be recognized by @code{nndoc} isn't
16702 difficult.  You just have to whip up a definition of what the document
16703 looks like, write a predicate function to recognize that document type,
16704 and then hook into @code{nndoc}.
16705
16706 First, here's an example document type definition:
16707
16708 @example
16709 (mmdf
16710  (article-begin .  "^\^A\^A\^A\^A\n")
16711  (body-end .  "^\^A\^A\^A\^A\n"))
16712 @end example
16713
16714 The definition is simply a unique @dfn{name} followed by a series of
16715 regexp pseudo-variable settings.  Below are the possible
16716 variables---don't be daunted by the number of variables; most document
16717 types can be defined with very few settings:
16718
16719 @table @code
16720 @item first-article
16721 If present, @code{nndoc} will skip past all text until it finds
16722 something that match this regexp.  All text before this will be
16723 totally ignored.
16724
16725 @item article-begin
16726 This setting has to be present in all document type definitions.  It
16727 says what the beginning of each article looks like.
16728
16729 @item head-begin-function
16730 If present, this should be a function that moves point to the head of
16731 the article.
16732
16733 @item nndoc-head-begin
16734 If present, this should be a regexp that matches the head of the
16735 article.
16736
16737 @item nndoc-head-end
16738 This should match the end of the head of the article.  It defaults to
16739 @samp{^$}---the empty line.
16740
16741 @item body-begin-function
16742 If present, this function should move point to the beginning of the body
16743 of the article.
16744
16745 @item body-begin
16746 This should match the beginning of the body of the article.  It defaults
16747 to @samp{^\n}.
16748
16749 @item body-end-function
16750 If present, this function should move point to the end of the body of
16751 the article.
16752
16753 @item body-end
16754 If present, this should match the end of the body of the article.
16755
16756 @item file-end
16757 If present, this should match the end of the file.  All text after this
16758 regexp will be totally ignored.
16759
16760 @end table
16761
16762 So, using these variables @code{nndoc} is able to dissect a document
16763 file into a series of articles, each with a head and a body.  However, a
16764 few more variables are needed since not all document types are all that
16765 news-like---variables needed to transform the head or the body into
16766 something that's palatable for Gnus:
16767
16768 @table @code
16769 @item prepare-body-function
16770 If present, this function will be called when requesting an article.  It
16771 will be called with point at the start of the body, and is useful if the
16772 document has encoded some parts of its contents.
16773
16774 @item article-transform-function
16775 If present, this function is called when requesting an article.  It's
16776 meant to be used for more wide-ranging transformation of both head and
16777 body of the article.
16778
16779 @item generate-head-function
16780 If present, this function is called to generate a head that Gnus can
16781 understand.  It is called with the article number as a parameter, and is
16782 expected to generate a nice head for the article in question.  It is
16783 called when requesting the headers of all articles.
16784
16785 @end table
16786
16787 Let's look at the most complicated example I can come up with---standard
16788 digests:
16789
16790 @example
16791 (standard-digest
16792  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16793  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16794  (prepare-body-function . nndoc-unquote-dashes)
16795  (body-end-function . nndoc-digest-body-end)
16796  (head-end . "^ ?$")
16797  (body-begin . "^ ?\n")
16798  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16799  (subtype digest guess))
16800 @end example
16801
16802 We see that all text before a 70-width line of dashes is ignored; all
16803 text after a line that starts with that @samp{^End of} is also ignored;
16804 each article begins with a 30-width line of dashes; the line separating
16805 the head from the body may contain a single space; and that the body is
16806 run through @code{nndoc-unquote-dashes} before being delivered.
16807
16808 To hook your own document definition into @code{nndoc}, use the
16809 @code{nndoc-add-type} function.  It takes two parameters---the first
16810 is the definition itself and the second (optional) parameter says
16811 where in the document type definition alist to put this definition.
16812 The alist is traversed sequentially, and
16813 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16814 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16815 @code{mmdf} type, and so on.  These type predicates should return
16816 @code{nil} if the document is not of the correct type; @code{t} if it
16817 is of the correct type; and a number if the document might be of the
16818 correct type.  A high number means high probability; a low number
16819 means low probability with @samp{0} being the lowest valid number.
16820
16821
16822 @node SOUP
16823 @subsection SOUP
16824 @cindex SOUP
16825 @cindex offline
16826
16827 In the PC world people often talk about ``offline'' newsreaders.  These
16828 are thingies that are combined reader/news transport monstrosities.
16829 With built-in modem programs.  Yecchh!
16830
16831 Of course, us Unix Weenie types of human beans use things like
16832 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16833 transport things like Ghod intended.  And then we just use normal
16834 newsreaders.
16835
16836 However, it can sometimes be convenient to do something that's a bit
16837 easier on the brain if you have a very slow modem, and you're not really
16838 that interested in doing things properly.
16839
16840 A file format called @sc{soup} has been developed for transporting news
16841 and mail from servers to home machines and back again.  It can be a bit
16842 fiddly.
16843
16844 First some terminology:
16845
16846 @table @dfn
16847
16848 @item server
16849 This is the machine that is connected to the outside world and where you
16850 get news and/or mail from.
16851
16852 @item home machine
16853 This is the machine that you want to do the actual reading and responding
16854 on.  It is typically not connected to the rest of the world in any way.
16855
16856 @item packet
16857 Something that contains messages and/or commands.  There are two kinds
16858 of packets:
16859
16860 @table @dfn
16861 @item message packets
16862 These are packets made at the server, and typically contain lots of
16863 messages for you to read.  These are called @file{SoupoutX.tgz} by
16864 default, where @var{x} is a number.
16865
16866 @item response packets
16867 These are packets made at the home machine, and typically contains
16868 replies that you've written.  These are called @file{SoupinX.tgz} by
16869 default, where @var{x} is a number.
16870
16871 @end table
16872
16873 @end table
16874
16875
16876 @enumerate
16877
16878 @item
16879 You log in on the server and create a @sc{soup} packet.  You can either
16880 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16881 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16882 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16883
16884 @item
16885 You transfer the packet home.  Rail, boat, car or modem will do fine.
16886
16887 @item
16888 You put the packet in your home directory.
16889
16890 @item
16891 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16892 the native or secondary server.
16893
16894 @item
16895 You read articles and mail and answer and followup to the things you
16896 want (@pxref{SOUP Replies}).
16897
16898 @item
16899 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16900 packet.
16901
16902 @item
16903 You transfer this packet to the server.
16904
16905 @item
16906 You use Gnus to mail this packet out with the @kbd{G s s} command.
16907
16908 @item
16909 You then repeat until you die.
16910
16911 @end enumerate
16912
16913 So you basically have a bipartite system---you use @code{nnsoup} for
16914 reading and Gnus for packing/sending these @sc{soup} packets.
16915
16916 @menu
16917 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16918 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16919 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16920 @end menu
16921
16922
16923 @node SOUP Commands
16924 @subsubsection SOUP Commands
16925
16926 These are commands for creating and manipulating @sc{soup} packets.
16927
16928 @table @kbd
16929 @item G s b
16930 @kindex G s b (Group)
16931 @findex gnus-group-brew-soup
16932 Pack all unread articles in the current group
16933 (@code{gnus-group-brew-soup}).  This command understands the
16934 process/prefix convention.
16935
16936 @item G s w
16937 @kindex G s w (Group)
16938 @findex gnus-soup-save-areas
16939 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16940
16941 @item G s s
16942 @kindex G s s (Group)
16943 @findex gnus-soup-send-replies
16944 Send all replies from the replies packet
16945 (@code{gnus-soup-send-replies}).
16946
16947 @item G s p
16948 @kindex G s p (Group)
16949 @findex gnus-soup-pack-packet
16950 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16951
16952 @item G s r
16953 @kindex G s r (Group)
16954 @findex nnsoup-pack-replies
16955 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16956
16957 @item O s
16958 @kindex O s (Summary)
16959 @findex gnus-soup-add-article
16960 This summary-mode command adds the current article to a @sc{soup} packet
16961 (@code{gnus-soup-add-article}).  It understands the process/prefix
16962 convention (@pxref{Process/Prefix}).
16963
16964 @end table
16965
16966
16967 There are a few variables to customize where Gnus will put all these
16968 thingies:
16969
16970 @table @code
16971
16972 @item gnus-soup-directory
16973 @vindex gnus-soup-directory
16974 Directory where Gnus will save intermediate files while composing
16975 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16976
16977 @item gnus-soup-replies-directory
16978 @vindex gnus-soup-replies-directory
16979 This is what Gnus will use as a temporary directory while sending our
16980 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16981
16982 @item gnus-soup-prefix-file
16983 @vindex gnus-soup-prefix-file
16984 Name of the file where Gnus stores the last used prefix.  The default is
16985 @samp{gnus-prefix}.
16986
16987 @item gnus-soup-packer
16988 @vindex gnus-soup-packer
16989 A format string command for packing a @sc{soup} packet.  The default is
16990 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16991
16992 @item gnus-soup-unpacker
16993 @vindex gnus-soup-unpacker
16994 Format string command for unpacking a @sc{soup} packet.  The default is
16995 @samp{gunzip -c %s | tar xvf -}.
16996
16997 @item gnus-soup-packet-directory
16998 @vindex gnus-soup-packet-directory
16999 Where Gnus will look for reply packets.  The default is @file{~/}.
17000
17001 @item gnus-soup-packet-regexp
17002 @vindex gnus-soup-packet-regexp
17003 Regular expression matching @sc{soup} reply packets in
17004 @code{gnus-soup-packet-directory}.
17005
17006 @end table
17007
17008
17009 @node SOUP Groups
17010 @subsubsection SOUP Groups
17011 @cindex nnsoup
17012
17013 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
17014 read incoming packets, unpack them, and put them in a directory where
17015 you can read them at leisure.
17016
17017 These are the variables you can use to customize its behavior:
17018
17019 @table @code
17020
17021 @item nnsoup-tmp-directory
17022 @vindex nnsoup-tmp-directory
17023 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
17024 directory.  (@file{/tmp/} by default.)
17025
17026 @item nnsoup-directory
17027 @vindex nnsoup-directory
17028 @code{nnsoup} then moves each message and index file to this directory.
17029 The default is @file{~/SOUP/}.
17030
17031 @item nnsoup-replies-directory
17032 @vindex nnsoup-replies-directory
17033 All replies will be stored in this directory before being packed into a
17034 reply packet.  The default is @file{~/SOUP/replies/}.
17035
17036 @item nnsoup-replies-format-type
17037 @vindex nnsoup-replies-format-type
17038 The @sc{soup} format of the replies packets.  The default is @samp{?n}
17039 (rnews), and I don't think you should touch that variable.  I probably
17040 shouldn't even have documented it.  Drats!  Too late!
17041
17042 @item nnsoup-replies-index-type
17043 @vindex nnsoup-replies-index-type
17044 The index type of the replies packet.  The default is @samp{?n}, which
17045 means ``none''.  Don't fiddle with this one either!
17046
17047 @item nnsoup-active-file
17048 @vindex nnsoup-active-file
17049 Where @code{nnsoup} stores lots of information.  This is not an ``active
17050 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
17051 this file or mess it up in any way, you're dead.  The default is
17052 @file{~/SOUP/active}.
17053
17054 @item nnsoup-packer
17055 @vindex nnsoup-packer
17056 Format string command for packing a reply @sc{soup} packet.  The default
17057 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
17058
17059 @item nnsoup-unpacker
17060 @vindex nnsoup-unpacker
17061 Format string command for unpacking incoming @sc{soup} packets.  The
17062 default is @samp{gunzip -c %s | tar xvf -}.
17063
17064 @item nnsoup-packet-directory
17065 @vindex nnsoup-packet-directory
17066 Where @code{nnsoup} will look for incoming packets.  The default is
17067 @file{~/}.
17068
17069 @item nnsoup-packet-regexp
17070 @vindex nnsoup-packet-regexp
17071 Regular expression matching incoming @sc{soup} packets.  The default is
17072 @samp{Soupout}.
17073
17074 @item nnsoup-always-save
17075 @vindex nnsoup-always-save
17076 If non-@code{nil}, save the replies buffer after each posted message.
17077
17078 @end table
17079
17080
17081 @node SOUP Replies
17082 @subsubsection SOUP Replies
17083
17084 Just using @code{nnsoup} won't mean that your postings and mailings end
17085 up in @sc{soup} reply packets automagically.  You have to work a bit
17086 more for that to happen.
17087
17088 @findex nnsoup-set-variables
17089 The @code{nnsoup-set-variables} command will set the appropriate
17090 variables to ensure that all your followups and replies end up in the
17091 @sc{soup} system.
17092
17093 In specific, this is what it does:
17094
17095 @lisp
17096 (setq message-send-news-function 'nnsoup-request-post)
17097 (setq message-send-mail-function 'nnsoup-request-mail)
17098 @end lisp
17099
17100 And that's it, really.  If you only want news to go into the @sc{soup}
17101 system you just use the first line.  If you only want mail to be
17102 @sc{soup}ed you use the second.
17103
17104
17105 @node Mail-To-News Gateways
17106 @subsection Mail-To-News Gateways
17107 @cindex mail-to-news gateways
17108 @cindex gateways
17109
17110 If your local @code{nntp} server doesn't allow posting, for some reason
17111 or other, you can post using one of the numerous mail-to-news gateways.
17112 The @code{nngateway} back end provides the interface.
17113
17114 Note that you can't read anything from this back end---it can only be
17115 used to post with.
17116
17117 Server variables:
17118
17119 @table @code
17120 @item nngateway-address
17121 @vindex nngateway-address
17122 This is the address of the mail-to-news gateway.
17123
17124 @item nngateway-header-transformation
17125 @vindex nngateway-header-transformation
17126 News headers often have to be transformed in some odd way or other
17127 for the mail-to-news gateway to accept it.  This variable says what
17128 transformation should be called, and defaults to
17129 @code{nngateway-simple-header-transformation}.  The function is called
17130 narrowed to the headers to be transformed and with one parameter---the
17131 gateway address.
17132
17133 This default function just inserts a new @code{To} header based on the
17134 @code{Newsgroups} header and the gateway address.
17135 For instance, an article with this @code{Newsgroups} header:
17136
17137 @example
17138 Newsgroups: alt.religion.emacs
17139 @end example
17140
17141 will get this @code{To} header inserted:
17142
17143 @example
17144 To: alt-religion-emacs@@GATEWAY
17145 @end example
17146
17147 The following pre-defined functions exist:
17148
17149 @findex nngateway-simple-header-transformation
17150 @table @code
17151
17152 @item nngateway-simple-header-transformation
17153 Creates a @code{To} header that looks like
17154 @var{newsgroup}@@@code{nngateway-address}.
17155
17156 @findex nngateway-mail2news-header-transformation
17157
17158 @item nngateway-mail2news-header-transformation
17159 Creates a @code{To} header that looks like
17160 @code{nngateway-address}.
17161 @end table
17162
17163 @end table
17164
17165 Here's an example:
17166
17167 @lisp
17168 (setq gnus-post-method
17169       '(nngateway
17170         "mail2news@@replay.com"
17171         (nngateway-header-transformation
17172          nngateway-mail2news-header-transformation)))
17173 @end lisp
17174
17175 So, to use this, simply say something like:
17176
17177 @lisp
17178 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17179 @end lisp
17180
17181
17182
17183 @node Combined Groups
17184 @section Combined Groups
17185
17186 Gnus allows combining a mixture of all the other group types into bigger
17187 groups.
17188
17189 @menu
17190 * Virtual Groups::              Combining articles from many groups.
17191 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17192 @end menu
17193
17194
17195 @node Virtual Groups
17196 @subsection Virtual Groups
17197 @cindex nnvirtual
17198 @cindex virtual groups
17199 @cindex merging groups
17200
17201 An @dfn{nnvirtual group} is really nothing more than a collection of
17202 other groups.
17203
17204 For instance, if you are tired of reading many small groups, you can
17205 put them all in one big group, and then grow tired of reading one
17206 big, unwieldy group.  The joys of computing!
17207
17208 You specify @code{nnvirtual} as the method.  The address should be a
17209 regexp to match component groups.
17210
17211 All marks in the virtual group will stick to the articles in the
17212 component groups.  So if you tick an article in a virtual group, the
17213 article will also be ticked in the component group from whence it
17214 came.  (And vice versa---marks from the component groups will also be
17215 shown in the virtual group.).  To create an empty virtual group, run
17216 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17217 and edit the method regexp with @kbd{M-e}
17218 (@code{gnus-group-edit-group-method})
17219
17220 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17221 newsgroups into one, big, happy newsgroup:
17222
17223 @lisp
17224 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17225 @end lisp
17226
17227 The component groups can be native or foreign; everything should work
17228 smoothly, but if your computer explodes, it was probably my fault.
17229
17230 Collecting the same group from several servers might actually be a good
17231 idea if users have set the Distribution header to limit distribution.
17232 If you would like to read @samp{soc.motss} both from a server in Japan
17233 and a server in Norway, you could use the following as the group regexp:
17234
17235 @example
17236 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17237 @end example
17238
17239 (Remember, though, that if you're creating the group with @kbd{G m}, you
17240 shouldn't double the backslashes, and you should leave off the quote
17241 characters at the beginning and the end of the string.)
17242
17243 This should work kinda smoothly---all articles from both groups should
17244 end up in this one, and there should be no duplicates.  Threading (and
17245 the rest) will still work as usual, but there might be problems with the
17246 sequence of articles.  Sorting on date might be an option here
17247 (@pxref{Selecting a Group}).
17248
17249 One limitation, however---all groups included in a virtual
17250 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17251 zombie groups can't be component groups for @code{nnvirtual} groups.
17252
17253 @vindex nnvirtual-always-rescan
17254 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17255 @code{nnvirtual} will always scan groups for unread articles when
17256 entering a virtual group.  If this variable is @code{nil} (which is the
17257 default) and you read articles in a component group after the virtual
17258 group has been activated, the read articles from the component group
17259 will show up when you enter the virtual group.  You'll also see this
17260 effect if you have two virtual groups that have a component group in
17261 common.  If that's the case, you should set this variable to @code{t}.
17262 Or you can just tap @code{M-g} on the virtual group every time before
17263 you enter it---it'll have much the same effect.
17264
17265 @code{nnvirtual} can have both mail and news groups as component groups.
17266 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17267 has to ask the back end of the component group the article comes from
17268 whether it is a news or mail back end.  However, when you do a @kbd{^},
17269 there is typically no sure way for the component back end to know this,
17270 and in that case @code{nnvirtual} tells Gnus that the article came from a
17271 not-news back end.  (Just to be on the safe side.)
17272
17273 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17274 line from the article you respond to in these cases.
17275
17276 @code{nnvirtual} groups do not inherit anything but articles and marks
17277 from component groups---group parameters, for instance, are not
17278 inherited.
17279
17280
17281 @node Kibozed Groups
17282 @subsection Kibozed Groups
17283 @cindex nnkiboze
17284 @cindex kibozing
17285
17286 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
17287 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
17288 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
17289 down to a halt with useless requests!  Oh happiness!
17290
17291 @kindex G k (Group)
17292 To create a kibozed group, use the @kbd{G k} command in the group
17293 buffer.
17294
17295 The address field of the @code{nnkiboze} method is, as with
17296 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17297 @code{nnkiboze} group.  That's where most similarities between
17298 @code{nnkiboze} and @code{nnvirtual} end.
17299
17300 In addition to this regexp detailing component groups, an
17301 @code{nnkiboze} group must have a score file to say what articles are
17302 to be included in the group (@pxref{Scoring}).
17303
17304 @kindex M-x nnkiboze-generate-groups
17305 @findex nnkiboze-generate-groups
17306 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17307 @code{nnkiboze} groups you want to have.  This command will take time.
17308 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17309 headers from all the articles in all the component groups and run them
17310 through the scoring process to determine if there are any articles in
17311 the groups that are to be part of the @code{nnkiboze} groups.
17312
17313 Please limit the number of component groups by using restrictive
17314 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17315 @acronym{NNTP} site may throw you off and never let you back in again.
17316 Stranger things have happened.
17317
17318 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17319 and they can be foreign.  No restrictions.
17320
17321 @vindex nnkiboze-directory
17322 The generation of an @code{nnkiboze} group means writing two files in
17323 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
17324 One contains the @acronym{NOV} header lines for all the articles in
17325 the group, and the other is an additional @file{.newsrc} file to store
17326 information on what groups have been searched through to find
17327 component articles.
17328
17329 Articles marked as read in the @code{nnkiboze} group will have
17330 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17331
17332
17333 @node Gnus Unplugged
17334 @section Gnus Unplugged
17335 @cindex offline
17336 @cindex unplugged
17337 @cindex agent
17338 @cindex Gnus agent
17339 @cindex Gnus unplugged
17340
17341 In olden times (ca. February '88), people used to run their newsreaders
17342 on big machines with permanent connections to the net.  News transport
17343 was dealt with by news servers, and all the newsreaders had to do was to
17344 read news.  Believe it or not.
17345
17346 Nowadays most people read news and mail at home, and use some sort of
17347 modem to connect to the net.  To avoid running up huge phone bills, it
17348 would be nice to have a way to slurp down all the news and mail, hang up
17349 the phone, read for several hours, and then upload any responses you
17350 have to make.  And then you repeat the procedure.
17351
17352 Of course, you can use news servers for doing this as well.  I've used
17353 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17354 for some years, but doing that's a bore.  Moving the news server
17355 functionality up to the newsreader makes sense if you're the only person
17356 reading news on a machine.
17357
17358 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17359 fact, you don't even have to configure anything.
17360
17361 Of course, to use it as such, you have to learn a few new commands.
17362
17363 @menu
17364 * Agent Basics::                How it all is supposed to work.
17365 * Agent Categories::            How to tell the Gnus Agent what to download.
17366 * Agent Commands::              New commands for all the buffers.
17367 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17368 * Agent as Cache::              The Agent is a big cache too.
17369 * Agent Expiry::                How to make old articles go away.
17370 * Agent Regeneration::          How to recover from lost connections and other accidents.
17371 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17372 * Outgoing Messages::           What happens when you post/mail something?
17373 * Agent Variables::             Customizing is fun.
17374 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17375 * Batching Agents::             How to fetch news from a @code{cron} job.
17376 * Agent Caveats::               What you think it'll do and what it does.
17377 @end menu
17378
17379
17380 @node Agent Basics
17381 @subsection Agent Basics
17382
17383 First, let's get some terminology out of the way.
17384
17385 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17386 connection to the net (and notified the Agent that this is the case).
17387 When the connection to the net is up again (and Gnus knows this), the
17388 Agent is @dfn{plugged}.
17389
17390 The @dfn{local} machine is the one you're running on, and which isn't
17391 connected to the net continuously.
17392
17393 @dfn{Downloading} means fetching things from the net to your local
17394 machine.  @dfn{Uploading} is doing the opposite.
17395
17396 You know that Gnus gives you all the opportunity you'd ever want for
17397 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17398 is also customizable to a great extent, which means that the user has a
17399 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17400 you in your foot, but with Gnus, you have a choice!
17401
17402 Gnus is never really in plugged or unplugged state.  Rather, it applies
17403 that state to each server individually.  This means that some servers
17404 can be plugged while others can be unplugged.  Additionally, some
17405 servers can be ignored by the Agent altogether (which means that
17406 they're kinda like plugged always).
17407
17408 So when you unplug the Agent and then wonder why is Gnus opening a
17409 connection to the Net, the next step to do is to look whether all
17410 servers are agentized.  If there is an unagentized server, you found
17411 the culprit.
17412
17413 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17414 reachable.  When Gnus notices this, it asks you whether you want the
17415 server to be switched to offline state.  If you say yes, then the
17416 server will behave somewhat as if it was unplugged, except that Gnus
17417 will ask you whether you want to switch it back online again.
17418
17419 Let's take a typical Gnus session using the Agent.
17420
17421 @itemize @bullet
17422
17423 @item
17424 @findex gnus-unplugged
17425 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17426 Agent in a disconnected state.  You can read all the news that you have
17427 already fetched while in this mode.
17428
17429 @item
17430 You then decide to see whether any new news has arrived.  You connect
17431 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17432 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17433 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17434 Source Specifiers}).
17435
17436 @item
17437 You can then read the new news immediately, or you can download the
17438 news onto your local machine.  If you want to do the latter, you press
17439 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17440 all the eligible articles in all the groups.  (To let Gnus know which
17441 articles you want to download, @pxref{Agent Categories}).
17442
17443 @item
17444 After fetching the articles, you press @kbd{J j} to make Gnus become
17445 unplugged again, and you shut down the PPP thing (or whatever).  And
17446 then you read the news offline.
17447
17448 @item
17449 And then you go to step 2.
17450 @end itemize
17451
17452 Here are some things you should do the first time (or so) that you use
17453 the Agent.
17454
17455 @itemize @bullet
17456
17457 @item
17458 Decide which servers should be covered by the Agent.  If you have a mail
17459 back end, it would probably be nonsensical to have it covered by the
17460 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17461 @kbd{J a} on the server (or servers) that you wish to have covered by the
17462 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17463 added servers you do not wish to have covered by the Agent.  By default,
17464 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17465 @code{gnus-secondary-select-methods} are agentized.
17466
17467 @item
17468 Decide on download policy.  It's fairly simple once you decide whether
17469 you are going to use agent categories, topic parameters, and/or group
17470 parameters to implement your policy.  If you're new to gnus, it
17471 is probably best to start with a category, @xref{Agent Categories}.
17472
17473 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17474 (@pxref{Agent Categories}) provide for setting a policy that applies
17475 to multiple groups.  Which you use is entirely up to you.  Topic
17476 parameters do override categories so, if you mix the two, you'll have
17477 to take that into account.  If you have a few groups that deviate from
17478 your policy, you can use group parameters (@pxref{Group Parameters}) to
17479 configure them.
17480
17481 @item
17482 Uhm@dots{} that's it.
17483 @end itemize
17484
17485
17486 @node Agent Categories
17487 @subsection Agent Categories
17488
17489 One of the main reasons to integrate the news transport layer into the
17490 newsreader is to allow greater control over what articles to download.
17491 There's not much point in downloading huge amounts of articles, just to
17492 find out that you're not interested in reading any of them.  It's better
17493 to be somewhat more conservative in choosing what to download, and then
17494 mark the articles for downloading manually if it should turn out that
17495 you're interested in the articles anyway.
17496
17497 One of the more effective methods for controlling what is to be
17498 downloaded is to create a @dfn{category} and then assign some (or all)
17499 groups to this category.  Groups that do not belong in any other
17500 category belong to the @code{default} category.  Gnus has its own
17501 buffer for creating and managing categories.
17502
17503 If you prefer, you can also use group parameters (@pxref{Group
17504 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17505 alternative approach to controlling the agent.  The only real
17506 difference is that categories are specific to the agent (so there is
17507 less to learn) while group and topic parameters include the kitchen
17508 sink.
17509
17510 Since you can set agent parameters in several different places we have
17511 a rule to decide which source to believe.  This rule specifies that
17512 the parameter sources are checked in the following order: group
17513 parameters, topic parameters, agent category, and finally customizable
17514 variables.  So you can mix all of these sources to produce a wide range
17515 of behavior, just don't blame me if you don't remember where you put
17516 your settings.
17517
17518 @menu
17519 * Category Syntax::             What a category looks like.
17520 * Category Buffer::             A buffer for maintaining categories.
17521 * Category Variables::          Customize'r'Us.
17522 @end menu
17523
17524
17525 @node Category Syntax
17526 @subsubsection Category Syntax
17527
17528 A category consists of a name, the list of groups belonging to the
17529 category, and a number of optional parameters that override the
17530 customizable variables.  The complete list of agent parameters are
17531 listed below.
17532
17533 @table @code
17534 @item gnus-agent-cat-name
17535 The name of the category.
17536
17537 @item gnus-agent-cat-groups
17538 The list of groups that are in this category.
17539
17540 @item gnus-agent-cat-predicate
17541 A predicate which (generally) gives a rough outline of which articles
17542 are eligible for downloading; and
17543
17544 @item gnus-agent-cat-score-file
17545 a score rule which (generally) gives you a finer granularity when
17546 deciding what articles to download.  (Note that this @dfn{download
17547 score} is not necessarily related to normal scores.)
17548
17549 @item gnus-agent-cat-enable-expiration
17550 a boolean indicating whether the agent should expire old articles in
17551 this group.  Most groups should be expired to conserve disk space.  In
17552 fact, its probably safe to say that the gnus.* hierarchy contains the
17553 only groups that should not be expired.
17554
17555 @item gnus-agent-cat-days-until-old
17556 an integer indicating the number of days that the agent should wait
17557 before deciding that a read article is safe to expire.
17558
17559 @item gnus-agent-cat-low-score
17560 an integer that overrides the value of @code{gnus-agent-low-score}.
17561
17562 @item gnus-agent-cat-high-score
17563 an integer that overrides the value of @code{gnus-agent-high-score}.
17564
17565 @item gnus-agent-cat-length-when-short
17566 an integer that overrides the value of
17567 @code{gnus-agent-short-article}.
17568
17569 @item gnus-agent-cat-length-when-long
17570 an integer that overrides the value of @code{gnus-agent-long-article}.
17571 @end table
17572
17573 The name of a category can not be changed once the category has been
17574 created.
17575
17576 Each category maintains a list of groups that are exclusive members of
17577 that category.  The exclusivity rule is automatically enforced, add a
17578 group to a new category and it is automatically removed from its old
17579 category.
17580
17581 A predicate in its simplest form can be a single predicate such as
17582 @code{true} or @code{false}.  These two will download every available
17583 article or nothing respectively.  In the case of these two special
17584 predicates an additional score rule is superfluous.
17585
17586 Predicates of @code{high} or @code{low} download articles in respect of
17587 their scores in relationship to @code{gnus-agent-high-score} and
17588 @code{gnus-agent-low-score} as described below.
17589
17590 To gain even finer control of what is to be regarded eligible for
17591 download a predicate can consist of a number of predicates with logical
17592 operators sprinkled in between.
17593
17594 Perhaps some examples are in order.
17595
17596 Here's a simple predicate.  (It's the default predicate, in fact, used
17597 for all groups that don't belong to any other category.)
17598
17599 @lisp
17600 short
17601 @end lisp
17602
17603 Quite simple, eh?  This predicate is true if and only if the article is
17604 short (for some value of ``short'').
17605
17606 Here's a more complex predicate:
17607
17608 @lisp
17609 (or high
17610     (and
17611      (not low)
17612      (not long)))
17613 @end lisp
17614
17615 This means that an article should be downloaded if it has a high score,
17616 or if the score is not low and the article is not long.  You get the
17617 drift.
17618
17619 The available logical operators are @code{or}, @code{and} and
17620 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17621 @samp{|}, @code{&} and @code{!} instead.)
17622
17623 The following predicates are pre-defined, but if none of these fit what
17624 you want to do, you can write your own.
17625
17626 When evaluating each of these predicates, the named constant will be
17627 bound to the value determined by calling
17628 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17629 example, gnus-agent-short-article will be bound to
17630 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17631 means that you can specify a predicate in your category then tune that
17632 predicate to individual groups.
17633
17634 @table @code
17635 @item short
17636 True iff the article is shorter than @code{gnus-agent-short-article}
17637 lines; default 100.
17638
17639 @item long
17640 True iff the article is longer than @code{gnus-agent-long-article}
17641 lines; default 200.
17642
17643 @item low
17644 True iff the article has a download score less than
17645 @code{gnus-agent-low-score}; default 0.
17646
17647 @item high
17648 True iff the article has a download score greater than
17649 @code{gnus-agent-high-score}; default 0.
17650
17651 @item spam
17652 True iff the Gnus Agent guesses that the article is spam.  The
17653 heuristics may change over time, but at present it just computes a
17654 checksum and sees whether articles match.
17655
17656 @item true
17657 Always true.
17658
17659 @item false
17660 Always false.
17661 @end table
17662
17663 If you want to create your own predicate function, here's what you have
17664 to know:  The functions are called with no parameters, but the
17665 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17666 useful values.
17667
17668 For example, you could decide that you don't want to download articles
17669 that were posted more than a certain number of days ago (e.g. posted
17670 more than @code{gnus-agent-expire-days} ago) you might write a function
17671 something along the lines of the following:
17672
17673 @lisp
17674 (defun my-article-old-p ()
17675   "Say whether an article is old."
17676   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17677      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17678 @end lisp
17679
17680 with the predicate then defined as:
17681
17682 @lisp
17683 (not my-article-old-p)
17684 @end lisp
17685
17686 or you could append your predicate to the predefined
17687 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17688 wherever.
17689
17690 @lisp
17691 (require 'gnus-agent)
17692 (setq  gnus-category-predicate-alist
17693   (append gnus-category-predicate-alist
17694          '((old . my-article-old-p))))
17695 @end lisp
17696
17697 and simply specify your predicate as:
17698
17699 @lisp
17700 (not old)
17701 @end lisp
17702
17703 If/when using something like the above, be aware that there are many
17704 misconfigured systems/mailers out there and so an article's date is not
17705 always a reliable indication of when it was posted.  Hell, some people
17706 just don't give a damn.
17707
17708 The above predicates apply to @emph{all} the groups which belong to the
17709 category.  However, if you wish to have a specific predicate for an
17710 individual group within a category, or you're just too lazy to set up a
17711 new category, you can enter a group's individual predicate in its group
17712 parameters like so:
17713
17714 @lisp
17715 (agent-predicate . short)
17716 @end lisp
17717
17718 This is the group/topic parameter equivalent of the agent category default.
17719 Note that when specifying a single word predicate like this, the
17720 @code{agent-predicate} specification must be in dotted pair notation.
17721
17722 The equivalent of the longer example from above would be:
17723
17724 @lisp
17725 (agent-predicate or high (and (not low) (not long)))
17726 @end lisp
17727
17728 The outer parenthesis required in the category specification are not
17729 entered here as, not being in dotted pair notation, the value of the
17730 predicate is assumed to be a list.
17731
17732
17733 Now, the syntax of the download score is the same as the syntax of
17734 normal score files, except that all elements that require actually
17735 seeing the article itself are verboten.  This means that only the
17736 following headers can be scored on: @code{Subject}, @code{From},
17737 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17738 @code{Lines}, and @code{Xref}.
17739
17740 As with predicates, the specification of the @code{download score rule}
17741 to use in respect of a group can be in either the category definition if
17742 it's to be applicable to all groups in therein, or a group's parameters
17743 if it's to be specific to that group.
17744
17745 In both of these places the @code{download score rule} can take one of
17746 three forms:
17747
17748 @enumerate
17749 @item
17750 Score rule
17751
17752 This has the same syntax as a normal Gnus score file except only a
17753 subset of scoring keywords are available as mentioned above.
17754
17755 example:
17756
17757 @itemize @bullet
17758 @item
17759 Category specification
17760
17761 @lisp
17762 (("from"
17763        ("Lars Ingebrigtsen" 1000000 nil s))
17764 ("lines"
17765        (500 -100 nil <)))
17766 @end lisp
17767
17768 @item
17769 Group/Topic Parameter specification
17770
17771 @lisp
17772 (agent-score ("from"
17773                    ("Lars Ingebrigtsen" 1000000 nil s))
17774              ("lines"
17775                    (500 -100 nil <)))
17776 @end lisp
17777
17778 Again, note the omission of the outermost parenthesis here.
17779 @end itemize
17780
17781 @item
17782 Agent score file
17783
17784 These score files must @emph{only} contain the permitted scoring
17785 keywords stated above.
17786
17787 example:
17788
17789 @itemize @bullet
17790 @item
17791 Category specification
17792
17793 @lisp
17794 ("~/News/agent.SCORE")
17795 @end lisp
17796
17797 or perhaps
17798
17799 @lisp
17800 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17801 @end lisp
17802
17803 @item
17804 Group Parameter specification
17805
17806 @lisp
17807 (agent-score "~/News/agent.SCORE")
17808 @end lisp
17809
17810 Additional score files can be specified as above.  Need I say anything
17811 about parenthesis?
17812 @end itemize
17813
17814 @item
17815 Use @code{normal} score files
17816
17817 If you don't want to maintain two sets of scoring rules for a group, and
17818 your desired @code{downloading} criteria for a group are the same as your
17819 @code{reading} criteria then you can tell the agent to refer to your
17820 @code{normal} score files when deciding what to download.
17821
17822 These directives in either the category definition or a group's
17823 parameters will cause the agent to read in all the applicable score
17824 files for a group, @emph{filtering out} those sections that do not
17825 relate to one of the permitted subset of scoring keywords.
17826
17827 @itemize @bullet
17828 @item
17829 Category Specification
17830
17831 @lisp
17832 file
17833 @end lisp
17834
17835 @item
17836 Group Parameter specification
17837
17838 @lisp
17839 (agent-score . file)
17840 @end lisp
17841 @end itemize
17842 @end enumerate
17843
17844 @node Category Buffer
17845 @subsubsection Category Buffer
17846
17847 You'd normally do all category maintenance from the category buffer.
17848 When you enter it for the first time (with the @kbd{J c} command from
17849 the group buffer), you'll only see the @code{default} category.
17850
17851 The following commands are available in this buffer:
17852
17853 @table @kbd
17854 @item q
17855 @kindex q (Category)
17856 @findex gnus-category-exit
17857 Return to the group buffer (@code{gnus-category-exit}).
17858
17859 @item e
17860 @kindex e (Category)
17861 @findex gnus-category-customize-category
17862 Use a customization buffer to set all of the selected category's
17863 parameters at one time (@code{gnus-category-customize-category}).
17864
17865 @item k
17866 @kindex k (Category)
17867 @findex gnus-category-kill
17868 Kill the current category (@code{gnus-category-kill}).
17869
17870 @item c
17871 @kindex c (Category)
17872 @findex gnus-category-copy
17873 Copy the current category (@code{gnus-category-copy}).
17874
17875 @item a
17876 @kindex a (Category)
17877 @findex gnus-category-add
17878 Add a new category (@code{gnus-category-add}).
17879
17880 @item p
17881 @kindex p (Category)
17882 @findex gnus-category-edit-predicate
17883 Edit the predicate of the current category
17884 (@code{gnus-category-edit-predicate}).
17885
17886 @item g
17887 @kindex g (Category)
17888 @findex gnus-category-edit-groups
17889 Edit the list of groups belonging to the current category
17890 (@code{gnus-category-edit-groups}).
17891
17892 @item s
17893 @kindex s (Category)
17894 @findex gnus-category-edit-score
17895 Edit the download score rule of the current category
17896 (@code{gnus-category-edit-score}).
17897
17898 @item l
17899 @kindex l (Category)
17900 @findex gnus-category-list
17901 List all the categories (@code{gnus-category-list}).
17902 @end table
17903
17904
17905 @node Category Variables
17906 @subsubsection Category Variables
17907
17908 @table @code
17909 @item gnus-category-mode-hook
17910 @vindex gnus-category-mode-hook
17911 Hook run in category buffers.
17912
17913 @item gnus-category-line-format
17914 @vindex gnus-category-line-format
17915 Format of the lines in the category buffer (@pxref{Formatting
17916 Variables}).  Valid elements are:
17917
17918 @table @samp
17919 @item c
17920 The name of the category.
17921
17922 @item g
17923 The number of groups in the category.
17924 @end table
17925
17926 @item gnus-category-mode-line-format
17927 @vindex gnus-category-mode-line-format
17928 Format of the category mode line (@pxref{Mode Line Formatting}).
17929
17930 @item gnus-agent-short-article
17931 @vindex gnus-agent-short-article
17932 Articles that have fewer lines than this are short.  Default 100.
17933
17934 @item gnus-agent-long-article
17935 @vindex gnus-agent-long-article
17936 Articles that have more lines than this are long.  Default 200.
17937
17938 @item gnus-agent-low-score
17939 @vindex gnus-agent-low-score
17940 Articles that have a score lower than this have a low score.  Default
17941 0.
17942
17943 @item gnus-agent-high-score
17944 @vindex gnus-agent-high-score
17945 Articles that have a score higher than this have a high score.  Default
17946 0.
17947
17948 @item gnus-agent-expire-days
17949 @vindex gnus-agent-expire-days
17950 The number of days that a @samp{read} article must stay in the agent's
17951 local disk before becoming eligible for expiration (While the name is
17952 the same, this doesn't mean expiring the article on the server.  It
17953 just means deleting the local copy of the article).  What is also
17954 important to understand is that the counter starts with the time the
17955 article was written to the local disk and not the time the article was
17956 read.
17957 Default 7.
17958
17959 @item gnus-agent-enable-expiration
17960 @vindex gnus-agent-enable-expiration
17961 Determines whether articles in a group are, by default, expired or
17962 retained indefinitely.  The default is @code{ENABLE} which means that
17963 you'll have to disable expiration when desired.  On the other hand,
17964 you could set this to @code{DISABLE}.  In that case, you would then
17965 have to enable expiration in selected groups.
17966
17967 @end table
17968
17969
17970 @node Agent Commands
17971 @subsection Agent Commands
17972 @findex gnus-agent-toggle-plugged
17973 @kindex J j (Agent)
17974
17975 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17976 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17977 toggles the plugged/unplugged state of the Gnus Agent.
17978
17979
17980 @menu
17981 * Group Agent Commands::        Configure groups and fetch their contents.
17982 * Summary Agent Commands::      Manually select then fetch specific articles.
17983 * Server Agent Commands::       Select the servers that are supported by the agent.
17984 @end menu
17985
17986
17987
17988
17989 @node Group Agent Commands
17990 @subsubsection Group Agent Commands
17991
17992 @table @kbd
17993 @item J u
17994 @kindex J u (Agent Group)
17995 @findex gnus-agent-fetch-groups
17996 Fetch all eligible articles in the current group
17997 (@code{gnus-agent-fetch-groups}).
17998
17999 @item J c
18000 @kindex J c (Agent Group)
18001 @findex gnus-enter-category-buffer
18002 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
18003
18004 @item J s
18005 @kindex J s (Agent Group)
18006 @findex gnus-agent-fetch-session
18007 Fetch all eligible articles in all groups
18008 (@code{gnus-agent-fetch-session}).
18009
18010 @item J S
18011 @kindex J S (Agent Group)
18012 @findex gnus-group-send-queue
18013 Send all sendable messages in the queue group
18014 (@code{gnus-group-send-queue}).  @xref{Drafts}.
18015
18016 @item J a
18017 @kindex J a (Agent Group)
18018 @findex gnus-agent-add-group
18019 Add the current group to an Agent category
18020 (@code{gnus-agent-add-group}).  This command understands the
18021 process/prefix convention (@pxref{Process/Prefix}).
18022
18023 @item J r
18024 @kindex J r (Agent Group)
18025 @findex gnus-agent-remove-group
18026 Remove the current group from its category, if any
18027 (@code{gnus-agent-remove-group}).  This command understands the
18028 process/prefix convention (@pxref{Process/Prefix}).
18029
18030 @item J Y
18031 @kindex J Y (Agent Group)
18032 @findex gnus-agent-synchronize-flags
18033 Synchronize flags changed while unplugged with remote server, if any.
18034
18035
18036 @end table
18037
18038
18039 @node Summary Agent Commands
18040 @subsubsection Summary Agent Commands
18041
18042 @table @kbd
18043 @item J #
18044 @kindex J # (Agent Summary)
18045 @findex gnus-agent-mark-article
18046 Mark the article for downloading (@code{gnus-agent-mark-article}).
18047
18048 @item J M-#
18049 @kindex J M-# (Agent Summary)
18050 @findex gnus-agent-unmark-article
18051 Remove the downloading mark from the article
18052 (@code{gnus-agent-unmark-article}).
18053
18054 @cindex %
18055 @item @@
18056 @kindex @@ (Agent Summary)
18057 @findex gnus-agent-toggle-mark
18058 Toggle whether to download the article
18059 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
18060 default.
18061
18062 @item J c
18063 @kindex J c (Agent Summary)
18064 @findex gnus-agent-catchup
18065 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
18066
18067 @item J S
18068 @kindex J S (Agent Summary)
18069 @findex gnus-agent-fetch-group
18070 Download all eligible (@pxref{Agent Categories}) articles in this group.
18071 (@code{gnus-agent-fetch-group}).
18072
18073 @item J s
18074 @kindex J s (Agent Summary)
18075 @findex gnus-agent-fetch-series
18076 Download all processable articles in this group.
18077 (@code{gnus-agent-fetch-series}).
18078
18079 @item J u
18080 @kindex J u (Agent Summary)
18081 @findex gnus-agent-summary-fetch-group
18082 Download all downloadable articles in the current group
18083 (@code{gnus-agent-summary-fetch-group}).
18084
18085 @end table
18086
18087
18088 @node Server Agent Commands
18089 @subsubsection Server Agent Commands
18090
18091 @table @kbd
18092 @item J a
18093 @kindex J a (Agent Server)
18094 @findex gnus-agent-add-server
18095 Add the current server to the list of servers covered by the Gnus Agent
18096 (@code{gnus-agent-add-server}).
18097
18098 @item J r
18099 @kindex J r (Agent Server)
18100 @findex gnus-agent-remove-server
18101 Remove the current server from the list of servers covered by the Gnus
18102 Agent (@code{gnus-agent-remove-server}).
18103
18104 @end table
18105
18106
18107 @node Agent Visuals
18108 @subsection Agent Visuals
18109
18110 If you open a summary while unplugged and, Gnus knows from the group's
18111 active range that there are more articles than the headers currently
18112 stored in the Agent, you may see some articles whose subject looks
18113 something like @samp{[Undownloaded article #####]}.  These are
18114 placeholders for the missing headers.  Aside from setting a mark,
18115 there is not much that can be done with one of these placeholders.
18116 When Gnus finally gets a chance to fetch the group's headers, the
18117 placeholders will automatically be replaced by the actual headers.
18118 You can configure the summary buffer's maneuvering to skip over the
18119 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18120
18121 While it may be obvious to all, the only headers and articles
18122 available while unplugged are those headers and articles that were
18123 fetched into the Agent while previously plugged.  To put it another
18124 way, "If you forget to fetch something while plugged, you might have a
18125 less than satisfying unplugged session".  For this reason, the Agent
18126 adds two visual effects to your summary buffer.  These effects display
18127 the download status of each article so that you always know which
18128 articles will be available when unplugged.
18129
18130 The first visual effect is the @samp{%O} spec.  If you customize
18131 @code{gnus-summary-line-format} to include this specifier, you will add
18132 a single character field that indicates an article's download status.
18133 Articles that have been fetched into either the Agent or the Cache,
18134 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18135 other articles will display @code{gnus-undownloaded-mark} (defaults to
18136 @samp{-}).  If you open a group that has not been agentized, a space
18137 (@samp{ }) will be displayed.
18138
18139 The second visual effect are the undownloaded faces.  The faces, there
18140 are three indicating the article's score (low, normal, high), seem to
18141 result in a love/hate response from many Gnus users.  The problem is
18142 that the face selection is controlled by a list of condition tests and
18143 face names (See @code{gnus-summary-highlight}).  Each condition is
18144 tested in the order in which it appears in the list so early
18145 conditions have precedence over later conditions.  All of this means
18146 that, if you tick an undownloaded article, the article will continue
18147 to be displayed in the undownloaded face rather than the ticked face.
18148
18149 If you use the Agent as a cache (to avoid downloading the same article
18150 each time you visit it or to minimize your connection time), the
18151 undownloaded face will probably seem like a good idea.  The reason
18152 being that you do all of our work (marking, reading, deleting) with
18153 downloaded articles so the normal faces always appear.
18154
18155 For occasional Agent users, the undownloaded faces may appear to be an
18156 absolutely horrible idea.  The issue being that, since most of their
18157 articles have not been fetched into the Agent, most of the normal
18158 faces will be obscured by the undownloaded faces.  If this is your
18159 situation, you have two choices available.  First, you can completely
18160 disable the undownload faces by customizing
18161 @code{gnus-summary-highlight} to delete the three cons-cells that
18162 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18163 you prefer to take a more fine-grained approach, you may set the
18164 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18165 parameter, like all other agent parameters, may be set on an Agent
18166 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18167 Parameters}), or an individual group (@pxref{Group Parameters}).
18168
18169 @node Agent as Cache
18170 @subsection Agent as Cache
18171
18172 When Gnus is plugged, it is not efficient to download headers or
18173 articles from the server again, if they are already stored in the
18174 Agent.  So, Gnus normally only downloads headers once, and stores them
18175 in the Agent.  These headers are later used when generating the summary
18176 buffer, regardless of whether you are plugged or unplugged.  Articles
18177 are not cached in the Agent by default though (that would potentially
18178 consume lots of disk space), but if you have already downloaded an
18179 article into the Agent, Gnus will not download the article from the
18180 server again but use the locally stored copy instead.
18181
18182 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18183 @pxref{Agent Variables}) to always download headers and articles while
18184 plugged.  Gnus will almost certainly be slower, but it will be kept
18185 synchronized with the server.  That last point probably won't make any
18186 sense if you are using a nntp or nnimap back end.
18187
18188 @node Agent Expiry
18189 @subsection Agent Expiry
18190
18191 @vindex gnus-agent-expire-days
18192 @findex gnus-agent-expire
18193 @kindex M-x gnus-agent-expire
18194 @kindex M-x gnus-agent-expire-group
18195 @findex gnus-agent-expire-group
18196 @cindex agent expiry
18197 @cindex Gnus agent expiry
18198 @cindex expiry
18199
18200 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18201 least it doesn't handle it like other back ends.  Instead, there are
18202 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18203 commands that will expire all read articles that are older than
18204 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18205 that you're running out of space.  Neither are particularly fast or
18206 efficient, and it's not a particularly good idea to interrupt them (with
18207 @kbd{C-g} or anything else) once you've started one of them.
18208
18209 Note that other functions, e.g. @code{gnus-request-expire-articles},
18210 might run @code{gnus-agent-expire} for you to keep the agent
18211 synchronized with the group.
18212
18213 The agent parameter @code{agent-enable-expiration} may be used to
18214 prevent expiration in selected groups.
18215
18216 @vindex gnus-agent-expire-all
18217 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18218 expiration commands will expire all articles---unread, read, ticked
18219 and dormant.  If @code{nil} (which is the default), only read articles
18220 are eligible for expiry, and unread, ticked and dormant articles will
18221 be kept indefinitely.
18222
18223 If you find that some articles eligible for expiry are never expired,
18224 perhaps some Gnus Agent files are corrupted.  There's are special
18225 commands, @code{gnus-agent-regenerate} and
18226 @code{gnus-agent-regenerate-group}, to fix possible problems.
18227
18228 @node Agent Regeneration
18229 @subsection Agent Regeneration
18230
18231 @cindex agent regeneration
18232 @cindex Gnus agent regeneration
18233 @cindex regeneration
18234
18235 The local data structures used by @code{nnagent} may become corrupted
18236 due to certain exceptional conditions.  When this happens,
18237 @code{nnagent} functionality may degrade or even fail.  The solution
18238 to this problem is to repair the local data structures by removing all
18239 internal inconsistencies.
18240
18241 For example, if your connection to your server is lost while
18242 downloaded articles into the agent, the local data structures will not
18243 know about articles successfully downloaded prior to the connection
18244 failure.  Running @code{gnus-agent-regenerate} or
18245 @code{gnus-agent-regenerate-group} will update the data structures
18246 such that you don't need to download these articles a second time.
18247
18248 @findex gnus-agent-regenerate
18249 @kindex M-x gnus-agent-regenerate
18250 The command @code{gnus-agent-regenerate} will perform
18251 @code{gnus-agent-regenerate-group} on every agentized group.  While
18252 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18253 recommended that you first close all summary buffers.
18254
18255 @findex gnus-agent-regenerate-group
18256 @kindex M-x gnus-agent-regenerate-group
18257 The command @code{gnus-agent-regenerate-group} uses the local copies
18258 of individual articles to repair the local @acronym{NOV}(header) database.  It
18259 then updates the internal data structures that document which articles
18260 are stored locally.  An optional argument will mark articles in the
18261 agent as unread.
18262
18263 @node Agent and IMAP
18264 @subsection Agent and IMAP
18265
18266 The Agent works with any Gnus back end, including nnimap.  However,
18267 since there are some conceptual differences between @acronym{NNTP} and
18268 @acronym{IMAP}, this section (should) provide you with some information to
18269 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18270
18271 The first thing to keep in mind is that all flags (read, ticked, etc)
18272 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18273 case for nntp.  Thus Gnus need to remember flag changes when
18274 disconnected, and synchronize these flags when you plug back in.
18275
18276 Gnus keeps track of flag changes when reading nnimap groups under the
18277 Agent.  When you plug back in, Gnus will check if you have any changed
18278 any flags and ask if you wish to synchronize these with the server.
18279 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18280
18281 @vindex gnus-agent-synchronize-flags
18282 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18283 never automatically synchronize flags.  If it is @code{ask}, which is
18284 the default, the Agent will check if you made any changes and if so
18285 ask if you wish to synchronize these when you re-connect.  If it has
18286 any other value, all flags will be synchronized automatically.
18287
18288 If you do not wish to synchronize flags automatically when you
18289 re-connect, you can do it manually with the
18290 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18291 in the group buffer.
18292
18293 Some things are currently not implemented in the Agent that you'd might
18294 expect from a disconnected @acronym{IMAP} client, including:
18295
18296 @itemize @bullet
18297
18298 @item
18299 Copying/moving articles into nnimap groups when unplugged.
18300
18301 @item
18302 Creating/deleting nnimap groups when unplugged.
18303
18304 @end itemize
18305
18306 Technical note: the synchronization algorithm does not work by ``pushing''
18307 all local flags to the server, but rather incrementally update the
18308 server view of flags by changing only those flags that were changed by
18309 the user.  Thus, if you set one flag on an article, quit the group and
18310 re-select the group and remove the flag; the flag will be set and
18311 removed from the server when you ``synchronize''.  The queued flag
18312 operations can be found in the per-server @code{flags} file in the Agent
18313 directory.  It's emptied when you synchronize flags.
18314
18315
18316 @node Outgoing Messages
18317 @subsection Outgoing Messages
18318
18319 When Gnus is unplugged, all outgoing messages (both mail and news) are
18320 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18321 them there after posting, and edit them at will.
18322
18323 When Gnus is plugged again, you can send the messages either from the
18324 draft group with the special commands available there, or you can use
18325 the @kbd{J S} command in the group buffer to send all the sendable
18326 messages in the draft group.
18327
18328
18329
18330 @node Agent Variables
18331 @subsection Agent Variables
18332
18333 @table @code
18334 @item gnus-agent-directory
18335 @vindex gnus-agent-directory
18336 Where the Gnus Agent will store its files.  The default is
18337 @file{~/News/agent/}.
18338
18339 @item gnus-agent-handle-level
18340 @vindex gnus-agent-handle-level
18341 Groups on levels (@pxref{Group Levels}) higher than this variable will
18342 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18343 which means that only subscribed group will be considered by the Agent
18344 by default.
18345
18346 @item gnus-agent-plugged-hook
18347 @vindex gnus-agent-plugged-hook
18348 Hook run when connecting to the network.
18349
18350 @item gnus-agent-unplugged-hook
18351 @vindex gnus-agent-unplugged-hook
18352 Hook run when disconnecting from the network.
18353
18354 @item gnus-agent-fetched-hook
18355 @vindex gnus-agent-fetched-hook
18356 Hook run when finished fetching articles.
18357
18358 @item gnus-agent-cache
18359 @vindex gnus-agent-cache
18360 Variable to control whether use the locally stored @acronym{NOV} and
18361 articles when plugged, e.g. essentially using the Agent as a cache.
18362 The default is non-@code{nil}, which means to use the Agent as a cache.
18363
18364 @item gnus-agent-go-online
18365 @vindex gnus-agent-go-online
18366 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18367 automatically switch offline servers into online status.  If it is
18368 @code{ask}, the default, the Agent will ask if you wish to switch
18369 offline servers into online status when you re-connect.  If it has any
18370 other value, all offline servers will be automatically switched into
18371 online status.
18372
18373 @item gnus-agent-mark-unread-after-downloaded
18374 @vindex gnus-agent-mark-unread-after-downloaded
18375 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18376 mark articles as unread after downloading.  This is usually a safe
18377 thing to do as the newly downloaded article has obviously not been
18378 read.  The default is t.
18379
18380 @item gnus-agent-consider-all-articles
18381 @vindex gnus-agent-consider-all-articles
18382 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18383 agent will fetch all missing headers.  When @code{nil}, the agent will
18384 fetch only new headers.  The default is @code{nil}.
18385
18386 @item gnus-agent-max-fetch-size
18387 @vindex gnus-agent-max-fetch-size
18388 The agent fetches articles into a temporary buffer prior to parsing
18389 them into individual files.  To avoid exceeding the max. buffer size,
18390 the agent alternates between fetching and parsing until all articles
18391 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18392 limit to control how often the cycling occurs.  A large value improves
18393 performance.  A small value minimizes the time lost should the
18394 connection be lost while fetching (You may need to run
18395 @code{gnus-agent-regenerate-group} to update the group's state.
18396 However, all articles parsed prior to loosing the connection will be
18397 available while unplugged).  The default is 10M so it is unusual to
18398 see any cycling.
18399
18400 @item gnus-server-unopen-status
18401 @vindex gnus-server-unopen-status
18402 Perhaps not an Agent variable, but closely related to the Agent, this
18403 variable says what will happen if Gnus cannot open a server.  If the
18404 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18405 whether to deny the server or whether to unplug the agent.  If the
18406 Agent is disabled, Gnus always simply deny the server.  Other choices
18407 for this variable include @code{denied} and @code{offline} the latter
18408 is only valid if the Agent is used.
18409
18410 @item gnus-auto-goto-ignores
18411 @vindex gnus-auto-goto-ignores
18412 Another variable that isn't an Agent variable, yet so closely related
18413 that most will look for it here, this variable tells the summary
18414 buffer how to maneuver around undownloaded (only headers stored in the
18415 agent) and unfetched (neither article nor headers stored) articles.
18416
18417 The legal values are @code{nil} (maneuver to any article),
18418 @code{undownloaded} (maneuvering while unplugged ignores articles that
18419 have not been fetched), @code{always-undownloaded} (maneuvering always
18420 ignores articles that have not been fetched), @code{unfetched}
18421 (maneuvering ignores articles whose headers have not been fetched).
18422
18423 @end table
18424
18425
18426 @node Example Setup
18427 @subsection Example Setup
18428
18429 If you don't want to read this manual, and you have a fairly standard
18430 setup, you may be able to use something like the following as your
18431 @file{~/.gnus.el} file to get started.
18432
18433 @lisp
18434 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18435 ;;; @r{from your ISP's server.}
18436 (setq gnus-select-method '(nntp "news.your-isp.com"))
18437
18438 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18439 ;;; @r{your ISP's @acronym{POP} server.}
18440 (setq mail-sources '((pop :server "pop.your-isp.com")))
18441
18442 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18443 (setq gnus-secondary-select-methods '((nnml "")))
18444
18445 ;;; @r{Make Gnus into an offline newsreader.}
18446 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18447 ;;; (setq gnus-agent t) ; @r{Now the default.}
18448 @end lisp
18449
18450 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18451 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18452 gnus}.
18453
18454 If this is the first time you've run Gnus, you will be subscribed
18455 automatically to a few default newsgroups.  You'll probably want to
18456 subscribe to more groups, and to do that, you have to query the
18457 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18458 command.  This usually takes quite a while, but you only have to do it
18459 once.
18460
18461 After reading and parsing a while, you'll be presented with a list of
18462 groups.  Subscribe to the ones you want to read with the @kbd{u}
18463 command.  @kbd{l} to make all the killed groups disappear after you've
18464 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18465 back all the killed groups.)
18466
18467 You can now read the groups at once, or you can download the articles
18468 with the @kbd{J s} command.  And then read the rest of this manual to
18469 find out which of the other gazillion things you want to customize.
18470
18471
18472 @node Batching Agents
18473 @subsection Batching Agents
18474 @findex gnus-agent-batch
18475
18476 Having the Gnus Agent fetch articles (and post whatever messages you've
18477 written) is quite easy once you've gotten things set up properly.  The
18478 following shell script will do everything that is necessary:
18479
18480 You can run a complete batch command from the command line with the
18481 following incantation:
18482
18483 @example
18484 #!/bin/sh
18485 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18486 @end example
18487
18488
18489 @node Agent Caveats
18490 @subsection Agent Caveats
18491
18492 The Gnus Agent doesn't seem to work like most other offline
18493 newsreaders.  Here are some common questions that some imaginary people
18494 may ask:
18495
18496 @table @dfn
18497 @item If I read an article while plugged, do they get entered into the Agent?
18498
18499 @strong{No}.  If you want this behaviour, add
18500 @code{gnus-agent-fetch-selected-article} to
18501 @code{gnus-select-article-hook}.
18502
18503 @item If I read an article while plugged, and the article already exists in
18504 the Agent, will it get downloaded once more?
18505
18506 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18507
18508 @end table
18509
18510 In short, when Gnus is unplugged, it only looks into the locally stored
18511 articles; when it's plugged, it talks to your ISP and may also use the
18512 locally stored articles.
18513
18514
18515 @node Scoring
18516 @chapter Scoring
18517 @cindex scoring
18518
18519 Other people use @dfn{kill files}, but we here at Gnus Towers like
18520 scoring better than killing, so we'd rather switch than fight.  They do
18521 something completely different as well, so sit up straight and pay
18522 attention!
18523
18524 @vindex gnus-summary-mark-below
18525 All articles have a default score (@code{gnus-summary-default-score}),
18526 which is 0 by default.  This score may be raised or lowered either
18527 interactively or by score files.  Articles that have a score lower than
18528 @code{gnus-summary-mark-below} are marked as read.
18529
18530 Gnus will read any @dfn{score files} that apply to the current group
18531 before generating the summary buffer.
18532
18533 There are several commands in the summary buffer that insert score
18534 entries based on the current article.  You can, for instance, ask Gnus to
18535 lower or increase the score of all articles with a certain subject.
18536
18537 There are two sorts of scoring entries: Permanent and temporary.
18538 Temporary score entries are self-expiring entries.  Any entries that are
18539 temporary and have not been used for, say, a week, will be removed
18540 silently to help keep the sizes of the score files down.
18541
18542 @menu
18543 * Summary Score Commands::      Adding score entries for the current group.
18544 * Group Score Commands::        General score commands.
18545 * Score Variables::             Customize your scoring.  (My, what terminology).
18546 * Score File Format::           What a score file may contain.
18547 * Score File Editing::          You can edit score files by hand as well.
18548 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18549 * Home Score File::             How to say where new score entries are to go.
18550 * Followups To Yourself::       Having Gnus notice when people answer you.
18551 * Scoring On Other Headers::    Scoring on non-standard headers.
18552 * Scoring Tips::                How to score effectively.
18553 * Reverse Scoring::             That problem child of old is not problem.
18554 * Global Score Files::          Earth-spanning, ear-splitting score files.
18555 * Kill Files::                  They are still here, but they can be ignored.
18556 * Converting Kill Files::       Translating kill files to score files.
18557 * GroupLens::                   Getting predictions on what you like to read.
18558 * Advanced Scoring::            Using logical expressions to build score rules.
18559 * Score Decays::                It can be useful to let scores wither away.
18560 @end menu
18561
18562
18563 @node Summary Score Commands
18564 @section Summary Score Commands
18565 @cindex score commands
18566
18567 The score commands that alter score entries do not actually modify real
18568 score files.  That would be too inefficient.  Gnus maintains a cache of
18569 previously loaded score files, one of which is considered the
18570 @dfn{current score file alist}.  The score commands simply insert
18571 entries into this list, and upon group exit, this list is saved.
18572
18573 The current score file is by default the group's local score file, even
18574 if no such score file actually exists.  To insert score commands into
18575 some other score file (e.g. @file{all.SCORE}), you must first make this
18576 score file the current one.
18577
18578 General score commands that don't actually change the score file:
18579
18580 @table @kbd
18581
18582 @item V s
18583 @kindex V s (Summary)
18584 @findex gnus-summary-set-score
18585 Set the score of the current article (@code{gnus-summary-set-score}).
18586
18587 @item V S
18588 @kindex V S (Summary)
18589 @findex gnus-summary-current-score
18590 Display the score of the current article
18591 (@code{gnus-summary-current-score}).
18592
18593 @item V t
18594 @kindex V t (Summary)
18595 @findex gnus-score-find-trace
18596 Display all score rules that have been used on the current article
18597 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18598 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18599 When point is on a string within the match element, @kbd{e} will try to
18600 bring you to this string in the score file.
18601
18602 @item V w
18603 @kindex V w (Summary)
18604 @findex gnus-score-find-favourite-words
18605 List words used in scoring (@code{gnus-score-find-favourite-words}).
18606
18607 @item V R
18608 @kindex V R (Summary)
18609 @findex gnus-summary-rescore
18610 Run the current summary through the scoring process
18611 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18612 around with your score files behind Gnus' back and want to see the
18613 effect you're having.
18614
18615 @item V c
18616 @kindex V c (Summary)
18617 @findex gnus-score-change-score-file
18618 Make a different score file the current
18619 (@code{gnus-score-change-score-file}).
18620
18621 @item V e
18622 @kindex V e (Summary)
18623 @findex gnus-score-edit-current-scores
18624 Edit the current score file (@code{gnus-score-edit-current-scores}).
18625 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18626 File Editing}).
18627
18628 @item V f
18629 @kindex V f (Summary)
18630 @findex gnus-score-edit-file
18631 Edit a score file and make this score file the current one
18632 (@code{gnus-score-edit-file}).
18633
18634 @item V F
18635 @kindex V F (Summary)
18636 @findex gnus-score-flush-cache
18637 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18638 after editing score files.
18639
18640 @item V C
18641 @kindex V C (Summary)
18642 @findex gnus-score-customize
18643 Customize a score file in a visually pleasing manner
18644 (@code{gnus-score-customize}).
18645
18646 @end table
18647
18648 The rest of these commands modify the local score file.
18649
18650 @table @kbd
18651
18652 @item V m
18653 @kindex V m (Summary)
18654 @findex gnus-score-set-mark-below
18655 Prompt for a score, and mark all articles with a score below this as
18656 read (@code{gnus-score-set-mark-below}).
18657
18658 @item V x
18659 @kindex V x (Summary)
18660 @findex gnus-score-set-expunge-below
18661 Prompt for a score, and add a score rule to the current score file to
18662 expunge all articles below this score
18663 (@code{gnus-score-set-expunge-below}).
18664 @end table
18665
18666 The keystrokes for actually making score entries follow a very regular
18667 pattern, so there's no need to list all the commands.  (Hundreds of
18668 them.)
18669
18670 @findex gnus-summary-increase-score
18671 @findex gnus-summary-lower-score
18672
18673 @enumerate
18674 @item
18675 The first key is either @kbd{I} (upper case i) for increasing the score
18676 or @kbd{L} for lowering the score.
18677 @item
18678 The second key says what header you want to score on.  The following
18679 keys are available:
18680 @table @kbd
18681
18682 @item a
18683 Score on the author name.
18684
18685 @item s
18686 Score on the subject line.
18687
18688 @item x
18689 Score on the @code{Xref} line---i.e., the cross-posting line.
18690
18691 @item r
18692 Score on the @code{References} line.
18693
18694 @item d
18695 Score on the date.
18696
18697 @item l
18698 Score on the number of lines.
18699
18700 @item i
18701 Score on the @code{Message-ID} header.
18702
18703 @item e
18704 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18705 if your @acronym{NNTP} server tracks additional header data in overviews.
18706
18707 @item f
18708 Score on followups---this matches the author name, and adds scores to
18709 the followups to this author.  (Using this key leads to the creation of
18710 @file{ADAPT} files.)
18711
18712 @item b
18713 Score on the body.
18714
18715 @item h
18716 Score on the head.
18717
18718 @item t
18719 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18720 files.)
18721
18722 @end table
18723
18724 @item
18725 The third key is the match type.  Which match types are valid depends on
18726 what headers you are scoring on.
18727
18728 @table @code
18729
18730 @item strings
18731
18732 @table @kbd
18733
18734 @item e
18735 Exact matching.
18736
18737 @item s
18738 Substring matching.
18739
18740 @item f
18741 Fuzzy matching (@pxref{Fuzzy Matching}).
18742
18743 @item r
18744 Regexp matching
18745 @end table
18746
18747 @item date
18748 @table @kbd
18749
18750 @item b
18751 Before date.
18752
18753 @item a
18754 After date.
18755
18756 @item n
18757 This date.
18758 @end table
18759
18760 @item number
18761 @table @kbd
18762
18763 @item <
18764 Less than number.
18765
18766 @item =
18767 Equal to number.
18768
18769 @item >
18770 Greater than number.
18771 @end table
18772 @end table
18773
18774 @item
18775 The fourth and usually final key says whether this is a temporary (i.e.,
18776 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18777 or whether it is to be done immediately, without adding to the score
18778 file.
18779 @table @kbd
18780
18781 @item t
18782 Temporary score entry.
18783
18784 @item p
18785 Permanent score entry.
18786
18787 @item i
18788 Immediately scoring.
18789 @end table
18790
18791 @item
18792 If you are scoring on `e' (extra) headers, you will then be prompted for
18793 the header name on which you wish to score.  This must be a header named
18794 in gnus-extra-headers, and @samp{TAB} completion is available.
18795
18796 @end enumerate
18797
18798 So, let's say you want to increase the score on the current author with
18799 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18800 score based on the subject line, using substring matching, and make a
18801 temporary score entry: @kbd{L s s t}.  Pretty easy.
18802
18803 To make things a bit more complicated, there are shortcuts.  If you use
18804 a capital letter on either the second or third keys, Gnus will use
18805 defaults for the remaining one or two keystrokes.  The defaults are
18806 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18807 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18808
18809 These functions take both the numerical prefix and the symbolic prefix
18810 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18811 (or increase) the score of the article.  A symbolic prefix of @code{a}
18812 says to use the @file{all.SCORE} file for the command instead of the
18813 current score file.
18814
18815 @vindex gnus-score-mimic-keymap
18816 The @code{gnus-score-mimic-keymap} says whether these commands will
18817 pretend they are keymaps or not.
18818
18819
18820 @node Group Score Commands
18821 @section Group Score Commands
18822 @cindex group score commands
18823
18824 There aren't many of these as yet, I'm afraid.
18825
18826 @table @kbd
18827
18828 @item W f
18829 @kindex W f (Group)
18830 @findex gnus-score-flush-cache
18831 Gnus maintains a cache of score alists to avoid having to reload them
18832 all the time.  This command will flush the cache
18833 (@code{gnus-score-flush-cache}).
18834
18835 @end table
18836
18837 You can do scoring from the command line by saying something like:
18838
18839 @findex gnus-batch-score
18840 @cindex batch scoring
18841 @example
18842 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18843 @end example
18844
18845
18846 @node Score Variables
18847 @section Score Variables
18848 @cindex score variables
18849
18850 @table @code
18851
18852 @item gnus-use-scoring
18853 @vindex gnus-use-scoring
18854 If @code{nil}, Gnus will not check for score files, and will not, in
18855 general, do any score-related work.  This is @code{t} by default.
18856
18857 @item gnus-kill-killed
18858 @vindex gnus-kill-killed
18859 If this variable is @code{nil}, Gnus will never apply score files to
18860 articles that have already been through the kill process.  While this
18861 may save you lots of time, it also means that if you apply a kill file
18862 to a group, and then change the kill file and want to run it over you
18863 group again to kill more articles, it won't work.  You have to set this
18864 variable to @code{t} to do that.  (It is @code{t} by default.)
18865
18866 @item gnus-kill-files-directory
18867 @vindex gnus-kill-files-directory
18868 All kill and score files will be stored in this directory, which is
18869 initialized from the @env{SAVEDIR} environment variable by default.
18870 This is @file{~/News/} by default.
18871
18872 @item gnus-score-file-suffix
18873 @vindex gnus-score-file-suffix
18874 Suffix to add to the group name to arrive at the score file name
18875 (@file{SCORE} by default.)
18876
18877 @item gnus-score-uncacheable-files
18878 @vindex gnus-score-uncacheable-files
18879 @cindex score cache
18880 All score files are normally cached to avoid excessive re-loading of
18881 score files.  However, if this might make your Emacs grow big and
18882 bloated, so this regexp can be used to weed out score files unlikely
18883 to be needed again.  It would be a bad idea to deny caching of
18884 @file{all.SCORE}, while it might be a good idea to not cache
18885 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18886 variable is @samp{ADAPT$} by default, so no adaptive score files will
18887 be cached.
18888
18889 @item gnus-save-score
18890 @vindex gnus-save-score
18891 If you have really complicated score files, and do lots of batch
18892 scoring, then you might set this variable to @code{t}.  This will make
18893 Gnus save the scores into the @file{.newsrc.eld} file.
18894
18895 If you do not set this to @code{t}, then manual scores (like those set
18896 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18897 across group visits.
18898
18899 @item gnus-score-interactive-default-score
18900 @vindex gnus-score-interactive-default-score
18901 Score used by all the interactive raise/lower commands to raise/lower
18902 score with.  Default is 1000, which may seem excessive, but this is to
18903 ensure that the adaptive scoring scheme gets enough room to play with.
18904 We don't want the small changes from the adaptive scoring to overwrite
18905 manually entered data.
18906
18907 @item gnus-summary-default-score
18908 @vindex gnus-summary-default-score
18909 Default score of an article, which is 0 by default.
18910
18911 @item gnus-summary-expunge-below
18912 @vindex gnus-summary-expunge-below
18913 Don't display the summary lines of articles that have scores lower than
18914 this variable.  This is @code{nil} by default, which means that no
18915 articles will be hidden.  This variable is local to the summary buffers,
18916 and has to be set from @code{gnus-summary-mode-hook}.
18917
18918 @item gnus-score-over-mark
18919 @vindex gnus-score-over-mark
18920 Mark (in the third column) used for articles with a score over the
18921 default.  Default is @samp{+}.
18922
18923 @item gnus-score-below-mark
18924 @vindex gnus-score-below-mark
18925 Mark (in the third column) used for articles with a score below the
18926 default.  Default is @samp{-}.
18927
18928 @item gnus-score-find-score-files-function
18929 @vindex gnus-score-find-score-files-function
18930 Function used to find score files for the current group.  This function
18931 is called with the name of the group as the argument.
18932
18933 Predefined functions available are:
18934 @table @code
18935
18936 @item gnus-score-find-single
18937 @findex gnus-score-find-single
18938 Only apply the group's own score file.
18939
18940 @item gnus-score-find-bnews
18941 @findex gnus-score-find-bnews
18942 Apply all score files that match, using bnews syntax.  This is the
18943 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18944 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18945 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18946 @samp{all} in the score file names are translated into @samp{.*}, and
18947 then a regexp match is done.
18948
18949 This means that if you have some score entries that you want to apply to
18950 all groups, then you put those entries in the @file{all.SCORE} file.
18951
18952 The score files are applied in a semi-random order, although Gnus will
18953 try to apply the more general score files before the more specific score
18954 files.  It does this by looking at the number of elements in the score
18955 file names---discarding the @samp{all} elements.
18956
18957 @item gnus-score-find-hierarchical
18958 @findex gnus-score-find-hierarchical
18959 Apply all score files from all the parent groups.  This means that you
18960 can't have score files like @file{all.SCORE}, but you can have
18961 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18962 server.
18963
18964 @end table
18965 This variable can also be a list of functions.  In that case, all
18966 these functions will be called with the group name as argument, and
18967 all the returned lists of score files will be applied.  These
18968 functions can also return lists of lists of score alists directly.  In
18969 that case, the functions that return these non-file score alists
18970 should probably be placed before the ``real'' score file functions, to
18971 ensure that the last score file returned is the local score file.
18972 Phu.
18973
18974 For example, to do hierarchical scoring but use a non-server-specific
18975 overall score file, you could use the value
18976 @example
18977 (list (lambda (group) ("all.SCORE"))
18978       'gnus-score-find-hierarchical)
18979 @end example
18980
18981 @item gnus-score-expiry-days
18982 @vindex gnus-score-expiry-days
18983 This variable says how many days should pass before an unused score file
18984 entry is expired.  If this variable is @code{nil}, no score file entries
18985 are expired.  It's 7 by default.
18986
18987 @item gnus-update-score-entry-dates
18988 @vindex gnus-update-score-entry-dates
18989 If this variable is non-@code{nil}, temporary score entries that have
18990 been triggered (matched) will have their dates updated.  (This is how Gnus
18991 controls expiry---all non-matched-entries will become too old while
18992 matched entries will stay fresh and young.)  However, if you set this
18993 variable to @code{nil}, even matched entries will grow old and will
18994 have to face that oh-so grim reaper.
18995
18996 @item gnus-score-after-write-file-function
18997 @vindex gnus-score-after-write-file-function
18998 Function called with the name of the score file just written.
18999
19000 @item gnus-score-thread-simplify
19001 @vindex gnus-score-thread-simplify
19002 If this variable is non-@code{nil}, article subjects will be
19003 simplified for subject scoring purposes in the same manner as with
19004 threading---according to the current value of
19005 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
19006 @code{substring} or @code{exact} matching, the match will also be
19007 simplified in this manner.
19008
19009 @end table
19010
19011
19012 @node Score File Format
19013 @section Score File Format
19014 @cindex score file format
19015
19016 A score file is an @code{emacs-lisp} file that normally contains just a
19017 single form.  Casual users are not expected to edit these files;
19018 everything can be changed from the summary buffer.
19019
19020 Anyway, if you'd like to dig into it yourself, here's an example:
19021
19022 @lisp
19023 (("from"
19024   ("Lars Ingebrigtsen" -10000)
19025   ("Per Abrahamsen")
19026   ("larsi\\|lmi" -50000 nil R))
19027  ("subject"
19028   ("Ding is Badd" nil 728373))
19029  ("xref"
19030   ("alt.politics" -1000 728372 s))
19031  ("lines"
19032   (2 -100 nil <))
19033  (mark 0)
19034  (expunge -1000)
19035  (mark-and-expunge -10)
19036  (read-only nil)
19037  (orphan -10)
19038  (adapt t)
19039  (files "/hom/larsi/News/gnu.SCORE")
19040  (exclude-files "all.SCORE")
19041  (local (gnus-newsgroup-auto-expire t)
19042         (gnus-summary-make-false-root empty))
19043  (eval (ding)))
19044 @end lisp
19045
19046 This example demonstrates most score file elements.  @xref{Advanced
19047 Scoring}, for a different approach.
19048
19049 Even though this looks much like Lisp code, nothing here is actually
19050 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
19051 has to be valid syntactically, if not semantically.
19052
19053 Six keys are supported by this alist:
19054
19055 @table @code
19056
19057 @item STRING
19058 If the key is a string, it is the name of the header to perform the
19059 match on.  Scoring can only be performed on these eight headers:
19060 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
19061 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
19062 these headers, there are three strings to tell Gnus to fetch the entire
19063 article and do the match on larger parts of the article: @code{Body}
19064 will perform the match on the body of the article, @code{Head} will
19065 perform the match on the head of the article, and @code{All} will
19066 perform the match on the entire article.  Note that using any of these
19067 last three keys will slow down group entry @emph{considerably}.  The
19068 final ``header'' you can score on is @code{Followup}.  These score
19069 entries will result in new score entries being added for all follow-ups
19070 to articles that matches these score entries.
19071
19072 Following this key is an arbitrary number of score entries, where each
19073 score entry has one to four elements.
19074 @enumerate
19075
19076 @item
19077 The first element is the @dfn{match element}.  On most headers this will
19078 be a string, but on the Lines and Chars headers, this must be an
19079 integer.
19080
19081 @item
19082 If the second element is present, it should be a number---the @dfn{score
19083 element}.  This number should be an integer in the neginf to posinf
19084 interval.  This number is added to the score of the article if the match
19085 is successful.  If this element is not present, the
19086 @code{gnus-score-interactive-default-score} number will be used
19087 instead.  This is 1000 by default.
19088
19089 @item
19090 If the third element is present, it should be a number---the @dfn{date
19091 element}.  This date says when the last time this score entry matched,
19092 which provides a mechanism for expiring the score entries.  It this
19093 element is not present, the score entry is permanent.  The date is
19094 represented by the number of days since December 31, 1 BCE.
19095
19096 @item
19097 If the fourth element is present, it should be a symbol---the @dfn{type
19098 element}.  This element specifies what function should be used to see
19099 whether this score entry matches the article.  What match types that can
19100 be used depends on what header you wish to perform the match on.
19101 @table @dfn
19102
19103 @item From, Subject, References, Xref, Message-ID
19104 For most header types, there are the @code{r} and @code{R} (regexp), as
19105 well as @code{s} and @code{S} (substring) types, and @code{e} and
19106 @code{E} (exact match), and @code{w} (word match) types.  If this
19107 element is not present, Gnus will assume that substring matching should
19108 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19109 that the matches will be done in a case-sensitive manner.  All these
19110 one-letter types are really just abbreviations for the @code{regexp},
19111 @code{string}, @code{exact}, and @code{word} types, which you can use
19112 instead, if you feel like.
19113
19114 @item Extra
19115 Just as for the standard string overview headers, if you are using
19116 gnus-extra-headers, you can score on these headers' values.  In this
19117 case, there is a 5th element in the score entry, being the name of the
19118 header to be scored.  The following entry is useful in your
19119 @file{all.SCORE} file in case of spam attacks from a single origin
19120 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
19121 overviews:
19122
19123 @lisp
19124 ("111.222.333.444" -1000 nil s
19125  "NNTP-Posting-Host")
19126 @end lisp
19127
19128 @item Lines, Chars
19129 These two headers use different match types: @code{<}, @code{>},
19130 @code{=}, @code{>=} and @code{<=}.
19131
19132 These predicates are true if
19133
19134 @example
19135 (PREDICATE HEADER MATCH)
19136 @end example
19137
19138 evaluates to non-@code{nil}.  For instance, the advanced match
19139 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19140 following form:
19141
19142 @lisp
19143 (< header-value 4)
19144 @end lisp
19145
19146 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19147 the match, we get the score added if the article has less than 4 lines.
19148 (It's easy to get confused and think it's the other way around.  But
19149 it's not.  I think.)
19150
19151 When matching on @code{Lines}, be careful because some back ends (like
19152 @code{nndir}) do not generate @code{Lines} header, so every article ends
19153 up being marked as having 0 lines.  This can lead to strange results if
19154 you happen to lower score of the articles with few lines.
19155
19156 @item Date
19157 For the Date header we have three kinda silly match types:
19158 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19159 ever being useful, but, like, it would feel kinda silly not to provide
19160 this function.  Just in case.  You never know.  Better safe than sorry.
19161 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19162 sex on a first date.  (I have been told that at least one person, and I
19163 quote, ``found this function indispensable'', however.)
19164
19165 @cindex ISO8601
19166 @cindex date
19167 A more useful match type is @code{regexp}.  With it, you can match the
19168 date string using a regular expression.  The date is normalized to
19169 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19170 you want to match all articles that have been posted on April 1st in
19171 every year, you could use @samp{....0401.........} as a match string,
19172 for instance.  (Note that the date is kept in its original time zone, so
19173 this will match articles that were posted when it was April 1st where
19174 the article was posted from.  Time zones are such wholesome fun for the
19175 whole family, eh?)
19176
19177 @item Head, Body, All
19178 These three match keys use the same match types as the @code{From} (etc)
19179 header uses.
19180
19181 @item Followup
19182 This match key is somewhat special, in that it will match the
19183 @code{From} header, and affect the score of not only the matching
19184 articles, but also all followups to the matching articles.  This allows
19185 you e.g. increase the score of followups to your own articles, or
19186 decrease the score of followups to the articles of some known
19187 trouble-maker.  Uses the same match types as the @code{From} header
19188 uses.  (Using this match key will lead to creation of @file{ADAPT}
19189 files.)
19190
19191 @item Thread
19192 This match key works along the same lines as the @code{Followup} match
19193 key.  If you say that you want to score on a (sub-)thread started by an
19194 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19195 match.  This will add a new @samp{thread} match for each article that
19196 has @var{x} in its @code{References} header.  (These new @samp{thread}
19197 matches will use the @code{Message-ID}s of these matching articles.)
19198 This will ensure that you can raise/lower the score of an entire thread,
19199 even though some articles in the thread may not have complete
19200 @code{References} headers.  Note that using this may lead to
19201 undeterministic scores of the articles in the thread.  (Using this match
19202 key will lead to creation of @file{ADAPT} files.)
19203 @end table
19204 @end enumerate
19205
19206 @cindex score file atoms
19207 @item mark
19208 The value of this entry should be a number.  Any articles with a score
19209 lower than this number will be marked as read.
19210
19211 @item expunge
19212 The value of this entry should be a number.  Any articles with a score
19213 lower than this number will be removed from the summary buffer.
19214
19215 @item mark-and-expunge
19216 The value of this entry should be a number.  Any articles with a score
19217 lower than this number will be marked as read and removed from the
19218 summary buffer.
19219
19220 @item thread-mark-and-expunge
19221 The value of this entry should be a number.  All articles that belong to
19222 a thread that has a total score below this number will be marked as read
19223 and removed from the summary buffer.  @code{gnus-thread-score-function}
19224 says how to compute the total score for a thread.
19225
19226 @item files
19227 The value of this entry should be any number of file names.  These files
19228 are assumed to be score files as well, and will be loaded the same way
19229 this one was.
19230
19231 @item exclude-files
19232 The clue of this entry should be any number of files.  These files will
19233 not be loaded, even though they would normally be so, for some reason or
19234 other.
19235
19236 @item eval
19237 The value of this entry will be @code{eval}el.  This element will be
19238 ignored when handling global score files.
19239
19240 @item read-only
19241 Read-only score files will not be updated or saved.  Global score files
19242 should feature this atom (@pxref{Global Score Files}).  (Note:
19243 @dfn{Global} here really means @dfn{global}; not your personal
19244 apply-to-all-groups score files.)
19245
19246 @item orphan
19247 The value of this entry should be a number.  Articles that do not have
19248 parents will get this number added to their scores.  Imagine you follow
19249 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19250 will only follow a few of the threads, also want to see any new threads.
19251
19252 You can do this with the following two score file entries:
19253
19254 @example
19255         (orphan -500)
19256         (mark-and-expunge -100)
19257 @end example
19258
19259 When you enter the group the first time, you will only see the new
19260 threads.  You then raise the score of the threads that you find
19261 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19262 rest.  Next time you enter the group, you will see new articles in the
19263 interesting threads, plus any new threads.
19264
19265 I.e.---the orphan score atom is for high-volume groups where a few
19266 interesting threads which can't be found automatically by ordinary
19267 scoring rules exist.
19268
19269 @item adapt
19270 This entry controls the adaptive scoring.  If it is @code{t}, the
19271 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19272 adaptive scoring will be performed on this group.  If it is a list, this
19273 list will be used as the adaptive scoring rules.  If it isn't present,
19274 or is something other than @code{t} or @code{ignore}, the default
19275 adaptive scoring rules will be used.  If you want to use adaptive
19276 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19277 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19278 not want adaptive scoring.  If you only want adaptive scoring in a few
19279 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19280 insert @code{(adapt t)} in the score files of the groups where you want
19281 it.
19282
19283 @item adapt-file
19284 All adaptive score entries will go to the file named by this entry.  It
19285 will also be applied when entering the group.  This atom might be handy
19286 if you want to adapt on several groups at once, using the same adaptive
19287 file for a number of groups.
19288
19289 @item local
19290 @cindex local variables
19291 The value of this entry should be a list of @code{(@var{var}
19292 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19293 current summary buffer, and set to the value specified.  This is a
19294 convenient, if somewhat strange, way of setting variables in some
19295 groups if you don't like hooks much.  Note that the @var{value} won't
19296 be evaluated.
19297 @end table
19298
19299
19300 @node Score File Editing
19301 @section Score File Editing
19302
19303 You normally enter all scoring commands from the summary buffer, but you
19304 might feel the urge to edit them by hand as well, so we've supplied you
19305 with a mode for that.
19306
19307 It's simply a slightly customized @code{emacs-lisp} mode, with these
19308 additional commands:
19309
19310 @table @kbd
19311
19312 @item C-c C-c
19313 @kindex C-c C-c (Score)
19314 @findex gnus-score-edit-done
19315 Save the changes you have made and return to the summary buffer
19316 (@code{gnus-score-edit-done}).
19317
19318 @item C-c C-d
19319 @kindex C-c C-d (Score)
19320 @findex gnus-score-edit-insert-date
19321 Insert the current date in numerical format
19322 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19323 you were wondering.
19324
19325 @item C-c C-p
19326 @kindex C-c C-p (Score)
19327 @findex gnus-score-pretty-print
19328 The adaptive score files are saved in an unformatted fashion.  If you
19329 intend to read one of these files, you want to @dfn{pretty print} it
19330 first.  This command (@code{gnus-score-pretty-print}) does that for
19331 you.
19332
19333 @end table
19334
19335 Type @kbd{M-x gnus-score-mode} to use this mode.
19336
19337 @vindex gnus-score-mode-hook
19338 @code{gnus-score-menu-hook} is run in score mode buffers.
19339
19340 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19341 e} to begin editing score files.
19342
19343
19344 @node Adaptive Scoring
19345 @section Adaptive Scoring
19346 @cindex adaptive scoring
19347
19348 If all this scoring is getting you down, Gnus has a way of making it all
19349 happen automatically---as if by magic.  Or rather, as if by artificial
19350 stupidity, to be precise.
19351
19352 @vindex gnus-use-adaptive-scoring
19353 When you read an article, or mark an article as read, or kill an
19354 article, you leave marks behind.  On exit from the group, Gnus can sniff
19355 these marks and add score elements depending on what marks it finds.
19356 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19357 @code{t} or @code{(line)}.  If you want score adaptively on separate
19358 words appearing in the subjects, you should set this variable to
19359 @code{(word)}.  If you want to use both adaptive methods, set this
19360 variable to @code{(word line)}.
19361
19362 @vindex gnus-default-adaptive-score-alist
19363 To give you complete control over the scoring process, you can customize
19364 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19365 might look something like this:
19366
19367 @lisp
19368 (setq gnus-default-adaptive-score-alist
19369   '((gnus-unread-mark)
19370     (gnus-ticked-mark (from 4))
19371     (gnus-dormant-mark (from 5))
19372     (gnus-del-mark (from -4) (subject -1))
19373     (gnus-read-mark (from 4) (subject 2))
19374     (gnus-expirable-mark (from -1) (subject -1))
19375     (gnus-killed-mark (from -1) (subject -3))
19376     (gnus-kill-file-mark)
19377     (gnus-ancient-mark)
19378     (gnus-low-score-mark)
19379     (gnus-catchup-mark (from -1) (subject -1))))
19380 @end lisp
19381
19382 As you see, each element in this alist has a mark as a key (either a
19383 variable name or a ``real'' mark---a character).  Following this key is
19384 a arbitrary number of header/score pairs.  If there are no header/score
19385 pairs following the key, no adaptive scoring will be done on articles
19386 that have that key as the article mark.  For instance, articles with
19387 @code{gnus-unread-mark} in the example above will not get adaptive score
19388 entries.
19389
19390 Each article can have only one mark, so just a single of these rules
19391 will be applied to each article.
19392
19393 To take @code{gnus-del-mark} as an example---this alist says that all
19394 articles that have that mark (i.e., are marked with @samp{e}) will have a
19395 score entry added to lower based on the @code{From} header by -4, and
19396 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19397
19398 If you have marked 10 articles with the same subject with
19399 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19400 That means that that subject will get a score of ten times -1, which
19401 should be, unless I'm much mistaken, -10.
19402
19403 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19404 the read articles will be marked with the @samp{E} mark.  This'll
19405 probably make adaptive scoring slightly impossible, so auto-expiring and
19406 adaptive scoring doesn't really mix very well.
19407
19408 The headers you can score on are @code{from}, @code{subject},
19409 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19410 @code{chars} and @code{date}.  In addition, you can score on
19411 @code{followup}, which will create an adaptive score entry that matches
19412 on the @code{References} header using the @code{Message-ID} of the
19413 current article, thereby matching the following thread.
19414
19415 If you use this scheme, you should set the score file atom @code{mark}
19416 to something small---like -300, perhaps, to avoid having small random
19417 changes result in articles getting marked as read.
19418
19419 After using adaptive scoring for a week or so, Gnus should start to
19420 become properly trained and enhance the authors you like best, and kill
19421 the authors you like least, without you having to say so explicitly.
19422
19423 You can control what groups the adaptive scoring is to be performed on
19424 by using the score files (@pxref{Score File Format}).  This will also
19425 let you use different rules in different groups.
19426
19427 @vindex gnus-adaptive-file-suffix
19428 The adaptive score entries will be put into a file where the name is the
19429 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19430 is @file{ADAPT}.
19431
19432 @vindex gnus-score-exact-adapt-limit
19433 When doing adaptive scoring, substring or fuzzy matching would probably
19434 give you the best results in most cases.  However, if the header one
19435 matches is short, the possibility for false positives is great, so if
19436 the length of the match is less than
19437 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19438 this variable is @code{nil}, exact matching will always be used to avoid
19439 this problem.
19440
19441 @vindex gnus-default-adaptive-word-score-alist
19442 As mentioned above, you can adapt either on individual words or entire
19443 headers.  If you adapt on words, the
19444 @code{gnus-default-adaptive-word-score-alist} variable says what score
19445 each instance of a word should add given a mark.
19446
19447 @lisp
19448 (setq gnus-default-adaptive-word-score-alist
19449       `((,gnus-read-mark . 30)
19450         (,gnus-catchup-mark . -10)
19451         (,gnus-killed-mark . -20)
19452         (,gnus-del-mark . -15)))
19453 @end lisp
19454
19455 This is the default value.  If you have adaption on words enabled, every
19456 word that appears in subjects of articles marked with
19457 @code{gnus-read-mark} will result in a score rule that increase the
19458 score with 30 points.
19459
19460 @vindex gnus-default-ignored-adaptive-words
19461 @vindex gnus-ignored-adaptive-words
19462 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19463 will be ignored.  If you wish to add more words to be ignored, use the
19464 @code{gnus-ignored-adaptive-words} list instead.
19465
19466 @vindex gnus-adaptive-word-length-limit
19467 Some may feel that short words shouldn't count when doing adaptive
19468 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19469 an integer.  Words shorter than this number will be ignored.  This
19470 variable defaults to @code{nil}.
19471
19472 @vindex gnus-adaptive-word-syntax-table
19473 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19474 syntax table in effect.  It is similar to the standard syntax table, but
19475 it considers numbers to be non-word-constituent characters.
19476
19477 @vindex gnus-adaptive-word-minimum
19478 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19479 word scoring process will never bring down the score of an article to
19480 below this number.  The default is @code{nil}.
19481
19482 @vindex gnus-adaptive-word-no-group-words
19483 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19484 won't adaptively word score any of the words in the group name.  Useful
19485 for groups like @samp{comp.editors.emacs}, where most of the subject
19486 lines contain the word @samp{emacs}.
19487
19488 After using this scheme for a while, it might be nice to write a
19489 @code{gnus-psychoanalyze-user} command to go through the rules and see
19490 what words you like and what words you don't like.  Or perhaps not.
19491
19492 Note that the adaptive word scoring thing is highly experimental and is
19493 likely to change in the future.  Initial impressions seem to indicate
19494 that it's totally useless as it stands.  Some more work (involving more
19495 rigorous statistical methods) will have to be done to make this useful.
19496
19497
19498 @node Home Score File
19499 @section Home Score File
19500
19501 The score file where new score file entries will go is called the
19502 @dfn{home score file}.  This is normally (and by default) the score file
19503 for the group itself.  For instance, the home score file for
19504 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19505
19506 However, this may not be what you want.  It is often convenient to share
19507 a common home score file among many groups---all @samp{emacs} groups
19508 could perhaps use the same home score file.
19509
19510 @vindex gnus-home-score-file
19511 The variable that controls this is @code{gnus-home-score-file}.  It can
19512 be:
19513
19514 @enumerate
19515 @item
19516 A string.  Then this file will be used as the home score file for all
19517 groups.
19518
19519 @item
19520 A function.  The result of this function will be used as the home score
19521 file.  The function will be called with the name of the group as the
19522 parameter.
19523
19524 @item
19525 A list.  The elements in this list can be:
19526
19527 @enumerate
19528 @item
19529 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19530 group name, the @var{file-name} will be used as the home score file.
19531
19532 @item
19533 A function.  If the function returns non-@code{nil}, the result will
19534 be used as the home score file.
19535
19536 @item
19537 A string.  Use the string as the home score file.
19538 @end enumerate
19539
19540 The list will be traversed from the beginning towards the end looking
19541 for matches.
19542
19543 @end enumerate
19544
19545 So, if you want to use just a single score file, you could say:
19546
19547 @lisp
19548 (setq gnus-home-score-file
19549       "my-total-score-file.SCORE")
19550 @end lisp
19551
19552 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19553 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19554
19555 @findex gnus-hierarchial-home-score-file
19556 @lisp
19557 (setq gnus-home-score-file
19558       'gnus-hierarchial-home-score-file)
19559 @end lisp
19560
19561 This is a ready-made function provided for your convenience.
19562 Other functions include
19563
19564 @table @code
19565 @item gnus-current-home-score-file
19566 @findex gnus-current-home-score-file
19567 Return the ``current'' regular score file.  This will make scoring
19568 commands add entry to the ``innermost'' matching score file.
19569
19570 @end table
19571
19572 If you want to have one score file for the @samp{emacs} groups and
19573 another for the @samp{comp} groups, while letting all other groups use
19574 their own home score files:
19575
19576 @lisp
19577 (setq gnus-home-score-file
19578       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19579       '(("\\.emacs" "emacs.SCORE")
19580         ;; @r{All the comp groups in one score file}
19581         ("^comp" "comp.SCORE")))
19582 @end lisp
19583
19584 @vindex gnus-home-adapt-file
19585 @code{gnus-home-adapt-file} works exactly the same way as
19586 @code{gnus-home-score-file}, but says what the home adaptive score file
19587 is instead.  All new adaptive file entries will go into the file
19588 specified by this variable, and the same syntax is allowed.
19589
19590 In addition to using @code{gnus-home-score-file} and
19591 @code{gnus-home-adapt-file}, you can also use group parameters
19592 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19593 Parameters}) to achieve much the same.  Group and topic parameters take
19594 precedence over this variable.
19595
19596
19597 @node Followups To Yourself
19598 @section Followups To Yourself
19599
19600 Gnus offers two commands for picking out the @code{Message-ID} header in
19601 the current buffer.  Gnus will then add a score rule that scores using
19602 this @code{Message-ID} on the @code{References} header of other
19603 articles.  This will, in effect, increase the score of all articles that
19604 respond to the article in the current buffer.  Quite useful if you want
19605 to easily note when people answer what you've said.
19606
19607 @table @code
19608
19609 @item gnus-score-followup-article
19610 @findex gnus-score-followup-article
19611 This will add a score to articles that directly follow up your own
19612 article.
19613
19614 @item gnus-score-followup-thread
19615 @findex gnus-score-followup-thread
19616 This will add a score to all articles that appear in a thread ``below''
19617 your own article.
19618 @end table
19619
19620 @vindex message-sent-hook
19621 These two functions are both primarily meant to be used in hooks like
19622 @code{message-sent-hook}, like this:
19623 @lisp
19624 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19625 @end lisp
19626
19627
19628 If you look closely at your own @code{Message-ID}, you'll notice that
19629 the first two or three characters are always the same.  Here's two of
19630 mine:
19631
19632 @example
19633 <x6u3u47icf.fsf@@eyesore.no>
19634 <x6sp9o7ibw.fsf@@eyesore.no>
19635 @end example
19636
19637 So ``my'' ident on this machine is @samp{x6}.  This can be
19638 exploited---the following rule will raise the score on all followups to
19639 myself:
19640
19641 @lisp
19642 ("references"
19643  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19644   1000 nil r))
19645 @end lisp
19646
19647 Whether it's the first two or first three characters that are ``yours''
19648 is system-dependent.
19649
19650
19651 @node Scoring On Other Headers
19652 @section Scoring On Other Headers
19653 @cindex scoring on other headers
19654
19655 Gnus is quite fast when scoring the ``traditional''
19656 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19657 other headers requires writing a @code{head} scoring rule, which means
19658 that Gnus has to request every single article from the back end to find
19659 matches.  This takes a long time in big groups.
19660
19661 Now, there's not much you can do about this for news groups, but for
19662 mail groups, you have greater control.  In @ref{To From Newsgroups},
19663 it's explained in greater detail what this mechanism does, but here's
19664 a cookbook example for @code{nnml} on how to allow scoring on the
19665 @samp{To} and @samp{Cc} headers.
19666
19667 Put the following in your @file{~/.gnus.el} file.
19668
19669 @lisp
19670 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19671       nnmail-extra-headers gnus-extra-headers)
19672 @end lisp
19673
19674 Restart Gnus and rebuild your @code{nnml} overview files with the
19675 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19676 time if you have much mail.
19677
19678 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19679 so: @kbd{I e s p To RET <your name> RET}.
19680
19681 See?  Simple.
19682
19683
19684 @node Scoring Tips
19685 @section Scoring Tips
19686 @cindex scoring tips
19687
19688 @table @dfn
19689
19690 @item Crossposts
19691 @cindex crossposts
19692 @cindex scoring crossposts
19693 If you want to lower the score of crossposts, the line to match on is
19694 the @code{Xref} header.
19695 @lisp
19696 ("xref" (" talk.politics.misc:" -1000))
19697 @end lisp
19698
19699 @item Multiple crossposts
19700 If you want to lower the score of articles that have been crossposted to
19701 more than, say, 3 groups:
19702 @lisp
19703 ("xref"
19704   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19705    -1000 nil r))
19706 @end lisp
19707
19708 @item Matching on the body
19709 This is generally not a very good idea---it takes a very long time.
19710 Gnus actually has to fetch each individual article from the server.  But
19711 you might want to anyway, I guess.  Even though there are three match
19712 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19713 and stick with it in each score file.  If you use any two, each article
19714 will be fetched @emph{twice}.  If you want to match a bit on the
19715 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19716 the matches.
19717
19718 @item Marking as read
19719 You will probably want to mark articles that have scores below a certain
19720 number as read.  This is most easily achieved by putting the following
19721 in your @file{all.SCORE} file:
19722 @lisp
19723 ((mark -100))
19724 @end lisp
19725 You may also consider doing something similar with @code{expunge}.
19726
19727 @item Negated character classes
19728 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19729 That will match newlines, which might lead to, well, The Unknown.  Say
19730 @code{[^abcd\n]*} instead.
19731 @end table
19732
19733
19734 @node Reverse Scoring
19735 @section Reverse Scoring
19736 @cindex reverse scoring
19737
19738 If you want to keep just articles that have @samp{Sex with Emacs} in the
19739 subject header, and expunge all other articles, you could put something
19740 like this in your score file:
19741
19742 @lisp
19743 (("subject"
19744   ("Sex with Emacs" 2))
19745  (mark 1)
19746  (expunge 1))
19747 @end lisp
19748
19749 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19750 rest as read, and expunge them to boot.
19751
19752
19753 @node Global Score Files
19754 @section Global Score Files
19755 @cindex global score files
19756
19757 Sure, other newsreaders have ``global kill files''.  These are usually
19758 nothing more than a single kill file that applies to all groups, stored
19759 in the user's home directory.  Bah!  Puny, weak newsreaders!
19760
19761 What I'm talking about here are Global Score Files.  Score files from
19762 all over the world, from users everywhere, uniting all nations in one
19763 big, happy score file union!  Ange-score!  New and untested!
19764
19765 @vindex gnus-global-score-files
19766 All you have to do to use other people's score files is to set the
19767 @code{gnus-global-score-files} variable.  One entry for each score file,
19768 or each score file directory.  Gnus will decide by itself what score
19769 files are applicable to which group.
19770
19771 To use the score file
19772 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19773 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19774 say this:
19775
19776 @lisp
19777 (setq gnus-global-score-files
19778       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19779         "/ftp@@ftp.some-where:/pub/score/"))
19780 @end lisp
19781
19782 @findex gnus-score-search-global-directories
19783 @noindent
19784 Simple, eh?  Directory names must end with a @samp{/}.  These
19785 directories are typically scanned only once during each Gnus session.
19786 If you feel the need to manually re-scan the remote directories, you can
19787 use the @code{gnus-score-search-global-directories} command.
19788
19789 Note that, at present, using this option will slow down group entry
19790 somewhat.  (That is---a lot.)
19791
19792 If you want to start maintaining score files for other people to use,
19793 just put your score file up for anonymous ftp and announce it to the
19794 world.  Become a retro-moderator!  Participate in the retro-moderator
19795 wars sure to ensue, where retro-moderators battle it out for the
19796 sympathy of the people, luring them to use their score files on false
19797 premises!  Yay!  The net is saved!
19798
19799 Here are some tips for the would-be retro-moderator, off the top of my
19800 head:
19801
19802 @itemize @bullet
19803
19804 @item
19805 Articles heavily crossposted are probably junk.
19806 @item
19807 To lower a single inappropriate article, lower by @code{Message-ID}.
19808 @item
19809 Particularly brilliant authors can be raised on a permanent basis.
19810 @item
19811 Authors that repeatedly post off-charter for the group can safely be
19812 lowered out of existence.
19813 @item
19814 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19815 articles completely.
19816
19817 @item
19818 Use expiring score entries to keep the size of the file down.  You
19819 should probably have a long expiry period, though, as some sites keep
19820 old articles for a long time.
19821 @end itemize
19822
19823 @dots{} I wonder whether other newsreaders will support global score files
19824 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19825 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19826 holding our breath yet?
19827
19828
19829 @node Kill Files
19830 @section Kill Files
19831 @cindex kill files
19832
19833 Gnus still supports those pesky old kill files.  In fact, the kill file
19834 entries can now be expiring, which is something I wrote before Daniel
19835 Quinlan thought of doing score files, so I've left the code in there.
19836
19837 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19838 than score processing, so it might be a good idea to rewrite your kill
19839 files into score files.
19840
19841 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19842 forms into this file, which means that you can use kill files as some
19843 sort of primitive hook function to be run on group entry, even though
19844 that isn't a very good idea.
19845
19846 Normal kill files look like this:
19847
19848 @lisp
19849 (gnus-kill "From" "Lars Ingebrigtsen")
19850 (gnus-kill "Subject" "ding")
19851 (gnus-expunge "X")
19852 @end lisp
19853
19854 This will mark every article written by me as read, and remove the
19855 marked articles from the summary buffer.  Very useful, you'll agree.
19856
19857 Other programs use a totally different kill file syntax.  If Gnus
19858 encounters what looks like a @code{rn} kill file, it will take a stab at
19859 interpreting it.
19860
19861 Two summary functions for editing a @sc{gnus} kill file:
19862
19863 @table @kbd
19864
19865 @item M-k
19866 @kindex M-k (Summary)
19867 @findex gnus-summary-edit-local-kill
19868 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19869
19870 @item M-K
19871 @kindex M-K (Summary)
19872 @findex gnus-summary-edit-global-kill
19873 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19874 @end table
19875
19876 Two group mode functions for editing the kill files:
19877
19878 @table @kbd
19879
19880 @item M-k
19881 @kindex M-k (Group)
19882 @findex gnus-group-edit-local-kill
19883 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19884
19885 @item M-K
19886 @kindex M-K (Group)
19887 @findex gnus-group-edit-global-kill
19888 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19889 @end table
19890
19891 Kill file variables:
19892
19893 @table @code
19894 @item gnus-kill-file-name
19895 @vindex gnus-kill-file-name
19896 A kill file for the group @samp{soc.motss} is normally called
19897 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19898 this file name is detailed by the @code{gnus-kill-file-name} variable.
19899 The ``global'' kill file (not in the score file sense of ``global'', of
19900 course) is just called @file{KILL}.
19901
19902 @vindex gnus-kill-save-kill-file
19903 @item gnus-kill-save-kill-file
19904 If this variable is non-@code{nil}, Gnus will save the
19905 kill file after processing, which is necessary if you use expiring
19906 kills.
19907
19908 @item gnus-apply-kill-hook
19909 @vindex gnus-apply-kill-hook
19910 @findex gnus-apply-kill-file-unless-scored
19911 @findex gnus-apply-kill-file
19912 A hook called to apply kill files to a group.  It is
19913 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19914 kill file if you have a score file for the same group, you can set this
19915 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19916 kill files to be processed, you should set this variable to @code{nil}.
19917
19918 @item gnus-kill-file-mode-hook
19919 @vindex gnus-kill-file-mode-hook
19920 A hook called in kill-file mode buffers.
19921
19922 @end table
19923
19924
19925 @node Converting Kill Files
19926 @section Converting Kill Files
19927 @cindex kill files
19928 @cindex converting kill files
19929
19930 If you have loads of old kill files, you may want to convert them into
19931 score files.  If they are ``regular'', you can use
19932 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19933 by hand.
19934
19935 The kill to score conversion package isn't included in Gnus by default.
19936 You can fetch it from
19937 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19938
19939 If your old kill files are very complex---if they contain more
19940 non-@code{gnus-kill} forms than not, you'll have to convert them by
19941 hand.  Or just let them be as they are.  Gnus will still use them as
19942 before.
19943
19944
19945 @node GroupLens
19946 @section GroupLens
19947 @cindex GroupLens
19948
19949 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19950 so this section is mostly of historical interest.
19951
19952 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19953 collaborative filtering system that helps you work together with other
19954 people to find the quality news articles out of the huge volume of
19955 news articles generated every day.
19956
19957 To accomplish this the GroupLens system combines your opinions about
19958 articles you have already read with the opinions of others who have done
19959 likewise and gives you a personalized prediction for each unread news
19960 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19961 rate articles, and finds other people that rate articles the same way.
19962 Once it has found some people you agree with it tells you, in the form
19963 of a prediction, what they thought of the article.  You can use this
19964 prediction to help you decide whether or not you want to read the
19965 article.
19966
19967 @menu
19968 * Using GroupLens::             How to make Gnus use GroupLens.
19969 * Rating Articles::             Letting GroupLens know how you rate articles.
19970 * Displaying Predictions::      Displaying predictions given by GroupLens.
19971 * GroupLens Variables::         Customizing GroupLens.
19972 @end menu
19973
19974
19975 @node Using GroupLens
19976 @subsection Using GroupLens
19977
19978 To use GroupLens you must register a pseudonym with your local
19979 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19980 Bureau (BBB)} is the only better bit in town at the moment.
19981
19982 Once you have registered you'll need to set a couple of variables.
19983
19984 @table @code
19985
19986 @item gnus-use-grouplens
19987 @vindex gnus-use-grouplens
19988 Setting this variable to a non-@code{nil} value will make Gnus hook into
19989 all the relevant GroupLens functions.
19990
19991 @item grouplens-pseudonym
19992 @vindex grouplens-pseudonym
19993 This variable should be set to the pseudonym you got when registering
19994 with the Better Bit Bureau.
19995
19996 @item grouplens-newsgroups
19997 @vindex grouplens-newsgroups
19998 A list of groups that you want to get GroupLens predictions for.
19999
20000 @end table
20001
20002 That's the minimum of what you need to get up and running with GroupLens.
20003 Once you've registered, GroupLens will start giving you scores for
20004 articles based on the average of what other people think.  But, to get
20005 the real benefit of GroupLens you need to start rating articles
20006 yourself.  Then the scores GroupLens gives you will be personalized for
20007 you, based on how the people you usually agree with have already rated.
20008
20009
20010 @node Rating Articles
20011 @subsection Rating Articles
20012
20013 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
20014 Where 1 means something like this article is a waste of bandwidth and 5
20015 means that the article was really good.  The basic question to ask
20016 yourself is, ``on a scale from 1 to 5 would I like to see more articles
20017 like this one?''
20018
20019 There are four ways to enter a rating for an article in GroupLens.
20020
20021 @table @kbd
20022
20023 @item r
20024 @kindex r (GroupLens)
20025 @findex bbb-summary-rate-article
20026 This function will prompt you for a rating on a scale of one to five.
20027
20028 @item k
20029 @kindex k (GroupLens)
20030 @findex grouplens-score-thread
20031 This function will prompt you for a rating, and rate all the articles in
20032 the thread.  This is really useful for some of those long running giant
20033 threads in rec.humor.
20034
20035 @end table
20036
20037 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
20038 the score of the article you're reading.
20039
20040 @table @kbd
20041
20042 @item 1-5 n
20043 @kindex n (GroupLens)
20044 @findex grouplens-next-unread-article
20045 Rate the article and go to the next unread article.
20046
20047 @item 1-5 ,
20048 @kindex , (GroupLens)
20049 @findex grouplens-best-unread-article
20050 Rate the article and go to the next unread article with the highest score.
20051
20052 @end table
20053
20054 If you want to give the current article a score of 4 and then go to the
20055 next article, just type @kbd{4 n}.
20056
20057
20058 @node Displaying Predictions
20059 @subsection Displaying Predictions
20060
20061 GroupLens makes a prediction for you about how much you will like a
20062 news article.  The predictions from GroupLens are on a scale from 1 to
20063 5, where 1 is the worst and 5 is the best.  You can use the predictions
20064 from GroupLens in one of three ways controlled by the variable
20065 @code{gnus-grouplens-override-scoring}.
20066
20067 @vindex gnus-grouplens-override-scoring
20068 There are three ways to display predictions in grouplens.  You may
20069 choose to have the GroupLens scores contribute to, or override the
20070 regular Gnus scoring mechanism.  override is the default; however, some
20071 people prefer to see the Gnus scores plus the grouplens scores.  To get
20072 the separate scoring behavior you need to set
20073 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
20074 GroupLens predictions combined with the grouplens scores set it to
20075 @code{'override} and to combine the scores set
20076 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
20077 the combine option you will also want to set the values for
20078 @code{grouplens-prediction-offset} and
20079 @code{grouplens-score-scale-factor}.
20080
20081 @vindex grouplens-prediction-display
20082 In either case, GroupLens gives you a few choices for how you would like
20083 to see your predictions displayed.  The display of predictions is
20084 controlled by the @code{grouplens-prediction-display} variable.
20085
20086 The following are valid values for that variable.
20087
20088 @table @code
20089 @item prediction-spot
20090 The higher the prediction, the further to the right an @samp{*} is
20091 displayed.
20092
20093 @item confidence-interval
20094 A numeric confidence interval.
20095
20096 @item prediction-bar
20097 The higher the prediction, the longer the bar.
20098
20099 @item confidence-bar
20100 Numerical confidence.
20101
20102 @item confidence-spot
20103 The spot gets bigger with more confidence.
20104
20105 @item prediction-num
20106 Plain-old numeric value.
20107
20108 @item confidence-plus-minus
20109 Prediction +/- confidence.
20110
20111 @end table
20112
20113
20114 @node GroupLens Variables
20115 @subsection GroupLens Variables
20116
20117 @table @code
20118
20119 @item gnus-summary-grouplens-line-format
20120 The summary line format used in GroupLens-enhanced summary buffers.  It
20121 accepts the same specs as the normal summary line format (@pxref{Summary
20122 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20123 %s\n}.
20124
20125 @item grouplens-bbb-host
20126 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20127 default.
20128
20129 @item grouplens-bbb-port
20130 Port of the host running the bbbd server.  The default is 9000.
20131
20132 @item grouplens-score-offset
20133 Offset the prediction by this value.  In other words, subtract the
20134 prediction value by this number to arrive at the effective score.  The
20135 default is 0.
20136
20137 @item grouplens-score-scale-factor
20138 This variable allows the user to magnify the effect of GroupLens scores.
20139 The scale factor is applied after the offset.  The default is 1.
20140
20141 @end table
20142
20143
20144 @node Advanced Scoring
20145 @section Advanced Scoring
20146
20147 Scoring on Subjects and From headers is nice enough, but what if you're
20148 really interested in what a person has to say only when she's talking
20149 about a particular subject?  Or what if you really don't want to
20150 read what person A has to say when she's following up to person B, but
20151 want to read what she says when she's following up to person C?
20152
20153 By using advanced scoring rules you may create arbitrarily complex
20154 scoring patterns.
20155
20156 @menu
20157 * Advanced Scoring Syntax::     A definition.
20158 * Advanced Scoring Examples::   What they look like.
20159 * Advanced Scoring Tips::       Getting the most out of it.
20160 @end menu
20161
20162
20163 @node Advanced Scoring Syntax
20164 @subsection Advanced Scoring Syntax
20165
20166 Ordinary scoring rules have a string as the first element in the rule.
20167 Advanced scoring rules have a list as the first element.  The second
20168 element is the score to be applied if the first element evaluated to a
20169 non-@code{nil} value.
20170
20171 These lists may consist of three logical operators, one redirection
20172 operator, and various match operators.
20173
20174 Logical operators:
20175
20176 @table @code
20177 @item &
20178 @itemx and
20179 This logical operator will evaluate each of its arguments until it finds
20180 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20181 evaluate to @code{true} values, then this operator will return
20182 @code{true}.
20183
20184 @item |
20185 @itemx or
20186 This logical operator will evaluate each of its arguments until it finds
20187 one that evaluates to @code{true}.  If no arguments are @code{true},
20188 then this operator will return @code{false}.
20189
20190 @item !
20191 @itemx not
20192 @itemx Â¬
20193 This logical operator only takes a single argument.  It returns the
20194 logical negation of the value of its argument.
20195
20196 @end table
20197
20198 There is an @dfn{indirection operator} that will make its arguments
20199 apply to the ancestors of the current article being scored.  For
20200 instance, @code{1-} will make score rules apply to the parent of the
20201 current article.  @code{2-} will make score rules apply to the
20202 grandparent of the current article.  Alternatively, you can write
20203 @code{^^}, where the number of @code{^}s (carets) says how far back into
20204 the ancestry you want to go.
20205
20206 Finally, we have the match operators.  These are the ones that do the
20207 real work.  Match operators are header name strings followed by a match
20208 and a match type.  A typical match operator looks like @samp{("from"
20209 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20210 simple scoring, and the match types are also the same.
20211
20212
20213 @node Advanced Scoring Examples
20214 @subsection Advanced Scoring Examples
20215
20216 Please note that the following examples are score file rules.  To
20217 make a complete score file from them, surround them with another pair
20218 of parentheses.
20219
20220 Let's say you want to increase the score of articles written by Lars
20221 when he's talking about Gnus:
20222
20223 @example
20224 @group
20225 ((&
20226   ("from" "Lars Ingebrigtsen")
20227   ("subject" "Gnus"))
20228  1000)
20229 @end group
20230 @end example
20231
20232 Quite simple, huh?
20233
20234 When he writes long articles, he sometimes has something nice to say:
20235
20236 @example
20237 ((&
20238   ("from" "Lars Ingebrigtsen")
20239   (|
20240    ("subject" "Gnus")
20241    ("lines" 100 >)))
20242  1000)
20243 @end example
20244
20245 However, when he responds to things written by Reig Eigil Logge, you
20246 really don't want to read what he's written:
20247
20248 @example
20249 ((&
20250   ("from" "Lars Ingebrigtsen")
20251   (1- ("from" "Reig Eigir Logge")))
20252  -100000)
20253 @end example
20254
20255 Everybody that follows up Redmondo when he writes about disappearing
20256 socks should have their scores raised, but only when they talk about
20257 white socks.  However, when Lars talks about socks, it's usually not
20258 very interesting:
20259
20260 @example
20261 ((&
20262   (1-
20263    (&
20264     ("from" "redmondo@@.*no" r)
20265     ("body" "disappearing.*socks" t)))
20266   (! ("from" "Lars Ingebrigtsen"))
20267   ("body" "white.*socks"))
20268  1000)
20269 @end example
20270
20271 The possibilities are endless.
20272
20273
20274 @node Advanced Scoring Tips
20275 @subsection Advanced Scoring Tips
20276
20277 The @code{&} and @code{|} logical operators do short-circuit logic.
20278 That is, they stop processing their arguments when it's clear what the
20279 result of the operation will be.  For instance, if one of the arguments
20280 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20281 the rest of the arguments.  This means that you should put slow matches
20282 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20283 @samp{subject}) first.
20284
20285 The indirection arguments (@code{1-} and so on) will make their
20286 arguments work on previous generations of the thread.  If you say
20287 something like:
20288
20289 @example
20290 ...
20291 (1-
20292  (1-
20293   ("from" "lars")))
20294 ...
20295 @end example
20296
20297 Then that means "score on the from header of the grandparent of the
20298 current article".  An indirection is quite fast, but it's better to say:
20299
20300 @example
20301 (1-
20302  (&
20303   ("from" "Lars")
20304   ("subject" "Gnus")))
20305 @end example
20306
20307 than it is to say:
20308
20309 @example
20310 (&
20311  (1- ("from" "Lars"))
20312  (1- ("subject" "Gnus")))
20313 @end example
20314
20315
20316 @node Score Decays
20317 @section Score Decays
20318 @cindex score decays
20319 @cindex decays
20320
20321 You may find that your scores have a tendency to grow without
20322 bounds, especially if you're using adaptive scoring.  If scores get too
20323 big, they lose all meaning---they simply max out and it's difficult to
20324 use them in any sensible way.
20325
20326 @vindex gnus-decay-scores
20327 @findex gnus-decay-score
20328 @vindex gnus-decay-score-function
20329 Gnus provides a mechanism for decaying scores to help with this problem.
20330 When score files are loaded and @code{gnus-decay-scores} is
20331 non-@code{nil}, Gnus will run the score files through the decaying
20332 mechanism thereby lowering the scores of all non-permanent score rules.
20333 The decay itself if performed by the @code{gnus-decay-score-function}
20334 function, which is @code{gnus-decay-score} by default.  Here's the
20335 definition of that function:
20336
20337 @lisp
20338 (defun gnus-decay-score (score)
20339   "Decay SCORE according to `gnus-score-decay-constant'
20340 and `gnus-score-decay-scale'."
20341   (let ((n (- score
20342               (* (if (< score 0) -1 1)
20343                  (min (abs score)
20344                       (max gnus-score-decay-constant
20345                            (* (abs score)
20346                               gnus-score-decay-scale)))))))
20347     (if (and (featurep 'xemacs)
20348              ;; XEmacs' floor can handle only the floating point
20349              ;; number below the half of the maximum integer.
20350              (> (abs n) (lsh -1 -2)))
20351         (string-to-number
20352          (car (split-string (number-to-string n) "\\.")))
20353       (floor n))))
20354 @end lisp
20355
20356 @vindex gnus-score-decay-scale
20357 @vindex gnus-score-decay-constant
20358 @code{gnus-score-decay-constant} is 3 by default and
20359 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20360
20361 @enumerate
20362 @item
20363 Scores between -3 and 3 will be set to 0 when this function is called.
20364
20365 @item
20366 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20367
20368 @item
20369 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20370 score.
20371 @end enumerate
20372
20373 If you don't like this decay function, write your own.  It is called
20374 with the score to be decayed as its only parameter, and it should return
20375 the new score, which should be an integer.
20376
20377 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20378 four days, Gnus will decay the scores four times, for instance.
20379
20380 @iftex
20381 @iflatex
20382 @chapter Message
20383 @include message.texi
20384 @chapter Emacs MIME
20385 @include emacs-mime.texi
20386 @chapter Sieve
20387 @include sieve.texi
20388 @c @chapter PGG
20389 @c @include pgg.texi
20390 @end iflatex
20391 @end iftex
20392
20393 @node Various
20394 @chapter Various
20395
20396 @menu
20397 * Process/Prefix::              A convention used by many treatment commands.
20398 * Interactive::                 Making Gnus ask you many questions.
20399 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20400 * Formatting Variables::        You can specify what buffers should look like.
20401 * Window Layout::               Configuring the Gnus buffer windows.
20402 * Faces and Fonts::             How to change how faces look.
20403 * Compilation::                 How to speed Gnus up.
20404 * Mode Lines::                  Displaying information in the mode lines.
20405 * Highlighting and Menus::      Making buffers look all nice and cozy.
20406 * Buttons::                     Get tendinitis in ten easy steps!
20407 * Daemons::                     Gnus can do things behind your back.
20408 * NoCeM::                       How to avoid spam and other fatty foods.
20409 * Undo::                        Some actions can be undone.
20410 * Predicate Specifiers::        Specifying predicates.
20411 * Moderation::                  What to do if you're a moderator.
20412 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20413 * Fuzzy Matching::              What's the big fuzz?
20414 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20415 * Various Various::             Things that are really various.
20416 @end menu
20417
20418
20419 @node Process/Prefix
20420 @section Process/Prefix
20421 @cindex process/prefix convention
20422
20423 Many functions, among them functions for moving, decoding and saving
20424 articles, use what is known as the @dfn{Process/Prefix convention}.
20425
20426 This is a method for figuring out what articles the user wants the
20427 command to be performed on.
20428
20429 It goes like this:
20430
20431 If the numeric prefix is N, perform the operation on the next N
20432 articles, starting with the current one.  If the numeric prefix is
20433 negative, perform the operation on the previous N articles, starting
20434 with the current one.
20435
20436 @vindex transient-mark-mode
20437 If @code{transient-mark-mode} in non-@code{nil} and the region is
20438 active, all articles in the region will be worked upon.
20439
20440 If there is no numeric prefix, but some articles are marked with the
20441 process mark, perform the operation on the articles marked with
20442 the process mark.
20443
20444 If there is neither a numeric prefix nor any articles marked with the
20445 process mark, just perform the operation on the current article.
20446
20447 Quite simple, really, but it needs to be made clear so that surprises
20448 are avoided.
20449
20450 Commands that react to the process mark will push the current list of
20451 process marked articles onto a stack and will then clear all process
20452 marked articles.  You can restore the previous configuration with the
20453 @kbd{M P y} command (@pxref{Setting Process Marks}).
20454
20455 @vindex gnus-summary-goto-unread
20456 One thing that seems to shock & horrify lots of people is that, for
20457 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20458 Since each @kbd{d} (which marks the current article as read) by default
20459 goes to the next unread article after marking, this means that @kbd{3 d}
20460 will mark the next three unread articles as read, no matter what the
20461 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20462 @code{nil} for a more straightforward action.
20463
20464 Many commands do not use the process/prefix convention.  All commands
20465 that do explicitly say so in this manual.  To apply the process/prefix
20466 convention to commands that do not use it, you can use the @kbd{M-&}
20467 command.  For instance, to mark all the articles in the group as
20468 expirable, you could say @kbd{M P b M-& E}.
20469
20470
20471 @node Interactive
20472 @section Interactive
20473 @cindex interaction
20474
20475 @table @code
20476
20477 @item gnus-novice-user
20478 @vindex gnus-novice-user
20479 If this variable is non-@code{nil}, you are either a newcomer to the
20480 World of Usenet, or you are very cautious, which is a nice thing to be,
20481 really.  You will be given questions of the type ``Are you sure you want
20482 to do this?'' before doing anything dangerous.  This is @code{t} by
20483 default.
20484
20485 @item gnus-expert-user
20486 @vindex gnus-expert-user
20487 If this variable is non-@code{nil}, you will seldom be asked any
20488 questions by Gnus.  It will simply assume you know what you're doing, no
20489 matter how strange.
20490
20491 @item gnus-interactive-catchup
20492 @vindex gnus-interactive-catchup
20493 Require confirmation before catching up a group if non-@code{nil}.  It
20494 is @code{t} by default.
20495
20496 @item gnus-interactive-exit
20497 @vindex gnus-interactive-exit
20498 Require confirmation before exiting Gnus.  This variable is @code{t} by
20499 default.
20500 @end table
20501
20502
20503 @node Symbolic Prefixes
20504 @section Symbolic Prefixes
20505 @cindex symbolic prefixes
20506
20507 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20508 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20509 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20510 rule of 900 to the current article.
20511
20512 This is all nice and well, but what if you want to give a command some
20513 additional information?  Well, what most commands do is interpret the
20514 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20515 doesn't want a backup file to be created when saving the current buffer,
20516 for instance.  But what if you want to save without making a backup
20517 file, and you want Emacs to flash lights and play a nice tune at the
20518 same time?  You can't, and you're probably perfectly happy that way.
20519
20520 @kindex M-i (Summary)
20521 @findex gnus-symbolic-argument
20522 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20523 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20524 character typed in is the value.  You can stack as many @kbd{M-i}
20525 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20526 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20527 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20528 @code{b}''.  You get the drift.
20529
20530 Typing in symbolic prefixes to commands that don't accept them doesn't
20531 hurt, but it doesn't do any good either.  Currently not many Gnus
20532 functions make use of the symbolic prefix.
20533
20534 If you're interested in how Gnus implements this, @pxref{Extended
20535 Interactive}.
20536
20537
20538 @node Formatting Variables
20539 @section Formatting Variables
20540 @cindex formatting variables
20541
20542 Throughout this manual you've probably noticed lots of variables called
20543 things like @code{gnus-group-line-format} and
20544 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20545 output lines in the various buffers.  There's quite a lot of them.
20546 Fortunately, they all use the same syntax, so there's not that much to
20547 be annoyed by.
20548
20549 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20550 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20551 lots of percentages everywhere.
20552
20553 @menu
20554 * Formatting Basics::           A formatting variable is basically a format string.
20555 * Mode Line Formatting::        Some rules about mode line formatting variables.
20556 * Advanced Formatting::         Modifying output in various ways.
20557 * User-Defined Specs::          Having Gnus call your own functions.
20558 * Formatting Fonts::            Making the formatting look colorful and nice.
20559 * Positioning Point::           Moving point to a position after an operation.
20560 * Tabulation::                  Tabulating your output.
20561 * Wide Characters::             Dealing with wide characters.
20562 @end menu
20563
20564 Currently Gnus uses the following formatting variables:
20565 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20566 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20567 @code{gnus-group-mode-line-format},
20568 @code{gnus-summary-mode-line-format},
20569 @code{gnus-article-mode-line-format},
20570 @code{gnus-server-mode-line-format}, and
20571 @code{gnus-summary-pick-line-format}.
20572
20573 All these format variables can also be arbitrary elisp forms.  In that
20574 case, they will be @code{eval}ed to insert the required lines.
20575
20576 @kindex M-x gnus-update-format
20577 @findex gnus-update-format
20578 Gnus includes a command to help you while creating your own format
20579 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20580 update the spec in question and pop you to a buffer where you can
20581 examine the resulting Lisp code to be run to generate the line.
20582
20583
20584
20585 @node Formatting Basics
20586 @subsection Formatting Basics
20587
20588 Each @samp{%} element will be replaced by some string or other when the
20589 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20590 spec, and pad with spaces to get a 5-character field''.
20591
20592 As with normal C and Emacs Lisp formatting strings, the numerical
20593 modifier between the @samp{%} and the formatting type character will
20594 @dfn{pad} the output so that it is always at least that long.
20595 @samp{%5y} will make the field always (at least) five characters wide by
20596 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20597 the right instead.
20598
20599 You may also wish to limit the length of the field to protect against
20600 particularly wide values.  For that you can say @samp{%4,6y}, which
20601 means that the field will never be more than 6 characters wide and never
20602 less than 4 characters wide.
20603
20604 Also Gnus supports some extended format specifications, such as
20605 @samp{%&user-date;}.
20606
20607
20608 @node Mode Line Formatting
20609 @subsection Mode Line Formatting
20610
20611 Mode line formatting variables (e.g.,
20612 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20613 buffer line oriented formatting variables (@pxref{Formatting Basics})
20614 with the following two differences:
20615
20616 @enumerate
20617
20618 @item
20619 There must be no newline (@samp{\n}) at the end.
20620
20621 @item
20622 The special @samp{%%b} spec can be used to display the buffer name.
20623 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20624 @samp{%} to allow it to pass through the formatting machinery unmangled,
20625 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20626 display interprets to mean ``show the buffer name''.  For a full list of
20627 mode line specs Emacs understands, see the documentation of the
20628 @code{mode-line-format} variable.
20629
20630 @end enumerate
20631
20632
20633 @node Advanced Formatting
20634 @subsection Advanced Formatting
20635
20636 It is frequently useful to post-process the fields in some way.
20637 Padding, limiting, cutting off parts and suppressing certain values can
20638 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20639 look like @samp{%~(cut 3)~(ignore "0")y}.
20640
20641 These are the valid modifiers:
20642
20643 @table @code
20644 @item pad
20645 @itemx pad-left
20646 Pad the field to the left with spaces until it reaches the required
20647 length.
20648
20649 @item pad-right
20650 Pad the field to the right with spaces until it reaches the required
20651 length.
20652
20653 @item max
20654 @itemx max-left
20655 Cut off characters from the left until it reaches the specified length.
20656
20657 @item max-right
20658 Cut off characters from the right until it reaches the specified
20659 length.
20660
20661 @item cut
20662 @itemx cut-left
20663 Cut off the specified number of characters from the left.
20664
20665 @item cut-right
20666 Cut off the specified number of characters from the right.
20667
20668 @item ignore
20669 Return an empty string if the field is equal to the specified value.
20670
20671 @item form
20672 Use the specified form as the field value when the @samp{@@} spec is
20673 used.
20674
20675 Here's an example:
20676
20677 @lisp
20678 "~(form (current-time-string))@@"
20679 @end lisp
20680
20681 @end table
20682
20683 Let's take an example.  The @samp{%o} spec in the summary mode lines
20684 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20685 This is quite a mouthful, so we want to shave off the century number and
20686 the time, leaving us with a six-character date.  That would be
20687 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20688 maxing, and we need the padding to ensure that the date is never less
20689 than 6 characters to make it look nice in columns.)
20690
20691 Ignoring is done first; then cutting; then maxing; and then as the very
20692 last operation, padding.
20693
20694 @vindex gnus-compile-user-specs
20695 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
20696 default) with your strong personality, and use a lots of these advanced
20697 thingies, you'll find that Gnus gets quite slow.  This can be helped
20698 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
20699 the look of your lines.
20700 @xref{Compilation}.
20701
20702
20703 @node User-Defined Specs
20704 @subsection User-Defined Specs
20705
20706 All the specs allow for inserting user defined specifiers---@samp{u}.
20707 The next character in the format string should be a letter.  Gnus
20708 will call the function @code{gnus-user-format-function-}@samp{X}, where
20709 @samp{X} is the letter following @samp{%u}.  The function will be passed
20710 a single parameter---what the parameter means depends on what buffer
20711 it's being called from.  The function should return a string, which will
20712 be inserted into the buffer just like information from any other
20713 specifier.  This function may also be called with dummy values, so it
20714 should protect against that.
20715
20716 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20717 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20718
20719 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20720 much the same without defining new functions.  Here's an example:
20721 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20722 given here will be evaluated to yield the current line number, and then
20723 inserted.
20724
20725
20726 @node Formatting Fonts
20727 @subsection Formatting Fonts
20728
20729 There are specs for highlighting, and these are shared by all the format
20730 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20731 the special @code{mouse-face} property set, which means that it will be
20732 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20733 over it.
20734
20735 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20736 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20737 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20738 and so on.  Create as many faces as you wish.  The same goes for the
20739 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20740 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20741
20742 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20743 special @code{balloon-help} property set to
20744 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20745 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20746 variables should be either strings or symbols naming functions that
20747 return a string.  When the mouse passes over text with this property
20748 set, a balloon window will appear and display the string.  Please
20749 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20750 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20751 XEmacs) for more information on this.  (For technical reasons, the
20752 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20753 paragraph.)
20754
20755 Here's an alternative recipe for the group buffer:
20756
20757 @lisp
20758 ;; @r{Create three face types.}
20759 (setq gnus-face-1 'bold)
20760 (setq gnus-face-3 'italic)
20761
20762 ;; @r{We want the article count to be in}
20763 ;; @r{a bold and green face.  So we create}
20764 ;; @r{a new face called @code{my-green-bold}.}
20765 (copy-face 'bold 'my-green-bold)
20766 ;; @r{Set the color.}
20767 (set-face-foreground 'my-green-bold "ForestGreen")
20768 (setq gnus-face-2 'my-green-bold)
20769
20770 ;; @r{Set the new & fancy format.}
20771 (setq gnus-group-line-format
20772       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20773 @end lisp
20774
20775 I'm sure you'll be able to use this scheme to create totally unreadable
20776 and extremely vulgar displays.  Have fun!
20777
20778 Note that the @samp{%(} specs (and friends) do not make any sense on the
20779 mode-line variables.
20780
20781 @node Positioning Point
20782 @subsection Positioning Point
20783
20784 Gnus usually moves point to a pre-defined place on each line in most
20785 buffers.  By default, point move to the first colon character on the
20786 line.  You can customize this behaviour in three different ways.
20787
20788 You can move the colon character to somewhere else on the line.
20789
20790 @findex gnus-goto-colon
20791 You can redefine the function that moves the point to the colon.  The
20792 function is called @code{gnus-goto-colon}.
20793
20794 But perhaps the most convenient way to deal with this, if you don't want
20795 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20796 put a @samp{%*} somewhere in your format line definition, Gnus will
20797 place point there.
20798
20799
20800 @node Tabulation
20801 @subsection Tabulation
20802
20803 You can usually line up your displays by padding and cutting your
20804 strings.  However, when combining various strings of different size, it
20805 can often be more convenient to just output the strings, and then worry
20806 about lining up the following text afterwards.
20807
20808 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20809 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20810
20811 @samp{%50=} will insert space characters to pad the line up to column
20812 50.  If the text is already past column 50, nothing will be inserted.
20813 This is the soft tabulator.
20814
20815 @samp{%-50=} will insert space characters to pad the line up to column
20816 50.  If the text is already past column 50, the excess text past column
20817 50 will be removed.  This is the hard tabulator.
20818
20819
20820 @node Wide Characters
20821 @subsection Wide Characters
20822
20823 Fixed width fonts in most countries have characters of the same width.
20824 Some countries, however, use Latin characters mixed with wider
20825 characters---most notable East Asian countries.
20826
20827 The problem is that when formatting, Gnus assumes that if a string is 10
20828 characters wide, it'll be 10 Latin characters wide on the screen.  In
20829 these countries, that's not true.
20830
20831 @vindex gnus-use-correct-string-widths
20832 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20833 @code{t}.  This makes buffer generation slower, but the results will be
20834 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20835 for Emacs.
20836
20837
20838 @node Window Layout
20839 @section Window Layout
20840 @cindex window layout
20841
20842 No, there's nothing here about X, so be quiet.
20843
20844 @vindex gnus-use-full-window
20845 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20846 other windows and occupy the entire Emacs screen by itself.  It is
20847 @code{t} by default.
20848
20849 Setting this variable to @code{nil} kinda works, but there are
20850 glitches.  Use at your own peril.
20851
20852 @vindex gnus-buffer-configuration
20853 @code{gnus-buffer-configuration} describes how much space each Gnus
20854 buffer should be given.  Here's an excerpt of this variable:
20855
20856 @lisp
20857 ((group (vertical 1.0 (group 1.0 point)
20858                       (if gnus-carpal (group-carpal 4))))
20859  (article (vertical 1.0 (summary 0.25 point)
20860                         (article 1.0))))
20861 @end lisp
20862
20863 This is an alist.  The @dfn{key} is a symbol that names some action or
20864 other.  For instance, when displaying the group buffer, the window
20865 configuration function will use @code{group} as the key.  A full list of
20866 possible names is listed below.
20867
20868 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20869 should occupy.  To take the @code{article} split as an example -
20870
20871 @lisp
20872 (article (vertical 1.0 (summary 0.25 point)
20873                        (article 1.0)))
20874 @end lisp
20875
20876 This @dfn{split} says that the summary buffer should occupy 25% of upper
20877 half of the screen, and that it is placed over the article buffer.  As
20878 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20879 reaching for that calculator there).  However, the special number
20880 @code{1.0} is used to signal that this buffer should soak up all the
20881 rest of the space available after the rest of the buffers have taken
20882 whatever they need.  There should be only one buffer with the @code{1.0}
20883 size spec per split.
20884
20885 Point will be put in the buffer that has the optional third element
20886 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20887 split where the tag @code{frame-focus} is a member (i.e. is the third or
20888 fourth element in the list, depending on whether the @code{point} tag is
20889 present) gets focus.
20890
20891 Here's a more complicated example:
20892
20893 @lisp
20894 (article (vertical 1.0 (group 4)
20895                        (summary 0.25 point)
20896                        (if gnus-carpal (summary-carpal 4))
20897                        (article 1.0)))
20898 @end lisp
20899
20900 If the size spec is an integer instead of a floating point number,
20901 then that number will be used to say how many lines a buffer should
20902 occupy, not a percentage.
20903
20904 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20905 precise---if the @code{car} of the split is a function or a subr), this
20906 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20907 be used as a split.  This means that there will be three buffers if
20908 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20909 is non-@code{nil}.
20910
20911 Not complicated enough for you?  Well, try this on for size:
20912
20913 @lisp
20914 (article (horizontal 1.0
20915              (vertical 0.5
20916                  (group 1.0)
20917                  (gnus-carpal 4))
20918              (vertical 1.0
20919                  (summary 0.25 point)
20920                  (summary-carpal 4)
20921                  (article 1.0))))
20922 @end lisp
20923
20924 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20925 @code{horizontal} thingie?
20926
20927 If the first element in one of the split is @code{horizontal}, Gnus will
20928 split the window horizontally, giving you two windows side-by-side.
20929 Inside each of these strips you may carry on all you like in the normal
20930 fashion.  The number following @code{horizontal} says what percentage of
20931 the screen is to be given to this strip.
20932
20933 For each split, there @emph{must} be one element that has the 100% tag.
20934 The splitting is never accurate, and this buffer will eat any leftover
20935 lines from the splits.
20936
20937 To be slightly more formal, here's a definition of what a valid split
20938 may look like:
20939
20940 @example
20941 @group
20942 split      = frame | horizontal | vertical | buffer | form
20943 frame      = "(frame " size *split ")"
20944 horizontal = "(horizontal " size *split ")"
20945 vertical   = "(vertical " size *split ")"
20946 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20947 size       = number | frame-params
20948 buf-name   = group | article | summary ...
20949 @end group
20950 @end example
20951
20952 The limitations are that the @code{frame} split can only appear as the
20953 top-level split.  @var{form} should be an Emacs Lisp form that should
20954 return a valid split.  We see that each split is fully recursive, and
20955 may contain any number of @code{vertical} and @code{horizontal} splits.
20956
20957 @vindex gnus-window-min-width
20958 @vindex gnus-window-min-height
20959 @cindex window height
20960 @cindex window width
20961 Finding the right sizes can be a bit complicated.  No window may be less
20962 than @code{gnus-window-min-height} (default 1) characters high, and all
20963 windows must be at least @code{gnus-window-min-width} (default 1)
20964 characters wide.  Gnus will try to enforce this before applying the
20965 splits.  If you want to use the normal Emacs window width/height limit,
20966 you can just set these two variables to @code{nil}.
20967
20968 If you're not familiar with Emacs terminology, @code{horizontal} and
20969 @code{vertical} splits may work the opposite way of what you'd expect.
20970 Windows inside a @code{horizontal} split are shown side-by-side, and
20971 windows within a @code{vertical} split are shown above each other.
20972
20973 @findex gnus-configure-frame
20974 If you want to experiment with window placement, a good tip is to call
20975 @code{gnus-configure-frame} directly with a split.  This is the function
20976 that does all the real work when splitting buffers.  Below is a pretty
20977 nonsensical configuration with 5 windows; two for the group buffer and
20978 three for the article buffer.  (I said it was nonsensical.)  If you
20979 @code{eval} the statement below, you can get an idea of how that would
20980 look straight away, without going through the normal Gnus channels.
20981 Play with it until you're satisfied, and then use
20982 @code{gnus-add-configuration} to add your new creation to the buffer
20983 configuration list.
20984
20985 @lisp
20986 (gnus-configure-frame
20987  '(horizontal 1.0
20988     (vertical 10
20989       (group 1.0)
20990       (article 0.3 point))
20991     (vertical 1.0
20992       (article 1.0)
20993       (horizontal 4
20994         (group 1.0)
20995         (article 10)))))
20996 @end lisp
20997
20998 You might want to have several frames as well.  No prob---just use the
20999 @code{frame} split:
21000
21001 @lisp
21002 (gnus-configure-frame
21003  '(frame 1.0
21004          (vertical 1.0
21005                    (summary 0.25 point frame-focus)
21006                    (article 1.0))
21007          (vertical ((height . 5) (width . 15)
21008                     (user-position . t)
21009                     (left . -1) (top . 1))
21010                    (picon 1.0))))
21011
21012 @end lisp
21013
21014 This split will result in the familiar summary/article window
21015 configuration in the first (or ``main'') frame, while a small additional
21016 frame will be created where picons will be shown.  As you can see,
21017 instead of the normal @code{1.0} top-level spec, each additional split
21018 should have a frame parameter alist as the size spec.
21019 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
21020 Reference Manual}.  Under XEmacs, a frame property list will be
21021 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
21022 is such a plist.
21023 The list of all possible keys for @code{gnus-buffer-configuration} can
21024 be found in its default value.
21025
21026 Note that the @code{message} key is used for both
21027 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
21028 it is desirable to distinguish between the two, something like this
21029 might be used:
21030
21031 @lisp
21032 (message (horizontal 1.0
21033                      (vertical 1.0 (message 1.0 point))
21034                      (vertical 0.24
21035                                (if (buffer-live-p gnus-summary-buffer)
21036                                    '(summary 0.5))
21037                                (group 1.0))))
21038 @end lisp
21039
21040 One common desire for a multiple frame split is to have a separate frame
21041 for composing mail and news while leaving the original frame intact.  To
21042 accomplish that, something like the following can be done:
21043
21044 @lisp
21045 (message
21046   (frame 1.0
21047          (if (not (buffer-live-p gnus-summary-buffer))
21048              (car (cdr (assoc 'group gnus-buffer-configuration)))
21049            (car (cdr (assoc 'summary gnus-buffer-configuration))))
21050          (vertical ((user-position . t) (top . 1) (left . 1)
21051                     (name . "Message"))
21052                    (message 1.0 point))))
21053 @end lisp
21054
21055 @findex gnus-add-configuration
21056 Since the @code{gnus-buffer-configuration} variable is so long and
21057 complicated, there's a function you can use to ease changing the config
21058 of a single setting: @code{gnus-add-configuration}.  If, for instance,
21059 you want to change the @code{article} setting, you could say:
21060
21061 @lisp
21062 (gnus-add-configuration
21063  '(article (vertical 1.0
21064                (group 4)
21065                (summary .25 point)
21066                (article 1.0))))
21067 @end lisp
21068
21069 You'd typically stick these @code{gnus-add-configuration} calls in your
21070 @file{~/.gnus.el} file or in some startup hook---they should be run after
21071 Gnus has been loaded.
21072
21073 @vindex gnus-always-force-window-configuration
21074 If all windows mentioned in the configuration are already visible, Gnus
21075 won't change the window configuration.  If you always want to force the
21076 ``right'' window configuration, you can set
21077 @code{gnus-always-force-window-configuration} to non-@code{nil}.
21078
21079 If you're using tree displays (@pxref{Tree Display}), and the tree
21080 window is displayed vertically next to another window, you may also want
21081 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
21082 windows resized.
21083
21084 @subsection Example Window Configurations
21085
21086 @itemize @bullet
21087 @item
21088 Narrow left hand side occupied by group buffer.  Right hand side split
21089 between summary buffer (top one-sixth) and article buffer (bottom).
21090
21091 @ifinfo
21092 @example
21093 +---+---------+
21094 | G | Summary |
21095 | r +---------+
21096 | o |         |
21097 | u | Article |
21098 | p |         |
21099 +---+---------+
21100 @end example
21101 @end ifinfo
21102
21103 @lisp
21104 (gnus-add-configuration
21105  '(article
21106    (horizontal 1.0
21107                (vertical 25 (group 1.0))
21108                (vertical 1.0
21109                          (summary 0.16 point)
21110                          (article 1.0)))))
21111
21112 (gnus-add-configuration
21113  '(summary
21114    (horizontal 1.0
21115                (vertical 25 (group 1.0))
21116                (vertical 1.0 (summary 1.0 point)))))
21117 @end lisp
21118
21119 @end itemize
21120
21121
21122 @node Faces and Fonts
21123 @section Faces and Fonts
21124 @cindex faces
21125 @cindex fonts
21126 @cindex colors
21127
21128 Fiddling with fonts and faces used to be very difficult, but these days
21129 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21130 the face you want to alter, and alter it via the standard Customize
21131 interface.
21132
21133
21134 @node Compilation
21135 @section Compilation
21136 @cindex compilation
21137 @cindex byte-compilation
21138
21139 @findex gnus-compile
21140
21141 Remember all those line format specification variables?
21142 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21143 on.  By default, T-gnus will use the byte-compiled codes of these
21144 variables and we can keep a slow-down to a minimum.  However, if you set
21145 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
21146 unfortunately, changing them will mean a quite significant slow-down.
21147 (The default values of these variables have byte-compiled functions
21148 associated with them, while the user-generated versions do not, of
21149 course.)
21150
21151 To help with this, you can run @kbd{M-x gnus-compile} after you've
21152 fiddled around with the variables and feel that you're (kind of)
21153 satisfied.  This will result in the new specs being byte-compiled, and
21154 you'll get top speed again.  Note that T-gnus will not save these
21155 compiled specs in the @file{.newsrc.eld} file.
21156
21157 @table @code
21158 @item gnus-compile-user-specs
21159 @vindex gnus-compile-user-specs
21160 If it is non-nil, the user-defined format specs will be byte-compiled
21161 automatically.  The default value of this variable is @code{t}.  It has
21162 an effect on the values of @code{gnus-*-line-format-spec}.
21163 @end table
21164
21165
21166 @node Mode Lines
21167 @section Mode Lines
21168 @cindex mode lines
21169
21170 @vindex gnus-updated-mode-lines
21171 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21172 lines updated.  It is a list of symbols.  Supported symbols include
21173 @code{group}, @code{article}, @code{summary}, @code{server},
21174 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21175 Gnus will keep that mode line updated with information that may be
21176 pertinent.  If this variable is @code{nil}, screen refresh may be
21177 quicker.
21178
21179 @cindex display-time
21180
21181 @vindex gnus-mode-non-string-length
21182 By default, Gnus displays information on the current article in the mode
21183 lines of the summary and article buffers.  The information Gnus wishes
21184 to display (e.g. the subject of the article) is often longer than the
21185 mode lines, and therefore have to be cut off at some point.  The
21186 @code{gnus-mode-non-string-length} variable says how long the other
21187 elements on the line is (i.e., the non-info part).  If you put
21188 additional elements on the mode line (e.g. a clock), you should modify
21189 this variable:
21190
21191 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21192 @lisp
21193 (add-hook 'display-time-hook
21194           (lambda () (setq gnus-mode-non-string-length
21195                            (+ 21
21196                               (if line-number-mode 5 0)
21197                               (if column-number-mode 4 0)
21198                               (length display-time-string)))))
21199 @end lisp
21200
21201 If this variable is @code{nil} (which is the default), the mode line
21202 strings won't be chopped off, and they won't be padded either.  Note
21203 that the default is unlikely to be desirable, as even the percentage
21204 complete in the buffer may be crowded off the mode line; the user should
21205 configure this variable appropriately for her configuration.
21206
21207
21208 @node Highlighting and Menus
21209 @section Highlighting and Menus
21210 @cindex visual
21211 @cindex highlighting
21212 @cindex menus
21213
21214 @vindex gnus-visual
21215 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21216 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21217 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21218 file.
21219
21220 This variable can be a list of visual properties that are enabled.  The
21221 following elements are valid, and are all included by default:
21222
21223 @table @code
21224 @item group-highlight
21225 Do highlights in the group buffer.
21226 @item summary-highlight
21227 Do highlights in the summary buffer.
21228 @item article-highlight
21229 Do highlights in the article buffer.
21230 @item highlight
21231 Turn on highlighting in all buffers.
21232 @item group-menu
21233 Create menus in the group buffer.
21234 @item summary-menu
21235 Create menus in the summary buffers.
21236 @item article-menu
21237 Create menus in the article buffer.
21238 @item browse-menu
21239 Create menus in the browse buffer.
21240 @item server-menu
21241 Create menus in the server buffer.
21242 @item score-menu
21243 Create menus in the score buffers.
21244 @item menu
21245 Create menus in all buffers.
21246 @end table
21247
21248 So if you only want highlighting in the article buffer and menus in all
21249 buffers, you could say something like:
21250
21251 @lisp
21252 (setq gnus-visual '(article-highlight menu))
21253 @end lisp
21254
21255 If you want highlighting only and no menus whatsoever, you'd say:
21256
21257 @lisp
21258 (setq gnus-visual '(highlight))
21259 @end lisp
21260
21261 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21262 in all Gnus buffers.
21263
21264 Other general variables that influence the look of all buffers include:
21265
21266 @table @code
21267 @item gnus-mouse-face
21268 @vindex gnus-mouse-face
21269 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21270 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21271
21272 @end table
21273
21274 There are hooks associated with the creation of all the different menus:
21275
21276 @table @code
21277
21278 @item gnus-article-menu-hook
21279 @vindex gnus-article-menu-hook
21280 Hook called after creating the article mode menu.
21281
21282 @item gnus-group-menu-hook
21283 @vindex gnus-group-menu-hook
21284 Hook called after creating the group mode menu.
21285
21286 @item gnus-summary-menu-hook
21287 @vindex gnus-summary-menu-hook
21288 Hook called after creating the summary mode menu.
21289
21290 @item gnus-server-menu-hook
21291 @vindex gnus-server-menu-hook
21292 Hook called after creating the server mode menu.
21293
21294 @item gnus-browse-menu-hook
21295 @vindex gnus-browse-menu-hook
21296 Hook called after creating the browse mode menu.
21297
21298 @item gnus-score-menu-hook
21299 @vindex gnus-score-menu-hook
21300 Hook called after creating the score mode menu.
21301
21302 @end table
21303
21304
21305 @node Buttons
21306 @section Buttons
21307 @cindex buttons
21308 @cindex mouse
21309 @cindex click
21310
21311 Those new-fangled @dfn{mouse} contraptions is very popular with the
21312 young, hep kids who don't want to learn the proper way to do things
21313 these days.  Why, I remember way back in the summer of '89, when I was
21314 using Emacs on a Tops 20 system.  Three hundred users on one single
21315 machine, and every user was running Simula compilers.  Bah!
21316
21317 Right.
21318
21319 @vindex gnus-carpal
21320 Well, you can make Gnus display bufferfuls of buttons you can click to
21321 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21322 really.  Tell the chiropractor I sent you.
21323
21324
21325 @table @code
21326
21327 @item gnus-carpal-mode-hook
21328 @vindex gnus-carpal-mode-hook
21329 Hook run in all carpal mode buffers.
21330
21331 @item gnus-carpal-button-face
21332 @vindex gnus-carpal-button-face
21333 Face used on buttons.
21334
21335 @item gnus-carpal-header-face
21336 @vindex gnus-carpal-header-face
21337 Face used on carpal buffer headers.
21338
21339 @item gnus-carpal-group-buffer-buttons
21340 @vindex gnus-carpal-group-buffer-buttons
21341 Buttons in the group buffer.
21342
21343 @item gnus-carpal-summary-buffer-buttons
21344 @vindex gnus-carpal-summary-buffer-buttons
21345 Buttons in the summary buffer.
21346
21347 @item gnus-carpal-server-buffer-buttons
21348 @vindex gnus-carpal-server-buffer-buttons
21349 Buttons in the server buffer.
21350
21351 @item gnus-carpal-browse-buffer-buttons
21352 @vindex gnus-carpal-browse-buffer-buttons
21353 Buttons in the browse buffer.
21354 @end table
21355
21356 All the @code{buttons} variables are lists.  The elements in these list
21357 are either cons cells where the @code{car} contains a text to be displayed and
21358 the @code{cdr} contains a function symbol, or a simple string.
21359
21360
21361 @node Daemons
21362 @section Daemons
21363 @cindex demons
21364 @cindex daemons
21365
21366 Gnus, being larger than any program ever written (allegedly), does lots
21367 of strange stuff that you may wish to have done while you're not
21368 present.  For instance, you may want it to check for new mail once in a
21369 while.  Or you may want it to close down all connections to all servers
21370 when you leave Emacs idle.  And stuff like that.
21371
21372 Gnus will let you do stuff like that by defining various
21373 @dfn{handlers}.  Each handler consists of three elements:  A
21374 @var{function}, a @var{time}, and an @var{idle} parameter.
21375
21376 Here's an example of a handler that closes connections when Emacs has
21377 been idle for thirty minutes:
21378
21379 @lisp
21380 (gnus-demon-close-connections nil 30)
21381 @end lisp
21382
21383 Here's a handler that scans for @acronym{PGP} headers every hour when
21384 Emacs is idle:
21385
21386 @lisp
21387 (gnus-demon-scan-pgp 60 t)
21388 @end lisp
21389
21390 This @var{time} parameter and that @var{idle} parameter work together
21391 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21392 @code{nil}, then the function will be called every @var{time} minutes.
21393
21394 If @var{idle} is @code{t}, then the function will be called after
21395 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21396 the function will never be called.  But once Emacs goes idle, the
21397 function will be called every @var{time} minutes.
21398
21399 If @var{idle} is a number and @var{time} is a number, the function will
21400 be called every @var{time} minutes only when Emacs has been idle for
21401 @var{idle} minutes.
21402
21403 If @var{idle} is a number and @var{time} is @code{nil}, the function
21404 will be called once every time Emacs has been idle for @var{idle}
21405 minutes.
21406
21407 And if @var{time} is a string, it should look like @samp{07:31}, and
21408 the function will then be called once every day somewhere near that
21409 time.  Modified by the @var{idle} parameter, of course.
21410
21411 @vindex gnus-demon-timestep
21412 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21413 seconds.  This is 60 by default.  If you change that variable,
21414 all the timings in the handlers will be affected.)
21415
21416 So, if you want to add a handler, you could put something like this in
21417 your @file{~/.gnus.el} file:
21418
21419 @findex gnus-demon-add-handler
21420 @lisp
21421 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21422 @end lisp
21423
21424 @findex gnus-demon-add-nocem
21425 @findex gnus-demon-add-scanmail
21426 @findex gnus-demon-add-rescan
21427 @findex gnus-demon-add-scan-timestamps
21428 @findex gnus-demon-add-disconnection
21429 Some ready-made functions to do this have been created:
21430 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21431 @code{gnus-demon-add-nntp-close-connection},
21432 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21433 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21434 @file{~/.gnus.el} if you want those abilities.
21435
21436 @findex gnus-demon-init
21437 @findex gnus-demon-cancel
21438 @vindex gnus-demon-handlers
21439 If you add handlers to @code{gnus-demon-handlers} directly, you should
21440 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21441 daemons, you can use the @code{gnus-demon-cancel} function.
21442
21443 Note that adding daemons can be pretty naughty if you over do it.  Adding
21444 functions that scan all news and mail from all servers every two seconds
21445 is a sure-fire way of getting booted off any respectable system.  So
21446 behave.
21447
21448
21449 @node NoCeM
21450 @section NoCeM
21451 @cindex nocem
21452 @cindex spam
21453
21454 @dfn{Spamming} is posting the same article lots and lots of times.
21455 Spamming is bad.  Spamming is evil.
21456
21457 Spamming is usually canceled within a day or so by various anti-spamming
21458 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21459 NoCeM is pronounced ``no see-'em'', and means what the name
21460 implies---these are messages that make the offending articles, like, go
21461 away.
21462
21463 What use are these NoCeM messages if the articles are canceled anyway?
21464 Some sites do not honor cancel messages and some sites just honor cancels
21465 from a select few people.  Then you may wish to make use of the NoCeM
21466 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21467
21468 Gnus can read and parse the messages in this group automatically, and
21469 this will make spam disappear.
21470
21471 There are some variables to customize, of course:
21472
21473 @table @code
21474 @item gnus-use-nocem
21475 @vindex gnus-use-nocem
21476 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21477 by default.
21478
21479 @item gnus-nocem-groups
21480 @vindex gnus-nocem-groups
21481 Gnus will look for NoCeM messages in the groups in this list.  The
21482 default is
21483 @lisp
21484 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21485  "alt.nocem.misc" "news.admin.net-abuse.announce")
21486 @end lisp
21487
21488 @item gnus-nocem-issuers
21489 @vindex gnus-nocem-issuers
21490 There are many people issuing NoCeM messages.  This list says what
21491 people you want to listen to.  The default is
21492 @lisp
21493 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21494  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21495 @end lisp
21496 fine, upstanding citizens all of them.
21497
21498 Known despammers that you can put in this list are listed at@*
21499 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21500
21501 You do not have to heed NoCeM messages from all these people---just the
21502 ones you want to listen to.  You also don't have to accept all NoCeM
21503 messages from the people you like.  Each NoCeM message has a @dfn{type}
21504 header that gives the message a (more or less, usually less) rigorous
21505 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21506 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21507 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21508 Each condition is either a string (which is a regexp that matches types
21509 you want to use) or a list on the form @code{(not @var{string})}, where
21510 @var{string} is a regexp that matches types you don't want to use.
21511
21512 For instance, if you want all NoCeM messages from Chris Lewis except his
21513 @samp{troll} messages, you'd say:
21514
21515 @lisp
21516 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21517 @end lisp
21518
21519 On the other hand, if you just want nothing but his @samp{spam} and
21520 @samp{spew} messages, you'd say:
21521
21522 @lisp
21523 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21524 @end lisp
21525
21526 The specs are applied left-to-right.
21527
21528
21529 @item gnus-nocem-verifyer
21530 @vindex gnus-nocem-verifyer
21531 @findex mc-verify
21532 This should be a function for verifying that the NoCeM issuer is who she
21533 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21534 function.  If this is too slow and you don't care for verification
21535 (which may be dangerous), you can set this variable to @code{nil}.
21536
21537 If you want signed NoCeM messages to be verified and unsigned messages
21538 not to be verified (but used anyway), you could do something like:
21539
21540 @lisp
21541 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21542
21543 (defun my-gnus-mc-verify ()
21544   (not (eq 'forged
21545            (ignore-errors
21546              (if (mc-verify)
21547                  t
21548                'forged)))))
21549 @end lisp
21550
21551 This might be dangerous, though.
21552
21553 @item gnus-nocem-directory
21554 @vindex gnus-nocem-directory
21555 This is where Gnus will store its NoCeM cache files.  The default is@*
21556 @file{~/News/NoCeM/}.
21557
21558 @item gnus-nocem-expiry-wait
21559 @vindex gnus-nocem-expiry-wait
21560 The number of days before removing old NoCeM entries from the cache.
21561 The default is 15.  If you make it shorter Gnus will be faster, but you
21562 might then see old spam.
21563
21564 @item gnus-nocem-check-from
21565 @vindex gnus-nocem-check-from
21566 Non-@code{nil} means check for valid issuers in message bodies.
21567 Otherwise don't bother fetching articles unless their author matches a
21568 valid issuer; that is much faster if you are selective about the
21569 issuers.
21570
21571 @item gnus-nocem-check-article-limit
21572 @vindex gnus-nocem-check-article-limit
21573 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21574 group.  NoCeM groups can be huge and very slow to process.
21575
21576 @end table
21577
21578 Using NoCeM could potentially be a memory hog.  If you have many living
21579 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21580 big.  If this is a problem, you should kill off all (or most) of your
21581 unsubscribed groups (@pxref{Subscription Commands}).
21582
21583
21584 @node Undo
21585 @section Undo
21586 @cindex undo
21587
21588 It is very useful to be able to undo actions one has done.  In normal
21589 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21590 In Gnus buffers, however, it isn't that simple.
21591
21592 The things Gnus displays in its buffer is of no value whatsoever to
21593 Gnus---it's all just data designed to look nice to the user.
21594 Killing a group in the group buffer with @kbd{C-k} makes the line
21595 disappear, but that's just a side-effect of the real action---the
21596 removal of the group in question from the internal Gnus structures.
21597 Undoing something like that can't be done by the normal Emacs
21598 @code{undo} function.
21599
21600 Gnus tries to remedy this somewhat by keeping track of what the user
21601 does and coming up with actions that would reverse the actions the user
21602 takes.  When the user then presses the @code{undo} key, Gnus will run
21603 the code to reverse the previous action, or the previous actions.
21604 However, not all actions are easily reversible, so Gnus currently offers
21605 a few key functions to be undoable.  These include killing groups,
21606 yanking groups, and changing the list of read articles of groups.
21607 That's it, really.  More functions may be added in the future, but each
21608 added function means an increase in data to be stored, so Gnus will
21609 never be totally undoable.
21610
21611 @findex gnus-undo-mode
21612 @vindex gnus-use-undo
21613 @findex gnus-undo
21614 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21615 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21616 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21617 command, which should feel kinda like the normal Emacs @code{undo}
21618 command.
21619
21620
21621 @node Predicate Specifiers
21622 @section Predicate Specifiers
21623 @cindex predicate specifiers
21624
21625 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21626 form that allows flexible specification of predicates without having
21627 to type all that much.
21628
21629 These specifiers are lists consisting of functions, symbols and lists.
21630
21631 Here's an example:
21632
21633 @lisp
21634 (or gnus-article-unseen-p
21635     gnus-article-unread-p)
21636 @end lisp
21637
21638 The available symbols are @code{or}, @code{and} and @code{not}.  The
21639 functions all take one parameter.
21640
21641 @findex gnus-make-predicate
21642 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21643 to create a function that can be called.  This input parameter to this
21644 function will be passed along to all the functions in the predicate
21645 specifier.
21646
21647
21648 @node Moderation
21649 @section Moderation
21650 @cindex moderation
21651
21652 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21653 It is not included in the standard Gnus package.  Write a mail to
21654 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21655 get a copy.
21656
21657 The moderation package is implemented as a minor mode for summary
21658 buffers.  Put
21659
21660 @lisp
21661 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21662 @end lisp
21663
21664 in your @file{~/.gnus.el} file.
21665
21666 If you are the moderator of @samp{rec.zoofle}, this is how it's
21667 supposed to work:
21668
21669 @enumerate
21670 @item
21671 You split your incoming mail by matching on
21672 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21673 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21674
21675 @item
21676 You enter that group once in a while and post articles using the @kbd{e}
21677 (edit-and-post) or @kbd{s} (just send unedited) commands.
21678
21679 @item
21680 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21681 articles that weren't approved by you, you can cancel them with the
21682 @kbd{c} command.
21683 @end enumerate
21684
21685 To use moderation mode in these two groups, say:
21686
21687 @lisp
21688 (setq gnus-moderated-list
21689       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21690 @end lisp
21691
21692
21693 @node Image Enhancements
21694 @section Image Enhancements
21695
21696 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21697 support images yet.}, is able to display pictures and stuff, so Gnus has
21698 taken advantage of that.
21699
21700 @menu
21701 * X-Face::                      Display a funky, teensy black-and-white image.
21702 * Face::                        Display a funkier, teensier colored image.
21703 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21704 * Picons::                      How to display pictures of what you're reading.
21705 * XVarious::                    Other XEmacsy Gnusey variables.
21706 @end menu
21707
21708
21709 @node X-Face
21710 @subsection X-Face
21711 @cindex x-face
21712
21713 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21714 depth) image that's supposed to represent the author of the message.
21715 It seems to be supported by an ever-growing number of mail and news
21716 readers.
21717
21718 @cindex x-face
21719 @findex gnus-article-display-x-face
21720 @vindex gnus-article-x-face-command
21721 @vindex gnus-article-x-face-too-ugly
21722 @iftex
21723 @iflatex
21724 \include{xface}
21725 @end iflatex
21726 @end iftex
21727 @c @anchor{X-Face}
21728
21729 Decoding an @code{X-Face} header either requires an Emacs that has
21730 @samp{compface} support (which most XEmacs versions has), or that you
21731 have @samp{compface} installed on your system.  If either is true,
21732 Gnus will default to displaying @code{X-Face} headers.
21733
21734 The variable that controls this is the
21735 @code{gnus-article-x-face-command} variable.  If this variable is a
21736 string, this string will be executed in a sub-shell.  If it is a
21737 function, this function will be called with the face as the argument.
21738 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21739 the @code{From} header, the face will not be shown.
21740
21741 The default action under Emacs 20 is to fork off the @code{display}
21742 program@footnote{@code{display} is from the ImageMagick package.  For
21743 the @code{uncompface} and @code{icontopbm} programs look for a package
21744 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21745 view the face.
21746
21747 Under XEmacs or Emacs 21+ with suitable image support, the default
21748 action is to display the face before the @code{From} header.  (It's
21749 nicer if XEmacs has been compiled with @code{X-Face} support---that
21750 will make display somewhat faster.  If there's no native @code{X-Face}
21751 support, Gnus will try to convert the @code{X-Face} header using
21752 external programs from the @code{pbmplus} package and
21753 friends.@footnote{On a GNU/Linux system look for packages with names
21754 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21755
21756 (Note: @code{x-face} is used in the variable/function names, not
21757 @code{xface}).
21758
21759 Gnus provides a few convenience functions and variables to allow
21760 easier insertion of X-Face headers in outgoing messages.
21761
21762 @findex gnus-random-x-face
21763 @vindex gnus-convert-pbm-to-x-face-command
21764 @vindex gnus-x-face-directory
21765 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21766 @code{gnus-x-face-directory} and picks one at random, and then
21767 converts it to the X-Face format by using the
21768 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21769 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21770 header data as a string.
21771
21772 @findex gnus-insert-random-x-face-header
21773 @code{gnus-insert-random-x-face-header} calls
21774 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21775 randomly generated data.
21776
21777 @findex gnus-x-face-from-file
21778 @vindex gnus-convert-image-to-x-face-command
21779 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21780 converts the file to X-Face format by using the
21781 @code{gnus-convert-image-to-x-face-command} shell command.
21782
21783 Here's how you would typically use the first function.  Put something
21784 like the following in your @file{~/.gnus.el} file:
21785
21786 @lisp
21787 (setq message-required-news-headers
21788       (nconc message-required-news-headers
21789              (list '(X-Face . gnus-random-x-face))))
21790 @end lisp
21791
21792 Using the last function would be something like this:
21793
21794 @lisp
21795 (setq message-required-news-headers
21796       (nconc message-required-news-headers
21797              (list '(X-Face . (lambda ()
21798                                 (gnus-x-face-from-file
21799                                  "~/My-face.gif"))))))
21800 @end lisp
21801
21802
21803 @node Face
21804 @subsection Face
21805 @cindex face
21806
21807 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21808
21809 @code{Face} headers are essentially a funkier version of @code{X-Face}
21810 ones. They describe a 48x48 pixel colored image that's supposed to
21811 represent the author of the message.
21812
21813 @cindex face
21814 @findex gnus-article-display-face
21815 The contents of a @code{Face} header must be a base64 encoded PNG image.
21816 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21817 specifications.
21818
21819 Gnus provides a few convenience functions and variables to allow
21820 easier insertion of Face headers in outgoing messages.
21821
21822 @findex gnus-convert-png-to-face
21823 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21824 726 bytes long, and converts it to a face.
21825
21826 @findex gnus-face-from-file
21827 @vindex gnus-convert-image-to-face-command
21828 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21829 converts the file to Face format by using the
21830 @code{gnus-convert-image-to-face-command} shell command.
21831
21832 Here's how you would typically use this function. Put something like the
21833 following in your @file{~/.gnus.el} file:
21834
21835 @lisp
21836 (setq message-required-news-headers
21837       (nconc message-required-news-headers
21838              (list '(Face . (lambda ()
21839                               (gnus-face-from-file "~/face.jpg"))))))
21840 @end lisp
21841
21842
21843 @node Smileys
21844 @subsection Smileys
21845 @cindex smileys
21846
21847 @iftex
21848 @iflatex
21849 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21850 \input{smiley}
21851 @end iflatex
21852 @end iftex
21853
21854 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21855 currently the only package that uses Smiley, it is documented here.
21856
21857 In short---to use Smiley in Gnus, put the following in your
21858 @file{~/.gnus.el} file:
21859
21860 @lisp
21861 (setq gnus-treat-display-smileys t)
21862 @end lisp
21863
21864 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21865 the like---to pictures and displays those instead of the text smiley
21866 faces.  The conversion is controlled by a list of regexps that matches
21867 text and maps that to file names.
21868
21869 @vindex smiley-regexp-alist
21870 The alist used is specified by the @code{smiley-regexp-alist}
21871 variable.  The first item in each element is the regexp to be matched;
21872 the second element is the regexp match group that is to be replaced by
21873 the picture; and the third element is the name of the file to be
21874 displayed.
21875
21876 The following variables customize where Smiley will look for these
21877 files:
21878
21879 @table @code
21880
21881 @item smiley-data-directory
21882 @vindex smiley-data-directory
21883 Where Smiley will look for smiley faces files.
21884
21885 @item gnus-smiley-file-types
21886 @vindex gnus-smiley-file-types
21887 List of suffixes on smiley file names to try.
21888
21889 @end table
21890
21891
21892 @node Picons
21893 @subsection Picons
21894
21895 @iftex
21896 @iflatex
21897 \include{picons}
21898 @end iflatex
21899 @end iftex
21900
21901 So@dots{}  You want to slow down your news reader even more!  This is a
21902 good way to do so.  It's also a great way to impress people staring
21903 over your shoulder as you read news.
21904
21905 What are Picons?  To quote directly from the Picons Web site:
21906
21907 @iftex
21908 @iflatex
21909 \margindex{}
21910 @end iflatex
21911 @end iftex
21912
21913 @quotation
21914 @dfn{Picons} is short for ``personal icons''.  They're small,
21915 constrained images used to represent users and domains on the net,
21916 organized into databases so that the appropriate image for a given
21917 e-mail address can be found.  Besides users and domains, there are picon
21918 databases for Usenet newsgroups and weather forecasts.  The picons are
21919 in either monochrome @code{XBM} format or color @code{XPM} and
21920 @code{GIF} formats.
21921 @end quotation
21922
21923 @vindex gnus-picon-databases
21924 For instructions on obtaining and installing the picons databases,
21925 point your Web browser at
21926 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21927
21928 If you are using Debian GNU/Linux, saying @samp{apt-get install
21929 picons.*} will install the picons where Gnus can find them.
21930
21931 To enable displaying picons, simply make sure that
21932 @code{gnus-picon-databases} points to the directory containing the
21933 Picons databases.
21934
21935 The following variables offer control over where things are located.
21936
21937 @table @code
21938
21939 @item gnus-picon-databases
21940 @vindex gnus-picon-databases
21941 The location of the picons database.  This is a list of directories
21942 containing the @file{news}, @file{domains}, @file{users} (and so on)
21943 subdirectories.  Defaults to @code{("/usr/lib/picon"
21944 "/usr/local/faces")}.
21945
21946 @item gnus-picon-news-directories
21947 @vindex gnus-picon-news-directories
21948 List of subdirectories to search in @code{gnus-picon-databases} for
21949 newsgroups faces.  @code{("news")} is the default.
21950
21951 @item gnus-picon-user-directories
21952 @vindex gnus-picon-user-directories
21953 List of subdirectories to search in @code{gnus-picon-databases} for user
21954 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21955
21956 @item gnus-picon-domain-directories
21957 @vindex gnus-picon-domain-directories
21958 List of subdirectories to search in @code{gnus-picon-databases} for
21959 domain name faces.  Defaults to @code{("domains")}.  Some people may
21960 want to add @samp{"unknown"} to this list.
21961
21962 @item gnus-picon-file-types
21963 @vindex gnus-picon-file-types
21964 Ordered list of suffixes on picon file names to try.  Defaults to
21965 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21966
21967 @end table
21968
21969
21970 @node XVarious
21971 @subsection Various XEmacs Variables
21972
21973 @table @code
21974 @item gnus-xmas-glyph-directory
21975 @vindex gnus-xmas-glyph-directory
21976 This is where Gnus will look for pictures.  Gnus will normally
21977 auto-detect this directory, but you may set it manually if you have an
21978 unusual directory structure.
21979
21980 @item gnus-xmas-logo-color-alist
21981 @vindex gnus-xmas-logo-color-alist
21982 This is an alist where the key is a type symbol and the values are the
21983 foreground and background color of the splash page glyph.
21984
21985 @item gnus-xmas-logo-color-style
21986 @vindex gnus-xmas-logo-color-style
21987 This is the key used to look up the color in the alist described above.
21988 Valid values include @code{flame}, @code{pine}, @code{moss},
21989 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21990 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21991
21992 @item gnus-xmas-modeline-glyph
21993 @vindex gnus-xmas-modeline-glyph
21994 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21995 default.
21996
21997 @end table
21998
21999 @subsubsection Toolbar
22000
22001 @table @code
22002
22003 @item gnus-use-toolbar
22004 @vindex gnus-use-toolbar
22005 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
22006 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
22007 @code{right-toolbar}, or @code{left-toolbar}.
22008
22009 @item gnus-group-toolbar
22010 @vindex gnus-group-toolbar
22011 The toolbar in the group buffer.
22012
22013 @item gnus-summary-toolbar
22014 @vindex gnus-summary-toolbar
22015 The toolbar in the summary buffer.
22016
22017 @item gnus-summary-mail-toolbar
22018 @vindex gnus-summary-mail-toolbar
22019 The toolbar in the summary buffer of mail groups.
22020
22021 @end table
22022
22023 @iftex
22024 @iflatex
22025 \margindex{}
22026 @end iflatex
22027 @end iftex
22028
22029
22030 @node Fuzzy Matching
22031 @section Fuzzy Matching
22032 @cindex fuzzy matching
22033
22034 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
22035 things like scoring, thread gathering and thread comparison.
22036
22037 As opposed to regular expression matching, fuzzy matching is very fuzzy.
22038 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
22039 means, and the implementation has changed over time.
22040
22041 Basically, it tries to remove all noise from lines before comparing.
22042 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
22043 out of the strings before comparing the results.  This often leads to
22044 adequate results---even when faced with strings generated by text
22045 manglers masquerading as newsreaders.
22046
22047
22048 @node Thwarting Email Spam
22049 @section Thwarting Email Spam
22050 @cindex email spam
22051 @cindex spam
22052 @cindex UCE
22053 @cindex unsolicited commercial email
22054
22055 In these last days of the Usenet, commercial vultures are hanging about
22056 and grepping through news like crazy to find email addresses they can
22057 foist off their scams and products to.  As a reaction to this, many
22058 people have started putting nonsense addresses into their @code{From}
22059 lines.  I think this is counterproductive---it makes it difficult for
22060 people to send you legitimate mail in response to things you write, as
22061 well as making it difficult to see who wrote what.  This rewriting may
22062 perhaps be a bigger menace than the unsolicited commercial email itself
22063 in the end.
22064
22065 The biggest problem I have with email spam is that it comes in under
22066 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
22067 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
22068 mail group, only to find two pyramid schemes, seven advertisements
22069 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
22070 and one mail asking me to repent and find some god.
22071
22072 This is annoying.  Here's what you can do about it.
22073
22074 @menu
22075 * The problem of spam::         Some background, and some solutions
22076 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
22077 * SpamAssassin::                How to use external anti-spam tools.
22078 * Hashcash::                    Reduce spam by burning CPU time.
22079 * Filtering Spam Using The Spam ELisp Package::
22080 * Filtering Spam Using Statistics with spam-stat::
22081 @end menu
22082
22083 @node The problem of spam
22084 @subsection The problem of spam
22085 @cindex email spam
22086 @cindex spam filtering approaches
22087 @cindex filtering approaches, spam
22088 @cindex UCE
22089 @cindex unsolicited commercial email
22090
22091 First, some background on spam.
22092
22093 If you have access to e-mail, you are familiar with spam (technically
22094 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
22095 because e-mail delivery is very cheap compared to paper mail, so only
22096 a very small percentage of people need to respond to an UCE to make it
22097 worthwhile to the advertiser.  Ironically, one of the most common
22098 spams is the one offering a database of e-mail addresses for further
22099 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
22100 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
22101
22102 Spam comes from a wide variety of sources.  It is simply impossible to
22103 dispose of all spam without discarding useful messages.  A good
22104 example is the TMDA system, which requires senders
22105 unknown to you to confirm themselves as legitimate senders before
22106 their e-mail can reach you.  Without getting into the technical side
22107 of TMDA, a downside is clearly that e-mail from legitimate sources may
22108 be discarded if those sources can't or won't confirm themselves
22109 through the TMDA system.  Another problem with TMDA is that it
22110 requires its users to have a basic understanding of e-mail delivery
22111 and processing.
22112
22113 The simplest approach to filtering spam is filtering.  If you get 200
22114 spam messages per day from @samp{random-address@@vmadmin.com}, you
22115 block @samp{vmadmin.com}.  If you get 200 messages about
22116 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22117 message.  This, unfortunately, is a great way to discard legitimate
22118 e-mail.  For instance, the very informative and useful RISKS digest
22119 has been blocked by overzealous mail filters because it
22120 @strong{contained} words that were common in spam messages.
22121 Nevertheless, in isolated cases, with great care, direct filtering of
22122 mail can be useful.
22123
22124 Another approach to filtering e-mail is the distributed spam
22125 processing, for instance DCC implements such a system.  In essence,
22126 @var{N} systems around the world agree that a machine @var{X} in
22127 China, Ghana, or California is sending out spam e-mail, and these
22128 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22129 a database.  The criteria for spam detection vary---it may be the
22130 number of messages sent, the content of the messages, and so on.  When
22131 a user of the distributed processing system wants to find out if a
22132 message is spam, he consults one of those @var{N} systems.
22133
22134 Distributed spam processing works very well against spammers that send
22135 a large number of messages at once, but it requires the user to set up
22136 fairly complicated checks.  There are commercial and free distributed
22137 spam processing systems.  Distributed spam processing has its risks as
22138 well.  For instance legitimate e-mail senders have been accused of
22139 sending spam, and their web sites have been shut down for some time
22140 because of the incident.
22141
22142 The statistical approach to spam filtering is also popular.  It is
22143 based on a statistical analysis of previous spam messages.  Usually
22144 the analysis is a simple word frequency count, with perhaps pairs of
22145 words or 3-word combinations thrown into the mix.  Statistical
22146 analysis of spam works very well in most of the cases, but it can
22147 classify legitimate e-mail as spam in some cases.  It takes time to
22148 run the analysis, the full message must be analyzed, and the user has
22149 to store the database of spam analyses.
22150
22151 @node Anti-Spam Basics
22152 @subsection Anti-Spam Basics
22153 @cindex email spam
22154 @cindex spam
22155 @cindex UCE
22156 @cindex unsolicited commercial email
22157
22158 One way of dealing with spam is having Gnus split out all spam into a
22159 @samp{spam} mail group (@pxref{Splitting Mail}).
22160
22161 First, pick one (1) valid mail address that you can be reached at, and
22162 put it in your @code{From} header of all your news articles.  (I've
22163 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22164 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22165 sysadmin whether your sendmail installation accepts keywords in the local
22166 part of the mail address.)
22167
22168 @lisp
22169 (setq message-default-news-headers
22170       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22171 @end lisp
22172
22173 Then put the following split rule in @code{nnmail-split-fancy}
22174 (@pxref{Fancy Mail Splitting}):
22175
22176 @lisp
22177 (...
22178  (to "larsi@@trym.ifi.uio.no"
22179      (| ("subject" "re:.*" "misc")
22180         ("references" ".*@@.*" "misc")
22181         "spam"))
22182  ...)
22183 @end lisp
22184
22185 This says that all mail to this address is suspect, but if it has a
22186 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22187 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22188 (This idea probably comes from Tim Pierce.)
22189
22190 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22191 and do not include your email address explicitly in the @code{To}
22192 header.  Why they do this is unknown---perhaps it's to thwart this
22193 thwarting scheme?  In any case, this is trivial to deal with---you just
22194 put anything not addressed to you in the @samp{spam} group by ending
22195 your fancy split rule in this way:
22196
22197 @lisp
22198 (
22199  ...
22200  (to "larsi" "misc")
22201  "spam")
22202 @end lisp
22203
22204 In my experience, this will sort virtually everything into the right
22205 group.  You still have to check the @samp{spam} group from time to time to
22206 check for legitimate mail, though.  If you feel like being a good net
22207 citizen, you can even send off complaints to the proper authorities on
22208 each unsolicited commercial email---at your leisure.
22209
22210 This works for me.  It allows people an easy way to contact me (they can
22211 just press @kbd{r} in the usual way), and I'm not bothered at all with
22212 spam.  It's a win-win situation.  Forging @code{From} headers to point
22213 to non-existent domains is yucky, in my opinion.
22214
22215
22216
22217 @node SpamAssassin
22218 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22219 @cindex SpamAssassin
22220 @cindex Vipul's Razor
22221 @cindex DCC
22222
22223 The days where the hints in the previous section was sufficient in
22224 avoiding spam are coming to an end.  There are many tools out there
22225 that claim to reduce the amount of spam you get.  This section could
22226 easily become outdated fast, as new products replace old, but
22227 fortunately most of these tools seem to have similar interfaces.  Even
22228 though this section will use SpamAssassin as an example, it should be
22229 easy to adapt it to most other tools.
22230
22231 If the tool you are using is not installed on the mail server, you
22232 need to invoke it yourself.  Ideas on how to use the
22233 @code{:postscript} mail source parameter (@pxref{Mail Source
22234 Specifiers}) follow.
22235
22236 @lisp
22237 (setq mail-sources
22238       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22239         (pop :user "jrl"
22240              :server "pophost"
22241              :postscript
22242              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22243 @end lisp
22244
22245 Once you manage to process your incoming spool somehow, thus making
22246 the mail contain e.g.@: a header indicating it is spam, you are ready to
22247 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22248
22249 @lisp
22250 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22251                              ...))
22252 @end lisp
22253
22254 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22255
22256 @lisp
22257 (setq nnmail-split-methods 'nnmail-split-fancy
22258       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22259                              ...))
22260 @end lisp
22261
22262 Some people might not like the idea of piping the mail through various
22263 programs using a @code{:prescript} (if some program is buggy, you
22264 might lose all mail).  If you are one of them, another solution is to
22265 call the external tools during splitting.  Example fancy split method:
22266
22267 @lisp
22268 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22269                              ...))
22270 (defun kevin-spamassassin ()
22271   (save-excursion
22272     (widen)
22273     (if (eq 1 (call-process-region (point-min) (point-max)
22274                                    "spamc" nil nil nil "-c"))
22275         "spam")))
22276 @end lisp
22277
22278 Note that with the nnimap backend, message bodies will not be
22279 downloaded by default.  You need to set
22280 @code{nnimap-split-download-body} to t to do that (@pxref{Splitting in
22281 IMAP}).
22282
22283 That is about it.  As some spam is likely to get through anyway, you
22284 might want to have a nifty function to call when you happen to read
22285 spam.  And here is the nifty function:
22286
22287 @lisp
22288  (defun my-gnus-raze-spam ()
22289   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22290   (interactive)
22291   (gnus-summary-show-raw-article)
22292   (gnus-summary-save-in-pipe "razor-report -f -d")
22293   (gnus-summary-mark-as-expirable 1))
22294 @end lisp
22295
22296 @node Hashcash
22297 @subsection Hashcash
22298 @cindex hashcash
22299
22300 A novel technique to fight spam is to require senders to do something
22301 costly for each message they send.  This has the obvious drawback that
22302 you cannot rely on everyone in the world using this technique,
22303 since it is not part of the Internet standards, but it may be useful
22304 in smaller communities.
22305
22306 While the tools in the previous section work well in practice, they
22307 work only because the tools are constantly maintained and updated as
22308 new form of spam appears.  This means that a small percentage of spam
22309 will always get through.  It also means that somewhere, someone needs
22310 to read lots of spam to update these tools.  Hashcash avoids that, but
22311 instead requires that everyone you communicate with supports the
22312 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22313 The approaches have their own advantages and disadvantages, but as
22314 often in the real world, a combination of them is stronger than either
22315 one of them separately.
22316
22317 @cindex X-Hashcash
22318 The ``something costly'' is to burn CPU time, more specifically to
22319 compute a hash collision up to a certain number of bits.  The
22320 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22321 header.  For more details, and for the external application
22322 @code{hashcash} you need to install to use this feature, see
22323 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22324 information can be found at @uref{http://www.camram.org/}.
22325
22326 If you wish to call hashcash for each message you send, say something
22327 like:
22328
22329 @lisp
22330 (require 'hashcash)
22331 (add-hook 'message-send-hook 'mail-add-payment)
22332 @end lisp
22333
22334 The @file{hashcash.el} library can be found in the Gnus development
22335 contrib directory or at
22336 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22337
22338 You will need to set up some additional variables as well:
22339
22340 @table @code
22341
22342 @item hashcash-default-payment
22343 @vindex hashcash-default-payment
22344 This variable indicates the default number of bits the hash collision
22345 should consist of.  By default this is 0, meaning nothing will be
22346 done.  Suggested useful values include 17 to 29.
22347
22348 @item hashcash-payment-alist
22349 @vindex hashcash-payment-alist
22350 Some receivers may require you to spend burn more CPU time than the
22351 default.  This variable contains a list of @samp{(@var{addr}
22352 @var{amount})} cells, where @var{addr} is the receiver (email address
22353 or newsgroup) and @var{amount} is the number of bits in the collision
22354 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22355 @var{amount})} cells, where the @var{string} is the string to use
22356 (normally the email address or newsgroup name is used).
22357
22358 @item hashcash
22359 @vindex hashcash
22360 Where the @code{hashcash} binary is installed.
22361
22362 @end table
22363
22364 Currently there is no built in functionality in Gnus to verify
22365 hashcash cookies, it is expected that this is performed by your hand
22366 customized mail filtering scripts.  Improvements in this area would be
22367 a useful contribution, however.
22368
22369 @node Filtering Spam Using The Spam ELisp Package
22370 @subsection Filtering Spam Using The Spam ELisp Package
22371 @cindex spam filtering
22372 @cindex spam
22373
22374 The idea behind @file{spam.el} is to have a control center for spam detection
22375 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22376 filters incoming mail, and it analyzes mail known to be spam or ham.
22377 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22378 non-spam messages.
22379
22380 First of all, you @strong{must} run the function
22381 @code{spam-initialize} to autoload @code{spam.el} and to install the
22382 @code{spam.el} hooks.  There is one exception: if you use the
22383 @code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
22384 should turn it on before @code{spam-initialize}:
22385
22386 @example
22387 (setq spam-use-stat t) ;; if needed
22388 (spam-initialize)
22389 @end example
22390
22391 So, what happens when you load @file{spam.el}?
22392
22393 You get the following keyboard commands:
22394
22395 @table @kbd
22396
22397 @item M-d
22398 @itemx M s x
22399 @itemx S x
22400 @kindex M-d
22401 @kindex S x
22402 @kindex M s x
22403 @findex gnus-summary-mark-as-spam
22404 @code{gnus-summary-mark-as-spam}.
22405
22406 Mark current article as spam, showing it with the @samp{$} mark.
22407 Whenever you see a spam article, make sure to mark its summary line
22408 with @kbd{M-d} before leaving the group.  This is done automatically
22409 for unread articles in @emph{spam} groups.
22410
22411 @item M s t
22412 @itemx S t
22413 @kindex M s t
22414 @kindex S t
22415 @findex spam-bogofilter-score
22416 @code{spam-bogofilter-score}.
22417
22418 You must have Bogofilter installed for that command to work properly.
22419
22420 @xref{Bogofilter}.
22421
22422 @end table
22423
22424 Also, when you load @file{spam.el}, you will be able to customize its
22425 variables.  Try @code{customize-group} on the @samp{spam} variable
22426 group.
22427
22428 @vindex gnus-spam-process-newsgroups
22429 The concepts of ham processors and spam processors are very important.
22430 Ham processors and spam processors for a group can be set with the
22431 @code{spam-process} group parameter, or the
22432 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22433 mail known to be non-spam (@emph{ham}) and process it in some way so
22434 that later similar mail will also be considered non-spam.  Spam
22435 processors take mail known to be spam and process it so similar spam
22436 will be detected later.
22437
22438 @vindex gnus-spam-newsgroup-contents
22439 Gnus learns from the spam you get.  You have to collect your spam in
22440 one or more spam groups, and set or customize the variable
22441 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22442 groups to contain spam by setting their group parameter
22443 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22444 by customizing the corresponding variable
22445 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22446 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22447 also be used to declare groups as @emph{ham} groups if you set their
22448 classification to @code{gnus-group-spam-classification-ham}.  If
22449 groups are not classified by means of @code{spam-junk-mailgroups},
22450 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22451 considered @emph{unclassified}.  All groups are unclassified by
22452 default.
22453
22454 @vindex gnus-spam-mark
22455 @cindex $
22456 In spam groups, all messages are considered to be spam by default:
22457 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22458 group.  If you have seen a message, had it marked as spam, then
22459 unmarked it, it won't be marked as spam when you enter the group
22460 thereafter.  You can disable that behavior, so all unread messages
22461 will get the @samp{$} mark, if you set the
22462 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
22463 should remove the @samp{$} mark when you are in the group summary
22464 buffer for every message that is not spam after all.  To remove the
22465 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
22466 @kbd{d} for declaring it read the non-spam way.  When you leave a
22467 group, all spam-marked (@samp{$}) articles are sent to a spam
22468 processor which will study them as spam samples.
22469
22470 Messages may also be deleted in various other ways, and unless
22471 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22472 and @samp{r} for default read or explicit delete, marks @samp{X} and
22473 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22474 low scores, are all considered to be associated with articles which
22475 are not spam.  This assumption might be false, in particular if you
22476 use kill files or score files as means for detecting genuine spam, you
22477 should then adjust the @code{ham-marks} group parameter.
22478
22479 @defvar ham-marks
22480 You can customize this group or topic parameter to be the list of
22481 marks you want to consider ham.  By default, the list contains the
22482 deleted, read, killed, kill-filed, and low-score marks.
22483 @end defvar
22484
22485 @defvar spam-marks
22486 You can customize this group or topic parameter to be the list of
22487 marks you want to consider spam.  By default, the list contains only
22488 the spam mark.
22489 @end defvar
22490
22491 When you leave @emph{any} group, regardless of its
22492 @code{spam-contents} classification, all spam-marked articles are sent
22493 to a spam processor, which will study these as spam samples.  If you
22494 explicit kill a lot, you might sometimes end up with articles marked
22495 @samp{K} which you never saw, and which might accidentally contain
22496 spam.  Best is to make sure that real spam is marked with @samp{$},
22497 and nothing else.
22498
22499 @vindex gnus-ham-process-destinations
22500 When you leave a @emph{spam} group, all spam-marked articles are
22501 marked as expired after processing with the spam processor.  This is
22502 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22503 @strong{ham} articles in a spam group will be moved to a location
22504 determined by either the @code{ham-process-destination} group
22505 parameter or a match in the @code{gnus-ham-process-destinations}
22506 variable, which is a list of regular expressions matched with group
22507 names (it's easiest to customize this variable with
22508 @code{customize-variable gnus-ham-process-destinations}).  Each
22509 newsgroup specification has the format (REGEXP PROCESSOR) in a
22510 standard Lisp list, if you prefer to customize the variable manually.
22511 The ultimate location is a group name.  If the
22512 @code{ham-process-destination} parameter is not set, ham articles are
22513 left in place.  If the
22514 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22515 set, the ham articles are marked as unread before being moved.
22516
22517 When you leave a @emph{ham} group, all ham-marked articles are sent to
22518 a ham processor, which will study these as non-spam samples.
22519
22520 @vindex spam-process-ham-in-spam-groups
22521 By default the variable @code{spam-process-ham-in-spam-groups} is
22522 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
22523 to be processed.  Normally this is not done, you are expected instead
22524 to send your ham to a ham group and process it there.
22525
22526 @vindex spam-process-ham-in-nonham-groups
22527 By default the variable @code{spam-process-ham-in-nonham-groups} is
22528 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
22529 or unclassified) groups to be processed.  Normally this is not done,
22530 you are expected instead to send your ham to a ham group and process
22531 it there.
22532
22533 @vindex gnus-spam-process-destinations
22534 When you leave a @emph{ham} or @emph{unclassified} group, all
22535 @strong{spam} articles are moved to a location determined by either
22536 the @code{spam-process-destination} group parameter or a match in the
22537 @code{gnus-spam-process-destinations} variable, which is a list of
22538 regular expressions matched with group names (it's easiest to
22539 customize this variable with @code{customize-variable
22540 gnus-spam-process-destinations}).  Each newsgroup specification has
22541 the repeated format (REGEXP PROCESSOR) and they are all in a standard
22542 Lisp list, if you prefer to customize the variable manually.  The
22543 ultimate location is a group name.  If the
22544 @code{spam-process-destination} parameter is not set, the spam
22545 articles are only expired.
22546
22547 To use the @file{spam.el} facilities for incoming mail filtering, you
22548 must add the following to your fancy split list
22549 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22550
22551 @example
22552 (: spam-split)
22553 @end example
22554
22555 Note that the fancy split may be called @code{nnmail-split-fancy} or
22556 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22557 nnimap back ends to retrieve your mail.
22558
22559 The @code{spam-split} function will process incoming mail and send the
22560 mail considered to be spam into the group name given by the variable
22561 @code{spam-split-group}.  By default that group name is @samp{spam},
22562 but you can customize @code{spam-split-group}.  Make sure the contents
22563 of @code{spam-split-group} are an @emph{unqualified} group name, for
22564 instance in an @code{nnimap} server @samp{your-server} the value
22565 @samp{spam} will turn out to be @samp{nnimap+your-server:spam}.  The
22566 value @samp{nnimap+server:spam}, therefore, is wrong and will
22567 actually give you the group
22568 @samp{nnimap+your-server:nnimap+server:spam} which may or may not
22569 work depending on your server's tolerance for strange group names.
22570
22571 You can also give @code{spam-split} a parameter,
22572 e.g. @samp{'spam-use-regex-headers} or @samp{"maybe-spam"}.  Why is
22573 this useful?
22574
22575 Take these split rules (with @code{spam-use-regex-headers} and
22576 @code{spam-use-blackholes} set):
22577
22578 @example
22579  nnimap-split-fancy '(|
22580                       (any "ding" "ding")
22581                       (: spam-split)
22582                       ;; default mailbox
22583                       "mail")
22584 @end example
22585
22586 Now, the problem is that you want all ding messages to make it to the
22587 ding folder.  But that will let obvious spam (for example, spam
22588 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22589 when it's sent to the ding list.  On the other hand, some messages to
22590 the ding list are from a mail server in the blackhole list, so the
22591 invocation of @code{spam-split} can't be before the ding rule.
22592
22593 You can let SpamAssassin headers supersede ding rules, but all other
22594 @code{spam-split} rules (including a second invocation of the
22595 regex-headers check) will be after the ding rule:
22596
22597 @example
22598  nnimap-split-fancy '(|
22599 ;;; all spam detected by spam-use-regex-headers goes to "regex-spam"
22600                       (: spam-split "regex-spam" 'spam-use-regex-headers)
22601                       (any "ding" "ding")
22602 ;;; all other spam detected by spam-split goes to spam-split-group
22603                       (: spam-split)
22604                       ;; default mailbox
22605                       "mail")
22606 @end example
22607
22608 Basically, this lets you invoke specific @code{spam-split} checks
22609 depending on your particular needs, and to target the results of those
22610 checks to a particular spam group.  You don't have to throw all mail
22611 into all the spam tests.  Another reason why this is nice is that
22612 messages to mailing lists you have rules for don't have to have
22613 resource-intensive blackhole checks performed on them.  You could also
22614 specify different spam checks for your nnmail split vs. your nnimap
22615 split.  Go crazy.
22616
22617 You still have to have specific checks such as
22618 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22619 invoke @code{spam-split} with the check.  The reason is that when
22620 loading @file{spam.el}, some conditional loading is done depending on
22621 what @code{spam-use-xyz} variables you have set.
22622
22623 @emph{Note for IMAP users}
22624
22625 The boolean variable @code{nnimap-split-download-body} needs to be
22626 set, if you want to split based on the whole message instead of just
22627 the headers.  By default, the nnimap back end will only retrieve the
22628 message headers.  If you use @code{spam-check-bogofilter},
22629 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22630 can benefit from the full message body), you should set this variable.
22631 It is not set by default because it will slow @acronym{IMAP} down, and
22632 that is not an appropriate decision to make on behalf of the user.
22633
22634 @xref{Splitting in IMAP}.
22635
22636 @emph{TODO: Currently, spam.el only supports insertion of articles
22637 into a back end.  There is no way to tell spam.el that an article is no
22638 longer spam or ham.}
22639
22640 @emph{TODO: spam.el needs to provide a uniform way of training all the
22641 statistical databases.  Some have that functionality built-in, others
22642 don't.}
22643
22644 The following are the methods you can use to control the behavior of
22645 @code{spam-split} and their corresponding spam and ham processors:
22646
22647 @menu
22648 * Blacklists and Whitelists::
22649 * BBDB Whitelists::
22650 * Gmane Spam Reporting::
22651 * Anti-spam Hashcash Payments::
22652 * Blackholes::
22653 * Regular Expressions Header Matching::
22654 * Bogofilter::
22655 * ifile spam filtering::
22656 * spam-stat spam filtering::
22657 * SpamOracle::
22658 * Extending the spam elisp package::
22659 @end menu
22660
22661 @node Blacklists and Whitelists
22662 @subsubsection Blacklists and Whitelists
22663 @cindex spam filtering
22664 @cindex whitelists, spam filtering
22665 @cindex blacklists, spam filtering
22666 @cindex spam
22667
22668 @defvar spam-use-blacklist
22669
22670 Set this variable to @code{t} if you want to use blacklists when
22671 splitting incoming mail.  Messages whose senders are in the blacklist
22672 will be sent to the @code{spam-split-group}.  This is an explicit
22673 filter, meaning that it acts only on mail senders @emph{declared} to
22674 be spammers.
22675
22676 @end defvar
22677
22678 @defvar spam-use-whitelist
22679
22680 Set this variable to @code{t} if you want to use whitelists when
22681 splitting incoming mail.  Messages whose senders are not in the
22682 whitelist will be sent to the next spam-split rule.  This is an
22683 explicit filter, meaning that unless someone is in the whitelist, their
22684 messages are not assumed to be spam or ham.
22685
22686 @end defvar
22687
22688 @defvar spam-use-whitelist-exclusive
22689
22690 Set this variable to @code{t} if you want to use whitelists as an
22691 implicit filter, meaning that every message will be considered spam
22692 unless the sender is in the whitelist.  Use with care.
22693
22694 @end defvar
22695
22696 @defvar gnus-group-spam-exit-processor-blacklist
22697
22698 Add this symbol to a group's @code{spam-process} parameter by
22699 customizing the group parameters or the
22700 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22701 added to a group's @code{spam-process} parameter, the senders of
22702 spam-marked articles will be added to the blacklist.
22703
22704 @end defvar
22705
22706 @defvar gnus-group-ham-exit-processor-whitelist
22707
22708 Add this symbol to a group's @code{spam-process} parameter by
22709 customizing the group parameters or the
22710 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22711 added to a group's @code{spam-process} parameter, the senders of
22712 ham-marked articles in @emph{ham} groups will be added to the
22713 whitelist.  Note that this ham processor has no effect in @emph{spam}
22714 or @emph{unclassified} groups.
22715
22716 @end defvar
22717
22718 Blacklists are lists of regular expressions matching addresses you
22719 consider to be spam senders.  For instance, to block mail from any
22720 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22721 blacklist.  You start out with an empty blacklist.  Blacklist entries
22722 use the Emacs regular expression syntax.
22723
22724 Conversely, whitelists tell Gnus what addresses are considered
22725 legitimate.  All messages from whitelisted addresses are considered
22726 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22727 Emacs regular expression syntax.
22728
22729 The blacklist and whitelist file locations can be customized with the
22730 @code{spam-directory} variable (@file{~/News/spam} by default), or
22731 the @code{spam-whitelist} and @code{spam-blacklist} variables
22732 directly.  The whitelist and blacklist files will by default be in the
22733 @code{spam-directory} directory, named @file{whitelist} and
22734 @file{blacklist} respectively.
22735
22736 @node BBDB Whitelists
22737 @subsubsection BBDB Whitelists
22738 @cindex spam filtering
22739 @cindex BBDB whitelists, spam filtering
22740 @cindex BBDB, spam filtering
22741 @cindex spam
22742
22743 @defvar spam-use-BBDB
22744
22745 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22746 Whitelists}), but uses the BBDB as the source of whitelisted
22747 addresses, without regular expressions.  You must have the BBDB loaded
22748 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22749 not in the BBDB will be sent to the next spam-split rule.  This is an
22750 explicit filter, meaning that unless someone is in the BBDB, their
22751 messages are not assumed to be spam or ham.
22752
22753 @end defvar
22754
22755 @defvar spam-use-BBDB-exclusive
22756
22757 Set this variable to @code{t} if you want to use the BBDB as an
22758 implicit filter, meaning that every message will be considered spam
22759 unless the sender is in the BBDB.  Use with care.  Only sender
22760 addresses in the BBDB will be allowed through; all others will be
22761 classified as spammers.
22762
22763 @end defvar
22764
22765 @defvar gnus-group-ham-exit-processor-BBDB
22766
22767 Add this symbol to a group's @code{spam-process} parameter by
22768 customizing the group parameters or the
22769 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22770 added to a group's @code{spam-process} parameter, the senders of
22771 ham-marked articles in @emph{ham} groups will be added to the
22772 BBDB.  Note that this ham processor has no effect in @emph{spam}
22773 or @emph{unclassified} groups.
22774
22775 @end defvar
22776
22777 @node Gmane Spam Reporting
22778 @subsubsection Gmane Spam Reporting
22779 @cindex spam reporting
22780 @cindex Gmane, spam reporting
22781 @cindex Gmane, spam reporting
22782 @cindex spam
22783
22784 @defvar gnus-group-spam-exit-processor-report-gmane
22785
22786 Add this symbol to a group's @code{spam-process} parameter by
22787 customizing the group parameters or the
22788 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22789 added to a group's @code{spam-process} parameter, the spam-marked
22790 articles groups will be reported to the Gmane administrators via a
22791 HTTP request.
22792
22793 Gmane can be found at @uref{http://gmane.org}.
22794
22795 @end defvar
22796
22797 @defvar spam-report-gmane-use-article-number
22798
22799 This variable is @code{t} by default.  Set it to @code{nil} if you are
22800 running your own news server, for instance, and the local article
22801 numbers don't correspond to the Gmane article numbers.  When
22802 @code{spam-report-gmane-use-article-number} is @code{nil},
22803 @code{spam-report.el} will use the @code{X-Report-Spam} header that
22804 Gmane provides.
22805
22806 @end defvar
22807
22808 @node Anti-spam Hashcash Payments
22809 @subsubsection Anti-spam Hashcash Payments
22810 @cindex spam filtering
22811 @cindex hashcash, spam filtering
22812 @cindex spam
22813
22814 @defvar spam-use-hashcash
22815
22816 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22817 Whitelists}), but uses hashcash tokens for whitelisting messages
22818 instead of the sender address.  You must have the @code{hashcash.el}
22819 package loaded for @code{spam-use-hashcash} to work properly.
22820 Messages without a hashcash payment token will be sent to the next
22821 spam-split rule.  This is an explicit filter, meaning that unless a
22822 hashcash token is found, the messages are not assumed to be spam or
22823 ham.
22824
22825 @end defvar
22826
22827 @node Blackholes
22828 @subsubsection Blackholes
22829 @cindex spam filtering
22830 @cindex blackholes, spam filtering
22831 @cindex spam
22832
22833 @defvar spam-use-blackholes
22834
22835 This option is disabled by default.  You can let Gnus consult the
22836 blackhole-type distributed spam processing systems (DCC, for instance)
22837 when you set this option.  The variable @code{spam-blackhole-servers}
22838 holds the list of blackhole servers Gnus will consult.  The current
22839 list is fairly comprehensive, but make sure to let us know if it
22840 contains outdated servers.
22841
22842 The blackhole check uses the @code{dig.el} package, but you can tell
22843 @file{spam.el} to use @code{dns.el} instead for better performance if
22844 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22845 this time to set @code{spam-use-dig} to @code{nil} despite the
22846 possible performance improvements, because some users may be unable to
22847 use it, but you can try it and see if it works for you.
22848
22849 @end defvar
22850
22851 @defvar spam-blackhole-servers
22852
22853 The list of servers to consult for blackhole checks.
22854
22855 @end defvar
22856
22857 @defvar spam-blackhole-good-server-regex
22858
22859 A regular expression for IPs that should not be checked against the
22860 blackhole server list.  When set to @code{nil}, it has no effect.
22861
22862 @end defvar
22863
22864 @defvar spam-use-dig
22865
22866 Use the @code{dig.el} package instead of the @code{dns.el} package.
22867 The default setting of @code{t} is recommended.
22868
22869 @end defvar
22870
22871 Blackhole checks are done only on incoming mail.  There is no spam or
22872 ham processor for blackholes.
22873
22874 @node Regular Expressions Header Matching
22875 @subsubsection Regular Expressions Header Matching
22876 @cindex spam filtering
22877 @cindex regular expressions header matching, spam filtering
22878 @cindex spam
22879
22880 @defvar spam-use-regex-headers
22881
22882 This option is disabled by default.  You can let Gnus check the
22883 message headers against lists of regular expressions when you set this
22884 option.  The variables @code{spam-regex-headers-spam} and
22885 @code{spam-regex-headers-ham} hold the list of regular expressions.
22886 Gnus will check against the message headers to determine if the
22887 message is spam or ham, respectively.
22888
22889 @end defvar
22890
22891 @defvar spam-regex-headers-spam
22892
22893 The list of regular expressions that, when matched in the headers of
22894 the message, positively identify it as spam.
22895
22896 @end defvar
22897
22898 @defvar spam-regex-headers-ham
22899
22900 The list of regular expressions that, when matched in the headers of
22901 the message, positively identify it as ham.
22902
22903 @end defvar
22904
22905 Regular expression header checks are done only on incoming mail.
22906 There is no specific spam or ham processor for regular expressions.
22907
22908 @node Bogofilter
22909 @subsubsection Bogofilter
22910 @cindex spam filtering
22911 @cindex bogofilter, spam filtering
22912 @cindex spam
22913
22914 @defvar spam-use-bogofilter
22915
22916 Set this variable if you want @code{spam-split} to use Eric Raymond's
22917 speedy Bogofilter.
22918
22919 With a minimum of care for associating the @samp{$} mark for spam
22920 articles only, Bogofilter training all gets fairly automatic.  You
22921 should do this until you get a few hundreds of articles in each
22922 category, spam or not.  The command @kbd{S t} in summary mode, either
22923 for debugging or for curiosity, shows the @emph{spamicity} score of
22924 the current article (between 0.0 and 1.0).
22925
22926 Bogofilter determines if a message is spam based on a specific
22927 threshold.  That threshold can be customized, consult the Bogofilter
22928 documentation.
22929
22930 If the @code{bogofilter} executable is not in your path, Bogofilter
22931 processing will be turned off.
22932
22933 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22934
22935 @end defvar
22936
22937 @defvar spam-use-bogofilter-headers
22938
22939 Set this variable if you want @code{spam-split} to use Eric Raymond's
22940 speedy Bogofilter, looking only at the message headers.  It works
22941 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22942 must be in the message already.  Normally you would do this with a
22943 procmail recipe or something similar; consult the Bogofilter
22944 installation documents for details.
22945
22946 You should not enable this if you use @code{spam-use-bogofilter}.
22947
22948 @end defvar
22949
22950 @defvar gnus-group-spam-exit-processor-bogofilter
22951 Add this symbol to a group's @code{spam-process} parameter by
22952 customizing the group parameters or the
22953 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22954 added to a group's @code{spam-process} parameter, spam-marked articles
22955 will be added to the Bogofilter spam database.
22956 @end defvar
22957
22958 @defvar gnus-group-ham-exit-processor-bogofilter
22959 Add this symbol to a group's @code{spam-process} parameter by
22960 customizing the group parameters or the
22961 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22962 added to a group's @code{spam-process} parameter, the ham-marked
22963 articles in @emph{ham} groups will be added to the Bogofilter database
22964 of non-spam messages.  Note that this ham processor has no effect in
22965 @emph{spam} or @emph{unclassified} groups.
22966 @end defvar
22967
22968 @defvar spam-bogofilter-database-directory
22969
22970 This is the directory where Bogofilter will store its databases.  It
22971 is not specified by default, so Bogofilter will use its own default
22972 database directory.
22973
22974 @end defvar
22975
22976 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22977 purpose.  A ham and a spam processor are provided, plus the
22978 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22979 variables to indicate to spam-split that Bogofilter should either be
22980 used, or has already been used on the article.  The 0.9.2.1 version of
22981 Bogofilter was used to test this functionality.
22982
22983 @node ifile spam filtering
22984 @subsubsection ifile spam filtering
22985 @cindex spam filtering
22986 @cindex ifile, spam filtering
22987 @cindex spam
22988
22989 @defvar spam-use-ifile
22990
22991 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22992 statistical analyzer similar to Bogofilter.
22993
22994 @end defvar
22995
22996 @defvar spam-ifile-all-categories
22997
22998 Enable this variable if you want @code{spam-use-ifile} to give you all
22999 the ifile categories, not just spam/non-spam.  If you use this, make
23000 sure you train ifile as described in its documentation.
23001
23002 @end defvar
23003
23004 @defvar spam-ifile-spam-category
23005
23006 This is the category of spam messages as far as ifile is concerned.
23007 The actual string used is irrelevant, but you probably want to leave
23008 the default value of @samp{spam}.
23009 @end defvar
23010
23011 @defvar spam-ifile-database-path
23012
23013 This is the filename for the ifile database.  It is not specified by
23014 default, so ifile will use its own default database name.
23015
23016 @end defvar
23017
23018 The ifile mail classifier is similar to Bogofilter in intent and
23019 purpose.  A ham and a spam processor are provided, plus the
23020 @code{spam-use-ifile} variable to indicate to spam-split that ifile
23021 should be used.  The 1.2.1 version of ifile was used to test this
23022 functionality.
23023
23024 @node spam-stat spam filtering
23025 @subsubsection spam-stat spam filtering
23026 @cindex spam filtering
23027 @cindex spam-stat, spam filtering
23028 @cindex spam-stat
23029 @cindex spam
23030
23031 @xref{Filtering Spam Using Statistics with spam-stat}.
23032
23033 @defvar spam-use-stat
23034
23035 Enable this variable if you want @code{spam-split} to use
23036 spam-stat.el, an Emacs Lisp statistical analyzer.
23037
23038 @end defvar
23039
23040 @defvar gnus-group-spam-exit-processor-stat
23041 Add this symbol to a group's @code{spam-process} parameter by
23042 customizing the group parameters or the
23043 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23044 added to a group's @code{spam-process} parameter, the spam-marked
23045 articles will be added to the spam-stat database of spam messages.
23046 @end defvar
23047
23048 @defvar gnus-group-ham-exit-processor-stat
23049 Add this symbol to a group's @code{spam-process} parameter by
23050 customizing the group parameters or the
23051 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23052 added to a group's @code{spam-process} parameter, the ham-marked
23053 articles in @emph{ham} groups will be added to the spam-stat database
23054 of non-spam messages.  Note that this ham processor has no effect in
23055 @emph{spam} or @emph{unclassified} groups.
23056 @end defvar
23057
23058 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
23059 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
23060 which unlike ifile or Bogofilter does not require external programs.
23061 A spam and a ham processor, and the @code{spam-use-stat} variable for
23062 @code{spam-split} are provided.
23063
23064 @node SpamOracle
23065 @subsubsection Using SpamOracle with Gnus
23066 @cindex spam filtering
23067 @cindex SpamOracle
23068 @cindex spam
23069
23070 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
23071 statistical mail filtering tool written by Xavier Leroy and needs to be
23072 installed separately.
23073
23074 There are several ways to use SpamOracle with Gnus.  In all cases, your
23075 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
23076 then enter an @samp{X-Spam} header indicating whether it regards the
23077 mail as a spam mail or not.
23078
23079 One possibility is to run SpamOracle as a @code{:prescript} from the
23080 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
23081 the advantage that the user can see the @emph{X-Spam} headers.
23082
23083 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
23084 Using The Spam ELisp Package}) call SpamOracle.
23085
23086 @vindex spam-use-spamoracle
23087 To enable SpamOracle usage by @file{spam.el}, set the variable
23088 @code{spam-use-spamoracle} to @code{t} and configure the
23089 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
23090 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
23091 this example the @samp{INBOX} of an nnimap server is filtered using
23092 SpamOracle.  Mails recognized as spam mails will be moved to
23093 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
23094 in @samp{INBOX}:
23095
23096 @example
23097 (setq spam-use-spamoracle t
23098       spam-split-group "Junk"
23099       nnimap-split-inbox '("INBOX")
23100       nnimap-split-rule 'nnimap-split-fancy
23101       nnimap-split-fancy '(| (: spam-split) "INBOX"))
23102 @end example
23103
23104 @defvar spam-use-spamoracle
23105 Set to @code{t} if you want Gnus to enable spam filtering using
23106 SpamOracle.
23107 @end defvar
23108
23109 @defvar spam-spamoracle-binary
23110 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
23111 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
23112 can be customized.
23113 @end defvar
23114
23115 @defvar spam-spamoracle-database
23116 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
23117 store its analyses.  This is controlled by the variable
23118 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
23119 the default SpamOracle database will be used.  In case you want your
23120 database to live somewhere special, set
23121 @code{spam-spamoracle-database} to this path.
23122 @end defvar
23123
23124 SpamOracle employs a statistical algorithm to determine whether a
23125 message is spam or ham.  In order to get good results, meaning few
23126 false hits or misses, SpamOracle needs training.  SpamOracle learns the
23127 characteristics of your spam mails.  Using the @emph{add} mode
23128 (training mode) one has to feed good (ham) and spam mails to
23129 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
23130 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
23131 spam- and ham-processors, which is much more convenient.  For a
23132 detailed description of spam- and ham-processors, @xref{Filtering Spam
23133 Using The Spam ELisp Package}.
23134
23135 @defvar gnus-group-spam-exit-processor-spamoracle
23136 Add this symbol to a group's @code{spam-process} parameter by
23137 customizing the group parameter or the
23138 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23139 to a group's @code{spam-process} parameter, spam-marked articles will be
23140 sent to SpamOracle as spam samples.
23141 @end defvar
23142
23143 @defvar gnus-group-ham-exit-processor-spamoracle
23144 Add this symbol to a group's @code{spam-process} parameter by
23145 customizing the group parameter or the
23146 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23147 to a grup's @code{spam-process} parameter, the ham-marked articles in
23148 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23149 messages.  Note that this ham processor has no effect in @emph{spam} or
23150 @emph{unclassified} groups.
23151 @end defvar
23152
23153 @emph{Example:} These are the Group Parameters of an group that has been
23154 classified as a ham group, meaning that it should only contain ham
23155 messages.
23156 @example
23157  ((spam-contents gnus-group-spam-classification-ham)
23158   (spam-process
23159    (gnus-group-spam-exit-processor-spamoracle)))
23160 @end example
23161 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
23162 installed.  If the group contains spam message (e.g. because SpamOracle
23163 has not had enough sample messages yet) and the user marks some
23164 messages as spam messages, these messages will be processed by
23165 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23166 the messages to SpamOracle as new samples for spam.
23167
23168 @node Extending the spam elisp package
23169 @subsubsection Extending the spam elisp package
23170 @cindex spam filtering
23171 @cindex spam elisp package, extending
23172 @cindex extending the spam elisp package
23173
23174 Say you want to add a new back end called blackbox.  For filtering
23175 incoming mail, provide the following:
23176
23177 @enumerate
23178
23179 @item
23180 code
23181
23182 @lisp
23183 (defvar spam-use-blackbox nil
23184   "True if blackbox should be used.")
23185 @end lisp
23186
23187 Add
23188 @example
23189     (spam-use-blackbox   . spam-check-blackbox)
23190 @end example
23191 to @code{spam-list-of-checks}.
23192
23193 @item
23194 functionality
23195
23196 Write the @code{spam-check-blackbox} function.  It should return
23197 @samp{nil} or @code{spam-split-group}.  See the existing
23198 @code{spam-check-*} functions for examples of what you can do.
23199
23200 Make sure to add @code{spam-use-blackbox} to
23201 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23202 mail analyzer that needs the full message body to operate.
23203
23204 @end enumerate
23205
23206 For processing spam and ham messages, provide the following:
23207
23208 @enumerate
23209
23210 @item
23211 code
23212
23213 Note you don't have to provide a spam or a ham processor.  Only
23214 provide them if Blackbox supports spam or ham processing.
23215
23216 @lisp
23217 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23218   "The Blackbox summary exit spam processor.
23219 Only applicable to spam groups.")
23220
23221 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23222   "The whitelist summary exit ham processor.
23223 Only applicable to non-spam (unclassified and ham) groups.")
23224
23225 @end lisp
23226
23227 @item
23228 functionality
23229
23230 @lisp
23231 (defun spam-blackbox-register-spam-routine ()
23232   (spam-generic-register-routine
23233    ;; @r{the spam function}
23234    (lambda (article)
23235      (let ((from (spam-fetch-field-from-fast article)))
23236        (when (stringp from)
23237            (blackbox-do-something-with-this-spammer from))))
23238    ;; @r{the ham function}
23239    nil))
23240
23241 (defun spam-blackbox-register-ham-routine ()
23242   (spam-generic-register-routine
23243    ;; @r{the spam function}
23244    nil
23245    ;; @r{the ham function}
23246    (lambda (article)
23247      (let ((from (spam-fetch-field-from-fast article)))
23248        (when (stringp from)
23249            (blackbox-do-something-with-this-ham-sender from))))))
23250 @end lisp
23251
23252 Write the @code{blackbox-do-something-with-this-ham-sender} and
23253 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23254 more complex code than fetching the message sender, but keep in mind
23255 that retrieving the whole message takes significantly longer than the
23256 sender through @code{spam-fetch-field-from-fast}, because the message
23257 senders are kept in memory by Gnus.
23258
23259 @end enumerate
23260
23261
23262 @node Filtering Spam Using Statistics with spam-stat
23263 @subsection Filtering Spam Using Statistics with spam-stat
23264 @cindex Paul Graham
23265 @cindex Graham, Paul
23266 @cindex naive Bayesian spam filtering
23267 @cindex Bayesian spam filtering, naive
23268 @cindex spam filtering, naive Bayesian
23269
23270 Paul Graham has written an excellent essay about spam filtering using
23271 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23272 Spam}.  In it he describes the inherent deficiency of rule-based
23273 filtering as used by SpamAssassin, for example: Somebody has to write
23274 the rules, and everybody else has to install these rules.  You are
23275 always late.  It would be much better, he argues, to filter mail based
23276 on whether it somehow resembles spam or non-spam.  One way to measure
23277 this is word distribution.  He then goes on to describe a solution
23278 that checks whether a new mail resembles any of your other spam mails
23279 or not.
23280
23281 The basic idea is this:  Create a two collections of your mail, one
23282 with spam, one with non-spam.  Count how often each word appears in
23283 either collection, weight this by the total number of mails in the
23284 collections, and store this information in a dictionary.  For every
23285 word in a new mail, determine its probability to belong to a spam or a
23286 non-spam mail.  Use the 15 most conspicuous words, compute the total
23287 probability of the mail being spam.  If this probability is higher
23288 than a certain threshold, the mail is considered to be spam.
23289
23290 Gnus supports this kind of filtering.  But it needs some setting up.
23291 First, you need two collections of your mail, one with spam, one with
23292 non-spam.  Then you need to create a dictionary using these two
23293 collections, and save it.  And last but not least, you need to use
23294 this dictionary in your fancy mail splitting rules.
23295
23296 @menu
23297 * Creating a spam-stat dictionary::
23298 * Splitting mail using spam-stat::
23299 * Low-level interface to the spam-stat dictionary::
23300 @end menu
23301
23302 @node Creating a spam-stat dictionary
23303 @subsubsection Creating a spam-stat dictionary
23304
23305 Before you can begin to filter spam based on statistics, you must
23306 create these statistics based on two mail collections, one with spam,
23307 one with non-spam.  These statistics are then stored in a dictionary
23308 for later use.  In order for these statistics to be meaningful, you
23309 need several hundred emails in both collections.
23310
23311 Gnus currently supports only the nnml back end for automated dictionary
23312 creation.  The nnml back end stores all mails in a directory, one file
23313 per mail.  Use the following:
23314
23315 @defun spam-stat-process-spam-directory
23316 Create spam statistics for every file in this directory.  Every file
23317 is treated as one spam mail.
23318 @end defun
23319
23320 @defun spam-stat-process-non-spam-directory
23321 Create non-spam statistics for every file in this directory.  Every
23322 file is treated as one non-spam mail.
23323 @end defun
23324
23325 Usually you would call @code{spam-stat-process-spam-directory} on a
23326 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23327 the the group @samp{nnml:mail.spam}), and you would call
23328 @code{spam-stat-process-non-spam-directory} on a directory such as
23329 @file{~/Mail/mail/misc} (this usually corresponds the the group
23330 @samp{nnml:mail.misc}).
23331
23332 When you are using @acronym{IMAP}, you won't have the mails available
23333 locally, so that will not work.  One solution is to use the Gnus Agent
23334 to cache the articles.  Then you can use directories such as
23335 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23336 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23337
23338 @defvar spam-stat
23339 This variable holds the hash-table with all the statistics---the
23340 dictionary we have been talking about.  For every word in either
23341 collection, this hash-table stores a vector describing how often the
23342 word appeared in spam and often it appeared in non-spam mails.
23343 @end defvar
23344
23345 If you want to regenerate the statistics from scratch, you need to
23346 reset the dictionary.
23347
23348 @defun spam-stat-reset
23349 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23350 @end defun
23351
23352 When you are done, you must save the dictionary.  The dictionary may
23353 be rather large.  If you will not update the dictionary incrementally
23354 (instead, you will recreate it once a month, for example), then you
23355 can reduce the size of the dictionary by deleting all words that did
23356 not appear often enough or that do not clearly belong to only spam or
23357 only non-spam mails.
23358
23359 @defun spam-stat-reduce-size
23360 Reduce the size of the dictionary.  Use this only if you do not want
23361 to update the dictionary incrementally.
23362 @end defun
23363
23364 @defun spam-stat-save
23365 Save the dictionary.
23366 @end defun
23367
23368 @defvar spam-stat-file
23369 The filename used to store the dictionary.  This defaults to
23370 @file{~/.spam-stat.el}.
23371 @end defvar
23372
23373 @node Splitting mail using spam-stat
23374 @subsubsection Splitting mail using spam-stat
23375
23376 In order to use @code{spam-stat} to split your mail, you need to add the
23377 following to your @file{~/.gnus.el} file:
23378
23379 @lisp
23380 (require 'spam-stat)
23381 (spam-stat-load)
23382 @end lisp
23383
23384 This will load the necessary Gnus code, and the dictionary you
23385 created.
23386
23387 Next, you need to adapt your fancy splitting rules:  You need to
23388 determine how to use @code{spam-stat}.  The following examples are for
23389 the nnml back end.  Using the nnimap back end works just as well.  Just
23390 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23391
23392 In the simplest case, you only have two groups, @samp{mail.misc} and
23393 @samp{mail.spam}.  The following expression says that mail is either
23394 spam or it should go into @samp{mail.misc}.  If it is spam, then
23395 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23396
23397 @lisp
23398 (setq nnmail-split-fancy
23399       `(| (: spam-stat-split-fancy)
23400           "mail.misc"))
23401 @end lisp
23402
23403 @defvar spam-stat-split-fancy-spam-group
23404 The group to use for spam.  Default is @samp{mail.spam}.
23405 @end defvar
23406
23407 If you also filter mail with specific subjects into other groups, use
23408 the following expression.  Only mails not matching the regular
23409 expression are considered potential spam.
23410
23411 @lisp
23412 (setq nnmail-split-fancy
23413       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23414           (: spam-stat-split-fancy)
23415           "mail.misc"))
23416 @end lisp
23417
23418 If you want to filter for spam first, then you must be careful when
23419 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23420 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23421 non-spam, therefore both should be in your collection of non-spam
23422 mails, when creating the dictionary!
23423
23424 @lisp
23425 (setq nnmail-split-fancy
23426       `(| (: spam-stat-split-fancy)
23427           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23428           "mail.misc"))
23429 @end lisp
23430
23431 You can combine this with traditional filtering.  Here, we move all
23432 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23433 @code{spam-stat-split-fancy} will never see them, the mails in
23434 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23435 nor in your collection of non-spam mails, when creating the
23436 dictionary!
23437
23438 @lisp
23439 (setq nnmail-split-fancy
23440       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23441           (: spam-stat-split-fancy)
23442           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23443           "mail.misc"))
23444 @end lisp
23445
23446
23447 @node Low-level interface to the spam-stat dictionary
23448 @subsubsection Low-level interface to the spam-stat dictionary
23449
23450 The main interface to using @code{spam-stat}, are the following functions:
23451
23452 @defun spam-stat-buffer-is-spam
23453 Called in a buffer, that buffer is considered to be a new spam mail.
23454 Use this for new mail that has not been processed before.
23455 @end defun
23456
23457 @defun spam-stat-buffer-is-no-spam
23458 Called in a buffer, that buffer is considered to be a new non-spam
23459 mail.  Use this for new mail that has not been processed before.
23460 @end defun
23461
23462 @defun spam-stat-buffer-change-to-spam
23463 Called in a buffer, that buffer is no longer considered to be normal
23464 mail but spam.  Use this to change the status of a mail that has
23465 already been processed as non-spam.
23466 @end defun
23467
23468 @defun spam-stat-buffer-change-to-non-spam
23469 Called in a buffer, that buffer is no longer considered to be spam but
23470 normal mail.  Use this to change the status of a mail that has already
23471 been processed as spam.
23472 @end defun
23473
23474 @defun spam-stat-save
23475 Save the hash table to the file.  The filename used is stored in the
23476 variable @code{spam-stat-file}.
23477 @end defun
23478
23479 @defun spam-stat-load
23480 Load the hash table from a file.  The filename used is stored in the
23481 variable @code{spam-stat-file}.
23482 @end defun
23483
23484 @defun spam-stat-score-word
23485 Return the spam score for a word.
23486 @end defun
23487
23488 @defun spam-stat-score-buffer
23489 Return the spam score for a buffer.
23490 @end defun
23491
23492 @defun spam-stat-split-fancy
23493 Use this function for fancy mail splitting.  Add the rule @samp{(:
23494 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23495 @end defun
23496
23497 Make sure you load the dictionary before using it.  This requires the
23498 following in your @file{~/.gnus.el} file:
23499
23500 @lisp
23501 (require 'spam-stat)
23502 (spam-stat-load)
23503 @end lisp
23504
23505 Typical test will involve calls to the following functions:
23506
23507 @smallexample
23508 Reset: (setq spam-stat (make-hash-table :test 'equal))
23509 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23510 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23511 Save table: (spam-stat-save)
23512 File size: (nth 7 (file-attributes spam-stat-file))
23513 Number of words: (hash-table-count spam-stat)
23514 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23515 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23516 Reduce table size: (spam-stat-reduce-size)
23517 Save table: (spam-stat-save)
23518 File size: (nth 7 (file-attributes spam-stat-file))
23519 Number of words: (hash-table-count spam-stat)
23520 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23521 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23522 @end smallexample
23523
23524 Here is how you would create your dictionary:
23525
23526 @smallexample
23527 Reset: (setq spam-stat (make-hash-table :test 'equal))
23528 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23529 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23530 Repeat for any other non-spam group you need...
23531 Reduce table size: (spam-stat-reduce-size)
23532 Save table: (spam-stat-save)
23533 @end smallexample
23534
23535 @node Various Various
23536 @section Various Various
23537 @cindex mode lines
23538 @cindex highlights
23539
23540 @table @code
23541
23542 @item gnus-home-directory
23543 @vindex gnus-home-directory
23544 All Gnus file and directory variables will be initialized from this
23545 variable, which defaults to @file{~/}.
23546
23547 @item gnus-directory
23548 @vindex gnus-directory
23549 Most Gnus storage file and directory variables will be initialized from
23550 this variable, which defaults to the @env{SAVEDIR} environment
23551 variable, or @file{~/News/} if that variable isn't set.
23552
23553 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
23554 This means that other directory variables that are initialized from this
23555 variable won't be set properly if you set this variable in
23556 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
23557
23558 @item gnus-default-directory
23559 @vindex gnus-default-directory
23560 Not related to the above variable at all---this variable says what the
23561 default directory of all Gnus buffers should be.  If you issue commands
23562 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23563 default directory.  If this variable is @code{nil} (which is the
23564 default), the default directory will be the default directory of the
23565 buffer you were in when you started Gnus.
23566
23567 @item gnus-verbose
23568 @vindex gnus-verbose
23569 This variable is an integer between zero and ten.  The higher the value,
23570 the more messages will be displayed.  If this variable is zero, Gnus
23571 will never flash any messages, if it is seven (which is the default),
23572 most important messages will be shown, and if it is ten, Gnus won't ever
23573 shut up, but will flash so many messages it will make your head swim.
23574
23575 @item gnus-verbose-backends
23576 @vindex gnus-verbose-backends
23577 This variable works the same way as @code{gnus-verbose}, but it applies
23578 to the Gnus back ends instead of Gnus proper.
23579
23580 @item nnheader-max-head-length
23581 @vindex nnheader-max-head-length
23582 When the back ends read straight heads of articles, they all try to read
23583 as little as possible.  This variable (default 4096) specifies
23584 the absolute max length the back ends will try to read before giving up
23585 on finding a separator line between the head and the body.  If this
23586 variable is @code{nil}, there is no upper read bound.  If it is
23587 @code{t}, the back ends won't try to read the articles piece by piece,
23588 but read the entire articles.  This makes sense with some versions of
23589 @code{ange-ftp} or @code{efs}.
23590
23591 @item nnheader-head-chop-length
23592 @vindex nnheader-head-chop-length
23593 This variable (default 2048) says how big a piece of each article to
23594 read when doing the operation described above.
23595
23596 @item nnheader-file-name-translation-alist
23597 @vindex nnheader-file-name-translation-alist
23598 @cindex file names
23599 @cindex invalid characters in file names
23600 @cindex characters in file names
23601 This is an alist that says how to translate characters in file names.
23602 For instance, if @samp{:} is invalid as a file character in file names
23603 on your system (you OS/2 user you), you could say something like:
23604
23605 @lisp
23606 @group
23607 (setq nnheader-file-name-translation-alist
23608       '((?: . ?_)))
23609 @end group
23610 @end lisp
23611
23612 In fact, this is the default value for this variable on OS/2 and MS
23613 Windows (phooey) systems.
23614
23615 @item gnus-hidden-properties
23616 @vindex gnus-hidden-properties
23617 This is a list of properties to use to hide ``invisible'' text.  It is
23618 @code{(invisible t intangible t)} by default on most systems, which
23619 makes invisible text invisible and intangible.
23620
23621 @item gnus-parse-headers-hook
23622 @vindex gnus-parse-headers-hook
23623 A hook called before parsing headers.  It can be used, for instance, to
23624 gather statistics on the headers fetched, or perhaps you'd like to prune
23625 some headers.  I don't see why you'd want that, though.
23626
23627 @item gnus-shell-command-separator
23628 @vindex gnus-shell-command-separator
23629 String used to separate two shell commands.  The default is @samp{;}.
23630
23631 @item gnus-invalid-group-regexp
23632 @vindex gnus-invalid-group-regexp
23633
23634 Regexp to match ``invalid'' group names when querying user for a group
23635 name.  The default value catches some @strong{really} invalid group
23636 names who could possibly mess up Gnus internally (like allowing
23637 @samp{:} in a group name, which is normally used to delimit method and
23638 group).
23639
23640 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23641
23642
23643 @end table
23644
23645 @node The End
23646 @chapter The End
23647
23648 Well, that's the manual---you can get on with your life now.  Keep in
23649 touch.  Say hello to your cats from me.
23650
23651 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23652
23653 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23654
23655 @quotation
23656 @strong{Te Deum}
23657
23658 @sp 1
23659 Not because of victories @*
23660 I sing,@*
23661 having none,@*
23662 but for the common sunshine,@*
23663 the breeze,@*
23664 the largess of the spring.
23665
23666 @sp 1
23667 Not for victory@*
23668 but for the day's work done@*
23669 as well as I was able;@*
23670 not for a seat upon the dais@*
23671 but at the common table.@*
23672 @end quotation
23673
23674
23675 @node Appendices
23676 @chapter Appendices
23677
23678 @menu
23679 * XEmacs::                      Requirements for installing under XEmacs.
23680 * History::                     How Gnus got where it is today.
23681 * On Writing Manuals::          Why this is not a beginner's guide.
23682 * Terminology::                 We use really difficult, like, words here.
23683 * Customization::               Tailoring Gnus to your needs.
23684 * Troubleshooting::             What you might try if things do not work.
23685 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23686 * Emacs for Heathens::          A short introduction to Emacsian terms.
23687 * Frequently Asked Questions::  The Gnus FAQ
23688 @end menu
23689
23690
23691 @node XEmacs
23692 @section XEmacs
23693 @cindex XEmacs
23694 @cindex installing under XEmacs
23695
23696 XEmacs is distributed as a collection of packages.  You should install
23697 whatever packages the Gnus XEmacs package requires.  The current
23698 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23699 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23700 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23701 @samp{misc-games} package is required for Morse decoding.
23702
23703
23704 @node History
23705 @section History
23706
23707 @cindex history
23708 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23709 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23710
23711 If you want to investigate the person responsible for this outrage,
23712 you can point your (feh!) web browser to
23713 @uref{http://quimby.gnus.org/}.  This is also the primary
23714 distribution point for the new and spiffy versions of Gnus, and is
23715 known as The Site That Destroys Newsrcs And Drives People Mad.
23716
23717 During the first extended alpha period of development, the new Gnus was
23718 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23719 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23720 (Besides, the ``Gnus'' in this abbreviation should probably be
23721 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23722 appropriate name, don't you think?)
23723
23724 In any case, after spending all that energy on coming up with a new and
23725 spunky name, we decided that the name was @emph{too} spunky, so we
23726 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23727 ``@sc{gnus}''.  New vs. old.
23728
23729 @menu
23730 * Gnus Versions::               What Gnus versions have been released.
23731 * Other Gnus Versions::         Other Gnus versions that also have been released.
23732 * Why?::                        What's the point of Gnus?
23733 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23734 * Conformity::                  Gnus tries to conform to all standards.
23735 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23736 * Gnus Development::            How Gnus is developed.
23737 * Contributors::                Oodles of people.
23738 * New Features::                Pointers to some of the new stuff in Gnus.
23739 @end menu
23740
23741
23742 @node Gnus Versions
23743 @subsection Gnus Versions
23744 @cindex ding Gnus
23745 @cindex September Gnus
23746 @cindex Red Gnus
23747 @cindex Quassia Gnus
23748 @cindex Pterodactyl Gnus
23749 @cindex Oort Gnus
23750 @cindex No Gnus
23751 @cindex Gnus versions
23752
23753 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23754 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23755 plus 15 Gnus 5.0 releases).
23756
23757 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23758 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23759
23760 On July 28th 1996 work on Red Gnus was begun, and it was released on
23761 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23762
23763 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23764 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23765
23766 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23767 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23768 1999.
23769
23770 On the 26th of October 2000, Oort Gnus was begun.
23771
23772 If you happen upon a version of Gnus that has a prefixed name --
23773 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23774 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23775 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23776 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23777 released version of Gnus and snuggle up to that instead.
23778
23779
23780 @node Other Gnus Versions
23781 @subsection Other Gnus Versions
23782 @cindex Semi-gnus
23783
23784 In addition to the versions of Gnus which have had their releases
23785 coordinated by Lars, one major development has been Semi-gnus from
23786 Japan.  It's based on a library called @acronym{SEMI}, which provides
23787 @acronym{MIME} capabilities.
23788
23789 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23790 Collectively, they are called ``Semi-gnus'', and different strains are
23791 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23792 @acronym{MIME} and multilingualization things, especially important for
23793 Japanese users.
23794
23795
23796 @node Why?
23797 @subsection Why?
23798
23799 What's the point of Gnus?
23800
23801 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23802 newsreader, that lets you do anything you can think of.  That was my
23803 original motivation, but while working on Gnus, it has become clear to
23804 me that this generation of newsreaders really belong in the stone age.
23805 Newsreaders haven't developed much since the infancy of the net.  If the
23806 volume continues to rise with the current rate of increase, all current
23807 newsreaders will be pretty much useless.  How do you deal with
23808 newsgroups that have thousands of new articles each day?  How do you
23809 keep track of millions of people who post?
23810
23811 Gnus offers no real solutions to these questions, but I would very much
23812 like to see Gnus being used as a testing ground for new methods of
23813 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23814 to separate the newsreader from the back ends, Gnus now offers a simple
23815 interface for anybody who wants to write new back ends for fetching mail
23816 and news from different sources.  I have added hooks for customizations
23817 everywhere I could imagine it being useful.  By doing so, I'm inviting
23818 every one of you to explore and invent.
23819
23820 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23821 @kbd{C-u 100 M-x all-hail-xemacs}.
23822
23823
23824 @node Compatibility
23825 @subsection Compatibility
23826
23827 @cindex compatibility
23828 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23829 bindings have been kept.  More key bindings have been added, of course,
23830 but only in one or two obscure cases have old bindings been changed.
23831
23832 Our motto is:
23833 @quotation
23834 @cartouche
23835 @center In a cloud bones of steel.
23836 @end cartouche
23837 @end quotation
23838
23839 All commands have kept their names.  Some internal functions have changed
23840 their names.
23841
23842 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23843 Articles}.
23844
23845 One major compatibility question is the presence of several summary
23846 buffers.  All variables relevant while reading a group are
23847 buffer-local to the summary buffer they belong in.  Although many
23848 important variables have their values copied into their global
23849 counterparts whenever a command is executed in the summary buffer, this
23850 change might lead to incorrect values being used unless you are careful.
23851
23852 All code that relies on knowledge of @sc{gnus} internals will probably
23853 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23854 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23855 maintains a hash table that points to the entries in this alist (which
23856 speeds up many functions), and changing the alist directly will lead to
23857 peculiar results.
23858
23859 @cindex hilit19
23860 @cindex highlighting
23861 Old hilit19 code does not work at all.  In fact, you should probably
23862 remove all hilit code from all Gnus hooks
23863 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23864 Gnus provides various integrated functions for highlighting.  These are
23865 faster and more accurate.  To make life easier for everybody, Gnus will
23866 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23867 Away!
23868
23869 Packages like @code{expire-kill} will no longer work.  As a matter of
23870 fact, you should probably remove all old @sc{gnus} packages (and other
23871 code) when you start using Gnus.  More likely than not, Gnus already
23872 does what you have written code to make @sc{gnus} do.  (Snicker.)
23873
23874 Even though old methods of doing things are still supported, only the
23875 new methods are documented in this manual.  If you detect a new method of
23876 doing something while reading this manual, that does not mean you have
23877 to stop doing it the old way.
23878
23879 Gnus understands all @sc{gnus} startup files.
23880
23881 @kindex M-x gnus-bug
23882 @findex gnus-bug
23883 @cindex reporting bugs
23884 @cindex bugs
23885 Overall, a casual user who hasn't written much code that depends on
23886 @sc{gnus} internals should suffer no problems.  If problems occur,
23887 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23888
23889 @vindex gnus-bug-create-help-buffer
23890 If you are in the habit of sending bug reports @emph{very} often, you
23891 may find the helpful help buffer annoying after a while.  If so, set
23892 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23893 up at you.
23894
23895
23896 @node Conformity
23897 @subsection Conformity
23898
23899 No rebels without a clue here, ma'am.  We conform to all standards known
23900 to (wo)man.  Except for those standards and/or conventions we disagree
23901 with, of course.
23902
23903 @table @strong
23904
23905 @item RFC (2)822
23906 @cindex RFC 822
23907 @cindex RFC 2822
23908 There are no known breaches of this standard.
23909
23910 @item RFC 1036
23911 @cindex RFC 1036
23912 There are no known breaches of this standard, either.
23913
23914 @item Son-of-RFC 1036
23915 @cindex Son-of-RFC 1036
23916 We do have some breaches to this one.
23917
23918 @table @emph
23919
23920 @item X-Newsreader
23921 @itemx User-Agent
23922 These are considered to be ``vanity headers'', while I consider them
23923 to be consumer information.  After seeing so many badly formatted
23924 articles coming from @code{tin} and @code{Netscape} I know not to use
23925 either of those for posting articles.  I would not have known that if
23926 it wasn't for the @code{X-Newsreader} header.
23927 @end table
23928
23929 @item USEFOR
23930 @cindex USEFOR
23931 USEFOR is an IETF working group writing a successor to RFC 1036, based
23932 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23933 various changes to the format of news articles.  The Gnus towers will
23934 look into implementing the changes when the draft is accepted as an RFC.
23935
23936 @item MIME - RFC 2045-2049 etc
23937 @cindex @acronym{MIME}
23938 All the various @acronym{MIME} RFCs are supported.
23939
23940 @item Disposition Notifications - RFC 2298
23941 Message Mode is able to request notifications from the receiver.
23942
23943 @item PGP - RFC 1991 and RFC 2440
23944 @cindex RFC 1991
23945 @cindex RFC 2440
23946 RFC 1991 is the original @acronym{PGP} message specification,
23947 published as an informational RFC.  RFC 2440 was the follow-up, now
23948 called Open PGP, and put on the Standards Track.  Both document a
23949 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23950 encoding (signing and encryption) and decoding (verification and
23951 decryption).
23952
23953 @item PGP/MIME - RFC 2015/3156
23954 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23955 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23956 Gnus supports both encoding and decoding.
23957
23958 @item S/MIME - RFC 2633
23959 RFC 2633 describes the @acronym{S/MIME} format.
23960
23961 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23962 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23963 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23964 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23965 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23966 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23967 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23968 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23969
23970 @end table
23971
23972 If you ever notice Gnus acting non-compliant with regards to the texts
23973 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23974 know.
23975
23976
23977 @node Emacsen
23978 @subsection Emacsen
23979 @cindex Emacsen
23980 @cindex XEmacs
23981 @cindex Mule
23982 @cindex Emacs
23983
23984 Gnus should work on:
23985
23986 @itemize @bullet
23987
23988 @item
23989 Emacs 20.3 and up.
23990
23991 @item
23992 XEmacs 21.1.1 and up.
23993
23994 @end itemize
23995
23996 This Gnus version will absolutely not work on any Emacsen older than
23997 that.  Not reliably, at least.  Older versions of Gnus may work on older
23998 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
23999 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
24000 See the file ``README'' in the T-gnus distribution for more details.
24001
24002 There are some vague differences between Gnus on the various
24003 platforms---XEmacs features more graphics (a logo and a toolbar)---but
24004 other than that, things should look pretty much the same under all
24005 Emacsen.
24006
24007
24008 @node Gnus Development
24009 @subsection Gnus Development
24010
24011 Gnus is developed in a two-phased cycle.  The first phase involves much
24012 discussion on the @samp{ding@@gnus.org} mailing list, where people
24013 propose changes and new features, post patches and new back ends.  This
24014 phase is called the @dfn{alpha} phase, since the Gnusae released in this
24015 phase are @dfn{alpha releases}, or (perhaps more commonly in other
24016 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
24017 unstable and should not be used by casual users.  Gnus alpha releases
24018 have names like ``Red Gnus'' and ``Quassia Gnus''.
24019
24020 After futzing around for 50-100 alpha releases, Gnus is declared
24021 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
24022 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
24023 supposed to be able to use these, and these are mostly discussed on the
24024 @samp{gnu.emacs.gnus} newsgroup.
24025
24026 @cindex Incoming*
24027 @vindex mail-source-delete-incoming
24028 Some variable defaults differ between alpha Gnusae and released Gnusae.
24029 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
24030 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
24031 lossage of mail if an alpha release hiccups while handling the mail.
24032
24033 The division of discussion between the ding mailing list and the Gnus
24034 newsgroup is not purely based on publicity concerns.  It's true that
24035 having people write about the horrible things that an alpha Gnus release
24036 can do (sometimes) in a public forum may scare people off, but more
24037 importantly, talking about new experimental features that have been
24038 introduced may confuse casual users.  New features are frequently
24039 introduced, fiddled with, and judged to be found wanting, and then
24040 either discarded or totally rewritten.  People reading the mailing list
24041 usually keep up with these rapid changes, while people on the newsgroup
24042 can't be assumed to do so.
24043
24044
24045
24046 @node Contributors
24047 @subsection Contributors
24048 @cindex contributors
24049
24050 The new Gnus version couldn't have been done without the help of all the
24051 people on the (ding) mailing list.  Every day for over a year I have
24052 gotten billions of nice bug reports from them, filling me with joy,
24053 every single one of them.  Smooches.  The people on the list have been
24054 tried beyond endurance, what with my ``oh, that's a neat idea <type
24055 type>, yup, I'll release it right away <ship off> no wait, that doesn't
24056 work at all <type type>, yup, I'll ship that one off right away <ship
24057 off> no, wait, that absolutely does not work'' policy for releases.
24058 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
24059 ``worser''? ``much worser''?  ``worsest''?)
24060
24061 I would like to take this opportunity to thank the Academy for@dots{}  oops,
24062 wrong show.
24063
24064 @itemize @bullet
24065
24066 @item
24067 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
24068
24069 @item
24070 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
24071 nnwarchive and many, many other things connected with @acronym{MIME} and
24072 other types of en/decoding, as well as general bug fixing, new
24073 functionality and stuff.
24074
24075 @item
24076 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
24077 well as numerous other things).
24078
24079 @item
24080 Luis Fernandes---design and graphics.
24081
24082 @item
24083 Joe Reiss---creator of the smiley faces.
24084
24085 @item
24086 Justin Sheehy---the @acronym{FAQ} maintainer.
24087
24088 @item
24089 Erik Naggum---help, ideas, support, code and stuff.
24090
24091 @item
24092 Wes Hardaker---@file{gnus-picon.el} and the manual section on
24093 @dfn{picons} (@pxref{Picons}).
24094
24095 @item
24096 Kim-Minh Kaplan---further work on the picon code.
24097
24098 @item
24099 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
24100 (@pxref{GroupLens}).
24101
24102 @item
24103 Sudish Joseph---innumerable bug fixes.
24104
24105 @item
24106 Ilja Weis---@file{gnus-topic.el}.
24107
24108 @item
24109 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
24110
24111 @item
24112 Vladimir Alexiev---the refcard and reference booklets.
24113
24114 @item
24115 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
24116 distribution by Felix Lee and JWZ.
24117
24118 @item
24119 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
24120
24121 @item
24122 Peter Mutsaers---orphan article scoring code.
24123
24124 @item
24125 Ken Raeburn---POP mail support.
24126
24127 @item
24128 Hallvard B Furuseth---various bits and pieces, especially dealing with
24129 .newsrc files.
24130
24131 @item
24132 Brian Edmonds---@file{gnus-bbdb.el}.
24133
24134 @item
24135 David Moore---rewrite of @file{nnvirtual.el} and many other things.
24136
24137 @item
24138 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24139
24140 @item
24141 François Pinard---many, many interesting and thorough bug reports, as
24142 well as autoconf support.
24143
24144 @end itemize
24145
24146 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24147 Borges, and Jost Krieger proof-reading parts of the manual.
24148
24149 The following people have contributed many patches and suggestions:
24150
24151 Christopher Davis,
24152 Andrew Eskilsson,
24153 Kai Grossjohann,
24154 Kevin Greiner,
24155 Jesper Harder,
24156 Paul Jarc,
24157 Simon Josefsson,
24158 David KÃ¥gedal,
24159 Richard Pieri,
24160 Fabrice Popineau,
24161 Daniel Quinlan,
24162 Michael Shields,
24163 Reiner Steib,
24164 Jason L. Tibbitts, III,
24165 Jack Vinson,
24166 Katsumi Yamaoka, @c Yamaoka
24167 and
24168 Teodor Zlatanov.
24169
24170 Also thanks to the following for patches and stuff:
24171
24172 Jari Aalto,
24173 Adrian Aichner,
24174 Vladimir Alexiev,
24175 Russ Allbery,
24176 Peter Arius,
24177 Matt Armstrong,
24178 Marc Auslander,
24179 Miles Bader,
24180 Alexei V. Barantsev,
24181 Frank Bennett,
24182 Robert Bihlmeyer,
24183 Chris Bone,
24184 Mark Borges,
24185 Mark Boyns,
24186 Lance A. Brown,
24187 Rob Browning,
24188 Kees de Bruin,
24189 Martin Buchholz,
24190 Joe Buehler,
24191 Kevin Buhr,
24192 Alastair Burt,
24193 Joao Cachopo,
24194 Zlatko Calusic,
24195 Massimo Campostrini,
24196 Castor,
24197 David Charlap,
24198 Dan Christensen,
24199 Kevin Christian,
24200 Jae-you Chung, @c ?
24201 James H. Cloos, Jr.,
24202 Laura Conrad,
24203 Michael R. Cook,
24204 Glenn Coombs,
24205 Andrew J. Cosgriff,
24206 Neil Crellin,
24207 Frank D. Cringle,
24208 Geoffrey T. Dairiki,
24209 Andre Deparade,
24210 Ulrik Dickow,
24211 Dave Disser,
24212 Rui-Tao Dong, @c ?
24213 Joev Dubach,
24214 Michael Welsh Duggan,
24215 Dave Edmondson,
24216 Paul Eggert,
24217 Mark W. Eichin,
24218 Karl Eichwalder,
24219 Enami Tsugutomo, @c Enami
24220 Michael Ernst,
24221 Luc Van Eycken,
24222 Sam Falkner,
24223 Nelson Jose dos Santos Ferreira,
24224 Sigbjorn Finne,
24225 Sven Fischer,
24226 Paul Fisher,
24227 Decklin Foster,
24228 Gary D. Foster,
24229 Paul Franklin,
24230 Guy Geens,
24231 Arne Georg Gleditsch,
24232 David S. Goldberg,
24233 Michelangelo Grigni,
24234 Dale Hagglund,
24235 D. Hall,
24236 Magnus Hammerin,
24237 Kenichi Handa, @c Handa
24238 Raja R. Harinath,
24239 Yoshiki Hayashi, @c Hayashi
24240 P. E. Jareth Hein,
24241 Hisashige Kenji, @c Hisashige
24242 Scott Hofmann,
24243 Marc Horowitz,
24244 Gunnar Horrigmo,
24245 Richard Hoskins,
24246 Brad Howes,
24247 Miguel de Icaza,
24248 François Felix Ingrand,
24249 Tatsuya Ichikawa, @c Ichikawa
24250 Ishikawa Ichiro, @c Ishikawa
24251 Lee Iverson,
24252 Iwamuro Motonori, @c Iwamuro
24253 Rajappa Iyer,
24254 Andreas Jaeger,
24255 Adam P. Jenkins,
24256 Randell Jesup,
24257 Fred Johansen,
24258 Gareth Jones,
24259 Greg Klanderman,
24260 Karl Kleinpaste,
24261 Michael Klingbeil,
24262 Peter Skov Knudsen,
24263 Shuhei Kobayashi, @c Kobayashi
24264 Petr Konecny,
24265 Koseki Yoshinori, @c Koseki
24266 Thor Kristoffersen,
24267 Jens Lautenbacher,
24268 Martin Larose,
24269 Seokchan Lee, @c Lee
24270 Joerg Lenneis,
24271 Carsten Leonhardt,
24272 James LewisMoss,
24273 Christian Limpach,
24274 Markus Linnala,
24275 Dave Love,
24276 Mike McEwan,
24277 Tonny Madsen,
24278 Shlomo Mahlab,
24279 Nat Makarevitch,
24280 Istvan Marko,
24281 David Martin,
24282 Jason R. Mastaler,
24283 Gordon Matzigkeit,
24284 Timo Metzemakers,
24285 Richard Mlynarik,
24286 Lantz Moore,
24287 Morioka Tomohiko, @c Morioka
24288 Erik Toubro Nielsen,
24289 Hrvoje Niksic,
24290 Andy Norman,
24291 Fred Oberhauser,
24292 C. R. Oldham,
24293 Alexandre Oliva,
24294 Ken Olstad,
24295 Masaharu Onishi, @c Onishi
24296 Hideki Ono, @c Ono
24297 Ettore Perazzoli,
24298 William Perry,
24299 Stephen Peters,
24300 Jens-Ulrik Holger Petersen,
24301 Ulrich Pfeifer,
24302 Matt Pharr,
24303 Andy Piper,
24304 John McClary Prevost,
24305 Bill Pringlemeir,
24306 Mike Pullen,
24307 Jim Radford,
24308 Colin Rafferty,
24309 Lasse Rasinen,
24310 Lars Balker Rasmussen,
24311 Joe Reiss,
24312 Renaud Rioboo,
24313 Roland B. Roberts,
24314 Bart Robinson,
24315 Christian von Roques,
24316 Markus Rost,
24317 Jason Rumney,
24318 Wolfgang Rupprecht,
24319 Jay Sachs,
24320 Dewey M. Sasser,
24321 Conrad Sauerwald,
24322 Loren Schall,
24323 Dan Schmidt,
24324 Ralph Schleicher,
24325 Philippe Schnoebelen,
24326 Andreas Schwab,
24327 Randal L. Schwartz,
24328 Danny Siu,
24329 Matt Simmons,
24330 Paul D. Smith,
24331 Jeff Sparkes,
24332 Toby Speight,
24333 Michael Sperber,
24334 Darren Stalder,
24335 Richard Stallman,
24336 Greg Stark,
24337 Sam Steingold,
24338 Paul Stevenson,
24339 Jonas Steverud,
24340 Paul Stodghill,
24341 Kiyokazu Suto, @c Suto
24342 Kurt Swanson,
24343 Samuel Tardieu,
24344 Teddy,
24345 Chuck Thompson,
24346 Tozawa Akihiko, @c Tozawa
24347 Philippe Troin,
24348 James Troup,
24349 Trung Tran-Duc,
24350 Jack Twilley,
24351 Aaron M. Ucko,
24352 Aki Vehtari,
24353 Didier Verna,
24354 Vladimir Volovich,
24355 Jan Vroonhof,
24356 Stefan Waldherr,
24357 Pete Ware,
24358 Barry A. Warsaw,
24359 Christoph Wedler,
24360 Joe Wells,
24361 Lee Willis,
24362 and
24363 Lloyd Zusman.
24364
24365
24366 For a full overview of what each person has done, the ChangeLogs
24367 included in the Gnus alpha distributions should give ample reading
24368 (550kB and counting).
24369
24370 Apologies to everybody that I've forgotten, of which there are many, I'm
24371 sure.
24372
24373 Gee, that's quite a list of people.  I guess that must mean that there
24374 actually are people who are using Gnus.  Who'd'a thunk it!
24375
24376
24377 @node New Features
24378 @subsection New Features
24379 @cindex new features
24380
24381 @menu
24382 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24383 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24384 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24385 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24386 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24387 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24388 @end menu
24389
24390 These lists are, of course, just @emph{short} overviews of the
24391 @emph{most} important new features.  No, really.  There are tons more.
24392 Yes, we have feeping creaturism in full effect.
24393
24394 @node ding Gnus
24395 @subsubsection (ding) Gnus
24396
24397 New features in Gnus 5.0/5.1:
24398
24399 @itemize @bullet
24400
24401 @item
24402 The look of all buffers can be changed by setting format-like variables
24403 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24404
24405 @item
24406 Local spool and several @acronym{NNTP} servers can be used at once
24407 (@pxref{Select Methods}).
24408
24409 @item
24410 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24411
24412 @item
24413 You can read a number of different mail formats (@pxref{Getting Mail}).
24414 All the mail back ends implement a convenient mail expiry scheme
24415 (@pxref{Expiring Mail}).
24416
24417 @item
24418 Gnus can use various strategies for gathering threads that have lost
24419 their roots (thereby gathering loose sub-threads into one thread) or it
24420 can go back and retrieve enough headers to build a complete thread
24421 (@pxref{Customizing Threading}).
24422
24423 @item
24424 Killed groups can be displayed in the group buffer, and you can read
24425 them as well (@pxref{Listing Groups}).
24426
24427 @item
24428 Gnus can do partial group updates---you do not have to retrieve the
24429 entire active file just to check for new articles in a few groups
24430 (@pxref{The Active File}).
24431
24432 @item
24433 Gnus implements a sliding scale of subscribedness to groups
24434 (@pxref{Group Levels}).
24435
24436 @item
24437 You can score articles according to any number of criteria
24438 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24439 articles for you (@pxref{Adaptive Scoring}).
24440
24441 @item
24442 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24443 manner, so it should be difficult to lose much data on what you have
24444 read if your machine should go down (@pxref{Auto Save}).
24445
24446 @item
24447 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24448 cluttering up the @file{.emacs} file.
24449
24450 @item
24451 You can set the process mark on both groups and articles and perform
24452 operations on all the marked items (@pxref{Process/Prefix}).
24453
24454 @item
24455 You can grep through a subset of groups and create a group from the
24456 results (@pxref{Kibozed Groups}).
24457
24458 @item
24459 You can list subsets of groups according to, well, anything
24460 (@pxref{Listing Groups}).
24461
24462 @item
24463 You can browse foreign servers and subscribe to groups from those
24464 servers (@pxref{Browse Foreign Server}).
24465
24466 @item
24467 Gnus can fetch articles, asynchronously, on a second connection to the
24468 server (@pxref{Asynchronous Fetching}).
24469
24470 @item
24471 You can cache articles locally (@pxref{Article Caching}).
24472
24473 @item
24474 The uudecode functions have been expanded and generalized
24475 (@pxref{Decoding Articles}).
24476
24477 @item
24478 You can still post uuencoded articles, which was a little-known feature
24479 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24480
24481 @item
24482 Fetching parents (and other articles) now actually works without
24483 glitches (@pxref{Finding the Parent}).
24484
24485 @item
24486 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24487
24488 @item
24489 Digests (and other files) can be used as the basis for groups
24490 (@pxref{Document Groups}).
24491
24492 @item
24493 Articles can be highlighted and customized (@pxref{Customizing
24494 Articles}).
24495
24496 @item
24497 URLs and other external references can be buttonized (@pxref{Article
24498 Buttons}).
24499
24500 @item
24501 You can do lots of strange stuff with the Gnus window & frame
24502 configuration (@pxref{Window Layout}).
24503
24504 @item
24505 You can click on buttons instead of using the keyboard
24506 (@pxref{Buttons}).
24507
24508 @end itemize
24509
24510
24511 @node September Gnus
24512 @subsubsection September Gnus
24513
24514 @iftex
24515 @iflatex
24516 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24517 @end iflatex
24518 @end iftex
24519
24520 New features in Gnus 5.2/5.3:
24521
24522 @itemize @bullet
24523
24524 @item
24525 A new message composition mode is used.  All old customization variables
24526 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24527 now obsolete.
24528
24529 @item
24530 Gnus is now able to generate @dfn{sparse} threads---threads where
24531 missing articles are represented by empty nodes (@pxref{Customizing
24532 Threading}).
24533
24534 @lisp
24535 (setq gnus-build-sparse-threads 'some)
24536 @end lisp
24537
24538 @item
24539 Outgoing articles are stored on a special archive server
24540 (@pxref{Archived Messages}).
24541
24542 @item
24543 Partial thread regeneration now happens when articles are
24544 referred.
24545
24546 @item
24547 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24548
24549 @item
24550 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24551
24552 @item
24553 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24554
24555 @lisp
24556 (setq gnus-use-trees t)
24557 @end lisp
24558
24559 @item
24560 An @code{nn}-like pick-and-read minor mode is available for the summary
24561 buffers (@pxref{Pick and Read}).
24562
24563 @lisp
24564 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24565 @end lisp
24566
24567 @item
24568 In binary groups you can use a special binary minor mode (@pxref{Binary
24569 Groups}).
24570
24571 @item
24572 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24573 Topics}).
24574
24575 @lisp
24576 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24577 @end lisp
24578
24579 @item
24580 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24581
24582 @item
24583 Groups can now have a score, and bubbling based on entry frequency
24584 is possible (@pxref{Group Score}).
24585
24586 @lisp
24587 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24588 @end lisp
24589
24590 @item
24591 Groups can be process-marked, and commands can be performed on
24592 groups of groups (@pxref{Marking Groups}).
24593
24594 @item
24595 Caching is possible in virtual groups.
24596
24597 @item
24598 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24599 news batches, ClariNet briefs collections, and just about everything
24600 else (@pxref{Document Groups}).
24601
24602 @item
24603 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24604 (@pxref{SOUP}).
24605
24606 @item
24607 The Gnus cache is much faster.
24608
24609 @item
24610 Groups can be sorted according to many criteria (@pxref{Sorting
24611 Groups}).
24612
24613 @item
24614 New group parameters have been introduced to set list-addresses and
24615 expiry times (@pxref{Group Parameters}).
24616
24617 @item
24618 All formatting specs allow specifying faces to be used
24619 (@pxref{Formatting Fonts}).
24620
24621 @item
24622 There are several more commands for setting/removing/acting on process
24623 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24624
24625 @item
24626 The summary buffer can be limited to show parts of the available
24627 articles based on a wide range of criteria.  These commands have been
24628 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24629
24630 @item
24631 Articles can be made persistent with the @kbd{*} command
24632 (@pxref{Persistent Articles}).
24633
24634 @item
24635 All functions for hiding article elements are now toggles.
24636
24637 @item
24638 Article headers can be buttonized (@pxref{Article Washing}).
24639
24640 @item
24641 All mail back ends support fetching articles by @code{Message-ID}.
24642
24643 @item
24644 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24645
24646 @item
24647 All summary mode commands are available directly from the article
24648 buffer (@pxref{Article Keymap}).
24649
24650 @item
24651 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24652 Layout}).
24653
24654 @item
24655 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24656 @iftex
24657 @iflatex
24658 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24659 @end iflatex
24660 @end iftex
24661
24662 @item
24663 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24664
24665 @lisp
24666 (setq gnus-use-nocem t)
24667 @end lisp
24668
24669 @item
24670 Groups can be made permanently visible (@pxref{Listing Groups}).
24671
24672 @lisp
24673 (setq gnus-permanently-visible-groups "^nnml:")
24674 @end lisp
24675
24676 @item
24677 Many new hooks have been introduced to make customizing easier.
24678
24679 @item
24680 Gnus respects the @code{Mail-Copies-To} header.
24681
24682 @item
24683 Threads can be gathered by looking at the @code{References} header
24684 (@pxref{Customizing Threading}).
24685
24686 @lisp
24687 (setq gnus-summary-thread-gathering-function
24688       'gnus-gather-threads-by-references)
24689 @end lisp
24690
24691 @item
24692 Read articles can be stored in a special backlog buffer to avoid
24693 refetching (@pxref{Article Backlog}).
24694
24695 @lisp
24696 (setq gnus-keep-backlog 50)
24697 @end lisp
24698
24699 @item
24700 A clean copy of the current article is always stored in a separate
24701 buffer to allow easier treatment.
24702
24703 @item
24704 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24705
24706 @item
24707 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24708 Articles}).
24709
24710 @lisp
24711 (setq gnus-prompt-before-saving t)
24712 @end lisp
24713
24714 @item
24715 @code{gnus-uu} can view decoded files asynchronously while fetching
24716 articles (@pxref{Other Decode Variables}).
24717
24718 @lisp
24719 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24720 @end lisp
24721
24722 @item
24723 Filling in the article buffer now works properly on cited text
24724 (@pxref{Article Washing}).
24725
24726 @item
24727 Hiding cited text adds buttons to toggle hiding, and how much
24728 cited text to hide is now customizable (@pxref{Article Hiding}).
24729
24730 @lisp
24731 (setq gnus-cited-lines-visible 2)
24732 @end lisp
24733
24734 @item
24735 Boring headers can be hidden (@pxref{Article Hiding}).
24736
24737 @item
24738 Default scoring values can now be set from the menu bar.
24739
24740 @item
24741 Further syntax checking of outgoing articles have been added.
24742
24743 @end itemize
24744
24745
24746 @node Red Gnus
24747 @subsubsection Red Gnus
24748
24749 New features in Gnus 5.4/5.5:
24750
24751 @iftex
24752 @iflatex
24753 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24754 @end iflatex
24755 @end iftex
24756
24757 @itemize @bullet
24758
24759 @item
24760 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24761
24762 @item
24763 Article prefetching functionality has been moved up into
24764 Gnus (@pxref{Asynchronous Fetching}).
24765
24766 @item
24767 Scoring can now be performed with logical operators like @code{and},
24768 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24769 Scoring}).
24770
24771 @item
24772 Article washing status can be displayed in the
24773 article mode line (@pxref{Misc Article}).
24774
24775 @item
24776 @file{gnus.el} has been split into many smaller files.
24777
24778 @item
24779 Suppression of duplicate articles based on Message-ID can be done
24780 (@pxref{Duplicate Suppression}).
24781
24782 @lisp
24783 (setq gnus-suppress-duplicates t)
24784 @end lisp
24785
24786 @item
24787 New variables for specifying what score and adapt files are to be
24788 considered home score and adapt files (@pxref{Home Score File}) have
24789 been added.
24790
24791 @item
24792 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24793 Server Internals}).
24794
24795 @item
24796 Groups can inherit group parameters from parent topics (@pxref{Topic
24797 Parameters}).
24798
24799 @item
24800 Article editing has been revamped and is now actually usable.
24801
24802 @item
24803 Signatures can be recognized in more intelligent fashions
24804 (@pxref{Article Signature}).
24805
24806 @item
24807 Summary pick mode has been made to look more @code{nn}-like.  Line
24808 numbers are displayed and the @kbd{.} command can be used to pick
24809 articles (@code{Pick and Read}).
24810
24811 @item
24812 Commands for moving the @file{.newsrc.eld} from one server to
24813 another have been added (@pxref{Changing Servers}).
24814
24815 @item
24816 There's a way now to specify that ``uninteresting'' fields be suppressed
24817 when generating lines in buffers (@pxref{Advanced Formatting}).
24818
24819 @item
24820 Several commands in the group buffer can be undone with @kbd{C-M-_}
24821 (@pxref{Undo}).
24822
24823 @item
24824 Scoring can be done on words using the new score type @code{w}
24825 (@pxref{Score File Format}).
24826
24827 @item
24828 Adaptive scoring can be done on a Subject word-by-word basis
24829 (@pxref{Adaptive Scoring}).
24830
24831 @lisp
24832 (setq gnus-use-adaptive-scoring '(word))
24833 @end lisp
24834
24835 @item
24836 Scores can be decayed (@pxref{Score Decays}).
24837
24838 @lisp
24839 (setq gnus-decay-scores t)
24840 @end lisp
24841
24842 @item
24843 Scoring can be performed using a regexp on the Date header.  The Date is
24844 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24845
24846 @item
24847 A new command has been added to remove all data on articles from
24848 the native server (@pxref{Changing Servers}).
24849
24850 @item
24851 A new command for reading collections of documents
24852 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24853 (@pxref{Really Various Summary Commands}).
24854
24855 @item
24856 Process mark sets can be pushed and popped (@pxref{Setting Process
24857 Marks}).
24858
24859 @item
24860 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24861 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24862
24863 @item
24864 A new back end for reading searches from Web search engines
24865 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24866 (@pxref{Web Searches}).
24867
24868 @item
24869 Groups inside topics can now be sorted using the standard sorting
24870 functions, and each topic can be sorted independently (@pxref{Topic
24871 Sorting}).
24872
24873 @item
24874 Subsets of the groups can be sorted independently (@code{Sorting
24875 Groups}).
24876
24877 @item
24878 Cached articles can be pulled into the groups (@pxref{Summary Generation
24879 Commands}).
24880 @iftex
24881 @iflatex
24882 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24883 @end iflatex
24884 @end iftex
24885
24886 @item
24887 Score files are now applied in a more reliable order (@pxref{Score
24888 Variables}).
24889
24890 @item
24891 Reports on where mail messages end up can be generated (@pxref{Splitting
24892 Mail}).
24893
24894 @item
24895 More hooks and functions have been added to remove junk from incoming
24896 mail before saving the mail (@pxref{Washing Mail}).
24897
24898 @item
24899 Emphasized text can be properly fontisized:
24900
24901 @end itemize
24902
24903
24904 @node Quassia Gnus
24905 @subsubsection Quassia Gnus
24906
24907 New features in Gnus 5.6:
24908
24909 @itemize @bullet
24910
24911 @item
24912 New functionality for using Gnus as an offline newsreader has been
24913 added.  A plethora of new commands and modes have been added.
24914 @xref{Gnus Unplugged}, for the full story.
24915
24916 @item
24917 The @code{nndraft} back end has returned, but works differently than
24918 before.  All Message buffers are now also articles in the @code{nndraft}
24919 group, which is created automatically.
24920
24921 @item
24922 @code{gnus-alter-header-function} can now be used to alter header
24923 values.
24924
24925 @item
24926 @code{gnus-summary-goto-article} now accept Message-ID's.
24927
24928 @item
24929 A new Message command for deleting text in the body of a message
24930 outside the region: @kbd{C-c C-v}.
24931
24932 @item
24933 You can now post to component group in @code{nnvirtual} groups with
24934 @kbd{C-u C-c C-c}.
24935
24936 @item
24937  @code{nntp-rlogin-program}---new variable to ease customization.
24938
24939 @item
24940 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24941 re-highlighting of the article buffer.
24942
24943 @item
24944 New element in @code{gnus-boring-article-headers}---@code{long-to}.
24945
24946 @item
24947 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
24948 details.
24949
24950 @item
24951 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24952 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24953
24954 @item
24955 @code{gnus-simplify-subject-functions} variable to allow greater
24956 control over simplification.
24957
24958 @item
24959 @kbd{A T}---new command for fetching the current thread.
24960
24961 @item
24962 @kbd{/ T}---new command for including the current thread in the
24963 limit.
24964
24965 @item
24966 @kbd{M-RET} is a new Message command for breaking cited text.
24967
24968 @item
24969 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24970
24971 @item
24972 The @code{custom-face-lookup} function has been removed.
24973 If you used this function in your initialization files, you must
24974 rewrite them to use @code{face-spec-set} instead.
24975
24976 @item
24977 Canceling now uses the current select method.  Symbolic prefix
24978 @kbd{a} forces normal posting method.
24979
24980 @item
24981 New command to translate M******** sm*rtq**t*s into proper
24982 text---@kbd{W d}.
24983
24984 @item
24985 For easier debugging of @code{nntp}, you can set
24986 @code{nntp-record-commands} to a non-@code{nil} value.
24987
24988 @item
24989 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24990 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24991
24992 @item
24993 A command for editing group parameters from the summary buffer
24994 has been added.
24995
24996 @item
24997 A history of where mails have been split is available.
24998
24999 @item
25000 A new article date command has been added---@code{article-date-iso8601}.
25001
25002 @item
25003 Subjects can be simplified when threading by setting
25004 @code{gnus-score-thread-simplify}.
25005
25006 @item
25007 A new function for citing in Message has been
25008 added---@code{message-cite-original-without-signature}.
25009
25010 @item
25011 @code{article-strip-all-blank-lines}---new article command.
25012
25013 @item
25014 A new Message command to kill to the end of the article has
25015 been added.
25016
25017 @item
25018 A minimum adaptive score can be specified by using the
25019 @code{gnus-adaptive-word-minimum} variable.
25020
25021 @item
25022 The ``lapsed date'' article header can be kept continually
25023 updated by the @code{gnus-start-date-timer} command.
25024
25025 @item
25026 Web listserv archives can be read with the @code{nnlistserv} back end.
25027
25028 @item
25029 Old dejanews archives can now be read by @code{nnweb}.
25030
25031 @end itemize
25032
25033 @node Pterodactyl Gnus
25034 @subsubsection Pterodactyl Gnus
25035
25036 New features in Gnus 5.8:
25037
25038 @itemize @bullet
25039
25040 @item
25041 The mail-fetching functions have changed.  See the manual for the
25042 many details.  In particular, all procmail fetching variables are gone.
25043
25044 If you used procmail like in
25045
25046 @lisp
25047 (setq nnmail-use-procmail t)
25048 (setq nnmail-spool-file 'procmail)
25049 (setq nnmail-procmail-directory "~/mail/incoming/")
25050 (setq nnmail-procmail-suffix "\\.in")
25051 @end lisp
25052
25053 this now has changed to
25054
25055 @lisp
25056 (setq mail-sources
25057       '((directory :path "~/mail/incoming/"
25058                    :suffix ".in")))
25059 @end lisp
25060
25061 @xref{Mail Source Specifiers}.
25062
25063 @item
25064 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
25065 Gnus, and adds a slew of new commands.  See the manual for details.
25066
25067 @item
25068 Gnus has also been multilingualized.  This also affects too
25069 many parts of Gnus to summarize here, and adds many new variables.
25070
25071 @item
25072 @code{gnus-auto-select-first} can now be a function to be
25073 called to position point.
25074
25075 @item
25076 The user can now decide which extra headers should be included in
25077 summary buffers and @acronym{NOV} files.
25078
25079 @item
25080 @code{gnus-article-display-hook} has been removed.  Instead, a number
25081 of variables starting with @code{gnus-treat-} have been added.
25082
25083 @item
25084 The Gnus posting styles have been redone again and now works in a
25085 subtly different manner.
25086
25087 @item
25088 New web-based back ends have been added: @code{nnslashdot},
25089 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
25090 again, to keep up with ever-changing layouts.
25091
25092 @item
25093 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
25094
25095 @end itemize
25096
25097 @node Oort Gnus
25098 @subsubsection Oort Gnus
25099 @cindex Oort Gnus
25100
25101 New features in Gnus 5.10:
25102
25103 @itemize @bullet
25104
25105 @item
25106 The revised Gnus @acronym{FAQ} is included in the manual,
25107 @xref{Frequently Asked Questions}.
25108
25109 @item
25110 Upgrading from previous (stable) version if you have used Oort.
25111
25112 If you have tried Oort (the unstable Gnus branch leading to this
25113 release) but went back to a stable version, be careful when upgrading to
25114 this version.  In particular, you will probably want to remove all
25115 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
25116 read from your @file{.newsrc.eld} instead of from the
25117 @file{.marks}/@file{.mrk} file where this release store flags.  See a
25118 later entry for more information about marks.  Note that downgrading
25119 isn't save in general.
25120
25121 @item
25122 Article Buttons
25123
25124 More buttons for URLs, mail addresses, Message-IDs, Info links, man
25125 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
25126 variables @code{gnus-button-@var{*}-level} can be used to control the
25127 appearance of all article buttons.  @xref{Article Button Levels}.
25128
25129 @item
25130 Dired integration
25131
25132 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
25133 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
25134 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
25135 (@kbd{C-c P}).  It is enabled with
25136 @lisp
25137 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
25138 @end lisp
25139
25140 @item
25141 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25142
25143 @item
25144 Single-part yenc encoded attachments can be decoded.
25145
25146 @item
25147 Picons
25148
25149 The picons code has been reimplemented to work in GNU Emacs---some of
25150 the previous options have been removed or renamed.
25151
25152 Picons are small ``personal icons'' representing users, domain and
25153 newsgroups, which can be displayed in the Article buffer.
25154 @xref{Picons}.
25155
25156 @item
25157 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25158 boundary line is drawn at the end of the headers.
25159
25160 @item
25161 Retrieval of charters and control messages
25162
25163 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25164 control messages (@kbd{H C}).
25165
25166 @item
25167 Delayed articles
25168
25169 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25170 buffer.  The messages are delivered at specified time.  This is useful
25171 for sending yourself reminders.  @xref{Delayed Articles}.
25172
25173 @item
25174 If @code{auto-compression-mode} is enabled, attachments are automatically
25175 decompressed when activated.
25176
25177 @item
25178 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25179 the nnml back end allows compressed message files.
25180
25181 @item
25182 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25183
25184 @item
25185 The Summary Buffer uses an arrow in the fringe to indicate the current
25186 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25187
25188 @item
25189 Warn about email replies to news
25190
25191 Do you often find yourself replying to news by email by mistake?  Then
25192 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25193 you.
25194
25195 @item
25196 If the new option @code{gnus-summary-display-while-building} is
25197 non-@code{nil}, the summary buffer is shown and updated as it's being
25198 built.
25199
25200 @item
25201 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25202 opposed to old but unread messages).
25203
25204 @item
25205 The new option @code{gnus-gcc-mark-as-read} automatically marks
25206 Gcc articles as read.
25207
25208 @item
25209 The nndoc back end now supports mailman digests and exim bounces.
25210
25211 @item
25212 Gnus supports RFC 2369 mailing list headers, and adds a number of
25213 related commands in mailing list groups.  @xref{Mailing List}.
25214
25215 @item
25216 The Date header can be displayed in a format that can be read aloud
25217 in English.  @xref{Article Date}.
25218
25219 @item
25220 The envelope sender address can be customized when using Sendmail.
25221 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25222
25223 @item
25224 diffs are automatically highlighted in groups matching
25225 @code{mm-uu-diff-groups-regexp}
25226
25227 @item
25228 @acronym{TLS} wrapper shipped with Gnus
25229
25230 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25231 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25232 @acronym{TLS}/@acronym{SSL} support via (external third party)
25233 @file{ssl.el} and OpenSSL still works.
25234
25235 @item
25236 New @file{make.bat} for compiling and installing Gnus under MS Windows
25237
25238 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25239 first argument to the batch-program should be the directory where
25240 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25241 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25242 the second parameter.
25243
25244 @file{make.bat} has been rewritten from scratch, it now features
25245 automatic recognition of XEmacs and GNU Emacs, generates
25246 @file{gnus-load.el}, checks if errors occur while compilation and
25247 generation of info files and reports them at the end of the build
25248 process.  It now uses @code{makeinfo} if it is available and falls
25249 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25250 install all files which are necessary to run Gnus and be generally a
25251 complete replacement for the @code{configure; make; make install}
25252 cycle used under Unix systems.
25253
25254 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25255 been removed.
25256
25257 @item
25258 Support for non-@acronym{ASCII} domain names
25259
25260 Message supports non-@acronym{ASCII} domain names in From:, To: and
25261 Cc: and will query you whether to perform encoding when you try to
25262 send a message.  The variable @code{message-use-idna} controls this.
25263 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25264 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25265 controls this.
25266
25267 @item
25268 Better handling of Microsoft citation styles
25269
25270 Gnus now tries to recognize the mangled header block that some Microsoft
25271 mailers use to indicate that the rest of the message is a citation, even
25272 though it is not quoted in any way.  The variable
25273 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25274 citations.
25275
25276 @item
25277 @code{gnus-article-skip-boring}
25278
25279 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25280 not scroll down to show you a page that contains only boring text,
25281 which by default means cited text and signature.  You can customize
25282 what is skippable using @code{gnus-article-boring-faces}.
25283
25284 This feature is especially useful if you read many articles that
25285 consist of a little new content at the top with a long, untrimmed
25286 message cited below.
25287
25288 @item
25289 The format spec @code{%C} for positioning point has changed to @code{%*}.
25290
25291 @item
25292 The new variable @code{gnus-parameters} can be used to set group parameters.
25293
25294 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25295 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25296 enjoy the powers of customize, and simplified backups since you set the
25297 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25298 variable maps regular expressions matching group names to group
25299 parameters, a'la:
25300 @lisp
25301 (setq gnus-parameters
25302       '(("mail\\..*"
25303          (gnus-show-threads nil)
25304          (gnus-use-scoring nil))
25305         ("^nnimap:\\(foo.bar\\)$"
25306          (to-group . "\\1"))))
25307 @end lisp
25308
25309 @item
25310 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25311
25312 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25313 disable it.
25314
25315 @item
25316 Gnus no longer generate the Sender: header automatically.
25317
25318 Earlier it was generated iff the user configurable email address was
25319 different from the Gnus guessed default user address.  As the guessing
25320 algorithm is rarely correct these days, and (more controversially) the
25321 only use of the Sender: header was to check if you are entitled to
25322 cancel/supersede news (which is now solved by Cancel Locks instead,
25323 see another entry), generation of the header has been disabled by
25324 default.  See the variables @code{message-required-headers},
25325 @code{message-required-news-headers}, and
25326 @code{message-required-mail-headers}.
25327
25328 @item
25329 Features from third party @file{message-utils.el} added to @file{message.el}.
25330
25331 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25332 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25333 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25334 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25335 appropriate headers and a note in the body for cross-postings and
25336 followups (see the variables @code{message-cross-post-@var{*}}).
25337
25338 @item
25339 References and X-Draft-Headers are no longer generated when you start
25340 composing messages and @code{message-generate-headers-first} is
25341 @code{nil}.
25342
25343 @item
25344 Improved anti-spam features.
25345
25346 Gnus is now able to take out spam from your mail and news streams
25347 using a wide variety of programs and filter rules.  Among the supported
25348 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25349 for easy use of external packages such as SpamAssassin and Hashcash
25350 are also new.  @xref{Thwarting Email Spam}.
25351
25352 @item
25353 Easy inclusion of X-Faces headers.
25354
25355 @item
25356 Face headers handling.
25357
25358 @item
25359 In the summary buffer, the new command @kbd{/ N} inserts new messages
25360 and @kbd{/ o} inserts old messages.
25361
25362 @item
25363 Gnus decodes morse encoded messages if you press @kbd{W m}.
25364
25365 @item
25366 Unread count correct in nnimap groups.
25367
25368 The estimated number of unread articles in the group buffer should now
25369 be correct for nnimap groups.  This is achieved by calling
25370 @code{nnimap-fixup-unread-after-getting-new-news} from the
25371 @code{gnus-setup-news-hook} (called on startup) and
25372 @code{gnus-after-getting-new-news-hook}. (called after getting new
25373 mail).  If you have modified those variables from the default, you may
25374 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25375 you were happy with the estimate and want to save some (minimal) time
25376 when getting new mail, remove the function.
25377
25378 @item
25379 Group Carbon Copy (GCC) quoting
25380
25381 To support groups that contains SPC and other weird characters, groups
25382 are quoted before they are placed in the Gcc: header.  This means
25383 variables such as @code{gnus-message-archive-group} should no longer
25384 contain quote characters to make groups containing SPC work.  Also, if
25385 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25386 into two groups) you must change it to return the list
25387 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25388 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25389 was incorrect earlier, it just didn't generate any problems since it
25390 was inserted directly.
25391
25392 @item
25393 @file{~/News/overview/} not used.
25394
25395 As a result of the following change, the @file{~/News/overview/}
25396 directory is not used any more.  You can safely delete the entire
25397 hierarchy.
25398
25399 @item
25400 @code{gnus-agent}
25401
25402 The Gnus Agent has seen a major updated and is now enabled by default,
25403 and all nntp and nnimap servers from @code{gnus-select-method} and
25404 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25405 only the server in @code{gnus-select-method} was agentized by the
25406 default, and the agent was disabled by default.  When the agent is
25407 enabled, headers are now also retrieved from the Agent cache instead
25408 of the back ends when possible.  Earlier this only happened in the
25409 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25410 @kbd{J r} in the server buffer.  Gnus will not download articles into
25411 the Agent cache, unless you instruct it to do so, though, by using
25412 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25413 behaviour of having the Agent disabled with @code{(setq gnus-agent
25414 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25415 is not needed any more.
25416
25417 @item
25418 @code{gnus-summary-line-format}
25419
25420 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25421 %s\n}.  Moreover @code{gnus-extra-headers},
25422 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25423 changed their default so that the users name will be replaced by the
25424 recipient's name or the group name posting to for @acronym{NNTP}
25425 groups.
25426
25427 @item
25428 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25429
25430 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25431 broken Outlook (Express) articles.
25432
25433 @item
25434 @code{(require 'gnus-load)}
25435
25436 If you use a stand-alone Gnus distribution, you'd better add
25437 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25438 lisp directory into load-path.
25439
25440 File @file{gnus-load.el} contains autoload commands, functions and variables,
25441 some of which may not be included in distributions of Emacsen.
25442
25443 @item
25444 @code{gnus-slave-unplugged}
25445
25446 A new command which starts Gnus offline in slave mode.
25447
25448 @item
25449 @code{message-insinuate-rmail}
25450
25451 Adding @code{(message-insinuate-rmail)} and @code{(setq
25452 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25453 compose, reply and forward messages in message-mode, where you can
25454 enjoy the power of @acronym{MML}.
25455
25456 @item
25457 @code{message-minibuffer-local-map}
25458
25459 The line below enables BBDB in resending a message:
25460 @lisp
25461 (define-key message-minibuffer-local-map [(tab)]
25462   'bbdb-complete-name)
25463 @end lisp
25464
25465 @item
25466 Externalizing and deleting of attachments.
25467
25468 If @code{gnus-gcc-externalize-attachments} or
25469 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25470 local files as external parts.
25471
25472 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25473 on @acronym{MIME} buttons) saves a part and replaces the part with an
25474 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25475 @acronym{MIME} buttons) removes a part.  It works only on back ends
25476 that support editing.
25477
25478 @item
25479 @code{gnus-default-charset}
25480
25481 The default value is determined from the
25482 @code{current-language-environment} variable, instead of
25483 @code{iso-8859-1}.  Also the @samp{.*} item in
25484 @code{gnus-group-charset-alist} is removed.
25485
25486 @item
25487 @code{gnus-posting-styles}
25488
25489 Add a new format of match like
25490 @lisp
25491 ((header "to" "larsi.*org")
25492  (Organization "Somewhere, Inc."))
25493 @end lisp
25494 The old format like the lines below is obsolete, but still accepted.
25495 @lisp
25496 (header "to" "larsi.*org"
25497         (Organization "Somewhere, Inc."))
25498 @end lisp
25499
25500 @item
25501 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25502
25503 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25504 added into these two variables.  If you customized those, perhaps you
25505 need add those two headers too.
25506
25507 @item
25508 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25509
25510 If one reads an article while plugged, and the article already exists
25511 in the Agent, it won't get downloaded once more.  @code{(setq
25512 gnus-agent-cache nil)} reverts to the old behavior.
25513
25514 @item
25515 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25516 composing messages, it is enabled by @code{use-hard-newlines}.
25517 Decoding format=flowed was present but not documented in earlier
25518 versions.
25519
25520 @item
25521 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25522
25523 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25524
25525 @item
25526 Gnus supports Maildir groups.
25527
25528 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25529
25530 @item
25531 Printing capabilities are enhanced.
25532
25533 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25534 Article buffers.  Also, each individual @acronym{MIME} part can be
25535 printed using @kbd{p} on the @acronym{MIME} button.
25536
25537 @item
25538 Message supports the Importance: (RFC 2156) header.
25539
25540 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25541 the valid values.
25542
25543 @item
25544 Gnus supports Cancel Locks in News.
25545
25546 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25547 used to determine if you wrote an article or not (for canceling and
25548 superseding).  Gnus generates a random password string the first time
25549 you post a message, and saves it in your @file{~/.emacs} using the Custom
25550 system.  While the variable is called @code{canlock-password}, it is not
25551 security sensitive data.  Publishing your canlock string on the web
25552 will not allow anyone to be able to anything she could not already do.
25553 The behaviour can be changed by customizing @code{message-insert-canlock}.
25554
25555 @item
25556 Gnus supports server-side mail filtering using Sieve.
25557
25558 Sieve rules can be added as Group Parameters for groups, and the
25559 complete Sieve script is generated using @kbd{D g} from the Group
25560 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25561 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25562 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25563
25564 @item
25565 Extended format specs.
25566
25567 Format spec @samp{%&user-date;} is added into
25568 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25569 format specs are supported.  The extended format specs look like
25570 @samp{%u&foo;}, which invokes function
25571 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25572 escape character, old user defined format @samp{%u&} is no longer supported.
25573
25574 @item
25575 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25576
25577 It was aliased to @kbd{Y c}
25578 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25579 out other articles.
25580
25581 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25582
25583 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25584 s}, @kbd{/ a}, and @kbd{/ x}
25585 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25586 result will be to display all articles that do not match the expression.
25587
25588 @item
25589 Group names are treated as UTF-8 by default.
25590
25591 This is supposedly what USEFOR wanted to migrate to.  See
25592 @code{gnus-group-name-charset-group-alist} and
25593 @code{gnus-group-name-charset-method-alist} for customization.
25594
25595 @item
25596 The nnml and nnfolder back ends store marks for each groups.
25597
25598 This makes it possible to take backup of nnml/nnfolder servers/groups
25599 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25600 makes it possible to share articles and marks between users (without
25601 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25602 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25603 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25604 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25605 another machine, Gnus will automatically use the @file{.marks} or
25606 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25607 The new server variables @code{nnml-marks-is-evil} and
25608 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25609
25610 @item
25611 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25612 been renamed to ``Gnus''.
25613
25614 @item
25615 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25616 renamed to ``Attachments''.  Note that this menu also contains security
25617 related stuff, like signing and encryption (@pxref{Security, Security,,
25618 message, Message Manual}).
25619
25620 @item
25621 @code{gnus-group-charset-alist} and
25622 @code{gnus-group-ignored-charsets-alist}.
25623
25624 The regexps in these variables are compared with full group names
25625 instead of real group names in 5.8.  Users who customize these
25626 variables should change those regexps accordingly.  For example:
25627 @lisp
25628 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25629 @end lisp
25630
25631 @item
25632 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25633 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25634
25635 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25636 additional Lisp libraries.  This add several menu items to the
25637 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25638 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25639
25640 @item
25641 Gnus inlines external parts (message/external).
25642
25643 @item
25644 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25645 C-m}.
25646
25647 This change was made to avoid conflict with the standard binding of
25648 @code{back-to-indentation}, which is also useful in message mode.
25649
25650 @item
25651 The default for @code{message-forward-show-mml} changed to symbol @code{best}.
25652
25653 The behaviour for the @code{best} value is to show @acronym{MML} (i.e.,
25654 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
25655 used when forwarding signed or encrypted messages, as the conversion
25656 invalidate the digital signature.
25657 @end itemize
25658
25659 @iftex
25660
25661 @page
25662 @node The Manual
25663 @section The Manual
25664 @cindex colophon
25665 @cindex manual
25666
25667 This manual was generated from a TeXinfo file and then run through
25668 either @code{texi2dvi}
25669 @iflatex
25670 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25671 and then run through @code{latex} and @code{dvips}
25672 @end iflatex
25673 to get what you hold in your hands now.
25674
25675 The following conventions have been used:
25676
25677 @enumerate
25678
25679 @item
25680 This is a @samp{string}
25681
25682 @item
25683 This is a @kbd{keystroke}
25684
25685 @item
25686 This is a @file{file}
25687
25688 @item
25689 This is a @code{symbol}
25690
25691 @end enumerate
25692
25693 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25694 mean:
25695
25696 @lisp
25697 (setq flargnoze "yes")
25698 @end lisp
25699
25700 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25701
25702 @lisp
25703 (setq flumphel 'yes)
25704 @end lisp
25705
25706 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25707 ever get them confused.
25708
25709 @iflatex
25710 @c @head
25711 Of course, everything in this manual is of vital interest, so you should
25712 read it all.  Several times.  However, if you feel like skimming the
25713 manual, look for that gnu head you should see in the margin over
25714 there---it means that what's being discussed is of more importance than
25715 the rest of the stuff.  (On the other hand, if everything is infinitely
25716 important, how can anything be more important than that?  Just one more
25717 of the mysteries of this world, I guess.)
25718 @end iflatex
25719
25720 @end iftex
25721
25722
25723 @node On Writing Manuals
25724 @section On Writing Manuals
25725
25726 I guess most manuals are written after-the-fact; documenting a program
25727 that's already there.  This is not how this manual is written.  When
25728 implementing something, I write the manual entry for that something
25729 straight away.  I then see that it's difficult to explain the
25730 functionality, so I write how it's supposed to be, and then I change the
25731 implementation.  Writing the documentation and writing the code goes
25732 hand in hand.
25733
25734 This, of course, means that this manual has no, or little, flow.  It
25735 documents absolutely everything in Gnus, but often not where you're
25736 looking for it.  It is a reference manual, and not a guide to how to get
25737 started with Gnus.
25738
25739 That would be a totally different book, that should be written using the
25740 reference manual as source material.  It would look quite differently.
25741
25742
25743 @page
25744 @node Terminology
25745 @section Terminology
25746
25747 @cindex terminology
25748 @table @dfn
25749
25750 @item news
25751 @cindex news
25752 This is what you are supposed to use this thing for---reading news.
25753 News is generally fetched from a nearby @acronym{NNTP} server, and is
25754 generally publicly available to everybody.  If you post news, the entire
25755 world is likely to read just what you have written, and they'll all
25756 snigger mischievously.  Behind your back.
25757
25758 @item mail
25759 @cindex mail
25760 Everything that's delivered to you personally is mail.  Some news/mail
25761 readers (like Gnus) blur the distinction between mail and news, but
25762 there is a difference.  Mail is private.  News is public.  Mailing is
25763 not posting, and replying is not following up.
25764
25765 @item reply
25766 @cindex reply
25767 Send a mail to the person who has written what you are reading.
25768
25769 @item follow up
25770 @cindex follow up
25771 Post an article to the current newsgroup responding to the article you
25772 are reading.
25773
25774 @item back end
25775 @cindex back end
25776 Gnus considers mail and news to be mostly the same, really.  The only
25777 difference is how to access the actual articles.  News articles are
25778 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25779 messages could be read from a file on the local disk.  The internal
25780 architecture of Gnus thus comprises a ``front end'' and a number of
25781 ``back ends''.  Internally, when you enter a group (by hitting
25782 @key{RET}, say), you thereby invoke a function in the front end in
25783 Gnus.  The front end then ``talks'' to a back end and says things like
25784 ``Give me the list of articles in the foo group'' or ``Show me article
25785 number 4711''.
25786
25787 So a back end mainly defines either a protocol (the @code{nntp} back
25788 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25789 accesses mail via @acronym{IMAP}) or a file format and directory
25790 layout (the @code{nnspool} back end accesses news via the common
25791 ``spool directory'' format, the @code{nnml} back end access mail via a
25792 file format and directory layout that's quite similar).
25793
25794 Gnus does not handle the underlying media, so to speak---this is all
25795 done by the back ends.  A back end is a collection of functions to
25796 access the articles.
25797
25798 However, sometimes the term ``back end'' is also used where ``server''
25799 would have been more appropriate.  And then there is the term ``select
25800 method'' which can mean either.  The Gnus terminology can be quite
25801 confusing.
25802
25803 @item native
25804 @cindex native
25805 Gnus will always use one method (and back end) as the @dfn{native}, or
25806 default, way of getting news.
25807
25808 @item foreign
25809 @cindex foreign
25810 You can also have any number of foreign groups active at the same time.
25811 These are groups that use non-native non-secondary back ends for getting
25812 news.
25813
25814 @item secondary
25815 @cindex secondary
25816 Secondary back ends are somewhere half-way between being native and being
25817 foreign, but they mostly act like they are native.
25818
25819 @item article
25820 @cindex article
25821 A message that has been posted as news.
25822
25823 @item mail message
25824 @cindex mail message
25825 A message that has been mailed.
25826
25827 @item message
25828 @cindex message
25829 A mail message or news article
25830
25831 @item head
25832 @cindex head
25833 The top part of a message, where administrative information (etc.) is
25834 put.
25835
25836 @item body
25837 @cindex body
25838 The rest of an article.  Everything not in the head is in the
25839 body.
25840
25841 @item header
25842 @cindex header
25843 A line from the head of an article.
25844
25845 @item headers
25846 @cindex headers
25847 A collection of such lines, or a collection of heads.  Or even a
25848 collection of @acronym{NOV} lines.
25849
25850 @item @acronym{NOV}
25851 @cindex @acronym{NOV}
25852 When Gnus enters a group, it asks the back end for the headers of all
25853 unread articles in the group.  Most servers support the News OverView
25854 format, which is more compact and much faster to read and parse than the
25855 normal @sc{head} format.
25856
25857 @item level
25858 @cindex levels
25859 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25860 that have a lower level are ``more'' subscribed than the groups with a
25861 higher level.  In fact, groups on levels 1-5 are considered
25862 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25863 are @dfn{killed}.  Commands for listing groups and scanning for new
25864 articles will all use the numeric prefix as @dfn{working level}.
25865
25866 @item killed groups
25867 @cindex killed groups
25868 No information on killed groups is stored or updated, which makes killed
25869 groups much easier to handle than subscribed groups.
25870
25871 @item zombie groups
25872 @cindex zombie groups
25873 Just like killed groups, only slightly less dead.
25874
25875 @item active file
25876 @cindex active file
25877 The news server has to keep track of what articles it carries, and what
25878 groups exist.  All this information in stored in the active file, which
25879 is rather large, as you might surmise.
25880
25881 @item bogus groups
25882 @cindex bogus groups
25883 A group that exists in the @file{.newsrc} file, but isn't known to the
25884 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25885 This means that the group probably doesn't exist (any more).
25886
25887 @item activating
25888 @cindex activating groups
25889 The act of asking the server for info on a group and computing the
25890 number of unread articles is called @dfn{activating the group}.
25891 Un-activated groups are listed with @samp{*} in the group buffer.
25892
25893 @item server
25894 @cindex server
25895 A machine one can connect to and get news (or mail) from.
25896
25897 @item select method
25898 @cindex select method
25899 A structure that specifies the back end, the server and the virtual
25900 server settings.
25901
25902 @item virtual server
25903 @cindex virtual server
25904 A named select method.  Since a select method defines all there is to
25905 know about connecting to a (physical) server, taking the thing as a
25906 whole is a virtual server.
25907
25908 @item washing
25909 @cindex washing
25910 Taking a buffer and running it through a filter of some sort.  The
25911 result will (more often than not) be cleaner and more pleasing than the
25912 original.
25913
25914 @item ephemeral groups
25915 @cindex ephemeral groups
25916 @cindex temporary groups
25917 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25918 groups are groups that will have no data stored---when you exit the
25919 group, it'll disappear into the aether.
25920
25921 @item solid groups
25922 @cindex solid groups
25923 This is the opposite of ephemeral groups.  All groups listed in the
25924 group buffer are solid groups.
25925
25926 @item sparse articles
25927 @cindex sparse articles
25928 These are article placeholders shown in the summary buffer when
25929 @code{gnus-build-sparse-threads} has been switched on.
25930
25931 @item threading
25932 @cindex threading
25933 To put responses to articles directly after the articles they respond
25934 to---in a hierarchical fashion.
25935
25936 @item root
25937 @cindex root
25938 @cindex thread root
25939 The first article in a thread is the root.  It is the ancestor of all
25940 articles in the thread.
25941
25942 @item parent
25943 @cindex parent
25944 An article that has responses.
25945
25946 @item child
25947 @cindex child
25948 An article that responds to a different article---its parent.
25949
25950 @item digest
25951 @cindex digest
25952 A collection of messages in one file.  The most common digest format is
25953 specified by RFC 1153.
25954
25955 @item splitting
25956 @cindex splitting, terminolgy
25957 @cindex mail sorting
25958 @cindex mail filtering (splitting)
25959 The action of sorting your emails according to certain rules. Sometimes
25960 incorrectly called mail filtering.
25961
25962 @end table
25963
25964
25965 @page
25966 @node Customization
25967 @section Customization
25968 @cindex general customization
25969
25970 All variables are properly documented elsewhere in this manual.  This
25971 section is designed to give general pointers on how to customize Gnus
25972 for some quite common situations.
25973
25974 @menu
25975 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25976 * Slow Terminal Connection::    You run a remote Emacs.
25977 * Little Disk Space::           You feel that having large setup files is icky.
25978 * Slow Machine::                You feel like buying a faster machine.
25979 @end menu
25980
25981
25982 @node Slow/Expensive Connection
25983 @subsection Slow/Expensive NNTP Connection
25984
25985 If you run Emacs on a machine locally, and get your news from a machine
25986 over some very thin strings, you want to cut down on the amount of data
25987 Gnus has to get from the @acronym{NNTP} server.
25988
25989 @table @code
25990
25991 @item gnus-read-active-file
25992 Set this to @code{nil}, which will inhibit Gnus from requesting the
25993 entire active file from the server.  This file is often v.  large.  You
25994 also have to set @code{gnus-check-new-newsgroups} and
25995 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25996 doesn't suddenly decide to fetch the active file anyway.
25997
25998 @item gnus-nov-is-evil
25999 This one has to be @code{nil}.  If not, grabbing article headers from
26000 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
26001 support @sc{xover}; Gnus will detect this by itself.
26002 @end table
26003
26004
26005 @node Slow Terminal Connection
26006 @subsection Slow Terminal Connection
26007
26008 Let's say you use your home computer for dialing up the system that runs
26009 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
26010 possible) the amount of data sent over the wires.
26011
26012 @table @code
26013
26014 @item gnus-auto-center-summary
26015 Set this to @code{nil} to inhibit Gnus from re-centering the summary
26016 buffer all the time.  If it is @code{vertical}, do only vertical
26017 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
26018 horizontal and vertical recentering.
26019
26020 @item gnus-visible-headers
26021 Cut down on the headers included in the articles to the
26022 minimum.  You can, in fact, make do without them altogether---most of the
26023 useful data is in the summary buffer, anyway.  Set this variable to
26024 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
26025
26026 Set this hook to all the available hiding commands:
26027 @lisp
26028 (setq gnus-treat-hide-headers 'head
26029       gnus-treat-hide-signature t
26030       gnus-treat-hide-citation t)
26031 @end lisp
26032
26033 @item gnus-use-full-window
26034 By setting this to @code{nil}, you can make all the windows smaller.
26035 While this doesn't really cut down much generally, it means that you
26036 have to see smaller portions of articles before deciding that you didn't
26037 want to read them anyway.
26038
26039 @item gnus-thread-hide-subtree
26040 If this is non-@code{nil}, all threads in the summary buffer will be
26041 hidden initially.
26042
26043
26044 @item gnus-updated-mode-lines
26045 If this is @code{nil}, Gnus will not put information in the buffer mode
26046 lines, which might save some time.
26047 @end table
26048
26049
26050 @node Little Disk Space
26051 @subsection Little Disk Space
26052 @cindex disk space
26053
26054 The startup files can get rather large, so you may want to cut their
26055 sizes a bit if you are running out of space.
26056
26057 @table @code
26058
26059 @item gnus-save-newsrc-file
26060 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
26061 only save @file{.newsrc.eld}.  This means that you will not be able to
26062 use any other newsreaders than Gnus.  This variable is @code{t} by
26063 default.
26064
26065 @item gnus-read-newsrc-file
26066 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
26067 only read @file{.newsrc.eld}.  This means that you will not be able to
26068 use any other newsreaders than Gnus.  This variable is @code{t} by
26069 default.
26070
26071 @item gnus-save-killed-list
26072 If this is @code{nil}, Gnus will not save the list of dead groups.  You
26073 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
26074 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
26075 variable to @code{nil}.  This variable is @code{t} by default.
26076
26077 @end table
26078
26079
26080 @node Slow Machine
26081 @subsection Slow Machine
26082 @cindex slow machine
26083
26084 If you have a slow machine, or are just really impatient, there are a
26085 few things you can do to make Gnus run faster.
26086
26087 Set @code{gnus-check-new-newsgroups} and
26088 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
26089
26090 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
26091 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
26092 summary buffer faster.
26093
26094
26095 @page
26096 @node Troubleshooting
26097 @section Troubleshooting
26098 @cindex troubleshooting
26099
26100 Gnus works @emph{so} well straight out of the box---I can't imagine any
26101 problems, really.
26102
26103 Ahem.
26104
26105 @enumerate
26106
26107 @item
26108 Make sure your computer is switched on.
26109
26110 @item
26111 Make sure that you really load the current Gnus version.  If you have
26112 been running @sc{gnus}, you need to exit Emacs and start it up again before
26113 Gnus will work.
26114
26115 @item
26116 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
26117 like @samp{T-gnus 6.16.* (based on Gnus v5.10.*; for SEMI 1.1*, FLIM
26118 1.1*)} you have the right files loaded.  Otherwise you have some old
26119 @file{.el} files lying around.  Delete these.
26120
26121 @item
26122 Read the help group (@kbd{G h} in the group buffer) for a
26123 @acronym{FAQ} and a how-to.
26124
26125 @item
26126 @vindex max-lisp-eval-depth
26127 Gnus works on many recursive structures, and in some extreme (and very
26128 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
26129 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
26130 something like that.
26131 @end enumerate
26132
26133 If all else fails, report the problem as a bug.
26134
26135 @cindex bugs
26136 @cindex reporting bugs
26137
26138 @kindex M-x gnus-bug
26139 @findex gnus-bug
26140 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
26141 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
26142 me the backtrace.  I will fix bugs, but I can only fix them if you send
26143 me a precise description as to how to reproduce the bug.
26144
26145 You really can never be too detailed in a bug report.  Always use the
26146 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26147 a 10Kb mail each time you use it, and even if you have sent me your
26148 environment 500 times before.  I don't care.  I want the full info each
26149 time.
26150
26151 It is also important to remember that I have no memory whatsoever.  If
26152 you send a bug report, and I send you a reply, and then you just send
26153 back ``No, it's not! Moron!'', I will have no idea what you are
26154 insulting me about.  Always over-explain everything.  It's much easier
26155 for all of us---if I don't have all the information I need, I will just
26156 mail you and ask for more info, and everything takes more time.
26157
26158 If the problem you're seeing is very visual, and you can't quite explain
26159 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26160 it somewhere it can be reached, and include the URL of the picture in
26161 the bug report.
26162
26163 @cindex patches
26164 If you would like to contribute a patch to fix bugs or make
26165 improvements, please produce the patch using @samp{diff -u}.
26166
26167 @cindex edebug
26168 If you want to debug your problem further before reporting, possibly
26169 in order to solve the problem yourself and send a patch, you can use
26170 edebug.  Debugging Lisp code is documented in the Elisp manual
26171 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26172 Lisp Reference Manual}).  To get you started with edebug, consider if
26173 you discover some weird behaviour when pressing @kbd{c}, the first
26174 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26175 the documentation buffer that leads you to the function definition,
26176 then press @kbd{M-x edebug-defun RET} with point inside that function,
26177 return to Gnus and press @kbd{c} to invoke the code.  You will be
26178 placed in the lisp buffer and can single step using @kbd{SPC} and
26179 evaluate expressions using @kbd{M-:} or inspect variables using
26180 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26181 @kbd{c} or @kbd{g}.
26182
26183 @cindex elp
26184 @cindex profile
26185 @cindex slow
26186 Sometimes, a problem do not directly generate an elisp error but
26187 manifests itself by causing Gnus to be very slow.  In these cases, you
26188 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26189 slow, and then try to analyze the backtrace (repeating the procedure
26190 helps isolating the real problem areas).
26191
26192 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26193 (or should be) fully documented elsewhere, but to get you started
26194 there are a few steps that need to be followed.  First, instrument the
26195 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26196 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26197 RET message}.  Then perform the operation that is slow and press
26198 @kbd{M-x elp-results}.  You will then see which operations that takes
26199 time, and can debug them further.  If the entire operation takes much
26200 longer than the time spent in the slowest function in the profiler
26201 output, you probably profiled the wrong part of Gnus.  To reset
26202 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26203 elp-restore-all} is supposed to remove profiling, but given the
26204 complexities and dynamic code generation in Gnus, it might not always
26205 work perfectly.
26206
26207 @cindex gnu.emacs.gnus
26208 @cindex ding mailing list
26209 If you just need help, you are better off asking on
26210 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26211 @email{ding@@gnus.org, the ding mailing list}.  Write to
26212 @email{ding-request@@gnus.org} to subscribe.
26213
26214
26215 @page
26216 @node Gnus Reference Guide
26217 @section Gnus Reference Guide
26218
26219 It is my hope that other people will figure out smart stuff that Gnus
26220 can do, and that other people will write those smart things as well.  To
26221 facilitate that I thought it would be a good idea to describe the inner
26222 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26223 it.
26224
26225 You can never expect the internals of a program not to change, but I
26226 will be defining (in some details) the interface between Gnus and its
26227 back ends (this is written in stone), the format of the score files
26228 (ditto), data structures (some are less likely to change than others)
26229 and general methods of operation.
26230
26231 @menu
26232 * Gnus Utility Functions::      Common functions and variable to use.
26233 * Back End Interface::          How Gnus communicates with the servers.
26234 * Score File Syntax::           A BNF definition of the score file standard.
26235 * Headers::                     How Gnus stores headers internally.
26236 * Ranges::                      A handy format for storing mucho numbers.
26237 * Group Info::                  The group info format.
26238 * Extended Interactive::        Symbolic prefixes and stuff.
26239 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26240 * Various File Formats::        Formats of files that Gnus use.
26241 @end menu
26242
26243
26244 @node Gnus Utility Functions
26245 @subsection Gnus Utility Functions
26246 @cindex Gnus utility functions
26247 @cindex utility functions
26248 @cindex functions
26249 @cindex internal variables
26250
26251 When writing small functions to be run from hooks (and stuff), it's
26252 vital to have access to the Gnus internal functions and variables.
26253 Below is a list of the most common ones.
26254
26255 @table @code
26256
26257 @item gnus-newsgroup-name
26258 @vindex gnus-newsgroup-name
26259 This variable holds the name of the current newsgroup.
26260
26261 @item gnus-find-method-for-group
26262 @findex gnus-find-method-for-group
26263 A function that returns the select method for @var{group}.
26264
26265 @item gnus-group-real-name
26266 @findex gnus-group-real-name
26267 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26268 name.
26269
26270 @item gnus-group-prefixed-name
26271 @findex gnus-group-prefixed-name
26272 Takes an unprefixed group name and a select method, and returns the full
26273 (prefixed) Gnus group name.
26274
26275 @item gnus-get-info
26276 @findex gnus-get-info
26277 Returns the group info list for @var{group}.
26278
26279 @item gnus-group-unread
26280 @findex gnus-group-unread
26281 The number of unread articles in @var{group}, or @code{t} if that is
26282 unknown.
26283
26284 @item gnus-active
26285 @findex gnus-active
26286 The active entry for @var{group}.
26287
26288 @item gnus-set-active
26289 @findex gnus-set-active
26290 Set the active entry for @var{group}.
26291
26292 @item gnus-add-current-to-buffer-list
26293 @findex gnus-add-current-to-buffer-list
26294 Adds the current buffer to the list of buffers to be killed on Gnus
26295 exit.
26296
26297 @item gnus-continuum-version
26298 @findex gnus-continuum-version
26299 Takes a Gnus version string as a parameter and returns a floating point
26300 number.  Earlier versions will always get a lower number than later
26301 versions.
26302
26303 @item gnus-group-read-only-p
26304 @findex gnus-group-read-only-p
26305 Says whether @var{group} is read-only or not.
26306
26307 @item gnus-news-group-p
26308 @findex gnus-news-group-p
26309 Says whether @var{group} came from a news back end.
26310
26311 @item gnus-ephemeral-group-p
26312 @findex gnus-ephemeral-group-p
26313 Says whether @var{group} is ephemeral or not.
26314
26315 @item gnus-server-to-method
26316 @findex gnus-server-to-method
26317 Returns the select method corresponding to @var{server}.
26318
26319 @item gnus-server-equal
26320 @findex gnus-server-equal
26321 Says whether two virtual servers are equal.
26322
26323 @item gnus-group-native-p
26324 @findex gnus-group-native-p
26325 Says whether @var{group} is native or not.
26326
26327 @item gnus-group-secondary-p
26328 @findex gnus-group-secondary-p
26329 Says whether @var{group} is secondary or not.
26330
26331 @item gnus-group-foreign-p
26332 @findex gnus-group-foreign-p
26333 Says whether @var{group} is foreign or not.
26334
26335 @item gnus-group-find-parameter
26336 @findex gnus-group-find-parameter
26337 Returns the parameter list of @var{group}.  If given a second parameter,
26338 returns the value of that parameter for @var{group}.
26339
26340 @item gnus-group-set-parameter
26341 @findex gnus-group-set-parameter
26342 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26343
26344 @item gnus-narrow-to-body
26345 @findex gnus-narrow-to-body
26346 Narrows the current buffer to the body of the article.
26347
26348 @item gnus-check-backend-function
26349 @findex gnus-check-backend-function
26350 Takes two parameters, @var{function} and @var{group}.  If the back end
26351 @var{group} comes from supports @var{function}, return non-@code{nil}.
26352
26353 @lisp
26354 (gnus-check-backend-function "request-scan" "nnml:misc")
26355 @result{} t
26356 @end lisp
26357
26358 @item gnus-read-method
26359 @findex gnus-read-method
26360 Prompts the user for a select method.
26361
26362 @end table
26363
26364
26365 @node Back End Interface
26366 @subsection Back End Interface
26367
26368 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26369 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26370 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26371 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26372 examples of the latter we have @code{nntp-port-number} and
26373 @code{nnmbox-directory}.
26374
26375 When Gnus asks for information from a back end---say @code{nntp}---on
26376 something, it will normally include a virtual server name in the
26377 function parameters.  (If not, the back end should use the ``current''
26378 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26379 server as its only (optional) parameter.  If this virtual server hasn't
26380 been opened, the function should fail.
26381
26382 Note that a virtual server name has no relation to some physical server
26383 name.  Take this example:
26384
26385 @lisp
26386 (nntp "odd-one"
26387       (nntp-address "ifi.uio.no")
26388       (nntp-port-number 4324))
26389 @end lisp
26390
26391 Here the virtual server name is @samp{odd-one} while the name of
26392 the physical server is @samp{ifi.uio.no}.
26393
26394 The back ends should be able to switch between several virtual servers.
26395 The standard back ends implement this by keeping an alist of virtual
26396 server environments that they pull down/push up when needed.
26397
26398 There are two groups of interface functions: @dfn{required functions},
26399 which must be present, and @dfn{optional functions}, which Gnus will
26400 always check for presence before attempting to call 'em.
26401
26402 All these functions are expected to return data in the buffer
26403 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26404 unfortunately named, but we'll have to live with it.  When I talk about
26405 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26406 talk about @dfn{return value}, I talk about the function value returned by
26407 the function call.  Functions that fail should return @code{nil} as the
26408 return value.
26409
26410 Some back ends could be said to be @dfn{server-forming} back ends, and
26411 some might be said not to be.  The latter are back ends that generally
26412 only operate on one group at a time, and have no concept of ``server''
26413 ---they have a group, and they deliver info on that group and nothing
26414 more.
26415
26416 Gnus identifies each message by way of group name and article number.  A
26417 few remarks about these article numbers might be useful.  First of all,
26418 the numbers are positive integers.  Secondly, it is normally not
26419 possible for later articles to ``re-use'' older article numbers without
26420 confusing Gnus.  That is, if a group has ever contained a message
26421 numbered 42, then no other message may get that number, or Gnus will get
26422 mightily confused.@footnote{See the function
26423 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26424 Third, article numbers must be assigned in order of arrival in the
26425 group; this is not necessarily the same as the date of the message.
26426
26427 The previous paragraph already mentions all the ``hard'' restrictions that
26428 article numbers must fulfill.  But it seems that it might be useful to
26429 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26430 if there are holes in the article numbering sequence.  However, due to
26431 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26432 also useful for the article numbers to start at 1 to avoid running out
26433 of numbers as long as possible.
26434
26435 Note that by convention, back ends are named @code{nnsomething}, but
26436 Gnus also comes with some @code{nnnotbackends}, such as
26437 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26438
26439 In the examples and definitions I will refer to the imaginary back end
26440 @code{nnchoke}.
26441
26442 @cindex @code{nnchoke}
26443
26444 @menu
26445 * Required Back End Functions::  Functions that must be implemented.
26446 * Optional Back End Functions::  Functions that need not be implemented.
26447 * Error Messaging::             How to get messages and report errors.
26448 * Writing New Back Ends::       Extending old back ends.
26449 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26450 * Mail-like Back Ends::         Some tips on mail back ends.
26451 @end menu
26452
26453
26454 @node Required Back End Functions
26455 @subsubsection Required Back End Functions
26456
26457 @table @code
26458
26459 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26460
26461 @var{articles} is either a range of article numbers or a list of
26462 @code{Message-ID}s.  Current back ends do not fully support either---only
26463 sequences (lists) of article numbers, and most back ends do not support
26464 retrieval of @code{Message-ID}s.  But they should try for both.
26465
26466 The result data should either be HEADs or @acronym{NOV} lines, and the result
26467 value should either be @code{headers} or @code{nov} to reflect this.
26468 This might later be expanded to @code{various}, which will be a mixture
26469 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26470
26471 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26472 headers'', in some meaning of the word.  This is generally done by
26473 fetching (at most) @var{fetch-old} extra headers less than the smallest
26474 article number in @code{articles}, and filling the gaps as well.  The
26475 presence of this parameter can be ignored if the back end finds it
26476 cumbersome to follow the request.  If this is non-@code{nil} and not a
26477 number, do maximum fetches.
26478
26479 Here's an example HEAD:
26480
26481 @example
26482 221 1056 Article retrieved.
26483 Path: ifi.uio.no!sturles
26484 From: sturles@@ifi.uio.no (Sturle Sunde)
26485 Newsgroups: ifi.discussion
26486 Subject: Re: Something very droll
26487 Date: 27 Oct 1994 14:02:57 +0100
26488 Organization: Dept. of Informatics, University of Oslo, Norway
26489 Lines: 26
26490 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26491 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26492 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26493 .
26494 @end example
26495
26496 So a @code{headers} return value would imply that there's a number of
26497 these in the data buffer.
26498
26499 Here's a BNF definition of such a buffer:
26500
26501 @example
26502 headers        = *head
26503 head           = error / valid-head
26504 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26505 valid-head     = valid-message *header "." eol
26506 valid-message  = "221 " <number> " Article retrieved." eol
26507 header         = <text> eol
26508 @end example
26509
26510 @cindex BNF
26511 (The version of BNF used here is the one used in RFC822.)
26512
26513 If the return value is @code{nov}, the data buffer should contain
26514 @dfn{network overview database} lines.  These are basically fields
26515 separated by tabs.
26516
26517 @example
26518 nov-buffer = *nov-line
26519 nov-line   = field 7*8[ <TAB> field ] eol
26520 field      = <text except TAB>
26521 @end example
26522
26523 For a closer look at what should be in those fields,
26524 @pxref{Headers}.
26525
26526
26527 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26528
26529 @var{server} is here the virtual server name.  @var{definitions} is a
26530 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26531
26532 If the server can't be opened, no error should be signaled.  The back end
26533 may then choose to refuse further attempts at connecting to this
26534 server.  In fact, it should do so.
26535
26536 If the server is opened already, this function should return a
26537 non-@code{nil} value.  There should be no data returned.
26538
26539
26540 @item (nnchoke-close-server &optional SERVER)
26541
26542 Close connection to @var{server} and free all resources connected
26543 to it.  Return @code{nil} if the server couldn't be closed for some
26544 reason.
26545
26546 There should be no data returned.
26547
26548
26549 @item (nnchoke-request-close)
26550
26551 Close connection to all servers and free all resources that the back end
26552 have reserved.  All buffers that have been created by that back end
26553 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26554 function is generally only called when Gnus is shutting down.
26555
26556 There should be no data returned.
26557
26558
26559 @item (nnchoke-server-opened &optional SERVER)
26560
26561 If @var{server} is the current virtual server, and the connection to the
26562 physical server is alive, then this function should return a
26563 non-@code{nil} value.  This function should under no circumstances
26564 attempt to reconnect to a server we have lost connection to.
26565
26566 There should be no data returned.
26567
26568
26569 @item (nnchoke-status-message &optional SERVER)
26570
26571 This function should return the last error message from @var{server}.
26572
26573 There should be no data returned.
26574
26575
26576 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26577
26578 The result data from this function should be the article specified by
26579 @var{article}.  This might either be a @code{Message-ID} or a number.
26580 It is optional whether to implement retrieval by @code{Message-ID}, but
26581 it would be nice if that were possible.
26582
26583 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26584 in this buffer instead of the normal data buffer.  This is to make it
26585 possible to avoid copying large amounts of data from one buffer to
26586 another, while Gnus mainly requests articles to be inserted directly
26587 into its article buffer.
26588
26589 If it is at all possible, this function should return a cons cell where
26590 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26591 the article number.  This will enable Gnus to find out what the real
26592 group and article numbers are when fetching articles by
26593 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26594 on successful article retrieval.
26595
26596
26597 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26598
26599 Get data on @var{group}.  This function also has the side effect of
26600 making @var{group} the current group.
26601
26602 If @var{fast}, don't bother to return useful data, just make @var{group}
26603 the current group.
26604
26605 Here's an example of some result data and a definition of the same:
26606
26607 @example
26608 211 56 1000 1059 ifi.discussion
26609 @end example
26610
26611 The first number is the status, which should be 211.  Next is the
26612 total number of articles in the group, the lowest article number, the
26613 highest article number, and finally the group name.  Note that the total
26614 number of articles may be less than one might think while just
26615 considering the highest and lowest article numbers, but some articles
26616 may have been canceled.  Gnus just discards the total-number, so
26617 whether one should take the bother to generate it properly (if that is a
26618 problem) is left as an exercise to the reader.  If the group contains no
26619 articles, the lowest article number should be reported as 1 and the
26620 highest as 0.
26621
26622 @example
26623 group-status = [ error / info ] eol
26624 error        = [ "4" / "5" ] 2<number> " " <Error message>
26625 info         = "211 " 3* [ <number> " " ] <string>
26626 @end example
26627
26628
26629 @item (nnchoke-close-group GROUP &optional SERVER)
26630
26631 Close @var{group} and free any resources connected to it.  This will be
26632 a no-op on most back ends.
26633
26634 There should be no data returned.
26635
26636
26637 @item (nnchoke-request-list &optional SERVER)
26638
26639 Return a list of all groups available on @var{server}.  And that means
26640 @emph{all}.
26641
26642 Here's an example from a server that only carries two groups:
26643
26644 @example
26645 ifi.test 0000002200 0000002000 y
26646 ifi.discussion 3324 3300 n
26647 @end example
26648
26649 On each line we have a group name, then the highest article number in
26650 that group, the lowest article number, and finally a flag.  If the group
26651 contains no articles, the lowest article number should be reported as 1
26652 and the highest as 0.
26653
26654 @example
26655 active-file = *active-line
26656 active-line = name " " <number> " " <number> " " flags eol
26657 name        = <string>
26658 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26659 @end example
26660
26661 The flag says whether the group is read-only (@samp{n}), is moderated
26662 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26663 (@samp{=other-group}) or none of the above (@samp{y}).
26664
26665
26666 @item (nnchoke-request-post &optional SERVER)
26667
26668 This function should post the current buffer.  It might return whether
26669 the posting was successful or not, but that's not required.  If, for
26670 instance, the posting is done asynchronously, it has generally not been
26671 completed by the time this function concludes.  In that case, this
26672 function should set up some kind of sentinel to beep the user loud and
26673 clear if the posting could not be completed.
26674
26675 There should be no result data from this function.
26676
26677 @end table
26678
26679
26680 @node Optional Back End Functions
26681 @subsubsection Optional Back End Functions
26682
26683 @table @code
26684
26685 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26686
26687 @var{groups} is a list of groups, and this function should request data
26688 on all those groups.  How it does it is of no concern to Gnus, but it
26689 should attempt to do this in a speedy fashion.
26690
26691 The return value of this function can be either @code{active} or
26692 @code{group}, which says what the format of the result data is.  The
26693 former is in the same format as the data from
26694 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26695 in the same format as @code{nnchoke-request-group} gives.
26696
26697 @example
26698 group-buffer = *active-line / *group-status
26699 @end example
26700
26701
26702 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26703
26704 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26705 alterations.  This comes in handy if the back end really carries all
26706 the information (as is the case with virtual and imap groups).  This
26707 function should destructively alter the info to suit its needs, and
26708 should return a non-@code{nil} value.
26709
26710 There should be no result data from this function.
26711
26712
26713 @item (nnchoke-request-type GROUP &optional ARTICLE)
26714
26715 When the user issues commands for ``sending news'' (@kbd{F} in the
26716 summary buffer, for instance), Gnus has to know whether the article the
26717 user is following up on is news or mail.  This function should return
26718 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26719 is mail and @code{unknown} if the type can't be decided.  (The
26720 @var{article} parameter is necessary in @code{nnvirtual} groups which
26721 might very well combine mail groups and news groups.)  Both @var{group}
26722 and @var{article} may be @code{nil}.
26723
26724 There should be no result data from this function.
26725
26726
26727 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26728
26729 Set/remove/add marks on articles.  Normally Gnus handles the article
26730 marks (such as read, ticked, expired etc) internally, and store them in
26731 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26732 all information about the articles on the server, so Gnus need to
26733 propagate the mark information to the server.
26734
26735 @var{action} is a list of mark setting requests, having this format:
26736
26737 @example
26738 (RANGE ACTION MARK)
26739 @end example
26740
26741 @var{range} is a range of articles you wish to update marks on.
26742 @var{action} is @code{add} or @code{del}, used to add marks or remove
26743 marks (preserving all marks not mentioned).  @var{mark} is a list of
26744 marks; where each mark is a symbol.  Currently used marks are
26745 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26746 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26747 @code{forward} and @code{recent}, but your back end should, if
26748 possible, not limit itself to these.
26749
26750 Given contradictory actions, the last action in the list should be the
26751 effective one.  That is, if your action contains a request to add the
26752 @code{tick} mark on article 1 and, later in the list, a request to
26753 remove the mark on the same article, the mark should in fact be removed.
26754
26755 An example action list:
26756
26757 @example
26758 (((5 12 30) 'del '(tick))
26759  ((10 . 90) 'add '(read expire))
26760  ((92 94) 'del '(read)))
26761 @end example
26762
26763 The function should return a range of articles it wasn't able to set the
26764 mark on (currently not used for anything).
26765
26766 There should be no result data from this function.
26767
26768 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26769
26770 If the user tries to set a mark that the back end doesn't like, this
26771 function may change the mark.  Gnus will use whatever this function
26772 returns as the mark for @var{article} instead of the original
26773 @var{mark}.  If the back end doesn't care, it must return the original
26774 @var{mark}, and not @code{nil} or any other type of garbage.
26775
26776 The only use for this I can see is what @code{nnvirtual} does with
26777 it---if a component group is auto-expirable, marking an article as read
26778 in the virtual group should result in the article being marked as
26779 expirable.
26780
26781 There should be no result data from this function.
26782
26783
26784 @item (nnchoke-request-scan &optional GROUP SERVER)
26785
26786 This function may be called at any time (by Gnus or anything else) to
26787 request that the back end check for incoming articles, in one way or
26788 another.  A mail back end will typically read the spool file or query
26789 the @acronym{POP} server when this function is invoked.  The
26790 @var{group} doesn't have to be heeded---if the back end decides that
26791 it is too much work just scanning for a single group, it may do a
26792 total scan of all groups.  It would be nice, however, to keep things
26793 local if that's practical.
26794
26795 There should be no result data from this function.
26796
26797
26798 @item (nnchoke-request-group-description GROUP &optional SERVER)
26799
26800 The result data from this function should be a description of
26801 @var{group}.
26802
26803 @example
26804 description-line = name <TAB> description eol
26805 name             = <string>
26806 description      = <text>
26807 @end example
26808
26809 @item (nnchoke-request-list-newsgroups &optional SERVER)
26810
26811 The result data from this function should be the description of all
26812 groups available on the server.
26813
26814 @example
26815 description-buffer = *description-line
26816 @end example
26817
26818
26819 @item (nnchoke-request-newgroups DATE &optional SERVER)
26820
26821 The result data from this function should be all groups that were
26822 created after @samp{date}, which is in normal human-readable date format
26823 (i.e., the date format used in mail and news headers, and returned by
26824 the function @code{message-make-date} by default).  The data should be
26825 in the active buffer format.
26826
26827 It is okay for this function to return ``too many'' groups; some back ends
26828 might find it cheaper to return the full list of groups, rather than
26829 just the new groups.  But don't do this for back ends with many groups.
26830 Normally, if the user creates the groups herself, there won't be too
26831 many groups, so @code{nnml} and the like are probably safe.  But for
26832 back ends like @code{nntp}, where the groups have been created by the
26833 server, it is quite likely that there can be many groups.
26834
26835
26836 @item (nnchoke-request-create-group GROUP &optional SERVER)
26837
26838 This function should create an empty group with name @var{group}.
26839
26840 There should be no return data.
26841
26842
26843 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26844
26845 This function should run the expiry process on all articles in the
26846 @var{articles} range (which is currently a simple list of article
26847 numbers.)  It is left up to the back end to decide how old articles
26848 should be before they are removed by this function.  If @var{force} is
26849 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26850 they are.
26851
26852 This function should return a list of articles that it did not/was not
26853 able to delete.
26854
26855 There should be no result data returned.
26856
26857
26858 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26859
26860 This function should move @var{article} (which is a number) from
26861 @var{group} by calling @var{accept-form}.
26862
26863 This function should ready the article in question for moving by
26864 removing any header lines it has added to the article, and generally
26865 should ``tidy up'' the article.  Then it should @code{eval}
26866 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26867 will do the actual copying.  If this @code{eval} returns a
26868 non-@code{nil} value, the article should be removed.
26869
26870 If @var{last} is @code{nil}, that means that there is a high likelihood
26871 that there will be more requests issued shortly, so that allows some
26872 optimizations.
26873
26874 The function should return a cons where the @code{car} is the group name and
26875 the @code{cdr} is the article number that the article was entered as.
26876
26877 The group should exist before the back end is asked to accept the
26878 article for that group.
26879
26880 There should be no data returned.
26881
26882
26883 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26884
26885 This function takes the current buffer and inserts it into @var{group}.
26886 If @var{last} in @code{nil}, that means that there will be more calls to
26887 this function in short order.
26888
26889 The function should return a cons where the @code{car} is the group name and
26890 the @code{cdr} is the article number that the article was entered as.
26891
26892 There should be no data returned.
26893
26894
26895 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26896
26897 This function should remove @var{article} (which is a number) from
26898 @var{group} and insert @var{buffer} there instead.
26899
26900 There should be no data returned.
26901
26902
26903 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26904
26905 This function should delete @var{group}.  If @var{force}, it should
26906 really delete all the articles in the group, and then delete the group
26907 itself.  (If there is such a thing as ``the group itself''.)
26908
26909 There should be no data returned.
26910
26911
26912 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26913
26914 This function should rename @var{group} into @var{new-name}.  All
26915 articles in @var{group} should move to @var{new-name}.
26916
26917 There should be no data returned.
26918
26919 @end table
26920
26921
26922 @node Error Messaging
26923 @subsubsection Error Messaging
26924
26925 @findex nnheader-report
26926 @findex nnheader-get-report
26927 The back ends should use the function @code{nnheader-report} to report
26928 error conditions---they should not raise errors when they aren't able to
26929 perform a request.  The first argument to this function is the back end
26930 symbol, and the rest are interpreted as arguments to @code{format} if
26931 there are multiple of them, or just a string if there is one of them.
26932 This function must always returns @code{nil}.
26933
26934 @lisp
26935 (nnheader-report 'nnchoke "You did something totally bogus")
26936
26937 (nnheader-report 'nnchoke "Could not request group %s" group)
26938 @end lisp
26939
26940 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26941 @code{nil} back from a server, and this function returns the most
26942 recently reported message for the back end in question.  This function
26943 takes one argument---the server symbol.
26944
26945 Internally, these functions access @var{back-end}@code{-status-string},
26946 so the @code{nnchoke} back end will have its error message stored in
26947 @code{nnchoke-status-string}.
26948
26949
26950 @node Writing New Back Ends
26951 @subsubsection Writing New Back Ends
26952
26953 Many back ends are quite similar.  @code{nnml} is just like
26954 @code{nnspool}, but it allows you to edit the articles on the server.
26955 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26956 and it doesn't maintain overview databases.  @code{nndir} is just like
26957 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26958 editing articles.
26959
26960 It would make sense if it were possible to ``inherit'' functions from
26961 back ends when writing new back ends.  And, indeed, you can do that if you
26962 want to.  (You don't have to if you don't want to, of course.)
26963
26964 All the back ends declare their public variables and functions by using a
26965 package called @code{nnoo}.
26966
26967 To inherit functions from other back ends (and allow other back ends to
26968 inherit functions from the current back end), you should use the
26969 following macros:
26970
26971 @table @code
26972
26973 @item nnoo-declare
26974 This macro declares the first parameter to be a child of the subsequent
26975 parameters.  For instance:
26976
26977 @lisp
26978 (nnoo-declare nndir
26979   nnml nnmh)
26980 @end lisp
26981
26982 @code{nndir} has declared here that it intends to inherit functions from
26983 both @code{nnml} and @code{nnmh}.
26984
26985 @item defvoo
26986 This macro is equivalent to @code{defvar}, but registers the variable as
26987 a public server variable.  Most state-oriented variables should be
26988 declared with @code{defvoo} instead of @code{defvar}.
26989
26990 In addition to the normal @code{defvar} parameters, it takes a list of
26991 variables in the parent back ends to map the variable to when executing
26992 a function in those back ends.
26993
26994 @lisp
26995 (defvoo nndir-directory nil
26996   "Where nndir will look for groups."
26997   nnml-current-directory nnmh-current-directory)
26998 @end lisp
26999
27000 This means that @code{nnml-current-directory} will be set to
27001 @code{nndir-directory} when an @code{nnml} function is called on behalf
27002 of @code{nndir}.  (The same with @code{nnmh}.)
27003
27004 @item nnoo-define-basics
27005 This macro defines some common functions that almost all back ends should
27006 have.
27007
27008 @lisp
27009 (nnoo-define-basics nndir)
27010 @end lisp
27011
27012 @item deffoo
27013 This macro is just like @code{defun} and takes the same parameters.  In
27014 addition to doing the normal @code{defun} things, it registers the
27015 function as being public so that other back ends can inherit it.
27016
27017 @item nnoo-map-functions
27018 This macro allows mapping of functions from the current back end to
27019 functions from the parent back ends.
27020
27021 @lisp
27022 (nnoo-map-functions nndir
27023   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27024   (nnmh-request-article 0 nndir-current-group 0 0))
27025 @end lisp
27026
27027 This means that when @code{nndir-retrieve-headers} is called, the first,
27028 third, and fourth parameters will be passed on to
27029 @code{nnml-retrieve-headers}, while the second parameter is set to the
27030 value of @code{nndir-current-group}.
27031
27032 @item nnoo-import
27033 This macro allows importing functions from back ends.  It should be the
27034 last thing in the source file, since it will only define functions that
27035 haven't already been defined.
27036
27037 @lisp
27038 (nnoo-import nndir
27039   (nnmh
27040    nnmh-request-list
27041    nnmh-request-newgroups)
27042   (nnml))
27043 @end lisp
27044
27045 This means that calls to @code{nndir-request-list} should just be passed
27046 on to @code{nnmh-request-list}, while all public functions from
27047 @code{nnml} that haven't been defined in @code{nndir} yet should be
27048 defined now.
27049
27050 @end table
27051
27052 Below is a slightly shortened version of the @code{nndir} back end.
27053
27054 @lisp
27055 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
27056 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
27057
27058 ;;; @r{Code:}
27059
27060 (require 'nnheader)
27061 (require 'nnmh)
27062 (require 'nnml)
27063 (require 'nnoo)
27064 (eval-when-compile (require 'cl))
27065
27066 (nnoo-declare nndir
27067   nnml nnmh)
27068
27069 (defvoo nndir-directory nil
27070   "Where nndir will look for groups."
27071   nnml-current-directory nnmh-current-directory)
27072
27073 (defvoo nndir-nov-is-evil nil
27074   "*Non-nil means that nndir will never retrieve NOV headers."
27075   nnml-nov-is-evil)
27076
27077 (defvoo nndir-current-group ""
27078   nil
27079   nnml-current-group nnmh-current-group)
27080 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
27081 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
27082
27083 (defvoo nndir-status-string "" nil nnmh-status-string)
27084 (defconst nndir-version "nndir 1.0")
27085
27086 ;;; @r{Interface functions.}
27087
27088 (nnoo-define-basics nndir)
27089
27090 (deffoo nndir-open-server (server &optional defs)
27091   (setq nndir-directory
27092         (or (cadr (assq 'nndir-directory defs))
27093             server))
27094   (unless (assq 'nndir-directory defs)
27095     (push `(nndir-directory ,server) defs))
27096   (push `(nndir-current-group
27097           ,(file-name-nondirectory
27098             (directory-file-name nndir-directory)))
27099         defs)
27100   (push `(nndir-top-directory
27101           ,(file-name-directory (directory-file-name nndir-directory)))
27102         defs)
27103   (nnoo-change-server 'nndir server defs))
27104
27105 (nnoo-map-functions nndir
27106   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27107   (nnmh-request-article 0 nndir-current-group 0 0)
27108   (nnmh-request-group nndir-current-group 0 0)
27109   (nnmh-close-group nndir-current-group 0))
27110
27111 (nnoo-import nndir
27112   (nnmh
27113    nnmh-status-message
27114    nnmh-request-list
27115    nnmh-request-newgroups))
27116
27117 (provide 'nndir)
27118 @end lisp
27119
27120
27121 @node Hooking New Back Ends Into Gnus
27122 @subsubsection Hooking New Back Ends Into Gnus
27123
27124 @vindex gnus-valid-select-methods
27125 @findex gnus-declare-backend
27126 Having Gnus start using your new back end is rather easy---you just
27127 declare it with the @code{gnus-declare-backend} functions.  This will
27128 enter the back end into the @code{gnus-valid-select-methods} variable.
27129
27130 @code{gnus-declare-backend} takes two parameters---the back end name and
27131 an arbitrary number of @dfn{abilities}.
27132
27133 Here's an example:
27134
27135 @lisp
27136 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
27137 @end lisp
27138
27139 The above line would then go in the @file{nnchoke.el} file.
27140
27141 The abilities can be:
27142
27143 @table @code
27144 @item mail
27145 This is a mailish back end---followups should (probably) go via mail.
27146 @item post
27147 This is a newsish back end---followups should (probably) go via news.
27148 @item post-mail
27149 This back end supports both mail and news.
27150 @item none
27151 This is neither a post nor mail back end---it's something completely
27152 different.
27153 @item respool
27154 It supports respooling---or rather, it is able to modify its source
27155 articles and groups.
27156 @item address
27157 The name of the server should be in the virtual server name.  This is
27158 true for almost all back ends.
27159 @item prompt-address
27160 The user should be prompted for an address when doing commands like
27161 @kbd{B} in the group buffer.  This is true for back ends like
27162 @code{nntp}, but not @code{nnmbox}, for instance.
27163 @end table
27164
27165
27166 @node Mail-like Back Ends
27167 @subsubsection Mail-like Back Ends
27168
27169 One of the things that separate the mail back ends from the rest of the
27170 back ends is the heavy dependence by most of the mail back ends on
27171 common functions in @file{nnmail.el}.  For instance, here's the
27172 definition of @code{nnml-request-scan}:
27173
27174 @lisp
27175 (deffoo nnml-request-scan (&optional group server)
27176   (setq nnml-article-file-alist nil)
27177   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27178 @end lisp
27179
27180 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27181 and @code{nnmail} takes care of all the moving and splitting of the
27182 mail.
27183
27184 This function takes four parameters.
27185
27186 @table @var
27187 @item method
27188 This should be a symbol to designate which back end is responsible for
27189 the call.
27190
27191 @item exit-function
27192 This function should be called after the splitting has been performed.
27193
27194 @item temp-directory
27195 Where the temporary files should be stored.
27196
27197 @item group
27198 This optional argument should be a group name if the splitting is to be
27199 performed for one group only.
27200 @end table
27201
27202 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27203 save each article.  @var{back-end}@code{-active-number} will be called to
27204 find the article number assigned to this article.
27205
27206 The function also uses the following variables:
27207 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27208 this back end); and @var{back-end}@code{-group-alist} and
27209 @var{back-end}@code{-active-file} to generate the new active file.
27210 @var{back-end}@code{-group-alist} should be a group-active alist, like
27211 this:
27212
27213 @example
27214 (("a-group" (1 . 10))
27215  ("some-group" (34 . 39)))
27216 @end example
27217
27218
27219 @node Score File Syntax
27220 @subsection Score File Syntax
27221
27222 Score files are meant to be easily parseable, but yet extremely
27223 mallable.  It was decided that something that had the same read syntax
27224 as an Emacs Lisp list would fit that spec.
27225
27226 Here's a typical score file:
27227
27228 @lisp
27229 (("summary"
27230   ("win95" -10000 nil s)
27231   ("Gnus"))
27232  ("from"
27233   ("Lars" -1000))
27234  (mark -100))
27235 @end lisp
27236
27237 BNF definition of a score file:
27238
27239 @example
27240 score-file      = "" / "(" *element ")"
27241 element         = rule / atom
27242 rule            = string-rule / number-rule / date-rule
27243 string-rule     = "(" quote string-header quote space *string-match ")"
27244 number-rule     = "(" quote number-header quote space *number-match ")"
27245 date-rule       = "(" quote date-header quote space *date-match ")"
27246 quote           = <ascii 34>
27247 string-header   = "subject" / "from" / "references" / "message-id" /
27248                   "xref" / "body" / "head" / "all" / "followup"
27249 number-header   = "lines" / "chars"
27250 date-header     = "date"
27251 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27252                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27253 score           = "nil" / <integer>
27254 date            = "nil" / <natural number>
27255 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27256                   "r" / "regex" / "R" / "Regex" /
27257                   "e" / "exact" / "E" / "Exact" /
27258                   "f" / "fuzzy" / "F" / "Fuzzy"
27259 number-match    = "(" <integer> [ "" / [ space score [ "" /
27260                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27261 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27262 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27263                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27264 date-match-t    = "nil" / "at" / "before" / "after"
27265 atom            = "(" [ required-atom / optional-atom ] ")"
27266 required-atom   = mark / expunge / mark-and-expunge / files /
27267                   exclude-files / read-only / touched
27268 optional-atom   = adapt / local / eval
27269 mark            = "mark" space nil-or-number
27270 nil-or-number   = "nil" / <integer>
27271 expunge         = "expunge" space nil-or-number
27272 mark-and-expunge = "mark-and-expunge" space nil-or-number
27273 files           = "files" *[ space <string> ]
27274 exclude-files   = "exclude-files" *[ space <string> ]
27275 read-only       = "read-only" [ space "nil" / space "t" ]
27276 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27277 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27278 local           = "local" *[ space "(" <string> space <form> ")" ]
27279 eval            = "eval" space <form>
27280 space           = *[ " " / <TAB> / <NEWLINE> ]
27281 @end example
27282
27283 Any unrecognized elements in a score file should be ignored, but not
27284 discarded.
27285
27286 As you can see, white space is needed, but the type and amount of white
27287 space is irrelevant.  This means that formatting of the score file is
27288 left up to the programmer---if it's simpler to just spew it all out on
27289 one looong line, then that's ok.
27290
27291 The meaning of the various atoms are explained elsewhere in this
27292 manual (@pxref{Score File Format}).
27293
27294
27295 @node Headers
27296 @subsection Headers
27297
27298 Internally Gnus uses a format for storing article headers that
27299 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27300 almost suspect that the author looked at the @acronym{NOV} specification and
27301 just shamelessly @emph{stole} the entire thing, and one would be right.
27302
27303 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27304 RFC 1036 to talk about lines in the head of an article (e.g.,
27305 @code{From}).  It is used by many people as a synonym for
27306 ``head''---``the header and the body''.  (That should be avoided, in my
27307 opinion.)  And Gnus uses a format internally that it calls ``header'',
27308 which is what I'm talking about here.  This is a 9-element vector,
27309 basically, with each header (ouch) having one slot.
27310
27311 These slots are, in order: @code{number}, @code{subject}, @code{from},
27312 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27313 @code{xref}, and @code{extra}.  There are macros for accessing and
27314 setting these slots---they all have predictable names beginning with
27315 @code{mail-header-} and @code{mail-header-set-}, respectively.
27316
27317 All these slots contain strings, except the @code{extra} slot, which
27318 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27319
27320
27321 @node Ranges
27322 @subsection Ranges
27323
27324 @sc{gnus} introduced a concept that I found so useful that I've started
27325 using it a lot and have elaborated on it greatly.
27326
27327 The question is simple: If you have a large amount of objects that are
27328 identified by numbers (say, articles, to take a @emph{wild} example)
27329 that you want to qualify as being ``included'', a normal sequence isn't
27330 very useful.  (A 200,000 length sequence is a bit long-winded.)
27331
27332 The solution is as simple as the question: You just collapse the
27333 sequence.
27334
27335 @example
27336 (1 2 3 4 5 6 10 11 12)
27337 @end example
27338
27339 is transformed into
27340
27341 @example
27342 ((1 . 6) (10 . 12))
27343 @end example
27344
27345 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27346 lonesome object, a @samp{13} is a valid element:
27347
27348 @example
27349 ((1 . 6) 7 (10 . 12))
27350 @end example
27351
27352 This means that comparing two ranges to find out whether they are equal
27353 is slightly tricky:
27354
27355 @example
27356 ((1 . 5) 7 8 (10 . 12))
27357 @end example
27358
27359 and
27360
27361 @example
27362 ((1 . 5) (7 . 8) (10 . 12))
27363 @end example
27364
27365 are equal.  In fact, any non-descending list is a range:
27366
27367 @example
27368 (1 2 3 4 5)
27369 @end example
27370
27371 is a perfectly valid range, although a pretty long-winded one.  This is
27372 also valid:
27373
27374 @example
27375 (1 . 5)
27376 @end example
27377
27378 and is equal to the previous range.
27379
27380 Here's a BNF definition of ranges.  Of course, one must remember the
27381 semantic requirement that the numbers are non-descending.  (Any number
27382 of repetition of the same number is allowed, but apt to disappear in
27383 range handling.)
27384
27385 @example
27386 range           = simple-range / normal-range
27387 simple-range    = "(" number " . " number ")"
27388 normal-range    = "(" start-contents ")"
27389 contents        = "" / simple-range *[ " " contents ] /
27390                   number *[ " " contents ]
27391 @end example
27392
27393 Gnus currently uses ranges to keep track of read articles and article
27394 marks.  I plan on implementing a number of range operators in C if The
27395 Powers That Be are willing to let me.  (I haven't asked yet, because I
27396 need to do some more thinking on what operators I need to make life
27397 totally range-based without ever having to convert back to normal
27398 sequences.)
27399
27400
27401 @node Group Info
27402 @subsection Group Info
27403
27404 Gnus stores all permanent info on groups in a @dfn{group info} list.
27405 This list is from three to six elements (or more) long and exhaustively
27406 describes the group.
27407
27408 Here are two example group infos; one is a very simple group while the
27409 second is a more complex one:
27410
27411 @example
27412 ("no.group" 5 ((1 . 54324)))
27413
27414 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27415                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27416                 (nnml "")
27417                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27418 @end example
27419
27420 The first element is the @dfn{group name}---as Gnus knows the group,
27421 anyway.  The second element is the @dfn{subscription level}, which
27422 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27423 cons cell where the @code{car} is the level and the @code{cdr} is the
27424 score.)  The third element is a list of ranges of read articles.  The
27425 fourth element is a list of lists of article marks of various kinds.
27426 The fifth element is the select method (or virtual server, if you like).
27427 The sixth element is a list of @dfn{group parameters}, which is what
27428 this section is about.
27429
27430 Any of the last three elements may be missing if they are not required.
27431 In fact, the vast majority of groups will normally only have the first
27432 three elements, which saves quite a lot of cons cells.
27433
27434 Here's a BNF definition of the group info format:
27435
27436 @example
27437 info          = "(" group space ralevel space read
27438                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27439                 space parameters ] ] ] ] ] ")"
27440 group         = quote <string> quote
27441 ralevel       = rank / level
27442 level         = <integer in the range of 1 to inf>
27443 rank          = "(" level "." score ")"
27444 score         = <integer in the range of 1 to inf>
27445 read          = range
27446 marks-lists   = nil / "(" *marks ")"
27447 marks         = "(" <string> range ")"
27448 method        = "(" <string> *elisp-forms ")"
27449 parameters    = "(" *elisp-forms ")"
27450 @end example
27451
27452 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27453 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27454 in pseudo-BNF.
27455
27456 If you have a Gnus info and want to access the elements, Gnus offers a
27457 series of macros for getting/setting these elements.
27458
27459 @table @code
27460 @item gnus-info-group
27461 @itemx gnus-info-set-group
27462 @findex gnus-info-group
27463 @findex gnus-info-set-group
27464 Get/set the group name.
27465
27466 @item gnus-info-rank
27467 @itemx gnus-info-set-rank
27468 @findex gnus-info-rank
27469 @findex gnus-info-set-rank
27470 Get/set the group rank (@pxref{Group Score}).
27471
27472 @item gnus-info-level
27473 @itemx gnus-info-set-level
27474 @findex gnus-info-level
27475 @findex gnus-info-set-level
27476 Get/set the group level.
27477
27478 @item gnus-info-score
27479 @itemx gnus-info-set-score
27480 @findex gnus-info-score
27481 @findex gnus-info-set-score
27482 Get/set the group score (@pxref{Group Score}).
27483
27484 @item gnus-info-read
27485 @itemx gnus-info-set-read
27486 @findex gnus-info-read
27487 @findex gnus-info-set-read
27488 Get/set the ranges of read articles.
27489
27490 @item gnus-info-marks
27491 @itemx gnus-info-set-marks
27492 @findex gnus-info-marks
27493 @findex gnus-info-set-marks
27494 Get/set the lists of ranges of marked articles.
27495
27496 @item gnus-info-method
27497 @itemx gnus-info-set-method
27498 @findex gnus-info-method
27499 @findex gnus-info-set-method
27500 Get/set the group select method.
27501
27502 @item gnus-info-params
27503 @itemx gnus-info-set-params
27504 @findex gnus-info-params
27505 @findex gnus-info-set-params
27506 Get/set the group parameters.
27507 @end table
27508
27509 All the getter functions take one parameter---the info list.  The setter
27510 functions take two parameters---the info list and the new value.
27511
27512 The last three elements in the group info aren't mandatory, so it may be
27513 necessary to extend the group info before setting the element.  If this
27514 is necessary, you can just pass on a non-@code{nil} third parameter to
27515 the three final setter functions to have this happen automatically.
27516
27517
27518 @node Extended Interactive
27519 @subsection Extended Interactive
27520 @cindex interactive
27521 @findex gnus-interactive
27522
27523 Gnus extends the standard Emacs @code{interactive} specification
27524 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27525 Prefixes}).  Here's an example of how this is used:
27526
27527 @lisp
27528 (defun gnus-summary-increase-score (&optional score symp)
27529   (interactive (gnus-interactive "P\ny"))
27530   ...
27531   )
27532 @end lisp
27533
27534 The best thing to do would have been to implement
27535 @code{gnus-interactive} as a macro which would have returned an
27536 @code{interactive} form, but this isn't possible since Emacs checks
27537 whether a function is interactive or not by simply doing an @code{assq}
27538 on the lambda form.  So, instead we have @code{gnus-interactive}
27539 function that takes a string and returns values that are usable to
27540 @code{interactive}.
27541
27542 This function accepts (almost) all normal @code{interactive} specs, but
27543 adds a few more.
27544
27545 @table @samp
27546 @item y
27547 @vindex gnus-current-prefix-symbol
27548 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27549 variable.
27550
27551 @item Y
27552 @vindex gnus-current-prefix-symbols
27553 A list of the current symbolic prefixes---the
27554 @code{gnus-current-prefix-symbol} variable.
27555
27556 @item A
27557 The current article number---the @code{gnus-summary-article-number}
27558 function.
27559
27560 @item H
27561 The current article header---the @code{gnus-summary-article-header}
27562 function.
27563
27564 @item g
27565 The current group name---the @code{gnus-group-group-name}
27566 function.
27567
27568 @end table
27569
27570
27571 @node Emacs/XEmacs Code
27572 @subsection Emacs/XEmacs Code
27573 @cindex XEmacs
27574 @cindex Emacsen
27575
27576 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27577 platforms must be the primary one.  I chose Emacs.  Not because I don't
27578 like XEmacs or Mule, but because it comes first alphabetically.
27579
27580 This means that Gnus will byte-compile under Emacs with nary a warning,
27581 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27582 As I use byte-compilation warnings to help me root out trivial errors in
27583 Gnus, that's very useful.
27584
27585 I've also consistently used Emacs function interfaces, but have used
27586 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27587 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27588 function.  I then define a function called @code{gnus-run-at-time} that
27589 takes the same parameters as the Emacs @code{run-at-time}.  When running
27590 Gnus under Emacs, the former function is just an alias for the latter.
27591 However, when running under XEmacs, the former is an alias for the
27592 following function:
27593
27594 @lisp
27595 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27596   (start-itimer
27597    "gnus-run-at-time"
27598    `(lambda ()
27599       (,function ,@@args))
27600    time repeat))
27601 @end lisp
27602
27603 This sort of thing has been done for bunches of functions.  Gnus does
27604 not redefine any native Emacs functions while running under XEmacs---it
27605 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27606 all over.
27607
27608 In the cases where the XEmacs function interface was obviously cleaner,
27609 I used it instead.  For example @code{gnus-region-active-p} is an alias
27610 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27611
27612 Of course, I could have chosen XEmacs as my native platform and done
27613 mapping functions the other way around.  But I didn't.  The performance
27614 hit these indirections impose on Gnus under XEmacs should be slight.
27615
27616
27617 @node Various File Formats
27618 @subsection Various File Formats
27619
27620 @menu
27621 * Active File Format::          Information on articles and groups available.
27622 * Newsgroups File Format::      Group descriptions.
27623 @end menu
27624
27625
27626 @node Active File Format
27627 @subsubsection Active File Format
27628
27629 The active file lists all groups available on the server in
27630 question.  It also lists the highest and lowest current article numbers
27631 in each group.
27632
27633 Here's an excerpt from a typical active file:
27634
27635 @example
27636 soc.motss 296030 293865 y
27637 alt.binaries.pictures.fractals 3922 3913 n
27638 comp.sources.unix 1605 1593 m
27639 comp.binaries.ibm.pc 5097 5089 y
27640 no.general 1000 900 y
27641 @end example
27642
27643 Here's a pseudo-BNF definition of this file:
27644
27645 @example
27646 active      = *group-line
27647 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27648 group       = <non-white-space string>
27649 spc         = " "
27650 high-number = <non-negative integer>
27651 low-number  = <positive integer>
27652 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27653 @end example
27654
27655 For a full description of this file, see the manual pages for
27656 @samp{innd}, in particular @samp{active(5)}.
27657
27658
27659 @node Newsgroups File Format
27660 @subsubsection Newsgroups File Format
27661
27662 The newsgroups file lists groups along with their descriptions.  Not all
27663 groups on the server have to be listed,  and not all groups in the file
27664 have to exist on the server.  The file is meant purely as information to
27665 the user.
27666
27667 The format is quite simple; a group name, a tab, and the description.
27668 Here's the definition:
27669
27670 @example
27671 newsgroups    = *line
27672 line          = group tab description <NEWLINE>
27673 group         = <non-white-space string>
27674 tab           = <TAB>
27675 description   = <string>
27676 @end example
27677
27678
27679 @page
27680 @node Emacs for Heathens
27681 @section Emacs for Heathens
27682
27683 Believe it or not, but some people who use Gnus haven't really used
27684 Emacs much before they embarked on their journey on the Gnus Love Boat.
27685 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27686 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27687 is a regexp that is used for matching on the group name'' are magical
27688 phrases with little or no meaning, then this appendix is for you.  If
27689 you are already familiar with Emacs, just ignore this and go fondle your
27690 cat instead.
27691
27692 @menu
27693 * Keystrokes::                  Entering text and executing commands.
27694 * Emacs Lisp::                  The built-in Emacs programming language.
27695 @end menu
27696
27697
27698 @node Keystrokes
27699 @subsection Keystrokes
27700
27701 @itemize @bullet
27702 @item
27703 Q: What is an experienced Emacs user?
27704
27705 @item
27706 A: A person who wishes that the terminal had pedals.
27707 @end itemize
27708
27709 Yes, when you use Emacs, you are apt to use the control key, the shift
27710 key and the meta key a lot.  This is very annoying to some people
27711 (notably @code{vi}le users), and the rest of us just love the hell out
27712 of it.  Just give up and submit.  Emacs really does stand for
27713 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27714 may have heard from other disreputable sources (like the Emacs author).
27715
27716 The shift keys are normally located near your pinky fingers, and are
27717 normally used to get capital letters and stuff.  You probably use it all
27718 the time.  The control key is normally marked ``CTRL'' or something like
27719 that.  The meta key is, funnily enough, never marked as such on any
27720 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27721 which is the meta key on this keyboard.  It's usually located somewhere
27722 to the left hand side of the keyboard, usually on the bottom row.
27723
27724 Now, us Emacs people don't say ``press the meta-control-m key'',
27725 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27726 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27727 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27728 down the control key, and hold it down while you press @kbd{k}''.
27729 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27730 the control key and then press @kbd{k}''.  Simple, ay?
27731
27732 This is somewhat complicated by the fact that not all keyboards have a
27733 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27734 means ``press escape, release escape, press @kbd{k}''.  That's much more
27735 work than if you have a meta key, so if that's the case, I respectfully
27736 suggest you get a real keyboard with a meta key.  You can't live without
27737 it.
27738
27739
27740
27741 @node Emacs Lisp
27742 @subsection Emacs Lisp
27743
27744 Emacs is the King of Editors because it's really a Lisp interpreter.
27745 Each and every key you tap runs some Emacs Lisp code snippet, and since
27746 Emacs Lisp is an interpreted language, that means that you can configure
27747 any key to run any arbitrary code.  You just, like, do it.
27748
27749 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27750 functions.  (These are byte-compiled for speed, but it's still
27751 interpreted.)  If you decide that you don't like the way Gnus does
27752 certain things, it's trivial to have it do something a different way.
27753 (Well, at least if you know how to write Lisp code.)  However, that's
27754 beyond the scope of this manual, so we are simply going to talk about
27755 some common constructs that you normally use in your @file{.emacs} file
27756 to customize Gnus.
27757
27758 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27759 write the following:
27760
27761 @lisp
27762 (setq gnus-florgbnize 4)
27763 @end lisp
27764
27765 This function (really ``special form'') @code{setq} is the one that can
27766 set a variable to some value.  This is really all you need to know.  Now
27767 you can go and fill your @file{.emacs} file with lots of these to change
27768 how Gnus works.
27769
27770 If you have put that thing in your @file{.emacs} file, it will be read
27771 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27772 start Emacs.  If you want to change the variable right away, simply say
27773 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27774 previous ``form'', which is a simple @code{setq} statement here.
27775
27776 Go ahead---just try it, if you're located at your Emacs.  After you
27777 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27778 is the return value of the form you @code{eval}ed.
27779
27780 Some pitfalls:
27781
27782 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27783 that means:
27784
27785 @lisp
27786 (setq gnus-read-active-file 'some)
27787 @end lisp
27788
27789 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27790 @samp{nntp.ifi.uio.no}'', that means:
27791
27792 @lisp
27793 (setq gnus-nntp-server "nntp.ifi.uio.no")
27794 @end lisp
27795
27796 So be careful not to mix up strings (the latter) with symbols (the
27797 former).  The manual is unambiguous, but it can be confusing.
27798
27799 @page
27800 @include gnus-faq.texi
27801
27802 @node Index
27803 @chapter Index
27804 @printindex cp
27805
27806 @node Key Index
27807 @chapter Key Index
27808 @printindex ky
27809
27810 @summarycontents
27811 @contents
27812 @bye
27813
27814 @iftex
27815 @iflatex
27816 \end{document}
27817 @end iflatex
27818 @end iftex
27819
27820 @c Local Variables:
27821 @c mode: texinfo
27822 @c coding: iso-8859-1
27823 @c End: