Synch to Gnus 200311251206.
[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 do
9626 not do a particularly excellent job at it.  That is, @code{nnmbox},
9627 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
9628 articles from any groups, while @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 it
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 addresses as
10801 the @code{From} header, or if the @code{broken-reply-to} group
10802 parameter is 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, more so than @acronym{NNTP} or
16441 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
16442 best to fix them right away.  If you encounter odd behaviour, chances
16443 are that either the server or Gnus is buggy.
16444
16445 If you are familiar with network protocols in general, you will
16446 probably be able to extract some clues from the protocol dump of the
16447 exchanges between Gnus and the server.  Even if you are not familiar
16448 with network protocols, when you include the protocol dump in
16449 @acronym{IMAP}-related bug reports you are helping us with data
16450 critical to solving the problem.  Therefore, we strongly encourage you
16451 to include the protocol dump when reporting IMAP bugs in Gnus.
16452
16453
16454 @vindex imap-log
16455 Because the protocol dump, when enabled, generates lots of data, it is
16456 disabled by default.  You can enable it by setting @code{imap-log} as
16457 follows: 
16458
16459 @lisp
16460 (setq imap-log t)
16461 @end lisp
16462
16463 This instructs the @code{imap.el} package to log any exchanges with
16464 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
16465 for error messages, which sometimes are tagged with the keyword
16466 @code{BAD} - but when submitting a bug, make sure to include all the
16467 data.
16468
16469 @node Other Sources
16470 @section Other Sources
16471
16472 Gnus can do more than just read news or mail.  The methods described
16473 below allow Gnus to view directories and files as if they were
16474 newsgroups.
16475
16476 @menu
16477 * Directory Groups::            You can read a directory as if it was a newsgroup.
16478 * Anything Groups::             Dired?  Who needs dired?
16479 * Document Groups::             Single files can be the basis of a group.
16480 * SOUP::                        Reading @sc{soup} packets ``offline''.
16481 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16482 @end menu
16483
16484
16485 @node Directory Groups
16486 @subsection Directory Groups
16487 @cindex nndir
16488 @cindex directory groups
16489
16490 If you have a directory that has lots of articles in separate files in
16491 it, you might treat it as a newsgroup.  The files have to have numerical
16492 names, of course.
16493
16494 This might be an opportune moment to mention @code{ange-ftp} (and its
16495 successor @code{efs}), that most wonderful of all wonderful Emacs
16496 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16497 back end to read directories.  Big deal.
16498
16499 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16500 enter the @code{ange-ftp} file name
16501 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16502 @code{ange-ftp} or @code{efs} will actually allow you to read this
16503 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16504
16505 @code{nndir} will use @acronym{NOV} files if they are present.
16506
16507 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16508 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16509 whatever you use @code{nndir} for, so you could switch to any of those
16510 methods if you feel the need to have a non-read-only @code{nndir}.
16511
16512
16513 @node Anything Groups
16514 @subsection Anything Groups
16515 @cindex nneething
16516
16517 From the @code{nndir} back end (which reads a single spool-like
16518 directory), it's just a hop and a skip to @code{nneething}, which
16519 pretends that any arbitrary directory is a newsgroup.  Strange, but
16520 true.
16521
16522 When @code{nneething} is presented with a directory, it will scan this
16523 directory and assign article numbers to each file.  When you enter such
16524 a group, @code{nneething} must create ``headers'' that Gnus can use.
16525 After all, Gnus is a newsreader, in case you're forgetting.
16526 @code{nneething} does this in a two-step process.  First, it snoops each
16527 file in question.  If the file looks like an article (i.e., the first
16528 few lines look like headers), it will use this as the head.  If this is
16529 just some arbitrary file without a head (e.g. a C source file),
16530 @code{nneething} will cobble up a header out of thin air.  It will use
16531 file ownership, name and date and do whatever it can with these
16532 elements.
16533
16534 All this should happen automatically for you, and you will be presented
16535 with something that looks very much like a newsgroup.  Totally like a
16536 newsgroup, to be precise.  If you select an article, it will be displayed
16537 in the article buffer, just as usual.
16538
16539 If you select a line that represents a directory, Gnus will pop you into
16540 a new summary buffer for this @code{nneething} group.  And so on.  You can
16541 traverse the entire disk this way, if you feel like, but remember that
16542 Gnus is not dired, really, and does not intend to be, either.
16543
16544 There are two overall modes to this action---ephemeral or solid.  When
16545 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16546 will not store information on what files you have read, and what files
16547 are new, and so on.  If you create a solid @code{nneething} group the
16548 normal way with @kbd{G m}, Gnus will store a mapping table between
16549 article numbers and file names, and you can treat this group like any
16550 other groups.  When you activate a solid @code{nneething} group, you will
16551 be told how many unread articles it contains, etc., etc.
16552
16553 Some variables:
16554
16555 @table @code
16556 @item nneething-map-file-directory
16557 @vindex nneething-map-file-directory
16558 All the mapping files for solid @code{nneething} groups will be stored
16559 in this directory, which defaults to @file{~/.nneething/}.
16560
16561 @item nneething-exclude-files
16562 @vindex nneething-exclude-files
16563 All files that match this regexp will be ignored.  Nice to use to exclude
16564 auto-save files and the like, which is what it does by default.
16565
16566 @item nneething-include-files
16567 @vindex nneething-include-files
16568 Regexp saying what files to include in the group.  If this variable is
16569 non-@code{nil}, only files matching this regexp will be included.
16570
16571 @item nneething-map-file
16572 @vindex nneething-map-file
16573 Name of the map files.
16574 @end table
16575
16576
16577 @node Document Groups
16578 @subsection Document Groups
16579 @cindex nndoc
16580 @cindex documentation group
16581 @cindex help group
16582
16583 @code{nndoc} is a cute little thing that will let you read a single file
16584 as a newsgroup.  Several files types are supported:
16585
16586 @table @code
16587 @cindex Babyl
16588 @cindex Rmail mbox
16589
16590 @item babyl
16591 The Babyl (Rmail) mail box.
16592 @cindex mbox
16593 @cindex Unix mbox
16594
16595 @item mbox
16596 The standard Unix mbox file.
16597
16598 @cindex MMDF mail box
16599 @item mmdf
16600 The MMDF mail box format.
16601
16602 @item news
16603 Several news articles appended into a file.
16604
16605 @item rnews
16606 @cindex rnews batch files
16607 The rnews batch transport format.
16608 @cindex forwarded messages
16609
16610 @item forward
16611 Forwarded articles.
16612
16613 @item nsmail
16614 Netscape mail boxes.
16615
16616 @item mime-parts
16617 @acronym{MIME} multipart messages.
16618
16619 @item standard-digest
16620 The standard (RFC 1153) digest format.
16621
16622 @item mime-digest
16623 A @acronym{MIME} digest of messages.
16624
16625 @item lanl-gov-announce
16626 Announcement messages from LANL Gov Announce.
16627
16628 @item rfc822-forward
16629 A message forwarded according to RFC822.
16630
16631 @item outlook
16632 The Outlook mail box.
16633
16634 @item oe-dbx
16635 The Outlook Express dbx mail box.
16636
16637 @item exim-bounce
16638 A bounce message from the Exim MTA.
16639
16640 @item forward
16641 A message forwarded according to informal rules.
16642
16643 @item rfc934
16644 An RFC934-forwarded message.
16645
16646 @item mailman
16647 A mailman digest.
16648
16649 @item clari-briefs
16650 A digest of Clarinet brief news items.
16651
16652 @item slack-digest
16653 Non-standard digest format---matches most things, but does it badly.
16654
16655 @item mail-in-mail
16656 The last resort.
16657 @end table
16658
16659 You can also use the special ``file type'' @code{guess}, which means
16660 that @code{nndoc} will try to guess what file type it is looking at.
16661 @code{digest} means that @code{nndoc} should guess what digest type the
16662 file is.
16663
16664 @code{nndoc} will not try to change the file or insert any extra headers into
16665 it---it will simply, like, let you use the file as the basis for a
16666 group.  And that's it.
16667
16668 If you have some old archived articles that you want to insert into your
16669 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16670 that.  Say you have an old @file{RMAIL} file with mail that you now want
16671 to split into your new @code{nnml} groups.  You look at that file using
16672 @code{nndoc} (using the @kbd{G f} command in the group buffer
16673 (@pxref{Foreign Groups})), set the process mark on all the articles in
16674 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16675 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16676 file is now also stored in lots of @code{nnml} directories, and you can
16677 delete that pesky @file{RMAIL} file.  If you have the guts!
16678
16679 Virtual server variables:
16680
16681 @table @code
16682 @item nndoc-article-type
16683 @vindex nndoc-article-type
16684 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16685 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16686 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16687 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16688 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16689
16690 @item nndoc-post-type
16691 @vindex nndoc-post-type
16692 This variable says whether Gnus is to consider the group a news group or
16693 a mail group.  There are two valid values:  @code{mail} (the default)
16694 and @code{news}.
16695 @end table
16696
16697 @menu
16698 * Document Server Internals::   How to add your own document types.
16699 @end menu
16700
16701
16702 @node Document Server Internals
16703 @subsubsection Document Server Internals
16704
16705 Adding new document types to be recognized by @code{nndoc} isn't
16706 difficult.  You just have to whip up a definition of what the document
16707 looks like, write a predicate function to recognize that document type,
16708 and then hook into @code{nndoc}.
16709
16710 First, here's an example document type definition:
16711
16712 @example
16713 (mmdf
16714  (article-begin .  "^\^A\^A\^A\^A\n")
16715  (body-end .  "^\^A\^A\^A\^A\n"))
16716 @end example
16717
16718 The definition is simply a unique @dfn{name} followed by a series of
16719 regexp pseudo-variable settings.  Below are the possible
16720 variables---don't be daunted by the number of variables; most document
16721 types can be defined with very few settings:
16722
16723 @table @code
16724 @item first-article
16725 If present, @code{nndoc} will skip past all text until it finds
16726 something that match this regexp.  All text before this will be
16727 totally ignored.
16728
16729 @item article-begin
16730 This setting has to be present in all document type definitions.  It
16731 says what the beginning of each article looks like.
16732
16733 @item head-begin-function
16734 If present, this should be a function that moves point to the head of
16735 the article.
16736
16737 @item nndoc-head-begin
16738 If present, this should be a regexp that matches the head of the
16739 article.
16740
16741 @item nndoc-head-end
16742 This should match the end of the head of the article.  It defaults to
16743 @samp{^$}---the empty line.
16744
16745 @item body-begin-function
16746 If present, this function should move point to the beginning of the body
16747 of the article.
16748
16749 @item body-begin
16750 This should match the beginning of the body of the article.  It defaults
16751 to @samp{^\n}.
16752
16753 @item body-end-function
16754 If present, this function should move point to the end of the body of
16755 the article.
16756
16757 @item body-end
16758 If present, this should match the end of the body of the article.
16759
16760 @item file-end
16761 If present, this should match the end of the file.  All text after this
16762 regexp will be totally ignored.
16763
16764 @end table
16765
16766 So, using these variables @code{nndoc} is able to dissect a document
16767 file into a series of articles, each with a head and a body.  However, a
16768 few more variables are needed since not all document types are all that
16769 news-like---variables needed to transform the head or the body into
16770 something that's palatable for Gnus:
16771
16772 @table @code
16773 @item prepare-body-function
16774 If present, this function will be called when requesting an article.  It
16775 will be called with point at the start of the body, and is useful if the
16776 document has encoded some parts of its contents.
16777
16778 @item article-transform-function
16779 If present, this function is called when requesting an article.  It's
16780 meant to be used for more wide-ranging transformation of both head and
16781 body of the article.
16782
16783 @item generate-head-function
16784 If present, this function is called to generate a head that Gnus can
16785 understand.  It is called with the article number as a parameter, and is
16786 expected to generate a nice head for the article in question.  It is
16787 called when requesting the headers of all articles.
16788
16789 @end table
16790
16791 Let's look at the most complicated example I can come up with---standard
16792 digests:
16793
16794 @example
16795 (standard-digest
16796  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16797  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16798  (prepare-body-function . nndoc-unquote-dashes)
16799  (body-end-function . nndoc-digest-body-end)
16800  (head-end . "^ ?$")
16801  (body-begin . "^ ?\n")
16802  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16803  (subtype digest guess))
16804 @end example
16805
16806 We see that all text before a 70-width line of dashes is ignored; all
16807 text after a line that starts with that @samp{^End of} is also ignored;
16808 each article begins with a 30-width line of dashes; the line separating
16809 the head from the body may contain a single space; and that the body is
16810 run through @code{nndoc-unquote-dashes} before being delivered.
16811
16812 To hook your own document definition into @code{nndoc}, use the
16813 @code{nndoc-add-type} function.  It takes two parameters---the first
16814 is the definition itself and the second (optional) parameter says
16815 where in the document type definition alist to put this definition.
16816 The alist is traversed sequentially, and
16817 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16818 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16819 @code{mmdf} type, and so on.  These type predicates should return
16820 @code{nil} if the document is not of the correct type; @code{t} if it
16821 is of the correct type; and a number if the document might be of the
16822 correct type.  A high number means high probability; a low number
16823 means low probability with @samp{0} being the lowest valid number.
16824
16825
16826 @node SOUP
16827 @subsection SOUP
16828 @cindex SOUP
16829 @cindex offline
16830
16831 In the PC world people often talk about ``offline'' newsreaders.  These
16832 are thingies that are combined reader/news transport monstrosities.
16833 With built-in modem programs.  Yecchh!
16834
16835 Of course, us Unix Weenie types of human beans use things like
16836 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16837 transport things like Ghod intended.  And then we just use normal
16838 newsreaders.
16839
16840 However, it can sometimes be convenient to do something that's a bit
16841 easier on the brain if you have a very slow modem, and you're not really
16842 that interested in doing things properly.
16843
16844 A file format called @sc{soup} has been developed for transporting news
16845 and mail from servers to home machines and back again.  It can be a bit
16846 fiddly.
16847
16848 First some terminology:
16849
16850 @table @dfn
16851
16852 @item server
16853 This is the machine that is connected to the outside world and where you
16854 get news and/or mail from.
16855
16856 @item home machine
16857 This is the machine that you want to do the actual reading and responding
16858 on.  It is typically not connected to the rest of the world in any way.
16859
16860 @item packet
16861 Something that contains messages and/or commands.  There are two kinds
16862 of packets:
16863
16864 @table @dfn
16865 @item message packets
16866 These are packets made at the server, and typically contain lots of
16867 messages for you to read.  These are called @file{SoupoutX.tgz} by
16868 default, where @var{x} is a number.
16869
16870 @item response packets
16871 These are packets made at the home machine, and typically contains
16872 replies that you've written.  These are called @file{SoupinX.tgz} by
16873 default, where @var{x} is a number.
16874
16875 @end table
16876
16877 @end table
16878
16879
16880 @enumerate
16881
16882 @item
16883 You log in on the server and create a @sc{soup} packet.  You can either
16884 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16885 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16886 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16887
16888 @item
16889 You transfer the packet home.  Rail, boat, car or modem will do fine.
16890
16891 @item
16892 You put the packet in your home directory.
16893
16894 @item
16895 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16896 the native or secondary server.
16897
16898 @item
16899 You read articles and mail and answer and followup to the things you
16900 want (@pxref{SOUP Replies}).
16901
16902 @item
16903 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16904 packet.
16905
16906 @item
16907 You transfer this packet to the server.
16908
16909 @item
16910 You use Gnus to mail this packet out with the @kbd{G s s} command.
16911
16912 @item
16913 You then repeat until you die.
16914
16915 @end enumerate
16916
16917 So you basically have a bipartite system---you use @code{nnsoup} for
16918 reading and Gnus for packing/sending these @sc{soup} packets.
16919
16920 @menu
16921 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16922 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16923 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16924 @end menu
16925
16926
16927 @node SOUP Commands
16928 @subsubsection SOUP Commands
16929
16930 These are commands for creating and manipulating @sc{soup} packets.
16931
16932 @table @kbd
16933 @item G s b
16934 @kindex G s b (Group)
16935 @findex gnus-group-brew-soup
16936 Pack all unread articles in the current group
16937 (@code{gnus-group-brew-soup}).  This command understands the
16938 process/prefix convention.
16939
16940 @item G s w
16941 @kindex G s w (Group)
16942 @findex gnus-soup-save-areas
16943 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16944
16945 @item G s s
16946 @kindex G s s (Group)
16947 @findex gnus-soup-send-replies
16948 Send all replies from the replies packet
16949 (@code{gnus-soup-send-replies}).
16950
16951 @item G s p
16952 @kindex G s p (Group)
16953 @findex gnus-soup-pack-packet
16954 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16955
16956 @item G s r
16957 @kindex G s r (Group)
16958 @findex nnsoup-pack-replies
16959 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16960
16961 @item O s
16962 @kindex O s (Summary)
16963 @findex gnus-soup-add-article
16964 This summary-mode command adds the current article to a @sc{soup} packet
16965 (@code{gnus-soup-add-article}).  It understands the process/prefix
16966 convention (@pxref{Process/Prefix}).
16967
16968 @end table
16969
16970
16971 There are a few variables to customize where Gnus will put all these
16972 thingies:
16973
16974 @table @code
16975
16976 @item gnus-soup-directory
16977 @vindex gnus-soup-directory
16978 Directory where Gnus will save intermediate files while composing
16979 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16980
16981 @item gnus-soup-replies-directory
16982 @vindex gnus-soup-replies-directory
16983 This is what Gnus will use as a temporary directory while sending our
16984 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16985
16986 @item gnus-soup-prefix-file
16987 @vindex gnus-soup-prefix-file
16988 Name of the file where Gnus stores the last used prefix.  The default is
16989 @samp{gnus-prefix}.
16990
16991 @item gnus-soup-packer
16992 @vindex gnus-soup-packer
16993 A format string command for packing a @sc{soup} packet.  The default is
16994 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16995
16996 @item gnus-soup-unpacker
16997 @vindex gnus-soup-unpacker
16998 Format string command for unpacking a @sc{soup} packet.  The default is
16999 @samp{gunzip -c %s | tar xvf -}.
17000
17001 @item gnus-soup-packet-directory
17002 @vindex gnus-soup-packet-directory
17003 Where Gnus will look for reply packets.  The default is @file{~/}.
17004
17005 @item gnus-soup-packet-regexp
17006 @vindex gnus-soup-packet-regexp
17007 Regular expression matching @sc{soup} reply packets in
17008 @code{gnus-soup-packet-directory}.
17009
17010 @end table
17011
17012
17013 @node SOUP Groups
17014 @subsubsection SOUP Groups
17015 @cindex nnsoup
17016
17017 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
17018 read incoming packets, unpack them, and put them in a directory where
17019 you can read them at leisure.
17020
17021 These are the variables you can use to customize its behavior:
17022
17023 @table @code
17024
17025 @item nnsoup-tmp-directory
17026 @vindex nnsoup-tmp-directory
17027 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
17028 directory.  (@file{/tmp/} by default.)
17029
17030 @item nnsoup-directory
17031 @vindex nnsoup-directory
17032 @code{nnsoup} then moves each message and index file to this directory.
17033 The default is @file{~/SOUP/}.
17034
17035 @item nnsoup-replies-directory
17036 @vindex nnsoup-replies-directory
17037 All replies will be stored in this directory before being packed into a
17038 reply packet.  The default is @file{~/SOUP/replies/}.
17039
17040 @item nnsoup-replies-format-type
17041 @vindex nnsoup-replies-format-type
17042 The @sc{soup} format of the replies packets.  The default is @samp{?n}
17043 (rnews), and I don't think you should touch that variable.  I probably
17044 shouldn't even have documented it.  Drats!  Too late!
17045
17046 @item nnsoup-replies-index-type
17047 @vindex nnsoup-replies-index-type
17048 The index type of the replies packet.  The default is @samp{?n}, which
17049 means ``none''.  Don't fiddle with this one either!
17050
17051 @item nnsoup-active-file
17052 @vindex nnsoup-active-file
17053 Where @code{nnsoup} stores lots of information.  This is not an ``active
17054 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
17055 this file or mess it up in any way, you're dead.  The default is
17056 @file{~/SOUP/active}.
17057
17058 @item nnsoup-packer
17059 @vindex nnsoup-packer
17060 Format string command for packing a reply @sc{soup} packet.  The default
17061 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
17062
17063 @item nnsoup-unpacker
17064 @vindex nnsoup-unpacker
17065 Format string command for unpacking incoming @sc{soup} packets.  The
17066 default is @samp{gunzip -c %s | tar xvf -}.
17067
17068 @item nnsoup-packet-directory
17069 @vindex nnsoup-packet-directory
17070 Where @code{nnsoup} will look for incoming packets.  The default is
17071 @file{~/}.
17072
17073 @item nnsoup-packet-regexp
17074 @vindex nnsoup-packet-regexp
17075 Regular expression matching incoming @sc{soup} packets.  The default is
17076 @samp{Soupout}.
17077
17078 @item nnsoup-always-save
17079 @vindex nnsoup-always-save
17080 If non-@code{nil}, save the replies buffer after each posted message.
17081
17082 @end table
17083
17084
17085 @node SOUP Replies
17086 @subsubsection SOUP Replies
17087
17088 Just using @code{nnsoup} won't mean that your postings and mailings end
17089 up in @sc{soup} reply packets automagically.  You have to work a bit
17090 more for that to happen.
17091
17092 @findex nnsoup-set-variables
17093 The @code{nnsoup-set-variables} command will set the appropriate
17094 variables to ensure that all your followups and replies end up in the
17095 @sc{soup} system.
17096
17097 In specific, this is what it does:
17098
17099 @lisp
17100 (setq message-send-news-function 'nnsoup-request-post)
17101 (setq message-send-mail-function 'nnsoup-request-mail)
17102 @end lisp
17103
17104 And that's it, really.  If you only want news to go into the @sc{soup}
17105 system you just use the first line.  If you only want mail to be
17106 @sc{soup}ed you use the second.
17107
17108
17109 @node Mail-To-News Gateways
17110 @subsection Mail-To-News Gateways
17111 @cindex mail-to-news gateways
17112 @cindex gateways
17113
17114 If your local @code{nntp} server doesn't allow posting, for some reason
17115 or other, you can post using one of the numerous mail-to-news gateways.
17116 The @code{nngateway} back end provides the interface.
17117
17118 Note that you can't read anything from this back end---it can only be
17119 used to post with.
17120
17121 Server variables:
17122
17123 @table @code
17124 @item nngateway-address
17125 @vindex nngateway-address
17126 This is the address of the mail-to-news gateway.
17127
17128 @item nngateway-header-transformation
17129 @vindex nngateway-header-transformation
17130 News headers often have to be transformed in some odd way or other
17131 for the mail-to-news gateway to accept it.  This variable says what
17132 transformation should be called, and defaults to
17133 @code{nngateway-simple-header-transformation}.  The function is called
17134 narrowed to the headers to be transformed and with one parameter---the
17135 gateway address.
17136
17137 This default function just inserts a new @code{To} header based on the
17138 @code{Newsgroups} header and the gateway address.
17139 For instance, an article with this @code{Newsgroups} header:
17140
17141 @example
17142 Newsgroups: alt.religion.emacs
17143 @end example
17144
17145 will get this @code{To} header inserted:
17146
17147 @example
17148 To: alt-religion-emacs@@GATEWAY
17149 @end example
17150
17151 The following pre-defined functions exist:
17152
17153 @findex nngateway-simple-header-transformation
17154 @table @code
17155
17156 @item nngateway-simple-header-transformation
17157 Creates a @code{To} header that looks like
17158 @var{newsgroup}@@@code{nngateway-address}.
17159
17160 @findex nngateway-mail2news-header-transformation
17161
17162 @item nngateway-mail2news-header-transformation
17163 Creates a @code{To} header that looks like
17164 @code{nngateway-address}.
17165 @end table
17166
17167 @end table
17168
17169 Here's an example:
17170
17171 @lisp
17172 (setq gnus-post-method
17173       '(nngateway
17174         "mail2news@@replay.com"
17175         (nngateway-header-transformation
17176          nngateway-mail2news-header-transformation)))
17177 @end lisp
17178
17179 So, to use this, simply say something like:
17180
17181 @lisp
17182 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17183 @end lisp
17184
17185
17186
17187 @node Combined Groups
17188 @section Combined Groups
17189
17190 Gnus allows combining a mixture of all the other group types into bigger
17191 groups.
17192
17193 @menu
17194 * Virtual Groups::              Combining articles from many groups.
17195 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17196 @end menu
17197
17198
17199 @node Virtual Groups
17200 @subsection Virtual Groups
17201 @cindex nnvirtual
17202 @cindex virtual groups
17203 @cindex merging groups
17204
17205 An @dfn{nnvirtual group} is really nothing more than a collection of
17206 other groups.
17207
17208 For instance, if you are tired of reading many small groups, you can
17209 put them all in one big group, and then grow tired of reading one
17210 big, unwieldy group.  The joys of computing!
17211
17212 You specify @code{nnvirtual} as the method.  The address should be a
17213 regexp to match component groups.
17214
17215 All marks in the virtual group will stick to the articles in the
17216 component groups.  So if you tick an article in a virtual group, the
17217 article will also be ticked in the component group from whence it
17218 came.  (And vice versa---marks from the component groups will also be
17219 shown in the virtual group.).  To create an empty virtual group, run
17220 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17221 and edit the method regexp with @kbd{M-e}
17222 (@code{gnus-group-edit-group-method})
17223
17224 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17225 newsgroups into one, big, happy newsgroup:
17226
17227 @lisp
17228 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17229 @end lisp
17230
17231 The component groups can be native or foreign; everything should work
17232 smoothly, but if your computer explodes, it was probably my fault.
17233
17234 Collecting the same group from several servers might actually be a good
17235 idea if users have set the Distribution header to limit distribution.
17236 If you would like to read @samp{soc.motss} both from a server in Japan
17237 and a server in Norway, you could use the following as the group regexp:
17238
17239 @example
17240 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17241 @end example
17242
17243 (Remember, though, that if you're creating the group with @kbd{G m}, you
17244 shouldn't double the backslashes, and you should leave off the quote
17245 characters at the beginning and the end of the string.)
17246
17247 This should work kinda smoothly---all articles from both groups should
17248 end up in this one, and there should be no duplicates.  Threading (and
17249 the rest) will still work as usual, but there might be problems with the
17250 sequence of articles.  Sorting on date might be an option here
17251 (@pxref{Selecting a Group}).
17252
17253 One limitation, however---all groups included in a virtual
17254 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17255 zombie groups can't be component groups for @code{nnvirtual} groups.
17256
17257 @vindex nnvirtual-always-rescan
17258 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17259 @code{nnvirtual} will always scan groups for unread articles when
17260 entering a virtual group.  If this variable is @code{nil} (which is the
17261 default) and you read articles in a component group after the virtual
17262 group has been activated, the read articles from the component group
17263 will show up when you enter the virtual group.  You'll also see this
17264 effect if you have two virtual groups that have a component group in
17265 common.  If that's the case, you should set this variable to @code{t}.
17266 Or you can just tap @code{M-g} on the virtual group every time before
17267 you enter it---it'll have much the same effect.
17268
17269 @code{nnvirtual} can have both mail and news groups as component groups.
17270 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17271 has to ask the back end of the component group the article comes from
17272 whether it is a news or mail back end.  However, when you do a @kbd{^},
17273 there is typically no sure way for the component back end to know this,
17274 and in that case @code{nnvirtual} tells Gnus that the article came from a
17275 not-news back end.  (Just to be on the safe side.)
17276
17277 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17278 line from the article you respond to in these cases.
17279
17280 @code{nnvirtual} groups do not inherit anything but articles and marks
17281 from component groups---group parameters, for instance, are not
17282 inherited.
17283
17284
17285 @node Kibozed Groups
17286 @subsection Kibozed Groups
17287 @cindex nnkiboze
17288 @cindex kibozing
17289
17290 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
17291 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
17292 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
17293 down to a halt with useless requests!  Oh happiness!
17294
17295 @kindex G k (Group)
17296 To create a kibozed group, use the @kbd{G k} command in the group
17297 buffer.
17298
17299 The address field of the @code{nnkiboze} method is, as with
17300 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17301 @code{nnkiboze} group.  That's where most similarities between
17302 @code{nnkiboze} and @code{nnvirtual} end.
17303
17304 In addition to this regexp detailing component groups, an
17305 @code{nnkiboze} group must have a score file to say what articles are
17306 to be included in the group (@pxref{Scoring}).
17307
17308 @kindex M-x nnkiboze-generate-groups
17309 @findex nnkiboze-generate-groups
17310 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17311 @code{nnkiboze} groups you want to have.  This command will take time.
17312 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17313 headers from all the articles in all the component groups and run them
17314 through the scoring process to determine if there are any articles in
17315 the groups that are to be part of the @code{nnkiboze} groups.
17316
17317 Please limit the number of component groups by using restrictive
17318 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17319 @acronym{NNTP} site may throw you off and never let you back in again.
17320 Stranger things have happened.
17321
17322 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17323 and they can be foreign.  No restrictions.
17324
17325 @vindex nnkiboze-directory
17326 The generation of an @code{nnkiboze} group means writing two files in
17327 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
17328 One contains the @acronym{NOV} header lines for all the articles in
17329 the group, and the other is an additional @file{.newsrc} file to store
17330 information on what groups have been searched through to find
17331 component articles.
17332
17333 Articles marked as read in the @code{nnkiboze} group will have
17334 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17335
17336
17337 @node Gnus Unplugged
17338 @section Gnus Unplugged
17339 @cindex offline
17340 @cindex unplugged
17341 @cindex agent
17342 @cindex Gnus agent
17343 @cindex Gnus unplugged
17344
17345 In olden times (ca. February '88), people used to run their newsreaders
17346 on big machines with permanent connections to the net.  News transport
17347 was dealt with by news servers, and all the newsreaders had to do was to
17348 read news.  Believe it or not.
17349
17350 Nowadays most people read news and mail at home, and use some sort of
17351 modem to connect to the net.  To avoid running up huge phone bills, it
17352 would be nice to have a way to slurp down all the news and mail, hang up
17353 the phone, read for several hours, and then upload any responses you
17354 have to make.  And then you repeat the procedure.
17355
17356 Of course, you can use news servers for doing this as well.  I've used
17357 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17358 for some years, but doing that's a bore.  Moving the news server
17359 functionality up to the newsreader makes sense if you're the only person
17360 reading news on a machine.
17361
17362 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17363 fact, you don't even have to configure anything.
17364
17365 Of course, to use it as such, you have to learn a few new commands.
17366
17367 @menu
17368 * Agent Basics::                How it all is supposed to work.
17369 * Agent Categories::            How to tell the Gnus Agent what to download.
17370 * Agent Commands::              New commands for all the buffers.
17371 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17372 * Agent as Cache::              The Agent is a big cache too.
17373 * Agent Expiry::                How to make old articles go away.
17374 * Agent Regeneration::          How to recover from lost connections and other accidents.
17375 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17376 * Outgoing Messages::           What happens when you post/mail something?
17377 * Agent Variables::             Customizing is fun.
17378 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17379 * Batching Agents::             How to fetch news from a @code{cron} job.
17380 * Agent Caveats::               What you think it'll do and what it does.
17381 @end menu
17382
17383
17384 @node Agent Basics
17385 @subsection Agent Basics
17386
17387 First, let's get some terminology out of the way.
17388
17389 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17390 connection to the net (and notified the Agent that this is the case).
17391 When the connection to the net is up again (and Gnus knows this), the
17392 Agent is @dfn{plugged}.
17393
17394 The @dfn{local} machine is the one you're running on, and which isn't
17395 connected to the net continuously.
17396
17397 @dfn{Downloading} means fetching things from the net to your local
17398 machine.  @dfn{Uploading} is doing the opposite.
17399
17400 You know that Gnus gives you all the opportunity you'd ever want for
17401 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17402 is also customizable to a great extent, which means that the user has a
17403 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17404 you in your foot, but with Gnus, you have a choice!
17405
17406 Gnus is never really in plugged or unplugged state.  Rather, it applies
17407 that state to each server individually.  This means that some servers
17408 can be plugged while others can be unplugged.  Additionally, some
17409 servers can be ignored by the Agent altogether (which means that
17410 they're kinda like plugged always).
17411
17412 So when you unplug the Agent and then wonder why is Gnus opening a
17413 connection to the Net, the next step to do is to look whether all
17414 servers are agentized.  If there is an unagentized server, you found
17415 the culprit.
17416
17417 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17418 reachable.  When Gnus notices this, it asks you whether you want the
17419 server to be switched to offline state.  If you say yes, then the
17420 server will behave somewhat as if it was unplugged, except that Gnus
17421 will ask you whether you want to switch it back online again.
17422
17423 Let's take a typical Gnus session using the Agent.
17424
17425 @itemize @bullet
17426
17427 @item
17428 @findex gnus-unplugged
17429 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17430 Agent in a disconnected state.  You can read all the news that you have
17431 already fetched while in this mode.
17432
17433 @item
17434 You then decide to see whether any new news has arrived.  You connect
17435 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17436 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17437 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17438 Source Specifiers}).
17439
17440 @item
17441 You can then read the new news immediately, or you can download the
17442 news onto your local machine.  If you want to do the latter, you press
17443 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17444 all the eligible articles in all the groups.  (To let Gnus know which
17445 articles you want to download, @pxref{Agent Categories}).
17446
17447 @item
17448 After fetching the articles, you press @kbd{J j} to make Gnus become
17449 unplugged again, and you shut down the PPP thing (or whatever).  And
17450 then you read the news offline.
17451
17452 @item
17453 And then you go to step 2.
17454 @end itemize
17455
17456 Here are some things you should do the first time (or so) that you use
17457 the Agent.
17458
17459 @itemize @bullet
17460
17461 @item
17462 Decide which servers should be covered by the Agent.  If you have a mail
17463 back end, it would probably be nonsensical to have it covered by the
17464 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17465 @kbd{J a} on the server (or servers) that you wish to have covered by the
17466 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17467 added servers you do not wish to have covered by the Agent.  By default,
17468 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17469 @code{gnus-secondary-select-methods} are agentized.
17470
17471 @item
17472 Decide on download policy.  It's fairly simple once you decide whether
17473 you are going to use agent categories, topic parameters, and/or group
17474 parameters to implement your policy.  If you're new to gnus, it
17475 is probably best to start with a category, @xref{Agent Categories}.
17476
17477 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17478 (@pxref{Agent Categories}) provide for setting a policy that applies
17479 to multiple groups.  Which you use is entirely up to you.  Topic
17480 parameters do override categories so, if you mix the two, you'll have
17481 to take that into account.  If you have a few groups that deviate from
17482 your policy, you can use group parameters (@pxref{Group Parameters}) to
17483 configure them.
17484
17485 @item
17486 Uhm@dots{} that's it.
17487 @end itemize
17488
17489
17490 @node Agent Categories
17491 @subsection Agent Categories
17492
17493 One of the main reasons to integrate the news transport layer into the
17494 newsreader is to allow greater control over what articles to download.
17495 There's not much point in downloading huge amounts of articles, just to
17496 find out that you're not interested in reading any of them.  It's better
17497 to be somewhat more conservative in choosing what to download, and then
17498 mark the articles for downloading manually if it should turn out that
17499 you're interested in the articles anyway.
17500
17501 One of the more effective methods for controlling what is to be
17502 downloaded is to create a @dfn{category} and then assign some (or all)
17503 groups to this category.  Groups that do not belong in any other
17504 category belong to the @code{default} category.  Gnus has its own
17505 buffer for creating and managing categories.
17506
17507 If you prefer, you can also use group parameters (@pxref{Group
17508 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17509 alternative approach to controlling the agent.  The only real
17510 difference is that categories are specific to the agent (so there is
17511 less to learn) while group and topic parameters include the kitchen
17512 sink.
17513
17514 Since you can set agent parameters in several different places we have
17515 a rule to decide which source to believe.  This rule specifies that
17516 the parameter sources are checked in the following order: group
17517 parameters, topic parameters, agent category, and finally customizable
17518 variables.  So you can mix all of these sources to produce a wide range
17519 of behavior, just don't blame me if you don't remember where you put
17520 your settings.
17521
17522 @menu
17523 * Category Syntax::             What a category looks like.
17524 * Category Buffer::             A buffer for maintaining categories.
17525 * Category Variables::          Customize'r'Us.
17526 @end menu
17527
17528
17529 @node Category Syntax
17530 @subsubsection Category Syntax
17531
17532 A category consists of a name, the list of groups belonging to the
17533 category, and a number of optional parameters that override the
17534 customizable variables.  The complete list of agent parameters are
17535 listed below.
17536
17537 @table @code
17538 @item gnus-agent-cat-name
17539 The name of the category.
17540
17541 @item gnus-agent-cat-groups
17542 The list of groups that are in this category.
17543
17544 @item gnus-agent-cat-predicate
17545 A predicate which (generally) gives a rough outline of which articles
17546 are eligible for downloading; and
17547
17548 @item gnus-agent-cat-score-file
17549 a score rule which (generally) gives you a finer granularity when
17550 deciding what articles to download.  (Note that this @dfn{download
17551 score} is not necessarily related to normal scores.)
17552
17553 @item gnus-agent-cat-enable-expiration
17554 a boolean indicating whether the agent should expire old articles in
17555 this group.  Most groups should be expired to conserve disk space.  In
17556 fact, its probably safe to say that the gnus.* hierarchy contains the
17557 only groups that should not be expired.
17558
17559 @item gnus-agent-cat-days-until-old
17560 an integer indicating the number of days that the agent should wait
17561 before deciding that a read article is safe to expire.
17562
17563 @item gnus-agent-cat-low-score
17564 an integer that overrides the value of @code{gnus-agent-low-score}.
17565
17566 @item gnus-agent-cat-high-score
17567 an integer that overrides the value of @code{gnus-agent-high-score}.
17568
17569 @item gnus-agent-cat-length-when-short
17570 an integer that overrides the value of
17571 @code{gnus-agent-short-article}.
17572
17573 @item gnus-agent-cat-length-when-long
17574 an integer that overrides the value of @code{gnus-agent-long-article}.
17575 @end table
17576
17577 The name of a category can not be changed once the category has been
17578 created.
17579
17580 Each category maintains a list of groups that are exclusive members of
17581 that category.  The exclusivity rule is automatically enforced, add a
17582 group to a new category and it is automatically removed from its old
17583 category.
17584
17585 A predicate in its simplest form can be a single predicate such as
17586 @code{true} or @code{false}.  These two will download every available
17587 article or nothing respectively.  In the case of these two special
17588 predicates an additional score rule is superfluous.
17589
17590 Predicates of @code{high} or @code{low} download articles in respect of
17591 their scores in relationship to @code{gnus-agent-high-score} and
17592 @code{gnus-agent-low-score} as described below.
17593
17594 To gain even finer control of what is to be regarded eligible for
17595 download a predicate can consist of a number of predicates with logical
17596 operators sprinkled in between.
17597
17598 Perhaps some examples are in order.
17599
17600 Here's a simple predicate.  (It's the default predicate, in fact, used
17601 for all groups that don't belong to any other category.)
17602
17603 @lisp
17604 short
17605 @end lisp
17606
17607 Quite simple, eh?  This predicate is true if and only if the article is
17608 short (for some value of ``short'').
17609
17610 Here's a more complex predicate:
17611
17612 @lisp
17613 (or high
17614     (and
17615      (not low)
17616      (not long)))
17617 @end lisp
17618
17619 This means that an article should be downloaded if it has a high score,
17620 or if the score is not low and the article is not long.  You get the
17621 drift.
17622
17623 The available logical operators are @code{or}, @code{and} and
17624 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17625 @samp{|}, @code{&} and @code{!} instead.)
17626
17627 The following predicates are pre-defined, but if none of these fit what
17628 you want to do, you can write your own.
17629
17630 When evaluating each of these predicates, the named constant will be
17631 bound to the value determined by calling
17632 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17633 example, gnus-agent-short-article will be bound to
17634 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17635 means that you can specify a predicate in your category then tune that
17636 predicate to individual groups.
17637
17638 @table @code
17639 @item short
17640 True iff the article is shorter than @code{gnus-agent-short-article}
17641 lines; default 100.
17642
17643 @item long
17644 True iff the article is longer than @code{gnus-agent-long-article}
17645 lines; default 200.
17646
17647 @item low
17648 True iff the article has a download score less than
17649 @code{gnus-agent-low-score}; default 0.
17650
17651 @item high
17652 True iff the article has a download score greater than
17653 @code{gnus-agent-high-score}; default 0.
17654
17655 @item spam
17656 True iff the Gnus Agent guesses that the article is spam.  The
17657 heuristics may change over time, but at present it just computes a
17658 checksum and sees whether articles match.
17659
17660 @item true
17661 Always true.
17662
17663 @item false
17664 Always false.
17665 @end table
17666
17667 If you want to create your own predicate function, here's what you have
17668 to know:  The functions are called with no parameters, but the
17669 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17670 useful values.
17671
17672 For example, you could decide that you don't want to download articles
17673 that were posted more than a certain number of days ago (e.g. posted
17674 more than @code{gnus-agent-expire-days} ago) you might write a function
17675 something along the lines of the following:
17676
17677 @lisp
17678 (defun my-article-old-p ()
17679   "Say whether an article is old."
17680   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17681      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17682 @end lisp
17683
17684 with the predicate then defined as:
17685
17686 @lisp
17687 (not my-article-old-p)
17688 @end lisp
17689
17690 or you could append your predicate to the predefined
17691 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17692 wherever.
17693
17694 @lisp
17695 (require 'gnus-agent)
17696 (setq  gnus-category-predicate-alist
17697   (append gnus-category-predicate-alist
17698          '((old . my-article-old-p))))
17699 @end lisp
17700
17701 and simply specify your predicate as:
17702
17703 @lisp
17704 (not old)
17705 @end lisp
17706
17707 If/when using something like the above, be aware that there are many
17708 misconfigured systems/mailers out there and so an article's date is not
17709 always a reliable indication of when it was posted.  Hell, some people
17710 just don't give a damn.
17711
17712 The above predicates apply to @emph{all} the groups which belong to the
17713 category.  However, if you wish to have a specific predicate for an
17714 individual group within a category, or you're just too lazy to set up a
17715 new category, you can enter a group's individual predicate in its group
17716 parameters like so:
17717
17718 @lisp
17719 (agent-predicate . short)
17720 @end lisp
17721
17722 This is the group/topic parameter equivalent of the agent category default.
17723 Note that when specifying a single word predicate like this, the
17724 @code{agent-predicate} specification must be in dotted pair notation.
17725
17726 The equivalent of the longer example from above would be:
17727
17728 @lisp
17729 (agent-predicate or high (and (not low) (not long)))
17730 @end lisp
17731
17732 The outer parenthesis required in the category specification are not
17733 entered here as, not being in dotted pair notation, the value of the
17734 predicate is assumed to be a list.
17735
17736
17737 Now, the syntax of the download score is the same as the syntax of
17738 normal score files, except that all elements that require actually
17739 seeing the article itself are verboten.  This means that only the
17740 following headers can be scored on: @code{Subject}, @code{From},
17741 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17742 @code{Lines}, and @code{Xref}.
17743
17744 As with predicates, the specification of the @code{download score rule}
17745 to use in respect of a group can be in either the category definition if
17746 it's to be applicable to all groups in therein, or a group's parameters
17747 if it's to be specific to that group.
17748
17749 In both of these places the @code{download score rule} can take one of
17750 three forms:
17751
17752 @enumerate
17753 @item
17754 Score rule
17755
17756 This has the same syntax as a normal Gnus score file except only a
17757 subset of scoring keywords are available as mentioned above.
17758
17759 example:
17760
17761 @itemize @bullet
17762 @item
17763 Category specification
17764
17765 @lisp
17766 (("from"
17767        ("Lars Ingebrigtsen" 1000000 nil s))
17768 ("lines"
17769        (500 -100 nil <)))
17770 @end lisp
17771
17772 @item
17773 Group/Topic Parameter specification
17774
17775 @lisp
17776 (agent-score ("from"
17777                    ("Lars Ingebrigtsen" 1000000 nil s))
17778              ("lines"
17779                    (500 -100 nil <)))
17780 @end lisp
17781
17782 Again, note the omission of the outermost parenthesis here.
17783 @end itemize
17784
17785 @item
17786 Agent score file
17787
17788 These score files must @emph{only} contain the permitted scoring
17789 keywords stated above.
17790
17791 example:
17792
17793 @itemize @bullet
17794 @item
17795 Category specification
17796
17797 @lisp
17798 ("~/News/agent.SCORE")
17799 @end lisp
17800
17801 or perhaps
17802
17803 @lisp
17804 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17805 @end lisp
17806
17807 @item
17808 Group Parameter specification
17809
17810 @lisp
17811 (agent-score "~/News/agent.SCORE")
17812 @end lisp
17813
17814 Additional score files can be specified as above.  Need I say anything
17815 about parenthesis?
17816 @end itemize
17817
17818 @item
17819 Use @code{normal} score files
17820
17821 If you don't want to maintain two sets of scoring rules for a group, and
17822 your desired @code{downloading} criteria for a group are the same as your
17823 @code{reading} criteria then you can tell the agent to refer to your
17824 @code{normal} score files when deciding what to download.
17825
17826 These directives in either the category definition or a group's
17827 parameters will cause the agent to read in all the applicable score
17828 files for a group, @emph{filtering out} those sections that do not
17829 relate to one of the permitted subset of scoring keywords.
17830
17831 @itemize @bullet
17832 @item
17833 Category Specification
17834
17835 @lisp
17836 file
17837 @end lisp
17838
17839 @item
17840 Group Parameter specification
17841
17842 @lisp
17843 (agent-score . file)
17844 @end lisp
17845 @end itemize
17846 @end enumerate
17847
17848 @node Category Buffer
17849 @subsubsection Category Buffer
17850
17851 You'd normally do all category maintenance from the category buffer.
17852 When you enter it for the first time (with the @kbd{J c} command from
17853 the group buffer), you'll only see the @code{default} category.
17854
17855 The following commands are available in this buffer:
17856
17857 @table @kbd
17858 @item q
17859 @kindex q (Category)
17860 @findex gnus-category-exit
17861 Return to the group buffer (@code{gnus-category-exit}).
17862
17863 @item e
17864 @kindex e (Category)
17865 @findex gnus-category-customize-category
17866 Use a customization buffer to set all of the selected category's
17867 parameters at one time (@code{gnus-category-customize-category}).
17868
17869 @item k
17870 @kindex k (Category)
17871 @findex gnus-category-kill
17872 Kill the current category (@code{gnus-category-kill}).
17873
17874 @item c
17875 @kindex c (Category)
17876 @findex gnus-category-copy
17877 Copy the current category (@code{gnus-category-copy}).
17878
17879 @item a
17880 @kindex a (Category)
17881 @findex gnus-category-add
17882 Add a new category (@code{gnus-category-add}).
17883
17884 @item p
17885 @kindex p (Category)
17886 @findex gnus-category-edit-predicate
17887 Edit the predicate of the current category
17888 (@code{gnus-category-edit-predicate}).
17889
17890 @item g
17891 @kindex g (Category)
17892 @findex gnus-category-edit-groups
17893 Edit the list of groups belonging to the current category
17894 (@code{gnus-category-edit-groups}).
17895
17896 @item s
17897 @kindex s (Category)
17898 @findex gnus-category-edit-score
17899 Edit the download score rule of the current category
17900 (@code{gnus-category-edit-score}).
17901
17902 @item l
17903 @kindex l (Category)
17904 @findex gnus-category-list
17905 List all the categories (@code{gnus-category-list}).
17906 @end table
17907
17908
17909 @node Category Variables
17910 @subsubsection Category Variables
17911
17912 @table @code
17913 @item gnus-category-mode-hook
17914 @vindex gnus-category-mode-hook
17915 Hook run in category buffers.
17916
17917 @item gnus-category-line-format
17918 @vindex gnus-category-line-format
17919 Format of the lines in the category buffer (@pxref{Formatting
17920 Variables}).  Valid elements are:
17921
17922 @table @samp
17923 @item c
17924 The name of the category.
17925
17926 @item g
17927 The number of groups in the category.
17928 @end table
17929
17930 @item gnus-category-mode-line-format
17931 @vindex gnus-category-mode-line-format
17932 Format of the category mode line (@pxref{Mode Line Formatting}).
17933
17934 @item gnus-agent-short-article
17935 @vindex gnus-agent-short-article
17936 Articles that have fewer lines than this are short.  Default 100.
17937
17938 @item gnus-agent-long-article
17939 @vindex gnus-agent-long-article
17940 Articles that have more lines than this are long.  Default 200.
17941
17942 @item gnus-agent-low-score
17943 @vindex gnus-agent-low-score
17944 Articles that have a score lower than this have a low score.  Default
17945 0.
17946
17947 @item gnus-agent-high-score
17948 @vindex gnus-agent-high-score
17949 Articles that have a score higher than this have a high score.  Default
17950 0.
17951
17952 @item gnus-agent-expire-days
17953 @vindex gnus-agent-expire-days
17954 The number of days that a @samp{read} article must stay in the agent's
17955 local disk before becoming eligible for expiration (While the name is
17956 the same, this doesn't mean expiring the article on the server.  It
17957 just means deleting the local copy of the article).  What is also
17958 important to understand is that the counter starts with the time the
17959 article was written to the local disk and not the time the article was
17960 read.
17961 Default 7.
17962
17963 @item gnus-agent-enable-expiration
17964 @vindex gnus-agent-enable-expiration
17965 Determines whether articles in a group are, by default, expired or
17966 retained indefinitely.  The default is @code{ENABLE} which means that
17967 you'll have to disable expiration when desired.  On the other hand,
17968 you could set this to @code{DISABLE}.  In that case, you would then
17969 have to enable expiration in selected groups.
17970
17971 @end table
17972
17973
17974 @node Agent Commands
17975 @subsection Agent Commands
17976 @findex gnus-agent-toggle-plugged
17977 @kindex J j (Agent)
17978
17979 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17980 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17981 toggles the plugged/unplugged state of the Gnus Agent.
17982
17983
17984 @menu
17985 * Group Agent Commands::        Configure groups and fetch their contents.
17986 * Summary Agent Commands::      Manually select then fetch specific articles.
17987 * Server Agent Commands::       Select the servers that are supported by the agent.
17988 @end menu
17989
17990
17991
17992
17993 @node Group Agent Commands
17994 @subsubsection Group Agent Commands
17995
17996 @table @kbd
17997 @item J u
17998 @kindex J u (Agent Group)
17999 @findex gnus-agent-fetch-groups
18000 Fetch all eligible articles in the current group
18001 (@code{gnus-agent-fetch-groups}).
18002
18003 @item J c
18004 @kindex J c (Agent Group)
18005 @findex gnus-enter-category-buffer
18006 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
18007
18008 @item J s
18009 @kindex J s (Agent Group)
18010 @findex gnus-agent-fetch-session
18011 Fetch all eligible articles in all groups
18012 (@code{gnus-agent-fetch-session}).
18013
18014 @item J S
18015 @kindex J S (Agent Group)
18016 @findex gnus-group-send-queue
18017 Send all sendable messages in the queue group
18018 (@code{gnus-group-send-queue}).  @xref{Drafts}.
18019
18020 @item J a
18021 @kindex J a (Agent Group)
18022 @findex gnus-agent-add-group
18023 Add the current group to an Agent category
18024 (@code{gnus-agent-add-group}).  This command understands the
18025 process/prefix convention (@pxref{Process/Prefix}).
18026
18027 @item J r
18028 @kindex J r (Agent Group)
18029 @findex gnus-agent-remove-group
18030 Remove the current group from its category, if any
18031 (@code{gnus-agent-remove-group}).  This command understands the
18032 process/prefix convention (@pxref{Process/Prefix}).
18033
18034 @item J Y
18035 @kindex J Y (Agent Group)
18036 @findex gnus-agent-synchronize-flags
18037 Synchronize flags changed while unplugged with remote server, if any.
18038
18039
18040 @end table
18041
18042
18043 @node Summary Agent Commands
18044 @subsubsection Summary Agent Commands
18045
18046 @table @kbd
18047 @item J #
18048 @kindex J # (Agent Summary)
18049 @findex gnus-agent-mark-article
18050 Mark the article for downloading (@code{gnus-agent-mark-article}).
18051
18052 @item J M-#
18053 @kindex J M-# (Agent Summary)
18054 @findex gnus-agent-unmark-article
18055 Remove the downloading mark from the article
18056 (@code{gnus-agent-unmark-article}).
18057
18058 @cindex %
18059 @item @@
18060 @kindex @@ (Agent Summary)
18061 @findex gnus-agent-toggle-mark
18062 Toggle whether to download the article
18063 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
18064 default.
18065
18066 @item J c
18067 @kindex J c (Agent Summary)
18068 @findex gnus-agent-catchup
18069 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
18070
18071 @item J S
18072 @kindex J S (Agent Summary)
18073 @findex gnus-agent-fetch-group
18074 Download all eligible (@pxref{Agent Categories}) articles in this group.
18075 (@code{gnus-agent-fetch-group}).
18076
18077 @item J s
18078 @kindex J s (Agent Summary)
18079 @findex gnus-agent-fetch-series
18080 Download all processable articles in this group.
18081 (@code{gnus-agent-fetch-series}).
18082
18083 @item J u
18084 @kindex J u (Agent Summary)
18085 @findex gnus-agent-summary-fetch-group
18086 Download all downloadable articles in the current group
18087 (@code{gnus-agent-summary-fetch-group}).
18088
18089 @end table
18090
18091
18092 @node Server Agent Commands
18093 @subsubsection Server Agent Commands
18094
18095 @table @kbd
18096 @item J a
18097 @kindex J a (Agent Server)
18098 @findex gnus-agent-add-server
18099 Add the current server to the list of servers covered by the Gnus Agent
18100 (@code{gnus-agent-add-server}).
18101
18102 @item J r
18103 @kindex J r (Agent Server)
18104 @findex gnus-agent-remove-server
18105 Remove the current server from the list of servers covered by the Gnus
18106 Agent (@code{gnus-agent-remove-server}).
18107
18108 @end table
18109
18110
18111 @node Agent Visuals
18112 @subsection Agent Visuals
18113
18114 If you open a summary while unplugged and, Gnus knows from the group's
18115 active range that there are more articles than the headers currently
18116 stored in the Agent, you may see some articles whose subject looks
18117 something like @samp{[Undownloaded article #####]}.  These are
18118 placeholders for the missing headers.  Aside from setting a mark,
18119 there is not much that can be done with one of these placeholders.
18120 When Gnus finally gets a chance to fetch the group's headers, the
18121 placeholders will automatically be replaced by the actual headers.
18122 You can configure the summary buffer's maneuvering to skip over the
18123 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18124
18125 While it may be obvious to all, the only headers and articles
18126 available while unplugged are those headers and articles that were
18127 fetched into the Agent while previously plugged.  To put it another
18128 way, "If you forget to fetch something while plugged, you might have a
18129 less than satisfying unplugged session".  For this reason, the Agent
18130 adds two visual effects to your summary buffer.  These effects display
18131 the download status of each article so that you always know which
18132 articles will be available when unplugged.
18133
18134 The first visual effect is the @samp{%O} spec.  If you customize
18135 @code{gnus-summary-line-format} to include this specifier, you will add
18136 a single character field that indicates an article's download status.
18137 Articles that have been fetched into either the Agent or the Cache,
18138 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18139 other articles will display @code{gnus-undownloaded-mark} (defaults to
18140 @samp{-}).  If you open a group that has not been agentized, a space
18141 (@samp{ }) will be displayed.
18142
18143 The second visual effect are the undownloaded faces.  The faces, there
18144 are three indicating the article's score (low, normal, high), seem to
18145 result in a love/hate response from many Gnus users.  The problem is
18146 that the face selection is controlled by a list of condition tests and
18147 face names (See @code{gnus-summary-highlight}).  Each condition is
18148 tested in the order in which it appears in the list so early
18149 conditions have precedence over later conditions.  All of this means
18150 that, if you tick an undownloaded article, the article will continue
18151 to be displayed in the undownloaded face rather than the ticked face.
18152
18153 If you use the Agent as a cache (to avoid downloading the same article
18154 each time you visit it or to minimize your connection time), the
18155 undownloaded face will probably seem like a good idea.  The reason
18156 being that you do all of our work (marking, reading, deleting) with
18157 downloaded articles so the normal faces always appear.
18158
18159 For occasional Agent users, the undownloaded faces may appear to be an
18160 absolutely horrible idea.  The issue being that, since most of their
18161 articles have not been fetched into the Agent, most of the normal
18162 faces will be obscured by the undownloaded faces.  If this is your
18163 situation, you have two choices available.  First, you can completely
18164 disable the undownload faces by customizing
18165 @code{gnus-summary-highlight} to delete the three cons-cells that
18166 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18167 you prefer to take a more fine-grained approach, you may set the
18168 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18169 parameter, like all other agent parameters, may be set on an Agent
18170 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18171 Parameters}), or an individual group (@pxref{Group Parameters}).
18172
18173 @node Agent as Cache
18174 @subsection Agent as Cache
18175
18176 When Gnus is plugged, it is not efficient to download headers or
18177 articles from the server again, if they are already stored in the
18178 Agent.  So, Gnus normally only downloads headers once, and stores them
18179 in the Agent.  These headers are later used when generating the summary
18180 buffer, regardless of whether you are plugged or unplugged.  Articles
18181 are not cached in the Agent by default though (that would potentially
18182 consume lots of disk space), but if you have already downloaded an
18183 article into the Agent, Gnus will not download the article from the
18184 server again but use the locally stored copy instead.
18185
18186 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18187 @pxref{Agent Variables}) to always download headers and articles while
18188 plugged.  Gnus will almost certainly be slower, but it will be kept
18189 synchronized with the server.  That last point probably won't make any
18190 sense if you are using a nntp or nnimap back end.
18191
18192 @node Agent Expiry
18193 @subsection Agent Expiry
18194
18195 @vindex gnus-agent-expire-days
18196 @findex gnus-agent-expire
18197 @kindex M-x gnus-agent-expire
18198 @kindex M-x gnus-agent-expire-group
18199 @findex gnus-agent-expire-group
18200 @cindex agent expiry
18201 @cindex Gnus agent expiry
18202 @cindex expiry
18203
18204 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18205 least it doesn't handle it like other back ends.  Instead, there are
18206 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18207 commands that will expire all read articles that are older than
18208 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18209 that you're running out of space.  Neither are particularly fast or
18210 efficient, and it's not a particularly good idea to interrupt them (with
18211 @kbd{C-g} or anything else) once you've started one of them.
18212
18213 Note that other functions, e.g. @code{gnus-request-expire-articles},
18214 might run @code{gnus-agent-expire} for you to keep the agent
18215 synchronized with the group.
18216
18217 The agent parameter @code{agent-enable-expiration} may be used to
18218 prevent expiration in selected groups.
18219
18220 @vindex gnus-agent-expire-all
18221 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18222 expiration commands will expire all articles---unread, read, ticked
18223 and dormant.  If @code{nil} (which is the default), only read articles
18224 are eligible for expiry, and unread, ticked and dormant articles will
18225 be kept indefinitely.
18226
18227 If you find that some articles eligible for expiry are never expired,
18228 perhaps some Gnus Agent files are corrupted.  There's are special
18229 commands, @code{gnus-agent-regenerate} and
18230 @code{gnus-agent-regenerate-group}, to fix possible problems.
18231
18232 @node Agent Regeneration
18233 @subsection Agent Regeneration
18234
18235 @cindex agent regeneration
18236 @cindex Gnus agent regeneration
18237 @cindex regeneration
18238
18239 The local data structures used by @code{nnagent} may become corrupted
18240 due to certain exceptional conditions.  When this happens,
18241 @code{nnagent} functionality may degrade or even fail.  The solution
18242 to this problem is to repair the local data structures by removing all
18243 internal inconsistencies.
18244
18245 For example, if your connection to your server is lost while
18246 downloaded articles into the agent, the local data structures will not
18247 know about articles successfully downloaded prior to the connection
18248 failure.  Running @code{gnus-agent-regenerate} or
18249 @code{gnus-agent-regenerate-group} will update the data structures
18250 such that you don't need to download these articles a second time.
18251
18252 @findex gnus-agent-regenerate
18253 @kindex M-x gnus-agent-regenerate
18254 The command @code{gnus-agent-regenerate} will perform
18255 @code{gnus-agent-regenerate-group} on every agentized group.  While
18256 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18257 recommended that you first close all summary buffers.
18258
18259 @findex gnus-agent-regenerate-group
18260 @kindex M-x gnus-agent-regenerate-group
18261 The command @code{gnus-agent-regenerate-group} uses the local copies
18262 of individual articles to repair the local @acronym{NOV}(header) database.  It
18263 then updates the internal data structures that document which articles
18264 are stored locally.  An optional argument will mark articles in the
18265 agent as unread.
18266
18267 @node Agent and IMAP
18268 @subsection Agent and IMAP
18269
18270 The Agent works with any Gnus back end, including nnimap.  However,
18271 since there are some conceptual differences between @acronym{NNTP} and
18272 @acronym{IMAP}, this section (should) provide you with some information to
18273 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18274
18275 The first thing to keep in mind is that all flags (read, ticked, etc)
18276 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18277 case for nntp.  Thus Gnus need to remember flag changes when
18278 disconnected, and synchronize these flags when you plug back in.
18279
18280 Gnus keeps track of flag changes when reading nnimap groups under the
18281 Agent.  When you plug back in, Gnus will check if you have any changed
18282 any flags and ask if you wish to synchronize these with the server.
18283 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18284
18285 @vindex gnus-agent-synchronize-flags
18286 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18287 never automatically synchronize flags.  If it is @code{ask}, which is
18288 the default, the Agent will check if you made any changes and if so
18289 ask if you wish to synchronize these when you re-connect.  If it has
18290 any other value, all flags will be synchronized automatically.
18291
18292 If you do not wish to synchronize flags automatically when you
18293 re-connect, you can do it manually with the
18294 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18295 in the group buffer.
18296
18297 Some things are currently not implemented in the Agent that you'd might
18298 expect from a disconnected @acronym{IMAP} client, including:
18299
18300 @itemize @bullet
18301
18302 @item
18303 Copying/moving articles into nnimap groups when unplugged.
18304
18305 @item
18306 Creating/deleting nnimap groups when unplugged.
18307
18308 @end itemize
18309
18310 Technical note: the synchronization algorithm does not work by ``pushing''
18311 all local flags to the server, but rather incrementally update the
18312 server view of flags by changing only those flags that were changed by
18313 the user.  Thus, if you set one flag on an article, quit the group and
18314 re-select the group and remove the flag; the flag will be set and
18315 removed from the server when you ``synchronize''.  The queued flag
18316 operations can be found in the per-server @code{flags} file in the Agent
18317 directory.  It's emptied when you synchronize flags.
18318
18319
18320 @node Outgoing Messages
18321 @subsection Outgoing Messages
18322
18323 When Gnus is unplugged, all outgoing messages (both mail and news) are
18324 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18325 them there after posting, and edit them at will.
18326
18327 When Gnus is plugged again, you can send the messages either from the
18328 draft group with the special commands available there, or you can use
18329 the @kbd{J S} command in the group buffer to send all the sendable
18330 messages in the draft group.
18331
18332
18333
18334 @node Agent Variables
18335 @subsection Agent Variables
18336
18337 @table @code
18338 @item gnus-agent-directory
18339 @vindex gnus-agent-directory
18340 Where the Gnus Agent will store its files.  The default is
18341 @file{~/News/agent/}.
18342
18343 @item gnus-agent-handle-level
18344 @vindex gnus-agent-handle-level
18345 Groups on levels (@pxref{Group Levels}) higher than this variable will
18346 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18347 which means that only subscribed group will be considered by the Agent
18348 by default.
18349
18350 @item gnus-agent-plugged-hook
18351 @vindex gnus-agent-plugged-hook
18352 Hook run when connecting to the network.
18353
18354 @item gnus-agent-unplugged-hook
18355 @vindex gnus-agent-unplugged-hook
18356 Hook run when disconnecting from the network.
18357
18358 @item gnus-agent-fetched-hook
18359 @vindex gnus-agent-fetched-hook
18360 Hook run when finished fetching articles.
18361
18362 @item gnus-agent-cache
18363 @vindex gnus-agent-cache
18364 Variable to control whether use the locally stored @acronym{NOV} and
18365 articles when plugged, e.g. essentially using the Agent as a cache.
18366 The default is non-@code{nil}, which means to use the Agent as a cache.
18367
18368 @item gnus-agent-go-online
18369 @vindex gnus-agent-go-online
18370 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18371 automatically switch offline servers into online status.  If it is
18372 @code{ask}, the default, the Agent will ask if you wish to switch
18373 offline servers into online status when you re-connect.  If it has any
18374 other value, all offline servers will be automatically switched into
18375 online status.
18376
18377 @item gnus-agent-mark-unread-after-downloaded
18378 @vindex gnus-agent-mark-unread-after-downloaded
18379 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18380 mark articles as unread after downloading.  This is usually a safe
18381 thing to do as the newly downloaded article has obviously not been
18382 read.  The default is t.
18383
18384 @item gnus-agent-consider-all-articles
18385 @vindex gnus-agent-consider-all-articles
18386 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18387 agent will fetch all missing headers.  When @code{nil}, the agent will
18388 fetch only new headers.  The default is @code{nil}.
18389
18390 @item gnus-agent-max-fetch-size
18391 @vindex gnus-agent-max-fetch-size
18392 The agent fetches articles into a temporary buffer prior to parsing
18393 them into individual files.  To avoid exceeding the max. buffer size,
18394 the agent alternates between fetching and parsing until all articles
18395 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18396 limit to control how often the cycling occurs.  A large value improves
18397 performance.  A small value minimizes the time lost should the
18398 connection be lost while fetching (You may need to run
18399 @code{gnus-agent-regenerate-group} to update the group's state.
18400 However, all articles parsed prior to loosing the connection will be
18401 available while unplugged).  The default is 10M so it is unusual to
18402 see any cycling.
18403
18404 @item gnus-server-unopen-status
18405 @vindex gnus-server-unopen-status
18406 Perhaps not an Agent variable, but closely related to the Agent, this
18407 variable says what will happen if Gnus cannot open a server.  If the
18408 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18409 whether to deny the server or whether to unplug the agent.  If the
18410 Agent is disabled, Gnus always simply deny the server.  Other choices
18411 for this variable include @code{denied} and @code{offline} the latter
18412 is only valid if the Agent is used.
18413
18414 @item gnus-auto-goto-ignores
18415 @vindex gnus-auto-goto-ignores
18416 Another variable that isn't an Agent variable, yet so closely related
18417 that most will look for it here, this variable tells the summary
18418 buffer how to maneuver around undownloaded (only headers stored in the
18419 agent) and unfetched (neither article nor headers stored) articles.
18420
18421 The legal values are @code{nil} (maneuver to any article),
18422 @code{undownloaded} (maneuvering while unplugged ignores articles that
18423 have not been fetched), @code{always-undownloaded} (maneuvering always
18424 ignores articles that have not been fetched), @code{unfetched}
18425 (maneuvering ignores articles whose headers have not been fetched).
18426
18427 @end table
18428
18429
18430 @node Example Setup
18431 @subsection Example Setup
18432
18433 If you don't want to read this manual, and you have a fairly standard
18434 setup, you may be able to use something like the following as your
18435 @file{~/.gnus.el} file to get started.
18436
18437 @lisp
18438 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18439 ;;; @r{from your ISP's server.}
18440 (setq gnus-select-method '(nntp "news.your-isp.com"))
18441
18442 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18443 ;;; @r{your ISP's @acronym{POP} server.}
18444 (setq mail-sources '((pop :server "pop.your-isp.com")))
18445
18446 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18447 (setq gnus-secondary-select-methods '((nnml "")))
18448
18449 ;;; @r{Make Gnus into an offline newsreader.}
18450 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18451 ;;; (setq gnus-agent t) ; @r{Now the default.}
18452 @end lisp
18453
18454 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18455 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18456 gnus}.
18457
18458 If this is the first time you've run Gnus, you will be subscribed
18459 automatically to a few default newsgroups.  You'll probably want to
18460 subscribe to more groups, and to do that, you have to query the
18461 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18462 command.  This usually takes quite a while, but you only have to do it
18463 once.
18464
18465 After reading and parsing a while, you'll be presented with a list of
18466 groups.  Subscribe to the ones you want to read with the @kbd{u}
18467 command.  @kbd{l} to make all the killed groups disappear after you've
18468 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18469 back all the killed groups.)
18470
18471 You can now read the groups at once, or you can download the articles
18472 with the @kbd{J s} command.  And then read the rest of this manual to
18473 find out which of the other gazillion things you want to customize.
18474
18475
18476 @node Batching Agents
18477 @subsection Batching Agents
18478 @findex gnus-agent-batch
18479
18480 Having the Gnus Agent fetch articles (and post whatever messages you've
18481 written) is quite easy once you've gotten things set up properly.  The
18482 following shell script will do everything that is necessary:
18483
18484 You can run a complete batch command from the command line with the
18485 following incantation:
18486
18487 @example
18488 #!/bin/sh
18489 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18490 @end example
18491
18492
18493 @node Agent Caveats
18494 @subsection Agent Caveats
18495
18496 The Gnus Agent doesn't seem to work like most other offline
18497 newsreaders.  Here are some common questions that some imaginary people
18498 may ask:
18499
18500 @table @dfn
18501 @item If I read an article while plugged, do they get entered into the Agent?
18502
18503 @strong{No}.  If you want this behaviour, add
18504 @code{gnus-agent-fetch-selected-article} to
18505 @code{gnus-select-article-hook}.
18506
18507 @item If I read an article while plugged, and the article already exists in
18508 the Agent, will it get downloaded once more?
18509
18510 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18511
18512 @end table
18513
18514 In short, when Gnus is unplugged, it only looks into the locally stored
18515 articles; when it's plugged, it talks to your ISP and may also use the
18516 locally stored articles.
18517
18518
18519 @node Scoring
18520 @chapter Scoring
18521 @cindex scoring
18522
18523 Other people use @dfn{kill files}, but we here at Gnus Towers like
18524 scoring better than killing, so we'd rather switch than fight.  They do
18525 something completely different as well, so sit up straight and pay
18526 attention!
18527
18528 @vindex gnus-summary-mark-below
18529 All articles have a default score (@code{gnus-summary-default-score}),
18530 which is 0 by default.  This score may be raised or lowered either
18531 interactively or by score files.  Articles that have a score lower than
18532 @code{gnus-summary-mark-below} are marked as read.
18533
18534 Gnus will read any @dfn{score files} that apply to the current group
18535 before generating the summary buffer.
18536
18537 There are several commands in the summary buffer that insert score
18538 entries based on the current article.  You can, for instance, ask Gnus to
18539 lower or increase the score of all articles with a certain subject.
18540
18541 There are two sorts of scoring entries: Permanent and temporary.
18542 Temporary score entries are self-expiring entries.  Any entries that are
18543 temporary and have not been used for, say, a week, will be removed
18544 silently to help keep the sizes of the score files down.
18545
18546 @menu
18547 * Summary Score Commands::      Adding score entries for the current group.
18548 * Group Score Commands::        General score commands.
18549 * Score Variables::             Customize your scoring.  (My, what terminology).
18550 * Score File Format::           What a score file may contain.
18551 * Score File Editing::          You can edit score files by hand as well.
18552 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18553 * Home Score File::             How to say where new score entries are to go.
18554 * Followups To Yourself::       Having Gnus notice when people answer you.
18555 * Scoring On Other Headers::    Scoring on non-standard headers.
18556 * Scoring Tips::                How to score effectively.
18557 * Reverse Scoring::             That problem child of old is not problem.
18558 * Global Score Files::          Earth-spanning, ear-splitting score files.
18559 * Kill Files::                  They are still here, but they can be ignored.
18560 * Converting Kill Files::       Translating kill files to score files.
18561 * GroupLens::                   Getting predictions on what you like to read.
18562 * Advanced Scoring::            Using logical expressions to build score rules.
18563 * Score Decays::                It can be useful to let scores wither away.
18564 @end menu
18565
18566
18567 @node Summary Score Commands
18568 @section Summary Score Commands
18569 @cindex score commands
18570
18571 The score commands that alter score entries do not actually modify real
18572 score files.  That would be too inefficient.  Gnus maintains a cache of
18573 previously loaded score files, one of which is considered the
18574 @dfn{current score file alist}.  The score commands simply insert
18575 entries into this list, and upon group exit, this list is saved.
18576
18577 The current score file is by default the group's local score file, even
18578 if no such score file actually exists.  To insert score commands into
18579 some other score file (e.g. @file{all.SCORE}), you must first make this
18580 score file the current one.
18581
18582 General score commands that don't actually change the score file:
18583
18584 @table @kbd
18585
18586 @item V s
18587 @kindex V s (Summary)
18588 @findex gnus-summary-set-score
18589 Set the score of the current article (@code{gnus-summary-set-score}).
18590
18591 @item V S
18592 @kindex V S (Summary)
18593 @findex gnus-summary-current-score
18594 Display the score of the current article
18595 (@code{gnus-summary-current-score}).
18596
18597 @item V t
18598 @kindex V t (Summary)
18599 @findex gnus-score-find-trace
18600 Display all score rules that have been used on the current article
18601 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18602 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18603 When point is on a string within the match element, @kbd{e} will try to
18604 bring you to this string in the score file.
18605
18606 @item V w
18607 @kindex V w (Summary)
18608 @findex gnus-score-find-favourite-words
18609 List words used in scoring (@code{gnus-score-find-favourite-words}).
18610
18611 @item V R
18612 @kindex V R (Summary)
18613 @findex gnus-summary-rescore
18614 Run the current summary through the scoring process
18615 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18616 around with your score files behind Gnus' back and want to see the
18617 effect you're having.
18618
18619 @item V c
18620 @kindex V c (Summary)
18621 @findex gnus-score-change-score-file
18622 Make a different score file the current
18623 (@code{gnus-score-change-score-file}).
18624
18625 @item V e
18626 @kindex V e (Summary)
18627 @findex gnus-score-edit-current-scores
18628 Edit the current score file (@code{gnus-score-edit-current-scores}).
18629 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18630 File Editing}).
18631
18632 @item V f
18633 @kindex V f (Summary)
18634 @findex gnus-score-edit-file
18635 Edit a score file and make this score file the current one
18636 (@code{gnus-score-edit-file}).
18637
18638 @item V F
18639 @kindex V F (Summary)
18640 @findex gnus-score-flush-cache
18641 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18642 after editing score files.
18643
18644 @item V C
18645 @kindex V C (Summary)
18646 @findex gnus-score-customize
18647 Customize a score file in a visually pleasing manner
18648 (@code{gnus-score-customize}).
18649
18650 @end table
18651
18652 The rest of these commands modify the local score file.
18653
18654 @table @kbd
18655
18656 @item V m
18657 @kindex V m (Summary)
18658 @findex gnus-score-set-mark-below
18659 Prompt for a score, and mark all articles with a score below this as
18660 read (@code{gnus-score-set-mark-below}).
18661
18662 @item V x
18663 @kindex V x (Summary)
18664 @findex gnus-score-set-expunge-below
18665 Prompt for a score, and add a score rule to the current score file to
18666 expunge all articles below this score
18667 (@code{gnus-score-set-expunge-below}).
18668 @end table
18669
18670 The keystrokes for actually making score entries follow a very regular
18671 pattern, so there's no need to list all the commands.  (Hundreds of
18672 them.)
18673
18674 @findex gnus-summary-increase-score
18675 @findex gnus-summary-lower-score
18676
18677 @enumerate
18678 @item
18679 The first key is either @kbd{I} (upper case i) for increasing the score
18680 or @kbd{L} for lowering the score.
18681 @item
18682 The second key says what header you want to score on.  The following
18683 keys are available:
18684 @table @kbd
18685
18686 @item a
18687 Score on the author name.
18688
18689 @item s
18690 Score on the subject line.
18691
18692 @item x
18693 Score on the @code{Xref} line---i.e., the cross-posting line.
18694
18695 @item r
18696 Score on the @code{References} line.
18697
18698 @item d
18699 Score on the date.
18700
18701 @item l
18702 Score on the number of lines.
18703
18704 @item i
18705 Score on the @code{Message-ID} header.
18706
18707 @item e
18708 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18709 if your @acronym{NNTP} server tracks additional header data in overviews.
18710
18711 @item f
18712 Score on followups---this matches the author name, and adds scores to
18713 the followups to this author.  (Using this key leads to the creation of
18714 @file{ADAPT} files.)
18715
18716 @item b
18717 Score on the body.
18718
18719 @item h
18720 Score on the head.
18721
18722 @item t
18723 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18724 files.)
18725
18726 @end table
18727
18728 @item
18729 The third key is the match type.  Which match types are valid depends on
18730 what headers you are scoring on.
18731
18732 @table @code
18733
18734 @item strings
18735
18736 @table @kbd
18737
18738 @item e
18739 Exact matching.
18740
18741 @item s
18742 Substring matching.
18743
18744 @item f
18745 Fuzzy matching (@pxref{Fuzzy Matching}).
18746
18747 @item r
18748 Regexp matching
18749 @end table
18750
18751 @item date
18752 @table @kbd
18753
18754 @item b
18755 Before date.
18756
18757 @item a
18758 After date.
18759
18760 @item n
18761 This date.
18762 @end table
18763
18764 @item number
18765 @table @kbd
18766
18767 @item <
18768 Less than number.
18769
18770 @item =
18771 Equal to number.
18772
18773 @item >
18774 Greater than number.
18775 @end table
18776 @end table
18777
18778 @item
18779 The fourth and usually final key says whether this is a temporary (i.e.,
18780 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18781 or whether it is to be done immediately, without adding to the score
18782 file.
18783 @table @kbd
18784
18785 @item t
18786 Temporary score entry.
18787
18788 @item p
18789 Permanent score entry.
18790
18791 @item i
18792 Immediately scoring.
18793 @end table
18794
18795 @item
18796 If you are scoring on `e' (extra) headers, you will then be prompted for
18797 the header name on which you wish to score.  This must be a header named
18798 in gnus-extra-headers, and @samp{TAB} completion is available.
18799
18800 @end enumerate
18801
18802 So, let's say you want to increase the score on the current author with
18803 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18804 score based on the subject line, using substring matching, and make a
18805 temporary score entry: @kbd{L s s t}.  Pretty easy.
18806
18807 To make things a bit more complicated, there are shortcuts.  If you use
18808 a capital letter on either the second or third keys, Gnus will use
18809 defaults for the remaining one or two keystrokes.  The defaults are
18810 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18811 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18812
18813 These functions take both the numerical prefix and the symbolic prefix
18814 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18815 (or increase) the score of the article.  A symbolic prefix of @code{a}
18816 says to use the @file{all.SCORE} file for the command instead of the
18817 current score file.
18818
18819 @vindex gnus-score-mimic-keymap
18820 The @code{gnus-score-mimic-keymap} says whether these commands will
18821 pretend they are keymaps or not.
18822
18823
18824 @node Group Score Commands
18825 @section Group Score Commands
18826 @cindex group score commands
18827
18828 There aren't many of these as yet, I'm afraid.
18829
18830 @table @kbd
18831
18832 @item W f
18833 @kindex W f (Group)
18834 @findex gnus-score-flush-cache
18835 Gnus maintains a cache of score alists to avoid having to reload them
18836 all the time.  This command will flush the cache
18837 (@code{gnus-score-flush-cache}).
18838
18839 @end table
18840
18841 You can do scoring from the command line by saying something like:
18842
18843 @findex gnus-batch-score
18844 @cindex batch scoring
18845 @example
18846 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18847 @end example
18848
18849
18850 @node Score Variables
18851 @section Score Variables
18852 @cindex score variables
18853
18854 @table @code
18855
18856 @item gnus-use-scoring
18857 @vindex gnus-use-scoring
18858 If @code{nil}, Gnus will not check for score files, and will not, in
18859 general, do any score-related work.  This is @code{t} by default.
18860
18861 @item gnus-kill-killed
18862 @vindex gnus-kill-killed
18863 If this variable is @code{nil}, Gnus will never apply score files to
18864 articles that have already been through the kill process.  While this
18865 may save you lots of time, it also means that if you apply a kill file
18866 to a group, and then change the kill file and want to run it over you
18867 group again to kill more articles, it won't work.  You have to set this
18868 variable to @code{t} to do that.  (It is @code{t} by default.)
18869
18870 @item gnus-kill-files-directory
18871 @vindex gnus-kill-files-directory
18872 All kill and score files will be stored in this directory, which is
18873 initialized from the @env{SAVEDIR} environment variable by default.
18874 This is @file{~/News/} by default.
18875
18876 @item gnus-score-file-suffix
18877 @vindex gnus-score-file-suffix
18878 Suffix to add to the group name to arrive at the score file name
18879 (@file{SCORE} by default.)
18880
18881 @item gnus-score-uncacheable-files
18882 @vindex gnus-score-uncacheable-files
18883 @cindex score cache
18884 All score files are normally cached to avoid excessive re-loading of
18885 score files.  However, if this might make your Emacs grow big and
18886 bloated, so this regexp can be used to weed out score files unlikely
18887 to be needed again.  It would be a bad idea to deny caching of
18888 @file{all.SCORE}, while it might be a good idea to not cache
18889 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18890 variable is @samp{ADAPT$} by default, so no adaptive score files will
18891 be cached.
18892
18893 @item gnus-save-score
18894 @vindex gnus-save-score
18895 If you have really complicated score files, and do lots of batch
18896 scoring, then you might set this variable to @code{t}.  This will make
18897 Gnus save the scores into the @file{.newsrc.eld} file.
18898
18899 If you do not set this to @code{t}, then manual scores (like those set
18900 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18901 across group visits.
18902
18903 @item gnus-score-interactive-default-score
18904 @vindex gnus-score-interactive-default-score
18905 Score used by all the interactive raise/lower commands to raise/lower
18906 score with.  Default is 1000, which may seem excessive, but this is to
18907 ensure that the adaptive scoring scheme gets enough room to play with.
18908 We don't want the small changes from the adaptive scoring to overwrite
18909 manually entered data.
18910
18911 @item gnus-summary-default-score
18912 @vindex gnus-summary-default-score
18913 Default score of an article, which is 0 by default.
18914
18915 @item gnus-summary-expunge-below
18916 @vindex gnus-summary-expunge-below
18917 Don't display the summary lines of articles that have scores lower than
18918 this variable.  This is @code{nil} by default, which means that no
18919 articles will be hidden.  This variable is local to the summary buffers,
18920 and has to be set from @code{gnus-summary-mode-hook}.
18921
18922 @item gnus-score-over-mark
18923 @vindex gnus-score-over-mark
18924 Mark (in the third column) used for articles with a score over the
18925 default.  Default is @samp{+}.
18926
18927 @item gnus-score-below-mark
18928 @vindex gnus-score-below-mark
18929 Mark (in the third column) used for articles with a score below the
18930 default.  Default is @samp{-}.
18931
18932 @item gnus-score-find-score-files-function
18933 @vindex gnus-score-find-score-files-function
18934 Function used to find score files for the current group.  This function
18935 is called with the name of the group as the argument.
18936
18937 Predefined functions available are:
18938 @table @code
18939
18940 @item gnus-score-find-single
18941 @findex gnus-score-find-single
18942 Only apply the group's own score file.
18943
18944 @item gnus-score-find-bnews
18945 @findex gnus-score-find-bnews
18946 Apply all score files that match, using bnews syntax.  This is the
18947 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18948 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18949 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18950 @samp{all} in the score file names are translated into @samp{.*}, and
18951 then a regexp match is done.
18952
18953 This means that if you have some score entries that you want to apply to
18954 all groups, then you put those entries in the @file{all.SCORE} file.
18955
18956 The score files are applied in a semi-random order, although Gnus will
18957 try to apply the more general score files before the more specific score
18958 files.  It does this by looking at the number of elements in the score
18959 file names---discarding the @samp{all} elements.
18960
18961 @item gnus-score-find-hierarchical
18962 @findex gnus-score-find-hierarchical
18963 Apply all score files from all the parent groups.  This means that you
18964 can't have score files like @file{all.SCORE}, but you can have
18965 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18966 server.
18967
18968 @end table
18969 This variable can also be a list of functions.  In that case, all
18970 these functions will be called with the group name as argument, and
18971 all the returned lists of score files will be applied.  These
18972 functions can also return lists of lists of score alists directly.  In
18973 that case, the functions that return these non-file score alists
18974 should probably be placed before the ``real'' score file functions, to
18975 ensure that the last score file returned is the local score file.
18976 Phu.
18977
18978 For example, to do hierarchical scoring but use a non-server-specific
18979 overall score file, you could use the value
18980 @example
18981 (list (lambda (group) ("all.SCORE"))
18982       'gnus-score-find-hierarchical)
18983 @end example
18984
18985 @item gnus-score-expiry-days
18986 @vindex gnus-score-expiry-days
18987 This variable says how many days should pass before an unused score file
18988 entry is expired.  If this variable is @code{nil}, no score file entries
18989 are expired.  It's 7 by default.
18990
18991 @item gnus-update-score-entry-dates
18992 @vindex gnus-update-score-entry-dates
18993 If this variable is non-@code{nil}, temporary score entries that have
18994 been triggered (matched) will have their dates updated.  (This is how Gnus
18995 controls expiry---all non-matched-entries will become too old while
18996 matched entries will stay fresh and young.)  However, if you set this
18997 variable to @code{nil}, even matched entries will grow old and will
18998 have to face that oh-so grim reaper.
18999
19000 @item gnus-score-after-write-file-function
19001 @vindex gnus-score-after-write-file-function
19002 Function called with the name of the score file just written.
19003
19004 @item gnus-score-thread-simplify
19005 @vindex gnus-score-thread-simplify
19006 If this variable is non-@code{nil}, article subjects will be
19007 simplified for subject scoring purposes in the same manner as with
19008 threading---according to the current value of
19009 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
19010 @code{substring} or @code{exact} matching, the match will also be
19011 simplified in this manner.
19012
19013 @end table
19014
19015
19016 @node Score File Format
19017 @section Score File Format
19018 @cindex score file format
19019
19020 A score file is an @code{emacs-lisp} file that normally contains just a
19021 single form.  Casual users are not expected to edit these files;
19022 everything can be changed from the summary buffer.
19023
19024 Anyway, if you'd like to dig into it yourself, here's an example:
19025
19026 @lisp
19027 (("from"
19028   ("Lars Ingebrigtsen" -10000)
19029   ("Per Abrahamsen")
19030   ("larsi\\|lmi" -50000 nil R))
19031  ("subject"
19032   ("Ding is Badd" nil 728373))
19033  ("xref"
19034   ("alt.politics" -1000 728372 s))
19035  ("lines"
19036   (2 -100 nil <))
19037  (mark 0)
19038  (expunge -1000)
19039  (mark-and-expunge -10)
19040  (read-only nil)
19041  (orphan -10)
19042  (adapt t)
19043  (files "/hom/larsi/News/gnu.SCORE")
19044  (exclude-files "all.SCORE")
19045  (local (gnus-newsgroup-auto-expire t)
19046         (gnus-summary-make-false-root empty))
19047  (eval (ding)))
19048 @end lisp
19049
19050 This example demonstrates most score file elements.  @xref{Advanced
19051 Scoring}, for a different approach.
19052
19053 Even though this looks much like Lisp code, nothing here is actually
19054 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
19055 has to be valid syntactically, if not semantically.
19056
19057 Six keys are supported by this alist:
19058
19059 @table @code
19060
19061 @item STRING
19062 If the key is a string, it is the name of the header to perform the
19063 match on.  Scoring can only be performed on these eight headers:
19064 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
19065 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
19066 these headers, there are three strings to tell Gnus to fetch the entire
19067 article and do the match on larger parts of the article: @code{Body}
19068 will perform the match on the body of the article, @code{Head} will
19069 perform the match on the head of the article, and @code{All} will
19070 perform the match on the entire article.  Note that using any of these
19071 last three keys will slow down group entry @emph{considerably}.  The
19072 final ``header'' you can score on is @code{Followup}.  These score
19073 entries will result in new score entries being added for all follow-ups
19074 to articles that matches these score entries.
19075
19076 Following this key is an arbitrary number of score entries, where each
19077 score entry has one to four elements.
19078 @enumerate
19079
19080 @item
19081 The first element is the @dfn{match element}.  On most headers this will
19082 be a string, but on the Lines and Chars headers, this must be an
19083 integer.
19084
19085 @item
19086 If the second element is present, it should be a number---the @dfn{score
19087 element}.  This number should be an integer in the neginf to posinf
19088 interval.  This number is added to the score of the article if the match
19089 is successful.  If this element is not present, the
19090 @code{gnus-score-interactive-default-score} number will be used
19091 instead.  This is 1000 by default.
19092
19093 @item
19094 If the third element is present, it should be a number---the @dfn{date
19095 element}.  This date says when the last time this score entry matched,
19096 which provides a mechanism for expiring the score entries.  It this
19097 element is not present, the score entry is permanent.  The date is
19098 represented by the number of days since December 31, 1 BCE.
19099
19100 @item
19101 If the fourth element is present, it should be a symbol---the @dfn{type
19102 element}.  This element specifies what function should be used to see
19103 whether this score entry matches the article.  What match types that can
19104 be used depends on what header you wish to perform the match on.
19105 @table @dfn
19106
19107 @item From, Subject, References, Xref, Message-ID
19108 For most header types, there are the @code{r} and @code{R} (regexp), as
19109 well as @code{s} and @code{S} (substring) types, and @code{e} and
19110 @code{E} (exact match), and @code{w} (word match) types.  If this
19111 element is not present, Gnus will assume that substring matching should
19112 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19113 that the matches will be done in a case-sensitive manner.  All these
19114 one-letter types are really just abbreviations for the @code{regexp},
19115 @code{string}, @code{exact}, and @code{word} types, which you can use
19116 instead, if you feel like.
19117
19118 @item Extra
19119 Just as for the standard string overview headers, if you are using
19120 gnus-extra-headers, you can score on these headers' values.  In this
19121 case, there is a 5th element in the score entry, being the name of the
19122 header to be scored.  The following entry is useful in your
19123 @file{all.SCORE} file in case of spam attacks from a single origin
19124 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
19125 overviews:
19126
19127 @lisp
19128 ("111.222.333.444" -1000 nil s
19129  "NNTP-Posting-Host")
19130 @end lisp
19131
19132 @item Lines, Chars
19133 These two headers use different match types: @code{<}, @code{>},
19134 @code{=}, @code{>=} and @code{<=}.
19135
19136 These predicates are true if
19137
19138 @example
19139 (PREDICATE HEADER MATCH)
19140 @end example
19141
19142 evaluates to non-@code{nil}.  For instance, the advanced match
19143 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19144 following form:
19145
19146 @lisp
19147 (< header-value 4)
19148 @end lisp
19149
19150 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19151 the match, we get the score added if the article has less than 4 lines.
19152 (It's easy to get confused and think it's the other way around.  But
19153 it's not.  I think.)
19154
19155 When matching on @code{Lines}, be careful because some back ends (like
19156 @code{nndir}) do not generate @code{Lines} header, so every article ends
19157 up being marked as having 0 lines.  This can lead to strange results if
19158 you happen to lower score of the articles with few lines.
19159
19160 @item Date
19161 For the Date header we have three kinda silly match types:
19162 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19163 ever being useful, but, like, it would feel kinda silly not to provide
19164 this function.  Just in case.  You never know.  Better safe than sorry.
19165 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19166 sex on a first date.  (I have been told that at least one person, and I
19167 quote, ``found this function indispensable'', however.)
19168
19169 @cindex ISO8601
19170 @cindex date
19171 A more useful match type is @code{regexp}.  With it, you can match the
19172 date string using a regular expression.  The date is normalized to
19173 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19174 you want to match all articles that have been posted on April 1st in
19175 every year, you could use @samp{....0401.........} as a match string,
19176 for instance.  (Note that the date is kept in its original time zone, so
19177 this will match articles that were posted when it was April 1st where
19178 the article was posted from.  Time zones are such wholesome fun for the
19179 whole family, eh?)
19180
19181 @item Head, Body, All
19182 These three match keys use the same match types as the @code{From} (etc)
19183 header uses.
19184
19185 @item Followup
19186 This match key is somewhat special, in that it will match the
19187 @code{From} header, and affect the score of not only the matching
19188 articles, but also all followups to the matching articles.  This allows
19189 you e.g. increase the score of followups to your own articles, or
19190 decrease the score of followups to the articles of some known
19191 trouble-maker.  Uses the same match types as the @code{From} header
19192 uses.  (Using this match key will lead to creation of @file{ADAPT}
19193 files.)
19194
19195 @item Thread
19196 This match key works along the same lines as the @code{Followup} match
19197 key.  If you say that you want to score on a (sub-)thread started by an
19198 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19199 match.  This will add a new @samp{thread} match for each article that
19200 has @var{x} in its @code{References} header.  (These new @samp{thread}
19201 matches will use the @code{Message-ID}s of these matching articles.)
19202 This will ensure that you can raise/lower the score of an entire thread,
19203 even though some articles in the thread may not have complete
19204 @code{References} headers.  Note that using this may lead to
19205 undeterministic scores of the articles in the thread.  (Using this match
19206 key will lead to creation of @file{ADAPT} files.)
19207 @end table
19208 @end enumerate
19209
19210 @cindex score file atoms
19211 @item mark
19212 The value of this entry should be a number.  Any articles with a score
19213 lower than this number will be marked as read.
19214
19215 @item expunge
19216 The value of this entry should be a number.  Any articles with a score
19217 lower than this number will be removed from the summary buffer.
19218
19219 @item mark-and-expunge
19220 The value of this entry should be a number.  Any articles with a score
19221 lower than this number will be marked as read and removed from the
19222 summary buffer.
19223
19224 @item thread-mark-and-expunge
19225 The value of this entry should be a number.  All articles that belong to
19226 a thread that has a total score below this number will be marked as read
19227 and removed from the summary buffer.  @code{gnus-thread-score-function}
19228 says how to compute the total score for a thread.
19229
19230 @item files
19231 The value of this entry should be any number of file names.  These files
19232 are assumed to be score files as well, and will be loaded the same way
19233 this one was.
19234
19235 @item exclude-files
19236 The clue of this entry should be any number of files.  These files will
19237 not be loaded, even though they would normally be so, for some reason or
19238 other.
19239
19240 @item eval
19241 The value of this entry will be @code{eval}el.  This element will be
19242 ignored when handling global score files.
19243
19244 @item read-only
19245 Read-only score files will not be updated or saved.  Global score files
19246 should feature this atom (@pxref{Global Score Files}).  (Note:
19247 @dfn{Global} here really means @dfn{global}; not your personal
19248 apply-to-all-groups score files.)
19249
19250 @item orphan
19251 The value of this entry should be a number.  Articles that do not have
19252 parents will get this number added to their scores.  Imagine you follow
19253 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19254 will only follow a few of the threads, also want to see any new threads.
19255
19256 You can do this with the following two score file entries:
19257
19258 @example
19259         (orphan -500)
19260         (mark-and-expunge -100)
19261 @end example
19262
19263 When you enter the group the first time, you will only see the new
19264 threads.  You then raise the score of the threads that you find
19265 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19266 rest.  Next time you enter the group, you will see new articles in the
19267 interesting threads, plus any new threads.
19268
19269 I.e.---the orphan score atom is for high-volume groups where a few
19270 interesting threads which can't be found automatically by ordinary
19271 scoring rules exist.
19272
19273 @item adapt
19274 This entry controls the adaptive scoring.  If it is @code{t}, the
19275 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19276 adaptive scoring will be performed on this group.  If it is a list, this
19277 list will be used as the adaptive scoring rules.  If it isn't present,
19278 or is something other than @code{t} or @code{ignore}, the default
19279 adaptive scoring rules will be used.  If you want to use adaptive
19280 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19281 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19282 not want adaptive scoring.  If you only want adaptive scoring in a few
19283 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19284 insert @code{(adapt t)} in the score files of the groups where you want
19285 it.
19286
19287 @item adapt-file
19288 All adaptive score entries will go to the file named by this entry.  It
19289 will also be applied when entering the group.  This atom might be handy
19290 if you want to adapt on several groups at once, using the same adaptive
19291 file for a number of groups.
19292
19293 @item local
19294 @cindex local variables
19295 The value of this entry should be a list of @code{(@var{var}
19296 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19297 current summary buffer, and set to the value specified.  This is a
19298 convenient, if somewhat strange, way of setting variables in some
19299 groups if you don't like hooks much.  Note that the @var{value} won't
19300 be evaluated.
19301 @end table
19302
19303
19304 @node Score File Editing
19305 @section Score File Editing
19306
19307 You normally enter all scoring commands from the summary buffer, but you
19308 might feel the urge to edit them by hand as well, so we've supplied you
19309 with a mode for that.
19310
19311 It's simply a slightly customized @code{emacs-lisp} mode, with these
19312 additional commands:
19313
19314 @table @kbd
19315
19316 @item C-c C-c
19317 @kindex C-c C-c (Score)
19318 @findex gnus-score-edit-done
19319 Save the changes you have made and return to the summary buffer
19320 (@code{gnus-score-edit-done}).
19321
19322 @item C-c C-d
19323 @kindex C-c C-d (Score)
19324 @findex gnus-score-edit-insert-date
19325 Insert the current date in numerical format
19326 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19327 you were wondering.
19328
19329 @item C-c C-p
19330 @kindex C-c C-p (Score)
19331 @findex gnus-score-pretty-print
19332 The adaptive score files are saved in an unformatted fashion.  If you
19333 intend to read one of these files, you want to @dfn{pretty print} it
19334 first.  This command (@code{gnus-score-pretty-print}) does that for
19335 you.
19336
19337 @end table
19338
19339 Type @kbd{M-x gnus-score-mode} to use this mode.
19340
19341 @vindex gnus-score-mode-hook
19342 @code{gnus-score-menu-hook} is run in score mode buffers.
19343
19344 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19345 e} to begin editing score files.
19346
19347
19348 @node Adaptive Scoring
19349 @section Adaptive Scoring
19350 @cindex adaptive scoring
19351
19352 If all this scoring is getting you down, Gnus has a way of making it all
19353 happen automatically---as if by magic.  Or rather, as if by artificial
19354 stupidity, to be precise.
19355
19356 @vindex gnus-use-adaptive-scoring
19357 When you read an article, or mark an article as read, or kill an
19358 article, you leave marks behind.  On exit from the group, Gnus can sniff
19359 these marks and add score elements depending on what marks it finds.
19360 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19361 @code{t} or @code{(line)}.  If you want score adaptively on separate
19362 words appearing in the subjects, you should set this variable to
19363 @code{(word)}.  If you want to use both adaptive methods, set this
19364 variable to @code{(word line)}.
19365
19366 @vindex gnus-default-adaptive-score-alist
19367 To give you complete control over the scoring process, you can customize
19368 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19369 might look something like this:
19370
19371 @lisp
19372 (setq gnus-default-adaptive-score-alist
19373   '((gnus-unread-mark)
19374     (gnus-ticked-mark (from 4))
19375     (gnus-dormant-mark (from 5))
19376     (gnus-del-mark (from -4) (subject -1))
19377     (gnus-read-mark (from 4) (subject 2))
19378     (gnus-expirable-mark (from -1) (subject -1))
19379     (gnus-killed-mark (from -1) (subject -3))
19380     (gnus-kill-file-mark)
19381     (gnus-ancient-mark)
19382     (gnus-low-score-mark)
19383     (gnus-catchup-mark (from -1) (subject -1))))
19384 @end lisp
19385
19386 As you see, each element in this alist has a mark as a key (either a
19387 variable name or a ``real'' mark---a character).  Following this key is
19388 a arbitrary number of header/score pairs.  If there are no header/score
19389 pairs following the key, no adaptive scoring will be done on articles
19390 that have that key as the article mark.  For instance, articles with
19391 @code{gnus-unread-mark} in the example above will not get adaptive score
19392 entries.
19393
19394 Each article can have only one mark, so just a single of these rules
19395 will be applied to each article.
19396
19397 To take @code{gnus-del-mark} as an example---this alist says that all
19398 articles that have that mark (i.e., are marked with @samp{e}) will have a
19399 score entry added to lower based on the @code{From} header by -4, and
19400 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19401
19402 If you have marked 10 articles with the same subject with
19403 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19404 That means that that subject will get a score of ten times -1, which
19405 should be, unless I'm much mistaken, -10.
19406
19407 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19408 the read articles will be marked with the @samp{E} mark.  This'll
19409 probably make adaptive scoring slightly impossible, so auto-expiring and
19410 adaptive scoring doesn't really mix very well.
19411
19412 The headers you can score on are @code{from}, @code{subject},
19413 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19414 @code{chars} and @code{date}.  In addition, you can score on
19415 @code{followup}, which will create an adaptive score entry that matches
19416 on the @code{References} header using the @code{Message-ID} of the
19417 current article, thereby matching the following thread.
19418
19419 If you use this scheme, you should set the score file atom @code{mark}
19420 to something small---like -300, perhaps, to avoid having small random
19421 changes result in articles getting marked as read.
19422
19423 After using adaptive scoring for a week or so, Gnus should start to
19424 become properly trained and enhance the authors you like best, and kill
19425 the authors you like least, without you having to say so explicitly.
19426
19427 You can control what groups the adaptive scoring is to be performed on
19428 by using the score files (@pxref{Score File Format}).  This will also
19429 let you use different rules in different groups.
19430
19431 @vindex gnus-adaptive-file-suffix
19432 The adaptive score entries will be put into a file where the name is the
19433 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19434 is @file{ADAPT}.
19435
19436 @vindex gnus-score-exact-adapt-limit
19437 When doing adaptive scoring, substring or fuzzy matching would probably
19438 give you the best results in most cases.  However, if the header one
19439 matches is short, the possibility for false positives is great, so if
19440 the length of the match is less than
19441 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19442 this variable is @code{nil}, exact matching will always be used to avoid
19443 this problem.
19444
19445 @vindex gnus-default-adaptive-word-score-alist
19446 As mentioned above, you can adapt either on individual words or entire
19447 headers.  If you adapt on words, the
19448 @code{gnus-default-adaptive-word-score-alist} variable says what score
19449 each instance of a word should add given a mark.
19450
19451 @lisp
19452 (setq gnus-default-adaptive-word-score-alist
19453       `((,gnus-read-mark . 30)
19454         (,gnus-catchup-mark . -10)
19455         (,gnus-killed-mark . -20)
19456         (,gnus-del-mark . -15)))
19457 @end lisp
19458
19459 This is the default value.  If you have adaption on words enabled, every
19460 word that appears in subjects of articles marked with
19461 @code{gnus-read-mark} will result in a score rule that increase the
19462 score with 30 points.
19463
19464 @vindex gnus-default-ignored-adaptive-words
19465 @vindex gnus-ignored-adaptive-words
19466 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19467 will be ignored.  If you wish to add more words to be ignored, use the
19468 @code{gnus-ignored-adaptive-words} list instead.
19469
19470 @vindex gnus-adaptive-word-length-limit
19471 Some may feel that short words shouldn't count when doing adaptive
19472 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19473 an integer.  Words shorter than this number will be ignored.  This
19474 variable defaults to @code{nil}.
19475
19476 @vindex gnus-adaptive-word-syntax-table
19477 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19478 syntax table in effect.  It is similar to the standard syntax table, but
19479 it considers numbers to be non-word-constituent characters.
19480
19481 @vindex gnus-adaptive-word-minimum
19482 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19483 word scoring process will never bring down the score of an article to
19484 below this number.  The default is @code{nil}.
19485
19486 @vindex gnus-adaptive-word-no-group-words
19487 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19488 won't adaptively word score any of the words in the group name.  Useful
19489 for groups like @samp{comp.editors.emacs}, where most of the subject
19490 lines contain the word @samp{emacs}.
19491
19492 After using this scheme for a while, it might be nice to write a
19493 @code{gnus-psychoanalyze-user} command to go through the rules and see
19494 what words you like and what words you don't like.  Or perhaps not.
19495
19496 Note that the adaptive word scoring thing is highly experimental and is
19497 likely to change in the future.  Initial impressions seem to indicate
19498 that it's totally useless as it stands.  Some more work (involving more
19499 rigorous statistical methods) will have to be done to make this useful.
19500
19501
19502 @node Home Score File
19503 @section Home Score File
19504
19505 The score file where new score file entries will go is called the
19506 @dfn{home score file}.  This is normally (and by default) the score file
19507 for the group itself.  For instance, the home score file for
19508 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19509
19510 However, this may not be what you want.  It is often convenient to share
19511 a common home score file among many groups---all @samp{emacs} groups
19512 could perhaps use the same home score file.
19513
19514 @vindex gnus-home-score-file
19515 The variable that controls this is @code{gnus-home-score-file}.  It can
19516 be:
19517
19518 @enumerate
19519 @item
19520 A string.  Then this file will be used as the home score file for all
19521 groups.
19522
19523 @item
19524 A function.  The result of this function will be used as the home score
19525 file.  The function will be called with the name of the group as the
19526 parameter.
19527
19528 @item
19529 A list.  The elements in this list can be:
19530
19531 @enumerate
19532 @item
19533 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19534 group name, the @var{file-name} will be used as the home score file.
19535
19536 @item
19537 A function.  If the function returns non-@code{nil}, the result will
19538 be used as the home score file.
19539
19540 @item
19541 A string.  Use the string as the home score file.
19542 @end enumerate
19543
19544 The list will be traversed from the beginning towards the end looking
19545 for matches.
19546
19547 @end enumerate
19548
19549 So, if you want to use just a single score file, you could say:
19550
19551 @lisp
19552 (setq gnus-home-score-file
19553       "my-total-score-file.SCORE")
19554 @end lisp
19555
19556 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19557 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19558
19559 @findex gnus-hierarchial-home-score-file
19560 @lisp
19561 (setq gnus-home-score-file
19562       'gnus-hierarchial-home-score-file)
19563 @end lisp
19564
19565 This is a ready-made function provided for your convenience.
19566 Other functions include
19567
19568 @table @code
19569 @item gnus-current-home-score-file
19570 @findex gnus-current-home-score-file
19571 Return the ``current'' regular score file.  This will make scoring
19572 commands add entry to the ``innermost'' matching score file.
19573
19574 @end table
19575
19576 If you want to have one score file for the @samp{emacs} groups and
19577 another for the @samp{comp} groups, while letting all other groups use
19578 their own home score files:
19579
19580 @lisp
19581 (setq gnus-home-score-file
19582       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19583       '(("\\.emacs" "emacs.SCORE")
19584         ;; @r{All the comp groups in one score file}
19585         ("^comp" "comp.SCORE")))
19586 @end lisp
19587
19588 @vindex gnus-home-adapt-file
19589 @code{gnus-home-adapt-file} works exactly the same way as
19590 @code{gnus-home-score-file}, but says what the home adaptive score file
19591 is instead.  All new adaptive file entries will go into the file
19592 specified by this variable, and the same syntax is allowed.
19593
19594 In addition to using @code{gnus-home-score-file} and
19595 @code{gnus-home-adapt-file}, you can also use group parameters
19596 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19597 Parameters}) to achieve much the same.  Group and topic parameters take
19598 precedence over this variable.
19599
19600
19601 @node Followups To Yourself
19602 @section Followups To Yourself
19603
19604 Gnus offers two commands for picking out the @code{Message-ID} header in
19605 the current buffer.  Gnus will then add a score rule that scores using
19606 this @code{Message-ID} on the @code{References} header of other
19607 articles.  This will, in effect, increase the score of all articles that
19608 respond to the article in the current buffer.  Quite useful if you want
19609 to easily note when people answer what you've said.
19610
19611 @table @code
19612
19613 @item gnus-score-followup-article
19614 @findex gnus-score-followup-article
19615 This will add a score to articles that directly follow up your own
19616 article.
19617
19618 @item gnus-score-followup-thread
19619 @findex gnus-score-followup-thread
19620 This will add a score to all articles that appear in a thread ``below''
19621 your own article.
19622 @end table
19623
19624 @vindex message-sent-hook
19625 These two functions are both primarily meant to be used in hooks like
19626 @code{message-sent-hook}, like this:
19627 @lisp
19628 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19629 @end lisp
19630
19631
19632 If you look closely at your own @code{Message-ID}, you'll notice that
19633 the first two or three characters are always the same.  Here's two of
19634 mine:
19635
19636 @example
19637 <x6u3u47icf.fsf@@eyesore.no>
19638 <x6sp9o7ibw.fsf@@eyesore.no>
19639 @end example
19640
19641 So ``my'' ident on this machine is @samp{x6}.  This can be
19642 exploited---the following rule will raise the score on all followups to
19643 myself:
19644
19645 @lisp
19646 ("references"
19647  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19648   1000 nil r))
19649 @end lisp
19650
19651 Whether it's the first two or first three characters that are ``yours''
19652 is system-dependent.
19653
19654
19655 @node Scoring On Other Headers
19656 @section Scoring On Other Headers
19657 @cindex scoring on other headers
19658
19659 Gnus is quite fast when scoring the ``traditional''
19660 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19661 other headers requires writing a @code{head} scoring rule, which means
19662 that Gnus has to request every single article from the back end to find
19663 matches.  This takes a long time in big groups.
19664
19665 Now, there's not much you can do about this for news groups, but for
19666 mail groups, you have greater control.  In @ref{To From Newsgroups},
19667 it's explained in greater detail what this mechanism does, but here's
19668 a cookbook example for @code{nnml} on how to allow scoring on the
19669 @samp{To} and @samp{Cc} headers.
19670
19671 Put the following in your @file{~/.gnus.el} file.
19672
19673 @lisp
19674 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19675       nnmail-extra-headers gnus-extra-headers)
19676 @end lisp
19677
19678 Restart Gnus and rebuild your @code{nnml} overview files with the
19679 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19680 time if you have much mail.
19681
19682 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19683 so: @kbd{I e s p To RET <your name> RET}.
19684
19685 See?  Simple.
19686
19687
19688 @node Scoring Tips
19689 @section Scoring Tips
19690 @cindex scoring tips
19691
19692 @table @dfn
19693
19694 @item Crossposts
19695 @cindex crossposts
19696 @cindex scoring crossposts
19697 If you want to lower the score of crossposts, the line to match on is
19698 the @code{Xref} header.
19699 @lisp
19700 ("xref" (" talk.politics.misc:" -1000))
19701 @end lisp
19702
19703 @item Multiple crossposts
19704 If you want to lower the score of articles that have been crossposted to
19705 more than, say, 3 groups:
19706 @lisp
19707 ("xref"
19708   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19709    -1000 nil r))
19710 @end lisp
19711
19712 @item Matching on the body
19713 This is generally not a very good idea---it takes a very long time.
19714 Gnus actually has to fetch each individual article from the server.  But
19715 you might want to anyway, I guess.  Even though there are three match
19716 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19717 and stick with it in each score file.  If you use any two, each article
19718 will be fetched @emph{twice}.  If you want to match a bit on the
19719 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19720 the matches.
19721
19722 @item Marking as read
19723 You will probably want to mark articles that have scores below a certain
19724 number as read.  This is most easily achieved by putting the following
19725 in your @file{all.SCORE} file:
19726 @lisp
19727 ((mark -100))
19728 @end lisp
19729 You may also consider doing something similar with @code{expunge}.
19730
19731 @item Negated character classes
19732 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19733 That will match newlines, which might lead to, well, The Unknown.  Say
19734 @code{[^abcd\n]*} instead.
19735 @end table
19736
19737
19738 @node Reverse Scoring
19739 @section Reverse Scoring
19740 @cindex reverse scoring
19741
19742 If you want to keep just articles that have @samp{Sex with Emacs} in the
19743 subject header, and expunge all other articles, you could put something
19744 like this in your score file:
19745
19746 @lisp
19747 (("subject"
19748   ("Sex with Emacs" 2))
19749  (mark 1)
19750  (expunge 1))
19751 @end lisp
19752
19753 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19754 rest as read, and expunge them to boot.
19755
19756
19757 @node Global Score Files
19758 @section Global Score Files
19759 @cindex global score files
19760
19761 Sure, other newsreaders have ``global kill files''.  These are usually
19762 nothing more than a single kill file that applies to all groups, stored
19763 in the user's home directory.  Bah!  Puny, weak newsreaders!
19764
19765 What I'm talking about here are Global Score Files.  Score files from
19766 all over the world, from users everywhere, uniting all nations in one
19767 big, happy score file union!  Ange-score!  New and untested!
19768
19769 @vindex gnus-global-score-files
19770 All you have to do to use other people's score files is to set the
19771 @code{gnus-global-score-files} variable.  One entry for each score file,
19772 or each score file directory.  Gnus will decide by itself what score
19773 files are applicable to which group.
19774
19775 To use the score file
19776 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19777 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19778 say this:
19779
19780 @lisp
19781 (setq gnus-global-score-files
19782       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19783         "/ftp@@ftp.some-where:/pub/score/"))
19784 @end lisp
19785
19786 @findex gnus-score-search-global-directories
19787 @noindent
19788 Simple, eh?  Directory names must end with a @samp{/}.  These
19789 directories are typically scanned only once during each Gnus session.
19790 If you feel the need to manually re-scan the remote directories, you can
19791 use the @code{gnus-score-search-global-directories} command.
19792
19793 Note that, at present, using this option will slow down group entry
19794 somewhat.  (That is---a lot.)
19795
19796 If you want to start maintaining score files for other people to use,
19797 just put your score file up for anonymous ftp and announce it to the
19798 world.  Become a retro-moderator!  Participate in the retro-moderator
19799 wars sure to ensue, where retro-moderators battle it out for the
19800 sympathy of the people, luring them to use their score files on false
19801 premises!  Yay!  The net is saved!
19802
19803 Here are some tips for the would-be retro-moderator, off the top of my
19804 head:
19805
19806 @itemize @bullet
19807
19808 @item
19809 Articles heavily crossposted are probably junk.
19810 @item
19811 To lower a single inappropriate article, lower by @code{Message-ID}.
19812 @item
19813 Particularly brilliant authors can be raised on a permanent basis.
19814 @item
19815 Authors that repeatedly post off-charter for the group can safely be
19816 lowered out of existence.
19817 @item
19818 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19819 articles completely.
19820
19821 @item
19822 Use expiring score entries to keep the size of the file down.  You
19823 should probably have a long expiry period, though, as some sites keep
19824 old articles for a long time.
19825 @end itemize
19826
19827 @dots{} I wonder whether other newsreaders will support global score files
19828 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19829 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19830 holding our breath yet?
19831
19832
19833 @node Kill Files
19834 @section Kill Files
19835 @cindex kill files
19836
19837 Gnus still supports those pesky old kill files.  In fact, the kill file
19838 entries can now be expiring, which is something I wrote before Daniel
19839 Quinlan thought of doing score files, so I've left the code in there.
19840
19841 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19842 than score processing, so it might be a good idea to rewrite your kill
19843 files into score files.
19844
19845 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19846 forms into this file, which means that you can use kill files as some
19847 sort of primitive hook function to be run on group entry, even though
19848 that isn't a very good idea.
19849
19850 Normal kill files look like this:
19851
19852 @lisp
19853 (gnus-kill "From" "Lars Ingebrigtsen")
19854 (gnus-kill "Subject" "ding")
19855 (gnus-expunge "X")
19856 @end lisp
19857
19858 This will mark every article written by me as read, and remove the
19859 marked articles from the summary buffer.  Very useful, you'll agree.
19860
19861 Other programs use a totally different kill file syntax.  If Gnus
19862 encounters what looks like a @code{rn} kill file, it will take a stab at
19863 interpreting it.
19864
19865 Two summary functions for editing a @sc{gnus} kill file:
19866
19867 @table @kbd
19868
19869 @item M-k
19870 @kindex M-k (Summary)
19871 @findex gnus-summary-edit-local-kill
19872 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19873
19874 @item M-K
19875 @kindex M-K (Summary)
19876 @findex gnus-summary-edit-global-kill
19877 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19878 @end table
19879
19880 Two group mode functions for editing the kill files:
19881
19882 @table @kbd
19883
19884 @item M-k
19885 @kindex M-k (Group)
19886 @findex gnus-group-edit-local-kill
19887 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19888
19889 @item M-K
19890 @kindex M-K (Group)
19891 @findex gnus-group-edit-global-kill
19892 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19893 @end table
19894
19895 Kill file variables:
19896
19897 @table @code
19898 @item gnus-kill-file-name
19899 @vindex gnus-kill-file-name
19900 A kill file for the group @samp{soc.motss} is normally called
19901 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19902 this file name is detailed by the @code{gnus-kill-file-name} variable.
19903 The ``global'' kill file (not in the score file sense of ``global'', of
19904 course) is just called @file{KILL}.
19905
19906 @vindex gnus-kill-save-kill-file
19907 @item gnus-kill-save-kill-file
19908 If this variable is non-@code{nil}, Gnus will save the
19909 kill file after processing, which is necessary if you use expiring
19910 kills.
19911
19912 @item gnus-apply-kill-hook
19913 @vindex gnus-apply-kill-hook
19914 @findex gnus-apply-kill-file-unless-scored
19915 @findex gnus-apply-kill-file
19916 A hook called to apply kill files to a group.  It is
19917 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19918 kill file if you have a score file for the same group, you can set this
19919 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19920 kill files to be processed, you should set this variable to @code{nil}.
19921
19922 @item gnus-kill-file-mode-hook
19923 @vindex gnus-kill-file-mode-hook
19924 A hook called in kill-file mode buffers.
19925
19926 @end table
19927
19928
19929 @node Converting Kill Files
19930 @section Converting Kill Files
19931 @cindex kill files
19932 @cindex converting kill files
19933
19934 If you have loads of old kill files, you may want to convert them into
19935 score files.  If they are ``regular'', you can use
19936 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19937 by hand.
19938
19939 The kill to score conversion package isn't included in Gnus by default.
19940 You can fetch it from
19941 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19942
19943 If your old kill files are very complex---if they contain more
19944 non-@code{gnus-kill} forms than not, you'll have to convert them by
19945 hand.  Or just let them be as they are.  Gnus will still use them as
19946 before.
19947
19948
19949 @node GroupLens
19950 @section GroupLens
19951 @cindex GroupLens
19952
19953 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19954 so this section is mostly of historical interest.
19955
19956 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19957 collaborative filtering system that helps you work together with other
19958 people to find the quality news articles out of the huge volume of
19959 news articles generated every day.
19960
19961 To accomplish this the GroupLens system combines your opinions about
19962 articles you have already read with the opinions of others who have done
19963 likewise and gives you a personalized prediction for each unread news
19964 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19965 rate articles, and finds other people that rate articles the same way.
19966 Once it has found some people you agree with it tells you, in the form
19967 of a prediction, what they thought of the article.  You can use this
19968 prediction to help you decide whether or not you want to read the
19969 article.
19970
19971 @menu
19972 * Using GroupLens::             How to make Gnus use GroupLens.
19973 * Rating Articles::             Letting GroupLens know how you rate articles.
19974 * Displaying Predictions::      Displaying predictions given by GroupLens.
19975 * GroupLens Variables::         Customizing GroupLens.
19976 @end menu
19977
19978
19979 @node Using GroupLens
19980 @subsection Using GroupLens
19981
19982 To use GroupLens you must register a pseudonym with your local
19983 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19984 Bureau (BBB)} is the only better bit in town at the moment.
19985
19986 Once you have registered you'll need to set a couple of variables.
19987
19988 @table @code
19989
19990 @item gnus-use-grouplens
19991 @vindex gnus-use-grouplens
19992 Setting this variable to a non-@code{nil} value will make Gnus hook into
19993 all the relevant GroupLens functions.
19994
19995 @item grouplens-pseudonym
19996 @vindex grouplens-pseudonym
19997 This variable should be set to the pseudonym you got when registering
19998 with the Better Bit Bureau.
19999
20000 @item grouplens-newsgroups
20001 @vindex grouplens-newsgroups
20002 A list of groups that you want to get GroupLens predictions for.
20003
20004 @end table
20005
20006 That's the minimum of what you need to get up and running with GroupLens.
20007 Once you've registered, GroupLens will start giving you scores for
20008 articles based on the average of what other people think.  But, to get
20009 the real benefit of GroupLens you need to start rating articles
20010 yourself.  Then the scores GroupLens gives you will be personalized for
20011 you, based on how the people you usually agree with have already rated.
20012
20013
20014 @node Rating Articles
20015 @subsection Rating Articles
20016
20017 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
20018 Where 1 means something like this article is a waste of bandwidth and 5
20019 means that the article was really good.  The basic question to ask
20020 yourself is, ``on a scale from 1 to 5 would I like to see more articles
20021 like this one?''
20022
20023 There are four ways to enter a rating for an article in GroupLens.
20024
20025 @table @kbd
20026
20027 @item r
20028 @kindex r (GroupLens)
20029 @findex bbb-summary-rate-article
20030 This function will prompt you for a rating on a scale of one to five.
20031
20032 @item k
20033 @kindex k (GroupLens)
20034 @findex grouplens-score-thread
20035 This function will prompt you for a rating, and rate all the articles in
20036 the thread.  This is really useful for some of those long running giant
20037 threads in rec.humor.
20038
20039 @end table
20040
20041 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
20042 the score of the article you're reading.
20043
20044 @table @kbd
20045
20046 @item 1-5 n
20047 @kindex n (GroupLens)
20048 @findex grouplens-next-unread-article
20049 Rate the article and go to the next unread article.
20050
20051 @item 1-5 ,
20052 @kindex , (GroupLens)
20053 @findex grouplens-best-unread-article
20054 Rate the article and go to the next unread article with the highest score.
20055
20056 @end table
20057
20058 If you want to give the current article a score of 4 and then go to the
20059 next article, just type @kbd{4 n}.
20060
20061
20062 @node Displaying Predictions
20063 @subsection Displaying Predictions
20064
20065 GroupLens makes a prediction for you about how much you will like a
20066 news article.  The predictions from GroupLens are on a scale from 1 to
20067 5, where 1 is the worst and 5 is the best.  You can use the predictions
20068 from GroupLens in one of three ways controlled by the variable
20069 @code{gnus-grouplens-override-scoring}.
20070
20071 @vindex gnus-grouplens-override-scoring
20072 There are three ways to display predictions in grouplens.  You may
20073 choose to have the GroupLens scores contribute to, or override the
20074 regular Gnus scoring mechanism.  override is the default; however, some
20075 people prefer to see the Gnus scores plus the grouplens scores.  To get
20076 the separate scoring behavior you need to set
20077 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
20078 GroupLens predictions combined with the grouplens scores set it to
20079 @code{'override} and to combine the scores set
20080 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
20081 the combine option you will also want to set the values for
20082 @code{grouplens-prediction-offset} and
20083 @code{grouplens-score-scale-factor}.
20084
20085 @vindex grouplens-prediction-display
20086 In either case, GroupLens gives you a few choices for how you would like
20087 to see your predictions displayed.  The display of predictions is
20088 controlled by the @code{grouplens-prediction-display} variable.
20089
20090 The following are valid values for that variable.
20091
20092 @table @code
20093 @item prediction-spot
20094 The higher the prediction, the further to the right an @samp{*} is
20095 displayed.
20096
20097 @item confidence-interval
20098 A numeric confidence interval.
20099
20100 @item prediction-bar
20101 The higher the prediction, the longer the bar.
20102
20103 @item confidence-bar
20104 Numerical confidence.
20105
20106 @item confidence-spot
20107 The spot gets bigger with more confidence.
20108
20109 @item prediction-num
20110 Plain-old numeric value.
20111
20112 @item confidence-plus-minus
20113 Prediction +/- confidence.
20114
20115 @end table
20116
20117
20118 @node GroupLens Variables
20119 @subsection GroupLens Variables
20120
20121 @table @code
20122
20123 @item gnus-summary-grouplens-line-format
20124 The summary line format used in GroupLens-enhanced summary buffers.  It
20125 accepts the same specs as the normal summary line format (@pxref{Summary
20126 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20127 %s\n}.
20128
20129 @item grouplens-bbb-host
20130 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20131 default.
20132
20133 @item grouplens-bbb-port
20134 Port of the host running the bbbd server.  The default is 9000.
20135
20136 @item grouplens-score-offset
20137 Offset the prediction by this value.  In other words, subtract the
20138 prediction value by this number to arrive at the effective score.  The
20139 default is 0.
20140
20141 @item grouplens-score-scale-factor
20142 This variable allows the user to magnify the effect of GroupLens scores.
20143 The scale factor is applied after the offset.  The default is 1.
20144
20145 @end table
20146
20147
20148 @node Advanced Scoring
20149 @section Advanced Scoring
20150
20151 Scoring on Subjects and From headers is nice enough, but what if you're
20152 really interested in what a person has to say only when she's talking
20153 about a particular subject?  Or what if you really don't want to
20154 read what person A has to say when she's following up to person B, but
20155 want to read what she says when she's following up to person C?
20156
20157 By using advanced scoring rules you may create arbitrarily complex
20158 scoring patterns.
20159
20160 @menu
20161 * Advanced Scoring Syntax::     A definition.
20162 * Advanced Scoring Examples::   What they look like.
20163 * Advanced Scoring Tips::       Getting the most out of it.
20164 @end menu
20165
20166
20167 @node Advanced Scoring Syntax
20168 @subsection Advanced Scoring Syntax
20169
20170 Ordinary scoring rules have a string as the first element in the rule.
20171 Advanced scoring rules have a list as the first element.  The second
20172 element is the score to be applied if the first element evaluated to a
20173 non-@code{nil} value.
20174
20175 These lists may consist of three logical operators, one redirection
20176 operator, and various match operators.
20177
20178 Logical operators:
20179
20180 @table @code
20181 @item &
20182 @itemx and
20183 This logical operator will evaluate each of its arguments until it finds
20184 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20185 evaluate to @code{true} values, then this operator will return
20186 @code{true}.
20187
20188 @item |
20189 @itemx or
20190 This logical operator will evaluate each of its arguments until it finds
20191 one that evaluates to @code{true}.  If no arguments are @code{true},
20192 then this operator will return @code{false}.
20193
20194 @item !
20195 @itemx not
20196 @itemx Â¬
20197 This logical operator only takes a single argument.  It returns the
20198 logical negation of the value of its argument.
20199
20200 @end table
20201
20202 There is an @dfn{indirection operator} that will make its arguments
20203 apply to the ancestors of the current article being scored.  For
20204 instance, @code{1-} will make score rules apply to the parent of the
20205 current article.  @code{2-} will make score rules apply to the
20206 grandparent of the current article.  Alternatively, you can write
20207 @code{^^}, where the number of @code{^}s (carets) says how far back into
20208 the ancestry you want to go.
20209
20210 Finally, we have the match operators.  These are the ones that do the
20211 real work.  Match operators are header name strings followed by a match
20212 and a match type.  A typical match operator looks like @samp{("from"
20213 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20214 simple scoring, and the match types are also the same.
20215
20216
20217 @node Advanced Scoring Examples
20218 @subsection Advanced Scoring Examples
20219
20220 Please note that the following examples are score file rules.  To
20221 make a complete score file from them, surround them with another pair
20222 of parentheses.
20223
20224 Let's say you want to increase the score of articles written by Lars
20225 when he's talking about Gnus:
20226
20227 @example
20228 @group
20229 ((&
20230   ("from" "Lars Ingebrigtsen")
20231   ("subject" "Gnus"))
20232  1000)
20233 @end group
20234 @end example
20235
20236 Quite simple, huh?
20237
20238 When he writes long articles, he sometimes has something nice to say:
20239
20240 @example
20241 ((&
20242   ("from" "Lars Ingebrigtsen")
20243   (|
20244    ("subject" "Gnus")
20245    ("lines" 100 >)))
20246  1000)
20247 @end example
20248
20249 However, when he responds to things written by Reig Eigil Logge, you
20250 really don't want to read what he's written:
20251
20252 @example
20253 ((&
20254   ("from" "Lars Ingebrigtsen")
20255   (1- ("from" "Reig Eigir Logge")))
20256  -100000)
20257 @end example
20258
20259 Everybody that follows up Redmondo when he writes about disappearing
20260 socks should have their scores raised, but only when they talk about
20261 white socks.  However, when Lars talks about socks, it's usually not
20262 very interesting:
20263
20264 @example
20265 ((&
20266   (1-
20267    (&
20268     ("from" "redmondo@@.*no" r)
20269     ("body" "disappearing.*socks" t)))
20270   (! ("from" "Lars Ingebrigtsen"))
20271   ("body" "white.*socks"))
20272  1000)
20273 @end example
20274
20275 The possibilities are endless.
20276
20277
20278 @node Advanced Scoring Tips
20279 @subsection Advanced Scoring Tips
20280
20281 The @code{&} and @code{|} logical operators do short-circuit logic.
20282 That is, they stop processing their arguments when it's clear what the
20283 result of the operation will be.  For instance, if one of the arguments
20284 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20285 the rest of the arguments.  This means that you should put slow matches
20286 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20287 @samp{subject}) first.
20288
20289 The indirection arguments (@code{1-} and so on) will make their
20290 arguments work on previous generations of the thread.  If you say
20291 something like:
20292
20293 @example
20294 ...
20295 (1-
20296  (1-
20297   ("from" "lars")))
20298 ...
20299 @end example
20300
20301 Then that means "score on the from header of the grandparent of the
20302 current article".  An indirection is quite fast, but it's better to say:
20303
20304 @example
20305 (1-
20306  (&
20307   ("from" "Lars")
20308   ("subject" "Gnus")))
20309 @end example
20310
20311 than it is to say:
20312
20313 @example
20314 (&
20315  (1- ("from" "Lars"))
20316  (1- ("subject" "Gnus")))
20317 @end example
20318
20319
20320 @node Score Decays
20321 @section Score Decays
20322 @cindex score decays
20323 @cindex decays
20324
20325 You may find that your scores have a tendency to grow without
20326 bounds, especially if you're using adaptive scoring.  If scores get too
20327 big, they lose all meaning---they simply max out and it's difficult to
20328 use them in any sensible way.
20329
20330 @vindex gnus-decay-scores
20331 @findex gnus-decay-score
20332 @vindex gnus-decay-score-function
20333 Gnus provides a mechanism for decaying scores to help with this problem.
20334 When score files are loaded and @code{gnus-decay-scores} is
20335 non-@code{nil}, Gnus will run the score files through the decaying
20336 mechanism thereby lowering the scores of all non-permanent score rules.
20337 The decay itself if performed by the @code{gnus-decay-score-function}
20338 function, which is @code{gnus-decay-score} by default.  Here's the
20339 definition of that function:
20340
20341 @lisp
20342 (defun gnus-decay-score (score)
20343   "Decay SCORE according to `gnus-score-decay-constant'
20344 and `gnus-score-decay-scale'."
20345   (let ((n (- score
20346               (* (if (< score 0) -1 1)
20347                  (min (abs score)
20348                       (max gnus-score-decay-constant
20349                            (* (abs score)
20350                               gnus-score-decay-scale)))))))
20351     (if (and (featurep 'xemacs)
20352              ;; XEmacs' floor can handle only the floating point
20353              ;; number below the half of the maximum integer.
20354              (> (abs n) (lsh -1 -2)))
20355         (string-to-number
20356          (car (split-string (number-to-string n) "\\.")))
20357       (floor n))))
20358 @end lisp
20359
20360 @vindex gnus-score-decay-scale
20361 @vindex gnus-score-decay-constant
20362 @code{gnus-score-decay-constant} is 3 by default and
20363 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20364
20365 @enumerate
20366 @item
20367 Scores between -3 and 3 will be set to 0 when this function is called.
20368
20369 @item
20370 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20371
20372 @item
20373 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20374 score.
20375 @end enumerate
20376
20377 If you don't like this decay function, write your own.  It is called
20378 with the score to be decayed as its only parameter, and it should return
20379 the new score, which should be an integer.
20380
20381 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20382 four days, Gnus will decay the scores four times, for instance.
20383
20384 @iftex
20385 @iflatex
20386 @chapter Message
20387 @include message.texi
20388 @chapter Emacs MIME
20389 @include emacs-mime.texi
20390 @chapter Sieve
20391 @include sieve.texi
20392 @c @chapter PGG
20393 @c @include pgg.texi
20394 @end iflatex
20395 @end iftex
20396
20397 @node Various
20398 @chapter Various
20399
20400 @menu
20401 * Process/Prefix::              A convention used by many treatment commands.
20402 * Interactive::                 Making Gnus ask you many questions.
20403 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20404 * Formatting Variables::        You can specify what buffers should look like.
20405 * Window Layout::               Configuring the Gnus buffer windows.
20406 * Faces and Fonts::             How to change how faces look.
20407 * Compilation::                 How to speed Gnus up.
20408 * Mode Lines::                  Displaying information in the mode lines.
20409 * Highlighting and Menus::      Making buffers look all nice and cozy.
20410 * Buttons::                     Get tendinitis in ten easy steps!
20411 * Daemons::                     Gnus can do things behind your back.
20412 * NoCeM::                       How to avoid spam and other fatty foods.
20413 * Undo::                        Some actions can be undone.
20414 * Predicate Specifiers::        Specifying predicates.
20415 * Moderation::                  What to do if you're a moderator.
20416 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20417 * Fuzzy Matching::              What's the big fuzz?
20418 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20419 * Various Various::             Things that are really various.
20420 @end menu
20421
20422
20423 @node Process/Prefix
20424 @section Process/Prefix
20425 @cindex process/prefix convention
20426
20427 Many functions, among them functions for moving, decoding and saving
20428 articles, use what is known as the @dfn{Process/Prefix convention}.
20429
20430 This is a method for figuring out what articles the user wants the
20431 command to be performed on.
20432
20433 It goes like this:
20434
20435 If the numeric prefix is N, perform the operation on the next N
20436 articles, starting with the current one.  If the numeric prefix is
20437 negative, perform the operation on the previous N articles, starting
20438 with the current one.
20439
20440 @vindex transient-mark-mode
20441 If @code{transient-mark-mode} in non-@code{nil} and the region is
20442 active, all articles in the region will be worked upon.
20443
20444 If there is no numeric prefix, but some articles are marked with the
20445 process mark, perform the operation on the articles marked with
20446 the process mark.
20447
20448 If there is neither a numeric prefix nor any articles marked with the
20449 process mark, just perform the operation on the current article.
20450
20451 Quite simple, really, but it needs to be made clear so that surprises
20452 are avoided.
20453
20454 Commands that react to the process mark will push the current list of
20455 process marked articles onto a stack and will then clear all process
20456 marked articles.  You can restore the previous configuration with the
20457 @kbd{M P y} command (@pxref{Setting Process Marks}).
20458
20459 @vindex gnus-summary-goto-unread
20460 One thing that seems to shock & horrify lots of people is that, for
20461 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20462 Since each @kbd{d} (which marks the current article as read) by default
20463 goes to the next unread article after marking, this means that @kbd{3 d}
20464 will mark the next three unread articles as read, no matter what the
20465 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20466 @code{nil} for a more straightforward action.
20467
20468 Many commands do not use the process/prefix convention.  All commands
20469 that do explicitly say so in this manual.  To apply the process/prefix
20470 convention to commands that do not use it, you can use the @kbd{M-&}
20471 command.  For instance, to mark all the articles in the group as
20472 expirable, you could say @kbd{M P b M-& E}.
20473
20474
20475 @node Interactive
20476 @section Interactive
20477 @cindex interaction
20478
20479 @table @code
20480
20481 @item gnus-novice-user
20482 @vindex gnus-novice-user
20483 If this variable is non-@code{nil}, you are either a newcomer to the
20484 World of Usenet, or you are very cautious, which is a nice thing to be,
20485 really.  You will be given questions of the type ``Are you sure you want
20486 to do this?'' before doing anything dangerous.  This is @code{t} by
20487 default.
20488
20489 @item gnus-expert-user
20490 @vindex gnus-expert-user
20491 If this variable is non-@code{nil}, you will seldom be asked any
20492 questions by Gnus.  It will simply assume you know what you're doing, no
20493 matter how strange.
20494
20495 @item gnus-interactive-catchup
20496 @vindex gnus-interactive-catchup
20497 Require confirmation before catching up a group if non-@code{nil}.  It
20498 is @code{t} by default.
20499
20500 @item gnus-interactive-exit
20501 @vindex gnus-interactive-exit
20502 Require confirmation before exiting Gnus.  This variable is @code{t} by
20503 default.
20504 @end table
20505
20506
20507 @node Symbolic Prefixes
20508 @section Symbolic Prefixes
20509 @cindex symbolic prefixes
20510
20511 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20512 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20513 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20514 rule of 900 to the current article.
20515
20516 This is all nice and well, but what if you want to give a command some
20517 additional information?  Well, what most commands do is interpret the
20518 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20519 doesn't want a backup file to be created when saving the current buffer,
20520 for instance.  But what if you want to save without making a backup
20521 file, and you want Emacs to flash lights and play a nice tune at the
20522 same time?  You can't, and you're probably perfectly happy that way.
20523
20524 @kindex M-i (Summary)
20525 @findex gnus-symbolic-argument
20526 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20527 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20528 character typed in is the value.  You can stack as many @kbd{M-i}
20529 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20530 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20531 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20532 @code{b}''.  You get the drift.
20533
20534 Typing in symbolic prefixes to commands that don't accept them doesn't
20535 hurt, but it doesn't do any good either.  Currently not many Gnus
20536 functions make use of the symbolic prefix.
20537
20538 If you're interested in how Gnus implements this, @pxref{Extended
20539 Interactive}.
20540
20541
20542 @node Formatting Variables
20543 @section Formatting Variables
20544 @cindex formatting variables
20545
20546 Throughout this manual you've probably noticed lots of variables called
20547 things like @code{gnus-group-line-format} and
20548 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20549 output lines in the various buffers.  There's quite a lot of them.
20550 Fortunately, they all use the same syntax, so there's not that much to
20551 be annoyed by.
20552
20553 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20554 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20555 lots of percentages everywhere.
20556
20557 @menu
20558 * Formatting Basics::           A formatting variable is basically a format string.
20559 * Mode Line Formatting::        Some rules about mode line formatting variables.
20560 * Advanced Formatting::         Modifying output in various ways.
20561 * User-Defined Specs::          Having Gnus call your own functions.
20562 * Formatting Fonts::            Making the formatting look colorful and nice.
20563 * Positioning Point::           Moving point to a position after an operation.
20564 * Tabulation::                  Tabulating your output.
20565 * Wide Characters::             Dealing with wide characters.
20566 @end menu
20567
20568 Currently Gnus uses the following formatting variables:
20569 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20570 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20571 @code{gnus-group-mode-line-format},
20572 @code{gnus-summary-mode-line-format},
20573 @code{gnus-article-mode-line-format},
20574 @code{gnus-server-mode-line-format}, and
20575 @code{gnus-summary-pick-line-format}.
20576
20577 All these format variables can also be arbitrary elisp forms.  In that
20578 case, they will be @code{eval}ed to insert the required lines.
20579
20580 @kindex M-x gnus-update-format
20581 @findex gnus-update-format
20582 Gnus includes a command to help you while creating your own format
20583 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20584 update the spec in question and pop you to a buffer where you can
20585 examine the resulting Lisp code to be run to generate the line.
20586
20587
20588
20589 @node Formatting Basics
20590 @subsection Formatting Basics
20591
20592 Each @samp{%} element will be replaced by some string or other when the
20593 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20594 spec, and pad with spaces to get a 5-character field''.
20595
20596 As with normal C and Emacs Lisp formatting strings, the numerical
20597 modifier between the @samp{%} and the formatting type character will
20598 @dfn{pad} the output so that it is always at least that long.
20599 @samp{%5y} will make the field always (at least) five characters wide by
20600 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20601 the right instead.
20602
20603 You may also wish to limit the length of the field to protect against
20604 particularly wide values.  For that you can say @samp{%4,6y}, which
20605 means that the field will never be more than 6 characters wide and never
20606 less than 4 characters wide.
20607
20608 Also Gnus supports some extended format specifications, such as
20609 @samp{%&user-date;}.
20610
20611
20612 @node Mode Line Formatting
20613 @subsection Mode Line Formatting
20614
20615 Mode line formatting variables (e.g.,
20616 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20617 buffer line oriented formatting variables (@pxref{Formatting Basics})
20618 with the following two differences:
20619
20620 @enumerate
20621
20622 @item
20623 There must be no newline (@samp{\n}) at the end.
20624
20625 @item
20626 The special @samp{%%b} spec can be used to display the buffer name.
20627 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20628 @samp{%} to allow it to pass through the formatting machinery unmangled,
20629 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20630 display interprets to mean ``show the buffer name''.  For a full list of
20631 mode line specs Emacs understands, see the documentation of the
20632 @code{mode-line-format} variable.
20633
20634 @end enumerate
20635
20636
20637 @node Advanced Formatting
20638 @subsection Advanced Formatting
20639
20640 It is frequently useful to post-process the fields in some way.
20641 Padding, limiting, cutting off parts and suppressing certain values can
20642 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20643 look like @samp{%~(cut 3)~(ignore "0")y}.
20644
20645 These are the valid modifiers:
20646
20647 @table @code
20648 @item pad
20649 @itemx pad-left
20650 Pad the field to the left with spaces until it reaches the required
20651 length.
20652
20653 @item pad-right
20654 Pad the field to the right with spaces until it reaches the required
20655 length.
20656
20657 @item max
20658 @itemx max-left
20659 Cut off characters from the left until it reaches the specified length.
20660
20661 @item max-right
20662 Cut off characters from the right until it reaches the specified
20663 length.
20664
20665 @item cut
20666 @itemx cut-left
20667 Cut off the specified number of characters from the left.
20668
20669 @item cut-right
20670 Cut off the specified number of characters from the right.
20671
20672 @item ignore
20673 Return an empty string if the field is equal to the specified value.
20674
20675 @item form
20676 Use the specified form as the field value when the @samp{@@} spec is
20677 used.
20678
20679 Here's an example:
20680
20681 @lisp
20682 "~(form (current-time-string))@@"
20683 @end lisp
20684
20685 @end table
20686
20687 Let's take an example.  The @samp{%o} spec in the summary mode lines
20688 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20689 This is quite a mouthful, so we want to shave off the century number and
20690 the time, leaving us with a six-character date.  That would be
20691 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20692 maxing, and we need the padding to ensure that the date is never less
20693 than 6 characters to make it look nice in columns.)
20694
20695 Ignoring is done first; then cutting; then maxing; and then as the very
20696 last operation, padding.
20697
20698 @vindex gnus-compile-user-specs
20699 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
20700 default) with your strong personality, and use a lots of these advanced
20701 thingies, you'll find that Gnus gets quite slow.  This can be helped
20702 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
20703 the look of your lines.
20704 @xref{Compilation}.
20705
20706
20707 @node User-Defined Specs
20708 @subsection User-Defined Specs
20709
20710 All the specs allow for inserting user defined specifiers---@samp{u}.
20711 The next character in the format string should be a letter.  Gnus
20712 will call the function @code{gnus-user-format-function-}@samp{X}, where
20713 @samp{X} is the letter following @samp{%u}.  The function will be passed
20714 a single parameter---what the parameter means depends on what buffer
20715 it's being called from.  The function should return a string, which will
20716 be inserted into the buffer just like information from any other
20717 specifier.  This function may also be called with dummy values, so it
20718 should protect against that.
20719
20720 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20721 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20722
20723 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20724 much the same without defining new functions.  Here's an example:
20725 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20726 given here will be evaluated to yield the current line number, and then
20727 inserted.
20728
20729
20730 @node Formatting Fonts
20731 @subsection Formatting Fonts
20732
20733 There are specs for highlighting, and these are shared by all the format
20734 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20735 the special @code{mouse-face} property set, which means that it will be
20736 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20737 over it.
20738
20739 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20740 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20741 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20742 and so on.  Create as many faces as you wish.  The same goes for the
20743 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20744 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20745
20746 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20747 special @code{balloon-help} property set to
20748 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20749 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20750 variables should be either strings or symbols naming functions that
20751 return a string.  When the mouse passes over text with this property
20752 set, a balloon window will appear and display the string.  Please
20753 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20754 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20755 XEmacs) for more information on this.  (For technical reasons, the
20756 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20757 paragraph.)
20758
20759 Here's an alternative recipe for the group buffer:
20760
20761 @lisp
20762 ;; @r{Create three face types.}
20763 (setq gnus-face-1 'bold)
20764 (setq gnus-face-3 'italic)
20765
20766 ;; @r{We want the article count to be in}
20767 ;; @r{a bold and green face.  So we create}
20768 ;; @r{a new face called @code{my-green-bold}.}
20769 (copy-face 'bold 'my-green-bold)
20770 ;; @r{Set the color.}
20771 (set-face-foreground 'my-green-bold "ForestGreen")
20772 (setq gnus-face-2 'my-green-bold)
20773
20774 ;; @r{Set the new & fancy format.}
20775 (setq gnus-group-line-format
20776       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20777 @end lisp
20778
20779 I'm sure you'll be able to use this scheme to create totally unreadable
20780 and extremely vulgar displays.  Have fun!
20781
20782 Note that the @samp{%(} specs (and friends) do not make any sense on the
20783 mode-line variables.
20784
20785 @node Positioning Point
20786 @subsection Positioning Point
20787
20788 Gnus usually moves point to a pre-defined place on each line in most
20789 buffers.  By default, point move to the first colon character on the
20790 line.  You can customize this behaviour in three different ways.
20791
20792 You can move the colon character to somewhere else on the line.
20793
20794 @findex gnus-goto-colon
20795 You can redefine the function that moves the point to the colon.  The
20796 function is called @code{gnus-goto-colon}.
20797
20798 But perhaps the most convenient way to deal with this, if you don't want
20799 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20800 put a @samp{%*} somewhere in your format line definition, Gnus will
20801 place point there.
20802
20803
20804 @node Tabulation
20805 @subsection Tabulation
20806
20807 You can usually line up your displays by padding and cutting your
20808 strings.  However, when combining various strings of different size, it
20809 can often be more convenient to just output the strings, and then worry
20810 about lining up the following text afterwards.
20811
20812 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20813 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
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, nothing will be inserted.
20817 This is the soft tabulator.
20818
20819 @samp{%-50=} will insert space characters to pad the line up to column
20820 50.  If the text is already past column 50, the excess text past column
20821 50 will be removed.  This is the hard tabulator.
20822
20823
20824 @node Wide Characters
20825 @subsection Wide Characters
20826
20827 Fixed width fonts in most countries have characters of the same width.
20828 Some countries, however, use Latin characters mixed with wider
20829 characters---most notable East Asian countries.
20830
20831 The problem is that when formatting, Gnus assumes that if a string is 10
20832 characters wide, it'll be 10 Latin characters wide on the screen.  In
20833 these countries, that's not true.
20834
20835 @vindex gnus-use-correct-string-widths
20836 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20837 @code{t}.  This makes buffer generation slower, but the results will be
20838 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20839 for Emacs.
20840
20841
20842 @node Window Layout
20843 @section Window Layout
20844 @cindex window layout
20845
20846 No, there's nothing here about X, so be quiet.
20847
20848 @vindex gnus-use-full-window
20849 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20850 other windows and occupy the entire Emacs screen by itself.  It is
20851 @code{t} by default.
20852
20853 Setting this variable to @code{nil} kinda works, but there are
20854 glitches.  Use at your own peril.
20855
20856 @vindex gnus-buffer-configuration
20857 @code{gnus-buffer-configuration} describes how much space each Gnus
20858 buffer should be given.  Here's an excerpt of this variable:
20859
20860 @lisp
20861 ((group (vertical 1.0 (group 1.0 point)
20862                       (if gnus-carpal (group-carpal 4))))
20863  (article (vertical 1.0 (summary 0.25 point)
20864                         (article 1.0))))
20865 @end lisp
20866
20867 This is an alist.  The @dfn{key} is a symbol that names some action or
20868 other.  For instance, when displaying the group buffer, the window
20869 configuration function will use @code{group} as the key.  A full list of
20870 possible names is listed below.
20871
20872 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20873 should occupy.  To take the @code{article} split as an example -
20874
20875 @lisp
20876 (article (vertical 1.0 (summary 0.25 point)
20877                        (article 1.0)))
20878 @end lisp
20879
20880 This @dfn{split} says that the summary buffer should occupy 25% of upper
20881 half of the screen, and that it is placed over the article buffer.  As
20882 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20883 reaching for that calculator there).  However, the special number
20884 @code{1.0} is used to signal that this buffer should soak up all the
20885 rest of the space available after the rest of the buffers have taken
20886 whatever they need.  There should be only one buffer with the @code{1.0}
20887 size spec per split.
20888
20889 Point will be put in the buffer that has the optional third element
20890 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20891 split where the tag @code{frame-focus} is a member (i.e. is the third or
20892 fourth element in the list, depending on whether the @code{point} tag is
20893 present) gets focus.
20894
20895 Here's a more complicated example:
20896
20897 @lisp
20898 (article (vertical 1.0 (group 4)
20899                        (summary 0.25 point)
20900                        (if gnus-carpal (summary-carpal 4))
20901                        (article 1.0)))
20902 @end lisp
20903
20904 If the size spec is an integer instead of a floating point number,
20905 then that number will be used to say how many lines a buffer should
20906 occupy, not a percentage.
20907
20908 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20909 precise---if the @code{car} of the split is a function or a subr), this
20910 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20911 be used as a split.  This means that there will be three buffers if
20912 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20913 is non-@code{nil}.
20914
20915 Not complicated enough for you?  Well, try this on for size:
20916
20917 @lisp
20918 (article (horizontal 1.0
20919              (vertical 0.5
20920                  (group 1.0)
20921                  (gnus-carpal 4))
20922              (vertical 1.0
20923                  (summary 0.25 point)
20924                  (summary-carpal 4)
20925                  (article 1.0))))
20926 @end lisp
20927
20928 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20929 @code{horizontal} thingie?
20930
20931 If the first element in one of the split is @code{horizontal}, Gnus will
20932 split the window horizontally, giving you two windows side-by-side.
20933 Inside each of these strips you may carry on all you like in the normal
20934 fashion.  The number following @code{horizontal} says what percentage of
20935 the screen is to be given to this strip.
20936
20937 For each split, there @emph{must} be one element that has the 100% tag.
20938 The splitting is never accurate, and this buffer will eat any leftover
20939 lines from the splits.
20940
20941 To be slightly more formal, here's a definition of what a valid split
20942 may look like:
20943
20944 @example
20945 @group
20946 split      = frame | horizontal | vertical | buffer | form
20947 frame      = "(frame " size *split ")"
20948 horizontal = "(horizontal " size *split ")"
20949 vertical   = "(vertical " size *split ")"
20950 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20951 size       = number | frame-params
20952 buf-name   = group | article | summary ...
20953 @end group
20954 @end example
20955
20956 The limitations are that the @code{frame} split can only appear as the
20957 top-level split.  @var{form} should be an Emacs Lisp form that should
20958 return a valid split.  We see that each split is fully recursive, and
20959 may contain any number of @code{vertical} and @code{horizontal} splits.
20960
20961 @vindex gnus-window-min-width
20962 @vindex gnus-window-min-height
20963 @cindex window height
20964 @cindex window width
20965 Finding the right sizes can be a bit complicated.  No window may be less
20966 than @code{gnus-window-min-height} (default 1) characters high, and all
20967 windows must be at least @code{gnus-window-min-width} (default 1)
20968 characters wide.  Gnus will try to enforce this before applying the
20969 splits.  If you want to use the normal Emacs window width/height limit,
20970 you can just set these two variables to @code{nil}.
20971
20972 If you're not familiar with Emacs terminology, @code{horizontal} and
20973 @code{vertical} splits may work the opposite way of what you'd expect.
20974 Windows inside a @code{horizontal} split are shown side-by-side, and
20975 windows within a @code{vertical} split are shown above each other.
20976
20977 @findex gnus-configure-frame
20978 If you want to experiment with window placement, a good tip is to call
20979 @code{gnus-configure-frame} directly with a split.  This is the function
20980 that does all the real work when splitting buffers.  Below is a pretty
20981 nonsensical configuration with 5 windows; two for the group buffer and
20982 three for the article buffer.  (I said it was nonsensical.)  If you
20983 @code{eval} the statement below, you can get an idea of how that would
20984 look straight away, without going through the normal Gnus channels.
20985 Play with it until you're satisfied, and then use
20986 @code{gnus-add-configuration} to add your new creation to the buffer
20987 configuration list.
20988
20989 @lisp
20990 (gnus-configure-frame
20991  '(horizontal 1.0
20992     (vertical 10
20993       (group 1.0)
20994       (article 0.3 point))
20995     (vertical 1.0
20996       (article 1.0)
20997       (horizontal 4
20998         (group 1.0)
20999         (article 10)))))
21000 @end lisp
21001
21002 You might want to have several frames as well.  No prob---just use the
21003 @code{frame} split:
21004
21005 @lisp
21006 (gnus-configure-frame
21007  '(frame 1.0
21008          (vertical 1.0
21009                    (summary 0.25 point frame-focus)
21010                    (article 1.0))
21011          (vertical ((height . 5) (width . 15)
21012                     (user-position . t)
21013                     (left . -1) (top . 1))
21014                    (picon 1.0))))
21015
21016 @end lisp
21017
21018 This split will result in the familiar summary/article window
21019 configuration in the first (or ``main'') frame, while a small additional
21020 frame will be created where picons will be shown.  As you can see,
21021 instead of the normal @code{1.0} top-level spec, each additional split
21022 should have a frame parameter alist as the size spec.
21023 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
21024 Reference Manual}.  Under XEmacs, a frame property list will be
21025 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
21026 is such a plist.
21027 The list of all possible keys for @code{gnus-buffer-configuration} can
21028 be found in its default value.
21029
21030 Note that the @code{message} key is used for both
21031 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
21032 it is desirable to distinguish between the two, something like this
21033 might be used:
21034
21035 @lisp
21036 (message (horizontal 1.0
21037                      (vertical 1.0 (message 1.0 point))
21038                      (vertical 0.24
21039                                (if (buffer-live-p gnus-summary-buffer)
21040                                    '(summary 0.5))
21041                                (group 1.0))))
21042 @end lisp
21043
21044 One common desire for a multiple frame split is to have a separate frame
21045 for composing mail and news while leaving the original frame intact.  To
21046 accomplish that, something like the following can be done:
21047
21048 @lisp
21049 (message
21050   (frame 1.0
21051          (if (not (buffer-live-p gnus-summary-buffer))
21052              (car (cdr (assoc 'group gnus-buffer-configuration)))
21053            (car (cdr (assoc 'summary gnus-buffer-configuration))))
21054          (vertical ((user-position . t) (top . 1) (left . 1)
21055                     (name . "Message"))
21056                    (message 1.0 point))))
21057 @end lisp
21058
21059 @findex gnus-add-configuration
21060 Since the @code{gnus-buffer-configuration} variable is so long and
21061 complicated, there's a function you can use to ease changing the config
21062 of a single setting: @code{gnus-add-configuration}.  If, for instance,
21063 you want to change the @code{article} setting, you could say:
21064
21065 @lisp
21066 (gnus-add-configuration
21067  '(article (vertical 1.0
21068                (group 4)
21069                (summary .25 point)
21070                (article 1.0))))
21071 @end lisp
21072
21073 You'd typically stick these @code{gnus-add-configuration} calls in your
21074 @file{~/.gnus.el} file or in some startup hook---they should be run after
21075 Gnus has been loaded.
21076
21077 @vindex gnus-always-force-window-configuration
21078 If all windows mentioned in the configuration are already visible, Gnus
21079 won't change the window configuration.  If you always want to force the
21080 ``right'' window configuration, you can set
21081 @code{gnus-always-force-window-configuration} to non-@code{nil}.
21082
21083 If you're using tree displays (@pxref{Tree Display}), and the tree
21084 window is displayed vertically next to another window, you may also want
21085 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
21086 windows resized.
21087
21088 @subsection Example Window Configurations
21089
21090 @itemize @bullet
21091 @item
21092 Narrow left hand side occupied by group buffer.  Right hand side split
21093 between summary buffer (top one-sixth) and article buffer (bottom).
21094
21095 @ifinfo
21096 @example
21097 +---+---------+
21098 | G | Summary |
21099 | r +---------+
21100 | o |         |
21101 | u | Article |
21102 | p |         |
21103 +---+---------+
21104 @end example
21105 @end ifinfo
21106
21107 @lisp
21108 (gnus-add-configuration
21109  '(article
21110    (horizontal 1.0
21111                (vertical 25 (group 1.0))
21112                (vertical 1.0
21113                          (summary 0.16 point)
21114                          (article 1.0)))))
21115
21116 (gnus-add-configuration
21117  '(summary
21118    (horizontal 1.0
21119                (vertical 25 (group 1.0))
21120                (vertical 1.0 (summary 1.0 point)))))
21121 @end lisp
21122
21123 @end itemize
21124
21125
21126 @node Faces and Fonts
21127 @section Faces and Fonts
21128 @cindex faces
21129 @cindex fonts
21130 @cindex colors
21131
21132 Fiddling with fonts and faces used to be very difficult, but these days
21133 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21134 the face you want to alter, and alter it via the standard Customize
21135 interface.
21136
21137
21138 @node Compilation
21139 @section Compilation
21140 @cindex compilation
21141 @cindex byte-compilation
21142
21143 @findex gnus-compile
21144
21145 Remember all those line format specification variables?
21146 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21147 on.  By default, T-gnus will use the byte-compiled codes of these
21148 variables and we can keep a slow-down to a minimum.  However, if you set
21149 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
21150 unfortunately, changing them will mean a quite significant slow-down.
21151 (The default values of these variables have byte-compiled functions
21152 associated with them, while the user-generated versions do not, of
21153 course.)
21154
21155 To help with this, you can run @kbd{M-x gnus-compile} after you've
21156 fiddled around with the variables and feel that you're (kind of)
21157 satisfied.  This will result in the new specs being byte-compiled, and
21158 you'll get top speed again.  Note that T-gnus will not save these
21159 compiled specs in the @file{.newsrc.eld} file.
21160
21161 @table @code
21162 @item gnus-compile-user-specs
21163 @vindex gnus-compile-user-specs
21164 If it is non-nil, the user-defined format specs will be byte-compiled
21165 automatically.  The default value of this variable is @code{t}.  It has
21166 an effect on the values of @code{gnus-*-line-format-spec}.
21167 @end table
21168
21169
21170 @node Mode Lines
21171 @section Mode Lines
21172 @cindex mode lines
21173
21174 @vindex gnus-updated-mode-lines
21175 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21176 lines updated.  It is a list of symbols.  Supported symbols include
21177 @code{group}, @code{article}, @code{summary}, @code{server},
21178 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21179 Gnus will keep that mode line updated with information that may be
21180 pertinent.  If this variable is @code{nil}, screen refresh may be
21181 quicker.
21182
21183 @cindex display-time
21184
21185 @vindex gnus-mode-non-string-length
21186 By default, Gnus displays information on the current article in the mode
21187 lines of the summary and article buffers.  The information Gnus wishes
21188 to display (e.g. the subject of the article) is often longer than the
21189 mode lines, and therefore have to be cut off at some point.  The
21190 @code{gnus-mode-non-string-length} variable says how long the other
21191 elements on the line is (i.e., the non-info part).  If you put
21192 additional elements on the mode line (e.g. a clock), you should modify
21193 this variable:
21194
21195 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21196 @lisp
21197 (add-hook 'display-time-hook
21198           (lambda () (setq gnus-mode-non-string-length
21199                            (+ 21
21200                               (if line-number-mode 5 0)
21201                               (if column-number-mode 4 0)
21202                               (length display-time-string)))))
21203 @end lisp
21204
21205 If this variable is @code{nil} (which is the default), the mode line
21206 strings won't be chopped off, and they won't be padded either.  Note
21207 that the default is unlikely to be desirable, as even the percentage
21208 complete in the buffer may be crowded off the mode line; the user should
21209 configure this variable appropriately for her configuration.
21210
21211
21212 @node Highlighting and Menus
21213 @section Highlighting and Menus
21214 @cindex visual
21215 @cindex highlighting
21216 @cindex menus
21217
21218 @vindex gnus-visual
21219 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21220 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21221 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21222 file.
21223
21224 This variable can be a list of visual properties that are enabled.  The
21225 following elements are valid, and are all included by default:
21226
21227 @table @code
21228 @item group-highlight
21229 Do highlights in the group buffer.
21230 @item summary-highlight
21231 Do highlights in the summary buffer.
21232 @item article-highlight
21233 Do highlights in the article buffer.
21234 @item highlight
21235 Turn on highlighting in all buffers.
21236 @item group-menu
21237 Create menus in the group buffer.
21238 @item summary-menu
21239 Create menus in the summary buffers.
21240 @item article-menu
21241 Create menus in the article buffer.
21242 @item browse-menu
21243 Create menus in the browse buffer.
21244 @item server-menu
21245 Create menus in the server buffer.
21246 @item score-menu
21247 Create menus in the score buffers.
21248 @item menu
21249 Create menus in all buffers.
21250 @end table
21251
21252 So if you only want highlighting in the article buffer and menus in all
21253 buffers, you could say something like:
21254
21255 @lisp
21256 (setq gnus-visual '(article-highlight menu))
21257 @end lisp
21258
21259 If you want highlighting only and no menus whatsoever, you'd say:
21260
21261 @lisp
21262 (setq gnus-visual '(highlight))
21263 @end lisp
21264
21265 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21266 in all Gnus buffers.
21267
21268 Other general variables that influence the look of all buffers include:
21269
21270 @table @code
21271 @item gnus-mouse-face
21272 @vindex gnus-mouse-face
21273 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21274 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21275
21276 @end table
21277
21278 There are hooks associated with the creation of all the different menus:
21279
21280 @table @code
21281
21282 @item gnus-article-menu-hook
21283 @vindex gnus-article-menu-hook
21284 Hook called after creating the article mode menu.
21285
21286 @item gnus-group-menu-hook
21287 @vindex gnus-group-menu-hook
21288 Hook called after creating the group mode menu.
21289
21290 @item gnus-summary-menu-hook
21291 @vindex gnus-summary-menu-hook
21292 Hook called after creating the summary mode menu.
21293
21294 @item gnus-server-menu-hook
21295 @vindex gnus-server-menu-hook
21296 Hook called after creating the server mode menu.
21297
21298 @item gnus-browse-menu-hook
21299 @vindex gnus-browse-menu-hook
21300 Hook called after creating the browse mode menu.
21301
21302 @item gnus-score-menu-hook
21303 @vindex gnus-score-menu-hook
21304 Hook called after creating the score mode menu.
21305
21306 @end table
21307
21308
21309 @node Buttons
21310 @section Buttons
21311 @cindex buttons
21312 @cindex mouse
21313 @cindex click
21314
21315 Those new-fangled @dfn{mouse} contraptions is very popular with the
21316 young, hep kids who don't want to learn the proper way to do things
21317 these days.  Why, I remember way back in the summer of '89, when I was
21318 using Emacs on a Tops 20 system.  Three hundred users on one single
21319 machine, and every user was running Simula compilers.  Bah!
21320
21321 Right.
21322
21323 @vindex gnus-carpal
21324 Well, you can make Gnus display bufferfuls of buttons you can click to
21325 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21326 really.  Tell the chiropractor I sent you.
21327
21328
21329 @table @code
21330
21331 @item gnus-carpal-mode-hook
21332 @vindex gnus-carpal-mode-hook
21333 Hook run in all carpal mode buffers.
21334
21335 @item gnus-carpal-button-face
21336 @vindex gnus-carpal-button-face
21337 Face used on buttons.
21338
21339 @item gnus-carpal-header-face
21340 @vindex gnus-carpal-header-face
21341 Face used on carpal buffer headers.
21342
21343 @item gnus-carpal-group-buffer-buttons
21344 @vindex gnus-carpal-group-buffer-buttons
21345 Buttons in the group buffer.
21346
21347 @item gnus-carpal-summary-buffer-buttons
21348 @vindex gnus-carpal-summary-buffer-buttons
21349 Buttons in the summary buffer.
21350
21351 @item gnus-carpal-server-buffer-buttons
21352 @vindex gnus-carpal-server-buffer-buttons
21353 Buttons in the server buffer.
21354
21355 @item gnus-carpal-browse-buffer-buttons
21356 @vindex gnus-carpal-browse-buffer-buttons
21357 Buttons in the browse buffer.
21358 @end table
21359
21360 All the @code{buttons} variables are lists.  The elements in these list
21361 are either cons cells where the @code{car} contains a text to be displayed and
21362 the @code{cdr} contains a function symbol, or a simple string.
21363
21364
21365 @node Daemons
21366 @section Daemons
21367 @cindex demons
21368 @cindex daemons
21369
21370 Gnus, being larger than any program ever written (allegedly), does lots
21371 of strange stuff that you may wish to have done while you're not
21372 present.  For instance, you may want it to check for new mail once in a
21373 while.  Or you may want it to close down all connections to all servers
21374 when you leave Emacs idle.  And stuff like that.
21375
21376 Gnus will let you do stuff like that by defining various
21377 @dfn{handlers}.  Each handler consists of three elements:  A
21378 @var{function}, a @var{time}, and an @var{idle} parameter.
21379
21380 Here's an example of a handler that closes connections when Emacs has
21381 been idle for thirty minutes:
21382
21383 @lisp
21384 (gnus-demon-close-connections nil 30)
21385 @end lisp
21386
21387 Here's a handler that scans for @acronym{PGP} headers every hour when
21388 Emacs is idle:
21389
21390 @lisp
21391 (gnus-demon-scan-pgp 60 t)
21392 @end lisp
21393
21394 This @var{time} parameter and that @var{idle} parameter work together
21395 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21396 @code{nil}, then the function will be called every @var{time} minutes.
21397
21398 If @var{idle} is @code{t}, then the function will be called after
21399 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21400 the function will never be called.  But once Emacs goes idle, the
21401 function will be called every @var{time} minutes.
21402
21403 If @var{idle} is a number and @var{time} is a number, the function will
21404 be called every @var{time} minutes only when Emacs has been idle for
21405 @var{idle} minutes.
21406
21407 If @var{idle} is a number and @var{time} is @code{nil}, the function
21408 will be called once every time Emacs has been idle for @var{idle}
21409 minutes.
21410
21411 And if @var{time} is a string, it should look like @samp{07:31}, and
21412 the function will then be called once every day somewhere near that
21413 time.  Modified by the @var{idle} parameter, of course.
21414
21415 @vindex gnus-demon-timestep
21416 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21417 seconds.  This is 60 by default.  If you change that variable,
21418 all the timings in the handlers will be affected.)
21419
21420 So, if you want to add a handler, you could put something like this in
21421 your @file{~/.gnus.el} file:
21422
21423 @findex gnus-demon-add-handler
21424 @lisp
21425 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21426 @end lisp
21427
21428 @findex gnus-demon-add-nocem
21429 @findex gnus-demon-add-scanmail
21430 @findex gnus-demon-add-rescan
21431 @findex gnus-demon-add-scan-timestamps
21432 @findex gnus-demon-add-disconnection
21433 Some ready-made functions to do this have been created:
21434 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21435 @code{gnus-demon-add-nntp-close-connection},
21436 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21437 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21438 @file{~/.gnus.el} if you want those abilities.
21439
21440 @findex gnus-demon-init
21441 @findex gnus-demon-cancel
21442 @vindex gnus-demon-handlers
21443 If you add handlers to @code{gnus-demon-handlers} directly, you should
21444 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21445 daemons, you can use the @code{gnus-demon-cancel} function.
21446
21447 Note that adding daemons can be pretty naughty if you over do it.  Adding
21448 functions that scan all news and mail from all servers every two seconds
21449 is a sure-fire way of getting booted off any respectable system.  So
21450 behave.
21451
21452
21453 @node NoCeM
21454 @section NoCeM
21455 @cindex nocem
21456 @cindex spam
21457
21458 @dfn{Spamming} is posting the same article lots and lots of times.
21459 Spamming is bad.  Spamming is evil.
21460
21461 Spamming is usually canceled within a day or so by various anti-spamming
21462 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21463 NoCeM is pronounced ``no see-'em'', and means what the name
21464 implies---these are messages that make the offending articles, like, go
21465 away.
21466
21467 What use are these NoCeM messages if the articles are canceled anyway?
21468 Some sites do not honor cancel messages and some sites just honor cancels
21469 from a select few people.  Then you may wish to make use of the NoCeM
21470 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21471
21472 Gnus can read and parse the messages in this group automatically, and
21473 this will make spam disappear.
21474
21475 There are some variables to customize, of course:
21476
21477 @table @code
21478 @item gnus-use-nocem
21479 @vindex gnus-use-nocem
21480 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21481 by default.
21482
21483 @item gnus-nocem-groups
21484 @vindex gnus-nocem-groups
21485 Gnus will look for NoCeM messages in the groups in this list.  The
21486 default is
21487 @lisp
21488 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21489  "alt.nocem.misc" "news.admin.net-abuse.announce")
21490 @end lisp
21491
21492 @item gnus-nocem-issuers
21493 @vindex gnus-nocem-issuers
21494 There are many people issuing NoCeM messages.  This list says what
21495 people you want to listen to.  The default is
21496 @lisp
21497 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21498  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21499 @end lisp
21500 fine, upstanding citizens all of them.
21501
21502 Known despammers that you can put in this list are listed at@*
21503 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21504
21505 You do not have to heed NoCeM messages from all these people---just the
21506 ones you want to listen to.  You also don't have to accept all NoCeM
21507 messages from the people you like.  Each NoCeM message has a @dfn{type}
21508 header that gives the message a (more or less, usually less) rigorous
21509 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21510 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21511 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21512 Each condition is either a string (which is a regexp that matches types
21513 you want to use) or a list on the form @code{(not @var{string})}, where
21514 @var{string} is a regexp that matches types you don't want to use.
21515
21516 For instance, if you want all NoCeM messages from Chris Lewis except his
21517 @samp{troll} messages, you'd say:
21518
21519 @lisp
21520 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21521 @end lisp
21522
21523 On the other hand, if you just want nothing but his @samp{spam} and
21524 @samp{spew} messages, you'd say:
21525
21526 @lisp
21527 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21528 @end lisp
21529
21530 The specs are applied left-to-right.
21531
21532
21533 @item gnus-nocem-verifyer
21534 @vindex gnus-nocem-verifyer
21535 @findex mc-verify
21536 This should be a function for verifying that the NoCeM issuer is who she
21537 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21538 function.  If this is too slow and you don't care for verification
21539 (which may be dangerous), you can set this variable to @code{nil}.
21540
21541 If you want signed NoCeM messages to be verified and unsigned messages
21542 not to be verified (but used anyway), you could do something like:
21543
21544 @lisp
21545 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21546
21547 (defun my-gnus-mc-verify ()
21548   (not (eq 'forged
21549            (ignore-errors
21550              (if (mc-verify)
21551                  t
21552                'forged)))))
21553 @end lisp
21554
21555 This might be dangerous, though.
21556
21557 @item gnus-nocem-directory
21558 @vindex gnus-nocem-directory
21559 This is where Gnus will store its NoCeM cache files.  The default is@*
21560 @file{~/News/NoCeM/}.
21561
21562 @item gnus-nocem-expiry-wait
21563 @vindex gnus-nocem-expiry-wait
21564 The number of days before removing old NoCeM entries from the cache.
21565 The default is 15.  If you make it shorter Gnus will be faster, but you
21566 might then see old spam.
21567
21568 @item gnus-nocem-check-from
21569 @vindex gnus-nocem-check-from
21570 Non-@code{nil} means check for valid issuers in message bodies.
21571 Otherwise don't bother fetching articles unless their author matches a
21572 valid issuer; that is much faster if you are selective about the
21573 issuers.
21574
21575 @item gnus-nocem-check-article-limit
21576 @vindex gnus-nocem-check-article-limit
21577 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21578 group.  NoCeM groups can be huge and very slow to process.
21579
21580 @end table
21581
21582 Using NoCeM could potentially be a memory hog.  If you have many living
21583 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21584 big.  If this is a problem, you should kill off all (or most) of your
21585 unsubscribed groups (@pxref{Subscription Commands}).
21586
21587
21588 @node Undo
21589 @section Undo
21590 @cindex undo
21591
21592 It is very useful to be able to undo actions one has done.  In normal
21593 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21594 In Gnus buffers, however, it isn't that simple.
21595
21596 The things Gnus displays in its buffer is of no value whatsoever to
21597 Gnus---it's all just data designed to look nice to the user.
21598 Killing a group in the group buffer with @kbd{C-k} makes the line
21599 disappear, but that's just a side-effect of the real action---the
21600 removal of the group in question from the internal Gnus structures.
21601 Undoing something like that can't be done by the normal Emacs
21602 @code{undo} function.
21603
21604 Gnus tries to remedy this somewhat by keeping track of what the user
21605 does and coming up with actions that would reverse the actions the user
21606 takes.  When the user then presses the @code{undo} key, Gnus will run
21607 the code to reverse the previous action, or the previous actions.
21608 However, not all actions are easily reversible, so Gnus currently offers
21609 a few key functions to be undoable.  These include killing groups,
21610 yanking groups, and changing the list of read articles of groups.
21611 That's it, really.  More functions may be added in the future, but each
21612 added function means an increase in data to be stored, so Gnus will
21613 never be totally undoable.
21614
21615 @findex gnus-undo-mode
21616 @vindex gnus-use-undo
21617 @findex gnus-undo
21618 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21619 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21620 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21621 command, which should feel kinda like the normal Emacs @code{undo}
21622 command.
21623
21624
21625 @node Predicate Specifiers
21626 @section Predicate Specifiers
21627 @cindex predicate specifiers
21628
21629 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21630 form that allows flexible specification of predicates without having
21631 to type all that much.
21632
21633 These specifiers are lists consisting of functions, symbols and lists.
21634
21635 Here's an example:
21636
21637 @lisp
21638 (or gnus-article-unseen-p
21639     gnus-article-unread-p)
21640 @end lisp
21641
21642 The available symbols are @code{or}, @code{and} and @code{not}.  The
21643 functions all take one parameter.
21644
21645 @findex gnus-make-predicate
21646 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21647 to create a function that can be called.  This input parameter to this
21648 function will be passed along to all the functions in the predicate
21649 specifier.
21650
21651
21652 @node Moderation
21653 @section Moderation
21654 @cindex moderation
21655
21656 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21657 It is not included in the standard Gnus package.  Write a mail to
21658 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21659 get a copy.
21660
21661 The moderation package is implemented as a minor mode for summary
21662 buffers.  Put
21663
21664 @lisp
21665 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21666 @end lisp
21667
21668 in your @file{~/.gnus.el} file.
21669
21670 If you are the moderator of @samp{rec.zoofle}, this is how it's
21671 supposed to work:
21672
21673 @enumerate
21674 @item
21675 You split your incoming mail by matching on
21676 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21677 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21678
21679 @item
21680 You enter that group once in a while and post articles using the @kbd{e}
21681 (edit-and-post) or @kbd{s} (just send unedited) commands.
21682
21683 @item
21684 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21685 articles that weren't approved by you, you can cancel them with the
21686 @kbd{c} command.
21687 @end enumerate
21688
21689 To use moderation mode in these two groups, say:
21690
21691 @lisp
21692 (setq gnus-moderated-list
21693       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21694 @end lisp
21695
21696
21697 @node Image Enhancements
21698 @section Image Enhancements
21699
21700 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21701 support images yet.}, is able to display pictures and stuff, so Gnus has
21702 taken advantage of that.
21703
21704 @menu
21705 * X-Face::                      Display a funky, teensy black-and-white image.
21706 * Face::                        Display a funkier, teensier colored image.
21707 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21708 * Picons::                      How to display pictures of what you're reading.
21709 * XVarious::                    Other XEmacsy Gnusey variables.
21710 @end menu
21711
21712
21713 @node X-Face
21714 @subsection X-Face
21715 @cindex x-face
21716
21717 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21718 depth) image that's supposed to represent the author of the message.
21719 It seems to be supported by an ever-growing number of mail and news
21720 readers.
21721
21722 @cindex x-face
21723 @findex gnus-article-display-x-face
21724 @vindex gnus-article-x-face-command
21725 @vindex gnus-article-x-face-too-ugly
21726 @iftex
21727 @iflatex
21728 \include{xface}
21729 @end iflatex
21730 @end iftex
21731 @c @anchor{X-Face}
21732
21733 Decoding an @code{X-Face} header either requires an Emacs that has
21734 @samp{compface} support (which most XEmacs versions has), or that you
21735 have @samp{compface} installed on your system.  If either is true,
21736 Gnus will default to displaying @code{X-Face} headers.
21737
21738 The variable that controls this is the
21739 @code{gnus-article-x-face-command} variable.  If this variable is a
21740 string, this string will be executed in a sub-shell.  If it is a
21741 function, this function will be called with the face as the argument.
21742 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21743 the @code{From} header, the face will not be shown.
21744
21745 The default action under Emacs 20 is to fork off the @code{display}
21746 program@footnote{@code{display} is from the ImageMagick package.  For
21747 the @code{uncompface} and @code{icontopbm} programs look for a package
21748 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21749 view the face.
21750
21751 Under XEmacs or Emacs 21+ with suitable image support, the default
21752 action is to display the face before the @code{From} header.  (It's
21753 nicer if XEmacs has been compiled with @code{X-Face} support---that
21754 will make display somewhat faster.  If there's no native @code{X-Face}
21755 support, Gnus will try to convert the @code{X-Face} header using
21756 external programs from the @code{pbmplus} package and
21757 friends.@footnote{On a GNU/Linux system look for packages with names
21758 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21759
21760 (Note: @code{x-face} is used in the variable/function names, not
21761 @code{xface}).
21762
21763 Gnus provides a few convenience functions and variables to allow
21764 easier insertion of X-Face headers in outgoing messages.
21765
21766 @findex gnus-random-x-face
21767 @vindex gnus-convert-pbm-to-x-face-command
21768 @vindex gnus-x-face-directory
21769 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21770 @code{gnus-x-face-directory} and picks one at random, and then
21771 converts it to the X-Face format by using the
21772 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21773 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21774 header data as a string.
21775
21776 @findex gnus-insert-random-x-face-header
21777 @code{gnus-insert-random-x-face-header} calls
21778 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21779 randomly generated data.
21780
21781 @findex gnus-x-face-from-file
21782 @vindex gnus-convert-image-to-x-face-command
21783 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21784 converts the file to X-Face format by using the
21785 @code{gnus-convert-image-to-x-face-command} shell command.
21786
21787 Here's how you would typically use the first function.  Put something
21788 like the following in your @file{~/.gnus.el} file:
21789
21790 @lisp
21791 (setq message-required-news-headers
21792       (nconc message-required-news-headers
21793              (list '(X-Face . gnus-random-x-face))))
21794 @end lisp
21795
21796 Using the last function would be something like this:
21797
21798 @lisp
21799 (setq message-required-news-headers
21800       (nconc message-required-news-headers
21801              (list '(X-Face . (lambda ()
21802                                 (gnus-x-face-from-file
21803                                  "~/My-face.gif"))))))
21804 @end lisp
21805
21806
21807 @node Face
21808 @subsection Face
21809 @cindex face
21810
21811 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21812
21813 @code{Face} headers are essentially a funkier version of @code{X-Face}
21814 ones. They describe a 48x48 pixel colored image that's supposed to
21815 represent the author of the message.
21816
21817 @cindex face
21818 @findex gnus-article-display-face
21819 The contents of a @code{Face} header must be a base64 encoded PNG image.
21820 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21821 specifications.
21822
21823 Gnus provides a few convenience functions and variables to allow
21824 easier insertion of Face headers in outgoing messages.
21825
21826 @findex gnus-convert-png-to-face
21827 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21828 726 bytes long, and converts it to a face.
21829
21830 @findex gnus-face-from-file
21831 @vindex gnus-convert-image-to-face-command
21832 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21833 converts the file to Face format by using the
21834 @code{gnus-convert-image-to-face-command} shell command.
21835
21836 Here's how you would typically use this function. Put something like the
21837 following in your @file{~/.gnus.el} file:
21838
21839 @lisp
21840 (setq message-required-news-headers
21841       (nconc message-required-news-headers
21842              (list '(Face . (lambda ()
21843                               (gnus-face-from-file "~/face.jpg"))))))
21844 @end lisp
21845
21846
21847 @node Smileys
21848 @subsection Smileys
21849 @cindex smileys
21850
21851 @iftex
21852 @iflatex
21853 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21854 \input{smiley}
21855 @end iflatex
21856 @end iftex
21857
21858 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21859 currently the only package that uses Smiley, it is documented here.
21860
21861 In short---to use Smiley in Gnus, put the following in your
21862 @file{~/.gnus.el} file:
21863
21864 @lisp
21865 (setq gnus-treat-display-smileys t)
21866 @end lisp
21867
21868 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21869 the like---to pictures and displays those instead of the text smiley
21870 faces.  The conversion is controlled by a list of regexps that matches
21871 text and maps that to file names.
21872
21873 @vindex smiley-regexp-alist
21874 The alist used is specified by the @code{smiley-regexp-alist}
21875 variable.  The first item in each element is the regexp to be matched;
21876 the second element is the regexp match group that is to be replaced by
21877 the picture; and the third element is the name of the file to be
21878 displayed.
21879
21880 The following variables customize where Smiley will look for these
21881 files:
21882
21883 @table @code
21884
21885 @item smiley-data-directory
21886 @vindex smiley-data-directory
21887 Where Smiley will look for smiley faces files.
21888
21889 @item gnus-smiley-file-types
21890 @vindex gnus-smiley-file-types
21891 List of suffixes on smiley file names to try.
21892
21893 @end table
21894
21895
21896 @node Picons
21897 @subsection Picons
21898
21899 @iftex
21900 @iflatex
21901 \include{picons}
21902 @end iflatex
21903 @end iftex
21904
21905 So@dots{}  You want to slow down your news reader even more!  This is a
21906 good way to do so.  It's also a great way to impress people staring
21907 over your shoulder as you read news.
21908
21909 What are Picons?  To quote directly from the Picons Web site:
21910
21911 @iftex
21912 @iflatex
21913 \margindex{}
21914 @end iflatex
21915 @end iftex
21916
21917 @quotation
21918 @dfn{Picons} is short for ``personal icons''.  They're small,
21919 constrained images used to represent users and domains on the net,
21920 organized into databases so that the appropriate image for a given
21921 e-mail address can be found.  Besides users and domains, there are picon
21922 databases for Usenet newsgroups and weather forecasts.  The picons are
21923 in either monochrome @code{XBM} format or color @code{XPM} and
21924 @code{GIF} formats.
21925 @end quotation
21926
21927 @vindex gnus-picon-databases
21928 For instructions on obtaining and installing the picons databases,
21929 point your Web browser at
21930 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21931
21932 If you are using Debian GNU/Linux, saying @samp{apt-get install
21933 picons.*} will install the picons where Gnus can find them.
21934
21935 To enable displaying picons, simply make sure that
21936 @code{gnus-picon-databases} points to the directory containing the
21937 Picons databases.
21938
21939 The following variables offer control over where things are located.
21940
21941 @table @code
21942
21943 @item gnus-picon-databases
21944 @vindex gnus-picon-databases
21945 The location of the picons database.  This is a list of directories
21946 containing the @file{news}, @file{domains}, @file{users} (and so on)
21947 subdirectories.  Defaults to @code{("/usr/lib/picon"
21948 "/usr/local/faces")}.
21949
21950 @item gnus-picon-news-directories
21951 @vindex gnus-picon-news-directories
21952 List of subdirectories to search in @code{gnus-picon-databases} for
21953 newsgroups faces.  @code{("news")} is the default.
21954
21955 @item gnus-picon-user-directories
21956 @vindex gnus-picon-user-directories
21957 List of subdirectories to search in @code{gnus-picon-databases} for user
21958 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21959
21960 @item gnus-picon-domain-directories
21961 @vindex gnus-picon-domain-directories
21962 List of subdirectories to search in @code{gnus-picon-databases} for
21963 domain name faces.  Defaults to @code{("domains")}.  Some people may
21964 want to add @samp{"unknown"} to this list.
21965
21966 @item gnus-picon-file-types
21967 @vindex gnus-picon-file-types
21968 Ordered list of suffixes on picon file names to try.  Defaults to
21969 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21970
21971 @end table
21972
21973
21974 @node XVarious
21975 @subsection Various XEmacs Variables
21976
21977 @table @code
21978 @item gnus-xmas-glyph-directory
21979 @vindex gnus-xmas-glyph-directory
21980 This is where Gnus will look for pictures.  Gnus will normally
21981 auto-detect this directory, but you may set it manually if you have an
21982 unusual directory structure.
21983
21984 @item gnus-xmas-logo-color-alist
21985 @vindex gnus-xmas-logo-color-alist
21986 This is an alist where the key is a type symbol and the values are the
21987 foreground and background color of the splash page glyph.
21988
21989 @item gnus-xmas-logo-color-style
21990 @vindex gnus-xmas-logo-color-style
21991 This is the key used to look up the color in the alist described above.
21992 Valid values include @code{flame}, @code{pine}, @code{moss},
21993 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21994 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21995
21996 @item gnus-xmas-modeline-glyph
21997 @vindex gnus-xmas-modeline-glyph
21998 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21999 default.
22000
22001 @end table
22002
22003 @subsubsection Toolbar
22004
22005 @table @code
22006
22007 @item gnus-use-toolbar
22008 @vindex gnus-use-toolbar
22009 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
22010 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
22011 @code{right-toolbar}, or @code{left-toolbar}.
22012
22013 @item gnus-group-toolbar
22014 @vindex gnus-group-toolbar
22015 The toolbar in the group buffer.
22016
22017 @item gnus-summary-toolbar
22018 @vindex gnus-summary-toolbar
22019 The toolbar in the summary buffer.
22020
22021 @item gnus-summary-mail-toolbar
22022 @vindex gnus-summary-mail-toolbar
22023 The toolbar in the summary buffer of mail groups.
22024
22025 @end table
22026
22027 @iftex
22028 @iflatex
22029 \margindex{}
22030 @end iflatex
22031 @end iftex
22032
22033
22034 @node Fuzzy Matching
22035 @section Fuzzy Matching
22036 @cindex fuzzy matching
22037
22038 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
22039 things like scoring, thread gathering and thread comparison.
22040
22041 As opposed to regular expression matching, fuzzy matching is very fuzzy.
22042 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
22043 means, and the implementation has changed over time.
22044
22045 Basically, it tries to remove all noise from lines before comparing.
22046 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
22047 out of the strings before comparing the results.  This often leads to
22048 adequate results---even when faced with strings generated by text
22049 manglers masquerading as newsreaders.
22050
22051
22052 @node Thwarting Email Spam
22053 @section Thwarting Email Spam
22054 @cindex email spam
22055 @cindex spam
22056 @cindex UCE
22057 @cindex unsolicited commercial email
22058
22059 In these last days of the Usenet, commercial vultures are hanging about
22060 and grepping through news like crazy to find email addresses they can
22061 foist off their scams and products to.  As a reaction to this, many
22062 people have started putting nonsense addresses into their @code{From}
22063 lines.  I think this is counterproductive---it makes it difficult for
22064 people to send you legitimate mail in response to things you write, as
22065 well as making it difficult to see who wrote what.  This rewriting may
22066 perhaps be a bigger menace than the unsolicited commercial email itself
22067 in the end.
22068
22069 The biggest problem I have with email spam is that it comes in under
22070 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
22071 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
22072 mail group, only to find two pyramid schemes, seven advertisements
22073 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
22074 and one mail asking me to repent and find some god.
22075
22076 This is annoying.  Here's what you can do about it.
22077
22078 @menu
22079 * The problem of spam::         Some background, and some solutions
22080 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
22081 * SpamAssassin::                How to use external anti-spam tools.
22082 * Hashcash::                    Reduce spam by burning CPU time.
22083 * Filtering Spam Using The Spam ELisp Package::
22084 * Filtering Spam Using Statistics with spam-stat::
22085 @end menu
22086
22087 @node The problem of spam
22088 @subsection The problem of spam
22089 @cindex email spam
22090 @cindex spam filtering approaches
22091 @cindex filtering approaches, spam
22092 @cindex UCE
22093 @cindex unsolicited commercial email
22094
22095 First, some background on spam.
22096
22097 If you have access to e-mail, you are familiar with spam (technically
22098 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
22099 because e-mail delivery is very cheap compared to paper mail, so only
22100 a very small percentage of people need to respond to an UCE to make it
22101 worthwhile to the advertiser.  Ironically, one of the most common
22102 spams is the one offering a database of e-mail addresses for further
22103 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
22104 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
22105
22106 Spam comes from a wide variety of sources.  It is simply impossible to
22107 dispose of all spam without discarding useful messages.  A good
22108 example is the TMDA system, which requires senders
22109 unknown to you to confirm themselves as legitimate senders before
22110 their e-mail can reach you.  Without getting into the technical side
22111 of TMDA, a downside is clearly that e-mail from legitimate sources may
22112 be discarded if those sources can't or won't confirm themselves
22113 through the TMDA system.  Another problem with TMDA is that it
22114 requires its users to have a basic understanding of e-mail delivery
22115 and processing.
22116
22117 The simplest approach to filtering spam is filtering.  If you get 200
22118 spam messages per day from @samp{random-address@@vmadmin.com}, you
22119 block @samp{vmadmin.com}.  If you get 200 messages about
22120 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22121 message.  This, unfortunately, is a great way to discard legitimate
22122 e-mail.  For instance, the very informative and useful RISKS digest
22123 has been blocked by overzealous mail filters because it
22124 @strong{contained} words that were common in spam messages.
22125 Nevertheless, in isolated cases, with great care, direct filtering of
22126 mail can be useful.
22127
22128 Another approach to filtering e-mail is the distributed spam
22129 processing, for instance DCC implements such a system.  In essence,
22130 @var{N} systems around the world agree that a machine @var{X} in
22131 China, Ghana, or California is sending out spam e-mail, and these
22132 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22133 a database.  The criteria for spam detection vary---it may be the
22134 number of messages sent, the content of the messages, and so on.  When
22135 a user of the distributed processing system wants to find out if a
22136 message is spam, he consults one of those @var{N} systems.
22137
22138 Distributed spam processing works very well against spammers that send
22139 a large number of messages at once, but it requires the user to set up
22140 fairly complicated checks.  There are commercial and free distributed
22141 spam processing systems.  Distributed spam processing has its risks as
22142 well.  For instance legitimate e-mail senders have been accused of
22143 sending spam, and their web sites have been shut down for some time
22144 because of the incident.
22145
22146 The statistical approach to spam filtering is also popular.  It is
22147 based on a statistical analysis of previous spam messages.  Usually
22148 the analysis is a simple word frequency count, with perhaps pairs of
22149 words or 3-word combinations thrown into the mix.  Statistical
22150 analysis of spam works very well in most of the cases, but it can
22151 classify legitimate e-mail as spam in some cases.  It takes time to
22152 run the analysis, the full message must be analyzed, and the user has
22153 to store the database of spam analyses.
22154
22155 @node Anti-Spam Basics
22156 @subsection Anti-Spam Basics
22157 @cindex email spam
22158 @cindex spam
22159 @cindex UCE
22160 @cindex unsolicited commercial email
22161
22162 One way of dealing with spam is having Gnus split out all spam into a
22163 @samp{spam} mail group (@pxref{Splitting Mail}).
22164
22165 First, pick one (1) valid mail address that you can be reached at, and
22166 put it in your @code{From} header of all your news articles.  (I've
22167 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22168 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22169 sysadmin whether your sendmail installation accepts keywords in the local
22170 part of the mail address.)
22171
22172 @lisp
22173 (setq message-default-news-headers
22174       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22175 @end lisp
22176
22177 Then put the following split rule in @code{nnmail-split-fancy}
22178 (@pxref{Fancy Mail Splitting}):
22179
22180 @lisp
22181 (...
22182  (to "larsi@@trym.ifi.uio.no"
22183      (| ("subject" "re:.*" "misc")
22184         ("references" ".*@@.*" "misc")
22185         "spam"))
22186  ...)
22187 @end lisp
22188
22189 This says that all mail to this address is suspect, but if it has a
22190 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22191 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22192 (This idea probably comes from Tim Pierce.)
22193
22194 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22195 and do not include your email address explicitly in the @code{To}
22196 header.  Why they do this is unknown---perhaps it's to thwart this
22197 thwarting scheme?  In any case, this is trivial to deal with---you just
22198 put anything not addressed to you in the @samp{spam} group by ending
22199 your fancy split rule in this way:
22200
22201 @lisp
22202 (
22203  ...
22204  (to "larsi" "misc")
22205  "spam")
22206 @end lisp
22207
22208 In my experience, this will sort virtually everything into the right
22209 group.  You still have to check the @samp{spam} group from time to time to
22210 check for legitimate mail, though.  If you feel like being a good net
22211 citizen, you can even send off complaints to the proper authorities on
22212 each unsolicited commercial email---at your leisure.
22213
22214 This works for me.  It allows people an easy way to contact me (they can
22215 just press @kbd{r} in the usual way), and I'm not bothered at all with
22216 spam.  It's a win-win situation.  Forging @code{From} headers to point
22217 to non-existent domains is yucky, in my opinion.
22218
22219
22220
22221 @node SpamAssassin
22222 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22223 @cindex SpamAssassin
22224 @cindex Vipul's Razor
22225 @cindex DCC
22226
22227 The days where the hints in the previous section was sufficient in
22228 avoiding spam are coming to an end.  There are many tools out there
22229 that claim to reduce the amount of spam you get.  This section could
22230 easily become outdated fast, as new products replace old, but
22231 fortunately most of these tools seem to have similar interfaces.  Even
22232 though this section will use SpamAssassin as an example, it should be
22233 easy to adapt it to most other tools.
22234
22235 If the tool you are using is not installed on the mail server, you
22236 need to invoke it yourself.  Ideas on how to use the
22237 @code{:postscript} mail source parameter (@pxref{Mail Source
22238 Specifiers}) follow.
22239
22240 @lisp
22241 (setq mail-sources
22242       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22243         (pop :user "jrl"
22244              :server "pophost"
22245              :postscript
22246              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22247 @end lisp
22248
22249 Once you manage to process your incoming spool somehow, thus making
22250 the mail contain e.g.@: a header indicating it is spam, you are ready to
22251 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22252
22253 @lisp
22254 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22255                              ...))
22256 @end lisp
22257
22258 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22259
22260 @lisp
22261 (setq nnmail-split-methods 'nnmail-split-fancy
22262       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22263                              ...))
22264 @end lisp
22265
22266 Some people might not like the idea of piping the mail through various
22267 programs using a @code{:prescript} (if some program is buggy, you
22268 might lose all mail).  If you are one of them, another solution is to
22269 call the external tools during splitting.  Example fancy split method:
22270
22271 @lisp
22272 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22273                              ...))
22274 (defun kevin-spamassassin ()
22275   (save-excursion
22276     (widen)
22277     (if (eq 1 (call-process-region (point-min) (point-max)
22278                                    "spamc" nil nil nil "-c"))
22279         "spam")))
22280 @end lisp
22281
22282 Note that with the nnimap backend, message bodies will not be
22283 downloaded by default.  You need to set
22284 @code{nnimap-split-download-body} to t to do that (@pxref{Splitting in
22285 IMAP}).
22286
22287 That is about it.  As some spam is likely to get through anyway, you
22288 might want to have a nifty function to call when you happen to read
22289 spam.  And here is the nifty function:
22290
22291 @lisp
22292  (defun my-gnus-raze-spam ()
22293   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22294   (interactive)
22295   (gnus-summary-show-raw-article)
22296   (gnus-summary-save-in-pipe "razor-report -f -d")
22297   (gnus-summary-mark-as-expirable 1))
22298 @end lisp
22299
22300 @node Hashcash
22301 @subsection Hashcash
22302 @cindex hashcash
22303
22304 A novel technique to fight spam is to require senders to do something
22305 costly for each message they send.  This has the obvious drawback that
22306 you cannot rely on everyone in the world using this technique,
22307 since it is not part of the Internet standards, but it may be useful
22308 in smaller communities.
22309
22310 While the tools in the previous section work well in practice, they
22311 work only because the tools are constantly maintained and updated as
22312 new form of spam appears.  This means that a small percentage of spam
22313 will always get through.  It also means that somewhere, someone needs
22314 to read lots of spam to update these tools.  Hashcash avoids that, but
22315 instead requires that everyone you communicate with supports the
22316 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22317 The approaches have their own advantages and disadvantages, but as
22318 often in the real world, a combination of them is stronger than either
22319 one of them separately.
22320
22321 @cindex X-Hashcash
22322 The ``something costly'' is to burn CPU time, more specifically to
22323 compute a hash collision up to a certain number of bits.  The
22324 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22325 header.  For more details, and for the external application
22326 @code{hashcash} you need to install to use this feature, see
22327 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22328 information can be found at @uref{http://www.camram.org/}.
22329
22330 If you wish to call hashcash for each message you send, say something
22331 like:
22332
22333 @lisp
22334 (require 'hashcash)
22335 (add-hook 'message-send-hook 'mail-add-payment)
22336 @end lisp
22337
22338 The @file{hashcash.el} library can be found in the Gnus development
22339 contrib directory or at
22340 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22341
22342 You will need to set up some additional variables as well:
22343
22344 @table @code
22345
22346 @item hashcash-default-payment
22347 @vindex hashcash-default-payment
22348 This variable indicates the default number of bits the hash collision
22349 should consist of.  By default this is 0, meaning nothing will be
22350 done.  Suggested useful values include 17 to 29.
22351
22352 @item hashcash-payment-alist
22353 @vindex hashcash-payment-alist
22354 Some receivers may require you to spend burn more CPU time than the
22355 default.  This variable contains a list of @samp{(@var{addr}
22356 @var{amount})} cells, where @var{addr} is the receiver (email address
22357 or newsgroup) and @var{amount} is the number of bits in the collision
22358 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22359 @var{amount})} cells, where the @var{string} is the string to use
22360 (normally the email address or newsgroup name is used).
22361
22362 @item hashcash
22363 @vindex hashcash
22364 Where the @code{hashcash} binary is installed.
22365
22366 @end table
22367
22368 Currently there is no built in functionality in Gnus to verify
22369 hashcash cookies, it is expected that this is performed by your hand
22370 customized mail filtering scripts.  Improvements in this area would be
22371 a useful contribution, however.
22372
22373 @node Filtering Spam Using The Spam ELisp Package
22374 @subsection Filtering Spam Using The Spam ELisp Package
22375 @cindex spam filtering
22376 @cindex spam
22377
22378 The idea behind @file{spam.el} is to have a control center for spam detection
22379 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22380 filters incoming mail, and it analyzes mail known to be spam or ham.
22381 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22382 non-spam messages.
22383
22384 First of all, you @strong{must} run the function
22385 @code{spam-initialize} to autoload @code{spam.el} and to install the
22386 @code{spam.el} hooks.  There is one exception: if you use the
22387 @code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
22388 should turn it on before @code{spam-initialize}:
22389
22390 @example
22391 (setq spam-use-stat t) ;; if needed
22392 (spam-initialize)
22393 @end example
22394
22395 So, what happens when you load @file{spam.el}?
22396
22397 You get the following keyboard commands:
22398
22399 @table @kbd
22400
22401 @item M-d
22402 @itemx M s x
22403 @itemx S x
22404 @kindex M-d
22405 @kindex S x
22406 @kindex M s x
22407 @findex gnus-summary-mark-as-spam
22408 @code{gnus-summary-mark-as-spam}.
22409
22410 Mark current article as spam, showing it with the @samp{$} mark.
22411 Whenever you see a spam article, make sure to mark its summary line
22412 with @kbd{M-d} before leaving the group.  This is done automatically
22413 for unread articles in @emph{spam} groups.
22414
22415 @item M s t
22416 @itemx S t
22417 @kindex M s t
22418 @kindex S t
22419 @findex spam-bogofilter-score
22420 @code{spam-bogofilter-score}.
22421
22422 You must have Bogofilter installed for that command to work properly.
22423
22424 @xref{Bogofilter}.
22425
22426 @end table
22427
22428 Also, when you load @file{spam.el}, you will be able to customize its
22429 variables.  Try @code{customize-group} on the @samp{spam} variable
22430 group.
22431
22432 @vindex gnus-spam-process-newsgroups
22433 The concepts of ham processors and spam processors are very important.
22434 Ham processors and spam processors for a group can be set with the
22435 @code{spam-process} group parameter, or the
22436 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22437 mail known to be non-spam (@emph{ham}) and process it in some way so
22438 that later similar mail will also be considered non-spam.  Spam
22439 processors take mail known to be spam and process it so similar spam
22440 will be detected later.
22441
22442 @vindex gnus-spam-newsgroup-contents
22443 Gnus learns from the spam you get.  You have to collect your spam in
22444 one or more spam groups, and set or customize the variable
22445 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22446 groups to contain spam by setting their group parameter
22447 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22448 by customizing the corresponding variable
22449 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22450 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22451 also be used to declare groups as @emph{ham} groups if you set their
22452 classification to @code{gnus-group-spam-classification-ham}.  If
22453 groups are not classified by means of @code{spam-junk-mailgroups},
22454 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22455 considered @emph{unclassified}.  All groups are unclassified by
22456 default.
22457
22458 @vindex gnus-spam-mark
22459 @cindex $
22460 In spam groups, all messages are considered to be spam by default:
22461 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22462 group.  If you have seen a message, had it marked as spam, then
22463 unmarked it, it won't be marked as spam when you enter the group
22464 thereafter.  You can disable that behavior, so all unread messages
22465 will get the @samp{$} mark, if you set the
22466 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
22467 should remove the @samp{$} mark when you are in the group summary
22468 buffer for every message that is not spam after all.  To remove the
22469 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
22470 @kbd{d} for declaring it read the non-spam way.  When you leave a
22471 group, all spam-marked (@samp{$}) articles are sent to a spam
22472 processor which will study them as spam samples.
22473
22474 Messages may also be deleted in various other ways, and unless
22475 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22476 and @samp{r} for default read or explicit delete, marks @samp{X} and
22477 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22478 low scores, are all considered to be associated with articles which
22479 are not spam.  This assumption might be false, in particular if you
22480 use kill files or score files as means for detecting genuine spam, you
22481 should then adjust the @code{ham-marks} group parameter.
22482
22483 @defvar ham-marks
22484 You can customize this group or topic parameter to be the list of
22485 marks you want to consider ham.  By default, the list contains the
22486 deleted, read, killed, kill-filed, and low-score marks.
22487 @end defvar
22488
22489 @defvar spam-marks
22490 You can customize this group or topic parameter to be the list of
22491 marks you want to consider spam.  By default, the list contains only
22492 the spam mark.
22493 @end defvar
22494
22495 When you leave @emph{any} group, regardless of its
22496 @code{spam-contents} classification, all spam-marked articles are sent
22497 to a spam processor, which will study these as spam samples.  If you
22498 explicit kill a lot, you might sometimes end up with articles marked
22499 @samp{K} which you never saw, and which might accidentally contain
22500 spam.  Best is to make sure that real spam is marked with @samp{$},
22501 and nothing else.
22502
22503 @vindex gnus-ham-process-destinations
22504 When you leave a @emph{spam} group, all spam-marked articles are
22505 marked as expired after processing with the spam processor.  This is
22506 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22507 @strong{ham} articles in a spam group will be moved to a location
22508 determined by either the @code{ham-process-destination} group
22509 parameter or a match in the @code{gnus-ham-process-destinations}
22510 variable, which is a list of regular expressions matched with group
22511 names (it's easiest to customize this variable with
22512 @code{customize-variable gnus-ham-process-destinations}).  Each
22513 newsgroup specification has the format (REGEXP PROCESSOR) in a
22514 standard Lisp list, if you prefer to customize the variable manually.
22515 The ultimate location is a group name.  If the
22516 @code{ham-process-destination} parameter is not set, ham articles are
22517 left in place.  If the
22518 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22519 set, the ham articles are marked as unread before being moved.
22520
22521 When you leave a @emph{ham} group, all ham-marked articles are sent to
22522 a ham processor, which will study these as non-spam samples.
22523
22524 @vindex spam-process-ham-in-spam-groups
22525 By default the variable @code{spam-process-ham-in-spam-groups} is
22526 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
22527 to be processed.  Normally this is not done, you are expected instead
22528 to send your ham to a ham group and process it there.
22529
22530 @vindex spam-process-ham-in-nonham-groups
22531 By default the variable @code{spam-process-ham-in-nonham-groups} is
22532 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
22533 or unclassified) groups to be processed.  Normally this is not done,
22534 you are expected instead to send your ham to a ham group and process
22535 it there.
22536
22537 @vindex gnus-spam-process-destinations
22538 When you leave a @emph{ham} or @emph{unclassified} group, all
22539 @strong{spam} articles are moved to a location determined by either
22540 the @code{spam-process-destination} group parameter or a match in the
22541 @code{gnus-spam-process-destinations} variable, which is a list of
22542 regular expressions matched with group names (it's easiest to
22543 customize this variable with @code{customize-variable
22544 gnus-spam-process-destinations}).  Each newsgroup specification has
22545 the repeated format (REGEXP PROCESSOR) and they are all in a standard
22546 Lisp list, if you prefer to customize the variable manually.  The
22547 ultimate location is a group name.  If the
22548 @code{spam-process-destination} parameter is not set, the spam
22549 articles are only expired.
22550
22551 To use the @file{spam.el} facilities for incoming mail filtering, you
22552 must add the following to your fancy split list
22553 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22554
22555 @example
22556 (: spam-split)
22557 @end example
22558
22559 Note that the fancy split may be called @code{nnmail-split-fancy} or
22560 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22561 nnimap back ends to retrieve your mail.
22562
22563 The @code{spam-split} function will process incoming mail and send the
22564 mail considered to be spam into the group name given by the variable
22565 @code{spam-split-group}.  By default that group name is @samp{spam},
22566 but you can customize @code{spam-split-group}.  Make sure the contents
22567 of @code{spam-split-group} are an @emph{unqualified} group name, for
22568 instance in an @code{nnimap} server @samp{your-server} the value
22569 @samp{spam} will turn out to be @samp{nnimap+your-server:spam}.  The
22570 value @samp{nnimap+server:spam}, therefore, is wrong and will
22571 actually give you the group
22572 @samp{nnimap+your-server:nnimap+server:spam} which may or may not
22573 work depending on your server's tolerance for strange group names.
22574
22575 You can also give @code{spam-split} a parameter,
22576 e.g. @samp{'spam-use-regex-headers} or @samp{"maybe-spam"}.  Why is
22577 this useful?
22578
22579 Take these split rules (with @code{spam-use-regex-headers} and
22580 @code{spam-use-blackholes} set):
22581
22582 @example
22583  nnimap-split-fancy '(|
22584                       (any "ding" "ding")
22585                       (: spam-split)
22586                       ;; default mailbox
22587                       "mail")
22588 @end example
22589
22590 Now, the problem is that you want all ding messages to make it to the
22591 ding folder.  But that will let obvious spam (for example, spam
22592 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22593 when it's sent to the ding list.  On the other hand, some messages to
22594 the ding list are from a mail server in the blackhole list, so the
22595 invocation of @code{spam-split} can't be before the ding rule.
22596
22597 You can let SpamAssassin headers supersede ding rules, but all other
22598 @code{spam-split} rules (including a second invocation of the
22599 regex-headers check) will be after the ding rule:
22600
22601 @example
22602  nnimap-split-fancy '(|
22603 ;;; all spam detected by spam-use-regex-headers goes to "regex-spam"
22604                       (: spam-split "regex-spam" 'spam-use-regex-headers)
22605                       (any "ding" "ding")
22606 ;;; all other spam detected by spam-split goes to spam-split-group
22607                       (: spam-split)
22608                       ;; default mailbox
22609                       "mail")
22610 @end example
22611
22612 Basically, this lets you invoke specific @code{spam-split} checks
22613 depending on your particular needs, and to target the results of those
22614 checks to a particular spam group.  You don't have to throw all mail
22615 into all the spam tests.  Another reason why this is nice is that
22616 messages to mailing lists you have rules for don't have to have
22617 resource-intensive blackhole checks performed on them.  You could also
22618 specify different spam checks for your nnmail split vs. your nnimap
22619 split.  Go crazy.
22620
22621 You still have to have specific checks such as
22622 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22623 invoke @code{spam-split} with the check.  The reason is that when
22624 loading @file{spam.el}, some conditional loading is done depending on
22625 what @code{spam-use-xyz} variables you have set.
22626
22627 @emph{Note for IMAP users}
22628
22629 The boolean variable @code{nnimap-split-download-body} needs to be
22630 set, if you want to split based on the whole message instead of just
22631 the headers.  By default, the nnimap back end will only retrieve the
22632 message headers.  If you use @code{spam-check-bogofilter},
22633 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22634 can benefit from the full message body), you should set this variable.
22635 It is not set by default because it will slow @acronym{IMAP} down, and
22636 that is not an appropriate decision to make on behalf of the user.
22637
22638 @xref{Splitting in IMAP}.
22639
22640 @emph{TODO: Currently, spam.el only supports insertion of articles
22641 into a back end.  There is no way to tell spam.el that an article is no
22642 longer spam or ham.}
22643
22644 @emph{TODO: spam.el needs to provide a uniform way of training all the
22645 statistical databases.  Some have that functionality built-in, others
22646 don't.}
22647
22648 The following are the methods you can use to control the behavior of
22649 @code{spam-split} and their corresponding spam and ham processors:
22650
22651 @menu
22652 * Blacklists and Whitelists::
22653 * BBDB Whitelists::
22654 * Gmane Spam Reporting::
22655 * Anti-spam Hashcash Payments::
22656 * Blackholes::
22657 * Regular Expressions Header Matching::
22658 * Bogofilter::
22659 * ifile spam filtering::
22660 * spam-stat spam filtering::
22661 * SpamOracle::
22662 * Extending the spam elisp package::
22663 @end menu
22664
22665 @node Blacklists and Whitelists
22666 @subsubsection Blacklists and Whitelists
22667 @cindex spam filtering
22668 @cindex whitelists, spam filtering
22669 @cindex blacklists, spam filtering
22670 @cindex spam
22671
22672 @defvar spam-use-blacklist
22673
22674 Set this variable to @code{t} if you want to use blacklists when
22675 splitting incoming mail.  Messages whose senders are in the blacklist
22676 will be sent to the @code{spam-split-group}.  This is an explicit
22677 filter, meaning that it acts only on mail senders @emph{declared} to
22678 be spammers.
22679
22680 @end defvar
22681
22682 @defvar spam-use-whitelist
22683
22684 Set this variable to @code{t} if you want to use whitelists when
22685 splitting incoming mail.  Messages whose senders are not in the
22686 whitelist will be sent to the next spam-split rule.  This is an
22687 explicit filter, meaning that unless someone is in the whitelist, their
22688 messages are not assumed to be spam or ham.
22689
22690 @end defvar
22691
22692 @defvar spam-use-whitelist-exclusive
22693
22694 Set this variable to @code{t} if you want to use whitelists as an
22695 implicit filter, meaning that every message will be considered spam
22696 unless the sender is in the whitelist.  Use with care.
22697
22698 @end defvar
22699
22700 @defvar gnus-group-spam-exit-processor-blacklist
22701
22702 Add this symbol to a group's @code{spam-process} parameter by
22703 customizing the group parameters or the
22704 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22705 added to a group's @code{spam-process} parameter, the senders of
22706 spam-marked articles will be added to the blacklist.
22707
22708 @end defvar
22709
22710 @defvar gnus-group-ham-exit-processor-whitelist
22711
22712 Add this symbol to a group's @code{spam-process} parameter by
22713 customizing the group parameters or the
22714 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22715 added to a group's @code{spam-process} parameter, the senders of
22716 ham-marked articles in @emph{ham} groups will be added to the
22717 whitelist.  Note that this ham processor has no effect in @emph{spam}
22718 or @emph{unclassified} groups.
22719
22720 @end defvar
22721
22722 Blacklists are lists of regular expressions matching addresses you
22723 consider to be spam senders.  For instance, to block mail from any
22724 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22725 blacklist.  You start out with an empty blacklist.  Blacklist entries
22726 use the Emacs regular expression syntax.
22727
22728 Conversely, whitelists tell Gnus what addresses are considered
22729 legitimate.  All messages from whitelisted addresses are considered
22730 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22731 Emacs regular expression syntax.
22732
22733 The blacklist and whitelist file locations can be customized with the
22734 @code{spam-directory} variable (@file{~/News/spam} by default), or
22735 the @code{spam-whitelist} and @code{spam-blacklist} variables
22736 directly.  The whitelist and blacklist files will by default be in the
22737 @code{spam-directory} directory, named @file{whitelist} and
22738 @file{blacklist} respectively.
22739
22740 @node BBDB Whitelists
22741 @subsubsection BBDB Whitelists
22742 @cindex spam filtering
22743 @cindex BBDB whitelists, spam filtering
22744 @cindex BBDB, spam filtering
22745 @cindex spam
22746
22747 @defvar spam-use-BBDB
22748
22749 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22750 Whitelists}), but uses the BBDB as the source of whitelisted
22751 addresses, without regular expressions.  You must have the BBDB loaded
22752 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22753 not in the BBDB will be sent to the next spam-split rule.  This is an
22754 explicit filter, meaning that unless someone is in the BBDB, their
22755 messages are not assumed to be spam or ham.
22756
22757 @end defvar
22758
22759 @defvar spam-use-BBDB-exclusive
22760
22761 Set this variable to @code{t} if you want to use the BBDB as an
22762 implicit filter, meaning that every message will be considered spam
22763 unless the sender is in the BBDB.  Use with care.  Only sender
22764 addresses in the BBDB will be allowed through; all others will be
22765 classified as spammers.
22766
22767 @end defvar
22768
22769 @defvar gnus-group-ham-exit-processor-BBDB
22770
22771 Add this symbol to a group's @code{spam-process} parameter by
22772 customizing the group parameters or the
22773 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22774 added to a group's @code{spam-process} parameter, the senders of
22775 ham-marked articles in @emph{ham} groups will be added to the
22776 BBDB.  Note that this ham processor has no effect in @emph{spam}
22777 or @emph{unclassified} groups.
22778
22779 @end defvar
22780
22781 @node Gmane Spam Reporting
22782 @subsubsection Gmane Spam Reporting
22783 @cindex spam reporting
22784 @cindex Gmane, spam reporting
22785 @cindex Gmane, spam reporting
22786 @cindex spam
22787
22788 @defvar gnus-group-spam-exit-processor-report-gmane
22789
22790 Add this symbol to a group's @code{spam-process} parameter by
22791 customizing the group parameters or the
22792 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22793 added to a group's @code{spam-process} parameter, the spam-marked
22794 articles groups will be reported to the Gmane administrators via a
22795 HTTP request.
22796
22797 Gmane can be found at @uref{http://gmane.org}.
22798
22799 @end defvar
22800
22801 @defvar spam-report-gmane-use-article-number
22802
22803 This variable is @code{t} by default.  Set it to @code{nil} if you are
22804 running your own news server, for instance, and the local article
22805 numbers don't correspond to the Gmane article numbers.  When
22806 @code{spam-report-gmane-use-article-number} is @code{nil},
22807 @code{spam-report.el} will use the @code{X-Report-Spam} header that
22808 Gmane provides.
22809
22810 @end defvar
22811
22812 @node Anti-spam Hashcash Payments
22813 @subsubsection Anti-spam Hashcash Payments
22814 @cindex spam filtering
22815 @cindex hashcash, spam filtering
22816 @cindex spam
22817
22818 @defvar spam-use-hashcash
22819
22820 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22821 Whitelists}), but uses hashcash tokens for whitelisting messages
22822 instead of the sender address.  You must have the @code{hashcash.el}
22823 package loaded for @code{spam-use-hashcash} to work properly.
22824 Messages without a hashcash payment token will be sent to the next
22825 spam-split rule.  This is an explicit filter, meaning that unless a
22826 hashcash token is found, the messages are not assumed to be spam or
22827 ham.
22828
22829 @end defvar
22830
22831 @node Blackholes
22832 @subsubsection Blackholes
22833 @cindex spam filtering
22834 @cindex blackholes, spam filtering
22835 @cindex spam
22836
22837 @defvar spam-use-blackholes
22838
22839 This option is disabled by default.  You can let Gnus consult the
22840 blackhole-type distributed spam processing systems (DCC, for instance)
22841 when you set this option.  The variable @code{spam-blackhole-servers}
22842 holds the list of blackhole servers Gnus will consult.  The current
22843 list is fairly comprehensive, but make sure to let us know if it
22844 contains outdated servers.
22845
22846 The blackhole check uses the @code{dig.el} package, but you can tell
22847 @file{spam.el} to use @code{dns.el} instead for better performance if
22848 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22849 this time to set @code{spam-use-dig} to @code{nil} despite the
22850 possible performance improvements, because some users may be unable to
22851 use it, but you can try it and see if it works for you.
22852
22853 @end defvar
22854
22855 @defvar spam-blackhole-servers
22856
22857 The list of servers to consult for blackhole checks.
22858
22859 @end defvar
22860
22861 @defvar spam-blackhole-good-server-regex
22862
22863 A regular expression for IPs that should not be checked against the
22864 blackhole server list.  When set to @code{nil}, it has no effect.
22865
22866 @end defvar
22867
22868 @defvar spam-use-dig
22869
22870 Use the @code{dig.el} package instead of the @code{dns.el} package.
22871 The default setting of @code{t} is recommended.
22872
22873 @end defvar
22874
22875 Blackhole checks are done only on incoming mail.  There is no spam or
22876 ham processor for blackholes.
22877
22878 @node Regular Expressions Header Matching
22879 @subsubsection Regular Expressions Header Matching
22880 @cindex spam filtering
22881 @cindex regular expressions header matching, spam filtering
22882 @cindex spam
22883
22884 @defvar spam-use-regex-headers
22885
22886 This option is disabled by default.  You can let Gnus check the
22887 message headers against lists of regular expressions when you set this
22888 option.  The variables @code{spam-regex-headers-spam} and
22889 @code{spam-regex-headers-ham} hold the list of regular expressions.
22890 Gnus will check against the message headers to determine if the
22891 message is spam or ham, respectively.
22892
22893 @end defvar
22894
22895 @defvar spam-regex-headers-spam
22896
22897 The list of regular expressions that, when matched in the headers of
22898 the message, positively identify it as spam.
22899
22900 @end defvar
22901
22902 @defvar spam-regex-headers-ham
22903
22904 The list of regular expressions that, when matched in the headers of
22905 the message, positively identify it as ham.
22906
22907 @end defvar
22908
22909 Regular expression header checks are done only on incoming mail.
22910 There is no specific spam or ham processor for regular expressions.
22911
22912 @node Bogofilter
22913 @subsubsection Bogofilter
22914 @cindex spam filtering
22915 @cindex bogofilter, spam filtering
22916 @cindex spam
22917
22918 @defvar spam-use-bogofilter
22919
22920 Set this variable if you want @code{spam-split} to use Eric Raymond's
22921 speedy Bogofilter.
22922
22923 With a minimum of care for associating the @samp{$} mark for spam
22924 articles only, Bogofilter training all gets fairly automatic.  You
22925 should do this until you get a few hundreds of articles in each
22926 category, spam or not.  The command @kbd{S t} in summary mode, either
22927 for debugging or for curiosity, shows the @emph{spamicity} score of
22928 the current article (between 0.0 and 1.0).
22929
22930 Bogofilter determines if a message is spam based on a specific
22931 threshold.  That threshold can be customized, consult the Bogofilter
22932 documentation.
22933
22934 If the @code{bogofilter} executable is not in your path, Bogofilter
22935 processing will be turned off.
22936
22937 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22938
22939 @end defvar
22940
22941 @defvar spam-use-bogofilter-headers
22942
22943 Set this variable if you want @code{spam-split} to use Eric Raymond's
22944 speedy Bogofilter, looking only at the message headers.  It works
22945 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22946 must be in the message already.  Normally you would do this with a
22947 procmail recipe or something similar; consult the Bogofilter
22948 installation documents for details.
22949
22950 You should not enable this if you use @code{spam-use-bogofilter}.
22951
22952 @end defvar
22953
22954 @defvar gnus-group-spam-exit-processor-bogofilter
22955 Add this symbol to a group's @code{spam-process} parameter by
22956 customizing the group parameters or the
22957 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22958 added to a group's @code{spam-process} parameter, spam-marked articles
22959 will be added to the Bogofilter spam database.
22960 @end defvar
22961
22962 @defvar gnus-group-ham-exit-processor-bogofilter
22963 Add this symbol to a group's @code{spam-process} parameter by
22964 customizing the group parameters or the
22965 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22966 added to a group's @code{spam-process} parameter, the ham-marked
22967 articles in @emph{ham} groups will be added to the Bogofilter database
22968 of non-spam messages.  Note that this ham processor has no effect in
22969 @emph{spam} or @emph{unclassified} groups.
22970 @end defvar
22971
22972 @defvar spam-bogofilter-database-directory
22973
22974 This is the directory where Bogofilter will store its databases.  It
22975 is not specified by default, so Bogofilter will use its own default
22976 database directory.
22977
22978 @end defvar
22979
22980 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22981 purpose.  A ham and a spam processor are provided, plus the
22982 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22983 variables to indicate to spam-split that Bogofilter should either be
22984 used, or has already been used on the article.  The 0.9.2.1 version of
22985 Bogofilter was used to test this functionality.
22986
22987 @node ifile spam filtering
22988 @subsubsection ifile spam filtering
22989 @cindex spam filtering
22990 @cindex ifile, spam filtering
22991 @cindex spam
22992
22993 @defvar spam-use-ifile
22994
22995 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22996 statistical analyzer similar to Bogofilter.
22997
22998 @end defvar
22999
23000 @defvar spam-ifile-all-categories
23001
23002 Enable this variable if you want @code{spam-use-ifile} to give you all
23003 the ifile categories, not just spam/non-spam.  If you use this, make
23004 sure you train ifile as described in its documentation.
23005
23006 @end defvar
23007
23008 @defvar spam-ifile-spam-category
23009
23010 This is the category of spam messages as far as ifile is concerned.
23011 The actual string used is irrelevant, but you probably want to leave
23012 the default value of @samp{spam}.
23013 @end defvar
23014
23015 @defvar spam-ifile-database-path
23016
23017 This is the filename for the ifile database.  It is not specified by
23018 default, so ifile will use its own default database name.
23019
23020 @end defvar
23021
23022 The ifile mail classifier is similar to Bogofilter in intent and
23023 purpose.  A ham and a spam processor are provided, plus the
23024 @code{spam-use-ifile} variable to indicate to spam-split that ifile
23025 should be used.  The 1.2.1 version of ifile was used to test this
23026 functionality.
23027
23028 @node spam-stat spam filtering
23029 @subsubsection spam-stat spam filtering
23030 @cindex spam filtering
23031 @cindex spam-stat, spam filtering
23032 @cindex spam-stat
23033 @cindex spam
23034
23035 @xref{Filtering Spam Using Statistics with spam-stat}.
23036
23037 @defvar spam-use-stat
23038
23039 Enable this variable if you want @code{spam-split} to use
23040 spam-stat.el, an Emacs Lisp statistical analyzer.
23041
23042 @end defvar
23043
23044 @defvar gnus-group-spam-exit-processor-stat
23045 Add this symbol to a group's @code{spam-process} parameter by
23046 customizing the group parameters or the
23047 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23048 added to a group's @code{spam-process} parameter, the spam-marked
23049 articles will be added to the spam-stat database of spam messages.
23050 @end defvar
23051
23052 @defvar gnus-group-ham-exit-processor-stat
23053 Add this symbol to a group's @code{spam-process} parameter by
23054 customizing the group parameters or the
23055 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23056 added to a group's @code{spam-process} parameter, the ham-marked
23057 articles in @emph{ham} groups will be added to the spam-stat database
23058 of non-spam messages.  Note that this ham processor has no effect in
23059 @emph{spam} or @emph{unclassified} groups.
23060 @end defvar
23061
23062 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
23063 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
23064 which unlike ifile or Bogofilter does not require external programs.
23065 A spam and a ham processor, and the @code{spam-use-stat} variable for
23066 @code{spam-split} are provided.
23067
23068 @node SpamOracle
23069 @subsubsection Using SpamOracle with Gnus
23070 @cindex spam filtering
23071 @cindex SpamOracle
23072 @cindex spam
23073
23074 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
23075 statistical mail filtering tool written by Xavier Leroy and needs to be
23076 installed separately.
23077
23078 There are several ways to use SpamOracle with Gnus.  In all cases, your
23079 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
23080 then enter an @samp{X-Spam} header indicating whether it regards the
23081 mail as a spam mail or not.
23082
23083 One possibility is to run SpamOracle as a @code{:prescript} from the
23084 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
23085 the advantage that the user can see the @emph{X-Spam} headers.
23086
23087 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
23088 Using The Spam ELisp Package}) call SpamOracle.
23089
23090 @vindex spam-use-spamoracle
23091 To enable SpamOracle usage by @file{spam.el}, set the variable
23092 @code{spam-use-spamoracle} to @code{t} and configure the
23093 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
23094 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
23095 this example the @samp{INBOX} of an nnimap server is filtered using
23096 SpamOracle.  Mails recognized as spam mails will be moved to
23097 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
23098 in @samp{INBOX}:
23099
23100 @example
23101 (setq spam-use-spamoracle t
23102       spam-split-group "Junk"
23103       nnimap-split-inbox '("INBOX")
23104       nnimap-split-rule 'nnimap-split-fancy
23105       nnimap-split-fancy '(| (: spam-split) "INBOX"))
23106 @end example
23107
23108 @defvar spam-use-spamoracle
23109 Set to @code{t} if you want Gnus to enable spam filtering using
23110 SpamOracle.
23111 @end defvar
23112
23113 @defvar spam-spamoracle-binary
23114 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
23115 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
23116 can be customized.
23117 @end defvar
23118
23119 @defvar spam-spamoracle-database
23120 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
23121 store its analyses.  This is controlled by the variable
23122 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
23123 the default SpamOracle database will be used.  In case you want your
23124 database to live somewhere special, set
23125 @code{spam-spamoracle-database} to this path.
23126 @end defvar
23127
23128 SpamOracle employs a statistical algorithm to determine whether a
23129 message is spam or ham.  In order to get good results, meaning few
23130 false hits or misses, SpamOracle needs training.  SpamOracle learns the
23131 characteristics of your spam mails.  Using the @emph{add} mode
23132 (training mode) one has to feed good (ham) and spam mails to
23133 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
23134 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
23135 spam- and ham-processors, which is much more convenient.  For a
23136 detailed description of spam- and ham-processors, @xref{Filtering Spam
23137 Using The Spam ELisp Package}.
23138
23139 @defvar gnus-group-spam-exit-processor-spamoracle
23140 Add this symbol to a group's @code{spam-process} parameter by
23141 customizing the group parameter or the
23142 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23143 to a group's @code{spam-process} parameter, spam-marked articles will be
23144 sent to SpamOracle as spam samples.
23145 @end defvar
23146
23147 @defvar gnus-group-ham-exit-processor-spamoracle
23148 Add this symbol to a group's @code{spam-process} parameter by
23149 customizing the group parameter or the
23150 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23151 to a grup's @code{spam-process} parameter, the ham-marked articles in
23152 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23153 messages.  Note that this ham processor has no effect in @emph{spam} or
23154 @emph{unclassified} groups.
23155 @end defvar
23156
23157 @emph{Example:} These are the Group Parameters of an group that has been
23158 classified as a ham group, meaning that it should only contain ham
23159 messages.
23160 @example
23161  ((spam-contents gnus-group-spam-classification-ham)
23162   (spam-process
23163    (gnus-group-spam-exit-processor-spamoracle)))
23164 @end example
23165 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
23166 installed.  If the group contains spam message (e.g. because SpamOracle
23167 has not had enough sample messages yet) and the user marks some
23168 messages as spam messages, these messages will be processed by
23169 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23170 the messages to SpamOracle as new samples for spam.
23171
23172 @node Extending the spam elisp package
23173 @subsubsection Extending the spam elisp package
23174 @cindex spam filtering
23175 @cindex spam elisp package, extending
23176 @cindex extending the spam elisp package
23177
23178 Say you want to add a new back end called blackbox.  For filtering
23179 incoming mail, provide the following:
23180
23181 @enumerate
23182
23183 @item
23184 code
23185
23186 @lisp
23187 (defvar spam-use-blackbox nil
23188   "True if blackbox should be used.")
23189 @end lisp
23190
23191 Add
23192 @example
23193     (spam-use-blackbox   . spam-check-blackbox)
23194 @end example
23195 to @code{spam-list-of-checks}.
23196
23197 @item
23198 functionality
23199
23200 Write the @code{spam-check-blackbox} function.  It should return
23201 @samp{nil} or @code{spam-split-group}.  See the existing
23202 @code{spam-check-*} functions for examples of what you can do.
23203
23204 Make sure to add @code{spam-use-blackbox} to
23205 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23206 mail analyzer that needs the full message body to operate.
23207
23208 @end enumerate
23209
23210 For processing spam and ham messages, provide the following:
23211
23212 @enumerate
23213
23214 @item
23215 code
23216
23217 Note you don't have to provide a spam or a ham processor.  Only
23218 provide them if Blackbox supports spam or ham processing.
23219
23220 @lisp
23221 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23222   "The Blackbox summary exit spam processor.
23223 Only applicable to spam groups.")
23224
23225 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23226   "The whitelist summary exit ham processor.
23227 Only applicable to non-spam (unclassified and ham) groups.")
23228
23229 @end lisp
23230
23231 @item
23232 functionality
23233
23234 @lisp
23235 (defun spam-blackbox-register-spam-routine ()
23236   (spam-generic-register-routine
23237    ;; @r{the spam function}
23238    (lambda (article)
23239      (let ((from (spam-fetch-field-from-fast article)))
23240        (when (stringp from)
23241            (blackbox-do-something-with-this-spammer from))))
23242    ;; @r{the ham function}
23243    nil))
23244
23245 (defun spam-blackbox-register-ham-routine ()
23246   (spam-generic-register-routine
23247    ;; @r{the spam function}
23248    nil
23249    ;; @r{the ham function}
23250    (lambda (article)
23251      (let ((from (spam-fetch-field-from-fast article)))
23252        (when (stringp from)
23253            (blackbox-do-something-with-this-ham-sender from))))))
23254 @end lisp
23255
23256 Write the @code{blackbox-do-something-with-this-ham-sender} and
23257 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23258 more complex code than fetching the message sender, but keep in mind
23259 that retrieving the whole message takes significantly longer than the
23260 sender through @code{spam-fetch-field-from-fast}, because the message
23261 senders are kept in memory by Gnus.
23262
23263 @end enumerate
23264
23265
23266 @node Filtering Spam Using Statistics with spam-stat
23267 @subsection Filtering Spam Using Statistics with spam-stat
23268 @cindex Paul Graham
23269 @cindex Graham, Paul
23270 @cindex naive Bayesian spam filtering
23271 @cindex Bayesian spam filtering, naive
23272 @cindex spam filtering, naive Bayesian
23273
23274 Paul Graham has written an excellent essay about spam filtering using
23275 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23276 Spam}.  In it he describes the inherent deficiency of rule-based
23277 filtering as used by SpamAssassin, for example: Somebody has to write
23278 the rules, and everybody else has to install these rules.  You are
23279 always late.  It would be much better, he argues, to filter mail based
23280 on whether it somehow resembles spam or non-spam.  One way to measure
23281 this is word distribution.  He then goes on to describe a solution
23282 that checks whether a new mail resembles any of your other spam mails
23283 or not.
23284
23285 The basic idea is this:  Create a two collections of your mail, one
23286 with spam, one with non-spam.  Count how often each word appears in
23287 either collection, weight this by the total number of mails in the
23288 collections, and store this information in a dictionary.  For every
23289 word in a new mail, determine its probability to belong to a spam or a
23290 non-spam mail.  Use the 15 most conspicuous words, compute the total
23291 probability of the mail being spam.  If this probability is higher
23292 than a certain threshold, the mail is considered to be spam.
23293
23294 Gnus supports this kind of filtering.  But it needs some setting up.
23295 First, you need two collections of your mail, one with spam, one with
23296 non-spam.  Then you need to create a dictionary using these two
23297 collections, and save it.  And last but not least, you need to use
23298 this dictionary in your fancy mail splitting rules.
23299
23300 @menu
23301 * Creating a spam-stat dictionary::
23302 * Splitting mail using spam-stat::
23303 * Low-level interface to the spam-stat dictionary::
23304 @end menu
23305
23306 @node Creating a spam-stat dictionary
23307 @subsubsection Creating a spam-stat dictionary
23308
23309 Before you can begin to filter spam based on statistics, you must
23310 create these statistics based on two mail collections, one with spam,
23311 one with non-spam.  These statistics are then stored in a dictionary
23312 for later use.  In order for these statistics to be meaningful, you
23313 need several hundred emails in both collections.
23314
23315 Gnus currently supports only the nnml back end for automated dictionary
23316 creation.  The nnml back end stores all mails in a directory, one file
23317 per mail.  Use the following:
23318
23319 @defun spam-stat-process-spam-directory
23320 Create spam statistics for every file in this directory.  Every file
23321 is treated as one spam mail.
23322 @end defun
23323
23324 @defun spam-stat-process-non-spam-directory
23325 Create non-spam statistics for every file in this directory.  Every
23326 file is treated as one non-spam mail.
23327 @end defun
23328
23329 Usually you would call @code{spam-stat-process-spam-directory} on a
23330 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23331 the the group @samp{nnml:mail.spam}), and you would call
23332 @code{spam-stat-process-non-spam-directory} on a directory such as
23333 @file{~/Mail/mail/misc} (this usually corresponds the the group
23334 @samp{nnml:mail.misc}).
23335
23336 When you are using @acronym{IMAP}, you won't have the mails available
23337 locally, so that will not work.  One solution is to use the Gnus Agent
23338 to cache the articles.  Then you can use directories such as
23339 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23340 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23341
23342 @defvar spam-stat
23343 This variable holds the hash-table with all the statistics---the
23344 dictionary we have been talking about.  For every word in either
23345 collection, this hash-table stores a vector describing how often the
23346 word appeared in spam and often it appeared in non-spam mails.
23347 @end defvar
23348
23349 If you want to regenerate the statistics from scratch, you need to
23350 reset the dictionary.
23351
23352 @defun spam-stat-reset
23353 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23354 @end defun
23355
23356 When you are done, you must save the dictionary.  The dictionary may
23357 be rather large.  If you will not update the dictionary incrementally
23358 (instead, you will recreate it once a month, for example), then you
23359 can reduce the size of the dictionary by deleting all words that did
23360 not appear often enough or that do not clearly belong to only spam or
23361 only non-spam mails.
23362
23363 @defun spam-stat-reduce-size
23364 Reduce the size of the dictionary.  Use this only if you do not want
23365 to update the dictionary incrementally.
23366 @end defun
23367
23368 @defun spam-stat-save
23369 Save the dictionary.
23370 @end defun
23371
23372 @defvar spam-stat-file
23373 The filename used to store the dictionary.  This defaults to
23374 @file{~/.spam-stat.el}.
23375 @end defvar
23376
23377 @node Splitting mail using spam-stat
23378 @subsubsection Splitting mail using spam-stat
23379
23380 In order to use @code{spam-stat} to split your mail, you need to add the
23381 following to your @file{~/.gnus.el} file:
23382
23383 @lisp
23384 (require 'spam-stat)
23385 (spam-stat-load)
23386 @end lisp
23387
23388 This will load the necessary Gnus code, and the dictionary you
23389 created.
23390
23391 Next, you need to adapt your fancy splitting rules:  You need to
23392 determine how to use @code{spam-stat}.  The following examples are for
23393 the nnml back end.  Using the nnimap back end works just as well.  Just
23394 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23395
23396 In the simplest case, you only have two groups, @samp{mail.misc} and
23397 @samp{mail.spam}.  The following expression says that mail is either
23398 spam or it should go into @samp{mail.misc}.  If it is spam, then
23399 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23400
23401 @lisp
23402 (setq nnmail-split-fancy
23403       `(| (: spam-stat-split-fancy)
23404           "mail.misc"))
23405 @end lisp
23406
23407 @defvar spam-stat-split-fancy-spam-group
23408 The group to use for spam.  Default is @samp{mail.spam}.
23409 @end defvar
23410
23411 If you also filter mail with specific subjects into other groups, use
23412 the following expression.  Only mails not matching the regular
23413 expression are considered potential spam.
23414
23415 @lisp
23416 (setq nnmail-split-fancy
23417       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23418           (: spam-stat-split-fancy)
23419           "mail.misc"))
23420 @end lisp
23421
23422 If you want to filter for spam first, then you must be careful when
23423 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23424 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23425 non-spam, therefore both should be in your collection of non-spam
23426 mails, when creating the dictionary!
23427
23428 @lisp
23429 (setq nnmail-split-fancy
23430       `(| (: spam-stat-split-fancy)
23431           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23432           "mail.misc"))
23433 @end lisp
23434
23435 You can combine this with traditional filtering.  Here, we move all
23436 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23437 @code{spam-stat-split-fancy} will never see them, the mails in
23438 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23439 nor in your collection of non-spam mails, when creating the
23440 dictionary!
23441
23442 @lisp
23443 (setq nnmail-split-fancy
23444       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23445           (: spam-stat-split-fancy)
23446           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23447           "mail.misc"))
23448 @end lisp
23449
23450
23451 @node Low-level interface to the spam-stat dictionary
23452 @subsubsection Low-level interface to the spam-stat dictionary
23453
23454 The main interface to using @code{spam-stat}, are the following functions:
23455
23456 @defun spam-stat-buffer-is-spam
23457 Called in a buffer, that buffer is considered to be a new spam mail.
23458 Use this for new mail that has not been processed before.
23459 @end defun
23460
23461 @defun spam-stat-buffer-is-no-spam
23462 Called in a buffer, that buffer is considered to be a new non-spam
23463 mail.  Use this for new mail that has not been processed before.
23464 @end defun
23465
23466 @defun spam-stat-buffer-change-to-spam
23467 Called in a buffer, that buffer is no longer considered to be normal
23468 mail but spam.  Use this to change the status of a mail that has
23469 already been processed as non-spam.
23470 @end defun
23471
23472 @defun spam-stat-buffer-change-to-non-spam
23473 Called in a buffer, that buffer is no longer considered to be spam but
23474 normal mail.  Use this to change the status of a mail that has already
23475 been processed as spam.
23476 @end defun
23477
23478 @defun spam-stat-save
23479 Save the hash table to the file.  The filename used is stored in the
23480 variable @code{spam-stat-file}.
23481 @end defun
23482
23483 @defun spam-stat-load
23484 Load the hash table from a file.  The filename used is stored in the
23485 variable @code{spam-stat-file}.
23486 @end defun
23487
23488 @defun spam-stat-score-word
23489 Return the spam score for a word.
23490 @end defun
23491
23492 @defun spam-stat-score-buffer
23493 Return the spam score for a buffer.
23494 @end defun
23495
23496 @defun spam-stat-split-fancy
23497 Use this function for fancy mail splitting.  Add the rule @samp{(:
23498 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23499 @end defun
23500
23501 Make sure you load the dictionary before using it.  This requires the
23502 following in your @file{~/.gnus.el} file:
23503
23504 @lisp
23505 (require 'spam-stat)
23506 (spam-stat-load)
23507 @end lisp
23508
23509 Typical test will involve calls to the following functions:
23510
23511 @smallexample
23512 Reset: (setq spam-stat (make-hash-table :test 'equal))
23513 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23514 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23515 Save table: (spam-stat-save)
23516 File size: (nth 7 (file-attributes spam-stat-file))
23517 Number of words: (hash-table-count spam-stat)
23518 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23519 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23520 Reduce table size: (spam-stat-reduce-size)
23521 Save table: (spam-stat-save)
23522 File size: (nth 7 (file-attributes spam-stat-file))
23523 Number of words: (hash-table-count spam-stat)
23524 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23525 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23526 @end smallexample
23527
23528 Here is how you would create your dictionary:
23529
23530 @smallexample
23531 Reset: (setq spam-stat (make-hash-table :test 'equal))
23532 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23533 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23534 Repeat for any other non-spam group you need...
23535 Reduce table size: (spam-stat-reduce-size)
23536 Save table: (spam-stat-save)
23537 @end smallexample
23538
23539 @node Various Various
23540 @section Various Various
23541 @cindex mode lines
23542 @cindex highlights
23543
23544 @table @code
23545
23546 @item gnus-home-directory
23547 @vindex gnus-home-directory
23548 All Gnus file and directory variables will be initialized from this
23549 variable, which defaults to @file{~/}.
23550
23551 @item gnus-directory
23552 @vindex gnus-directory
23553 Most Gnus storage file and directory variables will be initialized from
23554 this variable, which defaults to the @env{SAVEDIR} environment
23555 variable, or @file{~/News/} if that variable isn't set.
23556
23557 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
23558 This means that other directory variables that are initialized from this
23559 variable won't be set properly if you set this variable in
23560 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
23561
23562 @item gnus-default-directory
23563 @vindex gnus-default-directory
23564 Not related to the above variable at all---this variable says what the
23565 default directory of all Gnus buffers should be.  If you issue commands
23566 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23567 default directory.  If this variable is @code{nil} (which is the
23568 default), the default directory will be the default directory of the
23569 buffer you were in when you started Gnus.
23570
23571 @item gnus-verbose
23572 @vindex gnus-verbose
23573 This variable is an integer between zero and ten.  The higher the value,
23574 the more messages will be displayed.  If this variable is zero, Gnus
23575 will never flash any messages, if it is seven (which is the default),
23576 most important messages will be shown, and if it is ten, Gnus won't ever
23577 shut up, but will flash so many messages it will make your head swim.
23578
23579 @item gnus-verbose-backends
23580 @vindex gnus-verbose-backends
23581 This variable works the same way as @code{gnus-verbose}, but it applies
23582 to the Gnus back ends instead of Gnus proper.
23583
23584 @item nnheader-max-head-length
23585 @vindex nnheader-max-head-length
23586 When the back ends read straight heads of articles, they all try to read
23587 as little as possible.  This variable (default 4096) specifies
23588 the absolute max length the back ends will try to read before giving up
23589 on finding a separator line between the head and the body.  If this
23590 variable is @code{nil}, there is no upper read bound.  If it is
23591 @code{t}, the back ends won't try to read the articles piece by piece,
23592 but read the entire articles.  This makes sense with some versions of
23593 @code{ange-ftp} or @code{efs}.
23594
23595 @item nnheader-head-chop-length
23596 @vindex nnheader-head-chop-length
23597 This variable (default 2048) says how big a piece of each article to
23598 read when doing the operation described above.
23599
23600 @item nnheader-file-name-translation-alist
23601 @vindex nnheader-file-name-translation-alist
23602 @cindex file names
23603 @cindex invalid characters in file names
23604 @cindex characters in file names
23605 This is an alist that says how to translate characters in file names.
23606 For instance, if @samp{:} is invalid as a file character in file names
23607 on your system (you OS/2 user you), you could say something like:
23608
23609 @lisp
23610 @group
23611 (setq nnheader-file-name-translation-alist
23612       '((?: . ?_)))
23613 @end group
23614 @end lisp
23615
23616 In fact, this is the default value for this variable on OS/2 and MS
23617 Windows (phooey) systems.
23618
23619 @item gnus-hidden-properties
23620 @vindex gnus-hidden-properties
23621 This is a list of properties to use to hide ``invisible'' text.  It is
23622 @code{(invisible t intangible t)} by default on most systems, which
23623 makes invisible text invisible and intangible.
23624
23625 @item gnus-parse-headers-hook
23626 @vindex gnus-parse-headers-hook
23627 A hook called before parsing headers.  It can be used, for instance, to
23628 gather statistics on the headers fetched, or perhaps you'd like to prune
23629 some headers.  I don't see why you'd want that, though.
23630
23631 @item gnus-shell-command-separator
23632 @vindex gnus-shell-command-separator
23633 String used to separate two shell commands.  The default is @samp{;}.
23634
23635 @item gnus-invalid-group-regexp
23636 @vindex gnus-invalid-group-regexp
23637
23638 Regexp to match ``invalid'' group names when querying user for a group
23639 name.  The default value catches some @strong{really} invalid group
23640 names who could possibly mess up Gnus internally (like allowing
23641 @samp{:} in a group name, which is normally used to delimit method and
23642 group).
23643
23644 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23645
23646
23647 @end table
23648
23649 @node The End
23650 @chapter The End
23651
23652 Well, that's the manual---you can get on with your life now.  Keep in
23653 touch.  Say hello to your cats from me.
23654
23655 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23656
23657 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23658
23659 @quotation
23660 @strong{Te Deum}
23661
23662 @sp 1
23663 Not because of victories @*
23664 I sing,@*
23665 having none,@*
23666 but for the common sunshine,@*
23667 the breeze,@*
23668 the largess of the spring.
23669
23670 @sp 1
23671 Not for victory@*
23672 but for the day's work done@*
23673 as well as I was able;@*
23674 not for a seat upon the dais@*
23675 but at the common table.@*
23676 @end quotation
23677
23678
23679 @node Appendices
23680 @chapter Appendices
23681
23682 @menu
23683 * XEmacs::                      Requirements for installing under XEmacs.
23684 * History::                     How Gnus got where it is today.
23685 * On Writing Manuals::          Why this is not a beginner's guide.
23686 * Terminology::                 We use really difficult, like, words here.
23687 * Customization::               Tailoring Gnus to your needs.
23688 * Troubleshooting::             What you might try if things do not work.
23689 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23690 * Emacs for Heathens::          A short introduction to Emacsian terms.
23691 * Frequently Asked Questions::  The Gnus FAQ
23692 @end menu
23693
23694
23695 @node XEmacs
23696 @section XEmacs
23697 @cindex XEmacs
23698 @cindex installing under XEmacs
23699
23700 XEmacs is distributed as a collection of packages.  You should install
23701 whatever packages the Gnus XEmacs package requires.  The current
23702 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23703 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23704 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23705 @samp{misc-games} package is required for Morse decoding.
23706
23707
23708 @node History
23709 @section History
23710
23711 @cindex history
23712 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23713 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23714
23715 If you want to investigate the person responsible for this outrage,
23716 you can point your (feh!) web browser to
23717 @uref{http://quimby.gnus.org/}.  This is also the primary
23718 distribution point for the new and spiffy versions of Gnus, and is
23719 known as The Site That Destroys Newsrcs And Drives People Mad.
23720
23721 During the first extended alpha period of development, the new Gnus was
23722 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23723 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23724 (Besides, the ``Gnus'' in this abbreviation should probably be
23725 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23726 appropriate name, don't you think?)
23727
23728 In any case, after spending all that energy on coming up with a new and
23729 spunky name, we decided that the name was @emph{too} spunky, so we
23730 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23731 ``@sc{gnus}''.  New vs. old.
23732
23733 @menu
23734 * Gnus Versions::               What Gnus versions have been released.
23735 * Other Gnus Versions::         Other Gnus versions that also have been released.
23736 * Why?::                        What's the point of Gnus?
23737 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23738 * Conformity::                  Gnus tries to conform to all standards.
23739 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23740 * Gnus Development::            How Gnus is developed.
23741 * Contributors::                Oodles of people.
23742 * New Features::                Pointers to some of the new stuff in Gnus.
23743 @end menu
23744
23745
23746 @node Gnus Versions
23747 @subsection Gnus Versions
23748 @cindex ding Gnus
23749 @cindex September Gnus
23750 @cindex Red Gnus
23751 @cindex Quassia Gnus
23752 @cindex Pterodactyl Gnus
23753 @cindex Oort Gnus
23754 @cindex No Gnus
23755 @cindex Gnus versions
23756
23757 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23758 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23759 plus 15 Gnus 5.0 releases).
23760
23761 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23762 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23763
23764 On July 28th 1996 work on Red Gnus was begun, and it was released on
23765 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23766
23767 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23768 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23769
23770 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23771 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23772 1999.
23773
23774 On the 26th of October 2000, Oort Gnus was begun.
23775
23776 If you happen upon a version of Gnus that has a prefixed name --
23777 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23778 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23779 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23780 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23781 released version of Gnus and snuggle up to that instead.
23782
23783
23784 @node Other Gnus Versions
23785 @subsection Other Gnus Versions
23786 @cindex Semi-gnus
23787
23788 In addition to the versions of Gnus which have had their releases
23789 coordinated by Lars, one major development has been Semi-gnus from
23790 Japan.  It's based on a library called @acronym{SEMI}, which provides
23791 @acronym{MIME} capabilities.
23792
23793 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23794 Collectively, they are called ``Semi-gnus'', and different strains are
23795 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23796 @acronym{MIME} and multilingualization things, especially important for
23797 Japanese users.
23798
23799
23800 @node Why?
23801 @subsection Why?
23802
23803 What's the point of Gnus?
23804
23805 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23806 newsreader, that lets you do anything you can think of.  That was my
23807 original motivation, but while working on Gnus, it has become clear to
23808 me that this generation of newsreaders really belong in the stone age.
23809 Newsreaders haven't developed much since the infancy of the net.  If the
23810 volume continues to rise with the current rate of increase, all current
23811 newsreaders will be pretty much useless.  How do you deal with
23812 newsgroups that have thousands of new articles each day?  How do you
23813 keep track of millions of people who post?
23814
23815 Gnus offers no real solutions to these questions, but I would very much
23816 like to see Gnus being used as a testing ground for new methods of
23817 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23818 to separate the newsreader from the back ends, Gnus now offers a simple
23819 interface for anybody who wants to write new back ends for fetching mail
23820 and news from different sources.  I have added hooks for customizations
23821 everywhere I could imagine it being useful.  By doing so, I'm inviting
23822 every one of you to explore and invent.
23823
23824 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23825 @kbd{C-u 100 M-x all-hail-xemacs}.
23826
23827
23828 @node Compatibility
23829 @subsection Compatibility
23830
23831 @cindex compatibility
23832 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23833 bindings have been kept.  More key bindings have been added, of course,
23834 but only in one or two obscure cases have old bindings been changed.
23835
23836 Our motto is:
23837 @quotation
23838 @cartouche
23839 @center In a cloud bones of steel.
23840 @end cartouche
23841 @end quotation
23842
23843 All commands have kept their names.  Some internal functions have changed
23844 their names.
23845
23846 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23847 Articles}.
23848
23849 One major compatibility question is the presence of several summary
23850 buffers.  All variables relevant while reading a group are
23851 buffer-local to the summary buffer they belong in.  Although many
23852 important variables have their values copied into their global
23853 counterparts whenever a command is executed in the summary buffer, this
23854 change might lead to incorrect values being used unless you are careful.
23855
23856 All code that relies on knowledge of @sc{gnus} internals will probably
23857 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23858 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23859 maintains a hash table that points to the entries in this alist (which
23860 speeds up many functions), and changing the alist directly will lead to
23861 peculiar results.
23862
23863 @cindex hilit19
23864 @cindex highlighting
23865 Old hilit19 code does not work at all.  In fact, you should probably
23866 remove all hilit code from all Gnus hooks
23867 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23868 Gnus provides various integrated functions for highlighting.  These are
23869 faster and more accurate.  To make life easier for everybody, Gnus will
23870 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23871 Away!
23872
23873 Packages like @code{expire-kill} will no longer work.  As a matter of
23874 fact, you should probably remove all old @sc{gnus} packages (and other
23875 code) when you start using Gnus.  More likely than not, Gnus already
23876 does what you have written code to make @sc{gnus} do.  (Snicker.)
23877
23878 Even though old methods of doing things are still supported, only the
23879 new methods are documented in this manual.  If you detect a new method of
23880 doing something while reading this manual, that does not mean you have
23881 to stop doing it the old way.
23882
23883 Gnus understands all @sc{gnus} startup files.
23884
23885 @kindex M-x gnus-bug
23886 @findex gnus-bug
23887 @cindex reporting bugs
23888 @cindex bugs
23889 Overall, a casual user who hasn't written much code that depends on
23890 @sc{gnus} internals should suffer no problems.  If problems occur,
23891 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23892
23893 @vindex gnus-bug-create-help-buffer
23894 If you are in the habit of sending bug reports @emph{very} often, you
23895 may find the helpful help buffer annoying after a while.  If so, set
23896 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23897 up at you.
23898
23899
23900 @node Conformity
23901 @subsection Conformity
23902
23903 No rebels without a clue here, ma'am.  We conform to all standards known
23904 to (wo)man.  Except for those standards and/or conventions we disagree
23905 with, of course.
23906
23907 @table @strong
23908
23909 @item RFC (2)822
23910 @cindex RFC 822
23911 @cindex RFC 2822
23912 There are no known breaches of this standard.
23913
23914 @item RFC 1036
23915 @cindex RFC 1036
23916 There are no known breaches of this standard, either.
23917
23918 @item Son-of-RFC 1036
23919 @cindex Son-of-RFC 1036
23920 We do have some breaches to this one.
23921
23922 @table @emph
23923
23924 @item X-Newsreader
23925 @itemx User-Agent
23926 These are considered to be ``vanity headers'', while I consider them
23927 to be consumer information.  After seeing so many badly formatted
23928 articles coming from @code{tin} and @code{Netscape} I know not to use
23929 either of those for posting articles.  I would not have known that if
23930 it wasn't for the @code{X-Newsreader} header.
23931 @end table
23932
23933 @item USEFOR
23934 @cindex USEFOR
23935 USEFOR is an IETF working group writing a successor to RFC 1036, based
23936 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23937 various changes to the format of news articles.  The Gnus towers will
23938 look into implementing the changes when the draft is accepted as an RFC.
23939
23940 @item MIME - RFC 2045-2049 etc
23941 @cindex @acronym{MIME}
23942 All the various @acronym{MIME} RFCs are supported.
23943
23944 @item Disposition Notifications - RFC 2298
23945 Message Mode is able to request notifications from the receiver.
23946
23947 @item PGP - RFC 1991 and RFC 2440
23948 @cindex RFC 1991
23949 @cindex RFC 2440
23950 RFC 1991 is the original @acronym{PGP} message specification,
23951 published as an informational RFC.  RFC 2440 was the follow-up, now
23952 called Open PGP, and put on the Standards Track.  Both document a
23953 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23954 encoding (signing and encryption) and decoding (verification and
23955 decryption).
23956
23957 @item PGP/MIME - RFC 2015/3156
23958 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23959 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23960 Gnus supports both encoding and decoding.
23961
23962 @item S/MIME - RFC 2633
23963 RFC 2633 describes the @acronym{S/MIME} format.
23964
23965 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23966 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23967 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23968 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23969 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23970 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23971 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23972 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23973
23974 @end table
23975
23976 If you ever notice Gnus acting non-compliant with regards to the texts
23977 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23978 know.
23979
23980
23981 @node Emacsen
23982 @subsection Emacsen
23983 @cindex Emacsen
23984 @cindex XEmacs
23985 @cindex Mule
23986 @cindex Emacs
23987
23988 Gnus should work on:
23989
23990 @itemize @bullet
23991
23992 @item
23993 Emacs 20.3 and up.
23994
23995 @item
23996 XEmacs 21.1.1 and up.
23997
23998 @end itemize
23999
24000 This Gnus version will absolutely not work on any Emacsen older than
24001 that.  Not reliably, at least.  Older versions of Gnus may work on older
24002 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
24003 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
24004 See the file ``README'' in the T-gnus distribution for more details.
24005
24006 There are some vague differences between Gnus on the various
24007 platforms---XEmacs features more graphics (a logo and a toolbar)---but
24008 other than that, things should look pretty much the same under all
24009 Emacsen.
24010
24011
24012 @node Gnus Development
24013 @subsection Gnus Development
24014
24015 Gnus is developed in a two-phased cycle.  The first phase involves much
24016 discussion on the @samp{ding@@gnus.org} mailing list, where people
24017 propose changes and new features, post patches and new back ends.  This
24018 phase is called the @dfn{alpha} phase, since the Gnusae released in this
24019 phase are @dfn{alpha releases}, or (perhaps more commonly in other
24020 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
24021 unstable and should not be used by casual users.  Gnus alpha releases
24022 have names like ``Red Gnus'' and ``Quassia Gnus''.
24023
24024 After futzing around for 50-100 alpha releases, Gnus is declared
24025 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
24026 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
24027 supposed to be able to use these, and these are mostly discussed on the
24028 @samp{gnu.emacs.gnus} newsgroup.
24029
24030 @cindex Incoming*
24031 @vindex mail-source-delete-incoming
24032 Some variable defaults differ between alpha Gnusae and released Gnusae.
24033 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
24034 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
24035 lossage of mail if an alpha release hiccups while handling the mail.
24036
24037 The division of discussion between the ding mailing list and the Gnus
24038 newsgroup is not purely based on publicity concerns.  It's true that
24039 having people write about the horrible things that an alpha Gnus release
24040 can do (sometimes) in a public forum may scare people off, but more
24041 importantly, talking about new experimental features that have been
24042 introduced may confuse casual users.  New features are frequently
24043 introduced, fiddled with, and judged to be found wanting, and then
24044 either discarded or totally rewritten.  People reading the mailing list
24045 usually keep up with these rapid changes, while people on the newsgroup
24046 can't be assumed to do so.
24047
24048
24049
24050 @node Contributors
24051 @subsection Contributors
24052 @cindex contributors
24053
24054 The new Gnus version couldn't have been done without the help of all the
24055 people on the (ding) mailing list.  Every day for over a year I have
24056 gotten billions of nice bug reports from them, filling me with joy,
24057 every single one of them.  Smooches.  The people on the list have been
24058 tried beyond endurance, what with my ``oh, that's a neat idea <type
24059 type>, yup, I'll release it right away <ship off> no wait, that doesn't
24060 work at all <type type>, yup, I'll ship that one off right away <ship
24061 off> no, wait, that absolutely does not work'' policy for releases.
24062 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
24063 ``worser''? ``much worser''?  ``worsest''?)
24064
24065 I would like to take this opportunity to thank the Academy for@dots{}  oops,
24066 wrong show.
24067
24068 @itemize @bullet
24069
24070 @item
24071 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
24072
24073 @item
24074 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
24075 nnwarchive and many, many other things connected with @acronym{MIME} and
24076 other types of en/decoding, as well as general bug fixing, new
24077 functionality and stuff.
24078
24079 @item
24080 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
24081 well as numerous other things).
24082
24083 @item
24084 Luis Fernandes---design and graphics.
24085
24086 @item
24087 Joe Reiss---creator of the smiley faces.
24088
24089 @item
24090 Justin Sheehy---the @acronym{FAQ} maintainer.
24091
24092 @item
24093 Erik Naggum---help, ideas, support, code and stuff.
24094
24095 @item
24096 Wes Hardaker---@file{gnus-picon.el} and the manual section on
24097 @dfn{picons} (@pxref{Picons}).
24098
24099 @item
24100 Kim-Minh Kaplan---further work on the picon code.
24101
24102 @item
24103 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
24104 (@pxref{GroupLens}).
24105
24106 @item
24107 Sudish Joseph---innumerable bug fixes.
24108
24109 @item
24110 Ilja Weis---@file{gnus-topic.el}.
24111
24112 @item
24113 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
24114
24115 @item
24116 Vladimir Alexiev---the refcard and reference booklets.
24117
24118 @item
24119 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
24120 distribution by Felix Lee and JWZ.
24121
24122 @item
24123 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
24124
24125 @item
24126 Peter Mutsaers---orphan article scoring code.
24127
24128 @item
24129 Ken Raeburn---POP mail support.
24130
24131 @item
24132 Hallvard B Furuseth---various bits and pieces, especially dealing with
24133 .newsrc files.
24134
24135 @item
24136 Brian Edmonds---@file{gnus-bbdb.el}.
24137
24138 @item
24139 David Moore---rewrite of @file{nnvirtual.el} and many other things.
24140
24141 @item
24142 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24143
24144 @item
24145 François Pinard---many, many interesting and thorough bug reports, as
24146 well as autoconf support.
24147
24148 @end itemize
24149
24150 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24151 Borges, and Jost Krieger proof-reading parts of the manual.
24152
24153 The following people have contributed many patches and suggestions:
24154
24155 Christopher Davis,
24156 Andrew Eskilsson,
24157 Kai Grossjohann,
24158 Kevin Greiner,
24159 Jesper Harder,
24160 Paul Jarc,
24161 Simon Josefsson,
24162 David KÃ¥gedal,
24163 Richard Pieri,
24164 Fabrice Popineau,
24165 Daniel Quinlan,
24166 Michael Shields,
24167 Reiner Steib,
24168 Jason L. Tibbitts, III,
24169 Jack Vinson,
24170 Katsumi Yamaoka, @c Yamaoka
24171 and
24172 Teodor Zlatanov.
24173
24174 Also thanks to the following for patches and stuff:
24175
24176 Jari Aalto,
24177 Adrian Aichner,
24178 Vladimir Alexiev,
24179 Russ Allbery,
24180 Peter Arius,
24181 Matt Armstrong,
24182 Marc Auslander,
24183 Miles Bader,
24184 Alexei V. Barantsev,
24185 Frank Bennett,
24186 Robert Bihlmeyer,
24187 Chris Bone,
24188 Mark Borges,
24189 Mark Boyns,
24190 Lance A. Brown,
24191 Rob Browning,
24192 Kees de Bruin,
24193 Martin Buchholz,
24194 Joe Buehler,
24195 Kevin Buhr,
24196 Alastair Burt,
24197 Joao Cachopo,
24198 Zlatko Calusic,
24199 Massimo Campostrini,
24200 Castor,
24201 David Charlap,
24202 Dan Christensen,
24203 Kevin Christian,
24204 Jae-you Chung, @c ?
24205 James H. Cloos, Jr.,
24206 Laura Conrad,
24207 Michael R. Cook,
24208 Glenn Coombs,
24209 Andrew J. Cosgriff,
24210 Neil Crellin,
24211 Frank D. Cringle,
24212 Geoffrey T. Dairiki,
24213 Andre Deparade,
24214 Ulrik Dickow,
24215 Dave Disser,
24216 Rui-Tao Dong, @c ?
24217 Joev Dubach,
24218 Michael Welsh Duggan,
24219 Dave Edmondson,
24220 Paul Eggert,
24221 Mark W. Eichin,
24222 Karl Eichwalder,
24223 Enami Tsugutomo, @c Enami
24224 Michael Ernst,
24225 Luc Van Eycken,
24226 Sam Falkner,
24227 Nelson Jose dos Santos Ferreira,
24228 Sigbjorn Finne,
24229 Sven Fischer,
24230 Paul Fisher,
24231 Decklin Foster,
24232 Gary D. Foster,
24233 Paul Franklin,
24234 Guy Geens,
24235 Arne Georg Gleditsch,
24236 David S. Goldberg,
24237 Michelangelo Grigni,
24238 Dale Hagglund,
24239 D. Hall,
24240 Magnus Hammerin,
24241 Kenichi Handa, @c Handa
24242 Raja R. Harinath,
24243 Yoshiki Hayashi, @c Hayashi
24244 P. E. Jareth Hein,
24245 Hisashige Kenji, @c Hisashige
24246 Scott Hofmann,
24247 Marc Horowitz,
24248 Gunnar Horrigmo,
24249 Richard Hoskins,
24250 Brad Howes,
24251 Miguel de Icaza,
24252 François Felix Ingrand,
24253 Tatsuya Ichikawa, @c Ichikawa
24254 Ishikawa Ichiro, @c Ishikawa
24255 Lee Iverson,
24256 Iwamuro Motonori, @c Iwamuro
24257 Rajappa Iyer,
24258 Andreas Jaeger,
24259 Adam P. Jenkins,
24260 Randell Jesup,
24261 Fred Johansen,
24262 Gareth Jones,
24263 Greg Klanderman,
24264 Karl Kleinpaste,
24265 Michael Klingbeil,
24266 Peter Skov Knudsen,
24267 Shuhei Kobayashi, @c Kobayashi
24268 Petr Konecny,
24269 Koseki Yoshinori, @c Koseki
24270 Thor Kristoffersen,
24271 Jens Lautenbacher,
24272 Martin Larose,
24273 Seokchan Lee, @c Lee
24274 Joerg Lenneis,
24275 Carsten Leonhardt,
24276 James LewisMoss,
24277 Christian Limpach,
24278 Markus Linnala,
24279 Dave Love,
24280 Mike McEwan,
24281 Tonny Madsen,
24282 Shlomo Mahlab,
24283 Nat Makarevitch,
24284 Istvan Marko,
24285 David Martin,
24286 Jason R. Mastaler,
24287 Gordon Matzigkeit,
24288 Timo Metzemakers,
24289 Richard Mlynarik,
24290 Lantz Moore,
24291 Morioka Tomohiko, @c Morioka
24292 Erik Toubro Nielsen,
24293 Hrvoje Niksic,
24294 Andy Norman,
24295 Fred Oberhauser,
24296 C. R. Oldham,
24297 Alexandre Oliva,
24298 Ken Olstad,
24299 Masaharu Onishi, @c Onishi
24300 Hideki Ono, @c Ono
24301 Ettore Perazzoli,
24302 William Perry,
24303 Stephen Peters,
24304 Jens-Ulrik Holger Petersen,
24305 Ulrich Pfeifer,
24306 Matt Pharr,
24307 Andy Piper,
24308 John McClary Prevost,
24309 Bill Pringlemeir,
24310 Mike Pullen,
24311 Jim Radford,
24312 Colin Rafferty,
24313 Lasse Rasinen,
24314 Lars Balker Rasmussen,
24315 Joe Reiss,
24316 Renaud Rioboo,
24317 Roland B. Roberts,
24318 Bart Robinson,
24319 Christian von Roques,
24320 Markus Rost,
24321 Jason Rumney,
24322 Wolfgang Rupprecht,
24323 Jay Sachs,
24324 Dewey M. Sasser,
24325 Conrad Sauerwald,
24326 Loren Schall,
24327 Dan Schmidt,
24328 Ralph Schleicher,
24329 Philippe Schnoebelen,
24330 Andreas Schwab,
24331 Randal L. Schwartz,
24332 Danny Siu,
24333 Matt Simmons,
24334 Paul D. Smith,
24335 Jeff Sparkes,
24336 Toby Speight,
24337 Michael Sperber,
24338 Darren Stalder,
24339 Richard Stallman,
24340 Greg Stark,
24341 Sam Steingold,
24342 Paul Stevenson,
24343 Jonas Steverud,
24344 Paul Stodghill,
24345 Kiyokazu Suto, @c Suto
24346 Kurt Swanson,
24347 Samuel Tardieu,
24348 Teddy,
24349 Chuck Thompson,
24350 Tozawa Akihiko, @c Tozawa
24351 Philippe Troin,
24352 James Troup,
24353 Trung Tran-Duc,
24354 Jack Twilley,
24355 Aaron M. Ucko,
24356 Aki Vehtari,
24357 Didier Verna,
24358 Vladimir Volovich,
24359 Jan Vroonhof,
24360 Stefan Waldherr,
24361 Pete Ware,
24362 Barry A. Warsaw,
24363 Christoph Wedler,
24364 Joe Wells,
24365 Lee Willis,
24366 and
24367 Lloyd Zusman.
24368
24369
24370 For a full overview of what each person has done, the ChangeLogs
24371 included in the Gnus alpha distributions should give ample reading
24372 (550kB and counting).
24373
24374 Apologies to everybody that I've forgotten, of which there are many, I'm
24375 sure.
24376
24377 Gee, that's quite a list of people.  I guess that must mean that there
24378 actually are people who are using Gnus.  Who'd'a thunk it!
24379
24380
24381 @node New Features
24382 @subsection New Features
24383 @cindex new features
24384
24385 @menu
24386 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24387 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24388 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24389 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24390 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24391 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24392 @end menu
24393
24394 These lists are, of course, just @emph{short} overviews of the
24395 @emph{most} important new features.  No, really.  There are tons more.
24396 Yes, we have feeping creaturism in full effect.
24397
24398 @node ding Gnus
24399 @subsubsection (ding) Gnus
24400
24401 New features in Gnus 5.0/5.1:
24402
24403 @itemize @bullet
24404
24405 @item
24406 The look of all buffers can be changed by setting format-like variables
24407 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24408
24409 @item
24410 Local spool and several @acronym{NNTP} servers can be used at once
24411 (@pxref{Select Methods}).
24412
24413 @item
24414 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24415
24416 @item
24417 You can read a number of different mail formats (@pxref{Getting Mail}).
24418 All the mail back ends implement a convenient mail expiry scheme
24419 (@pxref{Expiring Mail}).
24420
24421 @item
24422 Gnus can use various strategies for gathering threads that have lost
24423 their roots (thereby gathering loose sub-threads into one thread) or it
24424 can go back and retrieve enough headers to build a complete thread
24425 (@pxref{Customizing Threading}).
24426
24427 @item
24428 Killed groups can be displayed in the group buffer, and you can read
24429 them as well (@pxref{Listing Groups}).
24430
24431 @item
24432 Gnus can do partial group updates---you do not have to retrieve the
24433 entire active file just to check for new articles in a few groups
24434 (@pxref{The Active File}).
24435
24436 @item
24437 Gnus implements a sliding scale of subscribedness to groups
24438 (@pxref{Group Levels}).
24439
24440 @item
24441 You can score articles according to any number of criteria
24442 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24443 articles for you (@pxref{Adaptive Scoring}).
24444
24445 @item
24446 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24447 manner, so it should be difficult to lose much data on what you have
24448 read if your machine should go down (@pxref{Auto Save}).
24449
24450 @item
24451 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24452 cluttering up the @file{.emacs} file.
24453
24454 @item
24455 You can set the process mark on both groups and articles and perform
24456 operations on all the marked items (@pxref{Process/Prefix}).
24457
24458 @item
24459 You can grep through a subset of groups and create a group from the
24460 results (@pxref{Kibozed Groups}).
24461
24462 @item
24463 You can list subsets of groups according to, well, anything
24464 (@pxref{Listing Groups}).
24465
24466 @item
24467 You can browse foreign servers and subscribe to groups from those
24468 servers (@pxref{Browse Foreign Server}).
24469
24470 @item
24471 Gnus can fetch articles, asynchronously, on a second connection to the
24472 server (@pxref{Asynchronous Fetching}).
24473
24474 @item
24475 You can cache articles locally (@pxref{Article Caching}).
24476
24477 @item
24478 The uudecode functions have been expanded and generalized
24479 (@pxref{Decoding Articles}).
24480
24481 @item
24482 You can still post uuencoded articles, which was a little-known feature
24483 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24484
24485 @item
24486 Fetching parents (and other articles) now actually works without
24487 glitches (@pxref{Finding the Parent}).
24488
24489 @item
24490 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24491
24492 @item
24493 Digests (and other files) can be used as the basis for groups
24494 (@pxref{Document Groups}).
24495
24496 @item
24497 Articles can be highlighted and customized (@pxref{Customizing
24498 Articles}).
24499
24500 @item
24501 URLs and other external references can be buttonized (@pxref{Article
24502 Buttons}).
24503
24504 @item
24505 You can do lots of strange stuff with the Gnus window & frame
24506 configuration (@pxref{Window Layout}).
24507
24508 @item
24509 You can click on buttons instead of using the keyboard
24510 (@pxref{Buttons}).
24511
24512 @end itemize
24513
24514
24515 @node September Gnus
24516 @subsubsection September Gnus
24517
24518 @iftex
24519 @iflatex
24520 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24521 @end iflatex
24522 @end iftex
24523
24524 New features in Gnus 5.2/5.3:
24525
24526 @itemize @bullet
24527
24528 @item
24529 A new message composition mode is used.  All old customization variables
24530 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24531 now obsolete.
24532
24533 @item
24534 Gnus is now able to generate @dfn{sparse} threads---threads where
24535 missing articles are represented by empty nodes (@pxref{Customizing
24536 Threading}).
24537
24538 @lisp
24539 (setq gnus-build-sparse-threads 'some)
24540 @end lisp
24541
24542 @item
24543 Outgoing articles are stored on a special archive server
24544 (@pxref{Archived Messages}).
24545
24546 @item
24547 Partial thread regeneration now happens when articles are
24548 referred.
24549
24550 @item
24551 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24552
24553 @item
24554 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24555
24556 @item
24557 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24558
24559 @lisp
24560 (setq gnus-use-trees t)
24561 @end lisp
24562
24563 @item
24564 An @code{nn}-like pick-and-read minor mode is available for the summary
24565 buffers (@pxref{Pick and Read}).
24566
24567 @lisp
24568 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24569 @end lisp
24570
24571 @item
24572 In binary groups you can use a special binary minor mode (@pxref{Binary
24573 Groups}).
24574
24575 @item
24576 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24577 Topics}).
24578
24579 @lisp
24580 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24581 @end lisp
24582
24583 @item
24584 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24585
24586 @item
24587 Groups can now have a score, and bubbling based on entry frequency
24588 is possible (@pxref{Group Score}).
24589
24590 @lisp
24591 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24592 @end lisp
24593
24594 @item
24595 Groups can be process-marked, and commands can be performed on
24596 groups of groups (@pxref{Marking Groups}).
24597
24598 @item
24599 Caching is possible in virtual groups.
24600
24601 @item
24602 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24603 news batches, ClariNet briefs collections, and just about everything
24604 else (@pxref{Document Groups}).
24605
24606 @item
24607 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24608 (@pxref{SOUP}).
24609
24610 @item
24611 The Gnus cache is much faster.
24612
24613 @item
24614 Groups can be sorted according to many criteria (@pxref{Sorting
24615 Groups}).
24616
24617 @item
24618 New group parameters have been introduced to set list-addresses and
24619 expiry times (@pxref{Group Parameters}).
24620
24621 @item
24622 All formatting specs allow specifying faces to be used
24623 (@pxref{Formatting Fonts}).
24624
24625 @item
24626 There are several more commands for setting/removing/acting on process
24627 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24628
24629 @item
24630 The summary buffer can be limited to show parts of the available
24631 articles based on a wide range of criteria.  These commands have been
24632 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24633
24634 @item
24635 Articles can be made persistent with the @kbd{*} command
24636 (@pxref{Persistent Articles}).
24637
24638 @item
24639 All functions for hiding article elements are now toggles.
24640
24641 @item
24642 Article headers can be buttonized (@pxref{Article Washing}).
24643
24644 @item
24645 All mail back ends support fetching articles by @code{Message-ID}.
24646
24647 @item
24648 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24649
24650 @item
24651 All summary mode commands are available directly from the article
24652 buffer (@pxref{Article Keymap}).
24653
24654 @item
24655 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24656 Layout}).
24657
24658 @item
24659 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24660 @iftex
24661 @iflatex
24662 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24663 @end iflatex
24664 @end iftex
24665
24666 @item
24667 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24668
24669 @lisp
24670 (setq gnus-use-nocem t)
24671 @end lisp
24672
24673 @item
24674 Groups can be made permanently visible (@pxref{Listing Groups}).
24675
24676 @lisp
24677 (setq gnus-permanently-visible-groups "^nnml:")
24678 @end lisp
24679
24680 @item
24681 Many new hooks have been introduced to make customizing easier.
24682
24683 @item
24684 Gnus respects the @code{Mail-Copies-To} header.
24685
24686 @item
24687 Threads can be gathered by looking at the @code{References} header
24688 (@pxref{Customizing Threading}).
24689
24690 @lisp
24691 (setq gnus-summary-thread-gathering-function
24692       'gnus-gather-threads-by-references)
24693 @end lisp
24694
24695 @item
24696 Read articles can be stored in a special backlog buffer to avoid
24697 refetching (@pxref{Article Backlog}).
24698
24699 @lisp
24700 (setq gnus-keep-backlog 50)
24701 @end lisp
24702
24703 @item
24704 A clean copy of the current article is always stored in a separate
24705 buffer to allow easier treatment.
24706
24707 @item
24708 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24709
24710 @item
24711 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24712 Articles}).
24713
24714 @lisp
24715 (setq gnus-prompt-before-saving t)
24716 @end lisp
24717
24718 @item
24719 @code{gnus-uu} can view decoded files asynchronously while fetching
24720 articles (@pxref{Other Decode Variables}).
24721
24722 @lisp
24723 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24724 @end lisp
24725
24726 @item
24727 Filling in the article buffer now works properly on cited text
24728 (@pxref{Article Washing}).
24729
24730 @item
24731 Hiding cited text adds buttons to toggle hiding, and how much
24732 cited text to hide is now customizable (@pxref{Article Hiding}).
24733
24734 @lisp
24735 (setq gnus-cited-lines-visible 2)
24736 @end lisp
24737
24738 @item
24739 Boring headers can be hidden (@pxref{Article Hiding}).
24740
24741 @item
24742 Default scoring values can now be set from the menu bar.
24743
24744 @item
24745 Further syntax checking of outgoing articles have been added.
24746
24747 @end itemize
24748
24749
24750 @node Red Gnus
24751 @subsubsection Red Gnus
24752
24753 New features in Gnus 5.4/5.5:
24754
24755 @iftex
24756 @iflatex
24757 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24758 @end iflatex
24759 @end iftex
24760
24761 @itemize @bullet
24762
24763 @item
24764 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24765
24766 @item
24767 Article prefetching functionality has been moved up into
24768 Gnus (@pxref{Asynchronous Fetching}).
24769
24770 @item
24771 Scoring can now be performed with logical operators like @code{and},
24772 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24773 Scoring}).
24774
24775 @item
24776 Article washing status can be displayed in the
24777 article mode line (@pxref{Misc Article}).
24778
24779 @item
24780 @file{gnus.el} has been split into many smaller files.
24781
24782 @item
24783 Suppression of duplicate articles based on Message-ID can be done
24784 (@pxref{Duplicate Suppression}).
24785
24786 @lisp
24787 (setq gnus-suppress-duplicates t)
24788 @end lisp
24789
24790 @item
24791 New variables for specifying what score and adapt files are to be
24792 considered home score and adapt files (@pxref{Home Score File}) have
24793 been added.
24794
24795 @item
24796 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24797 Server Internals}).
24798
24799 @item
24800 Groups can inherit group parameters from parent topics (@pxref{Topic
24801 Parameters}).
24802
24803 @item
24804 Article editing has been revamped and is now actually usable.
24805
24806 @item
24807 Signatures can be recognized in more intelligent fashions
24808 (@pxref{Article Signature}).
24809
24810 @item
24811 Summary pick mode has been made to look more @code{nn}-like.  Line
24812 numbers are displayed and the @kbd{.} command can be used to pick
24813 articles (@code{Pick and Read}).
24814
24815 @item
24816 Commands for moving the @file{.newsrc.eld} from one server to
24817 another have been added (@pxref{Changing Servers}).
24818
24819 @item
24820 There's a way now to specify that ``uninteresting'' fields be suppressed
24821 when generating lines in buffers (@pxref{Advanced Formatting}).
24822
24823 @item
24824 Several commands in the group buffer can be undone with @kbd{C-M-_}
24825 (@pxref{Undo}).
24826
24827 @item
24828 Scoring can be done on words using the new score type @code{w}
24829 (@pxref{Score File Format}).
24830
24831 @item
24832 Adaptive scoring can be done on a Subject word-by-word basis
24833 (@pxref{Adaptive Scoring}).
24834
24835 @lisp
24836 (setq gnus-use-adaptive-scoring '(word))
24837 @end lisp
24838
24839 @item
24840 Scores can be decayed (@pxref{Score Decays}).
24841
24842 @lisp
24843 (setq gnus-decay-scores t)
24844 @end lisp
24845
24846 @item
24847 Scoring can be performed using a regexp on the Date header.  The Date is
24848 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24849
24850 @item
24851 A new command has been added to remove all data on articles from
24852 the native server (@pxref{Changing Servers}).
24853
24854 @item
24855 A new command for reading collections of documents
24856 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24857 (@pxref{Really Various Summary Commands}).
24858
24859 @item
24860 Process mark sets can be pushed and popped (@pxref{Setting Process
24861 Marks}).
24862
24863 @item
24864 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24865 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24866
24867 @item
24868 A new back end for reading searches from Web search engines
24869 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24870 (@pxref{Web Searches}).
24871
24872 @item
24873 Groups inside topics can now be sorted using the standard sorting
24874 functions, and each topic can be sorted independently (@pxref{Topic
24875 Sorting}).
24876
24877 @item
24878 Subsets of the groups can be sorted independently (@code{Sorting
24879 Groups}).
24880
24881 @item
24882 Cached articles can be pulled into the groups (@pxref{Summary Generation
24883 Commands}).
24884 @iftex
24885 @iflatex
24886 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24887 @end iflatex
24888 @end iftex
24889
24890 @item
24891 Score files are now applied in a more reliable order (@pxref{Score
24892 Variables}).
24893
24894 @item
24895 Reports on where mail messages end up can be generated (@pxref{Splitting
24896 Mail}).
24897
24898 @item
24899 More hooks and functions have been added to remove junk from incoming
24900 mail before saving the mail (@pxref{Washing Mail}).
24901
24902 @item
24903 Emphasized text can be properly fontisized:
24904
24905 @end itemize
24906
24907
24908 @node Quassia Gnus
24909 @subsubsection Quassia Gnus
24910
24911 New features in Gnus 5.6:
24912
24913 @itemize @bullet
24914
24915 @item
24916 New functionality for using Gnus as an offline newsreader has been
24917 added.  A plethora of new commands and modes have been added.
24918 @xref{Gnus Unplugged}, for the full story.
24919
24920 @item
24921 The @code{nndraft} back end has returned, but works differently than
24922 before.  All Message buffers are now also articles in the @code{nndraft}
24923 group, which is created automatically.
24924
24925 @item
24926 @code{gnus-alter-header-function} can now be used to alter header
24927 values.
24928
24929 @item
24930 @code{gnus-summary-goto-article} now accept Message-ID's.
24931
24932 @item
24933 A new Message command for deleting text in the body of a message
24934 outside the region: @kbd{C-c C-v}.
24935
24936 @item
24937 You can now post to component group in @code{nnvirtual} groups with
24938 @kbd{C-u C-c C-c}.
24939
24940 @item
24941  @code{nntp-rlogin-program}---new variable to ease customization.
24942
24943 @item
24944 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24945 re-highlighting of the article buffer.
24946
24947 @item
24948 New element in @code{gnus-boring-article-headers}---@code{long-to}.
24949
24950 @item
24951 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
24952 details.
24953
24954 @item
24955 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24956 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24957
24958 @item
24959 @code{gnus-simplify-subject-functions} variable to allow greater
24960 control over simplification.
24961
24962 @item
24963 @kbd{A T}---new command for fetching the current thread.
24964
24965 @item
24966 @kbd{/ T}---new command for including the current thread in the
24967 limit.
24968
24969 @item
24970 @kbd{M-RET} is a new Message command for breaking cited text.
24971
24972 @item
24973 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24974
24975 @item
24976 The @code{custom-face-lookup} function has been removed.
24977 If you used this function in your initialization files, you must
24978 rewrite them to use @code{face-spec-set} instead.
24979
24980 @item
24981 Canceling now uses the current select method.  Symbolic prefix
24982 @kbd{a} forces normal posting method.
24983
24984 @item
24985 New command to translate M******** sm*rtq**t*s into proper
24986 text---@kbd{W d}.
24987
24988 @item
24989 For easier debugging of @code{nntp}, you can set
24990 @code{nntp-record-commands} to a non-@code{nil} value.
24991
24992 @item
24993 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24994 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24995
24996 @item
24997 A command for editing group parameters from the summary buffer
24998 has been added.
24999
25000 @item
25001 A history of where mails have been split is available.
25002
25003 @item
25004 A new article date command has been added---@code{article-date-iso8601}.
25005
25006 @item
25007 Subjects can be simplified when threading by setting
25008 @code{gnus-score-thread-simplify}.
25009
25010 @item
25011 A new function for citing in Message has been
25012 added---@code{message-cite-original-without-signature}.
25013
25014 @item
25015 @code{article-strip-all-blank-lines}---new article command.
25016
25017 @item
25018 A new Message command to kill to the end of the article has
25019 been added.
25020
25021 @item
25022 A minimum adaptive score can be specified by using the
25023 @code{gnus-adaptive-word-minimum} variable.
25024
25025 @item
25026 The ``lapsed date'' article header can be kept continually
25027 updated by the @code{gnus-start-date-timer} command.
25028
25029 @item
25030 Web listserv archives can be read with the @code{nnlistserv} back end.
25031
25032 @item
25033 Old dejanews archives can now be read by @code{nnweb}.
25034
25035 @end itemize
25036
25037 @node Pterodactyl Gnus
25038 @subsubsection Pterodactyl Gnus
25039
25040 New features in Gnus 5.8:
25041
25042 @itemize @bullet
25043
25044 @item
25045 The mail-fetching functions have changed.  See the manual for the
25046 many details.  In particular, all procmail fetching variables are gone.
25047
25048 If you used procmail like in
25049
25050 @lisp
25051 (setq nnmail-use-procmail t)
25052 (setq nnmail-spool-file 'procmail)
25053 (setq nnmail-procmail-directory "~/mail/incoming/")
25054 (setq nnmail-procmail-suffix "\\.in")
25055 @end lisp
25056
25057 this now has changed to
25058
25059 @lisp
25060 (setq mail-sources
25061       '((directory :path "~/mail/incoming/"
25062                    :suffix ".in")))
25063 @end lisp
25064
25065 @xref{Mail Source Specifiers}.
25066
25067 @item
25068 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
25069 Gnus, and adds a slew of new commands.  See the manual for details.
25070
25071 @item
25072 Gnus has also been multilingualized.  This also affects too
25073 many parts of Gnus to summarize here, and adds many new variables.
25074
25075 @item
25076 @code{gnus-auto-select-first} can now be a function to be
25077 called to position point.
25078
25079 @item
25080 The user can now decide which extra headers should be included in
25081 summary buffers and @acronym{NOV} files.
25082
25083 @item
25084 @code{gnus-article-display-hook} has been removed.  Instead, a number
25085 of variables starting with @code{gnus-treat-} have been added.
25086
25087 @item
25088 The Gnus posting styles have been redone again and now works in a
25089 subtly different manner.
25090
25091 @item
25092 New web-based back ends have been added: @code{nnslashdot},
25093 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
25094 again, to keep up with ever-changing layouts.
25095
25096 @item
25097 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
25098
25099 @end itemize
25100
25101 @node Oort Gnus
25102 @subsubsection Oort Gnus
25103 @cindex Oort Gnus
25104
25105 New features in Gnus 5.10:
25106
25107 @itemize @bullet
25108
25109 @item
25110 The revised Gnus @acronym{FAQ} is included in the manual,
25111 @xref{Frequently Asked Questions}.
25112
25113 @item
25114 Upgrading from previous (stable) version if you have used Oort.
25115
25116 If you have tried Oort (the unstable Gnus branch leading to this
25117 release) but went back to a stable version, be careful when upgrading to
25118 this version.  In particular, you will probably want to remove all
25119 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
25120 read from your @file{.newsrc.eld} instead of from the
25121 @file{.marks}/@file{.mrk} file where this release store flags.  See a
25122 later entry for more information about marks.  Note that downgrading
25123 isn't save in general.
25124
25125 @item
25126 Article Buttons
25127
25128 More buttons for URLs, mail addresses, Message-IDs, Info links, man
25129 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
25130 variables @code{gnus-button-@var{*}-level} can be used to control the
25131 appearance of all article buttons.  @xref{Article Button Levels}.
25132
25133 @item
25134 Dired integration
25135
25136 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
25137 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
25138 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
25139 (@kbd{C-c P}).  It is enabled with
25140 @lisp
25141 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
25142 @end lisp
25143
25144 @item
25145 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25146
25147 @item
25148 Single-part yenc encoded attachments can be decoded.
25149
25150 @item
25151 Picons
25152
25153 The picons code has been reimplemented to work in GNU Emacs---some of
25154 the previous options have been removed or renamed.
25155
25156 Picons are small ``personal icons'' representing users, domain and
25157 newsgroups, which can be displayed in the Article buffer.
25158 @xref{Picons}.
25159
25160 @item
25161 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25162 boundary line is drawn at the end of the headers.
25163
25164 @item
25165 Retrieval of charters and control messages
25166
25167 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25168 control messages (@kbd{H C}).
25169
25170 @item
25171 Delayed articles
25172
25173 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25174 buffer.  The messages are delivered at specified time.  This is useful
25175 for sending yourself reminders.  @xref{Delayed Articles}.
25176
25177 @item
25178 If @code{auto-compression-mode} is enabled, attachments are automatically
25179 decompressed when activated.
25180
25181 @item
25182 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25183 the nnml back end allows compressed message files.
25184
25185 @item
25186 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25187
25188 @item
25189 The Summary Buffer uses an arrow in the fringe to indicate the current
25190 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25191
25192 @item
25193 Warn about email replies to news
25194
25195 Do you often find yourself replying to news by email by mistake?  Then
25196 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25197 you.
25198
25199 @item
25200 If the new option @code{gnus-summary-display-while-building} is
25201 non-@code{nil}, the summary buffer is shown and updated as it's being
25202 built.
25203
25204 @item
25205 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25206 opposed to old but unread messages).
25207
25208 @item
25209 The new option @code{gnus-gcc-mark-as-read} automatically marks
25210 Gcc articles as read.
25211
25212 @item
25213 The nndoc back end now supports mailman digests and exim bounces.
25214
25215 @item
25216 Gnus supports RFC 2369 mailing list headers, and adds a number of
25217 related commands in mailing list groups.  @xref{Mailing List}.
25218
25219 @item
25220 The Date header can be displayed in a format that can be read aloud
25221 in English.  @xref{Article Date}.
25222
25223 @item
25224 The envelope sender address can be customized when using Sendmail.
25225 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25226
25227 @item
25228 diffs are automatically highlighted in groups matching
25229 @code{mm-uu-diff-groups-regexp}
25230
25231 @item
25232 @acronym{TLS} wrapper shipped with Gnus
25233
25234 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25235 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25236 @acronym{TLS}/@acronym{SSL} support via (external third party)
25237 @file{ssl.el} and OpenSSL still works.
25238
25239 @item
25240 New @file{make.bat} for compiling and installing Gnus under MS Windows
25241
25242 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25243 first argument to the batch-program should be the directory where
25244 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25245 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25246 the second parameter.
25247
25248 @file{make.bat} has been rewritten from scratch, it now features
25249 automatic recognition of XEmacs and GNU Emacs, generates
25250 @file{gnus-load.el}, checks if errors occur while compilation and
25251 generation of info files and reports them at the end of the build
25252 process.  It now uses @code{makeinfo} if it is available and falls
25253 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25254 install all files which are necessary to run Gnus and be generally a
25255 complete replacement for the @code{configure; make; make install}
25256 cycle used under Unix systems.
25257
25258 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25259 been removed.
25260
25261 @item
25262 Support for non-@acronym{ASCII} domain names
25263
25264 Message supports non-@acronym{ASCII} domain names in From:, To: and
25265 Cc: and will query you whether to perform encoding when you try to
25266 send a message.  The variable @code{message-use-idna} controls this.
25267 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25268 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25269 controls this.
25270
25271 @item
25272 Better handling of Microsoft citation styles
25273
25274 Gnus now tries to recognize the mangled header block that some Microsoft
25275 mailers use to indicate that the rest of the message is a citation, even
25276 though it is not quoted in any way.  The variable
25277 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25278 citations.
25279
25280 @item
25281 @code{gnus-article-skip-boring}
25282
25283 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25284 not scroll down to show you a page that contains only boring text,
25285 which by default means cited text and signature.  You can customize
25286 what is skippable using @code{gnus-article-boring-faces}.
25287
25288 This feature is especially useful if you read many articles that
25289 consist of a little new content at the top with a long, untrimmed
25290 message cited below.
25291
25292 @item
25293 The format spec @code{%C} for positioning point has changed to @code{%*}.
25294
25295 @item
25296 The new variable @code{gnus-parameters} can be used to set group parameters.
25297
25298 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25299 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25300 enjoy the powers of customize, and simplified backups since you set the
25301 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25302 variable maps regular expressions matching group names to group
25303 parameters, a'la:
25304 @lisp
25305 (setq gnus-parameters
25306       '(("mail\\..*"
25307          (gnus-show-threads nil)
25308          (gnus-use-scoring nil))
25309         ("^nnimap:\\(foo.bar\\)$"
25310          (to-group . "\\1"))))
25311 @end lisp
25312
25313 @item
25314 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25315
25316 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25317 disable it.
25318
25319 @item
25320 Gnus no longer generate the Sender: header automatically.
25321
25322 Earlier it was generated iff the user configurable email address was
25323 different from the Gnus guessed default user address.  As the guessing
25324 algorithm is rarely correct these days, and (more controversially) the
25325 only use of the Sender: header was to check if you are entitled to
25326 cancel/supersede news (which is now solved by Cancel Locks instead,
25327 see another entry), generation of the header has been disabled by
25328 default.  See the variables @code{message-required-headers},
25329 @code{message-required-news-headers}, and
25330 @code{message-required-mail-headers}.
25331
25332 @item
25333 Features from third party @file{message-utils.el} added to @file{message.el}.
25334
25335 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25336 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25337 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25338 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25339 appropriate headers and a note in the body for cross-postings and
25340 followups (see the variables @code{message-cross-post-@var{*}}).
25341
25342 @item
25343 References and X-Draft-Headers are no longer generated when you start
25344 composing messages and @code{message-generate-headers-first} is
25345 @code{nil}.
25346
25347 @item
25348 Improved anti-spam features.
25349
25350 Gnus is now able to take out spam from your mail and news streams
25351 using a wide variety of programs and filter rules.  Among the supported
25352 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25353 for easy use of external packages such as SpamAssassin and Hashcash
25354 are also new.  @xref{Thwarting Email Spam}.
25355
25356 @item
25357 Easy inclusion of X-Faces headers.
25358
25359 @item
25360 Face headers handling.
25361
25362 @item
25363 In the summary buffer, the new command @kbd{/ N} inserts new messages
25364 and @kbd{/ o} inserts old messages.
25365
25366 @item
25367 Gnus decodes morse encoded messages if you press @kbd{W m}.
25368
25369 @item
25370 Unread count correct in nnimap groups.
25371
25372 The estimated number of unread articles in the group buffer should now
25373 be correct for nnimap groups.  This is achieved by calling
25374 @code{nnimap-fixup-unread-after-getting-new-news} from the
25375 @code{gnus-setup-news-hook} (called on startup) and
25376 @code{gnus-after-getting-new-news-hook}. (called after getting new
25377 mail).  If you have modified those variables from the default, you may
25378 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25379 you were happy with the estimate and want to save some (minimal) time
25380 when getting new mail, remove the function.
25381
25382 @item
25383 Group Carbon Copy (GCC) quoting
25384
25385 To support groups that contains SPC and other weird characters, groups
25386 are quoted before they are placed in the Gcc: header.  This means
25387 variables such as @code{gnus-message-archive-group} should no longer
25388 contain quote characters to make groups containing SPC work.  Also, if
25389 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25390 into two groups) you must change it to return the list
25391 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25392 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25393 was incorrect earlier, it just didn't generate any problems since it
25394 was inserted directly.
25395
25396 @item
25397 @file{~/News/overview/} not used.
25398
25399 As a result of the following change, the @file{~/News/overview/}
25400 directory is not used any more.  You can safely delete the entire
25401 hierarchy.
25402
25403 @item
25404 @code{gnus-agent}
25405
25406 The Gnus Agent has seen a major updated and is now enabled by default,
25407 and all nntp and nnimap servers from @code{gnus-select-method} and
25408 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25409 only the server in @code{gnus-select-method} was agentized by the
25410 default, and the agent was disabled by default.  When the agent is
25411 enabled, headers are now also retrieved from the Agent cache instead
25412 of the back ends when possible.  Earlier this only happened in the
25413 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25414 @kbd{J r} in the server buffer.  Gnus will not download articles into
25415 the Agent cache, unless you instruct it to do so, though, by using
25416 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25417 behaviour of having the Agent disabled with @code{(setq gnus-agent
25418 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25419 is not needed any more.
25420
25421 @item
25422 @code{gnus-summary-line-format}
25423
25424 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25425 %s\n}.  Moreover @code{gnus-extra-headers},
25426 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25427 changed their default so that the users name will be replaced by the
25428 recipient's name or the group name posting to for @acronym{NNTP}
25429 groups.
25430
25431 @item
25432 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25433
25434 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25435 broken Outlook (Express) articles.
25436
25437 @item
25438 @code{(require 'gnus-load)}
25439
25440 If you use a stand-alone Gnus distribution, you'd better add
25441 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25442 lisp directory into load-path.
25443
25444 File @file{gnus-load.el} contains autoload commands, functions and variables,
25445 some of which may not be included in distributions of Emacsen.
25446
25447 @item
25448 @code{gnus-slave-unplugged}
25449
25450 A new command which starts Gnus offline in slave mode.
25451
25452 @item
25453 @code{message-insinuate-rmail}
25454
25455 Adding @code{(message-insinuate-rmail)} and @code{(setq
25456 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25457 compose, reply and forward messages in message-mode, where you can
25458 enjoy the power of @acronym{MML}.
25459
25460 @item
25461 @code{message-minibuffer-local-map}
25462
25463 The line below enables BBDB in resending a message:
25464 @lisp
25465 (define-key message-minibuffer-local-map [(tab)]
25466   'bbdb-complete-name)
25467 @end lisp
25468
25469 @item
25470 Externalizing and deleting of attachments.
25471
25472 If @code{gnus-gcc-externalize-attachments} or
25473 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25474 local files as external parts.
25475
25476 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25477 on @acronym{MIME} buttons) saves a part and replaces the part with an
25478 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25479 @acronym{MIME} buttons) removes a part.  It works only on back ends
25480 that support editing.
25481
25482 @item
25483 @code{gnus-default-charset}
25484
25485 The default value is determined from the
25486 @code{current-language-environment} variable, instead of
25487 @code{iso-8859-1}.  Also the @samp{.*} item in
25488 @code{gnus-group-charset-alist} is removed.
25489
25490 @item
25491 @code{gnus-posting-styles}
25492
25493 Add a new format of match like
25494 @lisp
25495 ((header "to" "larsi.*org")
25496  (Organization "Somewhere, Inc."))
25497 @end lisp
25498 The old format like the lines below is obsolete, but still accepted.
25499 @lisp
25500 (header "to" "larsi.*org"
25501         (Organization "Somewhere, Inc."))
25502 @end lisp
25503
25504 @item
25505 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25506
25507 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25508 added into these two variables.  If you customized those, perhaps you
25509 need add those two headers too.
25510
25511 @item
25512 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25513
25514 If one reads an article while plugged, and the article already exists
25515 in the Agent, it won't get downloaded once more.  @code{(setq
25516 gnus-agent-cache nil)} reverts to the old behavior.
25517
25518 @item
25519 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25520 composing messages, it is enabled by @code{use-hard-newlines}.
25521 Decoding format=flowed was present but not documented in earlier
25522 versions.
25523
25524 @item
25525 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25526
25527 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25528
25529 @item
25530 Gnus supports Maildir groups.
25531
25532 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25533
25534 @item
25535 Printing capabilities are enhanced.
25536
25537 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25538 Article buffers.  Also, each individual @acronym{MIME} part can be
25539 printed using @kbd{p} on the @acronym{MIME} button.
25540
25541 @item
25542 Message supports the Importance: (RFC 2156) header.
25543
25544 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25545 the valid values.
25546
25547 @item
25548 Gnus supports Cancel Locks in News.
25549
25550 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25551 used to determine if you wrote an article or not (for canceling and
25552 superseding).  Gnus generates a random password string the first time
25553 you post a message, and saves it in your @file{~/.emacs} using the Custom
25554 system.  While the variable is called @code{canlock-password}, it is not
25555 security sensitive data.  Publishing your canlock string on the web
25556 will not allow anyone to be able to anything she could not already do.
25557 The behaviour can be changed by customizing @code{message-insert-canlock}.
25558
25559 @item
25560 Gnus supports server-side mail filtering using Sieve.
25561
25562 Sieve rules can be added as Group Parameters for groups, and the
25563 complete Sieve script is generated using @kbd{D g} from the Group
25564 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25565 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25566 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25567
25568 @item
25569 Extended format specs.
25570
25571 Format spec @samp{%&user-date;} is added into
25572 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25573 format specs are supported.  The extended format specs look like
25574 @samp{%u&foo;}, which invokes function
25575 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25576 escape character, old user defined format @samp{%u&} is no longer supported.
25577
25578 @item
25579 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25580
25581 It was aliased to @kbd{Y c}
25582 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25583 out other articles.
25584
25585 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25586
25587 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25588 s}, @kbd{/ a}, and @kbd{/ x}
25589 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25590 result will be to display all articles that do not match the expression.
25591
25592 @item
25593 Group names are treated as UTF-8 by default.
25594
25595 This is supposedly what USEFOR wanted to migrate to.  See
25596 @code{gnus-group-name-charset-group-alist} and
25597 @code{gnus-group-name-charset-method-alist} for customization.
25598
25599 @item
25600 The nnml and nnfolder back ends store marks for each groups.
25601
25602 This makes it possible to take backup of nnml/nnfolder servers/groups
25603 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25604 makes it possible to share articles and marks between users (without
25605 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25606 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25607 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25608 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25609 another machine, Gnus will automatically use the @file{.marks} or
25610 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25611 The new server variables @code{nnml-marks-is-evil} and
25612 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25613
25614 @item
25615 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25616 been renamed to ``Gnus''.
25617
25618 @item
25619 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25620 renamed to ``Attachments''.  Note that this menu also contains security
25621 related stuff, like signing and encryption (@pxref{Security, Security,,
25622 message, Message Manual}).
25623
25624 @item
25625 @code{gnus-group-charset-alist} and
25626 @code{gnus-group-ignored-charsets-alist}.
25627
25628 The regexps in these variables are compared with full group names
25629 instead of real group names in 5.8.  Users who customize these
25630 variables should change those regexps accordingly.  For example:
25631 @lisp
25632 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25633 @end lisp
25634
25635 @item
25636 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25637 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25638
25639 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25640 additional Lisp libraries.  This add several menu items to the
25641 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25642 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25643
25644 @item
25645 Gnus inlines external parts (message/external).
25646
25647 @item
25648 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25649 C-m}.
25650
25651 This change was made to avoid conflict with the standard binding of
25652 @code{back-to-indentation}, which is also useful in message mode.
25653
25654 @item
25655 The default for @code{message-forward-show-mml} changed to symbol @code{best}.
25656
25657 The behaviour for the @code{best} value is to show @acronym{MML} (i.e.,
25658 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
25659 used when forwarding signed or encrypted messages, as the conversion
25660 invalidate the digital signature.
25661 @end itemize
25662
25663 @iftex
25664
25665 @page
25666 @node The Manual
25667 @section The Manual
25668 @cindex colophon
25669 @cindex manual
25670
25671 This manual was generated from a TeXinfo file and then run through
25672 either @code{texi2dvi}
25673 @iflatex
25674 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25675 and then run through @code{latex} and @code{dvips}
25676 @end iflatex
25677 to get what you hold in your hands now.
25678
25679 The following conventions have been used:
25680
25681 @enumerate
25682
25683 @item
25684 This is a @samp{string}
25685
25686 @item
25687 This is a @kbd{keystroke}
25688
25689 @item
25690 This is a @file{file}
25691
25692 @item
25693 This is a @code{symbol}
25694
25695 @end enumerate
25696
25697 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25698 mean:
25699
25700 @lisp
25701 (setq flargnoze "yes")
25702 @end lisp
25703
25704 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25705
25706 @lisp
25707 (setq flumphel 'yes)
25708 @end lisp
25709
25710 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25711 ever get them confused.
25712
25713 @iflatex
25714 @c @head
25715 Of course, everything in this manual is of vital interest, so you should
25716 read it all.  Several times.  However, if you feel like skimming the
25717 manual, look for that gnu head you should see in the margin over
25718 there---it means that what's being discussed is of more importance than
25719 the rest of the stuff.  (On the other hand, if everything is infinitely
25720 important, how can anything be more important than that?  Just one more
25721 of the mysteries of this world, I guess.)
25722 @end iflatex
25723
25724 @end iftex
25725
25726
25727 @node On Writing Manuals
25728 @section On Writing Manuals
25729
25730 I guess most manuals are written after-the-fact; documenting a program
25731 that's already there.  This is not how this manual is written.  When
25732 implementing something, I write the manual entry for that something
25733 straight away.  I then see that it's difficult to explain the
25734 functionality, so I write how it's supposed to be, and then I change the
25735 implementation.  Writing the documentation and writing the code goes
25736 hand in hand.
25737
25738 This, of course, means that this manual has no, or little, flow.  It
25739 documents absolutely everything in Gnus, but often not where you're
25740 looking for it.  It is a reference manual, and not a guide to how to get
25741 started with Gnus.
25742
25743 That would be a totally different book, that should be written using the
25744 reference manual as source material.  It would look quite differently.
25745
25746
25747 @page
25748 @node Terminology
25749 @section Terminology
25750
25751 @cindex terminology
25752 @table @dfn
25753
25754 @item news
25755 @cindex news
25756 This is what you are supposed to use this thing for---reading news.
25757 News is generally fetched from a nearby @acronym{NNTP} server, and is
25758 generally publicly available to everybody.  If you post news, the entire
25759 world is likely to read just what you have written, and they'll all
25760 snigger mischievously.  Behind your back.
25761
25762 @item mail
25763 @cindex mail
25764 Everything that's delivered to you personally is mail.  Some news/mail
25765 readers (like Gnus) blur the distinction between mail and news, but
25766 there is a difference.  Mail is private.  News is public.  Mailing is
25767 not posting, and replying is not following up.
25768
25769 @item reply
25770 @cindex reply
25771 Send a mail to the person who has written what you are reading.
25772
25773 @item follow up
25774 @cindex follow up
25775 Post an article to the current newsgroup responding to the article you
25776 are reading.
25777
25778 @item back end
25779 @cindex back end
25780 Gnus considers mail and news to be mostly the same, really.  The only
25781 difference is how to access the actual articles.  News articles are
25782 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25783 messages could be read from a file on the local disk.  The internal
25784 architecture of Gnus thus comprises a ``front end'' and a number of
25785 ``back ends''.  Internally, when you enter a group (by hitting
25786 @key{RET}, say), you thereby invoke a function in the front end in
25787 Gnus.  The front end then ``talks'' to a back end and says things like
25788 ``Give me the list of articles in the foo group'' or ``Show me article
25789 number 4711''.
25790
25791 So a back end mainly defines either a protocol (the @code{nntp} back
25792 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25793 accesses mail via @acronym{IMAP}) or a file format and directory
25794 layout (the @code{nnspool} back end accesses news via the common
25795 ``spool directory'' format, the @code{nnml} back end access mail via a
25796 file format and directory layout that's quite similar).
25797
25798 Gnus does not handle the underlying media, so to speak---this is all
25799 done by the back ends.  A back end is a collection of functions to
25800 access the articles.
25801
25802 However, sometimes the term ``back end'' is also used where ``server''
25803 would have been more appropriate.  And then there is the term ``select
25804 method'' which can mean either.  The Gnus terminology can be quite
25805 confusing.
25806
25807 @item native
25808 @cindex native
25809 Gnus will always use one method (and back end) as the @dfn{native}, or
25810 default, way of getting news.
25811
25812 @item foreign
25813 @cindex foreign
25814 You can also have any number of foreign groups active at the same time.
25815 These are groups that use non-native non-secondary back ends for getting
25816 news.
25817
25818 @item secondary
25819 @cindex secondary
25820 Secondary back ends are somewhere half-way between being native and being
25821 foreign, but they mostly act like they are native.
25822
25823 @item article
25824 @cindex article
25825 A message that has been posted as news.
25826
25827 @item mail message
25828 @cindex mail message
25829 A message that has been mailed.
25830
25831 @item message
25832 @cindex message
25833 A mail message or news article
25834
25835 @item head
25836 @cindex head
25837 The top part of a message, where administrative information (etc.) is
25838 put.
25839
25840 @item body
25841 @cindex body
25842 The rest of an article.  Everything not in the head is in the
25843 body.
25844
25845 @item header
25846 @cindex header
25847 A line from the head of an article.
25848
25849 @item headers
25850 @cindex headers
25851 A collection of such lines, or a collection of heads.  Or even a
25852 collection of @acronym{NOV} lines.
25853
25854 @item @acronym{NOV}
25855 @cindex @acronym{NOV}
25856 When Gnus enters a group, it asks the back end for the headers of all
25857 unread articles in the group.  Most servers support the News OverView
25858 format, which is more compact and much faster to read and parse than the
25859 normal @sc{head} format.
25860
25861 @item level
25862 @cindex levels
25863 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25864 that have a lower level are ``more'' subscribed than the groups with a
25865 higher level.  In fact, groups on levels 1-5 are considered
25866 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25867 are @dfn{killed}.  Commands for listing groups and scanning for new
25868 articles will all use the numeric prefix as @dfn{working level}.
25869
25870 @item killed groups
25871 @cindex killed groups
25872 No information on killed groups is stored or updated, which makes killed
25873 groups much easier to handle than subscribed groups.
25874
25875 @item zombie groups
25876 @cindex zombie groups
25877 Just like killed groups, only slightly less dead.
25878
25879 @item active file
25880 @cindex active file
25881 The news server has to keep track of what articles it carries, and what
25882 groups exist.  All this information in stored in the active file, which
25883 is rather large, as you might surmise.
25884
25885 @item bogus groups
25886 @cindex bogus groups
25887 A group that exists in the @file{.newsrc} file, but isn't known to the
25888 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25889 This means that the group probably doesn't exist (any more).
25890
25891 @item activating
25892 @cindex activating groups
25893 The act of asking the server for info on a group and computing the
25894 number of unread articles is called @dfn{activating the group}.
25895 Un-activated groups are listed with @samp{*} in the group buffer.
25896
25897 @item server
25898 @cindex server
25899 A machine one can connect to and get news (or mail) from.
25900
25901 @item select method
25902 @cindex select method
25903 A structure that specifies the back end, the server and the virtual
25904 server settings.
25905
25906 @item virtual server
25907 @cindex virtual server
25908 A named select method.  Since a select method defines all there is to
25909 know about connecting to a (physical) server, taking the thing as a
25910 whole is a virtual server.
25911
25912 @item washing
25913 @cindex washing
25914 Taking a buffer and running it through a filter of some sort.  The
25915 result will (more often than not) be cleaner and more pleasing than the
25916 original.
25917
25918 @item ephemeral groups
25919 @cindex ephemeral groups
25920 @cindex temporary groups
25921 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25922 groups are groups that will have no data stored---when you exit the
25923 group, it'll disappear into the aether.
25924
25925 @item solid groups
25926 @cindex solid groups
25927 This is the opposite of ephemeral groups.  All groups listed in the
25928 group buffer are solid groups.
25929
25930 @item sparse articles
25931 @cindex sparse articles
25932 These are article placeholders shown in the summary buffer when
25933 @code{gnus-build-sparse-threads} has been switched on.
25934
25935 @item threading
25936 @cindex threading
25937 To put responses to articles directly after the articles they respond
25938 to---in a hierarchical fashion.
25939
25940 @item root
25941 @cindex root
25942 @cindex thread root
25943 The first article in a thread is the root.  It is the ancestor of all
25944 articles in the thread.
25945
25946 @item parent
25947 @cindex parent
25948 An article that has responses.
25949
25950 @item child
25951 @cindex child
25952 An article that responds to a different article---its parent.
25953
25954 @item digest
25955 @cindex digest
25956 A collection of messages in one file.  The most common digest format is
25957 specified by RFC 1153.
25958
25959 @item splitting
25960 @cindex splitting, terminolgy
25961 @cindex mail sorting
25962 @cindex mail filtering (splitting)
25963 The action of sorting your emails according to certain rules. Sometimes
25964 incorrectly called mail filtering.
25965
25966 @end table
25967
25968
25969 @page
25970 @node Customization
25971 @section Customization
25972 @cindex general customization
25973
25974 All variables are properly documented elsewhere in this manual.  This
25975 section is designed to give general pointers on how to customize Gnus
25976 for some quite common situations.
25977
25978 @menu
25979 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25980 * Slow Terminal Connection::    You run a remote Emacs.
25981 * Little Disk Space::           You feel that having large setup files is icky.
25982 * Slow Machine::                You feel like buying a faster machine.
25983 @end menu
25984
25985
25986 @node Slow/Expensive Connection
25987 @subsection Slow/Expensive NNTP Connection
25988
25989 If you run Emacs on a machine locally, and get your news from a machine
25990 over some very thin strings, you want to cut down on the amount of data
25991 Gnus has to get from the @acronym{NNTP} server.
25992
25993 @table @code
25994
25995 @item gnus-read-active-file
25996 Set this to @code{nil}, which will inhibit Gnus from requesting the
25997 entire active file from the server.  This file is often v.  large.  You
25998 also have to set @code{gnus-check-new-newsgroups} and
25999 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
26000 doesn't suddenly decide to fetch the active file anyway.
26001
26002 @item gnus-nov-is-evil
26003 This one has to be @code{nil}.  If not, grabbing article headers from
26004 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
26005 support @sc{xover}; Gnus will detect this by itself.
26006 @end table
26007
26008
26009 @node Slow Terminal Connection
26010 @subsection Slow Terminal Connection
26011
26012 Let's say you use your home computer for dialing up the system that runs
26013 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
26014 possible) the amount of data sent over the wires.
26015
26016 @table @code
26017
26018 @item gnus-auto-center-summary
26019 Set this to @code{nil} to inhibit Gnus from re-centering the summary
26020 buffer all the time.  If it is @code{vertical}, do only vertical
26021 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
26022 horizontal and vertical recentering.
26023
26024 @item gnus-visible-headers
26025 Cut down on the headers included in the articles to the
26026 minimum.  You can, in fact, make do without them altogether---most of the
26027 useful data is in the summary buffer, anyway.  Set this variable to
26028 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
26029
26030 Set this hook to all the available hiding commands:
26031 @lisp
26032 (setq gnus-treat-hide-headers 'head
26033       gnus-treat-hide-signature t
26034       gnus-treat-hide-citation t)
26035 @end lisp
26036
26037 @item gnus-use-full-window
26038 By setting this to @code{nil}, you can make all the windows smaller.
26039 While this doesn't really cut down much generally, it means that you
26040 have to see smaller portions of articles before deciding that you didn't
26041 want to read them anyway.
26042
26043 @item gnus-thread-hide-subtree
26044 If this is non-@code{nil}, all threads in the summary buffer will be
26045 hidden initially.
26046
26047
26048 @item gnus-updated-mode-lines
26049 If this is @code{nil}, Gnus will not put information in the buffer mode
26050 lines, which might save some time.
26051 @end table
26052
26053
26054 @node Little Disk Space
26055 @subsection Little Disk Space
26056 @cindex disk space
26057
26058 The startup files can get rather large, so you may want to cut their
26059 sizes a bit if you are running out of space.
26060
26061 @table @code
26062
26063 @item gnus-save-newsrc-file
26064 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
26065 only save @file{.newsrc.eld}.  This means that you will not be able to
26066 use any other newsreaders than Gnus.  This variable is @code{t} by
26067 default.
26068
26069 @item gnus-read-newsrc-file
26070 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
26071 only read @file{.newsrc.eld}.  This means that you will not be able to
26072 use any other newsreaders than Gnus.  This variable is @code{t} by
26073 default.
26074
26075 @item gnus-save-killed-list
26076 If this is @code{nil}, Gnus will not save the list of dead groups.  You
26077 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
26078 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
26079 variable to @code{nil}.  This variable is @code{t} by default.
26080
26081 @end table
26082
26083
26084 @node Slow Machine
26085 @subsection Slow Machine
26086 @cindex slow machine
26087
26088 If you have a slow machine, or are just really impatient, there are a
26089 few things you can do to make Gnus run faster.
26090
26091 Set @code{gnus-check-new-newsgroups} and
26092 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
26093
26094 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
26095 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
26096 summary buffer faster.
26097
26098
26099 @page
26100 @node Troubleshooting
26101 @section Troubleshooting
26102 @cindex troubleshooting
26103
26104 Gnus works @emph{so} well straight out of the box---I can't imagine any
26105 problems, really.
26106
26107 Ahem.
26108
26109 @enumerate
26110
26111 @item
26112 Make sure your computer is switched on.
26113
26114 @item
26115 Make sure that you really load the current Gnus version.  If you have
26116 been running @sc{gnus}, you need to exit Emacs and start it up again before
26117 Gnus will work.
26118
26119 @item
26120 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
26121 like @samp{T-gnus 6.16.* (based on Gnus v5.10.*; for SEMI 1.1*, FLIM
26122 1.1*)} you have the right files loaded.  Otherwise you have some old
26123 @file{.el} files lying around.  Delete these.
26124
26125 @item
26126 Read the help group (@kbd{G h} in the group buffer) for a
26127 @acronym{FAQ} and a how-to.
26128
26129 @item
26130 @vindex max-lisp-eval-depth
26131 Gnus works on many recursive structures, and in some extreme (and very
26132 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
26133 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
26134 something like that.
26135 @end enumerate
26136
26137 If all else fails, report the problem as a bug.
26138
26139 @cindex bugs
26140 @cindex reporting bugs
26141
26142 @kindex M-x gnus-bug
26143 @findex gnus-bug
26144 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
26145 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
26146 me the backtrace.  I will fix bugs, but I can only fix them if you send
26147 me a precise description as to how to reproduce the bug.
26148
26149 You really can never be too detailed in a bug report.  Always use the
26150 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26151 a 10Kb mail each time you use it, and even if you have sent me your
26152 environment 500 times before.  I don't care.  I want the full info each
26153 time.
26154
26155 It is also important to remember that I have no memory whatsoever.  If
26156 you send a bug report, and I send you a reply, and then you just send
26157 back ``No, it's not! Moron!'', I will have no idea what you are
26158 insulting me about.  Always over-explain everything.  It's much easier
26159 for all of us---if I don't have all the information I need, I will just
26160 mail you and ask for more info, and everything takes more time.
26161
26162 If the problem you're seeing is very visual, and you can't quite explain
26163 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26164 it somewhere it can be reached, and include the URL of the picture in
26165 the bug report.
26166
26167 @cindex patches
26168 If you would like to contribute a patch to fix bugs or make
26169 improvements, please produce the patch using @samp{diff -u}.
26170
26171 @cindex edebug
26172 If you want to debug your problem further before reporting, possibly
26173 in order to solve the problem yourself and send a patch, you can use
26174 edebug.  Debugging Lisp code is documented in the Elisp manual
26175 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26176 Lisp Reference Manual}).  To get you started with edebug, consider if
26177 you discover some weird behaviour when pressing @kbd{c}, the first
26178 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26179 the documentation buffer that leads you to the function definition,
26180 then press @kbd{M-x edebug-defun RET} with point inside that function,
26181 return to Gnus and press @kbd{c} to invoke the code.  You will be
26182 placed in the lisp buffer and can single step using @kbd{SPC} and
26183 evaluate expressions using @kbd{M-:} or inspect variables using
26184 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26185 @kbd{c} or @kbd{g}.
26186
26187 @cindex elp
26188 @cindex profile
26189 @cindex slow
26190 Sometimes, a problem do not directly generate an elisp error but
26191 manifests itself by causing Gnus to be very slow.  In these cases, you
26192 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26193 slow, and then try to analyze the backtrace (repeating the procedure
26194 helps isolating the real problem areas).
26195
26196 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26197 (or should be) fully documented elsewhere, but to get you started
26198 there are a few steps that need to be followed.  First, instrument the
26199 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26200 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26201 RET message}.  Then perform the operation that is slow and press
26202 @kbd{M-x elp-results}.  You will then see which operations that takes
26203 time, and can debug them further.  If the entire operation takes much
26204 longer than the time spent in the slowest function in the profiler
26205 output, you probably profiled the wrong part of Gnus.  To reset
26206 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26207 elp-restore-all} is supposed to remove profiling, but given the
26208 complexities and dynamic code generation in Gnus, it might not always
26209 work perfectly.
26210
26211 @cindex gnu.emacs.gnus
26212 @cindex ding mailing list
26213 If you just need help, you are better off asking on
26214 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26215 @email{ding@@gnus.org, the ding mailing list}.  Write to
26216 @email{ding-request@@gnus.org} to subscribe.
26217
26218
26219 @page
26220 @node Gnus Reference Guide
26221 @section Gnus Reference Guide
26222
26223 It is my hope that other people will figure out smart stuff that Gnus
26224 can do, and that other people will write those smart things as well.  To
26225 facilitate that I thought it would be a good idea to describe the inner
26226 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26227 it.
26228
26229 You can never expect the internals of a program not to change, but I
26230 will be defining (in some details) the interface between Gnus and its
26231 back ends (this is written in stone), the format of the score files
26232 (ditto), data structures (some are less likely to change than others)
26233 and general methods of operation.
26234
26235 @menu
26236 * Gnus Utility Functions::      Common functions and variable to use.
26237 * Back End Interface::          How Gnus communicates with the servers.
26238 * Score File Syntax::           A BNF definition of the score file standard.
26239 * Headers::                     How Gnus stores headers internally.
26240 * Ranges::                      A handy format for storing mucho numbers.
26241 * Group Info::                  The group info format.
26242 * Extended Interactive::        Symbolic prefixes and stuff.
26243 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26244 * Various File Formats::        Formats of files that Gnus use.
26245 @end menu
26246
26247
26248 @node Gnus Utility Functions
26249 @subsection Gnus Utility Functions
26250 @cindex Gnus utility functions
26251 @cindex utility functions
26252 @cindex functions
26253 @cindex internal variables
26254
26255 When writing small functions to be run from hooks (and stuff), it's
26256 vital to have access to the Gnus internal functions and variables.
26257 Below is a list of the most common ones.
26258
26259 @table @code
26260
26261 @item gnus-newsgroup-name
26262 @vindex gnus-newsgroup-name
26263 This variable holds the name of the current newsgroup.
26264
26265 @item gnus-find-method-for-group
26266 @findex gnus-find-method-for-group
26267 A function that returns the select method for @var{group}.
26268
26269 @item gnus-group-real-name
26270 @findex gnus-group-real-name
26271 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26272 name.
26273
26274 @item gnus-group-prefixed-name
26275 @findex gnus-group-prefixed-name
26276 Takes an unprefixed group name and a select method, and returns the full
26277 (prefixed) Gnus group name.
26278
26279 @item gnus-get-info
26280 @findex gnus-get-info
26281 Returns the group info list for @var{group}.
26282
26283 @item gnus-group-unread
26284 @findex gnus-group-unread
26285 The number of unread articles in @var{group}, or @code{t} if that is
26286 unknown.
26287
26288 @item gnus-active
26289 @findex gnus-active
26290 The active entry for @var{group}.
26291
26292 @item gnus-set-active
26293 @findex gnus-set-active
26294 Set the active entry for @var{group}.
26295
26296 @item gnus-add-current-to-buffer-list
26297 @findex gnus-add-current-to-buffer-list
26298 Adds the current buffer to the list of buffers to be killed on Gnus
26299 exit.
26300
26301 @item gnus-continuum-version
26302 @findex gnus-continuum-version
26303 Takes a Gnus version string as a parameter and returns a floating point
26304 number.  Earlier versions will always get a lower number than later
26305 versions.
26306
26307 @item gnus-group-read-only-p
26308 @findex gnus-group-read-only-p
26309 Says whether @var{group} is read-only or not.
26310
26311 @item gnus-news-group-p
26312 @findex gnus-news-group-p
26313 Says whether @var{group} came from a news back end.
26314
26315 @item gnus-ephemeral-group-p
26316 @findex gnus-ephemeral-group-p
26317 Says whether @var{group} is ephemeral or not.
26318
26319 @item gnus-server-to-method
26320 @findex gnus-server-to-method
26321 Returns the select method corresponding to @var{server}.
26322
26323 @item gnus-server-equal
26324 @findex gnus-server-equal
26325 Says whether two virtual servers are equal.
26326
26327 @item gnus-group-native-p
26328 @findex gnus-group-native-p
26329 Says whether @var{group} is native or not.
26330
26331 @item gnus-group-secondary-p
26332 @findex gnus-group-secondary-p
26333 Says whether @var{group} is secondary or not.
26334
26335 @item gnus-group-foreign-p
26336 @findex gnus-group-foreign-p
26337 Says whether @var{group} is foreign or not.
26338
26339 @item gnus-group-find-parameter
26340 @findex gnus-group-find-parameter
26341 Returns the parameter list of @var{group}.  If given a second parameter,
26342 returns the value of that parameter for @var{group}.
26343
26344 @item gnus-group-set-parameter
26345 @findex gnus-group-set-parameter
26346 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26347
26348 @item gnus-narrow-to-body
26349 @findex gnus-narrow-to-body
26350 Narrows the current buffer to the body of the article.
26351
26352 @item gnus-check-backend-function
26353 @findex gnus-check-backend-function
26354 Takes two parameters, @var{function} and @var{group}.  If the back end
26355 @var{group} comes from supports @var{function}, return non-@code{nil}.
26356
26357 @lisp
26358 (gnus-check-backend-function "request-scan" "nnml:misc")
26359 @result{} t
26360 @end lisp
26361
26362 @item gnus-read-method
26363 @findex gnus-read-method
26364 Prompts the user for a select method.
26365
26366 @end table
26367
26368
26369 @node Back End Interface
26370 @subsection Back End Interface
26371
26372 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26373 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26374 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26375 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26376 examples of the latter we have @code{nntp-port-number} and
26377 @code{nnmbox-directory}.
26378
26379 When Gnus asks for information from a back end---say @code{nntp}---on
26380 something, it will normally include a virtual server name in the
26381 function parameters.  (If not, the back end should use the ``current''
26382 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26383 server as its only (optional) parameter.  If this virtual server hasn't
26384 been opened, the function should fail.
26385
26386 Note that a virtual server name has no relation to some physical server
26387 name.  Take this example:
26388
26389 @lisp
26390 (nntp "odd-one"
26391       (nntp-address "ifi.uio.no")
26392       (nntp-port-number 4324))
26393 @end lisp
26394
26395 Here the virtual server name is @samp{odd-one} while the name of
26396 the physical server is @samp{ifi.uio.no}.
26397
26398 The back ends should be able to switch between several virtual servers.
26399 The standard back ends implement this by keeping an alist of virtual
26400 server environments that they pull down/push up when needed.
26401
26402 There are two groups of interface functions: @dfn{required functions},
26403 which must be present, and @dfn{optional functions}, which Gnus will
26404 always check for presence before attempting to call 'em.
26405
26406 All these functions are expected to return data in the buffer
26407 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26408 unfortunately named, but we'll have to live with it.  When I talk about
26409 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26410 talk about @dfn{return value}, I talk about the function value returned by
26411 the function call.  Functions that fail should return @code{nil} as the
26412 return value.
26413
26414 Some back ends could be said to be @dfn{server-forming} back ends, and
26415 some might be said not to be.  The latter are back ends that generally
26416 only operate on one group at a time, and have no concept of ``server''
26417 ---they have a group, and they deliver info on that group and nothing
26418 more.
26419
26420 Gnus identifies each message by way of group name and article number.  A
26421 few remarks about these article numbers might be useful.  First of all,
26422 the numbers are positive integers.  Secondly, it is normally not
26423 possible for later articles to ``re-use'' older article numbers without
26424 confusing Gnus.  That is, if a group has ever contained a message
26425 numbered 42, then no other message may get that number, or Gnus will get
26426 mightily confused.@footnote{See the function
26427 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26428 Third, article numbers must be assigned in order of arrival in the
26429 group; this is not necessarily the same as the date of the message.
26430
26431 The previous paragraph already mentions all the ``hard'' restrictions that
26432 article numbers must fulfill.  But it seems that it might be useful to
26433 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26434 if there are holes in the article numbering sequence.  However, due to
26435 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26436 also useful for the article numbers to start at 1 to avoid running out
26437 of numbers as long as possible.
26438
26439 Note that by convention, back ends are named @code{nnsomething}, but
26440 Gnus also comes with some @code{nnnotbackends}, such as
26441 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26442
26443 In the examples and definitions I will refer to the imaginary back end
26444 @code{nnchoke}.
26445
26446 @cindex @code{nnchoke}
26447
26448 @menu
26449 * Required Back End Functions::  Functions that must be implemented.
26450 * Optional Back End Functions::  Functions that need not be implemented.
26451 * Error Messaging::             How to get messages and report errors.
26452 * Writing New Back Ends::       Extending old back ends.
26453 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26454 * Mail-like Back Ends::         Some tips on mail back ends.
26455 @end menu
26456
26457
26458 @node Required Back End Functions
26459 @subsubsection Required Back End Functions
26460
26461 @table @code
26462
26463 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26464
26465 @var{articles} is either a range of article numbers or a list of
26466 @code{Message-ID}s.  Current back ends do not fully support either---only
26467 sequences (lists) of article numbers, and most back ends do not support
26468 retrieval of @code{Message-ID}s.  But they should try for both.
26469
26470 The result data should either be HEADs or @acronym{NOV} lines, and the result
26471 value should either be @code{headers} or @code{nov} to reflect this.
26472 This might later be expanded to @code{various}, which will be a mixture
26473 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26474
26475 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26476 headers'', in some meaning of the word.  This is generally done by
26477 fetching (at most) @var{fetch-old} extra headers less than the smallest
26478 article number in @code{articles}, and filling the gaps as well.  The
26479 presence of this parameter can be ignored if the back end finds it
26480 cumbersome to follow the request.  If this is non-@code{nil} and not a
26481 number, do maximum fetches.
26482
26483 Here's an example HEAD:
26484
26485 @example
26486 221 1056 Article retrieved.
26487 Path: ifi.uio.no!sturles
26488 From: sturles@@ifi.uio.no (Sturle Sunde)
26489 Newsgroups: ifi.discussion
26490 Subject: Re: Something very droll
26491 Date: 27 Oct 1994 14:02:57 +0100
26492 Organization: Dept. of Informatics, University of Oslo, Norway
26493 Lines: 26
26494 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26495 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26496 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26497 .
26498 @end example
26499
26500 So a @code{headers} return value would imply that there's a number of
26501 these in the data buffer.
26502
26503 Here's a BNF definition of such a buffer:
26504
26505 @example
26506 headers        = *head
26507 head           = error / valid-head
26508 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26509 valid-head     = valid-message *header "." eol
26510 valid-message  = "221 " <number> " Article retrieved." eol
26511 header         = <text> eol
26512 @end example
26513
26514 @cindex BNF
26515 (The version of BNF used here is the one used in RFC822.)
26516
26517 If the return value is @code{nov}, the data buffer should contain
26518 @dfn{network overview database} lines.  These are basically fields
26519 separated by tabs.
26520
26521 @example
26522 nov-buffer = *nov-line
26523 nov-line   = field 7*8[ <TAB> field ] eol
26524 field      = <text except TAB>
26525 @end example
26526
26527 For a closer look at what should be in those fields,
26528 @pxref{Headers}.
26529
26530
26531 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26532
26533 @var{server} is here the virtual server name.  @var{definitions} is a
26534 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26535
26536 If the server can't be opened, no error should be signaled.  The back end
26537 may then choose to refuse further attempts at connecting to this
26538 server.  In fact, it should do so.
26539
26540 If the server is opened already, this function should return a
26541 non-@code{nil} value.  There should be no data returned.
26542
26543
26544 @item (nnchoke-close-server &optional SERVER)
26545
26546 Close connection to @var{server} and free all resources connected
26547 to it.  Return @code{nil} if the server couldn't be closed for some
26548 reason.
26549
26550 There should be no data returned.
26551
26552
26553 @item (nnchoke-request-close)
26554
26555 Close connection to all servers and free all resources that the back end
26556 have reserved.  All buffers that have been created by that back end
26557 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26558 function is generally only called when Gnus is shutting down.
26559
26560 There should be no data returned.
26561
26562
26563 @item (nnchoke-server-opened &optional SERVER)
26564
26565 If @var{server} is the current virtual server, and the connection to the
26566 physical server is alive, then this function should return a
26567 non-@code{nil} value.  This function should under no circumstances
26568 attempt to reconnect to a server we have lost connection to.
26569
26570 There should be no data returned.
26571
26572
26573 @item (nnchoke-status-message &optional SERVER)
26574
26575 This function should return the last error message from @var{server}.
26576
26577 There should be no data returned.
26578
26579
26580 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26581
26582 The result data from this function should be the article specified by
26583 @var{article}.  This might either be a @code{Message-ID} or a number.
26584 It is optional whether to implement retrieval by @code{Message-ID}, but
26585 it would be nice if that were possible.
26586
26587 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26588 in this buffer instead of the normal data buffer.  This is to make it
26589 possible to avoid copying large amounts of data from one buffer to
26590 another, while Gnus mainly requests articles to be inserted directly
26591 into its article buffer.
26592
26593 If it is at all possible, this function should return a cons cell where
26594 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26595 the article number.  This will enable Gnus to find out what the real
26596 group and article numbers are when fetching articles by
26597 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26598 on successful article retrieval.
26599
26600
26601 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26602
26603 Get data on @var{group}.  This function also has the side effect of
26604 making @var{group} the current group.
26605
26606 If @var{fast}, don't bother to return useful data, just make @var{group}
26607 the current group.
26608
26609 Here's an example of some result data and a definition of the same:
26610
26611 @example
26612 211 56 1000 1059 ifi.discussion
26613 @end example
26614
26615 The first number is the status, which should be 211.  Next is the
26616 total number of articles in the group, the lowest article number, the
26617 highest article number, and finally the group name.  Note that the total
26618 number of articles may be less than one might think while just
26619 considering the highest and lowest article numbers, but some articles
26620 may have been canceled.  Gnus just discards the total-number, so
26621 whether one should take the bother to generate it properly (if that is a
26622 problem) is left as an exercise to the reader.  If the group contains no
26623 articles, the lowest article number should be reported as 1 and the
26624 highest as 0.
26625
26626 @example
26627 group-status = [ error / info ] eol
26628 error        = [ "4" / "5" ] 2<number> " " <Error message>
26629 info         = "211 " 3* [ <number> " " ] <string>
26630 @end example
26631
26632
26633 @item (nnchoke-close-group GROUP &optional SERVER)
26634
26635 Close @var{group} and free any resources connected to it.  This will be
26636 a no-op on most back ends.
26637
26638 There should be no data returned.
26639
26640
26641 @item (nnchoke-request-list &optional SERVER)
26642
26643 Return a list of all groups available on @var{server}.  And that means
26644 @emph{all}.
26645
26646 Here's an example from a server that only carries two groups:
26647
26648 @example
26649 ifi.test 0000002200 0000002000 y
26650 ifi.discussion 3324 3300 n
26651 @end example
26652
26653 On each line we have a group name, then the highest article number in
26654 that group, the lowest article number, and finally a flag.  If the group
26655 contains no articles, the lowest article number should be reported as 1
26656 and the highest as 0.
26657
26658 @example
26659 active-file = *active-line
26660 active-line = name " " <number> " " <number> " " flags eol
26661 name        = <string>
26662 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26663 @end example
26664
26665 The flag says whether the group is read-only (@samp{n}), is moderated
26666 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26667 (@samp{=other-group}) or none of the above (@samp{y}).
26668
26669
26670 @item (nnchoke-request-post &optional SERVER)
26671
26672 This function should post the current buffer.  It might return whether
26673 the posting was successful or not, but that's not required.  If, for
26674 instance, the posting is done asynchronously, it has generally not been
26675 completed by the time this function concludes.  In that case, this
26676 function should set up some kind of sentinel to beep the user loud and
26677 clear if the posting could not be completed.
26678
26679 There should be no result data from this function.
26680
26681 @end table
26682
26683
26684 @node Optional Back End Functions
26685 @subsubsection Optional Back End Functions
26686
26687 @table @code
26688
26689 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26690
26691 @var{groups} is a list of groups, and this function should request data
26692 on all those groups.  How it does it is of no concern to Gnus, but it
26693 should attempt to do this in a speedy fashion.
26694
26695 The return value of this function can be either @code{active} or
26696 @code{group}, which says what the format of the result data is.  The
26697 former is in the same format as the data from
26698 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26699 in the same format as @code{nnchoke-request-group} gives.
26700
26701 @example
26702 group-buffer = *active-line / *group-status
26703 @end example
26704
26705
26706 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26707
26708 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26709 alterations.  This comes in handy if the back end really carries all
26710 the information (as is the case with virtual and imap groups).  This
26711 function should destructively alter the info to suit its needs, and
26712 should return a non-@code{nil} value.
26713
26714 There should be no result data from this function.
26715
26716
26717 @item (nnchoke-request-type GROUP &optional ARTICLE)
26718
26719 When the user issues commands for ``sending news'' (@kbd{F} in the
26720 summary buffer, for instance), Gnus has to know whether the article the
26721 user is following up on is news or mail.  This function should return
26722 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26723 is mail and @code{unknown} if the type can't be decided.  (The
26724 @var{article} parameter is necessary in @code{nnvirtual} groups which
26725 might very well combine mail groups and news groups.)  Both @var{group}
26726 and @var{article} may be @code{nil}.
26727
26728 There should be no result data from this function.
26729
26730
26731 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26732
26733 Set/remove/add marks on articles.  Normally Gnus handles the article
26734 marks (such as read, ticked, expired etc) internally, and store them in
26735 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26736 all information about the articles on the server, so Gnus need to
26737 propagate the mark information to the server.
26738
26739 @var{action} is a list of mark setting requests, having this format:
26740
26741 @example
26742 (RANGE ACTION MARK)
26743 @end example
26744
26745 @var{range} is a range of articles you wish to update marks on.
26746 @var{action} is @code{add} or @code{del}, used to add marks or remove
26747 marks (preserving all marks not mentioned).  @var{mark} is a list of
26748 marks; where each mark is a symbol.  Currently used marks are
26749 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26750 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26751 @code{forward} and @code{recent}, but your back end should, if
26752 possible, not limit itself to these.
26753
26754 Given contradictory actions, the last action in the list should be the
26755 effective one.  That is, if your action contains a request to add the
26756 @code{tick} mark on article 1 and, later in the list, a request to
26757 remove the mark on the same article, the mark should in fact be removed.
26758
26759 An example action list:
26760
26761 @example
26762 (((5 12 30) 'del '(tick))
26763  ((10 . 90) 'add '(read expire))
26764  ((92 94) 'del '(read)))
26765 @end example
26766
26767 The function should return a range of articles it wasn't able to set the
26768 mark on (currently not used for anything).
26769
26770 There should be no result data from this function.
26771
26772 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26773
26774 If the user tries to set a mark that the back end doesn't like, this
26775 function may change the mark.  Gnus will use whatever this function
26776 returns as the mark for @var{article} instead of the original
26777 @var{mark}.  If the back end doesn't care, it must return the original
26778 @var{mark}, and not @code{nil} or any other type of garbage.
26779
26780 The only use for this I can see is what @code{nnvirtual} does with
26781 it---if a component group is auto-expirable, marking an article as read
26782 in the virtual group should result in the article being marked as
26783 expirable.
26784
26785 There should be no result data from this function.
26786
26787
26788 @item (nnchoke-request-scan &optional GROUP SERVER)
26789
26790 This function may be called at any time (by Gnus or anything else) to
26791 request that the back end check for incoming articles, in one way or
26792 another.  A mail back end will typically read the spool file or query
26793 the @acronym{POP} server when this function is invoked.  The
26794 @var{group} doesn't have to be heeded---if the back end decides that
26795 it is too much work just scanning for a single group, it may do a
26796 total scan of all groups.  It would be nice, however, to keep things
26797 local if that's practical.
26798
26799 There should be no result data from this function.
26800
26801
26802 @item (nnchoke-request-group-description GROUP &optional SERVER)
26803
26804 The result data from this function should be a description of
26805 @var{group}.
26806
26807 @example
26808 description-line = name <TAB> description eol
26809 name             = <string>
26810 description      = <text>
26811 @end example
26812
26813 @item (nnchoke-request-list-newsgroups &optional SERVER)
26814
26815 The result data from this function should be the description of all
26816 groups available on the server.
26817
26818 @example
26819 description-buffer = *description-line
26820 @end example
26821
26822
26823 @item (nnchoke-request-newgroups DATE &optional SERVER)
26824
26825 The result data from this function should be all groups that were
26826 created after @samp{date}, which is in normal human-readable date format
26827 (i.e., the date format used in mail and news headers, and returned by
26828 the function @code{message-make-date} by default).  The data should be
26829 in the active buffer format.
26830
26831 It is okay for this function to return ``too many'' groups; some back ends
26832 might find it cheaper to return the full list of groups, rather than
26833 just the new groups.  But don't do this for back ends with many groups.
26834 Normally, if the user creates the groups herself, there won't be too
26835 many groups, so @code{nnml} and the like are probably safe.  But for
26836 back ends like @code{nntp}, where the groups have been created by the
26837 server, it is quite likely that there can be many groups.
26838
26839
26840 @item (nnchoke-request-create-group GROUP &optional SERVER)
26841
26842 This function should create an empty group with name @var{group}.
26843
26844 There should be no return data.
26845
26846
26847 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26848
26849 This function should run the expiry process on all articles in the
26850 @var{articles} range (which is currently a simple list of article
26851 numbers.)  It is left up to the back end to decide how old articles
26852 should be before they are removed by this function.  If @var{force} is
26853 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26854 they are.
26855
26856 This function should return a list of articles that it did not/was not
26857 able to delete.
26858
26859 There should be no result data returned.
26860
26861
26862 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26863
26864 This function should move @var{article} (which is a number) from
26865 @var{group} by calling @var{accept-form}.
26866
26867 This function should ready the article in question for moving by
26868 removing any header lines it has added to the article, and generally
26869 should ``tidy up'' the article.  Then it should @code{eval}
26870 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26871 will do the actual copying.  If this @code{eval} returns a
26872 non-@code{nil} value, the article should be removed.
26873
26874 If @var{last} is @code{nil}, that means that there is a high likelihood
26875 that there will be more requests issued shortly, so that allows some
26876 optimizations.
26877
26878 The function should return a cons where the @code{car} is the group name and
26879 the @code{cdr} is the article number that the article was entered as.
26880
26881 The group should exist before the back end is asked to accept the
26882 article for that group.
26883
26884 There should be no data returned.
26885
26886
26887 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26888
26889 This function takes the current buffer and inserts it into @var{group}.
26890 If @var{last} in @code{nil}, that means that there will be more calls to
26891 this function in short order.
26892
26893 The function should return a cons where the @code{car} is the group name and
26894 the @code{cdr} is the article number that the article was entered as.
26895
26896 There should be no data returned.
26897
26898
26899 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26900
26901 This function should remove @var{article} (which is a number) from
26902 @var{group} and insert @var{buffer} there instead.
26903
26904 There should be no data returned.
26905
26906
26907 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26908
26909 This function should delete @var{group}.  If @var{force}, it should
26910 really delete all the articles in the group, and then delete the group
26911 itself.  (If there is such a thing as ``the group itself''.)
26912
26913 There should be no data returned.
26914
26915
26916 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26917
26918 This function should rename @var{group} into @var{new-name}.  All
26919 articles in @var{group} should move to @var{new-name}.
26920
26921 There should be no data returned.
26922
26923 @end table
26924
26925
26926 @node Error Messaging
26927 @subsubsection Error Messaging
26928
26929 @findex nnheader-report
26930 @findex nnheader-get-report
26931 The back ends should use the function @code{nnheader-report} to report
26932 error conditions---they should not raise errors when they aren't able to
26933 perform a request.  The first argument to this function is the back end
26934 symbol, and the rest are interpreted as arguments to @code{format} if
26935 there are multiple of them, or just a string if there is one of them.
26936 This function must always returns @code{nil}.
26937
26938 @lisp
26939 (nnheader-report 'nnchoke "You did something totally bogus")
26940
26941 (nnheader-report 'nnchoke "Could not request group %s" group)
26942 @end lisp
26943
26944 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26945 @code{nil} back from a server, and this function returns the most
26946 recently reported message for the back end in question.  This function
26947 takes one argument---the server symbol.
26948
26949 Internally, these functions access @var{back-end}@code{-status-string},
26950 so the @code{nnchoke} back end will have its error message stored in
26951 @code{nnchoke-status-string}.
26952
26953
26954 @node Writing New Back Ends
26955 @subsubsection Writing New Back Ends
26956
26957 Many back ends are quite similar.  @code{nnml} is just like
26958 @code{nnspool}, but it allows you to edit the articles on the server.
26959 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26960 and it doesn't maintain overview databases.  @code{nndir} is just like
26961 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26962 editing articles.
26963
26964 It would make sense if it were possible to ``inherit'' functions from
26965 back ends when writing new back ends.  And, indeed, you can do that if you
26966 want to.  (You don't have to if you don't want to, of course.)
26967
26968 All the back ends declare their public variables and functions by using a
26969 package called @code{nnoo}.
26970
26971 To inherit functions from other back ends (and allow other back ends to
26972 inherit functions from the current back end), you should use the
26973 following macros:
26974
26975 @table @code
26976
26977 @item nnoo-declare
26978 This macro declares the first parameter to be a child of the subsequent
26979 parameters.  For instance:
26980
26981 @lisp
26982 (nnoo-declare nndir
26983   nnml nnmh)
26984 @end lisp
26985
26986 @code{nndir} has declared here that it intends to inherit functions from
26987 both @code{nnml} and @code{nnmh}.
26988
26989 @item defvoo
26990 This macro is equivalent to @code{defvar}, but registers the variable as
26991 a public server variable.  Most state-oriented variables should be
26992 declared with @code{defvoo} instead of @code{defvar}.
26993
26994 In addition to the normal @code{defvar} parameters, it takes a list of
26995 variables in the parent back ends to map the variable to when executing
26996 a function in those back ends.
26997
26998 @lisp
26999 (defvoo nndir-directory nil
27000   "Where nndir will look for groups."
27001   nnml-current-directory nnmh-current-directory)
27002 @end lisp
27003
27004 This means that @code{nnml-current-directory} will be set to
27005 @code{nndir-directory} when an @code{nnml} function is called on behalf
27006 of @code{nndir}.  (The same with @code{nnmh}.)
27007
27008 @item nnoo-define-basics
27009 This macro defines some common functions that almost all back ends should
27010 have.
27011
27012 @lisp
27013 (nnoo-define-basics nndir)
27014 @end lisp
27015
27016 @item deffoo
27017 This macro is just like @code{defun} and takes the same parameters.  In
27018 addition to doing the normal @code{defun} things, it registers the
27019 function as being public so that other back ends can inherit it.
27020
27021 @item nnoo-map-functions
27022 This macro allows mapping of functions from the current back end to
27023 functions from the parent back ends.
27024
27025 @lisp
27026 (nnoo-map-functions nndir
27027   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27028   (nnmh-request-article 0 nndir-current-group 0 0))
27029 @end lisp
27030
27031 This means that when @code{nndir-retrieve-headers} is called, the first,
27032 third, and fourth parameters will be passed on to
27033 @code{nnml-retrieve-headers}, while the second parameter is set to the
27034 value of @code{nndir-current-group}.
27035
27036 @item nnoo-import
27037 This macro allows importing functions from back ends.  It should be the
27038 last thing in the source file, since it will only define functions that
27039 haven't already been defined.
27040
27041 @lisp
27042 (nnoo-import nndir
27043   (nnmh
27044    nnmh-request-list
27045    nnmh-request-newgroups)
27046   (nnml))
27047 @end lisp
27048
27049 This means that calls to @code{nndir-request-list} should just be passed
27050 on to @code{nnmh-request-list}, while all public functions from
27051 @code{nnml} that haven't been defined in @code{nndir} yet should be
27052 defined now.
27053
27054 @end table
27055
27056 Below is a slightly shortened version of the @code{nndir} back end.
27057
27058 @lisp
27059 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
27060 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
27061
27062 ;;; @r{Code:}
27063
27064 (require 'nnheader)
27065 (require 'nnmh)
27066 (require 'nnml)
27067 (require 'nnoo)
27068 (eval-when-compile (require 'cl))
27069
27070 (nnoo-declare nndir
27071   nnml nnmh)
27072
27073 (defvoo nndir-directory nil
27074   "Where nndir will look for groups."
27075   nnml-current-directory nnmh-current-directory)
27076
27077 (defvoo nndir-nov-is-evil nil
27078   "*Non-nil means that nndir will never retrieve NOV headers."
27079   nnml-nov-is-evil)
27080
27081 (defvoo nndir-current-group ""
27082   nil
27083   nnml-current-group nnmh-current-group)
27084 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
27085 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
27086
27087 (defvoo nndir-status-string "" nil nnmh-status-string)
27088 (defconst nndir-version "nndir 1.0")
27089
27090 ;;; @r{Interface functions.}
27091
27092 (nnoo-define-basics nndir)
27093
27094 (deffoo nndir-open-server (server &optional defs)
27095   (setq nndir-directory
27096         (or (cadr (assq 'nndir-directory defs))
27097             server))
27098   (unless (assq 'nndir-directory defs)
27099     (push `(nndir-directory ,server) defs))
27100   (push `(nndir-current-group
27101           ,(file-name-nondirectory
27102             (directory-file-name nndir-directory)))
27103         defs)
27104   (push `(nndir-top-directory
27105           ,(file-name-directory (directory-file-name nndir-directory)))
27106         defs)
27107   (nnoo-change-server 'nndir server defs))
27108
27109 (nnoo-map-functions nndir
27110   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27111   (nnmh-request-article 0 nndir-current-group 0 0)
27112   (nnmh-request-group nndir-current-group 0 0)
27113   (nnmh-close-group nndir-current-group 0))
27114
27115 (nnoo-import nndir
27116   (nnmh
27117    nnmh-status-message
27118    nnmh-request-list
27119    nnmh-request-newgroups))
27120
27121 (provide 'nndir)
27122 @end lisp
27123
27124
27125 @node Hooking New Back Ends Into Gnus
27126 @subsubsection Hooking New Back Ends Into Gnus
27127
27128 @vindex gnus-valid-select-methods
27129 @findex gnus-declare-backend
27130 Having Gnus start using your new back end is rather easy---you just
27131 declare it with the @code{gnus-declare-backend} functions.  This will
27132 enter the back end into the @code{gnus-valid-select-methods} variable.
27133
27134 @code{gnus-declare-backend} takes two parameters---the back end name and
27135 an arbitrary number of @dfn{abilities}.
27136
27137 Here's an example:
27138
27139 @lisp
27140 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
27141 @end lisp
27142
27143 The above line would then go in the @file{nnchoke.el} file.
27144
27145 The abilities can be:
27146
27147 @table @code
27148 @item mail
27149 This is a mailish back end---followups should (probably) go via mail.
27150 @item post
27151 This is a newsish back end---followups should (probably) go via news.
27152 @item post-mail
27153 This back end supports both mail and news.
27154 @item none
27155 This is neither a post nor mail back end---it's something completely
27156 different.
27157 @item respool
27158 It supports respooling---or rather, it is able to modify its source
27159 articles and groups.
27160 @item address
27161 The name of the server should be in the virtual server name.  This is
27162 true for almost all back ends.
27163 @item prompt-address
27164 The user should be prompted for an address when doing commands like
27165 @kbd{B} in the group buffer.  This is true for back ends like
27166 @code{nntp}, but not @code{nnmbox}, for instance.
27167 @end table
27168
27169
27170 @node Mail-like Back Ends
27171 @subsubsection Mail-like Back Ends
27172
27173 One of the things that separate the mail back ends from the rest of the
27174 back ends is the heavy dependence by most of the mail back ends on
27175 common functions in @file{nnmail.el}.  For instance, here's the
27176 definition of @code{nnml-request-scan}:
27177
27178 @lisp
27179 (deffoo nnml-request-scan (&optional group server)
27180   (setq nnml-article-file-alist nil)
27181   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27182 @end lisp
27183
27184 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27185 and @code{nnmail} takes care of all the moving and splitting of the
27186 mail.
27187
27188 This function takes four parameters.
27189
27190 @table @var
27191 @item method
27192 This should be a symbol to designate which back end is responsible for
27193 the call.
27194
27195 @item exit-function
27196 This function should be called after the splitting has been performed.
27197
27198 @item temp-directory
27199 Where the temporary files should be stored.
27200
27201 @item group
27202 This optional argument should be a group name if the splitting is to be
27203 performed for one group only.
27204 @end table
27205
27206 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27207 save each article.  @var{back-end}@code{-active-number} will be called to
27208 find the article number assigned to this article.
27209
27210 The function also uses the following variables:
27211 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27212 this back end); and @var{back-end}@code{-group-alist} and
27213 @var{back-end}@code{-active-file} to generate the new active file.
27214 @var{back-end}@code{-group-alist} should be a group-active alist, like
27215 this:
27216
27217 @example
27218 (("a-group" (1 . 10))
27219  ("some-group" (34 . 39)))
27220 @end example
27221
27222
27223 @node Score File Syntax
27224 @subsection Score File Syntax
27225
27226 Score files are meant to be easily parseable, but yet extremely
27227 mallable.  It was decided that something that had the same read syntax
27228 as an Emacs Lisp list would fit that spec.
27229
27230 Here's a typical score file:
27231
27232 @lisp
27233 (("summary"
27234   ("win95" -10000 nil s)
27235   ("Gnus"))
27236  ("from"
27237   ("Lars" -1000))
27238  (mark -100))
27239 @end lisp
27240
27241 BNF definition of a score file:
27242
27243 @example
27244 score-file      = "" / "(" *element ")"
27245 element         = rule / atom
27246 rule            = string-rule / number-rule / date-rule
27247 string-rule     = "(" quote string-header quote space *string-match ")"
27248 number-rule     = "(" quote number-header quote space *number-match ")"
27249 date-rule       = "(" quote date-header quote space *date-match ")"
27250 quote           = <ascii 34>
27251 string-header   = "subject" / "from" / "references" / "message-id" /
27252                   "xref" / "body" / "head" / "all" / "followup"
27253 number-header   = "lines" / "chars"
27254 date-header     = "date"
27255 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27256                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27257 score           = "nil" / <integer>
27258 date            = "nil" / <natural number>
27259 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27260                   "r" / "regex" / "R" / "Regex" /
27261                   "e" / "exact" / "E" / "Exact" /
27262                   "f" / "fuzzy" / "F" / "Fuzzy"
27263 number-match    = "(" <integer> [ "" / [ space score [ "" /
27264                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27265 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27266 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27267                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27268 date-match-t    = "nil" / "at" / "before" / "after"
27269 atom            = "(" [ required-atom / optional-atom ] ")"
27270 required-atom   = mark / expunge / mark-and-expunge / files /
27271                   exclude-files / read-only / touched
27272 optional-atom   = adapt / local / eval
27273 mark            = "mark" space nil-or-number
27274 nil-or-number   = "nil" / <integer>
27275 expunge         = "expunge" space nil-or-number
27276 mark-and-expunge = "mark-and-expunge" space nil-or-number
27277 files           = "files" *[ space <string> ]
27278 exclude-files   = "exclude-files" *[ space <string> ]
27279 read-only       = "read-only" [ space "nil" / space "t" ]
27280 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27281 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27282 local           = "local" *[ space "(" <string> space <form> ")" ]
27283 eval            = "eval" space <form>
27284 space           = *[ " " / <TAB> / <NEWLINE> ]
27285 @end example
27286
27287 Any unrecognized elements in a score file should be ignored, but not
27288 discarded.
27289
27290 As you can see, white space is needed, but the type and amount of white
27291 space is irrelevant.  This means that formatting of the score file is
27292 left up to the programmer---if it's simpler to just spew it all out on
27293 one looong line, then that's ok.
27294
27295 The meaning of the various atoms are explained elsewhere in this
27296 manual (@pxref{Score File Format}).
27297
27298
27299 @node Headers
27300 @subsection Headers
27301
27302 Internally Gnus uses a format for storing article headers that
27303 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27304 almost suspect that the author looked at the @acronym{NOV} specification and
27305 just shamelessly @emph{stole} the entire thing, and one would be right.
27306
27307 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27308 RFC 1036 to talk about lines in the head of an article (e.g.,
27309 @code{From}).  It is used by many people as a synonym for
27310 ``head''---``the header and the body''.  (That should be avoided, in my
27311 opinion.)  And Gnus uses a format internally that it calls ``header'',
27312 which is what I'm talking about here.  This is a 9-element vector,
27313 basically, with each header (ouch) having one slot.
27314
27315 These slots are, in order: @code{number}, @code{subject}, @code{from},
27316 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27317 @code{xref}, and @code{extra}.  There are macros for accessing and
27318 setting these slots---they all have predictable names beginning with
27319 @code{mail-header-} and @code{mail-header-set-}, respectively.
27320
27321 All these slots contain strings, except the @code{extra} slot, which
27322 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27323
27324
27325 @node Ranges
27326 @subsection Ranges
27327
27328 @sc{gnus} introduced a concept that I found so useful that I've started
27329 using it a lot and have elaborated on it greatly.
27330
27331 The question is simple: If you have a large amount of objects that are
27332 identified by numbers (say, articles, to take a @emph{wild} example)
27333 that you want to qualify as being ``included'', a normal sequence isn't
27334 very useful.  (A 200,000 length sequence is a bit long-winded.)
27335
27336 The solution is as simple as the question: You just collapse the
27337 sequence.
27338
27339 @example
27340 (1 2 3 4 5 6 10 11 12)
27341 @end example
27342
27343 is transformed into
27344
27345 @example
27346 ((1 . 6) (10 . 12))
27347 @end example
27348
27349 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27350 lonesome object, a @samp{13} is a valid element:
27351
27352 @example
27353 ((1 . 6) 7 (10 . 12))
27354 @end example
27355
27356 This means that comparing two ranges to find out whether they are equal
27357 is slightly tricky:
27358
27359 @example
27360 ((1 . 5) 7 8 (10 . 12))
27361 @end example
27362
27363 and
27364
27365 @example
27366 ((1 . 5) (7 . 8) (10 . 12))
27367 @end example
27368
27369 are equal.  In fact, any non-descending list is a range:
27370
27371 @example
27372 (1 2 3 4 5)
27373 @end example
27374
27375 is a perfectly valid range, although a pretty long-winded one.  This is
27376 also valid:
27377
27378 @example
27379 (1 . 5)
27380 @end example
27381
27382 and is equal to the previous range.
27383
27384 Here's a BNF definition of ranges.  Of course, one must remember the
27385 semantic requirement that the numbers are non-descending.  (Any number
27386 of repetition of the same number is allowed, but apt to disappear in
27387 range handling.)
27388
27389 @example
27390 range           = simple-range / normal-range
27391 simple-range    = "(" number " . " number ")"
27392 normal-range    = "(" start-contents ")"
27393 contents        = "" / simple-range *[ " " contents ] /
27394                   number *[ " " contents ]
27395 @end example
27396
27397 Gnus currently uses ranges to keep track of read articles and article
27398 marks.  I plan on implementing a number of range operators in C if The
27399 Powers That Be are willing to let me.  (I haven't asked yet, because I
27400 need to do some more thinking on what operators I need to make life
27401 totally range-based without ever having to convert back to normal
27402 sequences.)
27403
27404
27405 @node Group Info
27406 @subsection Group Info
27407
27408 Gnus stores all permanent info on groups in a @dfn{group info} list.
27409 This list is from three to six elements (or more) long and exhaustively
27410 describes the group.
27411
27412 Here are two example group infos; one is a very simple group while the
27413 second is a more complex one:
27414
27415 @example
27416 ("no.group" 5 ((1 . 54324)))
27417
27418 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27419                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27420                 (nnml "")
27421                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27422 @end example
27423
27424 The first element is the @dfn{group name}---as Gnus knows the group,
27425 anyway.  The second element is the @dfn{subscription level}, which
27426 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27427 cons cell where the @code{car} is the level and the @code{cdr} is the
27428 score.)  The third element is a list of ranges of read articles.  The
27429 fourth element is a list of lists of article marks of various kinds.
27430 The fifth element is the select method (or virtual server, if you like).
27431 The sixth element is a list of @dfn{group parameters}, which is what
27432 this section is about.
27433
27434 Any of the last three elements may be missing if they are not required.
27435 In fact, the vast majority of groups will normally only have the first
27436 three elements, which saves quite a lot of cons cells.
27437
27438 Here's a BNF definition of the group info format:
27439
27440 @example
27441 info          = "(" group space ralevel space read
27442                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27443                 space parameters ] ] ] ] ] ")"
27444 group         = quote <string> quote
27445 ralevel       = rank / level
27446 level         = <integer in the range of 1 to inf>
27447 rank          = "(" level "." score ")"
27448 score         = <integer in the range of 1 to inf>
27449 read          = range
27450 marks-lists   = nil / "(" *marks ")"
27451 marks         = "(" <string> range ")"
27452 method        = "(" <string> *elisp-forms ")"
27453 parameters    = "(" *elisp-forms ")"
27454 @end example
27455
27456 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27457 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27458 in pseudo-BNF.
27459
27460 If you have a Gnus info and want to access the elements, Gnus offers a
27461 series of macros for getting/setting these elements.
27462
27463 @table @code
27464 @item gnus-info-group
27465 @itemx gnus-info-set-group
27466 @findex gnus-info-group
27467 @findex gnus-info-set-group
27468 Get/set the group name.
27469
27470 @item gnus-info-rank
27471 @itemx gnus-info-set-rank
27472 @findex gnus-info-rank
27473 @findex gnus-info-set-rank
27474 Get/set the group rank (@pxref{Group Score}).
27475
27476 @item gnus-info-level
27477 @itemx gnus-info-set-level
27478 @findex gnus-info-level
27479 @findex gnus-info-set-level
27480 Get/set the group level.
27481
27482 @item gnus-info-score
27483 @itemx gnus-info-set-score
27484 @findex gnus-info-score
27485 @findex gnus-info-set-score
27486 Get/set the group score (@pxref{Group Score}).
27487
27488 @item gnus-info-read
27489 @itemx gnus-info-set-read
27490 @findex gnus-info-read
27491 @findex gnus-info-set-read
27492 Get/set the ranges of read articles.
27493
27494 @item gnus-info-marks
27495 @itemx gnus-info-set-marks
27496 @findex gnus-info-marks
27497 @findex gnus-info-set-marks
27498 Get/set the lists of ranges of marked articles.
27499
27500 @item gnus-info-method
27501 @itemx gnus-info-set-method
27502 @findex gnus-info-method
27503 @findex gnus-info-set-method
27504 Get/set the group select method.
27505
27506 @item gnus-info-params
27507 @itemx gnus-info-set-params
27508 @findex gnus-info-params
27509 @findex gnus-info-set-params
27510 Get/set the group parameters.
27511 @end table
27512
27513 All the getter functions take one parameter---the info list.  The setter
27514 functions take two parameters---the info list and the new value.
27515
27516 The last three elements in the group info aren't mandatory, so it may be
27517 necessary to extend the group info before setting the element.  If this
27518 is necessary, you can just pass on a non-@code{nil} third parameter to
27519 the three final setter functions to have this happen automatically.
27520
27521
27522 @node Extended Interactive
27523 @subsection Extended Interactive
27524 @cindex interactive
27525 @findex gnus-interactive
27526
27527 Gnus extends the standard Emacs @code{interactive} specification
27528 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27529 Prefixes}).  Here's an example of how this is used:
27530
27531 @lisp
27532 (defun gnus-summary-increase-score (&optional score symp)
27533   (interactive (gnus-interactive "P\ny"))
27534   ...
27535   )
27536 @end lisp
27537
27538 The best thing to do would have been to implement
27539 @code{gnus-interactive} as a macro which would have returned an
27540 @code{interactive} form, but this isn't possible since Emacs checks
27541 whether a function is interactive or not by simply doing an @code{assq}
27542 on the lambda form.  So, instead we have @code{gnus-interactive}
27543 function that takes a string and returns values that are usable to
27544 @code{interactive}.
27545
27546 This function accepts (almost) all normal @code{interactive} specs, but
27547 adds a few more.
27548
27549 @table @samp
27550 @item y
27551 @vindex gnus-current-prefix-symbol
27552 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27553 variable.
27554
27555 @item Y
27556 @vindex gnus-current-prefix-symbols
27557 A list of the current symbolic prefixes---the
27558 @code{gnus-current-prefix-symbol} variable.
27559
27560 @item A
27561 The current article number---the @code{gnus-summary-article-number}
27562 function.
27563
27564 @item H
27565 The current article header---the @code{gnus-summary-article-header}
27566 function.
27567
27568 @item g
27569 The current group name---the @code{gnus-group-group-name}
27570 function.
27571
27572 @end table
27573
27574
27575 @node Emacs/XEmacs Code
27576 @subsection Emacs/XEmacs Code
27577 @cindex XEmacs
27578 @cindex Emacsen
27579
27580 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27581 platforms must be the primary one.  I chose Emacs.  Not because I don't
27582 like XEmacs or Mule, but because it comes first alphabetically.
27583
27584 This means that Gnus will byte-compile under Emacs with nary a warning,
27585 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27586 As I use byte-compilation warnings to help me root out trivial errors in
27587 Gnus, that's very useful.
27588
27589 I've also consistently used Emacs function interfaces, but have used
27590 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27591 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27592 function.  I then define a function called @code{gnus-run-at-time} that
27593 takes the same parameters as the Emacs @code{run-at-time}.  When running
27594 Gnus under Emacs, the former function is just an alias for the latter.
27595 However, when running under XEmacs, the former is an alias for the
27596 following function:
27597
27598 @lisp
27599 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27600   (start-itimer
27601    "gnus-run-at-time"
27602    `(lambda ()
27603       (,function ,@@args))
27604    time repeat))
27605 @end lisp
27606
27607 This sort of thing has been done for bunches of functions.  Gnus does
27608 not redefine any native Emacs functions while running under XEmacs---it
27609 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27610 all over.
27611
27612 In the cases where the XEmacs function interface was obviously cleaner,
27613 I used it instead.  For example @code{gnus-region-active-p} is an alias
27614 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27615
27616 Of course, I could have chosen XEmacs as my native platform and done
27617 mapping functions the other way around.  But I didn't.  The performance
27618 hit these indirections impose on Gnus under XEmacs should be slight.
27619
27620
27621 @node Various File Formats
27622 @subsection Various File Formats
27623
27624 @menu
27625 * Active File Format::          Information on articles and groups available.
27626 * Newsgroups File Format::      Group descriptions.
27627 @end menu
27628
27629
27630 @node Active File Format
27631 @subsubsection Active File Format
27632
27633 The active file lists all groups available on the server in
27634 question.  It also lists the highest and lowest current article numbers
27635 in each group.
27636
27637 Here's an excerpt from a typical active file:
27638
27639 @example
27640 soc.motss 296030 293865 y
27641 alt.binaries.pictures.fractals 3922 3913 n
27642 comp.sources.unix 1605 1593 m
27643 comp.binaries.ibm.pc 5097 5089 y
27644 no.general 1000 900 y
27645 @end example
27646
27647 Here's a pseudo-BNF definition of this file:
27648
27649 @example
27650 active      = *group-line
27651 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27652 group       = <non-white-space string>
27653 spc         = " "
27654 high-number = <non-negative integer>
27655 low-number  = <positive integer>
27656 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27657 @end example
27658
27659 For a full description of this file, see the manual pages for
27660 @samp{innd}, in particular @samp{active(5)}.
27661
27662
27663 @node Newsgroups File Format
27664 @subsubsection Newsgroups File Format
27665
27666 The newsgroups file lists groups along with their descriptions.  Not all
27667 groups on the server have to be listed,  and not all groups in the file
27668 have to exist on the server.  The file is meant purely as information to
27669 the user.
27670
27671 The format is quite simple; a group name, a tab, and the description.
27672 Here's the definition:
27673
27674 @example
27675 newsgroups    = *line
27676 line          = group tab description <NEWLINE>
27677 group         = <non-white-space string>
27678 tab           = <TAB>
27679 description   = <string>
27680 @end example
27681
27682
27683 @page
27684 @node Emacs for Heathens
27685 @section Emacs for Heathens
27686
27687 Believe it or not, but some people who use Gnus haven't really used
27688 Emacs much before they embarked on their journey on the Gnus Love Boat.
27689 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27690 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27691 is a regexp that is used for matching on the group name'' are magical
27692 phrases with little or no meaning, then this appendix is for you.  If
27693 you are already familiar with Emacs, just ignore this and go fondle your
27694 cat instead.
27695
27696 @menu
27697 * Keystrokes::                  Entering text and executing commands.
27698 * Emacs Lisp::                  The built-in Emacs programming language.
27699 @end menu
27700
27701
27702 @node Keystrokes
27703 @subsection Keystrokes
27704
27705 @itemize @bullet
27706 @item
27707 Q: What is an experienced Emacs user?
27708
27709 @item
27710 A: A person who wishes that the terminal had pedals.
27711 @end itemize
27712
27713 Yes, when you use Emacs, you are apt to use the control key, the shift
27714 key and the meta key a lot.  This is very annoying to some people
27715 (notably @code{vi}le users), and the rest of us just love the hell out
27716 of it.  Just give up and submit.  Emacs really does stand for
27717 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27718 may have heard from other disreputable sources (like the Emacs author).
27719
27720 The shift keys are normally located near your pinky fingers, and are
27721 normally used to get capital letters and stuff.  You probably use it all
27722 the time.  The control key is normally marked ``CTRL'' or something like
27723 that.  The meta key is, funnily enough, never marked as such on any
27724 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27725 which is the meta key on this keyboard.  It's usually located somewhere
27726 to the left hand side of the keyboard, usually on the bottom row.
27727
27728 Now, us Emacs people don't say ``press the meta-control-m key'',
27729 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27730 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27731 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27732 down the control key, and hold it down while you press @kbd{k}''.
27733 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27734 the control key and then press @kbd{k}''.  Simple, ay?
27735
27736 This is somewhat complicated by the fact that not all keyboards have a
27737 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27738 means ``press escape, release escape, press @kbd{k}''.  That's much more
27739 work than if you have a meta key, so if that's the case, I respectfully
27740 suggest you get a real keyboard with a meta key.  You can't live without
27741 it.
27742
27743
27744
27745 @node Emacs Lisp
27746 @subsection Emacs Lisp
27747
27748 Emacs is the King of Editors because it's really a Lisp interpreter.
27749 Each and every key you tap runs some Emacs Lisp code snippet, and since
27750 Emacs Lisp is an interpreted language, that means that you can configure
27751 any key to run any arbitrary code.  You just, like, do it.
27752
27753 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27754 functions.  (These are byte-compiled for speed, but it's still
27755 interpreted.)  If you decide that you don't like the way Gnus does
27756 certain things, it's trivial to have it do something a different way.
27757 (Well, at least if you know how to write Lisp code.)  However, that's
27758 beyond the scope of this manual, so we are simply going to talk about
27759 some common constructs that you normally use in your @file{.emacs} file
27760 to customize Gnus.
27761
27762 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27763 write the following:
27764
27765 @lisp
27766 (setq gnus-florgbnize 4)
27767 @end lisp
27768
27769 This function (really ``special form'') @code{setq} is the one that can
27770 set a variable to some value.  This is really all you need to know.  Now
27771 you can go and fill your @file{.emacs} file with lots of these to change
27772 how Gnus works.
27773
27774 If you have put that thing in your @file{.emacs} file, it will be read
27775 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27776 start Emacs.  If you want to change the variable right away, simply say
27777 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27778 previous ``form'', which is a simple @code{setq} statement here.
27779
27780 Go ahead---just try it, if you're located at your Emacs.  After you
27781 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27782 is the return value of the form you @code{eval}ed.
27783
27784 Some pitfalls:
27785
27786 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27787 that means:
27788
27789 @lisp
27790 (setq gnus-read-active-file 'some)
27791 @end lisp
27792
27793 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27794 @samp{nntp.ifi.uio.no}'', that means:
27795
27796 @lisp
27797 (setq gnus-nntp-server "nntp.ifi.uio.no")
27798 @end lisp
27799
27800 So be careful not to mix up strings (the latter) with symbols (the
27801 former).  The manual is unambiguous, but it can be confusing.
27802
27803 @page
27804 @include gnus-faq.texi
27805
27806 @node Index
27807 @chapter Index
27808 @printindex cp
27809
27810 @node Key Index
27811 @chapter Key Index
27812 @printindex ky
27813
27814 @summarycontents
27815 @contents
27816 @bye
27817
27818 @iftex
27819 @iflatex
27820 \end{document}
27821 @end iflatex
27822 @end iftex
27823
27824 @c Local Variables:
27825 @c mode: texinfo
27826 @c coding: iso-8859-1
27827 @c End: